|
@@ -40,7 +40,7 @@
|
|
|
<div class="order-footer" v-if="item.label !== '已取消'">
|
|
|
<div class="control one" v-if="order.status===0">
|
|
|
<cube-button :outline="true">取消订单</cube-button>
|
|
|
- <cube-button :primary="true">立即支付</cube-button>
|
|
|
+ <cube-button @click="pay(order)" :primary="true">立即支付</cube-button>
|
|
|
</div>
|
|
|
<div class="control two" v-if="order.status === 1 || order.status === 2 || order.status === 3 || order.status === 4 || order.status === 5">
|
|
|
<cube-button :primary="true">确认完成</cube-button>
|
|
@@ -123,16 +123,21 @@
|
|
|
user_id: this.$store.state.user_id,
|
|
|
type: status,
|
|
|
page: 1
|
|
|
- }).then(res => {
|
|
|
- // console.log(status - 1);
|
|
|
- if (res.length > 0 && status === 2) {
|
|
|
- console.log(res[0].order_time_str);
|
|
|
- }
|
|
|
- this.$nextTick(() => {
|
|
|
- this.tabs[index].data = res;
|
|
|
- this.refresh();
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ // console.log(status - 1);
|
|
|
+ if (res.length > 0 && status === 2) {
|
|
|
+ console.log(res[0].order_time_str);
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tabs[index].data = res;
|
|
|
+ this.refresh();
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ },
|
|
|
+ pay(order) {
|
|
|
+ this.$store.state.order = order;
|
|
|
+ this.$router.push({ name: 'pay' });
|
|
|
},
|
|
|
refresh() {
|
|
|
// 代理better-scroll的refresh方法
|