lilei 9 miesięcy temu
rodzic
commit
ef4359fd59

+ 49 - 29
pages/index/index.vue

@@ -35,13 +35,15 @@
 					<view class="notices flex align_center" v-if="!bondRecord&&orderTodo" @click="toOrder">
 						<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有待取货的货架订单哦!</view> <text class="text">立即处理>></text>
 					</view>
-					<!-- 门店审核不通过 -->
-					<view class="notices flex justify_between" v-if="storeApply&&storeApply.auditStatus=='REFUSE'&&storeApply.readFlag=='0'">
-						<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
-					</view>
 					<!-- 去认证门店 -->
-					<view class="notices flex justify_between" v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
-						<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> {{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'您还未认证门店'}}</view> <text class="text" @click="authStore">{{storeApply&&storeApply.auditStatus=='WAIT'?'查看':'去认证'}}</text>
+					<view class="notices flex" v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
+						<!-- 门店审核不通过 -->
+						<view class="flex justify_between align_center" v-if="storeApply&&storeApply.auditStatus=='REFUSE'&&storeApply.readFlag=='0'">
+							<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
+						</view>
+						<view class="flex justify_between align_center" v-else>
+							<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> {{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'您还未认证门店'}}</view> <text class="text" @click="authStore">{{storeApply&&storeApply.auditStatus=='WAIT'?'查看':'去认证'}}</text>
+						</view>
 					</view>
 					<!-- 名片 -->
 					<view class="userCard flex align_center justify_between" v-if="!hasShopiing">
@@ -133,7 +135,7 @@
 					</view>
 				</view>
 				<!-- 扫描记录 -->
-				<view class="list-box" v-if="!hasShopiing">
+				<view class="list-box" v-if="!hasShopiing||((!hasLogin||userInfo&&userInfo.sysUserFlag == '0')&&totalhotPage==0)">
 					<!-- 扫描记录 -->
 					<u-cell-group :border="false">
 						<u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" value="全部">
@@ -402,20 +404,22 @@
 						this.findLastApply()
 						// 获取扫描记录
 						this.getVinLog()
-						// 商品分类
-						this.getGoodType(flag)
-						// 获取推荐产品
-						this.getHotProductList(flag)
+						if(this.hasShopiing){
+							this.showShopPage(flag)
+						}else{
+							this.showNoShopPage()
+						}
 					}
 				}else{
 					// 未登录
 					this.hasShopiing = true
 					// 隐藏促销模块
 					this.hidePromoTab()
-					// 商品分类
-					this.getGoodType(flag)
-					// 获取推荐产品
-					this.getHotProductList(flag)
+					if(this.hasShopiing){
+						this.showShopPage(flag)
+					}else{
+						this.showNoShopPage()
+					}
 				}
 			},
 			// 查询是否支持数字货架, flag: true 再次刷新,false 首次加载,只加载一次
@@ -472,26 +476,42 @@
 					this.hasShopiing = res.data && res.data.paramValue == 1
 					// 有商城
 					if(this.hasShopiing){
-						// 隐藏tab 视频,显示tab购物车
-						this.cartCount()
-						// 商品分类
-						this.getGoodType(flag)
-						// 获取推荐产品
-						this.getHotProductList(flag)
+						this.showShopPage()
 					}else{
 						// 没有商城
-						this.productList = []
-						// 隐藏tab 购物车,显示tab视频
-						this.showVideoTab()
-						// 滚动扫描记录
-						this.getScrollLog()
-						// 获取扫描记录
-						this.getVinLog()
+						this.showNoShopPage()
 					}
 					// 查询红包活动
 					this.getRedPacketRule()
 				})
 			},
+			// 显示开通商城的页面
+			showShopPage(flag){
+				// 隐藏tab 视频,显示tab购物车
+				if(this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'){
+					this.cartCount()
+				}else{
+					this.$store.state.vuex_cartTotal = 0
+					this.showCatTab()
+				}
+				// 商品分类
+				this.getGoodType(flag)
+				// 获取推荐产品
+				this.getHotProductList(flag)
+			},
+			// 显示未没有开通商城的界面
+			showNoShopPage(){
+				this.productTypeList = []
+				this.productList = []
+				// 隐藏tab 购物车,显示tab视频
+				this.showVideoTab()
+				// 滚动扫描记录
+				this.getScrollLog()
+				// 获取扫描记录
+				if(this.hasLogin){
+					this.getVinLog()
+				}
+			},
 			// 购物车数量
 			cartCount(){
 				getCartCount({}).then(res => {
@@ -942,7 +962,7 @@
 		}
 	}
 	.bg-1{
-		background-image: linear-gradient(#86defa 0%,#cdeff9 20%,#f8f8f8 30%);
+		background-image: linear-gradient(#86defa 0%,#cdeff9 20%,#ffffff 30%);
 	}
 	.content {
 		margin: 0;

+ 3 - 6
pages/index/productItem.vue

@@ -27,6 +27,7 @@
 </template>
 
 <script>
+	import { toAuthStore, toLogin } from "@/utils/index.js"
 	export default {
 		name: 'productItem',
 		props: {
@@ -65,15 +66,11 @@
 				if(this.isLogin){
 					// 游客去认证
 					if(this.sysUserFlag == '0'){
-						uni.navigateTo({
-							url: '/pages/storeManage/storeAuth'
-						})
+						toAuthStore()
 						return true
 					}
 				}else{
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
+					toLogin()
 					return true
 				}
 				uni.navigateTo({

+ 1 - 1
pages/storeManage/storeAuth.vue

@@ -290,7 +290,7 @@
 					console.log(res)
 					uni.showToast({icon: 'none',title: res.message,duration:3000})
 					if(res.status == 200){
-						 uni.$emit("updateAuthState")
+						 uni.$emit("refashHome")
 						 setTimeout(()=>{
 							 uni.switchTab({
 							 	url: "/pages/index/index"

+ 6 - 2
pagesA/digitalShelf/choosePart.vue

@@ -182,7 +182,7 @@
 		<!-- 去认证 -->
 		<uni-popup ref="showPopup" type="center" :is-mask-click="false">
 			<view class="popu-modal">
-				<view class="popu-close" @click="$refs.showPopup.close()"><uni-icons type="closeempty" size="28"></uni-icons></view>
+				<view class="popu-close" @click="closePopup"><uni-icons type="closeempty" size="28"></uni-icons></view>
 				<image width="533" height="415" style="width: 533rpx;height: 415rpx;" src="/static/authimg.jpg"></image>
 				<view style="padding-top:1rem;" class="flex justify_center">
 					<button @click="toAuthStore()" type="primary" :style="{background:'#066cff',color:'#fff',width:'350rpx',borderRadius:'100px'}">开始认证</button>
@@ -409,11 +409,15 @@
 			},
 			// 去认证
 			toAuthStore(){
-				this.$refs.showPopup.close()
+				this.closePopup()
 				uni.redirectTo({
 					url: '/pages/storeManage/storeAuth'
 				})
 			},
+			closePopup(){
+				this.hideFooter = false
+				this.$refs.showPopup.close()
+			},
 			// 联系经销商
 			callPhone() {
 				if(this.dealerPhone!=''){