Showing
4 changed files
with
24 additions
and
11 deletions
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: hookehuyr hookehuyr@gmail.com | 2 | * @Author: hookehuyr hookehuyr@gmail.com |
| 3 | * @Date: 2022-05-21 09:35:14 | 3 | * @Date: 2022-05-21 09:35:14 |
| 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 5 | - * @LastEditTime: 2022-07-04 06:46:27 | 5 | + * @LastEditTime: 2022-07-12 13:28:26 |
| 6 | * @FilePath: /tswj/src/views/client/bookDetail.vue | 6 | * @FilePath: /tswj/src/views/client/bookDetail.vue |
| 7 | * @Description: | 7 | * @Description: |
| 8 | --> | 8 | --> |
| ... | @@ -360,8 +360,11 @@ const setComment = (v) => { | ... | @@ -360,8 +360,11 @@ const setComment = (v) => { |
| 360 | } | 360 | } |
| 361 | /*****************************************************/ | 361 | /*****************************************************/ |
| 362 | 362 | ||
| 363 | -// TAG:微信分享 | 363 | +setTimeout(() => { |
| 364 | -sharePage({}); | 364 | + // TAG:微信分享 |
| 365 | + // 自定义分享内容 | ||
| 366 | + sharePage({ title: bookInfo.value.name, imgUrl: bookInfo.value.cover }); | ||
| 367 | +}, 500) | ||
| 365 | </script> | 368 | </script> |
| 366 | 369 | ||
| 367 | <style lang="less" scoped> | 370 | <style lang="less" scoped> | ... | ... |
| ... | @@ -109,10 +109,13 @@ watch( | ... | @@ -109,10 +109,13 @@ watch( |
| 109 | 109 | ||
| 110 | setTimeout(() => { | 110 | setTimeout(() => { |
| 111 | // TAG:微信分享 | 111 | // TAG:微信分享 |
| 112 | - sharePage({}); | 112 | + if (isClient) { |
| 113 | - // 测试自定义分享内容 | 113 | + // 自定义分享内容 |
| 114 | - // const title = kgInfo.value.multi_name ? `${kgInfo.value.multi_name[0]} ${kgInfo.value.multi_name[1]}` : kgInfo.value.name | 114 | + const title = kgInfo.value.multi_name ? `${kgInfo.value.multi_name[0]} ${kgInfo.value.multi_name[1]}` : kgInfo.value.name |
| 115 | - // sharePage({ title, imgUrl: kgInfo.value.logo }); | 115 | + sharePage({ title, imgUrl: kgInfo.value.logo }); |
| 116 | + } else { | ||
| 117 | + sharePage({}); | ||
| 118 | + } | ||
| 116 | }, 500) | 119 | }, 500) |
| 117 | </script> | 120 | </script> |
| 118 | 121 | ... | ... |
| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | </van-tab> --> | 33 | </van-tab> --> |
| 34 | <van-tab :title="'留言 ' + comment_num" :title-style="tabClass"> | 34 | <van-tab :title="'留言 ' + comment_num" :title-style="tabClass"> |
| 35 | <!-- <router-view ref="childRef" name="comment" /> --> | 35 | <!-- <router-view ref="childRef" name="comment" /> --> |
| 36 | - <video-detail-comment ref="childRef" /> | 36 | + <video-detail-comment v-if="videoInfo" ref="childRef" :info="videoInfo" /> |
| 37 | <donate-bar v-if="videoInfo" :perf-id="videoInfo.perf_id">为TA助力</donate-bar> | 37 | <donate-bar v-if="videoInfo" :perf-id="videoInfo.perf_id">为TA助力</donate-bar> |
| 38 | </van-tab> | 38 | </van-tab> |
| 39 | </van-tabs> | 39 | </van-tabs> | ... | ... |
| ... | @@ -58,7 +58,7 @@ | ... | @@ -58,7 +58,7 @@ |
| 58 | </template> | 58 | </template> |
| 59 | 59 | ||
| 60 | <script setup> | 60 | <script setup> |
| 61 | -import { mainStore } from '@/store' | 61 | +import { mainStore, useTitle } from '@/utils/generatePackage' |
| 62 | 62 | ||
| 63 | import CommentList from '@/components/CommentList/index.vue' | 63 | import CommentList from '@/components/CommentList/index.vue' |
| 64 | import CommentBox from '@/components/CommentBox/index.vue' | 64 | import CommentBox from '@/components/CommentBox/index.vue' |
| ... | @@ -77,8 +77,15 @@ import { useGo } from '@/hooks/useGo' | ... | @@ -77,8 +77,15 @@ import { useGo } from '@/hooks/useGo' |
| 77 | // 获取是否实名认证 | 77 | // 获取是否实名认证 |
| 78 | import { useDefaultPerf } from '@/composables'; | 78 | import { useDefaultPerf } from '@/composables'; |
| 79 | import { sharePage } from '@/composables/useShare.js' | 79 | import { sharePage } from '@/composables/useShare.js' |
| 80 | -// TAG:微信分享 | 80 | + |
| 81 | -sharePage({}); | 81 | +const props = defineProps({ |
| 82 | + info: Object, | ||
| 83 | +}) | ||
| 84 | +setTimeout(() => { | ||
| 85 | + // TAG:微信分享 | ||
| 86 | + // 自定义分享内容 | ||
| 87 | + sharePage({ title: `${props.info.name}-${props.info.book_name}`, imgUrl: props.info.cover }); | ||
| 88 | +}, 500); | ||
| 82 | 89 | ||
| 83 | const go = useGo(); | 90 | const go = useGo(); |
| 84 | const $route = useRoute(); | 91 | const $route = useRoute(); | ... | ... |
-
Please register or login to post a comment