Prechádzať zdrojové kódy

申请发票逻辑修改,可以申请才跳转页面

gcz 1 týždeň pred
rodič
commit
74875794a1
1 zmenil súbory, kde vykonal 11 pridanie a 4 odobranie
  1. 11 4
      center/orderdetails.vue

+ 11 - 4
center/orderdetails.vue

@@ -700,12 +700,19 @@
 				})
 				// #endif
 			},
-			invoice(){
+			async invoice(){
 				console.log('orderDetails',this.orderDetails);
+				
 				if(this.orderDetails.ifInvoice===0){
-					uni.$u.route('/center/invoice', {
-						id: this.orderDetails.id
-					});
+					try{	
+						let invoiceInfo = await this.$u.api.getInvoiceInfo({orderId:this.id});
+						uni.$u.route('/center/invoice', {
+							id: this.orderDetails.id
+						});
+						console.log('invoiceInfo',invoiceInfo);
+					}catch(err){
+						console.log('invoice',err);
+					}
 				}else{
 					uni.$u.route('/center/invoicedetails', {
 						id: this.orderDetails.id