hookehuyr

✨ feat: 作品详情页新增返回首页功能

......@@ -4,11 +4,11 @@
<div class="normal-module">
<div class="video-bar">
<van-row>
<van-col span="12" @click="setComment">
<van-col span="15" @click="setComment">
<van-image round width="2rem" height="2rem" class="avatar" :src="item.avatar ? item.avatar : icon_avatar" />
<span class="text">{{ item.name }}</span>
</van-col>
<van-col span="12">
<van-col span="9">
<div style="padding: 0.25rem; padding-top: 0.5rem; text-align: right;">
<span @click="setComment">
<van-icon :name="icon_liuyan" size="1.2rem" style="vertical-align: bottom;" />
......
......@@ -40,6 +40,7 @@
</van-col>
</van-row>
</div>
<shortcut-fixed :type="USER_ROLE.CLIENT" :item="['home']" :custom-style="customStyle" />
</div>
</template>
......@@ -47,9 +48,9 @@
import { ref, onMounted, watch } from 'vue'
import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
import { storeToRefs, mainStore } from '@/utils/generatePackage'
import { VideoDetail, DonateBar } from '@/utils/generateModules'
import { VideoDetail, DonateBar, ShortcutFixed } from '@/utils/generateModules'
import { icon_avatar } from '@/utils/generateIcons'
import { styleColor } from '@/constant.js';
import { styleColor, USER_ROLE } from '@/constant.js';
import { prodInfoAPI } from '@/api/C/prod.js'
import { sharePage } from '@/composables/useShare.js'
import $ from 'jquery'
......@@ -73,6 +74,10 @@ const getUserInfo = () => {
}
}
const customStyle = ref({
bottom: '10rem'
})
const active = ref(0); // index 0 为简介,1 为留言
const onClickTab = ({ name }) => {
// 适配read-only情况
......@@ -86,7 +91,7 @@ const onClickTab = ({ name }) => {
}
})
}
};
// 监听路由变化
watch(() => $route.path, (v) => {
......