Просмотр исходного кода

增加业务参数判断图标是否显示

liyuan 6 дней назад
Родитель
Сommit
a53cefb388
3 измененных файлов с 42 добавлено и 11 удалено
  1. 13 3
      pages/tabBar/classification.vue
  2. 14 3
      pages/tabBar/home.vue
  3. 15 5
      pages/views/buyGoods/commodityDetails.vue

+ 13 - 3
pages/tabBar/classification.vue

@@ -65,7 +65,7 @@
 						</view>
 
 						<view style="display: flex;align-items: center;">
-							<view class="cardTab">
+							<view class="cardTab" v-show="showIcon">
 								<image src="/static/images/tabBar/280@2x.png" style="width: 142rpx;height: 36rpx;"
 									mode="scaleToFill">
 								</image>
@@ -78,7 +78,7 @@
 								</view>
 							</view>
 							<view>
-								<view class="cardTab" style="margin-left: 10rpx;">
+								<view class="cardTab" style="margin-left: 10rpx;" v-show="showIcon">
 									<image src="/static/images/tabBar/2801@2x.png" style="width: 142rpx;height: 36rpx;"
 										mode="scaleToFill">
 									</image>
@@ -192,7 +192,8 @@
 				phoneNumber: '', // 业务员联系电话
 				salesmanShow: false, // 联系业务员弹窗
 				userInfo: {}, // 当前用户数据
-        cloudWarehouse: 0
+        cloudWarehouse: 0,
+        showIcon: true
 			}
 		},
 		mounted() {},
@@ -236,6 +237,7 @@
 		},
 		onShow() {
 			this.getUpdate()
+      this.getIsShowIcon()
       this.getIsCloud()
 			// 获取审核状态
 			details().then(res => {
@@ -269,6 +271,14 @@
 			}
 		},
 		methods: {
+      getIsShowIcon(){
+        isProcurement({
+          "param": "show.icon"
+        }).then(res => {
+          console.info('res-----', res)
+          this.showIcon = Number(res.data) === 0
+        })
+      },
       getIsCloud(){
         isProcurement({
           "param": "cloud_warehouse"

+ 14 - 3
pages/tabBar/home.vue

@@ -65,9 +65,9 @@
 						v-if="dataList.length > 0">
 						<uni-grid-item v-for="(item ,index) in dataList" :key="index">
 							<view class="goodsImg" @click="choice(item,index)">
-								<image v-if="item.inventoryLocal > 0" src="/static/images/tabBar/xsd2x.png"
+								<image v-if="item.inventoryLocal > 0" src="/static/images/tabBar/xsd2x.png" v-show="showIcon"
 									mode="aspectFit" class='imgIcon' />
-								<image v-if="item.inventoryLocal ==  0&&item.inventoryShare > 0"
+								<image v-if="item.inventoryLocal ==  0&&item.inventoryShare > 0" v-show="showIcon"
 									src="/static/images/tabBar/crd2x.png" mode="aspectFit" class='imgIcon' />
 								<image :src="item.url" mode="aspectFit"
 									style="width:300rpx;height:300rpx;border-radius:20rpx;border: 2rpx #E7E7E7 solid;" />
@@ -186,7 +186,8 @@
 				phoneNumber: '', // 业务员联系电话
 				salesmanShow: false, // 联系业务员弹窗
 				userInfo: {}, // 当前用户数据
-        cloudWarehouse: 0
+        cloudWarehouse: 0,
+        showIcon: true
 			}
 		},
 		onPageScroll(e) {
@@ -312,6 +313,7 @@
 			uni.hideLoading();
 		},
 		onShow() {
+      this.getIsShowIcon()
       this.getIsCloud()
 			this.getUpdate()
 			activityList({
@@ -354,6 +356,15 @@
 			})
 		},
 		methods: {
+      getIsShowIcon(){
+        isProcurement({
+          "param": "show.icon"
+        }).then(res => {
+          console.info('res-----', res)
+          console.info('res-----', Number(res.data))
+          this.showIcon = Number(res.data) === 0
+        })
+      },
       getIsCloud(){
         isProcurement({
           "param": "cloud_warehouse"

+ 15 - 5
pages/views/buyGoods/commodityDetails.vue

@@ -16,18 +16,18 @@
 				</view>
 				<view style="display: flex;align-items: center;">
 					<view style="display: flex;margin-right: 10rpx;">
-						<image v-if="Number(inventoryDataForm.storeInventory)" src="/static/images/tabBar/11.png"
+						<image v-if="Number(inventoryDataForm.storeInventory)" src="/static/images/tabBar/11.png" v-show="showIcon"
 							mode="aspectFit" style="width: 102rpx;height: 36rpx;" />
-						<image v-if="Number(inventoryDataForm.storeInventory)==0" src="/static/images/tabBar/14.png"
+						<image v-if="Number(inventoryDataForm.storeInventory)==0" src="/static/images/tabBar/14.png" v-show="showIcon"
 							mode="aspectFit" style="width: 102rpx;height: 36rpx;" />
 						<view style="font-size: 24rpx;color: #C4C4C4;margin-left: 10rpx;">
 							库存:{{ inventoryDataForm.storeInventory ? Number(inventoryDataForm.storeInventory) > 10 ? '充足' : inventoryDataForm.storeInventory : '' }}
 						</view>
 					</view>
 					<view style="display: flex;align-items: center;">
-						<image v-if="Number(inventoryDataForm.storeInventoryShare)" src="/static/images/tabBar/12.png"
+						<image v-if="Number(inventoryDataForm.storeInventoryShare)" src="/static/images/tabBar/12.png" v-show="showIcon"
 							mode="aspectFit" style="width: 102rpx;height: 36rpx;" />
-						<image v-if="Number(inventoryDataForm.storeInventoryShare)==0"
+						<image v-if="Number(inventoryDataForm.storeInventoryShare)==0" v-show="showIcon"
 							src="/static/images/tabBar/15.png" mode="aspectFit" style="width: 102rpx;height: 36rpx;" />
 						<view style="font-size: 24rpx;color: #C4C4C4;margin-left: 10rpx;">
 							库存:{{ inventoryDataForm.storeInventoryShare ? Number(inventoryDataForm.storeInventoryShare) > 10 ? '充足' : inventoryDataForm.storeInventoryShare : '' }}
@@ -173,10 +173,12 @@
 				// 审核状态
 				checkStatus: '',
 				adminShow: false,
-        cloudWarehouse: 0
+        cloudWarehouse: 0,
+        showIcon: true
 			}
 		},
 		onLoad(onLoad) {
+      this.getIsShowIcon()
       this.checkStatus = uni.getStorageSync('checkStatus');
       isProcurement({
         "param": "cloud_warehouse"
@@ -191,6 +193,14 @@
 
 		},
 		methods: {
+      getIsShowIcon(){
+        isProcurement({
+          "param": "show.icon"
+        }).then(res => {
+          console.info('res-----', res)
+          this.showIcon = Number(res.data) === 0
+        })
+      },
       loadList(onLoad){
         if (uni.getStorageSync('whether_openShare') == 1) {
           appDetailNew(onLoad).then(res => {