gcz 4 rokov pred
rodič
commit
d389977f6b

+ 2 - 2
pages/usercenter/focusme/focusme.vue

@@ -4,12 +4,12 @@
 			<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.pmsProduct.pic" mode=""></image>
+						<image class="focusme-item-photo-img" :src="item.headimgurl" mode=""></image>
 					</view>
 					<view class="focusme-item-text">
 						<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">关心:{{item.pmsProduct.name}}</view>
+						<view class="focusme-item-care">关心:{{item.productName}}</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)">

+ 4 - 2
pages/usercenter/myfocus/myfocus.vue

@@ -6,7 +6,7 @@
 					<view v-for="(item,index) in productlist" :key="index" class="product-item">
 						<!-- <uni-swipe-action-item :right-options="swipeOptions" @click="delItem(item.id)" @change="changeSwipe"> -->
 							<view class="product-item-img-wrap" @click="productclick(item.pmsProduct.id)">
-								<image class="product-item-img" :src="$getimg+item.pmsProduct.pic" mode="widthFix"></image>
+								<image class="product-item-img" :src="$getimg+item.pmsProduct.pic" mode="aspectFit"></image>
 							</view>
 							<view class="product-item-info" @click="productclick(item.pmsProduct.id)">
 								<view class="product-item-til">{{item.productName}}</view>
@@ -15,7 +15,9 @@
 								<view class="product-item-company">{{item.companyName}}</view>
 								<view class="product-item-price">
 									<text class="rmb" v-if="item.pmsProduct.price">¥</text> 
-									<text class="price" :class="!item.price?'noprice':''">{{item.pmsProduct.price||"暂无价格"}} / </text>{{item.pmsProduct.unit}}</view>
+									<text class="price" :class="!item.price?'noprice':''">{{item.pmsProduct.price||"暂无价格"}}</text>
+									<text v-if="item.pmsProduct.unit">/ {{item.pmsProduct.unit}}</text>
+								</view>
 							</view>
 						<!-- </uni-swipe-action-item> -->
 					</view>

+ 15 - 12
pages/usercenter/mypublish/mypublish.vue

@@ -2,15 +2,18 @@
 	<view class="pages">
 		<mescroll-body class="wrap" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="product-wrap" v-if="productlist.length>0">
-				<view v-for="(item,index) in productlist" :key="index" @click="productclick" class="product-item">
+				<view v-for="(item,index) in productlist" :key="index" @click="productclick(item.id)" class="product-item">
 					<view class="product-item-img-wrap">
-						<image class="product-item-img" :src="item.img" mode="widthFix"></image>
+						<image class="product-item-img" :src="item.pic" mode="aspectFit"></image>
 					</view>
 					<view class="product-item-info">
-						<view class="product-item-til">{{item.title}}</view>
-						<view class="product-item-brand">{{item.brand}} <text class="postage" v-if="item.postage">包邮</text></view>
-						<view class="product-item-addr">{{item.addr}}</view>
-						<view class="product-item-price"><text class="rmb">¥</text> <text class="price">{{item.price}}</text> / {{item.unit}}</view>
+						<view class="product-item-til">{{item.name}}</view>
+						<view class="product-item-brand">{{item.brandName}} <text class="postage" v-if="item.postage">包邮</text></view>
+						<view class="product-item-addr">{{item.placeOfProduction}}</view>
+						<view class="product-item-price">
+							<text class="rmb" v-if="item.price">¥</text> <text class="price" :class="!item.price?'noprice':''">{{item.price||"暂无价格"}}</text>
+							<text v-if="item.unit">/ {{item.unit}}</text>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -115,7 +118,7 @@
 				this.params = Object.assign(this.params,{pageNum:pageNum,pageSize:pageSize});				
 				let thetoken = this.params.tokenhead + this.params.token;
 				console.log('thetoken',thetoken);
-				this.$api.http.get(this.config.apiBaseurl+'/pre/own',{params:this.params,header: {Authorization:thetoken}}).then(data => {
+				this.$api.http.get(this.config.apiBaseurl+'/prod/pub/list',{params:this.params,header: {Authorization:thetoken}}).then(data => {
 					console.log('1111111111',data);
 					if(data.data.code=='1001'){
 						// uni.redirectTo({
@@ -137,10 +140,10 @@
 					// let hasNext = data.xxx; 
 					
 					//设置列表数据
-					if(page.num == 1) this.mescrollList = []; //如果是第一页需手动置空列表
-					this.mescrollList = this.mescrollList.concat(curPageData); //追加新数据
+					if(page.num == 1) this.productlist = []; //如果是第一页需手动置空列表
+					this.productlist = this.productlist.concat(curPageData); //追加新数据
 					// console.log('page.num',page.num);
-					console.log('this.mescrollList',JSON.parse(JSON.stringify(this.mescrollList)));
+					console.log('this.productlist',JSON.parse(JSON.stringify(this.productlist)));
 					
 					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
 					this.mescroll.endBySize(curPageLen, totalSize); 
@@ -157,9 +160,9 @@
 				
 			},
 			//产品点击
-			productclick(product){
+			productclick(id){
 				uni.navigateTo({
-					url:`/pages/product/product?product=${product}`,					
+					url:`/pages/product/product?id=${id}`,					
 				})				
 			},