|
@@ -162,19 +162,21 @@ export default {
|
|
|
// #endif
|
|
// #endif
|
|
|
this.Body.trade_type = type
|
|
this.Body.trade_type = type
|
|
|
post("v1/merchant/orders",this.Body).then(res=>{
|
|
post("v1/merchant/orders",this.Body).then(res=>{
|
|
|
- let data = JSON.parse(res.data)
|
|
|
|
|
- data.prepayid = data.package?data.package.split('prepay_id=')[1]:''
|
|
|
|
|
- if (res.code == 0 && data.prepayid) {
|
|
|
|
|
- toPayOpre.toPay(data, (rea) => {
|
|
|
|
|
- if (!rea) {
|
|
|
|
|
- // this.$toast(res.msg)
|
|
|
|
|
- uni.showLoading()
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.goto("/pagesB/orderingfood/orderlist",{type:2})
|
|
|
|
|
- }, 1500);
|
|
|
|
|
- } else {}
|
|
|
|
|
- });
|
|
|
|
|
- }else if (res.code == 0) {
|
|
|
|
|
|
|
+ if(res.data && res.data != 200){
|
|
|
|
|
+ let data = JSON.parse(res.data)
|
|
|
|
|
+ data.prepayid = data.package?data.package.split('prepay_id=')[1]:''
|
|
|
|
|
+ if (res.code == 0 && data.prepayid) {
|
|
|
|
|
+ toPayOpre.toPay(data, (rea) => {
|
|
|
|
|
+ if (!rea) {
|
|
|
|
|
+ // this.$toast(res.msg)
|
|
|
|
|
+ uni.showLoading()
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.goto("/pagesB/orderingfood/orderlist",{type:2})
|
|
|
|
|
+ }, 1500);
|
|
|
|
|
+ } else {}
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
// this.$toast(res.msg)
|
|
// this.$toast(res.msg)
|
|
|
uni.showLoading()
|
|
uni.showLoading()
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|