hookehuyr

✨ feat(需要分享的相关页面): 分享内容优化

......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-21 09:35:14
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-07-04 06:46:27
* @LastEditTime: 2022-07-12 13:28:26
* @FilePath: /tswj/src/views/client/bookDetail.vue
* @Description:
-->
......@@ -360,8 +360,11 @@ const setComment = (v) => {
}
/*****************************************************/
// TAG:微信分享
sharePage({});
setTimeout(() => {
// TAG:微信分享
// 自定义分享内容
sharePage({ title: bookInfo.value.name, imgUrl: bookInfo.value.cover });
}, 500)
</script>
<style lang="less" scoped>
......
......@@ -109,10 +109,13 @@ watch(
setTimeout(() => {
// TAG:微信分享
if (isClient) {
// 自定义分享内容
const title = kgInfo.value.multi_name ? `${kgInfo.value.multi_name[0]} ${kgInfo.value.multi_name[1]}` : kgInfo.value.name
sharePage({ title, imgUrl: kgInfo.value.logo });
} else {
sharePage({});
// 测试自定义分享内容
// const title = kgInfo.value.multi_name ? `${kgInfo.value.multi_name[0]} ${kgInfo.value.multi_name[1]}` : kgInfo.value.name
// sharePage({ title, imgUrl: kgInfo.value.logo });
}
}, 500)
</script>
......
......@@ -33,7 +33,7 @@
</van-tab> -->
<van-tab :title="'留言 ' + comment_num" :title-style="tabClass">
<!-- <router-view ref="childRef" name="comment" /> -->
<video-detail-comment ref="childRef" />
<video-detail-comment v-if="videoInfo" ref="childRef" :info="videoInfo" />
<donate-bar v-if="videoInfo" :perf-id="videoInfo.perf_id">为TA助力</donate-bar>
</van-tab>
</van-tabs>
......
......@@ -58,7 +58,7 @@
</template>
<script setup>
import { mainStore } from '@/store'
import { mainStore, useTitle } from '@/utils/generatePackage'
import CommentList from '@/components/CommentList/index.vue'
import CommentBox from '@/components/CommentBox/index.vue'
......@@ -77,8 +77,15 @@ import { useGo } from '@/hooks/useGo'
// 获取是否实名认证
import { useDefaultPerf } from '@/composables';
import { sharePage } from '@/composables/useShare.js'
// TAG:微信分享
sharePage({});
const props = defineProps({
info: Object,
})
setTimeout(() => {
// TAG:微信分享
// 自定义分享内容
sharePage({ title: `${props.info.name}-${props.info.book_name}`, imgUrl: props.info.cover });
}, 500);
const go = useGo();
const $route = useRoute();
......