gcz 2 年之前
父節點
當前提交
e715a40dc0
共有 5 個文件被更改,包括 39 次插入10 次删除
  1. 1 0
      App.vue
  2. 4 4
      common/http.interceptor.js
  3. 1 1
      manifest.json
  4. 2 2
      pages/login/login.vue
  5. 31 3
      pages/putin/goods/goods.vue

+ 1 - 0
App.vue

@@ -37,6 +37,7 @@
 			left: 0;
 			bottom: 0;
 			right: 0;
+			z-index: 100!important;
 		}
 	}
 	.screen-box{

+ 4 - 4
common/http.interceptor.js

@@ -53,9 +53,9 @@ const install = (Vue, vm) => {
 			// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
 			return res;  
 		} else if(res.msg == "令牌不能为空" || res.code == 401){
-			if(vm.vuex_user.userId) {
-				againToken(vm.vuex_user.userId)
-			} else {
+			// if(vm.vuex_user.userId) {
+			// 	againToken(vm.vuex_user.userId)
+			// } else {
 				const backUrl = location.href
 				const loginUrl = 'phoneLogin'
 				if (backUrl.indexOf(loginUrl) > 0) {
@@ -74,7 +74,7 @@ const install = (Vue, vm) => {
 						})
 					}, 1000)
 				}
-			}
+			// }
 		
 			
 		}else return res;

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "epidemic_stock",
-    "appid" : "__UNI__DE5C136",
+    "appid" : "__UNI__1F90778",
     "description" : "",
     "versionName" : "1.5.0",
     "versionCode" : "100",

+ 2 - 2
pages/login/login.vue

@@ -33,7 +33,7 @@
 			</view>
 		</view>
 
-		<u-modal :show="tipShow" title="登录提示" @confirm="confirm" :content="content"></u-modal>
+		<u-modal v-model="tipShow" title="登录提示" @confirm="confirm" :content="content"></u-modal>
 	</view>
 </template>
 
@@ -128,8 +128,8 @@
 					// });
 
 				} else {
-					this.tipShow = true;
 					this.content = msg;
+					this.tipShow = true;					
 				}
 			},
 			// 登录成功进入首页

+ 31 - 3
pages/putin/goods/goods.vue

@@ -24,7 +24,7 @@
 						<image :src="item.imgs|firstImg" mode="aspectFill"></image>
 						<view class="text">
 							<view class="name">{{item.mateName}}</view>
-							<view class="name u-tips-color">规格:{{item.specCode}}{{filterUnitName(item.unitCode)}}</view>
+							<view class="u-tips-color">{{filterSpecName(item.specCode)}}*{{filterUnitName(item.unitCode)}}</view>
 						</view>
 					</view>
 					<view class="right">
@@ -66,14 +66,16 @@
 				},
 				keyword:'',
 				// 列表数据
-				dataList: [{id:1,value:1},{id:2,value:12}],
+				dataList: [],
 				checkboxList:[],
 				choiceList:[],
 				unitNameList:[],
+				specNameList:[],
 			}
 		},
 		onLoad() {
 			this.unitNameDict();
+			this.specNameDict();
 		},
 		computed:{
 			filterUnitName(){
@@ -90,7 +92,22 @@
 					}
 					return v
 				}
-			}
+			},
+			filterSpecName(){
+				return function(value){
+					let v = '';
+					for (let i = 0; i < this.specNameList.length; i++){
+						// console.log('value',value);
+						// console.log('value',this.specNameList[i]);
+						let item = this.specNameList[i];
+						if (value == item.value) {
+						  v = item.label;
+						  break;
+						}
+					}
+					return v
+				}
+			},
 		},
 		methods: {
 			/*上拉加载的回调*/
@@ -183,6 +200,17 @@
 					})
 				}
 			},
+			async specNameDict() {
+				let { code, data, msg} = await this.$u.get(otherApiUrl.getDict + 'goods_spec_name')
+				if(code === 200) {
+					this.specNameList = data.map(item => {
+						return {
+							label: item.dictLabel,
+							value: item.dictValue
+						}
+					})
+				}
+			},
 		}
 	}
 </script>