Commit 9b2683d5 authored by mengcuiguang's avatar mengcuiguang

优化分享逻辑

parent 61336de7
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
}, },
methods: { methods: {
async onShareAppMessage(option) { async onShareAppMessage(option) {
const title = '更多好剧,等你来看'; const title = '寻觅短剧';
return { return {
title, // 这是要转发的小程序标题 title, // 这是要转发的小程序标题
desc: "", desc: this.share.title,
path: this.share.path + getApp().globalData.userId, // ?后面的参数会在转发页面打开时传入onLoad方法 path: this.share.path + getApp().globalData.userId,
imageUrl: this.share.imageUrl, // 支持本地或远程图片,默认是小程序 icon imageUrl: this.share.imageUrl,
templateId: "这是开发者后台设置的分享素材模板id", templateId: "920405b4ghj2fla2gc",
success() { success() {
message.notify('分享成功'); message.notify('分享成功');
...@@ -106,13 +106,6 @@ ...@@ -106,13 +106,6 @@
}, },
}; };
}, },
getTitle() {
return new Promise((resolve) => {
setTimeout(() => {
resolve("This is a mock title");
}, 2000);
});
},
loadData() { loadData() {
this.post({ this.post({
url: '/vTask/share/pageMsg', url: '/vTask/share/pageMsg',
...@@ -126,13 +119,6 @@ ...@@ -126,13 +119,6 @@
}, },
// onShareAppMessage(res) { //发送给朋友
// return {
// title: this.share.title,
// imageUrl: this.share.imageUrl,
// path: this.share.path + getApp().globalData.userId,
// }
// },
handleRule() { handleRule() {
uni.showModal({ uni.showModal({
title: '邀请好友规则', title: '邀请好友规则',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment