Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-06-14 12:06:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1e4b746368cbb3b9ec32f60b140fefaafad7ae9b
1e4b7463
1 parent
b1d170f5
✨ feat(分享功能): 幼儿园界面、书籍、作品、证书、个人主页 新增分享功能
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
36 deletions
src/views/client/bookDetail.vue
src/views/client/chooseBook.vue
src/views/client/chooseSchool.vue
src/views/client/donateCertificate.vue
src/views/client/personIndex.vue
src/views/client/videoDetail.vue
src/views/client/videoDetailComment.vue
src/views/client/bookDetail.vue
View file @
1e4b746
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-21 09:35:14
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-1
3 19:23:5
4
* @LastEditTime: 2022-06-1
4 11:51:1
4
* @FilePath: /tswj/src/views/client/bookDetail.vue
* @Description:
-->
...
...
@@ -135,7 +135,7 @@ import { useVideoList, useDefaultPerf, useScrollTop } from '@/composables';
import { addSubscribeAPI } from '@/api/C/book.js'
import { prepareDonateAPI } from '@/api/C/donate.js'
import { USER_ROLE, USER_TYPE } from '@/constant'
import
wx from 'weixin-js-sdk
'
import
{ sharePage } from '@/composables/useShare.js
'
const { resetScrollTop } = useScrollTop(); // 页面滚动恢复
resetScrollTop('scrollTop');
...
...
@@ -335,20 +335,7 @@ const goToDetail = (v) => { // 跳转作品详情页
/*****************************************************/
// TAG:微信分享
// wx.updateAppMessageShareData({
// title: '童声无界', // 分享标题
// desc: $route.meta.title, // 分享描述
// link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
// imgUrl: location.origin + location.pathname + 'images/weixin_logo.png', // 分享图标
// success: function () {
// // 用户确认分享后执行的回调函数
// console.warn('分享成功');
// },
// cancel: function () {
// // 用户取消分享后执行的回调函数
// console.warn('分享已取消');
// }
// })
sharePage();
</script>
<style lang="less" scoped>
...
...
src/views/client/chooseBook.vue
View file @
1e4b746
...
...
@@ -64,8 +64,7 @@ import { Cookies } from '@/utils/generatePackage.js'
import { DonateBar } from '@/utils/generateModules.js'
import { computed, ref, watch } from 'vue'
import { USER_ROLE, USER_TYPE } from '@/constant'
import { useRoute } from 'vue-router'
import wx from 'weixin-js-sdk'
import { sharePage } from '@/composables/useShare.js'
const go = useGo();
// 删除所有的 keep-alive 缓存
...
...
@@ -112,21 +111,7 @@ watch(
/**************************************************/
// TAG:微信分享
// const $route = useRoute();
// wx.updateAppMessageShareData({
// title: '童声无界', // 分享标题
// desc: $route.meta.title, // 分享描述
// link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
// imgUrl: location.origin + location.pathname + 'images/weixin_logo.png', // 分享图标
// success: function () {
// // 用户确认分享后执行的回调函数
// console.warn('分享成功');
// },
// cancel: function () {
// // 用户取消分享后执行的回调函数
// console.warn('分享已取消');
// }
// })
sharePage();
</script>
<style lang="less" scoped>
...
...
src/views/client/chooseSchool.vue
View file @
1e4b746
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-04-21 11:21:39
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-1
3 17:45:03
* @LastEditTime: 2022-06-1
4 11:48:09
* @FilePath: /tswj/src/views/client/chooseSchool.vue
* @Description: 选择学校列表
-->
...
...
src/views/client/donateCertificate.vue
View file @
1e4b746
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-04-27 10:23:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-
09 22:00:41
* @LastEditTime: 2022-06-
14 12:04:00
* @FilePath: /tswj/src/views/client/donateCertificate.vue
* @Description: 捐赠成功后显示证书页面
-->
...
...
@@ -20,7 +20,10 @@ import { USER_ROLE } from '@/constant'
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import { oneCertAPI } from '@/api/C/donate'
import { sharePage } from '@/composables/useShare.js'
// TAG:微信分享
sharePage();
const $route = useRoute();
// 捐款成功后,查询生成捐赠证书
...
...
src/views/client/personIndex.vue
View file @
1e4b746
...
...
@@ -77,6 +77,10 @@ import { addPages, store } from '@/hooks/useKeepAlive'
import { perfInfoAPI, addFollowAPI } from '@/api/C/perf.js'
import { useScrollTop } from '@/composables';
import { prepareDonateAPI } from '@/api/C/donate.js'
import { sharePage } from '@/composables/useShare.js'
// TAG:微信分享
sharePage();
const { resetScrollTop } = useScrollTop(); // 页面滚动恢复
resetScrollTop('scrollTopPerson');
...
...
src/views/client/videoDetail.vue
View file @
1e4b746
...
...
@@ -44,11 +44,15 @@
<script setup>
import { ref, onMounted, watch } from 'vue'
import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
import {
axios, storeToRefs, mainStore, Toast
} from '@/utils/generatePackage'
import {
storeToRefs, mainStore
} from '@/utils/generatePackage'
import { VideoDetail, DonateBar } from '@/utils/generateModules'
import { icon_avatar } from '@/utils/generateIcons'
import { styleColor } from '@/constant.js';
import { prodInfoAPI } from '@/api/C/prod.js'
import { sharePage } from '@/composables/useShare.js'
// TAG:微信分享
sharePage();
const $route = useRoute();
const $router = useRouter();
...
...
src/views/client/videoDetailComment.vue
View file @
1e4b746
...
...
@@ -80,6 +80,10 @@ import { Toast } from 'vant';
// 获取是否实名认证
import { useDefaultPerf } from '@/composables';
import { sharePage } from '@/composables/useShare.js'
// TAG:微信分享
sharePage();
const $route = useRoute();
const $router = useRouter();
...
...
Please
register
or
login
to post a comment