Browse Source

商品详情

zhengjinyi 4 years ago
parent
commit
ee4d6beda9
48 changed files with 568 additions and 426 deletions
  1. 1 1
      common/config/authorize.js
  2. 2 2
      common/config/config.js
  3. 2 2
      common/css/common.scss
  4. 1 1
      components/cm-custom/au-custom.vue
  5. 1 1
      components/cm-custom/cm-custom.vue
  6. 1 1
      components/cm-custom/cu-custom.vue
  7. 1 1
      components/cm-custom/custom-a.vue
  8. 1 1
      components/cm-custom/custom-b.vue
  9. 1 1
      components/cm-custom/custom-c.vue
  10. 1 1
      components/cm-custom/custom-p.vue
  11. 1 1
      components/cm-module/bottomMenu/bottomMenu.vue
  12. 1 1
      components/cm-module/cm-seller/home.vue
  13. 1 1
      components/cm-module/headerNavbar/header-back.vue
  14. 1 1
      components/cm-module/headerNavbar/header-poduct.vue
  15. 1 1
      components/cm-module/headerNavbar/headerNavbar.vue
  16. 29 59
      components/cm-module/homeIndex/banner.vue
  17. 1 1
      components/cm-module/homeIndex/customer.vue
  18. 21 6
      components/cm-module/homeIndex/hotProduct.vue
  19. 1 1
      components/cm-module/homeIndex/index.vue
  20. 29 59
      components/cm-module/homeIndex/specialProduct.vue
  21. 1 1
      components/cm-module/listTemplate/productList.vue
  22. 1 1
      components/cm-module/noLogin/nologin.vue
  23. 5 1
      components/cm-module/productDetails/cm-price.vue
  24. 3 3
      components/cm-module/supplier/banner.vue
  25. 1 1
      components/cm-module/supplier/home.vue
  26. 32 19
      components/cm-module/supplier/supplierDetails.vue
  27. 3 2
      components/cm-module/supplier/user.vue
  28. 41 0
      components/uni-grade/uni-grade.vue
  29. 6 5
      pages.json
  30. 2 2
      pages/authorization/authorization.vue
  31. 1 1
      pages/goods/cart.vue
  32. 1 1
      pages/goods/instrument-details.vue
  33. 119 138
      pages/goods/product.vue
  34. 2 2
      pages/login/bindOperator.vue
  35. 1 1
      pages/tabBar/cart/cart.vue
  36. 1 1
      pages/tabBar/home/home.vue
  37. 2 2
      pages/tabBar/home/index.vue
  38. 1 1
      pages/user/address/address.vue
  39. 2 2
      pages/user/order/order-cashier.vue
  40. 2 2
      pages/user/order/order-details.vue
  41. 1 1
      pages/user/order/success.vue
  42. 1 1
      pages/user/setting/password.vue
  43. 1 1
      second/pages/form/introduce.vue
  44. 2 2
      services/ajax.env.js
  45. 16 0
      services/shop.service.js
  46. 197 68
      supplier/pages/user/my-shop.vue
  47. 18 15
      supplier/pages/user/operator/list.vue
  48. 7 9
      supplier/pages/user/supplier.vue

+ 1 - 1
common/config/authorize.js

@@ -77,7 +77,7 @@ const getCode = provider => {
 				} else {
 					reject("获取code失败") 
 					uni.navigateTo({
-						url:'/pages/tabBar/home/home'
+						url:'/pages/tabBar/home/index'
 					})
 				}
             },

+ 2 - 2
common/config/config.js

@@ -1,8 +1,8 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	// URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
-	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
+	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
 	// URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'

+ 2 - 2
common/css/common.scss

@@ -96,7 +96,7 @@ button::after{
 		line-height: 44rpx;
 	}
 	.login-btn{
-		width: 702rpx;
+		width: 600rpx;
 		height: 88rpx;
 		font-size: $font-size-28;
 		line-height: 88rpx;
@@ -104,7 +104,7 @@ button::after{
 		margin: 0 auto;
 		text-align: center;
 		background: $btn-confirm;
-		border-radius: 14rpx;
+		border-radius: 44rpx;
 		margin-top: 40rpx;
 	}
 }

+ 1 - 1
components/cm-custom/au-custom.vue

@@ -50,7 +50,7 @@
 			},
 			_goHome:function(){
 				uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 			}
 		},

+ 1 - 1
components/cm-custom/cm-custom.vue

@@ -65,7 +65,7 @@
 			},
 			_goHome:function(){
 				uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 			}
 		},

+ 1 - 1
components/cm-custom/cu-custom.vue

@@ -55,7 +55,7 @@
 			},
 			_goHome:function(){
 				uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 			}
 		},

+ 1 - 1
components/cm-custom/custom-a.vue

@@ -55,7 +55,7 @@
 			},
 			_goHome:function(){
 				uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 			}
 		},

+ 1 - 1
components/cm-custom/custom-b.vue

@@ -65,7 +65,7 @@
 			},
 			_goHome:function(){
 				uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 			}
 		},

+ 1 - 1
components/cm-custom/custom-c.vue

@@ -112,7 +112,7 @@
 		    },
 		    _goHome: function () {
 		      	uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 		    },
 		    _goUser: function () {

+ 1 - 1
components/cm-custom/custom-p.vue

@@ -105,7 +105,7 @@
 		    },
 		    _goHome: function () {
 		      	uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 		    }
 		},

+ 1 - 1
components/cm-module/bottomMenu/bottomMenu.vue

@@ -3,7 +3,7 @@
 		<view class="isLower" v-if="disabled">该商品已下架~</view>
 		<view class="bottom-btn">
 			<view class="bottom-le">
-				<view class="item-bt" @click="navSwitchTab('/pages/tabBar/home/home')">
+				<view class="item-bt" @click="navSwitchTab('/pages/tabBar/home/index')">
 					<image src="../../../static/tab-home-current.png"></image>
 					<text>首页</text>
 				</view>

+ 1 - 1
components/cm-module/cm-seller/home.vue

@@ -244,7 +244,7 @@
 				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
-				// 	path: '/pages/tabBar/home/home',
+				// 	path: '/pages/tabBar/home/index',
 				// 	extraData: {
 				// 		'data1': 'test'
 				// 	},

+ 1 - 1
components/cm-module/headerNavbar/header-back.vue

@@ -112,7 +112,7 @@
 		    },
 		    _goHome: function () {
 		      	uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 		    },
 		    _goUser: function () {

+ 1 - 1
components/cm-module/headerNavbar/header-poduct.vue

@@ -105,7 +105,7 @@
 		    },
 		    _goHome: function () {
 		      	uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 		    }
 		},

+ 1 - 1
components/cm-module/headerNavbar/headerNavbar.vue

@@ -93,7 +93,7 @@
 		    },
 		    _goHome: function () {
 		      	uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 		    }
 		},

+ 29 - 59
components/cm-module/homeIndex/banner.vue

@@ -55,65 +55,35 @@
 				this.current = index;
 			},
 			NavToDetailPage(floor) {//跳转
-				switch(floor.linkType){
-					case 1://二级页面
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`)
-						break;
-					case 2://搜索项目仪器 
-						this.$api.navigateTo(`/pages/search/search-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 3://直播页面
-						this.$api.navigateTo(``)
-						break;
-					case 4://自由页面
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 5://商品详情
-						this.$api.navigateTo(`/pages/goods/product?id=${floor.linkParam.id}`)
-						break;
-					case 6://仪器项目详情
-						this.$api.navigateTo(`/pages/goods/instrument-details?id=${floor.linkParam.id}`)
-						break;
-					case 7://供应商主页 
-						this.$api.navigateTo(`/supplier/pages/user/my-shop?shopId=${floor.linkParam.id}`)
-						break;
-					case 8://专题活动页
-						this.$api.navigateTo(`/h5/pages/activity/activity-list`)
-						break;
-					case 9://二手市场介绍
-						this.$api.navigateTo(`/second/pages/form/introduce`)
-						break;
-					case 10://二手商品列表
-						this.$api.navigateTo(`/second/pages/product/product-list`)
-						break;
-					case 11://二手商品发布
-						this.$api.navigateTo(`/second/pages/form/form`)
-						break;
-					case 12://商品搜索
-						this.$api.navigateTo(`/pages/search/search?keyWord=${floor.title}`)
-						break;
-					case 13://信息详情
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 14://品牌招商介绍页 
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 15://维修保养介绍页 
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 16://首页
-						this.$api.switchTabTo(`/pages/tabBar/home/index`)
-						break;
-					case 17://注册页 
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-					case 18://信息中心
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-					case 19://供应商列表
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-				}
+				console.log(floor)
+				/**
+				 * 页面跳转类型
+				 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
+				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
+				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
+				 **/
+				 if(floor.linkType){
+					 const typeMap = {
+					 	1:`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`,
+					 	2:`/pages/search/search-instrument?linkId=${floor.linkParam.id}`,
+					 	5:`/pages/goods/product?id=${floor.linkParam.id}`,
+					 	6:`/pages/goods/instrument-details?id=${floor.linkParam.id}`,
+					 	7:`/supplier/pages/user/my-shop?shopId=${floor.linkParam.id}`,
+					 	8:`/h5/pages/activity/activity-list`,
+					 	9:`/second/pages/form/introduce`,
+					 	10:`/second/pages/product/product-list`,
+					 	11:`/second/pages/form/form`,
+					 	12:`/pages/search/search?keyWord=${floor.title}`,
+					 	13:`/h5/pages/article/page?link=${floor.link}`,
+					 	14:`/h5/pages/article/page?link=${floor.link}`,
+					 	15:`/h5/pages/article/page?link=${floor.link}`,
+					 	17:`/pages/login/register-select`,
+					 	18:`/h5/pages/article/page?link=${floor.link}`,
+					 	19:`/pages/search/search-supplier?keyWord=${floor.title}`
+					 }
+					 const url = typeMap[floor.linkType];
+					 this.$api.navigateTo(url)
+				 }
 			}
 		}
 	}

+ 1 - 1
components/cm-module/homeIndex/customer.vue

@@ -58,7 +58,7 @@
 			},
 			_goHome:function(){
 				uni.switchTab({
-		        	url: '/pages/tabBar/home/home'
+		        	url: '/pages/tabBar/home/index'
 		      	})
 			}
 		},

+ 21 - 6
components/cm-module/homeIndex/hotProduct.vue

@@ -6,7 +6,7 @@
 				<swiper class="tui-banner-swiper" :autoplay="false" :interval="5000" :duration="500" :circular="true" @change="swiperChange">
 					<swiper-item v-for="(product,index) in hotProductList" :key="index">
 						<view class="floor-item" v-for="(item, idx) in product" :key="idx" @click.stop="navToDetailPage(item.id)">
-							<image class="tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
+							<image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
 							<view class="floor-item-content">
 								<view class="title tui-skeleton-rect">
 									<text class="mclap">{{item.name}}</text>
@@ -22,6 +22,15 @@
 										<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 											<text class="p sm">¥</text>
 											<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+											<template v-if="item.actStatus==1">
+												<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+													{{item.promotions.name}}<text v-if="hasLogin && item.price1TextFlag != '1'">:¥{{item.price | NumFormat}}</text>
+												</view>
+												<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+											</template>
+											<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+												<view class="floor-tags">阶梯价格</view>	
+											</template>
 										</view>
 									</view>
 									<view v-else>
@@ -46,7 +55,8 @@
 								<view v-else class="no-price">
 									<view class="p-stars">
 										<text class="p-no">¥</text>
-										<uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
+										<uni-grader :grade="Number(item.priceGrade)"></uni-grader>
+										<!-- <uni-stars :stars="parseInt()" :fontSize="36" :widthInfo="180"></uni-stars> -->
 										<template v-if="item.actStatus==1">
 											<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
 												{{item.promotions.name}}<text v-if="hasLogin && item.price1TextFlag != '1'">:¥{{item.price | NumFormat}}</text>
@@ -76,8 +86,12 @@
 
 <script>
 	import { mapState,mapMutations} from 'vuex';
+	import uniGrader from '@/components/uni-grade/uni-grade.vue'
 	export default{
 		name:"hotProduct",
+		components:{
+			uniGrader
+		},
 		props:{
 			list:{
 				type:Array
@@ -151,7 +165,7 @@
 		}
 		.recommend-list{
 			width: 100%;
-			height: 1070rpx;
+			height: 1080rpx;
 			position: relative;
 			padding-bottom: 20rpx;
 			.tui-banner-swiper {
@@ -159,7 +173,7 @@
 				margin: 0 auto;
 				background: #F7F7F7;
 				padding: 0 24rpx 0 24rpx;
-				height: 1070rpx;
+				height: 1080rpx;
 				overflow: hidden;
 				transform: translateY(0);
 				.floor-item{
@@ -174,10 +188,11 @@
 					margin-bottom: 20rpx;
 					float: left;
 					box-sizing: border-box;
+					padding-bottom: 10rpx;
 					&:nth-child(2n){
 						margin-right: 0;
 					}
-					image{
+					.item-img{
 						width: 341rpx;
 						height: 341rpx;
 						border-radius: 2rpx 2rpx 0 0;
@@ -233,6 +248,7 @@
 						height: 72rpx;
 						display: flex;
 						flex-direction: column;
+						margin-bottom: 15rpx;
 						.mclap{
 							width: 100%;
 							line-height:40rpx;
@@ -257,7 +273,6 @@
 							float: left;
 						}
 						.p-stars{
-							width: 230rpx;
 							float: left;
 						}
 					}

+ 1 - 1
components/cm-module/homeIndex/index.vue

@@ -379,7 +379,7 @@
 				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
-				// 	path: '/pages/tabBar/home/home',
+				// 	path: '/pages/tabBar/home/index',
 				// 	extraData: {
 				// 		'data1': 'test'
 				// 	},

+ 29 - 59
components/cm-module/homeIndex/specialProduct.vue

@@ -59,65 +59,35 @@
 				this.current = index;
 			},
 			NavToDetailPage(floor) {//跳转
-				switch(floor.linkType){
-					case 1://二级页面
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`)
-						break;
-					case 2://搜索项目仪器 
-						this.$api.navigateTo(`/pages/search/search-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 3://直播页面
-						this.$api.navigateTo(``)
-						break;
-					case 4://自由页面
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 5://商品详情
-						this.$api.navigateTo(`/pages/goods/product?id=${floor.linkParam.id}`)
-						break;
-					case 6://仪器项目详情
-						this.$api.navigateTo(`/pages/goods/instrument-details?id=${floor.linkParam.id}`)
-						break;
-					case 7://供应商主页 
-						this.$api.navigateTo(`/supplier/pages/user/my-shop?shopId=${floor.linkParam.id}`)
-						break;
-					case 8://专题活动页
-						this.$api.navigateTo(`/h5/pages/activity/activity-list`)
-						break;
-					case 9://二手市场介绍
-						this.$api.navigateTo(`/second/pages/form/introduce`)
-						break;
-					case 10://二手商品列表
-						this.$api.navigateTo(`/second/pages/product/product-list`)
-						break;
-					case 11://二手商品发布
-						this.$api.navigateTo(`/second/pages/form/form`)
-						break;
-					case 12://商品搜索
-						this.$api.navigateTo(`/pages/search/search?keyWord=${floor.title}`)
-						break;
-					case 13://信息详情
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 14://品牌招商介绍页 
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 15://维修保养介绍页 
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 16://首页
-						this.$api.switchTabTo(`/pages/tabBar/home/index`)
-						break;
-					case 17://注册页 
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-					case 18://信息中心
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-					case 19://供应商列表
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-				}
+				console.log(floor)
+				/**
+				 * 页面跳转类型
+				 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
+				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
+				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
+				 **/
+				 if(floor.linkType){
+					 const typeMap = {
+					 	1:`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`,
+					 	2:`/pages/search/search-instrument?linkId=${floor.linkParam.id}`,
+					 	5:`/pages/goods/product?id=${floor.linkParam.id}`,
+					 	6:`/pages/goods/instrument-details?id=${floor.linkParam.id}`,
+					 	7:`/supplier/pages/user/my-shop?shopId=${floor.linkParam.id}`,
+					 	8:`/h5/pages/activity/activity-list`,
+					 	9:`/second/pages/form/introduce`,
+					 	10:`/second/pages/product/product-list`,
+					 	11:`/second/pages/form/form`,
+					 	12:`/pages/search/search?keyWord=${floor.title}`,
+					 	13:`/h5/pages/article/page?link=${floor.link}`,
+					 	14:`/h5/pages/article/page?link=${floor.link}`,
+					 	15:`/h5/pages/article/page?link=${floor.link}`,
+					 	17:`/pages/login/register-select`,
+					 	18:`/h5/pages/article/page?link=${floor.link}`,
+					 	19:`/pages/search/search-supplier?keyWord=${floor.title}`
+					 }
+					 const url = typeMap[floor.linkType];
+					 this.$api.navigateTo(url)
+				 }
 			}
 		}
 	}

+ 1 - 1
components/cm-module/listTemplate/productList.vue

@@ -197,7 +197,7 @@
 			},
 			toIndexPage() {
 				uni.switchTab({
-					url: '/pages/tabBar/home/home' 
+					url: '/pages/tabBar/home/index' 
 				})
 			},
 			repurchModel(){

+ 1 - 1
components/cm-module/noLogin/nologin.vue

@@ -54,7 +54,7 @@
 			hideModel(){
 				if(this.tabPath){
 					uni.switchTab({
-					    url: '/pages/tabBar/home/home'
+					    url: '/pages/tabBar/home/index'
 					});
 				}else{
 					this.$parent.isShowNoLogin=false;

+ 5 - 1
components/cm-module/productDetails/cm-price.vue

@@ -4,7 +4,7 @@
 		<template v-if="!hasLogin">
 			<view class="p-login grade tui-skeleton-fillet">
 				<text class="p-no">¥</text>
-				<uni-stars :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
+				<uni-grader :grade="Number(product.price1Grade)"></uni-grader>
 				<view v-if="product.actStatus==1" class="floor-item-act">
 					<view v-if="product.promotions.type == 1 && product.promotions.mode==1"  class="floor-tags" @click.stop="clickPopupShow()">
 						{{product.promotions.name}}<text v-if="hasLogin">:¥{{ product.price | NumFormat }}</text>
@@ -144,8 +144,12 @@
 
 <script>
 	import { mapState,mapMutations } from 'vuex'
+	import uniGrader from '@/components/uni-grade/uni-grade.vue'
 	export default{
 		name:'cm-price',
+		components:{
+			uniGrader
+		},
 		props:{
 			product:{
 				type:Object,

+ 3 - 3
components/cm-module/supplier/banner.vue

@@ -3,7 +3,7 @@
 		<view class="swiper-banner-box" >
 			<swiper class="tui-banner-swiper tui-banner tui-skeleton-fillet" :autoplay="true" :interval="5000" :duration="500"  @change="swiperChange" :circular="true">
 				<swiper-item v-for="(item,index) in list" :key="index">
-					<image :src="item.image" class="tui-slide-image" mode="scaleToFill"/>
+					<image :src="item.image ? item.image : defaultbanner" class="tui-slide-image" mode="scaleToFill"/>
 				</swiper-item>
 			</swiper>
 			<view class="swiper__dots-box" v-if="list.length > 1">
@@ -27,7 +27,8 @@
 		},
 		data() {
 			return{
-				current:0
+				current:0,
+				defaultbanner:'http://static-b.caimei365.com/app/img/bg/icon-defaultbanner.png'
 			}
 		},
 		created(){
@@ -60,7 +61,6 @@
 		border-radius: 16rpx;
 		overflow: hidden;
 		transform: translateY(0);
-		box-shadow:0px 3px 6px rgba(225,86,22,0.08);
 		margin-top: 16rpx;
 		.banner-item{
 			border-radius: 16rpx;

+ 1 - 1
components/cm-module/supplier/home.vue

@@ -244,7 +244,7 @@
 				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
-				// 	path: '/pages/tabBar/home/home',
+				// 	path: '/pages/tabBar/home/index',
 				// 	extraData: {
 				// 		'data1': 'test'
 				// 	},

+ 32 - 19
components/cm-module/productDetails/supplierDetails.vue → components/cm-module/supplier/supplierDetails.vue

@@ -3,10 +3,10 @@
 	<view class="supplier clearfix">
 		<view class="sup-header">
 			<view class="header-img">
-				<image :src="shop.logo" mode=""></image>
+				<image :src="shopData.logo" mode=""></image>
 			</view>
 			<view class="header-txt">
-				<text>{{shop.name}}</text>
+				<text>{{shopData.name}}</text>
 			</view>
 		</view>
 		<view class="sup-msg massage-t">
@@ -15,7 +15,7 @@
 			</view>
 			<view class="sup-title">
 				<text class="tit-l">公司名称:</text>
-				<text >{{shop.name}}</text>
+				<text >{{shopData.name}}</text>
 			</view>
 			<view class="sup-stars">
 				<text class="tit-l">满意度:</text>
@@ -27,8 +27,8 @@
 				<view class="conte-l">
 					<text class="tit-l">经营范围:</text>
 				</view>
-				<view class="conte-r" v-if="shop.businessScopeArray.length>0">
-					<text class="age" v-for="(item,idx) in shop.businessScopeArray" :key="idx">{{item}}</text>
+				<view class="conte-r" v-if="shopData.businessScopeArr.length>0">
+					<text class="age" v-for="(item,idx) in shopData.businessScopeArr" :key="idx">{{item}}</text>
 				</view>
 				<view class="conte-r" v-else>
 					<text class="tit">暂无</text>
@@ -39,42 +39,42 @@
 			<view class="sup-h1">
 				<text class="line">公司介绍</text>
 			</view>
-			<view class="sup-p" :class="[shop.info == null ? 'center' : '']">
-				{{shop.info == null ? '暂无内容' : shop.info}}
+			<view class="sup-p" :class="[shopData.info == null ? 'center' : '']">
+				{{shopData.info ? shopData.info : '暂无内容' }}
 			</view>
 		</view>
 		<view class="sup-msg massage-t">
 			<view class="sup-h1">
 				<text class="line">主打系列产品说明</text>
 			</view>
-			<view class="sup-p" :class="[shop.productDesc == null ? 'center' : '']">
-				{{shop.productDesc == null ? '暂无内容' : shop.productDesc}}
+			<view class="sup-p" :class="[shopData.productDesc == null ? 'center' : '']">
+				{{shopData.productDesc == null ? '暂无内容' : shopData.productDesc}}
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shop.businessLicenseImage!=null">
+		<view class="sup-msg massage-t" v-if="shopData.businessLicenseImage!=null">
 			<view class="sup-h1">
 				<text class="line">营业执照</text>
 			</view>
 			<view class="sup-img">
-				<image :src="shop.businessLicenseImage" mode="aspectFill" @click="previewImg(shop.businessLicenseImage)"></image>
+				<image :src="shopData.businessLicenseImage" mode="aspectFill" @click="previewImg(shopData.businessLicenseImage)"></image>
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shop.medicalPracticeLicenseImg1!=null">
+		<view class="sup-msg massage-t" v-if="shopData.medicalPracticeLicenseImg1!=null">
 			<view class="sup-h1">
 				<text class="line">公司资质</text>
 			</view>
 			<view class="sup-imgList clearfix">
-				<view class="img"><image :src="shop.medicalPracticeLicenseImg1" mode="" @click="previewImg(shop.medicalPracticeLicenseImg1)"></image></view>
-				<view class="img"><image :src="shop.medicalPracticeLicenseImg2" mode="" @click="previewImg(shop.medicalPracticeLicenseImg2)"></image></view>
-				<view class="img"><image :src="shop.medicalPracticeLicenseImg3" mode="" @click="previewImg(shop.medicalPracticeLicenseImg3)"></image></view>
+				<view class="img"><image :src="shopData.medicalPracticeLicenseImg1" mode="" @click="previewImg(shopData.medicalPracticeLicenseImg1)"></image></view>
+				<view class="img"><image :src="shopData.medicalPracticeLicenseImg2" mode="" @click="previewImg(shopData.medicalPracticeLicenseImg2)"></image></view>
+				<view class="img"><image :src="shopData.medicalPracticeLicenseImg3" mode="" @click="previewImg(shopData.medicalPracticeLicenseImg3)"></image></view>
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shop.authorizationCertificateImage!=null">
+		<view class="sup-msg massage-t" v-if="shopData.authorizationCertificateImage!=null">
 			<view class="sup-h1">
 				<text class="line">授权牌照</text>
 			</view>
 			<view class="sup-img">
-				<image :src="shop.authorizationCertificateImage" mode="aspectFill" @click="previewImg(shop.authorizationCertificateImage)"></image>
+				<image :src="shopData.authorizationCertificateImage" mode="aspectFill" @click="previewImg(shopData.authorizationCertificateImage)"></image>
 			</view>
 		</view>
 	</view>
@@ -87,15 +87,20 @@
 		components:{
 			uniStars
 		},
-		props:['shop'],
+		props:{
+			shopId:{
+				type:Number
+			}
+		},
 		data() {
 			return{
+				shopData:{},
 				iconClass:'icon-xingxing',
 				iconColor:'#FF9100'
 			}
 		},
 		created() {
-
+			this.GetSupplierHomeDeatils(this.shopId)
 		},
 		onLoad(){
 
@@ -108,6 +113,14 @@
 					urls: mentuzArray,
 					current: 0
 				});
+			},
+			GetSupplierHomeDeatils(shopId){//供应商详情
+				this.ShopService.GetSupplierHomeDeatils({supplierId:shopId}).then(response =>{
+					this.shopData = response.data
+					console.log(this.shopData)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
 			}
 		},
 		onShow(){

+ 3 - 2
components/cm-module/supplier/user.vue

@@ -158,7 +158,7 @@
 							uni.setStorageSync('token',response.data.token)
 							uni.removeStorageSync('sessionid')
 							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-							this.getUserSellerHome()
+							this.GetHomePageData()
 							this.getPhone()
 						}).catch(response =>{
 							this.logout()
@@ -170,7 +170,7 @@
 					})
 				})
 			},
-			getUserSellerHome(){
+			GetHomePageData(){
 				this.$api.getStorage().then((resolve) =>{
 					this.userId = resolve.userID
 					this.ShopService.GetHomePageData({userId:this.userId}).then(response =>{
@@ -180,6 +180,7 @@
 						this.allNum = data.allNum	//全部商品
 						this.upNum = data.upNum 	//已上架
 						this.downNum = data.downNum //已下架
+						uni.setStorage({key: 'shopInfo',data: data.shop})
 						this.skeletonShow = false;
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)

+ 41 - 0
components/uni-grade/uni-grade.vue

@@ -0,0 +1,41 @@
+<template>
+	<view class="grade" :style="{marginTop:margin+'rpx'}">
+		<image :src="path + 'icon-grade'+grade+'.png'" mode=""></image>
+	</view>
+</template>
+
+<script>
+	export default{
+		name:"grade",
+		props:{
+			grade:{	//等级
+				type: Number,
+			},
+			margin:{
+				type:Number,
+				default:12
+			}
+		},
+		data() {
+			return {
+				path:'http://static-b.caimei365.com/app/img/icon/'
+			};
+		},
+		methods:{
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.grade{
+		width: 114rpx;
+		height: 33rpx;
+		float: left;
+		image{
+			width: 110rpx;
+			height: 29rpx;
+			display: block;
+		}
+	}
+</style>

+ 6 - 5
pages.json

@@ -113,11 +113,6 @@
 				"navigationBarTitleText": "项目仪器详情",
 				"navigationStyle":"custom"
 			}
-		},{
-			"path": "pages/goods/supplier",
-			"style": {
-				"navigationBarTitleText": "供应商信息"
-			}
 		},{
 			"path": "pages/goods/cart",
 			"style": {
@@ -590,6 +585,12 @@
 						"navigationBarTitleText": "订单详情",
 						"enablePullDownRefresh":true
 					}
+				},{
+					"path": "pages/user/supplier",
+					"style": {
+						"navigationBarTitleText": "供应商信息",
+						"enablePullDownRefresh":true
+					}
 				},{
 					"path": "pages/order/order-list",
 					"style": {

+ 2 - 2
pages/authorization/authorization.vue

@@ -61,7 +61,7 @@
 			hanldBackFn(){
 				switch(this.authorizeType){
 					case '0':
-						this.$api.switchTabTo('/pages/tabBar/home/home')
+						this.$api.switchTabTo('/pages/tabBar/home/index')
 						break;
 					default:
 						uni.navigateBack({delta: 1})
@@ -76,7 +76,7 @@
 							wxLogin.wxLoginAuthorize()
 							switch(self.authorizeType){
 								case '0':
-									self.$api.switchTabTo('/pages/tabBar/home/home')
+									self.$api.switchTabTo('/pages/tabBar/home/index')
 									break;
 								case '1':
 									self.$api.navigateTo('/pages/login/login')

+ 1 - 1
pages/goods/cart.vue

@@ -750,7 +750,7 @@
 			},
 			goIndex(){
 				uni.switchTab({
-				    url: '/pages/tabBar/home/home'
+				    url: '/pages/tabBar/home/index'
 				});
 			},
 			goNavto(url){

+ 1 - 1
pages/goods/instrument-details.vue

@@ -145,7 +145,7 @@
 			<view class="menu" v-if="userIdentity!=1">
 				<view class="bottom-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 					<view class="bottom-le">
-						<view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/home')">
+						<view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">
 							<image src="../../static/icon-home-active@3x.png"></image>
 							<text>首页</text>
 						</view>

+ 119 - 138
pages/goods/product.vue

@@ -8,8 +8,32 @@
 					:type="isShareType"
 					:page='backPage'>
 		</custom-p>
+		<view  class="navbar" :class="navbarFiexd" :style="{top:CustomBar +'px'}">
+			<view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 0 }" @click="tabClick(0)">
+				<text>详情</text>
+				<text class="line"></text>
+			</view>
+			<view class="nav-item tui-skeleton-fillet" 
+				  :class="{ current: tabCurrentIndex === 2 }" 
+				  @click="tabClick(2)" 
+				  v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo">
+					<text>服务项目</text>
+					<text class="line"></text>
+			</view>	
+			<view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 3 }" @click="tabClick(3)">
+				<text>推荐</text>
+				<text class="line"></text>
+			</view>	
+		</view>	
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
-		<view class="container-product tui-skeleton">
+		<view v-else class="cart-content empty" v-if="isInvalid">
+			<view  class="empty-container">
+				<image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
+				<text class="error-text">商品已失效,去商城逛逛别的吧~</text>
+				<view class="login-btn"  @click="goIndex">去商城</view>
+			</view>
+		</view>
+		<view class="container-product tui-skeleton" v-else>
 			<view class="product-top">
 				<view class="banner-section">
 					<uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode" >
@@ -41,28 +65,27 @@
 								<view class="">分享</view>
 							</button>
 						</view>
-						<view class="productRemarks"  v-if="product.productRemarks!=''&&product.productRemarks!=null">
-							<text class="text">{{product.productRemarks}}</text>
-						</view>
 						<view class="wrap-label" v-if="product.tagsList.length>0">
 							<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
 						</view>
+						<view class="product-seve">
+							<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
+							<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
+							<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">正品保证</text></text>
+						</view>
+						<view class="productRemarks"  v-if="product.productRemarks!=''&&product.productRemarks!=null">
+							备注:{{product.productRemarks}}
+						</view>
 					</view>
 				</view>			
 			</view>
-			<view class="product-seve">
-				<text class="title">服务:</text>
-				<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
-				<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
-				<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">正品保证</text></text>
-			</view>
 			<view class="product-parameter" @click="showPopup">
 				<text class="title">参数:</text>
 				<text class="name">品牌  起订量  分类...</text>
 				<text class="iconfont icon-xiayibu"></text>
 			</view>
 			<view class="product-supplier" @click="goSupplier">
-				<view class="logo"><img src="https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png" alt=""></view>
+				<view class="logo"><img :src="shop.logo" alt=""></view>
 				<view class="main">
 					<view class="name">{{shop.name}}</view>
 					<view class="massgs">
@@ -71,7 +94,7 @@
 							<uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="36" :widthInfo="176"></uni-stars>
 						</view>
 						<view class="acount">
-							<text>50</text>件商品
+							<text>{{ shop.normalNum }}</text>件商品
 						</view>
 					</view>
 				</view>
@@ -104,29 +127,6 @@
 					<recommend :query-productid="product.productID" v-if="isRequest"></recommend>
 				</view>
 			</view>	
-			<!--<view  class="navbar" :class="navbarFiexd" :style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
-				<view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 0 }" @click="tabClick(0)">
-					<text>商品详情</text>
-					<text class="line"></text>
-				</view>
-				<view class="nav-item tui-skeleton-fillet" 
-					  :class="{ current: tabCurrentIndex === 1 }" 
-					  @click="tabClick(1)" 
-					  v-if="product.parametersList != ''">
-						<text>相关参数</text>
-						<text class="line"></text>
-				</view>	
-				<view class="nav-item tui-skeleton-fillet" 
-					  :class="{ current: tabCurrentIndex === 2 }" 
-					  @click="tabClick(2)" 
-					  v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo">
-						<text>服务项目</text>
-						<text class="line"></text>
-				</view>	
-				<view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 3 }" @click="tabClick(3)">
-					<text>相关推荐</text>
-					<text class="line"></text>
-				</view> -->	
 			<!-- 商品参数 -->
 			<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
 				<view class="tui-popup-box clearfix">
@@ -168,7 +168,7 @@
 			<view class="menu" v-if="userIdentity!=1">
 				<view class="bottom-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 					<view class="bottom-le">
-						<view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/home')">
+						<view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">
 							<image src="../../static/icon-home-active@3x.png"></image>
 							<text>首页</text>
 						</view>
@@ -249,7 +249,6 @@
 	import cmPrice from "@/components/cm-module/productDetails/cm-price.vue" //价格显示
 	import cmAttributes from "@/components/cm-module/productDetails/cm-attributes.vue" //规格信息
 	import authorize from '@/common/config/authorize.js'
-	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import parser from "@/components/jyf-Parser/index" //富文本处理
 	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
 	import recommend from "@/components/cm-module/productDetails/recommend" //相关推荐
@@ -259,7 +258,6 @@
 	var isPreviewImg;
 	export default{
 		components:{
-			uniStars,
 			customP,
 			parser,
 			tuiSkeleton,
@@ -281,14 +279,14 @@
 				isRequest:false,
 				isScrollTop:false,
 				current:0,
+				shopId:0,
 				isShareType:'',
+				productNoneImage:'http://static-b.caimei365.com/app/img/icon/icon-pnone.png',
 				isHeaderPoduct:false,
 				navbarFiexd:'none',
 				ladderPriceFlag:'',
 				ladderPriceList:'',
-				isRecommend:false,
-				isRarameter:true,
-				isService:false,
+				isInvalid:false,
 				isEvaluate:false,
 				isAnimation:false,
 				skeletonShow:true,
@@ -323,6 +321,7 @@
 					title: ''		// 导航栏 中间的标题
 				},
 				linkPath:'',
+				CustomBar:this.CustomBar,// 顶部导航栏高度
 				popupShow:false//参数弹窗
 			}
 		},
@@ -354,13 +353,19 @@
 					this.skeletonShow = false
 					this.productImage=[];
 					this.shop = response.data.shop
+					this.shopId = response.data.shopID
 					this.product = response.data
+					//已删除/已冻结
+					if(this.product.validFlag === '0'){
+						console.log('2222222222')
+						this.isInvalid = true
+					}
 					this.ladderPriceFlag = this.product.ladderPriceFlag;
 					this.html = this.product.productDetail == null ? this.html : this.$api.adaptRichTextImg(this.product.productDetail.detailInfo)
 					this.stock = this.product.stock
 					this.buyRetailPriceStep = this.product.step
 					this.number = this.product.minBuyNumber
-					this.minBuyNumber = this.product.minBuyNumber
+					this.minBuyNumber = this.product.minBuyNumber					
 					//处理商品图片列表
 					this.product.imageList.forEach(item =>{
 						this.productImage.push(item.image);
@@ -381,7 +386,6 @@
 						this.disabled = true
 						this.isNoneDisabled = true
 						this.tabCurrentIndex = 3;// 页面显示是默认选中第一
-						this.isRecommend = true
 						this.goodsData.disabledText = '下架'
 					}else{
 						this.disabled = false
@@ -428,17 +432,6 @@
 			tabClick(index) {//商品详情&&供应商信息tab切换
 				console.log(index)
 				this.tabCurrentIndex = index;
-				switch(index){
-					case 1:
-						this.isRarameter = true
-						break;
-					case 2:
-						this.isService = true
-						break;
-					case 3:
-						this.isRecommend = true
-						break;
-				}
 			},
 			handleContact(e){//跳转小程序客服
 
@@ -589,9 +582,13 @@
 			getOptionFn(e){
 				this.isShareType = e.type
 			},
-			goSupplier(){
-				this.$api.setStorage('supplierInfo',this.shop)
-				this.$api.navigateTo('/pages/goods/supplier')
+			goIndex(){//商城首页
+				uni.switchTab({
+				    url: '/pages/tabBar/home/index'
+				});
+			},
+			goSupplier(){//跳供应商资料页
+				this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+this.shopId)
 			},
 			discard(){
 				//丢弃
@@ -616,22 +613,22 @@
 		onPageScroll(e){//实时获取到滚动的值
 			if(e.scrollTop>50){
 				this.headerColor = true
+				this.navbarFiexd = 'fixed'
 				this.nvabarData={							
 					showCapsule: 1, 
 					title: '商品详情', 		
 				}
 			}else{
 				this.headerColor = false
+				this.navbarFiexd = 'none'
 				this.nvabarData={
 					showCapsule: 1, 
 					title: '', 		
 				}
 			}
 			if(e.scrollTop>700){
-				this.navbarFiexd = 'fixed'
 				this.isScrollTop = true
 			}else{
-				this.navbarFiexd = 'none'
 				this.isScrollTop = false
 			}
 		},
@@ -666,25 +663,6 @@
 	page{
 		background-color: #FFFFFF;
 	}
-	.productRemarks{
-		height: 36rpx;
-		margin: 8rpx 0;
-		width: 100%;
-		float: left;
-		.text{
-			display: inline-block;
-			padding: 0 18rpx;
-			line-height: 32rpx;
-			font-size: 20rpx;
-			color: #FF2A2A;
-			text-align: center;
-			border-radius: 4rpx;
-			background: #FFFFFF;
-			border: 1px solid #FF2A2A;
-			float: left;
-			opacity: 0.8;
-		}
-	}
 	.banner-section{
 		width: 100%;
 		height: 750rpx;
@@ -713,6 +691,15 @@
 		padding: 24rpx 0 0 0;
 		background-color: #FFFFFF;
 		border-bottom: 20rpx solid #F7F7F7;
+		.productRemarks{
+			height: 48rpx;
+			width: 100%;
+			float: left;
+			line-height: 48rpx;
+			font-size: 24rpx;
+			color: #999999;
+			text-align: left;
+		}
 		.wrap-top{
 			width: 702rpx;
 			padding: 0 24rpx;
@@ -912,9 +899,10 @@
 				}
 			}
 			.floor-item-btn{
-				float: right;
+				float: left;
 				height: 40rpx;
 				margin-top: 8rpx;
+				margin-left: 10rpx;
 				.btn{
 					line-height: 40rpx;
 					padding: 0 20rpx;
@@ -968,29 +956,20 @@
 		}
 	}
 	.product-seve{
-		width: 702rpx;
-		height: 90rpx;
-		padding: 0 24rpx;
+		width: 100%;
+		height: 60rpx;
 		background-color: #FFFFFF;
 		position: relative;
 		display: flex;
-		line-height: 90rpx;
-		border-bottom: 20rpx solid #F7F7F7;
-		.title{
-			line-height: 90rpx;
-			display: inline-block;
-			float: left;
-			font-size: $font-size-28;
-			color: $text-color;
-		}
+		line-height: 60rpx;
 		.iconfont{
-			color: #999999;
+			color: #fea785;
 			margin-right: 20rpx;
-			font-size: $font-size-26;
+			font-size: $font-size-22;
 		}
 		.text{
-			font-size: $font-size-26;
-			color: #999999;
+			font-size: $font-size-22;
+			color: #fea785;
 			margin-left: 10rpx;
 		}
 	}
@@ -1007,7 +986,7 @@
 			display: inline-block;
 			float: left;
 			font-size: $font-size-28;
-			color: $text-color;
+			color: #666666;
 		}
 		.name{
 			float: right;
@@ -1015,7 +994,7 @@
 			display: inline-block;
 			float: left;
 			font-size: $font-size-28;
-			color: #999999;
+			color: $text-color;
 			float: right;
 			padding-right: 48rpx;
 			overflow: hidden;
@@ -1157,47 +1136,6 @@
 				}
 			}
 		}
-		.navbar {
-			width: 702rpx;
-			height: 96rpx;
-			padding: 0 24rpx;
-			background: #fff;
-			z-index: 10;
-			display: flex;
-			border-bottom: 1px solid #F8F8F8;
-			&.fixed{
-				position: fixed;
-				left: 0;
-			}
-			.nav-item {
-				display: flex;
-				flex: 1;
-				justify-content: center;
-				align-items: center;
-				height: 96rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				position: relative;
-				float: left;
-				position: relative;
-				.line{
-					width: 60%;
-					height: 2px;
-					border-radius: 1px;
-					background: #FFFFFF;
-					position: absolute;
-					bottom: 0;
-					left: 50%;
-					margin-left: -30%;
-				}
-				&.current{
-					color:$color-system;
-					.line{
-						background: $color-system;
-					}
-				}
-			}
-		}
 		.content{
 			width: 100%;
 			min-height: 750rpx;
@@ -1345,6 +1283,49 @@
 		color: #fff;
 		background-color: #dd524d;
 	}
+	.navbar {
+		width: 100%;
+		height: 80rpx;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		background: rgba(255,230,220,1);
+		z-index: 10;
+		display: flex;
+		position: fixed;
+		opacity: 0;
+		left: 0;
+		&.fixed{
+			opacity: 1;
+		}
+		.nav-item {
+			display: flex;
+			flex: 1;
+			justify-content: center;
+			align-items: center;
+			height: 80rpx;
+			font-size: $font-size-28;
+			color: $text-color;
+			position: relative;
+			float: left;
+			position: relative;
+			.line{
+				width: 60rpx;
+				height: 2px;
+				border-radius: 1px;
+				background: rgba(255,230,220,1);
+				position: absolute;
+				bottom: 0;
+				left: 50%;
+				margin-left: -30rpx;
+			}
+			&.current{
+				color:$color-system;
+				.line{
+					background: $color-system;
+				}
+			}
+		}
+	}
 	/* 加入购物模态层*/
 	@keyframes showPopup {
 		0% {

+ 2 - 2
pages/login/bindOperator.vue

@@ -121,7 +121,7 @@
 							if(response.data.userIdentity ==1){
 								this.$api.navigateTo('/seller/pages/index/index')
 							}else{
-								this.$api.switchTabTo('/pages/tabBar/home/home')
+								this.$api.switchTabTo('/pages/tabBar/home/index')
 							}
 						}).catch(error =>{
 							this.logout()
@@ -227,7 +227,7 @@
 						}
 						sellerBindingOperation(params).then(response =>{
 							this.login(response.data)
-							this.$api.switchTabTo('/pages/tabBar/home/home')
+							this.$api.switchTabTo('/pages/tabBar/home/index')
 						}).catch(error =>{
 							this.$util.msg(error.msg,2000)
 							this.isUserInfo = true

+ 1 - 1
pages/tabBar/cart/cart.vue

@@ -738,7 +738,7 @@
 			},
 			goIndex(){
 				uni.switchTab({
-				    url: '/pages/tabBar/home/home'
+				    url: '/pages/tabBar/home/index'
 				});
 			},
 			goNavto(url){

+ 1 - 1
pages/tabBar/home/home.vue

@@ -397,7 +397,7 @@
 				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
-				// 	path: '/pages/tabBar/home/home',
+				// 	path: '/pages/tabBar/home/index',
 				// 	extraData: {
 				// 		'data1': 'test'
 				// 	},

+ 2 - 2
pages/tabBar/home/index.vue

@@ -134,7 +134,7 @@
 							if(response.data.userIdentity ==1){
 								this.$api.navigateTo('/seller/pages/index/index')
 							}else if(response.data.userIdentity === 3){
-								// this.$api.navigateTo('/supplier/pages/index/index')
+								this.$api.navigateTo('/supplier/pages/index/index')
 							}
 							this.GetHomeFloorInfo()
 							this.getHomeInformation()
@@ -309,7 +309,7 @@
 				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
-				// 	path: '/pages/tabBar/home/home',
+				// 	path: '/pages/tabBar/home/index',
 				// 	extraData: {
 				// 		'data1': 'test'
 				// 	},

+ 1 - 1
pages/user/address/address.vue

@@ -143,7 +143,7 @@
 						this.$util.msg(error.msg,2000);
 						setTimeout(function(){
 							uni.switchTab({
-								url:'/pages/tabBar/home/home'
+								url:'/pages/tabBar/home/index'
 							})
 						},1000)
 					})

+ 2 - 2
pages/user/order/order-cashier.vue

@@ -32,7 +32,7 @@
 				<view class="cash-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '20rpx'}">
 					<view class="btn btn-share" @click="onShareCode">分享订单<view class="tips" v-if="isShareCode">分享码:{{shareCode}}</view></view>
 					<view class="btn btn-query" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderID='+shareOrderID)">查看订单</view>
-					<view class="btn btn-makes" @click="this.$api.switchTabTo('/pages/tabBar/home/home')">继续采购</view>
+					<view class="btn btn-makes" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">继续采购</view>
 				</view>
 			</view>
 		</view>
@@ -162,7 +162,7 @@
 			},
 			goIndex(){
 				uni.switchTab({
-				    url: '/pages/tabBar/home/home'
+				    url: '/pages/tabBar/home/index'
 				});
 			}
 		},

+ 2 - 2
pages/user/order/order-details.vue

@@ -149,7 +149,7 @@
 					this.returnedPurchaseFee = resData.order.returnedPurchaseFee
 				}).catch(error =>{
 					this.$util.modal('提示','订单查询失败,请稍后重试~','确定','',false,() =>{
-						this.$api.switchTabTo('/pages/tabBar/home/home')
+						this.$api.switchTabTo('/pages/tabBar/home/index')
 					})
 				})
 			},
@@ -255,7 +255,7 @@
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
 							if(this.shareType ==='share'){
-								this.$api.switchTabTo('/pages/tabBar/home/home')
+								this.$api.switchTabTo('/pages/tabBar/home/index')
 							}else{
 								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
 							}

+ 1 - 1
pages/user/order/success.vue

@@ -11,7 +11,7 @@
 				</view>
 				<view class="cash-btn">
 					<view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderID='+orderID)">查看订单</view>
-					<view class="btn btn-home" @click="this.$api.switchTabTo('/pages/tabBar/home/home')">继续采购</view>
+					<view class="btn btn-home" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">继续采购</view>
 				</view>
 			</view>
 		</view>

+ 1 - 1
pages/user/setting/password.vue

@@ -160,7 +160,7 @@
 								this.isShowDelModal = false;
 								setTimeout(function(){
 									uni.switchTab({
-										url:'/pages/tabBar/home/home'
+										url:'/pages/tabBar/home/index'
 									})
 								},1000)
 							}

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

@@ -112,7 +112,7 @@
 				this.$api.navigateTo('/second/pages/product/product-list');
 			},
 			gotohome:function(){
-				this.$api.navigateTo('/pages/tabBar/home/home');
+				this.$api.navigateTo('/pages/tabBar/home/index');
 			}
 		},
 		

+ 2 - 2
services/ajax.env.js

@@ -1,8 +1,8 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	// URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
-	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
+	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
     // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'

+ 16 - 0
services/shop.service.js

@@ -14,6 +14,22 @@ export default class ShopService {
 	GetSupplierPyProduct (data = {}) {
 		return this.AjaxService.get({ url:'/supplier/myProduct', data, isLoading: true })
 	}
+	/* 小程序供应商我的店铺详情 */
+	GetSupplierHomeDeatils (data = {}) {
+		return this.AjaxService.get({ url:'/supplier/home/detail', data, isLoading: true })
+	}
+	/* 小程序供应商我的店铺banner */
+	GetSupplierHomeBanner (data = {}) {
+		return this.AjaxService.get({ url:'/supplier/home/images', data, isLoading: true })
+	}
+	/* 小程序供应商我的店铺主推商品 */
+	GetSupplierHomeProduct (data = {}) {
+		return this.AjaxService.get({ url:'/supplier/home/products', data, isLoading: true })
+	}
+	/* 小程序供应商我的店铺全部商品 */
+	GetSupplierHomeProductList (data = {}) {
+		return this.AjaxService.get({ url:'/search/query/product/supplier', data, isLoading: true })
+	}
 	/* 小程序供应商我的订单 */
 	GetSupplierMyOrderList (data = {}) {
 		return this.AjaxService.get({ url:'/supplier/myOrderList', data, isLoading: true })

+ 197 - 68
supplier/pages/user/my-shop.vue

@@ -5,19 +5,19 @@
 			<!-- 轮播 -->
 			<view class="shop-search">
 				<text class="iconfont icon-sousuo"></text>
-				<input class="input" type="text" value="" placeholder="搜索本店铺商品"/>
+				<input class="input" maxlength="20" type="text" value="" v-model.trim="listQuery.keyword" confirm-type="search" @confirm="SubMitSearch()" placeholder="搜索本店铺商品" />
 			</view>
 			<view class="product-supplier" @click="goSupplier">
-				<view class="logo"><img src="https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png" alt=""></view>
+				<view class="logo"><img :src="shopLogo" alt=""></view>
 				<view class="main">
-					<view class="name">北京恩盛众成国际贸易有限公司</view>
+					<view class="name">{{ shopName }}</view>
 					<view class="massgs">
 						<view class="label">满意度:</view>
 						<view class="p-stars">
 							<uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="36" :widthInfo="176"></uni-stars>
 						</view>
 						<view class="acount">
-							<text>50</text>件商品
+							<text> {{ normalNum }} </text>件商品
 						</view>
 					</view>
 				</view>
@@ -28,50 +28,66 @@
 		<view class="container-section tui-skeleton">
 			<view class="tab-title">主推商品</view>
 			<view class="section-product clearfix">
-				<view class="floor-item" v-for="(item, index) in organizeProducts" :key="index" @click.stop="navToDetailPage(item.productID)">
-					<image class="tui-skeleton-fillet" :src="item.mainImage" mode="aspectFill"></image>
+				<view class="floor-item" v-for="(item, index) in recommendList" :key="index" @click.stop="navToDetailPage(item.id)">
+					<image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
 					<view class="floor-item-content">
 						<view class="title tui-skeleton-rect">
 							<text class="mclap">{{item.name}}</text>
 						</view>
-						<!-- <view class="floor-item-act">
-							<template v-if="item.actStatus==1">
-								<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
-									{{item.promotions.name}}<text v-if="hasLogin && item.price1TextFlag != '1'">:¥{{item.price | NumFormat}}</text>
-								</view>
-								<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
-							</template>
-							<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
-								<view class="floor-tags">阶梯价格</view>	
-							</template>	
-						</view> -->	
 						<view class="" v-if="hasLogin">
 							<view v-if="userIdentity == 4">
-								<view class="title-none" v-show="item.price1TextFlag == '1'">
+								<view class="title-none" v-show="item.priceFlag == '1'">
 									<text class="p big">¥未公开价格</text>
 								</view>
-								<view class="title-none" v-show="item.price1TextFlag == '2'">
+								<view class="title-none" v-show="item.priceFlag == '2'">
 									<text class="p big">¥价格仅会员可见</text>
 								</view>
-								<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
+								<view class="price tui-skeleton-rect" v-show="item.priceFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 									<text class="p sm">¥</text>
 									<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+									<template v-if="item.actStatus==1">
+										<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+											{{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
+										</view>
+										<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+									</template>
+									<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+										<view class="floor-tags">阶梯价格</view>	
+									</template>
 								</view>
 							</view>
 							<view v-else>
-								<view class="title-none" v-if="item.price1TextFlag == '1'">
+								<view class="title-none" v-if="item.priceFlag == '1'">
 									<text class="p big">未公开价格</text>
 								</view>
 								<view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 									<text class="p sm">¥</text>
 									<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+									<template v-if="item.actStatus==1">
+										<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+											{{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
+										</view>
+										<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+									</template>
+									<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+										<view class="floor-tags">阶梯价格</view>	
+									</template>
 								</view>
 							</view>
 						</view>
 						<view v-else class="no-price">
 							<view class="p-stars">
 								<text class="p-no">¥</text>
-								<uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
+								<uni-grader :grade="Number(item.priceGrade)"></uni-grader>
+								<template v-if="item.actStatus==1">
+									<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+										{{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
+									</view>
+									<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+								</template>
+								<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+									<view class="floor-tags">阶梯价格</view>	
+								</template>
 							</view>
 						</view>	
 					</view>
@@ -81,50 +97,57 @@
 		<view class="container-section tui-skeleton">
 			<view class="tab-title">全部商品</view>
 			<view class="section-product clearfix">
-				<view class="floor-item" v-for="(item, index) in organizeProducts" :key="index" @click.stop="navToDetailPage(item.productID)">
-					<image class="tui-skeleton-fillet" :src="item.mainImage" mode="aspectFill"></image>
+				<view class="floor-item" v-for="(item, index) in productList" :key="index" @click.stop="navToDetailPage(item.p_id)">
+					<image class="item-img tui-skeleton-fillet" :src="item.p_image" mode="aspectFill"></image>
 					<view class="floor-item-content">
 						<view class="title tui-skeleton-rect">
-							<text class="mclap">{{item.name}}</text>
+							<text class="mclap">{{item.p_name}}</text>
 						</view>
-						<!-- <view class="floor-item-act">
-							<template v-if="item.actStatus==1">
-								<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
-									{{item.promotions.name}}<text v-if="hasLogin && item.price1TextFlag != '1'">:¥{{item.price | NumFormat}}</text>
-								</view>
-								<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
-							</template>
-							<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
-								<view class="floor-tags">阶梯价格</view>	
-							</template>	
-						</view> -->	
 						<view class="" v-if="hasLogin">
 							<view v-if="userIdentity == 4">
-								<view class="title-none" v-show="item.price1TextFlag == '1'">
+								<view class="title-none" v-show="item.p_price_flag == '1'">
 									<text class="p big">¥未公开价格</text>
 								</view>
-								<view class="title-none" v-show="item.price1TextFlag == '2'">
+								<view class="title-none" v-show="item.p_price_flag == '2'">
 									<text class="p big">¥价格仅会员可见</text>
 								</view>
-								<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
+								<view class="price tui-skeleton-rect" v-show="item.p_price_flag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 									<text class="p sm">¥</text>
 									<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+									<template v-if="item.actStatus==1">
+										<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+											{{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
+										</view>
+										<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+									</template>
+									<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+										<view class="floor-tags">阶梯价格</view>	
+									</template>
 								</view>
 							</view>
 							<view v-else>
-								<view class="title-none" v-if="item.price1TextFlag == '1'">
+								<view class="title-none" v-if="item.p_price_flag == '1'">
 									<text class="p big">未公开价格</text>
 								</view>
 								<view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 									<text class="p sm">¥</text>
 									<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+									<template v-if="item.actStatus==1">
+										<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+											{{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
+										</view>
+										<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+									</template>
+									<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+										<view class="floor-tags">阶梯价格</view>	
+									</template>
 								</view>
 							</view>
 						</view>
 						<view v-else class="no-price">
 							<view class="p-stars">
 								<text class="p-no">¥</text>
-								<uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
+								<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
 							</view>
 						</view>	
 					</view>
@@ -139,30 +162,41 @@
 <script>
 	import { mapState,mapMutations} from 'vuex';
 	import banner from '@/components/cm-module/supplier/banner.vue'
-	import uniStars from '@/components/uni-stars/uni-stars.vue'
+	import uniGrader from '@/components/uni-grade/uni-grade.vue'
 	import authorize from '@/common/config/authorize.js'
 	
 	export default {
 		components:{
 			banner,
-			uniStars
+			uniGrader
 		},
 		data() {
 			return {
 				userID:0,
+				shopId:0,
 				iconClass:'icon-aixin',
 				iconColor:'#ff9100',
 				isScrollTop:false,
-				bannerImageList:[
-					{image:'https://m.360buyimg.com/mobilecms/s700x280_jfs/t1/114550/12/7437/102254/5ec3971fE78db18f4/438d4775f9d653ee.jpg!q70.jpg.dpg'},
-					{image:'https://m.360buyimg.com/mobilecms/s700x280_jfs/t1/126187/19/17323/149042/5fa13ef1E6bc65f5b/8fbecafdbf0e4736.jpg!q70.jpg.dpg'},
-					{image:'https://m.360buyimg.com/mobilecms/s700x280_jfs/t1/126522/38/16493/151268/5f9940bfE9bf4ce43/b9a09e36102a9667.jpg!q70.jpg.dpg'}
-				],
-				organizeProducts:[]
+				shopName:'',
+				shopLogo:'',
+				normalNum:0,
+				bannerImageList:[],
+				recommendList:[],
+				productList:[],
+				listQuery:{
+					keyword: '',
+					pageSize: 10,
+					pageNum: 1,
+					id:0
+				},
+				total:0
 			}
 		},
-		onLoad() {
-			
+		onLoad(option) {
+			this.listQuery.id = this.shopId = option.shopId
+			console.log(this.shopId)
+			console.log(this.listQuery.id)
+			this.InitShopDataInfo()
 		},
 		filters: {
 			NumFormat:function(text) {//处理金额
@@ -174,39 +208,125 @@
 		},
 		methods: {
 			...mapMutations(['login','logout']),
-			getOrganizeProducts(){//获取模块三商品
-				this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:4}).then(res =>{
-					this.organizeProducts = res.data.results
-					this.getProductPrice()
+			InitShopDataInfo(){//初始化请求数据
+				this.GetSupplierHomeBanner()
+				this.GetSupplierHomeDeatils()
+				this.GetSupplierHomeProduct()
+				this.GetSupplierHomeProductList()
+			},
+			GetSupplierHomeBanner(){//轮播图
+				this.ShopService.GetSupplierHomeBanner({supplierId:this.shopId}).then(response =>{
+					this.bannerImageList = response.data;
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetSupplierHomeDeatils(){//商铺详情
+				this.ShopService.GetSupplierHomeDeatils({supplierId:this.shopId}).then(response =>{
+					let data = response.data
+					this.normalNum = data.normalNum
+					this.shopName = data.name
+					this.shopLogo = data.logo
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetSupplierHomeProduct(){//主推商品
+				this.ShopService.GetSupplierHomeProduct({supplierId:this.shopId}).then(response =>{
+					let data = response.data
+					this.QueryProductPrice(data)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetSupplierHomeProductList(){//全部商品
+				this.ShopService.GetSupplierHomeProductList(this.listQuery).then(response =>{
+					let data = JSON.parse(response.data)
+					let dataList = data.items
+					console.log(data)
+					this.total = data.total
+					this.productList = dataList
+					this.QueryProductPrice1(this.productList)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetMoreSupplierHomeProductList(){//加载分页
+				this.listQuery.pageNum +=1
+				this.ShopService.GetSupplierHomeProductList(this.listQuery).then(response =>{
+					let data = JSON.parse(response.data)
+					console.log(data)
+					this.total = data.total
+					this.productList = this.productList.concat(data.items) 
+					this.QueryProductPrice1(this.productList)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			getProductPrice(){//获取商品或者活动价格
+			QueryProductPrice(data){//处理主推商品商品或者活动价格
 				let productIdArr = [];
 				let productIds ='';
-				this.organizeProducts.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
-					productIdArr.push(item.productID)
+				data.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.id)
 				})
 				productIds = productIdArr.join(",");
 				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
-					this.organizeProducts = this.ReturnNewProducts(this.organizeProducts,response.data);
-					this.skeletonShow = false;
+					this.recommendList = this.ReturnNewProducts(data,response.data);
+					console.log(this.recommendList)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			ReturnNewProducts(Array,list){
+			QueryProductPrice1(data){//获取商品或者活动价格
+				let productIdArr = [];
+				let productIds ='';
+				data.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.p_id)
+				})
+				productIds = productIdArr.join(",");
+				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
+					this.productList = this.ReturnNewProducts1(data,response.data);
+					console.log(this.productList)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ReturnNewProducts(listA,listB){
 				let NewArray = []
-				Array.map(item=>{
-					for (let i = 0; i < list.length; i++) {
-						if( item.productID == list[i].productId ){
-							NewArray.push(Object.assign(item,list[i])) 
+				listA.map(item=>{
+					for (let i = 0; i < listB.length; i++) {
+						if( item.id == listB[i].productId ){
+							NewArray.push(Object.assign(item,listB[i])) 
 						}
 					}
 				});
 				return NewArray
 			},
+			ReturnNewProducts1(listA,listB){
+				let NewArray = []
+				listA.map(item=>{
+					for (let i = 0; i < listB.length; i++) {
+						if( item.p_id == listB[i].productId ){
+							NewArray.push(Object.assign(item,listB[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
+			SubMitSearch() {//搜索
+				if (this.searchInputVal == '') {
+					this.$util.msg('请输入商品关键词',2000);
+				}else{
+					this.listQuery.pageNum = 1
+					this.GetSupplierHomeProductList()
+				}
+			},	
+			goSupplier(){//跳供应商资料页
+				this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+this.shopId)
+			},
+			navToDetailPage(id) {//跳转商品详情页
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+			}
 		},
 		onPageScroll(e){//实时获取到滚动的值
 			if(e.scrollTop>400){
@@ -216,11 +336,20 @@
 			}	
 		},
 		onPullDownRefresh() {//下拉刷新
-			this.getHomeInformation()
+			this.listQuery.pageNum = 1
+			this.productList =[]
+			this.InitShopDataInfo()
 			uni.stopPullDownRefresh()
 		},
+		onReachBottom() {//上滑加载分页
+			if(this.total > this.productList.length){
+				this.loadding = true
+				this.pullUpOn = true
+				this.GetMoreSupplierHomeProductList()
+			}	
+		},
 		onShow(){
-			this.getOrganizeProducts()
+			
 		}
 	}
 </script>
@@ -368,7 +497,7 @@
 				&:nth-child(2n){
 					margin-right: 0;
 				}
-				image{
+				.item-img{
 					width: 341rpx;
 					height: 341rpx;
 					border-radius: 2rpx 2rpx 0 0;

+ 18 - 15
supplier/pages/user/operator/list.vue

@@ -2,8 +2,8 @@
 	<view class="container operator clearfix">
 		<view class="operator-top clearfix">
 			<view class="operator-title">
-				<view class="head"><image :src="clubImage == null ? '../../../static/temp/icon-club@3x.png' : clubImage" mode=""></image></view>
-				<view class="title">{{clubName}}</view>
+				<view class="head"><image :src="shopLogo == null ? '../../../static/temp/icon-club@3x.png' : shopLogo" mode=""></image></view>
+				<view class="title">{{shopNmae}}</view>
 			</view>
 			<view class="operator-search">
 				<view class="search-wrap">
@@ -92,16 +92,12 @@
 		},
 		data() {
 			return {
-				clubID:'',
-				clubName:'',
-				clubImage:'',
-				linkman:'',
-				clubMobile:'',
+				shopId:'',
+				shopNmae:'',
+				shopLogo:'',
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
 				userID:'',
-				pageNum:1,
-				pageSize:10,
 				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
@@ -115,7 +111,13 @@
 				isOperatorModel:false,
 				operatorList:[],
 				isIphoneX:this.$store.state.isIphoneX,
-				modelData:''
+				modelData:'',
+				listQuery:{
+					linkman:'',
+					clubMobile:'',
+					pageNum:1,
+					pageSize:10,
+				}
 			}
 		},
 		onLoad(){				
@@ -282,12 +284,13 @@
 			}	
 		},
 		onShow() {
-			this.$api.getComStorage('clubInfo').then(response =>{
-				this.clubID = response.clubID
-				this.clubName = response.name
-				this.clubImage = response.image
+			this.$api.getComStorage('shopInfo').then(response =>{
+				console.log(response)
+				this.shopId = response.shopID
+				this.shopName = response.name
+				this.shopLogo = response.logo
 				this.pageNum = 1;
-				this.initOperatorList();
+				// this.initOperatorList();
 			})
 		}
 	}

+ 7 - 9
pages/goods/supplier.vue → supplier/pages/user/supplier.vue

@@ -1,34 +1,32 @@
 <template>
 	<view class="container all-type-list-wrapper">
-		<supplier-details :shop="shopInfo" v-if="isLoading"></supplier-details>
+		<supplier-details :shopId="shopId" v-if="isLoading"></supplier-details>
 	</view>
 </template>
 
 <script>
-	import supplierDetails from "@/components/cm-module/productDetails/supplierDetails" //供应商详情
+	import supplierDetails from "@/components/cm-module/supplier/supplierDetails.vue" //供应商详情
 	export default{
 		components:{
 			supplierDetails
 		},
 		data(){
 			return{
+				shopId:0,
 				shopInfo:{},
 				isLoading:false
 			}
 		},		
 		onLoad(option) {
-			
+			console.log(option.shopId)
+			this.shopId = option.shopId
+			this.isLoading = true
 		},
 		methods:{
 			
 		},
 		onShow() {
-			this.$api.getComStorage('supplierInfo').then((resolve) =>{
-				this.shopInfo = resolve
-				this.isLoading = true
-			}).catch(reject =>{
-				console.log('异常处理=========>',reject)
-			})
+
 		}
 	}
 </script>