lilei 11 月之前
父节点
当前提交
68d8a78664
共有 2 个文件被更改,包括 25 次插入15 次删除
  1. 4 2
      pages/index/index.vue
  2. 21 13
      pages/morePage/morePage.vue

+ 4 - 2
pages/index/index.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
 	<view>
 	<view>
 		<view class="content">
 		<view class="content">
+			<!-- 头部栏 -->
 			<view class="header-box">
 			<view class="header-box">
 				<UniStatusBar></UniStatusBar>
 				<UniStatusBar></UniStatusBar>
 				<view class="title flex align_center" :style="{height:(navHeight+'px')}">
 				<view class="title flex align_center" :style="{height:(navHeight+'px')}">
@@ -103,6 +104,7 @@
 			</view>
 			</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<!-- tab栏 -->
 		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
 		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
 	</view>
 	</view>
 </template>
 </template>
@@ -585,7 +587,7 @@
 					})
 					})
 				}
 				}
 			},
 			},
-			// 去扫
+			// 去扫VIN
 			openCamera(){
 			openCamera(){
 				if(this.hasLogin){
 				if(this.hasLogin){
 					// 游客身份
 					// 游客身份
@@ -616,7 +618,7 @@
 					})
 					})
 				}
 				}
 			},
 			},
-			// 查看扫描记录
+			// 查看扫描VIN记录
 			toAllRecord(){
 			toAllRecord(){
 				uni.navigateTo({
 				uni.navigateTo({
 					url: this.hasLogin ? "/pagesA/vinRecord/vinRecord" : '/pages/login/login'
 					url: this.hasLogin ? "/pagesA/vinRecord/vinRecord" : '/pages/login/login'

+ 21 - 13
pages/morePage/morePage.vue

@@ -17,6 +17,8 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		
+		<!-- 网格图标 -->
 		<view class="list-box" v-for="item in itemList" :key="item.id">
 		<view class="list-box" v-for="item in itemList" :key="item.id">
 			<view class="list-title">
 			<view class="list-title">
 				<u-icon size="35" :name="item.icon"></u-icon> <text>{{item.text}}</text>
 				<u-icon size="35" :name="item.icon"></u-icon> <text>{{item.text}}</text>
@@ -43,7 +45,8 @@
 				<text>退出登录</text>
 				<text>退出登录</text>
 			</view>
 			</view>
 		</view>
 		</view>
-		<!-- 去认证 -->
+		
+		<!-- 去认证弹框 -->
 		<u-popup v-model="showPopup" mode="center" :border-radius="20" closeable>
 		<u-popup v-model="showPopup" mode="center" :border-radius="20" closeable>
 			<view style="background-color: #fff;padding: 1rem;">
 			<view style="background-color: #fff;padding: 1rem;">
 				<u-image width="533" height="415" src="/static/authimg.jpg"></u-image>
 				<u-image width="533" height="415" src="/static/authimg.jpg"></u-image>
@@ -53,6 +56,7 @@
 			</view>
 			</view>
 		</u-popup>
 		</u-popup>
 	</view>
 	</view>
+	<!-- tab -->
 	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
 	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
 	</view>
 	</view>
 </template>
 </template>
@@ -66,7 +70,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				dealerPhone: null,
+				dealerPhone: null, // 经销商电话
 				showPopup: false,
 				showPopup: false,
 				showPriceSet: false,
 				showPriceSet: false,
 				shelfSn: null,
 				shelfSn: null,
@@ -219,18 +223,20 @@
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {
-				const shelfInfo = this.$store.state.vuex_storeShelf
-				this.shelfSn = shelfInfo ? shelfInfo.shelfSn : ''
-				this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
-				if(this.shelfSn){
-					this.getPriceCofig()
-				}
-			},
+			// 获取货架信息
+			const shelfInfo = this.$store.state.vuex_storeShelf
+			this.shelfSn = shelfInfo ? shelfInfo.shelfSn : ''
+			this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
+			if(this.shelfSn){
+				this.getPriceCofig()
+			}
+		},
 		// 页面卸载
 		// 页面卸载
 		onUnload() {
 		onUnload() {
 			uni.$off('refashProm')
 			uni.$off('refashProm')
 		},
 		},
 		methods: {
 		methods: {
+			// tab单击
 			beforeSwitch(index){
 			beforeSwitch(index){
 				const row = this.$store.state.vuex_tabBarList[index]
 				const row = this.$store.state.vuex_tabBarList[index]
 				if(row.text == '促销'){
 				if(row.text == '促销'){
@@ -242,12 +248,10 @@
 					return true
 					return true
 				}
 				}
 			},
 			},
-			// 打开页面
+			// 网格打开页面
 			openPage(e,child){
 			openPage(e,child){
 				const item = child[e.detail.index]
 				const item = child[e.detail.index]
-				uni.navigateTo({
-					url: item.path
-				})
+				this.toPage(item.path)
 			},
 			},
 			// 获取价格配置
 			// 获取价格配置
 			getPriceCofig(){
 			getPriceCofig(){
@@ -287,6 +291,7 @@
 					})
 					})
 				}
 				}
 			},
 			},
+			// 跳转打开页面
 			toPage(path){
 			toPage(path){
 				const _this = this
 				const _this = this
 				if(this.hasLogin){
 				if(this.hasLogin){
@@ -336,15 +341,18 @@
 					})
 					})
 				}
 				}
 			},
 			},
+			// 去认证
 			toAuthStore(){
 			toAuthStore(){
 				this.showPopup = false
 				this.showPopup = false
 				uni.navigateTo({
 				uni.navigateTo({
 					url: '/pages/storeManage/storeAuth'
 					url: '/pages/storeManage/storeAuth'
 				})
 				})
 			},
 			},
+			// 打电话
 			call(){
 			call(){
 				this.callPhone(this.dealerPhone)
 				this.callPhone(this.dealerPhone)
 			},
 			},
+			// 退出登录
 			quitOut(){
 			quitOut(){
 				let _this = this
 				let _this = this
 				uni.showModal({
 				uni.showModal({