Explorar el Código

618更新部分2

master
suizhijia hace 5 años
padre
commit
0d6524d253
Se han modificado 2 ficheros con 25 adiciones y 21 borrados
  1. +11
    -11
      496_dongfengqichen/app.js
  2. +14
    -10
      496_dongfengqichen/pages/orderActivity/orderActivity.js

+ 11
- 11
496_dongfengqichen/app.js Ver fichero

@@ -321,17 +321,17 @@ App({
},this)
},
getBuyState: function () {//查询是否已下订
this.wxRequest(this.globalData.urlRoot + "wxPay/getBuyState", {source:2}, res => {
if (res.code == 200) {
if (res.data) {
res.data.cdate = res.data.cdate ? res.data.cdate : "";
this.globalData.getBuyState = res.data;
if (this.globalData.buyStateSuccessFuc){
this.globalData.buyStateSuccessFuc();
}
}
}
}, this);
// this.wxRequest(this.globalData.urlRoot + "wxPay/getBuyState", {source:2}, res => {
// if (res.code == 200) {
// if (res.data) {
// res.data.cdate = res.data.cdate ? res.data.cdate : "";
// this.globalData.getBuyState = res.data;
// if (this.globalData.buyStateSuccessFuc){
// this.globalData.buyStateSuccessFuc();
// }
// }
// }
// }, this);
},
addAppEnter: function () {//小程序整体pv统计
this.wxRequest(this.globalData.urlRoot + "statistics/addAppEnter", { scene:this.globalData.sceneSource}, res => {

+ 14
- 10
496_dongfengqichen/pages/orderActivity/orderActivity.js Ver fichero

@@ -298,21 +298,25 @@ Component({
paySuccess: function (e) {//支付成功
app.wxRequest(app.globalData.urlRoot + "wxPay/paySuccess", { source:2,trade_id:e},res=>{
if(res.code==200){
// wx.showToast({
// title: '下订成功',
// mask:true
// })
this.setData({
getBuyState:true
wx.showToast({
title: '下订成功',
mask:true
})
// this.setData({
// getBuyState:true
// })
app.globalData.getBuyState = {};
app.globalData.getBuyState.success = true;
app.globalData.getBuyState.cdate = res.data.cdate;
app.globalData.getBuyState.coupon_code = res.data.coupon_code;
// setTimeout(()=>{
// this.closeXieyi();
// },1500)

setTimeout(()=>{
wx.navigateTo({
url: '/pages/rotaryDraw/rotaryDraw',
complete:()=>{
this.closeXieyi();
}
})
},1500)
} else {
this.data.appointment = true;
wx.showToast({

Cargando…
Cancelar
Guardar