lilei 8 ماه پیش
والد
کامیت
4ab8fcff6d
2فایلهای تغییر یافته به همراه6 افزوده شده و 16 حذف شده
  1. 1 1
      api/cart.js
  2. 5 15
      pages/index/index.vue

+ 1 - 1
api/cart.js

@@ -47,7 +47,7 @@ export function getCartCount(params) {
 // 商城是否开启
 export function getShopStatus(params) {
 	return request({
-	  url: `shopCart/findMallParam`,
+	  url: `bizParam/findMallParam`,
 	  method: 'post',
 	  data: params
 	})

+ 5 - 15
pages/index/index.vue

@@ -197,7 +197,7 @@
 			return {
 				status: 'loading',
 				noDataText: '暂无数据',
-				hasShopiing: true, // 是否开通商城
+				hasShopiing: false, // 是否开通商城
 				bondRecord: null, // 保证金
 				list:[], // 扫描记录滚动
 				slist:[], // 红包滚动
@@ -335,7 +335,7 @@
 				this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
 				// 价格类型
 				this.getLookUpList('PRICE_SHOW_TYPE', 'vuex_priceTypeList');
-				// 初始化页面
+				// 查询是否有商城
 				this.pageInit(0)
 			})
 			// 刷新首页数据
@@ -396,6 +396,7 @@
 						// 查询是否有数字货架
 						this.getStoreShelf(flag)
 					}else{// 游客
+						this.getHasShopping()
 						// 获取扫描次数
 						this.$store.dispatch("getScanNums")
 						// 获取最大扫描次数
@@ -404,22 +405,12 @@
 						this.findLastApply()
 						// 获取扫描记录
 						this.getVinLog()
-						if(this.hasShopiing){
-							this.showShopPage(flag)
-						}else{
-							this.showNoShopPage()
-						}
 					}
 				}else{
 					// 未登录
-					this.hasShopiing = true
+					this.getHasShopping()
 					// 隐藏促销模块
 					this.hidePromoTab()
-					if(this.hasShopiing){
-						this.showShopPage(flag)
-					}else{
-						this.showNoShopPage()
-					}
 				}
 			},
 			// 查询是否支持数字货架, flag: true 再次刷新,false 首次加载,只加载一次
@@ -428,8 +419,6 @@
 						this.$store.state.vuex_storeShelf = res.data;
 						// 有数字货架
 						if(res.data){
-							// 查询是否有商城
-							this.getHasShopping(flag)
 							// 只需加载一次
 							if(flag==0){
 								// 更新用户信息
@@ -445,6 +434,7 @@
 							// 没有数字货架,隐藏促销模块
 							this.hidePromoTab()
 						}
+						this.getHasShopping()
 				})
 			},
 			// 最新用户信息