From 8613f0fc4659136f22b44c9fb24517bd7db756e9 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 7 Jun 2018 14:12:43 +0800 Subject: [PATCH] no message --- app.js.rej | 11 ---- pages/activity_detail/activity_detail.js | 59 +++---------------- pages/detail/detail.js | 4 +- pages/order/order.js | 1 - pages/order/order.wxml | 2 +- pages/pay_result/pay_result.js | 74 ++++++------------------ pages/pay_result/pay_result.wxml | 2 +- 7 files changed, 29 insertions(+), 124 deletions(-) delete mode 100644 app.js.rej diff --git a/app.js.rej b/app.js.rej deleted file mode 100644 index 2e916a7..0000000 --- a/app.js.rej +++ /dev/null @@ -1,11 +0,0 @@ -diff a/app.js b/app.js (rejected hunks) -@@ -19,8 +19,7 @@ - - } - }) -- -- -+ this.gw.systemInfo = wx.getSystemInfoSync(); - }, - getSessionKey: function (code) { - var that = this; diff --git a/pages/activity_detail/activity_detail.js b/pages/activity_detail/activity_detail.js index 0399516..a15b976 100644 --- a/pages/activity_detail/activity_detail.js +++ b/pages/activity_detail/activity_detail.js @@ -316,7 +316,6 @@ Page({ this.groupOpenOrJoin(url); } else { //团长与参与人立即预约 - wx.showModal({ title: '', content: '服务卡已放入您的账户中,搜索关注“一号家政服务号”即可预约', @@ -388,10 +387,10 @@ Page({ icon: 'success', duration: 2000 }) + var json = JSON.stringify(that.data.activityDetail); wx.navigateTo({ - url: '../pay_result/pay_result?activityNo=' + that.data.activityNo + '&groupNo=' + that.data.groupNo + url: '../pay_result/pay_result?json=' + json }) - }, "fail": function (res) { console.log(res); @@ -453,55 +452,6 @@ 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 - // }); - // } - this.setData({ 'show': true }); @@ -520,6 +470,11 @@ Page({ return } else if (index == 1) { // this.showMomentImage(); + wx.showToast({ + title: '暂未开放!', + icon: 'none', + duration: 1000 + }); } this.setData({ [`show`]: false, diff --git a/pages/detail/detail.js b/pages/detail/detail.js index ac87b0e..0b19ed3 100644 --- a/pages/detail/detail.js +++ b/pages/detail/detail.js @@ -31,7 +31,6 @@ Page({ wx.navigateTo({ url: '../serviceDesc/serviceDesc?jsonStr=' + str }) - console.log(str); }, createOrder:function(e){ if (wx.getStorageSync('sessionId')==''){ @@ -116,13 +115,12 @@ Page({ }) let notice = data.response.notice; let serviceDesc = data.response.serviceDesc; - console.log(notice); WxParse.wxParse('notice', 'html', notice, that); WxParse.wxParse('serviceDesc', 'html', serviceDesc, that, 5); }, fail: function (e) { wx.showToast({ - title: '网络异常!err:authlogin', + title: '网络异常!', icon: 'none', duration: 2000 }); diff --git a/pages/order/order.js b/pages/order/order.js index ae98aac..611f163 100644 --- a/pages/order/order.js +++ b/pages/order/order.js @@ -173,7 +173,6 @@ Page({ wx.navigateTo({ url: '../detail/detail?jsonStr=' + str }) - console.log(str); }, goLogin: function (e) { if (wx.getStorageSync('sessionId') == '') { diff --git a/pages/order/order.wxml b/pages/order/order.wxml index 9d4ddbd..38a9015 100644 --- a/pages/order/order.wxml +++ b/pages/order/order.wxml @@ -1,6 +1,6 @@ - + {{item.createAtStr}} ¥{{item.payPrice/100}} diff --git a/pages/pay_result/pay_result.js b/pages/pay_result/pay_result.js index bf9b886..d92e16b 100644 --- a/pages/pay_result/pay_result.js +++ b/pages/pay_result/pay_result.js @@ -1,6 +1,6 @@ Page({ data: { - groupNo: '', + activityDetail: {}, windowWidth: 0, windowHeight: 0, scaleW: 0.85, @@ -19,11 +19,11 @@ Page({ }], txtmoment: '保存图片,分享到朋友圈', qrImageUrl: "", - bgImageUrl: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1527496410439&di=54c111d35f3ca9d1e9b193834785c264&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F013c81583fa08ea8012060c864c3b7.jpg', + bgImageUrl: '', }, onLoad: function (options) { - this.data.groupNo = options.groupNo; + this.data.activityDetail = JSON.parse(options.json); wx.getSystemInfo({ success: (res) => { this.setData({ @@ -37,7 +37,7 @@ Page({ url: getApp().gw.hostUrl + '/mall/wxa/activity/group/wxa_code', method: 'get', data: { - groupNo: that.data.groupNo, + groupNo: that.data.activityDetail.groupNo, width: 80, page: 'index/index' }, @@ -54,53 +54,9 @@ 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 { - this.setData({ - 'show': true - }); - } + this.setData({ + 'show': true + }); }, closeActionSheet: function () { @@ -109,11 +65,14 @@ Page({ }); }, + /** + * 用户点击右上角分享 + */ onShareAppMessage: function () { return { - title: '1号家政', - imageUrl: this.data.qrImageUrl, - path: '/pages/index/index', + title: this.data.activityDetail.shareTitle, + imageUrl: this.data.activityDetail.sharePhoto, + path: '/pages/activity_detail/activity_detail?activityNo=' + this.data.activityDetail.activityNo + '&groupNo=' + this.data.activityDetail.groupNo, }; }, @@ -123,7 +82,12 @@ Page({ if (index === 0) { return } else if (index == 1) { - this.showMomentImage(); + wx.showToast({ + title: '暂未开放!', + icon: 'none', + duration: 1000 + }); + // this.showMomentImage(); } this.setData({ [`show`]: false, diff --git a/pages/pay_result/pay_result.wxml b/pages/pay_result/pay_result.wxml index 180a87d..d170261 100644 --- a/pages/pay_result/pay_result.wxml +++ b/pages/pay_result/pay_result.wxml @@ -8,7 +8,7 @@ 拼团成功后,将会存入您的服务卡中公众号关注【一号家政服务号】,即可预约 - +