gcz vor 4 Jahren
Ursprung
Commit
383192431e

+ 9 - 7
pages/product/product.vue

@@ -184,6 +184,14 @@
 				console.log('this.thispage',this.thispage);
 				let thetoken = this.params.tokenhead + this.params.token;
 				this.$api.http.put(this.config.apiBaseurl+'/pre/add',{productId:productid},{header: {Authorization:thetoken}}).then(res => {
+					if(res.data.code!=200){
+						uni.showToast({
+							icon:"none",
+							title:res.data.message,
+							duration: 2000
+						});
+						return false;
+					};
 					console.log(res);
 					uni.showToast({
 						icon:'success',
@@ -193,17 +201,11 @@
 					});
 					
 				}).catch(err => {
-					if(err.data.message =='暂未登录或token已经过期'){
-						let loginurl = `${this.config.apiBaseurl}/wechat/h5/authorize?returnUrl=${this.thispage}`
-						console.log('loginurl',loginurl);
-						window.location.replace(loginurl);
-						return
-					}
 					uni.showToast({
 						icon:'none',
 						mask:true,
 						// title:err.data.message,
-						title:'已经添加过',
+						title:err.data.message,
 						duration: 2000
 					});
 					console.log(err.data.message);

+ 8 - 0
pages/publish/publish.vue

@@ -568,6 +568,14 @@
 								window.location.replace(this.config.loginUrl);
 							}, 2000);
 						};
+						if(res.data.code!=200){
+							uni.showToast({
+								icon:"none",
+								title:res.data.message,
+								duration: 2000
+							});
+							return false;
+						};
 						uni.showToast({
 							icon:'success',
 							title:`发布成功,请等待审核!`,

+ 2 - 1
pages/usercenter/authentication/authentication.vue

@@ -89,7 +89,8 @@
 					certNo:'',
 				},
 				typeindex:0,
-				typearray:['供应商','农户'],
+				// typearray:['供应商','农户'],
+				typearray:['供应商'],
 				//验证的规则
 				rules:{
 					phone:{

+ 7 - 6
pages/usercenter/focusme/focusme.vue

@@ -4,12 +4,13 @@
 			<view class="focusme">
 				<view v-for="(item,index) in focusmelist" :key="index" class="focusme-item">
 					<view class="focusme-item-photo">
-						<image class="focusme-item-photo-img" :src="item.img" mode=""></image>
+						<image class="focusme-item-photo-img" :src="item.pmsProduct.pic" mode=""></image>
 					</view>
 					<view class="focusme-item-text">
-						<view class="focusme-item-name">{{item.name}} <text class="type">{{item.type}}</text></view>
+						<view class="focusme-item-name">{{item.memberNickname}} <text class="type">{{item.type}}</text></view>
 						<view class="focusme-item-addr">{{item.addr}}</view>
-						<view class="focusme-item-care">关心:<text v-for="(careitem,careindex) in item.care" :key="careindex">{{careitem}},</text></view>
+						<view class="focusme-item-care">关心:{{item.pmsProduct.name}}</view>
+						<!-- <view class="focusme-item-care">关心:<text v-for="(careitem,careindex) in item.care" :key="careindex">{{careitem}},</text></view> -->
 					</view>
 					<view class="focusme-item-call" @click="callnumber(item.phonenumber)">
 						<svg class="icon focusme-item-call-icon" aria-hidden="true">
@@ -139,10 +140,10 @@
 					// let hasNext = data.xxx; 
 					
 					//设置列表数据
-					if(page.num == 1) this.mescrollList = []; //如果是第一页需手动置空列表
-					this.mescrollList = this.mescrollList.concat(curPageData); //追加新数据
+					if(page.num == 1) this.focusmelist = []; //如果是第一页需手动置空列表
+					this.focusmelist = this.focusmelist.concat(curPageData); //追加新数据
 					// console.log('page.num',page.num);
-					console.log('this.mescrollList',JSON.parse(JSON.stringify(this.mescrollList)));
+					console.log('this.focusmelist',JSON.parse(JSON.stringify(this.focusmelist)));
 					
 					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
 					this.mescroll.endBySize(curPageLen, totalSize);