Преглед изворни кода

下单页面增加go back按钮

theo пре 3 година
родитељ
комит
e27301fe4c
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      frontendEle/src/views/shop/order.vue

+ 4 - 0
frontendEle/src/views/shop/order.vue

@@ -126,6 +126,7 @@
                 </div>
 
                 <div>
+                    <el-button type="danger" @click="cancelOrder()">Go Back</el-button>
                     <el-button type="primary" @click="goToAccounts()" :loading="submitButtonStat">Settle accounts</el-button><!--去结算-->
                 </div>
               </div>
@@ -266,6 +267,9 @@
             }
         },
         methods:{
+            cancelOrder(){
+              history.go(-1)
+            },
             setFreight(){
               if(this.addressId=='100000000000000000'){//如果地址为自提,则运费为0
                 this.pointFreight = this.freight = 0;