hookehuyr

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

...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 <div class="normal-module"> 4 <div class="normal-module">
5 <div class="video-bar"> 5 <div class="video-bar">
6 <van-row> 6 <van-row>
7 - <van-col span="12" @click="setComment"> 7 + <van-col span="15" @click="setComment">
8 <van-image round width="2rem" height="2rem" class="avatar" :src="item.avatar ? item.avatar : icon_avatar" /> 8 <van-image round width="2rem" height="2rem" class="avatar" :src="item.avatar ? item.avatar : icon_avatar" />
9 <span class="text">{{ item.name }}</span> 9 <span class="text">{{ item.name }}</span>
10 </van-col> 10 </van-col>
11 - <van-col span="12"> 11 + <van-col span="9">
12 <div style="padding: 0.25rem; padding-top: 0.5rem; text-align: right;"> 12 <div style="padding: 0.25rem; padding-top: 0.5rem; text-align: right;">
13 <span @click="setComment"> 13 <span @click="setComment">
14 <van-icon :name="icon_liuyan" size="1.2rem" style="vertical-align: bottom;" /> 14 <van-icon :name="icon_liuyan" size="1.2rem" style="vertical-align: bottom;" />
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
40 </van-col> 40 </van-col>
41 </van-row> 41 </van-row>
42 </div> 42 </div>
43 + <shortcut-fixed :type="USER_ROLE.CLIENT" :item="['home']" :custom-style="customStyle" />
43 </div> 44 </div>
44 </template> 45 </template>
45 46
...@@ -47,9 +48,9 @@ ...@@ -47,9 +48,9 @@
47 import { ref, onMounted, watch } from 'vue' 48 import { ref, onMounted, watch } from 'vue'
48 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router' 49 import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
49 import { storeToRefs, mainStore } from '@/utils/generatePackage' 50 import { storeToRefs, mainStore } from '@/utils/generatePackage'
50 -import { VideoDetail, DonateBar } from '@/utils/generateModules' 51 +import { VideoDetail, DonateBar, ShortcutFixed } from '@/utils/generateModules'
51 import { icon_avatar } from '@/utils/generateIcons' 52 import { icon_avatar } from '@/utils/generateIcons'
52 -import { styleColor } from '@/constant.js'; 53 +import { styleColor, USER_ROLE } from '@/constant.js';
53 import { prodInfoAPI } from '@/api/C/prod.js' 54 import { prodInfoAPI } from '@/api/C/prod.js'
54 import { sharePage } from '@/composables/useShare.js' 55 import { sharePage } from '@/composables/useShare.js'
55 import $ from 'jquery' 56 import $ from 'jquery'
...@@ -73,6 +74,10 @@ const getUserInfo = () => { ...@@ -73,6 +74,10 @@ const getUserInfo = () => {
73 } 74 }
74 } 75 }
75 76
77 +const customStyle = ref({
78 + bottom: '10rem'
79 +})
80 +
76 const active = ref(0); // index 0 为简介,1 为留言 81 const active = ref(0); // index 0 为简介,1 为留言
77 const onClickTab = ({ name }) => { 82 const onClickTab = ({ name }) => {
78 // 适配read-only情况 83 // 适配read-only情况
...@@ -86,7 +91,7 @@ const onClickTab = ({ name }) => { ...@@ -86,7 +91,7 @@ const onClickTab = ({ name }) => {
86 } 91 }
87 }) 92 })
88 } 93 }
89 - 94 +
90 }; 95 };
91 // 监听路由变化 96 // 监听路由变化
92 watch(() => $route.path, (v) => { 97 watch(() => $route.path, (v) => {
......