index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <ToolbarItemContainer
  3. iconFile="https://qianzhiy-applet.oss-rg-china-mainland.aliyuncs.com/h5/images/house/user/tool-icon4.png"
  4. title="我的房源"
  5. :needDialog="false"
  6. iconWidth="30px"
  7. iconHeight="30px"
  8. @onIconClick="onIconClick"
  9. >
  10. <div class="video-upload">
  11. <input
  12. ref="inputRef"
  13. title="我的房源"
  14. type="file"
  15. data-type="video"
  16. accept="video/*"
  17. />
  18. </div>
  19. </ToolbarItemContainer>
  20. </template>
  21. <script lang="ts" setup>
  22. import ToolbarItemContainer from "../toolbar-item-container/index.vue";
  23. interface IProps {
  24. infoData: Object;
  25. }
  26. const props = withDefaults(defineProps<IProps>(), {});
  27. function getParamValue(paramName) {
  28. const regExp = new RegExp("[?&]" + paramName + "=([^&#]*)");
  29. const results = regExp.exec(window.location.href);
  30. if (results) {
  31. return decodeURIComponent(results[1]);
  32. } else {
  33. return null;
  34. }
  35. }
  36. const onIconClick = () => {
  37. webUni.webView.navigateTo({
  38. url:
  39. "/packageHouse/home/house/my-house?userId=" +
  40. getParamValue("recruitUserId"),
  41. });
  42. };
  43. </script>
  44. <style lang="scss" scoped>
  45. @import "../../../../assets/styles/common";
  46. </style>