|
@@ -161,7 +161,6 @@ export default {
|
|
this.currentProduct = this.activity.products[0]
|
|
this.currentProduct = this.activity.products[0]
|
|
},
|
|
},
|
|
wantCharge() {
|
|
wantCharge() {
|
|
- // console.log("this.send_order_id",this.send_order_id,"this.haslogin",this.haslogin,'this,loginphone',this.loginPhone);
|
|
|
|
if (!(this.send_order_id || (this.haslogin && this.loginPhone))) {
|
|
if (!(this.send_order_id || (this.haslogin && this.loginPhone))) {
|
|
prompt.showDialog({
|
|
prompt.showDialog({
|
|
title: '友情提示',
|
|
title: '友情提示',
|
|
@@ -178,7 +177,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
cancel: function() {
|
|
cancel: function() {
|
|
- console.log('取消绑定')
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
@@ -191,11 +189,9 @@ export default {
|
|
this.haslogin = (await storage.get({ key: 'hasLogin' })).data
|
|
this.haslogin = (await storage.get({ key: 'hasLogin' })).data
|
|
let userinfo = await getUserInfo()
|
|
let userinfo = await getUserInfo()
|
|
if(userinfo){
|
|
if(userinfo){
|
|
- console.log('userinfo',userinfo);
|
|
|
|
this.send_order_id = userinfo.send_order_id;
|
|
this.send_order_id = userinfo.send_order_id;
|
|
}
|
|
}
|
|
}catch(e){
|
|
}catch(e){
|
|
- // console.log('11111111111111',e);
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
chooseItem(product, idx) {
|
|
chooseItem(product, idx) {
|
|
@@ -259,16 +255,13 @@ export default {
|
|
}
|
|
}
|
|
}, 2000)
|
|
}, 2000)
|
|
},async onShow() {
|
|
},async onShow() {
|
|
- // console.log('11111111111111111111111-onshow');
|
|
|
|
await this.getUserInfo();
|
|
await this.getUserInfo();
|
|
if(this.need_check_order && this.pay_order_id){
|
|
if(this.need_check_order && this.pay_order_id){
|
|
this.checkOrderNew(this.pay_order_id);
|
|
this.checkOrderNew(this.pay_order_id);
|
|
}
|
|
}
|
|
},async checkOrderNew(order){
|
|
},async checkOrderNew(order){
|
|
- console.log("需要查询订单",order);
|
|
|
|
// this.showLoading = true;
|
|
// this.showLoading = true;
|
|
let fb = await checkWxOrder(order);
|
|
let fb = await checkWxOrder(order);
|
|
- // console.log('查询结果:',fb);
|
|
|
|
// this.showToastByCode('9000')
|
|
// this.showToastByCode('9000')
|
|
if (fb && typeof fb === 'object'){
|
|
if (fb && typeof fb === 'object'){
|
|
this.showToastByCode('9000')
|
|
this.showToastByCode('9000')
|
|
@@ -286,7 +279,7 @@ export default {
|
|
try{
|
|
try{
|
|
advertOrders(this.trade_no);
|
|
advertOrders(this.trade_no);
|
|
}catch(e){
|
|
}catch(e){
|
|
- console.log(e);
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
msg = '支付成功!'
|
|
msg = '支付成功!'
|
|
break
|
|
break
|
|
@@ -332,11 +325,9 @@ export default {
|
|
if (data.index === 0) this.checkOrder(order)
|
|
if (data.index === 0) this.checkOrder(order)
|
|
},
|
|
},
|
|
cancel: () => {
|
|
cancel: () => {
|
|
- console.log('cancel')
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},onBackPress(){
|
|
},onBackPress(){
|
|
- // console.log(this.pay_success,this.pay_success);
|
|
|
|
if (!this.pay_success) {
|
|
if (!this.pay_success) {
|
|
let taht = this;
|
|
let taht = this;
|
|
prompt.showDialog({
|
|
prompt.showDialog({
|
|
@@ -362,7 +353,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
cancel: function() {
|
|
cancel: function() {
|
|
- console.log('取消前往')
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
return true;
|
|
return true;
|
|
@@ -375,7 +365,6 @@ export default {
|
|
try{
|
|
try{
|
|
let page = router.getState();
|
|
let page = router.getState();
|
|
let allPage = router.getPages();
|
|
let allPage = router.getPages();
|
|
- // console.log('page = ',page,'all pages',allPage,'length',allPage.length);
|
|
|
|
for(var k = allPage.length -1; k >= 0;k--){
|
|
for(var k = allPage.length -1; k >= 0;k--){
|
|
if(allPage[k].name != page.name && allPage[k].name != "views/Phone" && allPage[k].name != "views/Pay"){
|
|
if(allPage[k].name != page.name && allPage[k].name != "views/Phone" && allPage[k].name != "views/Pay"){
|
|
backPage = allPage[k];
|
|
backPage = allPage[k];
|
|
@@ -384,9 +373,7 @@ export default {
|
|
}
|
|
}
|
|
} catch(e){
|
|
} catch(e){
|
|
backPage = {};
|
|
backPage = {};
|
|
- // console.log('back err',e);
|
|
|
|
}
|
|
}
|
|
- // console.log(backPage,backPage.length,typeof backPage);
|
|
|
|
if(JSON.stringify(backPage) === '{}'){
|
|
if(JSON.stringify(backPage) === '{}'){
|
|
router.replace({ uri: "/views/Index" });
|
|
router.replace({ uri: "/views/Index" });
|
|
}else{
|
|
}else{
|