kevin_zhangl пре 2 година
родитељ
комит
1553106f84

+ 12 - 2
src/views/shop/car-fund-products.vue

@@ -47,7 +47,7 @@
 		</div>
 
 		<!-- 购物车	-->
-		<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;">
+		<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false">
 			<div v-loading="loading">
 				<div class="white-box">
 					<el-table :data="goods" :show-header="false">
@@ -142,7 +142,7 @@
 					<div class="white-box-footer" >
 						<el-row :gutter="40">
 							<el-col :xs="24" :sm="24" :lg="24" align="left">
-								<el-button type="warning"  size="small" @click="visibleShoppingCart = false">{{ $t('shop.goBack') }}</el-button>
+								<el-button type="warning"  size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
 								<el-button type="primary" size="small" @click="orderSubmit" :loading="submitButtonStat">{{ $t('shop.goPay') }}</el-button>
 							</el-col>
 						</el-row>
@@ -426,6 +426,16 @@ export default {
 				this.freight = response.data.freight
 			})
 		},
+		// 关闭时清空购物车等信息
+		cleanShowCart() {
+			this.visibleShoppingCart = false
+			this.goods = []
+			this.totalAmount = 0.00
+			this.goodsNum = ''
+			this.goodsId = ''
+			this.pointFreight = 0
+			this.pointsSum = 0
+		},
 		// 支付
 		orderSubmit() {
 			// 账户余额

+ 12 - 2
src/views/shop/standard-products.vue

@@ -52,7 +52,7 @@
 	</div>
 
 	<!-- 购物车	-->
-	<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" v-loading="shoppingCartLoading" style="margin-top: -95px;">
+	<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" v-loading="shoppingCartLoading" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false">
 		<div v-loading="loading">
 			<div class="white-box">
 				<el-table :data="goods" :show-header="false">
@@ -147,7 +147,7 @@
 				<div class="white-box-footer" >
 					<el-row :gutter="40">
 						<el-col :xs="24" :sm="24" :lg="24" align="left">
-							<el-button type="warning"  size="small" @click="visibleShoppingCart = false">{{ $t('shop.goBack') }}</el-button>
+							<el-button type="warning"  size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
 							<el-button type="primary" size="small" @click="orderSubmit" :loading="submitButtonStat">{{ $t('shop.goPay') }}</el-button>
 						</el-col>
 					</el-row>
@@ -664,6 +664,16 @@
 				// 计算价格
 				this.getSumMoney();
 			},
+			// 关闭时清空购物车等信息
+			cleanShowCart() {
+				this.visibleShoppingCart = false
+				this.goods = []
+				this.totalAmount = 0.00
+				this.goodsNum = ''
+				this.goodsId = ''
+				this.pointFreight = 0
+				this.pointsSum = 0
+			},
 			// 选择收货地址
 			choseAddress (addressId) {
 				this.addressId = addressId

+ 12 - 2
src/views/shop/villa-fund-products.vue

@@ -47,7 +47,7 @@
 		</div>
 
 		<!-- 购物车	-->
-		<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;">
+		<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false">
 			<div v-loading="loading">
 				<div class="white-box">
 					<el-table :data="goods" :show-header="false">
@@ -142,7 +142,7 @@
 					<div class="white-box-footer" >
 						<el-row :gutter="40">
 							<el-col :xs="24" :sm="24" :lg="24" align="left">
-								<el-button type="warning"  size="small" @click="visibleShoppingCart = false">{{ $t('shop.goBack') }}</el-button>
+								<el-button type="warning"  size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
 								<el-button type="primary" size="small" @click="orderSubmit" :loading="submitButtonStat">{{ $t('shop.goPay') }}</el-button>
 							</el-col>
 						</el-row>
@@ -426,6 +426,16 @@ export default {
 				this.freight = response.data.freight
 			})
 		},
+		// 关闭时清空购物车等信息
+		cleanShowCart() {
+			this.visibleShoppingCart = false
+			this.goods = []
+			this.totalAmount = 0.00
+			this.goodsNum = ''
+			this.goodsId = ''
+			this.pointFreight = 0
+			this.pointsSum = 0
+		},
 		// 支付
 		orderSubmit() {
 			// 账户余额