hookehuyr

fix 分享功能优化调整

...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
8 export const apiList = [ 8 export const apiList = [
9 - "updateAppMessageShareData", 9 + // "updateAppMessageShareData",
10 - "updateTimelineShareData", 10 + // "updateTimelineShareData",
11 "onMenuShareTimeline", 11 "onMenuShareTimeline",
12 "onMenuShareAppMessage", 12 "onMenuShareAppMessage",
13 "onMenuShareQQ", 13 "onMenuShareQQ",
......
1 /* 1 /*
2 * @Date: 2022-06-13 17:42:32 2 * @Date: 2022-06-13 17:42:32
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-03-01 17:07:58 4 + * @LastEditTime: 2023-03-03 17:51:55
5 * @FilePath: /data-table/src/composables/useShare.js 5 * @FilePath: /data-table/src/composables/useShare.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -22,13 +22,15 @@ export const sharePage = ({title = '自定义表单', desc = '数据收集', img ...@@ -22,13 +22,15 @@ export const sharePage = ({title = '自定义表单', desc = '数据收集', img
22 link: location.origin + location.pathname + location.hash, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致 22 link: location.origin + location.pathname + location.hash, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
23 imgUrl, // 分享图标 23 imgUrl, // 分享图标
24 success: function () { 24 success: function () {
25 - // console.warn('设置成功'); 25 + console.warn('设置成功');
26 } 26 }
27 } 27 }
28 // 分享好友(微信好友或qq好友) 28 // 分享好友(微信好友或qq好友)
29 - wx.updateAppMessageShareData(shareData); 29 + // wx.updateAppMessageShareData(shareData);
30 + wx.onMenuShareAppMessage(shareData);
30 // 分享到朋友圈或qq空间 31 // 分享到朋友圈或qq空间
31 - wx.updateTimelineShareData(shareData); 32 + // wx.updateTimelineShareData(shareData);
33 + wx.onMenuShareTimeline(shareData);
32 // 分享到腾讯微博 34 // 分享到腾讯微博
33 wx.onMenuShareWeibo(shareData); 35 wx.onMenuShareWeibo(shareData);
34 // // 获取“分享给朋友”按钮点击状态及自定义分享内容接口(即将废弃) 36 // // 获取“分享给朋友”按钮点击状态及自定义分享内容接口(即将废弃)
......
1 <!-- 1 <!--
2 * @Date: 2022-07-18 10:22:22 2 * @Date: 2022-07-18 10:22:22
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-03-03 15:09:56 4 + * @LastEditTime: 2023-03-03 17:54:18
5 * @FilePath: /data-table/src/views/index.vue 5 * @FilePath: /data-table/src/views/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -289,7 +289,7 @@ onMounted(async () => { ...@@ -289,7 +289,7 @@ onMounted(async () => {
289 if (model !== 'preview') { 289 if (model !== 'preview') {
290 wx.ready(() => { 290 wx.ready(() => {
291 // 自定义分享内容 291 // 自定义分享内容
292 - sharePage({ title: form_name.value, desc: '活动报名' }); 292 + sharePage({ title: form_name.value, desc: '表单收集' });
293 }); 293 });
294 } 294 }
295 }); 295 });
...@@ -537,12 +537,6 @@ const onSubmit = async (values) => { ...@@ -537,12 +537,6 @@ const onSubmit = async (values) => {
537 // } 537 // }
538 } 538 }
539 }; 539 };
540 -
541 -// setTimeout(() => {
542 -// // TAG:微信分享
543 -// // 自定义分享内容
544 -// sharePage({ title: form_name.value, desc: '活动报名', imgUrl: '' });
545 -// }, 500)
546 </script> 540 </script>
547 541
548 <style lang="less"> 542 <style lang="less">
......