Przeglądaj źródła

促销模块权限控制

lilei 11 miesięcy temu
rodzic
commit
d4972b54e0

+ 11 - 3
pages/index/index.vue

@@ -102,7 +102,7 @@
 			</view>
 			</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
+		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch"></u-tabbar>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -252,7 +252,8 @@
 		methods: {
 		methods: {
 			// 扫描vin
 			// 扫描vin
 			beforeSwitch(index){
 			beforeSwitch(index){
-				if(index==2){
+				const row = this.$store.state.vuex_tabBarList[index]
+				if(row.text == '扫描VIN'){
 					this.openCamera()
 					this.openCamera()
 				}else{
 				}else{
 					return true
 					return true
@@ -399,7 +400,6 @@
 			// 查询是否支持数字货架
 			// 查询是否支持数字货架
 			getStoreShelf(){
 			getStoreShelf(){
 				findStoreShelf().then(res => {
 				findStoreShelf().then(res => {
-						console.log(res)
 						this.$store.state.vuex_storeShelf = res.data;
 						this.$store.state.vuex_storeShelf = res.data;
 						if(res.data){
 						if(res.data){
 							// 获取价格权限配置
 							// 获取价格权限配置
@@ -410,6 +410,14 @@
 							this.shelfGetTotalWaitQty()
 							this.shelfGetTotalWaitQty()
 							// 获取轮播数据
 							// 获取轮播数据
 							this.getCarousel()
 							this.getCarousel()
+							// 显示促销模块
+							this.$store.state.vuex_tabBarList.splice(1,0,{
+								"pagePath": "/pages/promo/index",
+								"iconPath": "/static/tab/tab_promo_normal.png",
+								"selectedIconPath": "/static/tab/tab_promo_pressed.png",
+								"text": "促销",
+								'customIcon': false,
+							})
 						}
 						}
 				})
 				})
 			},
 			},

+ 3 - 2
pages/morePage/morePage.vue

@@ -112,7 +112,7 @@
 			</view>
 			</view>
 		</u-popup>
 		</u-popup>
 	</view>
 	</view>
-	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
+	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch"></u-tabbar>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -157,7 +157,8 @@
 			},
 			},
 		methods: {
 		methods: {
 			beforeSwitch(index){
 			beforeSwitch(index){
-				if(index==2){
+				const row = this.$store.state.vuex_tabBarList[index]
+				if(row.text == '扫描VIN'){
 					this.openCamera()
 					this.openCamera()
 				}else{
 				}else{
 					return true
 					return true

+ 3 - 2
pages/promo/index.vue

@@ -21,7 +21,7 @@
 				 </view>
 				 </view>
 			</scroll-view>     
 			</scroll-view>     
 		</view>
 		</view>
-		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
+		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch"></u-tabbar>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -115,7 +115,8 @@
 			},
 			},
 			// 扫描vin
 			// 扫描vin
 			beforeSwitch(index){
 			beforeSwitch(index){
-				if(index==2){
+				const row = this.$store.state.vuex_tabBarList[index]
+				if(row.text == '扫描VIN'){
 					this.openCamera()
 					this.openCamera()
 				}else{
 				}else{
 					return true
 					return true

+ 3 - 3
pages/videos/index.vue

@@ -36,7 +36,7 @@
 					</swiper-item>
 					</swiper-item>
 				</swiper>
 				</swiper>
 		</view>
 		</view>
-		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
+		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch"></u-tabbar>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -172,8 +172,8 @@
 			},
 			},
 			// 扫描vin
 			// 扫描vin
 			beforeSwitch(index){
 			beforeSwitch(index){
-				console.log(index)
-				if(index==2){
+				const row = this.$store.state.vuex_tabBarList[index]
+				if(row.text == '扫描VIN'){
 					this.openCamera()
 					this.openCamera()
 				}else{
 				}else{
 					return true
 					return true

+ 1 - 0
pagesB/coupon.vue

@@ -218,6 +218,7 @@
 				background: #ffffff;
 				background: #ffffff;
 				margin: 25upx;
 				margin: 25upx;
 				border-radius: 30upx;
 				border-radius: 30upx;
+				overflow: hidden;
 				box-shadow: 1px 1px 3px #EEEEEE;
 				box-shadow: 1px 1px 3px #EEEEEE;
 				> view{
 				> view{
 					&:first-child{
 					&:first-child{

+ 2 - 2
pagesB/promoDetail.vue

@@ -301,7 +301,7 @@
 			flex-grow: 1;
 			flex-grow: 1;
 			overflow: auto;
 			overflow: auto;
 			.bottom-bar{
 			.bottom-bar{
-				height: 150upx;
+				height: 130upx;
 				z-index: 500;
 				z-index: 500;
 				background-color: #fff;
 				background-color: #fff;
 				display: flex;
 				display: flex;
@@ -402,7 +402,7 @@
 			}
 			}
 		}
 		}
 		.choose-product-list{
 		.choose-product-list{
-			padding: 100rpx 20rpx 150rpx;
+			padding: 100rpx 20rpx 130rpx;
 			width: 100%;
 			width: 100%;
 			.choose-product-item{
 			.choose-product-item{
 				display: flex;
 				display: flex;

BIN
static/tab/tab_scan_mid.png


BIN
static/tab/tab_scan_pressed.png


+ 1 - 9
store/index.js

@@ -74,18 +74,10 @@ const store = new Vuex.Store({
 				'customIcon': false,
 				'customIcon': false,
 			},
 			},
 			{
 			{
-				"pagePath": "/pages/promo/index",
-				"iconPath": "/static/tab/tab_promo_normal.png",
-				"selectedIconPath": "/static/tab/tab_promo_pressed.png",
-				"text": "促销",
-				'customIcon': false,
-			},
-			{
-				'iconPath': "/static/tab/tab_scan_pressed.png",
+				'iconPath': "/static/tab/tab_scan_normal.png",
 				'selectedIconPath': "/static/tab/tab_scan_pressed.png",
 				'selectedIconPath': "/static/tab/tab_scan_pressed.png",
 				'text': '扫描VIN',
 				'text': '扫描VIN',
 				'customIcon': false,
 				'customIcon': false,
-				'midButton': true,
 			},
 			},
 			{
 			{
 				"pagePath": "/pages/videos/index",
 				"pagePath": "/pages/videos/index",