lilei 9 ヶ月 前
コミット
00d4b51aba

+ 8 - 11
pages/index/index.vue

@@ -345,7 +345,7 @@
 			uni.$off('refashHome')
 			uni.$off('refashProm')
 		},
-		onShow() {
+		onHide() {
 			// 用户头像
 			this.avatarUrl = uni.getStorageSync('userPhoto');
 			// 重新刷新
@@ -398,7 +398,7 @@
 						// 获取扫描记录
 						this.getVinLog()
 						// 商品分类
-						this.getGoodType()
+						this.getGoodType(flag)
 						// 获取推荐产品
 						this.getHotProductList(flag)
 					}
@@ -408,9 +408,7 @@
 					// 隐藏促销模块
 					this.hidePromoTab()
 					// 商品分类
-					if(flag!=1){
-						this.getGoodType()
-					}
+					this.getGoodType(flag)
 					// 获取推荐产品
 					this.getHotProductList(flag)
 				}
@@ -471,14 +469,13 @@
 					if(this.hasShopiing){
 						// 隐藏tab 视频,显示tab购物车
 						this.showCatTab()
-						if(flag!=1){
-							// 商品分类
-							this.getGoodType()
-						}
+						// 商品分类
+						this.getGoodType(flag)
 						// 获取推荐产品
 						this.getHotProductList(flag)
 					}else{
 						// 没有商城
+						this.productList = []
 						// 隐藏tab 购物车,显示tab视频
 						this.showVideoTab()
 						// 滚动扫描记录
@@ -491,7 +488,7 @@
 				})
 			},
 			// 商品一级分类
-			getGoodType(){
+			getGoodType(flag){
 				this.productTypeList = []
 				getShopCategory({categoryLevel: 1}).then(res => {
 					const list = res.data || []
@@ -530,7 +527,7 @@
 					this.productList.forEach(item => {
 						count += item.length
 					})
-					this.hotProductpageSize = count
+					this.hotProductpageSize = count||10
 				}
 				this.getProductList(flag)
 			},

+ 1 - 0
pagesB/cart/productitem.vue

@@ -196,6 +196,7 @@
 				bottom:0;
 				background: rgba(255,255,255,0.7);
 				text-align: center;
+				font-size: 12px;
 			}
 		}
 		.choose-product-item-info{

+ 6 - 1
pagesB/shopiing/productDetail.vue

@@ -15,7 +15,7 @@
 		<view class="scrollPage-content">
 			<view class="product-info" v-if="detail">
 				<view :style="{height:statusBarHeight+'px'}"></view>
-				<u-swiper mode="number" :border-radius="0" img-mode="aspectFit" :interval="3000" :height="450" :list="imgList"></u-swiper>
+				<u-swiper mode="number" :border-radius="0" img-mode="aspectFit" :interval="3000" :height="450" :list="imgList" @click="viewImg"></u-swiper>
 				<view class="product-info-text">
 					<view class="product-info-text-title">
 						{{detail.productName}} 
@@ -183,6 +183,11 @@
 					data: text,
 				})
 			},
+			viewImg(index){
+				uni.previewImage({
+					urls: this.imgList
+				})
+			},
 			// 产品详情
 			getDetail(){
 				uni.showLoading({

+ 5 - 0
pagesB/shopiing/searchProduct.vue

@@ -205,6 +205,10 @@
 			// 列表查询
 			getList(){
 				this.loading = true
+				uni.showLoading({
+					title: '加载中...',
+					mask: true
+				})
 				const storeShelf = this.$store.state.vuex_storeShelf
 				const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'&&storeShelf ? storeShelf.dealerSn : ''
 				getShopProductList({
@@ -254,6 +258,7 @@
 						this.loadEnd = false
 						this.loadText = res.message
 					}
+					uni.hideLoading()
 					this.loading = false
 				}).catch(err => {
 					this.loading = false

+ 9 - 1
pagesB/shopiing/shopProduct.vue

@@ -106,7 +106,7 @@
 				clzId: null, // 一级分类
 				categorySn: null ,// 当前分类sn
 				categoryList: [], // 二级分类列表
-				enableRefresh: false,
+				enableRefresh: true,
 				triggered: false,
 				pulling: false
 			};
@@ -231,6 +231,10 @@
 			// 列表查询
 			getList(){
 				this.loading = true
+				uni.showLoading({
+					title: '加载中...',
+					mask: true
+				})
 				const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1' ? this.$store.state.vuex_storeShelf.dealerSn : ''
 				getShopProductList({
 					pageNo: this.pageNo,
@@ -280,6 +284,7 @@
 						this.loadEnd = false
 						this.loadText = res.message
 					}
+					uni.hideLoading()
 					this.loading = false
 				}).catch(err => {
 					this.loading = false
@@ -429,6 +434,9 @@
 					.choose-product-item-img{
 						height: 130rpx;
 					}
+					.choose-product-item-img .choose-product-item-left-info-code{
+						font-size:12px;
+					}
 					.choose-product-item-info .choose-product-item-left-info-name{
 						font-weight: normal;
 					}