Browse Source

no message

feature/v1.1.0
xpz2018 7 years ago
parent
commit
67c0a57ba2
2 changed files with 56 additions and 71 deletions
  1. 125
      pages/activity_detail/activity_detail.js
  2. 2
      pages/activity_detail/activity_detail.wxml

125
pages/activity_detail/activity_detail.js

@ -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,
};
},

2
pages/activity_detail/activity_detail.wxml

@ -57,7 +57,7 @@
<view class='list'>
<scroll-view scroll-x="{{true}}" scroll-y="{{false}}" class='list'>
<view class='view'>
<view wx:for-items="{{memberList}}" class="memberList">
<view wx:for-items="{{memberList}}" class="memberList" wx:key="userId">
<image class='headImage' src='{{item.headUrl}}'></image>
<text class="{{item.memberType == 0 ? 'markBlock' : 'markNone'}}">团长</text>
</view>

Loading…
Cancel
Save