|
|
@@ -5,22 +5,22 @@
|
|
|
¥
|
|
|
</view>
|
|
|
<view class="sys-color-547BFA sys-size-64 sys-weight-bold">
|
|
|
- {{orderInfo.pay_money}}
|
|
|
+ {{orderInfo.pay_money || '0.00'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="align-items-center flex-justify-center cg-box">
|
|
|
- <uni-icons class="mr-10" type="checkbox-filled" size="25" color="#547BFA"></uni-icons>
|
|
|
+ <uni-icons v-if="orderInfo.status === 1" class="mr-10" type="checkbox-filled" size="25" color="#547BFA"></uni-icons>
|
|
|
+ <uni-icons v-else class="mr-10" type="clear" size="25" color="#FF0000"></uni-icons>
|
|
|
<view class="">
|
|
|
- 支付成功
|
|
|
+ {{orderInfo.status === 1?'支付成功':'支付失败'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="align-items-center flex-justify-space mb-20">
|
|
|
-
|
|
|
<view class="sys-color-AD flex-shrink0 mr-20">
|
|
|
商户名称
|
|
|
</view>
|
|
|
<view class="sys-size-28">
|
|
|
- {{orderInfo.shop_name}}
|
|
|
+ {{orderInfo.shop_name || '无'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="align-items-center flex-justify-space mb-20">
|
|
|
@@ -28,10 +28,10 @@
|
|
|
订单号
|
|
|
</view>
|
|
|
<view class="sys-size-28">
|
|
|
- {{orderInfo.rs_sn}}
|
|
|
+ {{orderInfo.rs_sn || '无'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
-<!-- <view class="align-items-center flex-justify-space mb-64">
|
|
|
+ <!-- <view class="align-items-center flex-justify-space mb-64">
|
|
|
<view class="sys-color-AD flex-shrink0 mr-20">
|
|
|
交易流水号
|
|
|
</view>
|
|
|
@@ -49,15 +49,14 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- shopOrderInfo
|
|
|
+ shopOrderInfo,
|
|
|
+ shopAutomaticCancel
|
|
|
} from '@/api/shop_order';
|
|
|
export default {
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- orderInfo:{
|
|
|
-
|
|
|
- }
|
|
|
+ orderInfo: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad(data) {
|
|
|
@@ -67,7 +66,7 @@
|
|
|
};
|
|
|
var postData = JSON.stringify(mchData);
|
|
|
parent.postMessage(postData, "https://payapp.weixin.qq.com");
|
|
|
- if(data.order_sn) {
|
|
|
+ if (data.order_sn) {
|
|
|
this.shopOrderInfo(data.order_sn)
|
|
|
}
|
|
|
},
|
|
|
@@ -79,6 +78,9 @@
|
|
|
}).then((res) => {
|
|
|
if (res.code === 1) {
|
|
|
this.orderInfo = res.data
|
|
|
+ if (res.data.status === 1) {
|
|
|
+ this.shopAutomaticCancel(res.data.rs_sn)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -89,6 +91,15 @@
|
|
|
}
|
|
|
var postData = JSON.stringify(mchData)
|
|
|
parent.postMessage(postData, 'https://payapp.weixin.qq.com')
|
|
|
+ },
|
|
|
+ shopAutomaticCancel(order_sn) {
|
|
|
+ shopAutomaticCancel({
|
|
|
+ order_sn: order_sn
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ console.log(res, 'ok');
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|