Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/developerE' into developer

# Conflicts:
#	second/pages/product/product-details.vue
zhengjinyi 4 gadi atpakaļ
vecāks
revīzija
1dba7d2549

+ 6 - 2
search/pages/search/search-second.vue

@@ -70,7 +70,7 @@
 		data() {
 			return {
 				shopId:0,
-				userID:0,
+				userId:0,
 				themeClass: 'block',
 				show:false,
 				userIdentity:'',	
@@ -100,7 +100,10 @@
 			}
 		},
 		created() {
-			this.getListFromServer()
+			this.$api.getStorage().then((resolve) => {
+				this.userId = resolve.userId ? resolve.userId : '';
+				this.getListFromServer()
+			})
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
@@ -130,6 +133,7 @@
 					this.pageNum += 1;
 				}
 				let params = {
+						userId:this.userId,
 						secondHandType:1,
 						instrumentType:0,
 						name:this.name,

+ 3 - 5
second/pages/form/form-seller.vue

@@ -305,13 +305,11 @@
 				   {name:'其他',value:'3'},
 				],
 				radioList:[
-				   {name:'轻光电',value:'1',isChecked:false},
-				   {name:'重光电',value:'2',isChecked:false},
-				   {name:'耗材配件',value:'3',isChecked:false},
+					{name:'美容仪器',value:'1',isChecked:false}
 				],
 				beauty:[
-				   {name:'医美',value:'1'},
-				   {name:'非医美',value:'2'},
+					{name:'医美',value:'1'},
+					{name:'非医美',value:'2'},
 				],
 				BrandList:[],
 				isShow:false,

+ 1 - 3
second/pages/form/form.vue

@@ -305,9 +305,7 @@
 				   {name:'其他',value:'3'},
 				],
 				radioList:[
-				   {name:'轻光电',value:'1',isChecked:false},
-				   {name:'重光电',value:'2',isChecked:false},
-				   {name:'耗材配件',value:'3',isChecked:false},
+				   {name:'美容仪器',value:'1',isChecked:false}
 				],
 				beauty:[
 				   {name:'医美',value:'1'},

+ 17 - 11
second/pages/product/product-details.vue

@@ -48,7 +48,7 @@
 						<view class="banner-section">
 							<uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode" >
 								<swiper class="banner tui-banner tui-skeleton-rect"  @change="swiperChange" :duration='800' :autoplay="false" :circular="true" >
-									<swiper-item v-for="(item, index) in product.imageList" :key="index" class="banner-item"> 
+									<swiper-item v-for="(item, index) in product.imageList" :key="index" class="banner-item">
 										<image :src="item" @click="previewImg(index)" class="product-img" />
 									</swiper-item>
 								</swiper>
@@ -59,7 +59,7 @@
 						</view>
 						<view class="product-wrap clearfix">
 							<view class="wrap-top" >
-								<view class="wrap-top-price">  
+								<view class="wrap-top-price">
 									<second-price :product="product"></second-price>
 								</view>
 								<view class="p-title tui-skeleton-fillet">
@@ -81,14 +81,14 @@
 									<text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">正品保证</text></text>
 								</view>
 							</view>
-						</view>	
+						</view>
 						<view class="product-parameter" @click="showPopup">
 							<text class="title">参数:</text>
 							<text class="name">品牌  参数  分类...</text>
 							<text class="iconfont icon-xiayibu"></text>
 						</view>
 					</view>
-				</view>	
+				</view>
 				<view class="product-details productDetails0">
 					<!-- 商品详情 -->
 					<view class="title">
@@ -119,7 +119,7 @@
 						<view class="content hot">
 							<recommend :query-productid="product.productID" v-if="isRequest" ></recommend>
 						</view>
-					</view>	
+					</view>
 					<!-- 商品参数 -->
 					<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
 						<view class="tui-popup-box clearfix">
@@ -130,14 +130,14 @@
 									<view class="tui-button" @click="hidePopup()">收起</view>
 								</view>
 							</view>
-						</view>	
-					</tui-bottom-popup>	
+						</view>
+					</tui-bottom-popup>
 					<!-- 侧边 -->
 					<scroll-top :isScrollTop="isScrollTop" :bottom="200"></scroll-top>
 				</view>
 			</view>
 		</template>
-	</view>	
+	</view>
 </template>
 
 <script>
@@ -229,7 +229,7 @@
 		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				this.SecondService.ProductDetail({productId:this.productID,userId:this.userId}).then(response =>{	
+				this.SecondService.ProductDetail({productId:this.productID,userId:this.userId}).then(response =>{
 					this.skeletonShow = false
 					this.productImage=[];
 					this.shop = response.data.shop
@@ -243,6 +243,8 @@
 					},2000)
 					this.isRequest = true
 				}).catch(error =>{
+					console.log(error)
+					this.skeletonShow = false
 					this.isInvalid = true
 				})
 			},
@@ -365,7 +367,11 @@
 			getWinHeight() {
 				this.winHeight = wx.getSystemInfoSync().windowHeight;
 			},
-			
+			goIndex(){//商城首页
+				uni.switchTab({
+				    url: '/pages/tabBar/home/index'
+				});
+			}
 		},
 		onPullDownRefresh() {
 			setTimeout(() => {
@@ -413,7 +419,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
-				this.userId = resolve.userId ? resolve.userId : '';	
+				this.userId = resolve.userId ? resolve.userId : '';
 				this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 3
 				if (isPreviewImg) {
 					isPreviewImg = false;

+ 9 - 6
second/pages/product/product-list.vue

@@ -100,6 +100,7 @@
 		},
 		data(){
 			return{
+				userId:0,
 				isIphoneX:this.$store.state.isIphoneX,
 				clickPath:'/search/pages/search/search-second',
 				isShowClose:false,
@@ -118,9 +119,7 @@
 						   ],
 			    tabList : [
 							{value:'0',name:'全部'},
-							{value:'1',name:'轻光电'},
-							{value:'2',name:'重光电'},
-							{value:'3',name:'耗材配件'},
+							{value:'1',name:'美容仪器'}
 				   ],
 				pageNum:1,
 				pageSize:10,
@@ -142,8 +141,11 @@
 			}
 		},
 		created() {
-			 this.setScrollHeight();		
-			 this.gettabList();
+			 this.setScrollHeight();	
+			this.$api.getStorage().then((resolve) => {
+				this.userId = resolve.userId ? resolve.userId : '';
+				this.gettabList();
+			})	
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo','isWxAuthorize','identity'])
@@ -206,6 +208,7 @@
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
 				let params = {
+						userId:this.userId,
 						secondHandType:this.currentId,
 						instrumentType:this.currentID2,
 						name:this.name,
@@ -282,7 +285,7 @@
 			}
 		},	
 		onShow() {
-
+				
 		}
 	}
 </script>