Browse Source

在我的活动页加入分享

master
yxt_njy 1 year ago
parent
commit
3303fb79a7
  1. 19
      pages/find/ActivityDetail.vue
  2. 92
      pages/index/activity.vue

19
pages/find/ActivityDetail.vue

@ -211,6 +211,25 @@
});
},
methods: {
//
onShareAppMessage: function() {
wx.showShareMenu(
{
withShareTicket:true,
menu:['111','222']
}
)
},
//
onShareTimeline() {
return {
title: '公司团建', //
path: '/pages/home/cloudCard2', // URL
imageUrl: '/static/logo_icon.png', // PNGJPG
};
},
setEnrollRequiredName(){
let enrollRequiredName = ""
if (this.page.activityDetails.enrollRequired.onRealName == 1){

92
pages/index/activity.vue

@ -297,6 +297,7 @@
<script>
import fuiButton from "@/components/firstui/fui-dropdown-menu/fui-dropdown-menu.vue"
export default {
components: {
"fuiButton": fuiButton
},
@ -491,6 +492,97 @@
},
methods: {
//
onShareAppMessage: function(res) {
// console.log("res", res)
// console.log("data", res.target.dataset)
// var data = res.target.dataset.info
// //
// let shareData = JSON.stringify({
// // params: {
// // code: data.code,
// // codeKey: data.codeKey,
// // customerSid: ''
// // },
// // functionName: 'bindCard',
// // url: '/pages/detail/detail_affeection?sid=' + data.sid
// url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
// functionName: 'share'
// })
// //
// let value = encodeURIComponent(shareData)
// return {
// title: '-',
// //
// path: '/pages/login/login?data=' + value,
// imageUrl: 'https://supervise.yxtsoft.com/lpk/image/share_invite.png', // 5:4
// success: function(res) {
// console.log('aaaa', "")
// },
// fail: function(res) {
// //
// console.log('aaaa', "")
// }
// }
let _this = this
const promise = new Promise(resolve => {
//
setTimeout(() => {
var params = {
customerSid: getApp().globalData.sid
}
_this.$api.recommendNewUsers(params).then((resp) => {
let shareData = JSON.stringify({
// params: {
// code: resp.transferCode,
// codeKey: resp.sid
// },
// functionName: 'bindCard',
// url: '/pages/bind/bind_cloudCard?code=' + resp
// .transferCode + "&codeKey=" + resp.sid
url: '/pages/home/myCellar?shareSid=' + getApp()
.globalData.sid + "&orderSid=" + resp.sid,
functionName: 'share'
})
//
let value = encodeURIComponent(shareData)
resolve({
title: '汇融惠享-云菜窖',
//
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/share_invite.png', // 5:4
})
}).catch(e => {
_this.shortToast('发生错误,请稍后再试.')
return
})
}, 0)
})
return promise
},
//
onShareTimeline() {
return {
title: '邀请您使用汇融云菜窖小程序', //
path: '/pages/home/cloudCard2', // URL
imageUrl: '/static/logo_icon.png', // PNGJPG
};
},
backClick() {
let that = this
uni.showModal({

Loading…
Cancel
Save