Commit f5fbb62a92fd1b8a3603c6071e7c84805806a367

Authored by luoye

Merge branch 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child

* 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child:
  支付前刷新openid

# Conflicts:
#	littleApp_child/pages/Setting/Setting.js

Showing 4 changed files

littleApp_child/pages/Setting/Setting.js View file @ f5fbb62
... ... @@ -56,7 +56,6 @@
56 56 sourceType: [imgType], // 可以指定来源是相册还是相机,默认二者都有
57 57 success: function (res) {
58 58 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
59   - console.log('图片',res)
60 59 that.qiniuToken(res.tempFilePaths[0])
61 60 }
62 61 })
... ... @@ -174,7 +173,7 @@
174 173 })
175 174 },
176 175 toVip: function () {
177   - console.log("dsfsrfwqerfwqrfqw")
  176 +
178 177 wx.navigateTo({
179 178 url: '../vipService/vipService',
180 179 })
littleApp_child/pages/order_payment/order_payment.js View file @ f5fbb62
... ... @@ -55,6 +55,33 @@
55 55  
56 56 })
57 57 },
  58 +
  59 + refreshOpenid() {
  60 + var self = this
  61 + var jscode = ''
  62 + wx.login({
  63 + success: function (res) {
  64 + // success
  65 + jscode = res.code
  66 +
  67 +
  68 + networkUtil._get(api.refreshOpenId + "?jscode=" + jscode + "&type=2", {}, function (res) {
  69 +
  70 + console.log(res)
  71 + self.getPayMessage()
  72 + }, function (res) {
  73 +
  74 + })
  75 + },
  76 + fail: function (res) {
  77 + // fail
  78 + },
  79 + complete: function (res) {
  80 + // complete
  81 + }
  82 + })
  83 + },
  84 +
58 85 getPayMessage(){
59 86 networkUtil.showLoading()
60 87 var self = this
... ... @@ -88,7 +115,7 @@
88 115 })
89 116 },
90 117 payClick:function(e){
91   - this.getPayMessage()
  118 + this.refreshOpenid()
92 119 }
93 120  
94 121 })
littleApp_child/pages/order_payment/order_payment.wxss View file @ f5fbb62
... ... @@ -57,6 +57,7 @@
57 57 height: 30px;
58 58 margin-left: 15px;
59 59 margin-top: 10px;
  60 + border-radius: 15px;
60 61 }
61 62  
62 63 .title_text {
littleApp_child/utils/apiFile.js View file @ f5fbb62
... ... @@ -53,7 +53,10 @@
53 53 //下单
54 54 buy: 'goods/pay/buy',
55 55 //医生详情/id
56   - doctor: 'v1/doctors'
  56 + doctor: 'v1/doctors',
  57 +
  58 + //刷新openid
  59 + refreshOpenId: '/wx/bind/openid',
57 60  
58 61 }