<template>
  <ToolbarItemContainer
    iconFile="https://qianzhiy-applet.oss-rg-china-mainland.aliyuncs.com/h5/images/homemaking/user/tool-icon4.png"
    title="我的发布"
    :needDialog="false"
    iconWidth="30px"
    iconHeight="30px"
    @onIconClick="onIconClick"
  >
    <div class="video-upload">
      <input
        ref="inputRef"
        title="我的发布"
        type="file"
        data-type="video"
        accept="video/*"
      />
    </div>
  </ToolbarItemContainer>
</template>
<script lang="ts" setup>
import ToolbarItemContainer from "../toolbar-item-container/index.vue";
interface IProps {
  infoData: Object;
}
const props = withDefaults(defineProps<IProps>(), {});

const onIconClick = () => {
  uni.navigateTo({
    url:
      "/pages/merChantSide/publish/my-publish?shopUserId=" +
      props.infoData.shopUserId +
      "&userId=" +
      props.infoData.userId,
  });
};

// 获取地址栏参数
function getParamValue(paramName) {
  const regExp = new RegExp("[?&]" + paramName + "=([^&#]*)");
  const results = regExp.exec(window.location.href);
  if (results) {
    return decodeURIComponent(results[1]);
  } else {
    return null;
  }
}
</script>

<style lang="scss" scoped>
@import "../../../../assets/styles/common";
</style>
