diff --git a/littleApp_child/pages/Setting/Setting.js b/littleApp_child/pages/Setting/Setting.js index b51b2aa..8496482 100644 --- a/littleApp_child/pages/Setting/Setting.js +++ b/littleApp_child/pages/Setting/Setting.js @@ -110,7 +110,9 @@ Page({ wx.setStorageSync('userId', '') getApp().globalData.token = '' getApp().globalData.userId = '' - that.toLogin() + wx.navigateBack({ + + }) } }, fail: function (res) { diff --git a/littleApp_child/pages/order_payment/order_payment.js b/littleApp_child/pages/order_payment/order_payment.js index 93dee79..b760e95 100644 --- a/littleApp_child/pages/order_payment/order_payment.js +++ b/littleApp_child/pages/order_payment/order_payment.js @@ -55,6 +55,33 @@ Page({ }) }, + + refreshOpenid() { + var self = this + var jscode = '' + wx.login({ + success: function (res) { + // success + jscode = res.code + + + networkUtil._get(api.refreshOpenId + "?jscode=" + jscode + "&type=2", {}, function (res) { + + console.log(res) + self.getPayMessage() + }, function (res) { + + }) + }, + fail: function (res) { + // fail + }, + complete: function (res) { + // complete + } + }) + }, + getPayMessage(){ networkUtil.showLoading() var self = this @@ -88,7 +115,7 @@ Page({ }) }, payClick:function(e){ - this.getPayMessage() + this.refreshOpenid() } }) diff --git a/littleApp_child/pages/order_payment/order_payment.wxss b/littleApp_child/pages/order_payment/order_payment.wxss index b721ec9..4ae7f99 100644 --- a/littleApp_child/pages/order_payment/order_payment.wxss +++ b/littleApp_child/pages/order_payment/order_payment.wxss @@ -57,6 +57,7 @@ background:#fff; height: 30px; margin-left: 15px; margin-top: 10px; + border-radius: 15px; } .title_text { diff --git a/littleApp_child/utils/apiFile.js b/littleApp_child/utils/apiFile.js index 14f6c6c..b9e7d95 100644 --- a/littleApp_child/utils/apiFile.js +++ b/littleApp_child/utils/apiFile.js @@ -53,6 +53,9 @@ module.exports = { //下单 buy: 'goods/pay/buy', //医生详情/id - doctor: 'v1/doctors' + doctor: 'v1/doctors', + + //刷新openid + refreshOpenId: '/wx/bind/openid', } \ No newline at end of file