Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2023-03-03 17:56:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5215b598f13c8c4cefe6fafc73d9363bdd4896f1
5215b598
1 parent
9cdf8394
fix 分享功能优化调整
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
src/api/wx/jsApiList.js
src/composables/useShare.js
src/views/index.vue
src/api/wx/jsApiList.js
View file @
5215b59
...
...
@@ -6,8 +6,8 @@
* @Description: 文件描述
*/
export
const
apiList
=
[
"updateAppMessageShareData"
,
"updateTimelineShareData"
,
//
"updateAppMessageShareData",
//
"updateTimelineShareData",
"onMenuShareTimeline"
,
"onMenuShareAppMessage"
,
"onMenuShareQQ"
,
...
...
src/composables/useShare.js
View file @
5215b59
/*
* @Date: 2022-06-13 17:42:32
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-03-0
1 17:07:58
* @LastEditTime: 2023-03-0
3 17:51:55
* @FilePath: /data-table/src/composables/useShare.js
* @Description: 文件描述
*/
...
...
@@ -22,13 +22,15 @@ export const sharePage = ({title = '自定义表单', desc = '数据收集', img
link
:
location
.
origin
+
location
.
pathname
+
location
.
hash
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
imgUrl
,
// 分享图标
success
:
function
()
{
//
console.warn('设置成功');
console
.
warn
(
'设置成功'
);
}
}
// 分享好友(微信好友或qq好友)
wx
.
updateAppMessageShareData
(
shareData
);
// wx.updateAppMessageShareData(shareData);
wx
.
onMenuShareAppMessage
(
shareData
);
// 分享到朋友圈或qq空间
wx
.
updateTimelineShareData
(
shareData
);
// wx.updateTimelineShareData(shareData);
wx
.
onMenuShareTimeline
(
shareData
);
// 分享到腾讯微博
wx
.
onMenuShareWeibo
(
shareData
);
// // 获取“分享给朋友”按钮点击状态及自定义分享内容接口(即将废弃)
...
...
src/views/index.vue
View file @
5215b59
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-03-03 1
5:09:56
* @LastEditTime: 2023-03-03 1
7:54:18
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -289,7 +289,7 @@ onMounted(async () => {
if (model !== 'preview') {
wx.ready(() => {
// 自定义分享内容
sharePage({ title: form_name.value, desc: '
活动报名
' });
sharePage({ title: form_name.value, desc: '
表单收集
' });
});
}
});
...
...
@@ -537,12 +537,6 @@ const onSubmit = async (values) => {
// }
}
};
// setTimeout(() => {
// // TAG:微信分享
// // 自定义分享内容
// sharePage({ title: form_name.value, desc: '活动报名', imgUrl: '' });
// }, 500)
</script>
<style lang="less">
...
...
Please
register
or
login
to post a comment