|
|
|
@ -55,26 +55,7 @@ Page({ |
|
|
|
activityNo: options.activityNo == undefined ? "" : options.activityNo, |
|
|
|
groupNo: options.groupNo == undefined ? "" : options.groupNo, |
|
|
|
}); |
|
|
|
var that = this; |
|
|
|
wx.request({ |
|
|
|
url: getApp().gw.hostUrl + '/mall/wxa/activity/group/wxa_code', |
|
|
|
method: 'get', |
|
|
|
data: { |
|
|
|
groupNo: that.data.groupNo, |
|
|
|
width: 80, |
|
|
|
page: 'index/index' |
|
|
|
}, |
|
|
|
header: { |
|
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
'sessionId': wx.getStorageSync('sessionId') |
|
|
|
}, |
|
|
|
success: function (res) { |
|
|
|
console.log(res) |
|
|
|
if (res.statusCode == 200) { |
|
|
|
that.data.qrImageUrl = res.data.msg; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
|
@ -467,54 +448,58 @@ Page({ |
|
|
|
|
|
|
|
//打败Actionsheet,进行分享
|
|
|
|
openActionsheet: function () { |
|
|
|
if (this.data.qrImageUrl.length == 0) { |
|
|
|
wx.showLoading({ |
|
|
|
title: '正在获取', |
|
|
|
mask: true, |
|
|
|
}); |
|
|
|
var that = this; |
|
|
|
wx.request({ |
|
|
|
url: getApp().gw.hostUrl + '/mall/wxa/activity/group/wxa_code', |
|
|
|
method: 'get', |
|
|
|
data: { |
|
|
|
groupNo: that.data.groupNo, |
|
|
|
width: 80, |
|
|
|
page: 'index/index' |
|
|
|
}, |
|
|
|
header: { |
|
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
'sessionId': wx.getStorageSync('sessionId') |
|
|
|
}, |
|
|
|
success: function (res) { |
|
|
|
wx.hideLoading(); |
|
|
|
if (res.statusCode == 200) { |
|
|
|
that.setData({ |
|
|
|
qrImageUrl: res.data.msg, |
|
|
|
show: true |
|
|
|
}); |
|
|
|
} else { |
|
|
|
wx.showToast({ |
|
|
|
title: '获取信息失败!', |
|
|
|
icon: 'none', |
|
|
|
duration: 1000 |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: function (res) { |
|
|
|
wx.hideLoading(); |
|
|
|
wx.showToast({ |
|
|
|
title: '网络错误!', |
|
|
|
icon: 'none', |
|
|
|
duration: 1000 |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
console.log("openActionsheet>>qrImageUrl:" + this.data.qrImageUrl) |
|
|
|
this.setData({ |
|
|
|
'show': true |
|
|
|
}); |
|
|
|
} |
|
|
|
// if (this.data.qrImageUrl.length == 0) {
|
|
|
|
// wx.showLoading({
|
|
|
|
// title: '正在获取',
|
|
|
|
// mask: true,
|
|
|
|
// });
|
|
|
|
// var that = this;
|
|
|
|
// wx.request({
|
|
|
|
// url: getApp().gw.hostUrl + '/mall/wxa/activity/group/wxa_code',
|
|
|
|
// method: 'get',
|
|
|
|
// data: {
|
|
|
|
// groupNo: that.data.groupNo,
|
|
|
|
// width: 80,
|
|
|
|
// page: 'index/index'
|
|
|
|
// },
|
|
|
|
// header: {
|
|
|
|
// 'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
// 'sessionId': wx.getStorageSync('sessionId')
|
|
|
|
// },
|
|
|
|
// success: function (res) {
|
|
|
|
// wx.hideLoading();
|
|
|
|
// if (res.statusCode == 200) {
|
|
|
|
// that.setData({
|
|
|
|
// qrImageUrl: res.data.msg,
|
|
|
|
// show: true
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// wx.showToast({
|
|
|
|
// title: '获取信息失败!',
|
|
|
|
// icon: 'none',
|
|
|
|
// duration: 1000
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// fail: function (res) {
|
|
|
|
// wx.hideLoading();
|
|
|
|
// wx.showToast({
|
|
|
|
// title: '网络错误!',
|
|
|
|
// icon: 'none',
|
|
|
|
// duration: 1000
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// console.log("openActionsheet>>qrImageUrl:" + this.data.qrImageUrl)
|
|
|
|
// this.setData({
|
|
|
|
// 'show': true
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
'show': true |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
closeActionSheet: function () { |
|
|
|
@ -542,8 +527,8 @@ Page({ |
|
|
|
*/ |
|
|
|
onShareAppMessage: function () { |
|
|
|
return { |
|
|
|
title: '1号家政', |
|
|
|
imageUrl: this.data.qrImageUrl, |
|
|
|
title: this.data.activityDetail.shareTitle, |
|
|
|
imageUrl: this.data.activityDetail.sharePhoto, |
|
|
|
path: '/pages/activity_detail/activity_detail?activityNo=' + this.data.activityNo + '&groupNo=' + this.data.groupNo, |
|
|
|
}; |
|
|
|
}, |