diff --git a/pages/order/pay/index.js b/pages/order/pay/index.js index 9d934e6..afb040c 100644 --- a/pages/order/pay/index.js +++ b/pages/order/pay/index.js @@ -47,6 +47,9 @@ Page({ codeId:null, inputAreaHeight: 0, heightTimer: null, + + isPaying: false, + }, /** @@ -103,6 +106,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + // 正在支付中不处理 + if (this.data.isPaying) return + commonApi.user_post("subwallet.ermb/wallet",{}).then(res=>{ // 给建设银行子钱包做标识 let resData = res.data || [] @@ -248,6 +254,7 @@ Page({ }).then(res=>{ res.data = JSON.parse(res.data) console.log(res.data) + _this.data.isPaying = true wx.requestPayment({ nonceStr: res.data.nonceStr || res.data.noncestr, package: res.data.package, @@ -260,12 +267,15 @@ Page({ icon:'success' }) setTimeout(()=>{ + // 支付成功不还原isPaying redirectTo 会删掉当前页面触发unload + // _this.data.isPaying = false wx.redirectTo({ url: '../payresult/index?tid='+_this.data.id+'&ids='+_this.data.ids.join(',') }) },1000) }, fail:function(err){ + _this.data.isPaying = false console.log(err) } }) @@ -557,7 +567,7 @@ Page({ * 生命周期函数--监听页面卸载 */ onUnload: function () { - if (!this.data.status) { + if (!this.data.status && !this.data.isPaying) { wx.reLaunch({ url: '/pages/user/order/list', }) diff --git a/pages/user/cartlist/list.js b/pages/user/cartlist/list.js index b013ace..cae4009 100644 --- a/pages/user/cartlist/list.js +++ b/pages/user/cartlist/list.js @@ -54,10 +54,25 @@ Page({ getList: function () { commonApi.user_post("cart/get_list", { // type: '1' + offset:0, + limit:10, }).then(res => { this.setData({ list: res.data }) + + commonApi.user_post("cart/get_list", { + // type: '1' + offset:10, + limit:999, + }).then(res => { + let resData = this.data.list.concat((res.data || [])) + this.setData({ + list: resData + }) + }) + + }) }, minus: function (e) { diff --git a/project.private.config.json b/project.private.config.json index 7a8a3d8..80b38f3 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -6,10 +6,17 @@ "condition": { "miniprogram": { "list": [ + { + "name": "pages/order/pay/index", + "pathName": "pages/order/pay/index", + "query": "id=28182505151348102853", + "launchMode": "default", + "scene": null + }, { "name": "pages/user/order/movieOrderInfo/index", - "pathName": "pages/user/order/movieOrderInfo/index", - "query": "id=46022504271632102675", + "pathName": "pages/order/payresult/index", + "query": "id=28182505151342456109", "launchMode": "default", "scene": null },