Pārlūkot izejas kodu

618更新部分2

master
suizhijia pirms 5 gadiem
vecāks
revīzija
0d6524d253
2 mainītis faili ar 25 papildinājumiem un 21 dzēšanām
  1. +11
    -11
      496_dongfengqichen/app.js
  2. +14
    -10
      496_dongfengqichen/pages/orderActivity/orderActivity.js

+ 11
- 11
496_dongfengqichen/app.js Parādīt failu

},this) },this)
}, },
getBuyState: function () {//查询是否已下订 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统计 addAppEnter: function () {//小程序整体pv统计
this.wxRequest(this.globalData.urlRoot + "statistics/addAppEnter", { scene:this.globalData.sceneSource}, res => { this.wxRequest(this.globalData.urlRoot + "statistics/addAppEnter", { scene:this.globalData.sceneSource}, res => {

+ 14
- 10
496_dongfengqichen/pages/orderActivity/orderActivity.js Parādīt failu

paySuccess: function (e) {//支付成功 paySuccess: function (e) {//支付成功
app.wxRequest(app.globalData.urlRoot + "wxPay/paySuccess", { source:2,trade_id:e},res=>{ app.wxRequest(app.globalData.urlRoot + "wxPay/paySuccess", { source:2,trade_id:e},res=>{
if(res.code==200){ 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 = {};
app.globalData.getBuyState.success = true; app.globalData.getBuyState.success = true;
app.globalData.getBuyState.cdate = res.data.cdate; app.globalData.getBuyState.cdate = res.data.cdate;
app.globalData.getBuyState.coupon_code = res.data.coupon_code; 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 { } else {
this.data.appointment = true; this.data.appointment = true;
wx.showToast({ wx.showToast({

Notiek ielāde…
Atcelt
Saglabāt