zhengjinyi 4 年之前
父节点
当前提交
d37941cfba
共有 48 个文件被更改,包括 1226 次插入2070 次删除
  1. 0 69
      api/operator.js
  2. 0 45
      api/other.js
  3. 0 214
      api/product.js
  4. 17 0
      api/utils.js
  5. 2 2
      common/config/config.js
  6. 38 5
      components/cm-custom/custom-p.vue
  7. 1 2
      components/cm-module/cm-seller/category.vue
  8. 52 23
      components/cm-module/cm-seller/home.vue
  9. 38 5
      components/cm-module/headerNavbar/header-poduct.vue
  10. 1 1
      components/cm-module/homeIndex/banner.vue
  11. 39 7
      components/cm-module/homeIndex/hotProduct.vue
  12. 1 1
      components/cm-module/homeIndex/pagesProduct.vue
  13. 1 1
      components/cm-module/homeIndex/specialProduct.vue
  14. 1 2
      components/cm-module/listTemplate/buyagainList.vue
  15. 0 1
      components/cm-module/listTemplate/classifyProductList.vue
  16. 28 9
      components/cm-module/listTemplate/commodityList.vue
  17. 1 2
      components/cm-module/listTemplate/immediatelyList.vue
  18. 1 2
      components/cm-module/listTemplate/productList.vue
  19. 33 1
      components/cm-module/productDetails/cm-price.vue
  20. 2 3
      components/cm-module/productDetails/evaluate.vue
  21. 177 0
      components/cm-module/productDetails/instrument-recommend.vue
  22. 0 1
      components/cm-module/productDetails/recommend.vue
  23. 0 1
      components/cm-module/productDetails/secondDeatail.vue
  24. 0 1
      components/cm-module/productDetails/secondRecommend.vue
  25. 1 1
      components/cm-module/supplier/banner.vue
  26. 1 2
      components/cm-module/supplier/category.vue
  27. 52 23
      components/cm-module/supplier/home.vue
  28. 4 3
      components/cm-module/supplier/user.vue
  29. 29 896
      pages/goods/instrument-details.vue
  30. 8 6
      pages/goods/product.vue
  31. 71 149
      pages/search/search-instrument.vue
  32. 89 215
      pages/search/search-supplier.vue
  33. 59 53
      pages/search/search.vue
  34. 1 2
      pages/tabBar/category/category.vue
  35. 2 15
      pages/tabBar/home/index.vue
  36. 2 3
      pages/user/invoice/invoice.vue
  37. 10 10
      pages/user/operator/addoperator.vue
  38. 16 18
      pages/user/operator/list.vue
  39. 1 2
      seller/pages/cart/immediately.vue
  40. 0 1
      seller/pages/cart/second.vue
  41. 4 10
      seller/pages/search/search.vue
  42. 2 2
      services/ajax.env.js
  43. 50 3
      services/product.service.js
  44. 4 0
      services/shop.service.js
  45. 16 0
      services/user.service.js
  46. 292 183
      supplier/pages/user/my-shop.vue
  47. 26 31
      supplier/pages/user/operator/addoperator.vue
  48. 53 44
      supplier/pages/user/operator/list.vue

+ 0 - 69
api/operator.js

@@ -1,69 +0,0 @@
-/**
- *@des 运营人员管理接口
- *@author zhengjinyi
- *@date 2020/03/19 14:56:57
- *@param registerByPass
- */
-import request from '@/common/config/caimeiApi.js'
-import $reg from '@/common/config/common.js'
-
-/**
- *获取运营人员管理列表
- *@param status
- *@param pageNum
- *@param pageSize
- */
-export function queryOperatorList(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/operation/list',params, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *添加运营人员
- */
-export function addOperator(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/operation/add',params,true, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *删除运营人员
- */
-export function deleteOperator(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/operation/delete',params,true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *更新邀请码
- */
-export function updateCode(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/operation/updateInvitationCode',params,true, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-

+ 0 - 45
api/other.js

@@ -36,48 +36,3 @@ export function protocolAgree(params) {
 		})
 	})
 }
-/**
- *@发票信息回显
- *@param
- */
-export function queryInvoice(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/personalCenter/findInvoice',params, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@发票信息保存
- *@param
- */
-export function querySaveInvoice(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/personalCenter/invoice',params, true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@售后条款内容
- *@param
- */
-export function querySaveClause(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/clause',params, true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}

+ 0 - 214
api/product.js

@@ -1,214 +0,0 @@
-/**
- *@des 商品模块接口
- *@author zhengjinyi
- *@date 2020/03/19 14:56:57
- *@param registerByPass
- */
-import request from '@/common/config/caimeiApi.js'
-import $reg from '@/common/config/common.js'
-
-/**
- * 获取分类导航
- */
-export function queryGoodscategory() {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/classify",{}, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @三级分类下的商品列表
- * @param:tinyTypeID 三级分类ID
- * @param:pageNum	页码
- * @param:pageSize	每页显示条数
- */
-export function queryGoodslist(url,params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet(url,params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @新分类下的商品列表
- * @param:tinyTypeID 三级分类ID
- * @param:pageNum	页码
- * @param:pageSize	每页显示条数
- */
-export function searchQueryTinyType(url,params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet(url,params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @商品搜索
- * @param:userId 用户ID
- * @param:searchWord 关键词
- * @param:pageNum	页码
- * @param:pageSize	每页显示条数
- */
-export function querySearchProduct(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet("/product/search",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @新商品搜索
- * @param:keyword 关键词
- * @param:pageNum	页码
- * @param:pageSize	每页显示条数
- * @param:sortField	价格排序
- * @param:sortType	类型排序
- */
-export function queryNewSearchProduct(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet("/search/query/product",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @新商品搜索查询商品阶梯价格
- * @param:productIds 商品ID
- * @param:userId	用户ID
- */
-export function querySearchProductLadderPrice(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/ladderPrice",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @搜索历史记录
- * @param:userId 用户ID
- */
-export function querySearchHistory(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/searchHistory",params, res => {
-			resolve(res);
-		})
-	});
-}
-/**
- * @添加搜索历史记录
- * @param:userId 用户ID
- * @param:keyword 用户ID
- */
-export function searchHistoryAdd(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/history/add",params, res => {
-			resolve(res);
-		})
-	});
-}
-
-/**
- * @清除历史记录
- * @param:userId 用户ID
- */
-export function clearSearchHistory(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet("/product/searchHistory/delete",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @商品相关推荐
- * @param:productID 商品ID
- */
-export function queryRelevant(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/relevant",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @商品评价
- * @param:productID 商品ID
- */
-export function queryEvaluate(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/evaluate",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @再次购买商品列表
- * @param:userId  用户ID
- * @param:pageNum 页码
- * @param:pageSize 每页条数
- */
-export function queryAgaingoodslist(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet("/repeat/buyAgain",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @加入购物车
- * @param:
- * @param:pageNum 页码
- * @param:pageSize 每页条数
- */
-export function addCart(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product//preferred",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-

+ 17 - 0
api/utils.js

@@ -23,6 +23,23 @@ export function queryAddressInformation() {
 		})
 	});
 }
+/**
+ * @新分类下的商品列表
+ * @param:tinyTypeID 三级分类ID
+ * @param:pageNum	页码
+ * @param:pageSize	每页显示条数
+ */
+export function searchQueryTinyType(url,params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet(url,params, res => {
+			if(res.code == 0){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
 /**
  *获取协议
  */

+ 2 - 2
common/config/config.js

@@ -1,10 +1,10 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	URL_CONFIG = 'http://192.168.2.68: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-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境

+ 38 - 5
components/cm-custom/custom-p.vue

@@ -1,13 +1,16 @@
 <template name="headerNavbar">
 	<!-- 自定义导航栏 -->
 	<view class='navbar-wrap' :class="[headerColor? 'bg-color' : 'no-color']" :style="{height:navbarHeight+'px',paddingTop:statusBarHeight+'px'}"> 
-	  	<view class="navbar-text" :style="{lineHeight:(navbarHeight - statusBarHeight)+'px;',fontSize:fontSizeSetting+'px;'}">
-	    	{{navbarData.title ? navbarData.title : " "}}
-	  	</view>
 	  	<view class="navbar-icon" v-if="navbarData.showCapsule ? navbarData.showCapsule : true" 
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',lineHeight:navbarBtn.height+'px;',left:(navbarBtn.right+5)+'px;',width:navbarBtn.height+'px;',height:navbarBtn.height+'px;'}">
 			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
 			  <text v-else  @click="_goHome" class="iconfont icon-shouye"></text>
+	  	</view>
+		<view class="navbar-text" :style="{height:navbarBtn.height+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	<view class="gosearch-btn" :style="{paddingLeft:navbarBtn.height+'px;',top:5+'px;',left:(navbarBtn.right+navbarBtn.height+20)+'px;',borderRadius:navbarBtn.height/2+'px;',width:200+'px;',lineHeight:navbarBtn.height+'px;'}">
+				<text class="iconfont icon-sousuo":style="{width:navbarBtn.height+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}"></text>
+				<view class="input" @click="this.$api.navigateTo(clickPath)">搜索项目仪器</view>
+			</view>
 	  	</view>
 	</view>
 </template>
@@ -42,6 +45,7 @@
 		data() {
 			return{
 				headerType:'',
+				clickPath:'/pages/search/search-instrument',
 				haveBack: true, // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
 			    statusBarHeight: 0, // 状态栏高度
 			    navbarHeight: 0, // 顶部导航栏高度,
@@ -130,18 +134,47 @@
 		 }
 	}
 	.navbar-text {
-		 text-align: center;
 		 color: #000000;
 		 font-weight: 500;
+		 position: relative;
+	}
+	.gosearch-btn{
+		height: 100%;
+		background: rgba(255, 255, 255, 0.6);
+		font-size: 28rpx;
+		color: #666666;
+		position: relative;
+		box-sizing: border-box;
+		position:absolute ;
+		border: 1px solid rgba(0, 0, 0, 0.1);
+		.icon-sousuo{
+			height: 100%;
+			text-align: center;
+			display: block;
+			position: absolute;
+			left: 0;
+			top: 0;
+			font-size: 34rpx;
+			color: #666666;
+			z-index: 10;
+		}
+		.input{
+			width: 400rpx;
+			height: 100%;
+			float: left;
+			font-size: $font-size-24;
+			text-align: left;
+		}
 	}
 	.navbar-icon {
 		 position: fixed;
 		 display: flex;
 		 border-radius: 50%;
 		 text-align: center;
-		 background: rgba(255,255,255,0.2);
+		 background: rgba(255,255,255,0.6);
 		 border: 1px solid rgba(0,0,0, 0.1);
 		 box-sizing: border-box;
+		 z-index: 9999;
 	}
 	.navbar-icon .iconfont {
 		 height: 100%;

+ 1 - 2
components/cm-module/cm-seller/category.vue

@@ -39,7 +39,6 @@
 </template>
 <script>
 	import btSearch from '@/components/uni-search/bt-search.vue'
-	import { queryGoodscategory } from "@/api/product.js"
 
 	export default {
 		components: {
@@ -78,7 +77,7 @@
 			},
 			// 获取商品分类列表
 			getProductCate () {
-				queryGoodscategory().then(res =>{
+				this.ProductService.GetProductClassify().then(res =>{
 					this.categoryList = res.data
 					// 查询第一个拥有二级菜单的子菜单
 					for (let i = 0; i < this.categoryList.length; i++) {

+ 52 - 23
components/cm-module/cm-seller/home.vue

@@ -11,13 +11,13 @@
 		</view>	
 		<view class="container-section tui-skeleton">
 			<!-- 推荐专区 -->
-			<hot-product :list="organizeProducts" :userIdentity="userIdentity" v-if="isRequest"></hot-product>
+			<hot-product :list="RecommendList" :userIdentity="userIdentity" v-if="isRequest"></hot-product>
 			<!-- 楼层 -->
-			<pages-product v-if="isRequest"></pages-product>
+			<pages-product :list="pagesList" v-if="isRequest"></pages-product>
 			<!-- 商品专题 -->
-			<special-product v-if="isRequest"></special-product>
+			<special-product :list="specialList" :listB="specialProList" v-if="isRequest"></special-product>
 			<!-- 供应商专题 -->
-			<supplier-list v-if="isRequest"></supplier-list>
+			<supplier-list :list="supplierList" v-if="isRequest"></supplier-list>
 		</view>
 		<!-- 侧边 -->
 		<scroll-top v-if="isScrollTop"></scroll-top>
@@ -69,11 +69,15 @@
 				mode:'round',
 				modallayer:false,
 				isLogin:false,
-				bannerImageList:[],
-				navBarsList:[],
 				skeletonShow: true,
 				userIdentity:'',
+				bannerImageList:[],//轮播
+				navBarsList:[],//导航分类
+				pagesList:[],//楼层
 				RecommendList:[],//热门推荐
+				specialList:[],//商品专题轮播
+				specialProList:[],//商品专题商品
+				supplierList:[],//供应商列表
 				organizeProducts:[],//常用商品
 				productsClassifyList:[
 					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
@@ -104,6 +108,8 @@
 		created() {
 			this.$api.getStorage().then((resolve) =>{
 				this.userID = resolve.userID
+				this.userIdentity = resolve.userIdentity
+				this.GetHomeFloorInfo()
 				this.getHomeInformation()
 			})
 		},
@@ -117,6 +123,37 @@
 		},
 		methods: {
 			...mapMutations(['login','logout']),
+			GetHomeInit(){//金刚区分类
+				this.CommonService.GetHomeInit({}).then(response =>{
+					let data = response.data
+					this.navBarsList = data.topMenuList
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetHomeFloorInfo(){//初始化首页楼层数据
+				this.CommonService.GetHomeFloorInfo({}).then(response =>{
+					let data = response.data
+					data.forEach((item,index) => {
+						switch(item.type){
+							case 3:
+								this.supplierList = item.floorData
+								break;	
+							case 4:
+								this.specialList = item.floorData
+								break;	
+							case 5:
+								this.specialProList = item.floorData
+								break;	
+							case 6:
+								this.pagesList = item.subFloors
+								break;
+						}
+					})
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
 			getHomeInformation(){//初始化首页数据	
 				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
 					let data = res.data;
@@ -129,35 +166,27 @@
 					this.thirdModulesName= data.thirdModulesName
 					this.productsClassifyList = data.productsClassifyList
 					this.$store.commit('updateAllNum',data.shoppingCartCount)
-					this.getOrganizeProducts()				
+					this.GetHomeInit();
+					this.GetHomeRecommendInfo()
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetHomeRecommendInfo(){//首页热门推荐
 				this.CommonService.GetHomeRecommendInfo().then(response =>{
-					this.RecommendList=response.data
-					this.getProductPrice()
-				})
-			},
-			getOrganizeProducts(){//获取模块三商品
-				this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:6}).then(res =>{
-					this.organizeProducts = res.data.results
-					this.getProductPrice()
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
+					this.RecommendList = response.data
+					this.GetProductPrice()
 				})
 			},
-			getProductPrice(){//获取商品或者活动价格
+			GetProductPrice(){//获取商品或者活动价格
 				let productIdArr = [];
 				let productIds ='';
-				this.organizeProducts.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
-					productIdArr.push(item.productID)
+				this.RecommendList.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);
-					console.log(this.organizeProducts)
+					this.RecommendList = this.ReturnNewProducts(this.RecommendList,response.data);
 					this.skeletonShow = false;
 					this.isRequest = true
 				}).catch(error =>{
@@ -168,7 +197,7 @@
 				let NewArray = []
 				Array.map(item=>{
 					for (let i = 0; i < list.length; i++) {
-						if( item.productID == list[i].productId ){
+						if( item.id == list[i].productId ){
 							NewArray.push(Object.assign(item,list[i])) 
 						}
 					}

+ 38 - 5
components/cm-module/headerNavbar/header-poduct.vue

@@ -1,13 +1,16 @@
 <template name="headerNavbar">
 	<!-- 自定义导航栏 -->
 	<view class='navbar-wrap' :class="[headerColor? 'bg-color' : 'no-color']" :style="{height:navbarHeight+'px',paddingTop:statusBarHeight+'px'}"> 
-	  	<view class="navbar-text" :style="{lineHeight:(navbarHeight - statusBarHeight)+'px;',fontSize:fontSizeSetting+'px;'}">
-	    	{{navbarData.title ? navbarData.title : " "}}
-	  	</view>
 	  	<view class="navbar-icon" v-if="navbarData.showCapsule ? navbarData.showCapsule : true" 
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',lineHeight:navbarBtn.height+'px;',left:(navbarBtn.right+5)+'px;',width:navbarBtn.height+'px;',height:navbarBtn.height+'px;'}">
 			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
 			  <text v-else  @click="_goHome" class="iconfont icon-shouye"></text>
+	  	</view>
+		<view class="navbar-text" :style="{height:navbarBtn.height+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	<view class="gosearch-btn" :style="{paddingLeft:navbarBtn.height+'px;',top:5+'px;',left:(navbarBtn.right+navbarBtn.height+20)+'px;',borderRadius:navbarBtn.height/2+'px;',width:200+'px;',lineHeight:navbarBtn.height+'px;'}">
+				<text class="iconfont icon-sousuo":style="{width:navbarBtn.height+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}"></text>
+				<view class="input" @click="this.$api.navigateTo(clickPath)">搜索采美商品</view>
+			</view>
 	  	</view>
 	</view>
 </template>
@@ -42,6 +45,7 @@
 		data() {
 			return{
 				headerType:'',
+				clickPath:'/pages/search/search',
 				haveBack: true, // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
 			    statusBarHeight: 0, // 状态栏高度
 			    navbarHeight: 0, // 顶部导航栏高度,
@@ -130,18 +134,47 @@
 		 }
 	}
 	.navbar-text {
-		 text-align: center;
 		 color: #000000;
 		 font-weight: 500;
+		 position: relative;
+	}
+	.gosearch-btn{
+		height: 100%;
+		background: rgba(255, 255, 255, 0.6);
+		font-size: 28rpx;
+		color: #666666;
+		position: relative;
+		box-sizing: border-box;
+		position:absolute ;
+		border: 1px solid rgba(0, 0, 0, 0.1);
+		.icon-sousuo{
+			height: 100%;
+			text-align: center;
+			display: block;
+			position: absolute;
+			left: 0;
+			top: 0;
+			font-size: 34rpx;
+			color: #666666;
+			z-index: 10;
+		}
+		.input{
+			width: 400rpx;
+			height: 100%;
+			float: left;
+			font-size: $font-size-24;
+			text-align: left;
+		}
 	}
 	.navbar-icon {
 		 position: fixed;
 		 display: flex;
 		 border-radius: 50%;
 		 text-align: center;
-		 background: rgba(255,255,255,0.2);
+		 background: rgba(255,255,255,0.6);
 		 border: 1px solid rgba(0,0,0, 0.1);
 		 box-sizing: border-box;
+		 z-index: 9999;
 	}
 	.navbar-icon .iconfont {
 		 height: 100%;

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

@@ -65,7 +65,7 @@
 				 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}`,
+					 	2:`/pages/search/search-instrument?keyword=${floor.title}`,
 					 	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}`,

+ 39 - 7
components/cm-module/homeIndex/hotProduct.vue

@@ -1,7 +1,7 @@
 <template name="hotProduct">
 	<view>
 		<view class="container clearfix">
-			<view class="title">推荐专区</view>
+			<view class="title">推荐专区{{ userIdentity }}</view>
 			<view class="recommend-list">
 				<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">
@@ -12,7 +12,7 @@
 									<text class="mclap">{{item.name}}</text>
 								</view>
 								<view class="" v-if="hasLogin">
-									<view v-if="userIdentity == 4">
+									<template v-if="userIdentity == 4">
 										<view class="title-none" v-show="item.price1TextFlag == '1'">
 											<text class="p big">¥未公开价格</text>
 										</view>
@@ -32,8 +32,36 @@
 												<view class="floor-tags">阶梯价格</view>	
 											</template>
 										</view>
-									</view>
-									<view v-else>
+									</template>
+									<template v-if="userIdentity == 3">
+										<template v-if="item.supplierId == shopId">
+											<view class="title-none" v-if="item.price1TextFlag == '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.price1TextFlag != '1'">:¥{{item.price | NumFormat}} {{ shopId }}{{item.supplierId }}</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>
+										</template>	
+										<template v-else>
+											<view class="no-price">
+												<view class="p-stars">
+													<text class="p-no">¥</text>
+													<uni-grader :grade="Number(item.priceGrade)"></uni-grader>
+												</view>
+											</view>	
+										</template>
+									</template>
+									<template v-else>
 										<view class="title-none" v-if="item.price1TextFlag == '1'">
 											<text class="p big">未公开价格</text>
 										</view>
@@ -50,13 +78,12 @@
 												<view class="floor-tags">阶梯价格</view>	
 											</template>
 										</view>
-									</view>
+									</template>
 								</view>
 								<view v-else class="no-price">
 									<view class="p-stars">
 										<text class="p-no">¥</text>
 										<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>
@@ -106,6 +133,7 @@
 				swiperCurrent:0,
 				hotProductList:[],
 				pageSize:4,
+				shopId:0
 			}
 		},
 		filters: {
			NumFormat:function(text) {//处理金额
				return Number(text).toFixed(2);
			},
		},
@@ -117,6 +145,10 @@
 		},
 		methods:{
 			initData(res){
+				this.$api.getStorage().then((resolve) =>{
+					this.shopId = resolve.shopID
+					console.log(this.shopId)
+				})
 				if(res.length>0){
 					for (var i = 0, j = res.length; i < j; i += this.pageSize) {
 						this.hotProductList.push(res.slice(i, i + this.pageSize));
@@ -228,7 +260,7 @@
 					.title-none{
 						font-size: $font-size-26;
 						color: #FF2A2A;
-						line-height: 44rpx;
+						line-height: 70rpx;
 						.btn{
 							display: inline-block;
 							float: right;

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

@@ -64,7 +64,7 @@
 				 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}`,
+					 	2:`/pages/search/search-instrument?keyword=${floor.title}`,
 					 	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}`,

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

@@ -69,7 +69,7 @@
 				 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}`,
+					 	2:`/pages/search/search-instrument?keyword=${floor.title}`,
 					 	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}`,

+ 1 - 2
components/cm-module/listTemplate/buyagainList.vue

@@ -64,7 +64,6 @@
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import cmDrag from '@/components/cm-custom/cm-drag.vue'
-	import { queryAgaingoodslist } from "@/api/product.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'productList',
@@ -134,7 +133,7 @@
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
 				let params = {userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
-				queryAgaingoodslist(params).then(response =>{
+				this.ProductService.GetRepeatBuyAgainProductList(params).then(response =>{
 					this.isShowWrapper = true
 					const responseData = response.data.pageDate;
 					if(responseData.results && responseData.results.length > 0){

+ 0 - 1
components/cm-module/listTemplate/classifyProductList.vue

@@ -76,7 +76,6 @@
 	import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import { searchQueryTinyType} from "@/api/product.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'CommodityList',

+ 28 - 9
components/cm-module/listTemplate/commodityList.vue

@@ -20,15 +20,15 @@
 							<view class="floor-tags">阶梯价格</view>	
 						</view>
 						<view v-if="hasLogin" class="list-price">
-							<view v-if="userIdentity == 1">
+							<template v-if="userIdentity == 1">
 								<text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
 								<template v-else>
 									<text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
 									</text>
 								</template>
-							</view>	
-							<view v-if="userIdentity == 4">
+							</template>	
+							<template v-if="userIdentity == 4">
 								<view class="price-larger" v-if="item.p_price_flag == '1'">
 									<text class="txt">¥未公开价格</text>
 								</view>
@@ -41,8 +41,25 @@
 										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
 									</text>
 								</template>
-							</view>
-							<view v-if="userIdentity == 2">
+							</template>
+							<template v-if="userIdentity == 3">
+								<template v-if="item.supplierId == shopId">
+									<view class="price-larger" v-if="item.p_price_flag == '1'">
+										<text class="txt">¥未公开价格</text>
+									</view>
+									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
+									<text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
+										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
+									</text>
+								</template>
+								<template v-else>
+									<view  class="list-login-now">
+										<text class="p-no">¥</text>
+										<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
+									</view>
+								</template>
+							</template>
+							<template v-if="userIdentity == 2">
 								<view class="price-larger" v-if="item.p_price_flag == '1'">
 									<text class="txt">¥未公开价格</text>
 								</view>
@@ -52,7 +69,7 @@
 										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
 									</text>
 								</template>
-							</view>
+							</template>
 						</view>	
 						<view  v-else class="list-login-now">
 							<text class="p-no">¥</text>
@@ -79,15 +96,15 @@
 <script>
 	import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
 	import modalLayer from "@/components/modal-layer"
-	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import { searchQueryTinyType} from "@/api/product.js"
+	import uniGrader from '@/components/uni-grade/uni-grade.vue'
+	import { searchQueryTinyType} from "@/api/utils.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'CommodityList',
 		components:{
 			listSkeleton,
 			modalLayer,
-			uniStars
+			uniGrader
 		},
 		props: {
 			emptyText: {
@@ -108,6 +125,7 @@
 				showSkeleton: true,
 				showEmpty: false,
 				userID:0,
+				shopId:0,
 				userIdentity:'',
 				priceLoading:true,
 				scrollHeight: '',
@@ -129,6 +147,7 @@
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
 				this.userID = resolve.userID ? resolve.userID : 0;
+				this.shopId = resolve.shopID ? resolve.shopID : 0;
 				this.userIdentity = resolve.userIdentity
 				if(this.userIdentity == 1){
 					this.identity = 1

+ 1 - 2
components/cm-module/listTemplate/immediatelyList.vue

@@ -155,7 +155,6 @@
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import cmDrag from '@/components/cm-custom/cm-drag.vue'
-	import { queryNewSearchProduct} from "@/api/product.js"
 	import { getcombinationProduct } from "@/api/seller.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
@@ -260,7 +259,7 @@
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
 				let params = {identity:this.identity,keyword:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,sortField:'',sortType:''}
-				queryNewSearchProduct(params).then(response =>{
+				this.ProductService.GetProductSearchList(params).then(response =>{
 					this.isShowWrapper = true
 					const resData = JSON.parse(response.data);
 					const resList = resData.items;

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

@@ -70,7 +70,6 @@
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import cmDrag from '@/components/cm-custom/cm-drag.vue'
-	import { queryAgaingoodslist } from "@/api/product.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'productList',
@@ -140,7 +139,7 @@
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
 				let params = {userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
-				queryAgaingoodslist(params).then(response =>{
+				this.ProductService.GetRepeatBuyAgainProductList(params).then(response =>{
 					this.isShowWrapper = true
 					this.cartQuantity = response.data.cartQuantity
 					const responseData = response.data.pageDate;

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

@@ -57,6 +57,33 @@
 					</view>
 				</view>
 			</template>
+			<!-- 供应商  -->
+			<template v-if="userIdentity == 3">
+				<template v-if="product.shopID === shopID">
+					<view class="wrap-main-item">
+						<view v-if="product.price1TextFlag == '1'" class="wrap-main-text">¥未公开价格</view>
+						<view v-else class="p-price tui-skeleton-fillet" :class="PromotionsFormat(product.promotions) ? 'none' : ''">
+							<text class="txt sm">¥</text>
+							<text class="txt big">{{ (PromotionsFormat(product.promotions) ? product.price1 : product.retailPrice) | NumFormat }}</text>
+						</view>
+						<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(1)">
+								{{product.promotions.name}}<text v-if="hasLogin && product.price1TextFlag != '1'">:¥{{ product.promotions == null ? '0.00' : product.promotions.touchPrice | NumFormat }}</text>
+							</view>
+							<view v-else class="floor-tags" @click.stop="clickPopupShow()">{{product.promotions.name}}</view>	
+						</view>
+						<view  v-if="product.actStatus ==0  &&  product.ladderPriceFlag == 1" class="floor-item-act">
+							<view class="floor-tags" @click.stop="clickPopupShow()">阶梯价格</view>	
+						</view>
+					</view>
+				</template>
+				<template v-else>
+					<view class="p-login grade tui-skeleton-fillet">
+						<text class="p-no">¥</text>
+						<uni-grader :grade="Number(product.price1Grade)"></uni-grader>
+					</view>
+				</template>	
+			</template>
 			<!-- 普通机构  -->
 			<template v-if="userIdentity == 4">
 				<template v-if="product.price1TextFlag == '1'">
@@ -158,6 +185,10 @@
 				type: Number,
 				default: 2
 			},
+			shopID: {
+				type: Number,
+				default: 2
+			},
 			ladderPriceList:{
 				type: Array,
 			},
@@ -178,7 +209,8 @@
 			},
 		},
 		created() {
-			
+			console.log(this.userIdentity)
+			console.log(this.shopID)
 		},
 		computed: {
 			...mapState(['hasLogin','isWxAuthorize'])

+ 2 - 3
components/cm-module/productDetails/evaluate.vue

@@ -33,7 +33,6 @@
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import { queryEvaluate } from "@/api/product.js" 
 	
 	export default{
 		name:'evaluate',
@@ -72,7 +71,7 @@
 		},
 		methods:{
 			infoEvaluate(){
-				queryEvaluate({productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+				this.ProductService.GetProductEvaluate({productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
@@ -98,7 +97,7 @@
 			getOnReachBottomData(){
 				this.pageNum+=1
 				let params = {productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}
-				queryEvaluate(params).then(response =>{
+				this.ProductService.GetProductEvaluate(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = responseData.hasNextPage

+ 177 - 0
components/cm-module/productDetails/instrument-recommend.vue

@@ -0,0 +1,177 @@
+<template name="recommend">
+	<!-- 项目仪器推荐 -->
+	<view class="recommend clearfix">
+		<view class="recommend-list" v-if="list.length>0">
+			<view class="row-list" v-for="(pros, idx) in list" :key="idx" @click.stop="NavToDetailPage(pros)">
+				<view class="list-image"><image :src="pros.image" mode=""></image></view>
+				<view class="list-name">{{pros.title}}</view>
+			</view>
+		</view>
+		<view class="recommend-empty" v-else>暂无相关推荐商品</view>
+	</view>
+</template>
+
+<script>
+	import authorize from '@/common/config/authorize.js'
+	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
+	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	
+	export default{
+		name:'recommend',
+		props:{
+			list: {
+				// Unistars类型
+				type: Array,
+				default: []
+			}
+		},
+		components:{
+			tuiLoadmore,
+			tuiNomore,
+		},
+		data() {
+			return{
+				
+			}
+		},
+		created() {
+			
+		},
+		methods:{
+			NavToDetailPage(value) {//跳转
+				/**
+				 * 页面跳转类型
+				 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
+				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
+				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
+				 **/
+				 if(value.linkType){
+					 const typeMap = {
+					 	1:`/pages/goods/goods-instrument?linkId=${value.linkParam.id}&title=${value.title}`,
+					 	2:`/pages/search/search-instrument?keyword=${value.title}`,
+					 	5:`/pages/goods/product?id=${value.linkParam.id}`,
+					 	6:`/pages/goods/instrument-details?id=${value.linkParam.id}`,
+					 	7:`/supplier/pages/user/my-shop?shopId=${value.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=${value.title}`,
+					 	13:`/h5/pages/article/page?link=${value.link}`,
+					 	14:`/h5/pages/article/page?link=${value.link}`,
+					 	15:`/h5/pages/article/page?link=${value.link}`,
+					 	17:`/pages/login/register-select`,
+					 	18:`/h5/pages/article/page?link=${value.link}`,
+					 	19:`/pages/search/search-supplier?keyWord=${value.title}`
+					 }
+					 const url = typeMap[value.linkType];
+					 this.$api.navigateTo(url)
+				 }
+			}
+		}
+	}
+</script>
+
+<style lang="scss">	
+.recommend{
+	background: #F7F7F7;
+	width: 100%;
+	.recommend-empty{
+		width: 702rpx;
+		height: 100rpx;
+		line-height: 100rpx;
+		padding: 0 24rpx;
+		font-size: $font-size-28;
+		color: #999999;
+		text-align: center;
+	}
+	.recommend-list{
+		width: 100%;
+		height: auto;
+		position: relative;
+		box-sizing: border-box;
+		padding: 0rpx 24rpx;
+		.row-list{
+			width: 340rpx;
+			height: auto;
+			float: left;
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			border-radius: 2rpx;
+			background: #FFFFFF;
+			&:nth-child(2n){
+				margin-right: 0;
+			}
+			.list-image{
+				width: 100%;
+				height: 340rpx;
+				border-radius: 2rpx 2rpx 0 0;
+				image{
+					width: 100%;
+					height: 340rpx;
+					border-radius: 2rpx 2rpx 0 0;
+				}
+			}	
+			.list-name{
+				font-size: $font-size-28;
+				color: $text-color;
+				line-height:88rpx;
+				padding: 0 10rpx;
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+			}
+		}
+	}
+	.swiper__recommenddots-box{
+		position: absolute;
+		bottom: -20rpx;
+		left: 0;
+		right: 0;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 60rpx;
+		background: #FFFFFF;
+		.swiper__dots-item{
+			width: 8rpx;
+			height: 8rpx;
+			border-radius: 100%;
+			margin-left: 6px;
+			background-color:rgba(0,0,0,.3);
+		}
+		.swiper__dots-long{
+			width: 32rpx;
+			height: 8rpx;
+			border-radius: 4rpx;
+			background-color: #000;
+			transition: all 0.4s;
+		}
+	}
+}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 0 - 1
components/cm-module/productDetails/recommend.vue

@@ -15,7 +15,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import { queryRelevant } from "@/api/product.js" 
 	
 	export default{
 		name:'recommend',

+ 0 - 1
components/cm-module/productDetails/secondDeatail.vue

@@ -20,7 +20,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import { queryRelevant } from "@/api/product.js" 
 	
 	export default{
 		name:'secondDeatail',

+ 0 - 1
components/cm-module/productDetails/secondRecommend.vue

@@ -26,7 +26,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import { queryRelevant } from "@/api/product.js" 
 	
 	export default{
 		name:'recommend',

+ 1 - 1
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 ? item.image : defaultbanner" class="tui-slide-image" mode="scaleToFill"/>
+					<image :src="item ? item : defaultbanner" class="tui-slide-image" mode="scaleToFill"/>
 				</swiper-item>
 			</swiper>
 			<view class="swiper__dots-box" v-if="list.length > 1">

+ 1 - 2
components/cm-module/supplier/category.vue

@@ -39,7 +39,6 @@
 </template>
 <script>
 	import btSearch from '@/components/uni-search/bt-search.vue'
-	import { queryGoodscategory } from "@/api/product.js"
 
 	export default {
 		components: {
@@ -78,7 +77,7 @@
 			},
 			// 获取商品分类列表
 			getProductCate () {
-				queryGoodscategory().then(res =>{
+				this.ProductService.GetProductClassify().then(res =>{
 					this.categoryList = res.data
 					// 查询第一个拥有二级菜单的子菜单
 					for (let i = 0; i < this.categoryList.length; i++) {

+ 52 - 23
components/cm-module/supplier/home.vue

@@ -11,13 +11,13 @@
 		</view>	
 		<view class="container-section tui-skeleton">
 			<!-- 推荐专区 -->
-			<hot-product :list="organizeProducts" :userIdentity="userIdentity" v-if="isRequest"></hot-product>
+			<hot-product :list="RecommendList" :userIdentity="userIdentity" v-if="isRequest"></hot-product>
 			<!-- 楼层 -->
-			<pages-product v-if="isRequest"></pages-product>
+			<pages-product :list="pagesList" v-if="isRequest"></pages-product>
 			<!-- 商品专题 -->
-			<special-product v-if="isRequest"></special-product>
+			<special-product :list="specialList" :listB="specialProList" v-if="isRequest"></special-product>
 			<!-- 供应商专题 -->
-			<supplier-list v-if="isRequest"></supplier-list>
+			<supplier-list :list="supplierList" v-if="isRequest"></supplier-list>
 		</view>
 		<!-- 侧边 -->
 		<scroll-top v-if="isScrollTop"></scroll-top>
@@ -69,11 +69,15 @@
 				mode:'round',
 				modallayer:false,
 				isLogin:false,
-				bannerImageList:[],
-				navBarsList:[],
 				skeletonShow: true,
 				userIdentity:'',
+				bannerImageList:[],//轮播
+				navBarsList:[],//导航分类
+				pagesList:[],//楼层
 				RecommendList:[],//热门推荐
+				specialList:[],//商品专题轮播
+				specialProList:[],//商品专题商品
+				supplierList:[],//供应商列表
 				organizeProducts:[],//常用商品
 				productsClassifyList:[
 					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
@@ -104,6 +108,8 @@
 		created() {
 			this.$api.getStorage().then((resolve) =>{
 				this.userID = resolve.userID
+				this.userIdentity = resolve.userIdentity
+				this.GetHomeFloorInfo()
 				this.getHomeInformation()
 			})
 		},
@@ -117,6 +123,37 @@
 		},
 		methods: {
 			...mapMutations(['login','logout']),
+			GetHomeInit(){//金刚区分类
+				this.CommonService.GetHomeInit({}).then(response =>{
+					let data = response.data
+					this.navBarsList = data.topMenuList
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetHomeFloorInfo(){//初始化首页楼层数据
+				this.CommonService.GetHomeFloorInfo({}).then(response =>{
+					let data = response.data
+					data.forEach((item,index) => {
+						switch(item.type){
+							case 3:
+								this.supplierList = item.floorData
+								break;	
+							case 4:
+								this.specialList = item.floorData
+								break;	
+							case 5:
+								this.specialProList = item.floorData
+								break;	
+							case 6:
+								this.pagesList = item.subFloors
+								break;
+						}
+					})
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
 			getHomeInformation(){//初始化首页数据	
 				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
 					let data = res.data;
@@ -129,35 +166,27 @@
 					this.thirdModulesName= data.thirdModulesName
 					this.productsClassifyList = data.productsClassifyList
 					this.$store.commit('updateAllNum',data.shoppingCartCount)
-					this.getOrganizeProducts()				
+					this.GetHomeInit();
+					this.GetHomeRecommendInfo()
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetHomeRecommendInfo(){//首页热门推荐
 				this.CommonService.GetHomeRecommendInfo().then(response =>{
-					this.RecommendList=response.data
-					this.getProductPrice()
-				})
-			},
-			getOrganizeProducts(){//获取模块三商品
-				this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:6}).then(res =>{
-					this.organizeProducts = res.data.results
-					this.getProductPrice()
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
+					this.RecommendList = response.data
+					this.GetProductPrice()
 				})
 			},
-			getProductPrice(){//获取商品或者活动价格
+			GetProductPrice(){//获取商品或者活动价格
 				let productIdArr = [];
 				let productIds ='';
-				this.organizeProducts.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
-					productIdArr.push(item.productID)
+				this.RecommendList.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);
-					console.log(this.organizeProducts)
+					this.RecommendList = this.ReturnNewProducts(this.RecommendList,response.data);
 					this.skeletonShow = false;
 					this.isRequest = true
 				}).catch(error =>{
@@ -168,7 +197,7 @@
 				let NewArray = []
 				Array.map(item=>{
 					for (let i = 0; i < list.length; i++) {
-						if( item.productID == list[i].productId ){
+						if( item.id == list[i].productId ){
 							NewArray.push(Object.assign(item,list[i])) 
 						}
 					}

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

@@ -10,7 +10,7 @@
 							<text class="u-h1">{{name}}</text>
 							<text class="u-tips">供应商</text>
 						</view>
-						<view class="user-item" @click="navigator('/supplier/pages/user/my-shop')">
+						<view class="user-item" @click="navigator('/supplier/pages/user/my-shop?shopId='+shopID)">
 							<text class="u-shop">我的店铺</text><text class="iconfont icon-jinrudianpu"></text>
 						</view>
 					</view>
@@ -118,6 +118,7 @@
 				name:'这里是供应商的名字',
 				headpic:'',
 				userId:'',
+				shopID:0,
 				skeletonShow:true,
 				contactNumber:0,
 				orderNum:0,//机构自主下单订单数
@@ -126,7 +127,7 @@
 				downNum:0, //已下架
 				firstList:[
 					{name:'运营人员管理',path:'/supplier/pages/user/operator/list',icon:'icon-yunyingrenyuanguanli'},
-					{name:'我的资料',path:'/supplier/pages/login/information',icon:'icon-wodeziliao'},
+					{name:'我的资料',path:'/supplier/pages/user/information',icon:'icon-wodeziliao'},
 					{name:'账户设置',path:'/supplier/pages/user/setting/setting',icon:'icon-zhanghushezhi'},
 				]
 			}
@@ -176,11 +177,11 @@
 					this.ShopService.GetHomePageData({userId:this.userId}).then(response =>{
 						let data = response.data
 						this.name = data.shop.name 	//协销名称
+						this.shopID = data.shop.shopID 	//供应商ID
 						this.headpic = data.shop.logo //会所头像
 						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)

+ 29 - 896
pages/goods/instrument-details.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="product" :style="{paddingBottom: userIdentity==1 ? '0rpx' :'188rpx'}">
+	<view class="product" :style="{paddingBottom: userIdentity == 1 || userIdentity == 3 ? '0rpx' :'188rpx'}">
 		<custom-p   v-if="isHeaderPoduct"
 					:systeminfo='systeminfo' 
 					:navbar-data='nvabarData' 
@@ -23,37 +23,15 @@
 						</view>
 					</uni-swiper-dot>
 				</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-wrap clearfix">
-					<view class="wrap-top" :class="goodsData.isNoneDisabled ? 'none' : ''">
-						<view class="p-title tui-skeleton-fillet">
-							<view class="p-title-name">
-								{{product.name == undefined ? '' : product.name}}
-							</view>
-							<button open-type="share" class="p-title-share tui-share-position" @tap="onShare">
-								<view class=""><text class="iconfont icon-fenxiang1"></text></view>
-								<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>
+					
 				</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-details">
 				<!-- 商品详情 -->
 				<view class="title">
@@ -74,36 +52,15 @@
 			</view>	
 			<view class="product-details recommend">
 				<!-- 相关推荐 -->
-				<view class="title">
-					<view class="title-tab">相关推荐</view>
-				</view>
-				<view class="content hot">
-					<recommend :query-productid="product.productID" v-if="isRequest"></recommend>
+				<view class="instrument-recommend-cell" v-for="(floor, index) in floorList" :key="index">
+					<view class="title">
+						<view class="title-tab">{{ floor.title }}</view>
+					</view>
+					<view class="content hot">
+						<recommend :list="floor.floorData" v-if="isRequest"></recommend>
+					</view>
 				</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">
@@ -141,79 +98,6 @@
 					</view>
 				</view>	
 			</tui-bottom-popup>	
-			<!-- 底部按钮 -->
-			<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/index')">
-							<image src="../../static/icon-home-active@3x.png"></image>
-							<text>首页</text>
-						</view>
-						<view class="item-bt">
-							<!-- #ifdef MP-WEIXIN -->
-							<button class="contact-btn" open-type="contact" @bindcontact="handleContact">
-								<image src="../../static/severs@3x.png"></image>
-								<text>客服</text>
-							</button>	
-							<!-- #endif -->
-						</view>
-						<view class="item-bt" @click="buyProductCart()">
-							<image src="../../static/icon-cart-active@3x.png"></image>
-							<text>购物车</text>
-							<text  	v-if="hasLogin && goodsData.cartCount>0"
-									class="uni-badge uni-badge-error uni-small uni-badge--small icon-num"
-									:class="[goodsData.cartCount < 10 ? 'goleft':'']">
-									{{ goodsData.cartCount >= 100 ? '99+': goodsData.cartCount}}
-							</text>
-							<view class="animation-num"  :class="isAnimation ? 'animation' : 'restion'">+1</view>
-						</view>
-					</view>
-					<view class="bottom-ri">
-						<button  
-								:disabled="goodsData.disabled" 
-								class="btn btn-cart" 
-								:class="[goodsData.disabled ? 'disabled':'']"
-								@tap.stop="btnGetConfirm('add')">加入购物车</button>
-						<button  
-								:disabled="goodsData.disabled" 
-								class="btn btn-bay" 
-								:class="[goodsData.disabled ? 'disabled':'']"
-								@tap.stop="btnGetConfirm('buy')">立即购买</button>
-					</view>
-				</view>	
-			</view>
-			<!--底部选择模态层弹窗组件 -->	
-			<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
-				<!-- 遮罩层 -->
-				<view class="mask"></view>
-				<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-352rpx' : '-296rpx'}">
-					<view class="content">
-						<view class="layer-smimg">
-							<image :src="product.mainImage" mode=""></image>
-						</view>
-						<view class="layer-nunbox">
-							<view class="layer-nunbox-t" v-if="product.step === 2">
-								<view class="text">*该商品只能以起订量的整数倍购买</view>
-							</view>
-							<view class="layer-nunbox-t">
-								<view class="layer-nunbox-text">数量:</view>
-								<view class="number-box">
-									<view  class="iconfont icon-jianhao" :class="[isQuantity==true?'disabled':'']" @click="changeCountSub()"></view>
-									<input class="btn-input" type="number" v-model="number" maxlength='4'  @blur="changeNumber($event)">
-									<view  class="iconfont icon-jiahao"  :class="[isStock==true?'disabled':'']" @click="changeCountAdd()"></view>
-								</view>
-							</view>
-							<view class="layer-nunbox-b">
-								<view class="text">单价:
-									<text class="p sm">¥</text>
-									<text class="p bg">{{buyRetailPrice.toFixed(2)}}</text>
-								</view>
-							</view>
-						</view>
-					</view>
-					<view class="btn"><view class="button" @click.stop="btnConfirm">确定</view></view>
-				</view>
-			</view>
 			<!-- 侧边 -->
 			<scroll-top v-if="isScrollTop"></scroll-top>
 		</view>
@@ -222,14 +106,14 @@
 
 <script>
 	import { mapState,mapMutations } from 'vuex'
-	import customP from '@/components/cm-module/headerNavbar/header-poduct' 		 //自定义导航
+	import customP from '@/components/cm-custom/custom-p.vue' 		 //自定义导航
 	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" //相关推荐
+	import recommend from "@/components/cm-module/productDetails/instrument-recommend" //相关推荐
 	import cmParameter from "@/components/cm-module/productDetails/cm-parameter" //相关参数
 	import cmService from "@/components/cm-module/productDetails/cm-service" //服务项目
 	import wxLogin from "@/common/config/wxLogin.js"
@@ -261,34 +145,17 @@
 				isShareType:'',
 				isHeaderPoduct:false,
 				navbarFiexd:'none',
-				ladderPriceFlag:'',
-				ladderPriceList:'',
 				isRecommend:false,
 				isRarameter:true,
 				isService:false,
 				isEvaluate:false,
-				isAnimation:false,
 				skeletonShow:true,
-				isQuantity:false,
-				isStock:false,
-				disabled:false,
-				isNoneDisabled:false,
 				tabCurrentIndex:0,
 				userID:'',
-				productID:0,
+				equipmentId:0,
 				userIdentity:'',//用户类型
-				goodsData:{},//自定义数据
-				shop:{},//供应商信息
-				product:{},//采美
 				productImage:[],
-				retailPrice:0,
-				buyRetailPrice:0,
-				buyRetailPriceStep:1,
-				stock:0,
-				number:0,
-				minBuyNumber:0,
-				productsList:[],
-				goodListData:[],
+				floorList:[],
 				headerBtnPosi:	this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 				systeminfo: this.setSysteminfo(),		 //获取设备信息
 				isIphoneX:this.$store.state.isIphoneX,
@@ -304,7 +171,7 @@
 			}
 		},
 		onLoad(option) {
-			this.productID = option.id;//获取商品ID
+			this.equipmentId = option.id;//获取商品ID
 			this.isShareType = option.type
 			this.linkPath = option.path
 			this.isHeaderPoduct = true
@@ -327,63 +194,15 @@
 		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				this.ProductService.queryProductDetils({userId:this.userID,productID:this.productID}).then(response =>{	
+				this.ProductService.GetEquipmentDetails({equipmentId:this.equipmentId}).then(response =>{	
+					let data = response.data 
+					this.floorList = data.floorList
 					this.skeletonShow = false
-					this.productImage=[];
-					this.shop = response.data.shop
-					this.product = response.data
-					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.product.imageList.forEach(item =>{
-						this.productImage.push(item.image);
-					})
-					//购物车数量
-					this.goodsData.cartCount = this.product.productCount
-					//处理阶梯价格
-					if(this.product.ladderPriceList!=null){
-						this.ladderPriceList = this.product.ladderPriceList;
-					}
-					//拆分金额并转千分位格式显示
-					if(this.product.retailPrice!=null){
-						this.retailPrice = this.product.retailPrice.toFixed(2);
-						this.buyRetailPrice = this.product.retailPrice;
-					}
-					//处理下架商品和售罄商品
-					if(this.product.validFlag =='3' || this.stock == 0 ){
-						this.disabled = true
-						this.isNoneDisabled = true
-						this.tabCurrentIndex = 3;// 页面显示是默认选中第一
-						this.isRecommend = true
-						this.goodsData.disabledText = '下架'
-					}else{
-						this.disabled = false
-						this.isNoneDisabled = false
-						this.tabCurrentIndex = 0;// 页面显示是默认选中第三
-						this.goodsData.disabledText = ''
-					}
-					if(this.product.price1TextFlag == "1"){
-						this.disabled = true
-					}
-					if(this.product.price1TextFlag == "2"){
-						if(this.userIdentity == 4){	
-							this.disabled = true
-						}else{
-							this.disabled = false
-						}
-					}
-					this.goodsData.disabled = this.disabled
-					this.goodsData.isNoneDisabled = this.isNoneDisabled
-					if(this.product.validFlag =='3'){
-						this.goodsData.disabledText = '下架'
-					}
-					if(this.stock == 0){
-						this.goodsData.disabledText = '售罄'
-					}
+					// this.productImage=[];
+					// //处理商品图片列表
+					// this.product.imageList.forEach(item =>{
+					// 	this.productImage.push(item.image);
+					// })
 					this.isRequest = true
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
@@ -417,138 +236,6 @@
 						break;
 				}
 			},
-			handleContact(e){//跳转小程序客服
-
-			},
-			buyProductCart(){//底部购物车按钮点击
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						if(this.hasLogin){
-							this.$api.navigateTo('/pages/goods/cart')
-						}else{					
-							this.$api.navigateTo('/pages/login/login?type=1')
-						}
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}
-				})	
-			},
-			btnGetConfirm(type){//加入购物车&&立即购买点击
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						if(this.hasLogin){
-							this.showSpec(type);
-						}else{
-							this.$api.navigateTo('/pages/login/login?type=1')
-						}
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}	
-				})
-			},	
-			changeCountAdd(){//popup弹窗数量增加按钮
-				if(this.buyRetailPriceStep == 2){
-					this.number+=this.minBuyNumber
-				}else{
-					this.number++
-				}
-				this.processActivityPrice()
-			},
-			changeCountSub(){//popup弹窗数量减按钮
-				if(this.number<=this.minBuyNumber){
-					this.number= this.minBuyNumber
-					this.isQuantity =true
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
-					return
-				}else{
-					if(this.buyRetailPriceStep == 2){
-						this.number-=this.minBuyNumber
-					}else{
-						this.number--
-					}
-					this.processActivityPrice()
-					this.isQuantity =false
-				}
-			 },
-			changeNumber(e){
-				let _value = e.detail.value;
-				if(!this.$api.isNumber(_value)){
-					this.number = this.minBuyNumber
-				}else if(_value < this.minBuyNumber){	
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
-					this.number = this.minBuyNumber
-				}else if( _value % this.minBuyNumber !=0 ){
-					this.$util.msg(`购买量必须为起订量的整数倍`,2000);
-					this.number = this.minBuyNumber
-				}else{
-					this.number = e.detail.value
-				}
-				this.processActivityPrice()
-			},
-			processActivityPrice(){//单独处理活动价格和阶梯价格
-				if(this.ladderPriceFlag == '0' && this.product.actStatus == 0 || this.product.actStatus == 1){
-					this.buyRetailPrice = this.product.retailPrice
-				}else{
-					this.ladderPriceList.forEach((item,index)=>{
-						if(this.number>=item.buyNum){
-							this.buyRetailPrice = item.buyPrice
-						}
-					})
-				}
-			},
-			showSpec(type) {//显示选择数量确认弹窗
-				this.isBtnType = type
-				this.specClass = 'show';
-			},
-			hideSpec() {//关闭选择数量确认弹窗
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
-			btnConfirm() {//加入购物车&&立即购买跳转订单页并关闭弹窗
-				if(this.isBtnType == 'add'){				
-					this.getAddProductCart()				
-				}else{
-					this.toConfirmation()
-				}
-			},
-			toConfirmation(){//跳转确认订单页面
-				this.specClass = 'hide';
-				let productStp ={
-						allPrice:this.number*this.buyRetailPrice,
-						allCount:this.number,
-						productID:this.product.productID,
-						productCount:this.number
-				}	
-				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
-			getAddProductCart(){//增加购物车成功和toast弹窗提示成功	
-				this.ProductService.shoppingAddCart({productID:this.productID,userID:this.userID,productCount:this.number}).then(response => {
-					this.specClass = 'hide';
-					this.$util.msg('加入购物车成功',1500,true,'success')
-					this.isAnimation = true
-					setTimeout(() => {this.specClass = 'none'}, 200)
-					setTimeout(() => {this.isAnimation = false},2000)
-					this.goodsData.cartCount = response.data;
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			},
-			navToLogin(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$store.commit('setLoginType',8)
-						this.$store.commit('setLoginProductId',this.productID)
-						this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}
-				})	
-			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
 				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
@@ -563,16 +250,6 @@
 				})
 				return systeminfo
 			},
-			getOptionFn(e){
-				this.isShareType = e.type
-			},
-			goSupplier(){
-				this.$api.setStorage('supplierInfo',this.shop)
-				this.$api.navigateTo('/pages/goods/supplier')
-			},
-			discard(){
-				//丢弃
-			},
 			onShare(res){//分享转发
 				if (res.from === 'button') {
 			      // 来自页面内转发按钮
@@ -690,222 +367,7 @@
 		padding: 24rpx 0 0 0;
 		background-color: #FFFFFF;
 		border-bottom: 20rpx solid #F7F7F7;
-		.wrap-top{
-			width: 702rpx;
-			padding: 0 24rpx;
-			height: auto;
-			float: left;
-			padding-bottom:20rpx;
-			border-bottom: 1px solid #F8F8F8;
-			&.none{
-				.p-title{
-					color:#999999
-				}
-			}
-			.p-title{
-				width: 100%;
-				height: auto;
-				float: left;
-				.p-title-name{
-					width:602rpx;
-					height: 96rpx;
-					float: left;
-					line-height: 42rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					-o-text-overflow: ellipsis;
-					text-overflow: ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
-				}
-				.p-title-share{
-					width: 96rpx;
-					height: 96rpx;
-					float: right;
-					text-align: center;
-					color: #999999;
-					font-size: $font-size-24;
-					box-sizing: border-box;
-					padding: 8rpx 0;
-					.icon-fenxiang1{
-						font-size: $font-size-34;
-					}
-				}
-			}
-			.wrap-main-text{
-				line-height: 56rpx;
-				color: #FF2A2A;
-				font-size: $font-size-26;
-				display: block;
-				float: left;
-				font-weight: normal;
-			}
-			.wrap-main-none{
-				display: block;
-				width: 256rpx;
-				height: 44rpx;
-				padding-left: 20rpx;
-				border-radius: 11rpx;
-				background: $btn-confirm;
-				float: right;
-				line-height: 44rpx;
-				color: #FFFFFF;
-				text-align: center;
-				font-size: $font-size-24;
-			}
-			
-			.p-price-none{
-				height: 44rpx;
-				line-height: 44rpx;
-				float: left;
-				font-size: $font-size-24;
-				color: #666;
-				text-decoration: line-through;
-				margin-left: 8rpx;
-			}
-			.p-minBuy{
-				height: 44rpx;
-				line-height: 44rpx;
-				float: right;
-				padding: 0 18rpx;
-				border-radius: 22rpx;
-				background-color: #f7f7f7;
-				color: #7F7F7F;
-				font-size: 24rpx;
-				text-align: center;
-				.min-text{
-					margin: 0 6rpx;
-				}
-			}
-			.p-login{
-				height: 56rpx;
-				line-height: 56rpx;
-				color: $color-system;
-				font-size: $font-size-24;
-				&.grade{
-					.price-left{
-						float: left;
-						.none{
-							display: block;
-							font-size: $font-size-20;
-							line-height: 48rpx;
-							color: #4A4B54;
-							float: left;
-							font-weight: bold;
-							margin-left: 5rpx;
-							text{
-								letter-spacing: 4rpx;
-								font-size: $font-size-32;
-							}
-						}
-					}
-				}
-				.p-no{
-					float: left;
-					margin-right: 5rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-				}
-				.p-login-btn{
-					display: block;
-					height: 44rpx;
-					padding: 0 10rpx 0 20rpx;
-					border-radius: 11rpx;
-					background: $btn-confirm;
-					float: right;
-					line-height: 44rpx;
-					color: #FFFFFF;
-					text-align: center;
-					font-size: $font-size-24;
-				}
-			}
-		}
-		.wrap-label{
-			float: left;
-			width: 100%;
-			box-sizing: border-box;
-			.label-a{
-				padding: 0 18rpx;
-				line-height: 32rpx;
-				font-size: $font-size-20;
-				color:$color-system;
-				text-align: center;
-				border-radius: 6rpx;
-				background:#ffe6dc;
-				margin: 0 20rpx 15rpx 0;
-				display: inline-block;
-			}
-		}
-		.wrap-info{
-			float: left;
-			width: 702rpx;
-			padding: 24rpx 24rpx 0 24rpx;
-			border-bottom: 1px solid #F8F8F8;
-			.info-viewT{
-				width: 100%;
-				min-height: 40rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				line-height: 40rpx;
-				text-align: left;
-				&.none{
-					color: #999999;
-				}
-				.info-viewL{
-					min-width: 350rpx;
-					float: left;
-					margin-bottom: 24rpx;
-				}
-				.info-viewR{
-					min-width: 352rpx;
-					float: left;
-					margin-bottom: 24rpx;
-				}
-			}
-			.info-viewB{
-				width: 100%;
-				height: auto;
-			}
-			.info-f{
-				width: 50%;
-				float: left;
-				font-size: $font-size-28;
-				color: $text-color;
-				line-height: 40rpx;
-				margin-bottom: 24rpx;
-				text-align: left;
-			}
-		}
-	}
-	.product-seve{
-		width: 702rpx;
-		height: 90rpx;
-		padding: 0 24rpx;
-		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;
-		}
-		.iconfont{
-			color: #999999;
-			margin-right: 20rpx;
-			font-size: $font-size-26;
-		}
-		.text{
-			font-size: $font-size-26;
-			color: #999999;
-			margin-left: 10rpx;
-		}
+		
 	}
 	.product-parameter{
 		width: 702rpx;
@@ -974,7 +436,7 @@
 				background: #fff;
 				z-index: 10;
 				font-size: $font-size-30;
-				text-align: left;
+				text-align: center;
 				color: $text-color;
 				line-height: 100rpx;
 				font-weight: 600;
@@ -1042,7 +504,6 @@
 		}
 		.content{
 			width: 100%;
-			min-height: 750rpx;
 			background-color: #FFFFFF;
 		}
 	}
@@ -1055,114 +516,6 @@
 		font-size: $font-size-32;
 		font-weight: bold;
 	}
-	.bottom-btn{
-		width: 100%;
-		height: 110rpx;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		background: #FFFFFF;
-		z-index: 99;
-		.bottom-le{
-			width: 302rpx;
-			height: 86rpx;
-			padding:12rpx 24rpx;
-			float: left;
-			.item-bt{
-				width: 86rpx;
-				height: 100%;
-				margin-right:22rpx;
-				display: flex;
-				float: left;
-				flex-direction: column;
-				align-items: center;
-				font-size: $font-size-24;
-				color: $text-color;
-				line-height: 34rpx;
-				position: relative;
-				.animation-num{
-					font-size:$font-size-32 ;
-					color: #FF2A2A;
-					position: absolute;
-					top: -12rpx;
-					right: 4rpx;
-					font-weight: bold;
-				}
-				.animation{
-					animation: showAmnation 2.2s ease-in-out both;
-				}
-				.restion{
-					animation: hideAmnation 1s ease-in-out both;
-				}
-				.icon-num{
-					position: absolute;
-					right:-12rpx;
-					top: -9rpx;
-				}
-				.icon-num.goleft{
-					right: 4rpx;
-				}
-				&:last-child{
-					margin-right: 0;
-				}
-				image {
-					width: 40rpx;
-					height: 40rpx;
-					margin-bottom: 8rpx;
-				}
-				button.contact-btn{
-					width: 100%;
-					height: 100%;
-					margin: 0;
-					padding: 0;
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-					box-sizing: border-box;
-					font-size: $font-size-24;
-					text-align: center;
-					text-decoration: none;
-					line-height: 34rpx;
-					border-radius: 0;
-					-webkit-tap-highlight-color: transparent;
-					overflow: hidden;
-					color: $text-color;
-					background-color:#FFFFFF;
-				}
-			}
-		}
-		.bottom-ri{
-			width: 400rpx;
-			height: 100%;
-			float: right;
-			display: flex;
-			box-sizing: border-box;
-			padding: 13rpx 20rpx 13rpx 0;
-			.btn{
-				flex: 1;
-				width: 200rpx;
-				line-height: 84rpx;
-				text-align: center;
-				font-size: $font-size-28;
-				color: #FFFFFF;
-			}
-			.btn-cart{
-				background-color: #ffe6dc;
-				color: $color-system;
-				border-radius: 42rpx 0 0 42rpx;
-			}
-			.btn-cart.disabled{
-				background-color: #E1E1E1;
-			}
-			.btn-bay{
-				background:linear-gradient(to right, #f28f31 0%, #e15616 100%);
-				border-radius: 0 42rpx 42rpx 0;
-			}
-			.btn-bay.disabled{
-				background-color: linear-gradient(135deg,rgba(242,143,49,0.5) 0%,rgba(225,86,22,0.5) 100%);;
-			}
-		}
-	}
 	.uni-badge--small {
 		-webkit-transform: scale(.8);
 		-ms-transform: scale(.8);
@@ -1187,226 +540,6 @@
 		color: #fff;
 		background-color: #dd524d;
 	}
-	/* 加入购物模态层*/
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-		100% {
-			opacity: 1;
-		}
-	}
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-		100% {
-			opacity: 0;
-		}
-	}
-	@keyframes showLayer {
-		0% {
-			transform: translateY(0);
-		}
-		100% {
-			transform: translateY(-100%);
-		}
-	}
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(-100%);
-		}
-		100% {
-			transform: translateY(0);
-		}
-	}
-	@keyframes showAmnation {
-		0% {
-			top: -12rpx;
-			opacity: 0;
-		}
-		50% {
-			top: -60rpx;
-			opacity: 1;
-		}
-		100% {
-			top: -100rpx;
-			opacity: 0;
-		}
-	}
-	@keyframes hideAmnation {
-		0% {
-			top: -100rpx;
-			opacity: 0;
-		}
-		100% {
-			top: -12rpx;
-			opacity: 0;
-		}
-	}
-	.popup {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 999;
-		display: none;
-		.mask{
-			position: fixed;
-			top: 0;
-			width: 100%;
-			height: 100%;
-			z-index: 21;
-			background-color: rgba(0, 0, 0, 0.6);
-		}
-		.layer {
-			position: fixed;
-			z-index: 22;
-			bottom: -294rpx;
-			width: 702rpx;
-			padding: 24rpx 24rpx 36rpx 24rpx;
-			height: 260rpx;
-			border-radius: 20rpx 20rpx 0 0;
-			background-color: #fff;
-			display: flex;
-			flex-wrap: wrap;
-			align-content: space-between;
-			.content {
-				width: 100%;
-			}
-			.btn {
-				width: 100%;
-				height: 88rpx;
-				margin-top: 20rpx;
-				.button {
-					width: 100%;
-					height: 88rpx;
-					color: #fff;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					background: $btn-confirm;
-					font-size: $font-size-28;
-					border-radius: 14rpx;
-				}
-			}
-		}
-		
-		&.show {
-			display: block;
-			.mask{
-				animation: showPopup 0.2s linear both;
-			}
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
-		}
-		&.hide {
-			display: block;
-			.mask{
-				animation: hidePopup 0.2s linear both;
-			}
-			
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
-		}
-		&.none {
-			display: none;
-		}
-		&.service {
-			.row {
-				margin: 30upx 0;
-				.title {
-					font-size: 30upx;
-					margin: 10upx 0;
-				}
-				.description {
-					font-size: 28upx;
-					color: #999;
-				}
-			}
-		}
-		.layer-smimg{
-			width: 114rpx;
-			height: 114rpx;
-			float: left;
-			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 114rpx;
-				height: 114rpx;	
-				border-radius: 10rpx;
-			}
-		}
-		.layer-nunbox{
-			justify-content: space-between;
-			align-items: center;
-			width: 536rpx;
-			height: auto;
-			float: left;
-			.layer-nunbox-t{
-				width: 100%;
-				height:44rpx;
-				position:relative;
-				display: flex;
-				margin-bottom: 10rpx;
-				.text{
-					font-size: $font-size-24;
-					line-height: 48rpx;
-					color: #999999;
-				}
-				.layer-nunbox-text{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-				}
-				.number-box{
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					.iconfont{
-						font-size: $font-size-32;
-						padding:0 20rpx;
-						font-size: $text-color;
-					}
-					.btn-input{
-						width: 62rpx;
-						height: 48rpx;
-						line-height: 48rpx;
-						background: #F8F8F8;
-						border-radius: 4rpx;
-						text-align: center;
-						font-size: $font-size-28;
-					}
-				}
-				.product-step{
-					position: absolute;
-					left: 45rpx;
-					bottom: 0;
-					height: 44rpx;
-					background: #FFFFFF;
-				}
-			}
-			.layer-nunbox-b{
-				width: 100%;
-				height:44rpx;
-				margin-top: 13rpx;
-			}
-			.text{
-				line-height: 44rpx;
-				font-size: $font-size-28;
-				.p{
-					color: #FF2A2A;
-				}
-				.p:first-child{
-					margin-left: 30rpx;
-				}
-				.p.sm{
-					font-size: $font-size-24;
-				}
-			}
-		}
-	}
 	.tui-popup-box {
 		position: relative;
 		box-sizing: border-box;

+ 8 - 6
pages/goods/product.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="product" :style="{paddingBottom: userIdentity==1 ? '0rpx' :'188rpx'}">
+	<view class="product" :style="{paddingBottom: userIdentity==1 && userIdentity == 3 ? '0rpx' :'188rpx'}">
 		<custom-p   v-if="isHeaderPoduct"
 					:systeminfo='systeminfo' 
 					:navbar-data='nvabarData' 
@@ -53,6 +53,7 @@
 							<cm-price v-if="isRequest"
 									  :product="product"
 									  :userIdentity="userIdentity"
+									  :shopID= "shopID"
 									  :promotions="product.promotions"
 									  :ladderPriceList="ladderPriceList"/>
 						</view>
@@ -165,7 +166,7 @@
 				</view>	
 			</tui-bottom-popup>	
 			<!-- 底部按钮 -->
-			<view class="menu" v-if="userIdentity!=1">
+			<view class="menu" v-if="userIdentity!=1 && userIdentity != 3">
 				<view class="bottom-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 					<view class="bottom-le">
 						<view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">
@@ -296,6 +297,7 @@
 				isNoneDisabled:false,
 				tabCurrentIndex:0,
 				userID:'',
+				shopID:'',
 				productID:0,
 				userIdentity:'',//用户类型
 				goodsData:{},//自定义数据
@@ -357,7 +359,6 @@
 					this.product = response.data
 					//已删除/已冻结
 					if(this.product.validFlag === '0'){
-						console.log('2222222222')
 						this.isInvalid = true
 					}
 					this.ladderPriceFlag = this.product.ladderPriceFlag;
@@ -588,7 +589,7 @@
 				});
 			},
 			goSupplier(){//跳供应商资料页
-				this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+this.shopId)
+				this.$api.navigateTo('/supplier/pages/user/my-shop?shopId='+this.shopId)
 			},
 			discard(){
 				//丢弃
@@ -646,6 +647,7 @@
 			this.$api.getStorage().then((resolve) => {
 				this.userID = resolve.userID ? resolve.userID : '';	
 				this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 3
+				this.shopID =  resolve.shopID ? resolve.shopID : '';	
 				if (isPreviewImg) {
 					isPreviewImg = false;
 					return;
@@ -1288,7 +1290,7 @@
 		height: 80rpx;
 		box-sizing: border-box;
 		padding: 0 24rpx;
-		background: rgba(255,230,220,1);
+		background: #FFFFFF;
 		z-index: 10;
 		display: flex;
 		position: fixed;
@@ -1312,7 +1314,7 @@
 				width: 60rpx;
 				height: 2px;
 				border-radius: 1px;
-				background: rgba(255,230,220,1);
+				background: #FFFFFF;
 				position: absolute;
 				bottom: 0;
 				left: 50%;

+ 71 - 149
pages/search/search-instrument.vue

@@ -6,9 +6,10 @@
 				<input class="input" 
 					   type="text" 
 					   confirm-type="search" 
-					   v-model="searchInputVal" 
+					   v-model="listQuery.keyword" 
+					   :focus="isFocus"
 					   @input="onShowClose" 
-					   @confirm="initsupplierList()" 
+					   @confirm="GetSearchEquipmentList()" 
 					   placeholder="请输入仪器名称" 
 					   maxlength="16"/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
@@ -17,15 +18,15 @@
 				<button class="search-btn" type="default" @click.stop="searchsupplierList">搜索</button>
 			</view>
 		</view>
-		<view class="supplier-main">
+		<view class="equipment-main">
 			<view v-if="isEmpty" class="empty-container">
-				<image class="supplier-empty-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png" mode="aspectFit"></image>
-				<view class="txt">暂无供应商数据</view>
+				<image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
+				<view class="txt">暂无项目仪器数据^_^</view>
 			</view>
 			<view v-else class="supplier-list">
-					<view class="list clearfix" v-for="(item, index) in list" :key="index">
-						<image class="pros-item-image" :src="item.image" mode="scaleToFill"></image>
-						<view class="pros-name">{{ item.name }}</view>
+					<view class="list clearfix" v-for="(item, index) in list" :key="index" @click.stop="navToDetailPage(item.e_id)">
+						<image class="pros-item-image" :src="item.e_image" mode="scaleToFill"></image>
+						<view class="pros-name">{{ isInterceptHtmlFn(item.e_name) }}</view>
 					</view>
 					<!--加载loadding-->
 					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
@@ -40,109 +41,57 @@
 	import authorize from '@/common/config/authorize.js'	
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	
 	import { getFindAllsupplierList } from "@/api/seller.js"
 	export default {
 		components:{
 			tuiLoadmore,
-			tuiNomore,
-			uniStars
+			tuiNomore
 		},
 		data() {
 			return {
 				iconClass:'icon-aixin',
 				iconColor:'#ff9100',
-				serviceProviderId:'',
 				isShowClose:false,
-				searchInputVal:'',
 				isEmpty:false,
+				isFocus:true,
+				productNoneImage:'http://static-b.caimei365.com/app/img/icon/icon-pnone.png',
 				nomoreText: '上拉显示更多',
-				pageNum:1,
-				pageSize:10,
-				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
 				pullFlag: true,
-				allowDataStatus:true,
-				wrapperHeight:'100%',
-				scrollHeight:'',
-				deleteAddressId:'',
-				currPage:'',//当前页面
-				prevPage:'',//上一个页面
-				tabCurrentIndex:0,
-				listStatus:1,
-				list:[
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-						],
-				isIphoneX:this.$store.state.isIphoneX,
-				show_index:0,//控制显示那个组件
+				list:[],
+				listQuery:{
+					keyword: '',
+					pageSize: 10,
+					pageNum: 1
+				},
+				total:0
 			}
 		},
-		onLoad(){				
-			this.setScrollHeight();
+		onLoad(option){
+			if(option.keyword){
+				this.listQuery.keyword = option.keyword
+				this.GetSearchEquipmentList();
+			}
 		},
 		methods: {
-			setScrollHeight() {
-				// 窗口高度 - 底部距离
-				setTimeout(()=> {
-					const query = wx.createSelectorQuery().in(this);
-					query.selectAll('.add-btn').boundingClientRect();
-					query.exec(res => {
-						if(res[0][0]){
-							let winHeight = this.$api.getWindowHeight(),
-								eleTop = res[0][0].top - 1;
-								this.scrollHeight =  eleTop;
-						}
-					})
-				}, 500)
-			},
-			searchsupplierList(){
-				this.pageNum=1
-				this.initsupplierList()
+			searchsupplierList(){//搜索
+				this.listQuery.pageNum=1
+				this.GetSearchEquipmentList()
 			},
-			initsupplierList(){	
-				let params = { searchWord:this.searchInputVal,pageNum:1,pageSize:this.pageSize }
-				getFindAllsupplierList(params).then(response =>{
-					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
+			GetSearchEquipmentList(){//查询供应商列表	
+				this.ProductService.GetSearchEquipmentList(this.listQuery).then(response =>{
+					let data = JSON.parse(response.data)
+					let dataList = data.items
+					console.log(data)
+					this.total = data.total
+					if(dataList && dataList.length > 0){
 						this.isEmpty = false
-						this.hasNextPage = response.data.hasNextPage
-						this.supplierList =responseData.results
+						this.list = dataList
 						this.pullFlag = false;
 						setTimeout(()=>{this.pullFlag = true;},500)
-						if(this.hasNextPage){
+						if(this.total>this.list.length){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
 						}else{
@@ -157,84 +106,57 @@
 					this.$util.msg(error.msg,2000)
 				})
 			},	
-			getOnReachBottomData(){
-				this.pageNum+=1
-				let params = {searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize }
-				getFindAllsupplierList(params).then(response =>{
-					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
-						this.hasNextPage = response.data.hasNextPage
-						this.supplierList = this.supplierList.concat(responseData.results) 
-						this.pullFlag = false;// 防上拉暴滑
-						setTimeout(()=>{this.pullFlag = true;},500)
-						if(this.hasNextPage){
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						}else{
-							this.pullUpOn = false
-							this.loadding = false
-							this.nomoreText = '已至底部'
-						}
+			GetSearchEquipmentListBottomData(){//上滑加载
+				this.listQuery.pageNum+=1
+				this.ProductService.GetSearchEquipmentList(this.listQuery).then(response =>{
+					let data = JSON.parse(response.data)
+					console.log(data)
+					this.total = data.total
+					this.list = this.list.concat(data.items) 
+					if(this.total>this.list.length){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.pullUpOn = true
+						this.loadding = false
+						this.nomoreText = '已至底部'
 					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			goOperator(item){
-				this.$api.setStorage('orderUserInfo',item)
-				this.$api.navigateTo('/seller/pages/supplier/addoperator')
-			},
 			onShowClose () {//输入框失去焦点时触发
-				if(this.searchInputVal != ''){
+				if(this.listQuery.keyword != ''){
 					this.isShowClose = true
 				}else{					
 					this.isShowClose = false
-					this.pageNum=1
-					this.initsupplierList()
+					this.listQuery.pageNum=1
+					this.GetSearchEquipmentList()
 				}
 			},
 			delInputText(){//清除输入框内容
-				this.searchInputVal = ''
+				this.listQuery.keyword = ''
 				this.isShowClose = false
-				this.pageNum=1
-				this.initsupplierList()
-			},
-			hidePhone(val){
-				let phone
-				if(val==null || val==""){
-					phone = ""	
-				}else{
-					phone = this.$reg.hidePhone(val)
-				}
-				return phone
+				this.listQuery.pageNum=1
+				this.GetSearchEquipmentList()
 			},
-			checkData (value){
-				let data;
-				if(value == null || value ==""){
-					data = ''
-				}else{
-					data = value
-				}
-				return data
+			navToDetailPage(id) {//跳转仪器详情页
+				this.$api.navigateTo(`/pages/goods/instrument-details?id=${id}`)
 			},
-			desensitizationName(val){
-				let name = this.$reg.desensitizationName(val)
+			isInterceptHtmlFn(text){
+				let name = this.$reg.interceptHtmlFn(text)
 				return name
-			}
+			},
 		},
 		onReachBottom() {
-			if(this.hasNextPage){
+			if(this.total>this.list.length){
 				this.loadding = true
 				this.pullUpOn = true
-				this.getOnReachBottomData()
+				this.GetSearchEquipmentListBottomData()
 			}	
 		},
 		onShow() {
-			this.$api.getStorage().then(response =>{
-				this.serviceProviderId = response.serviceProviderID
-				this.pageNum = 1;
-				this.initsupplierList();
-			})
+
 		}
 	}
 </script>
@@ -256,9 +178,9 @@
 		box-sizing: border-box;
 	}
 	.supplier-search{
-		height: 64rpx;
-		width: 702rpx;
-		padding: 24rpx;
+		height: 84rpx;
+		width: 100%;
+		padding:10rpx 24rpx;
 		background: #FFFFFF;
 		display: flex;
 		align-items: center;
@@ -266,6 +188,7 @@
 		top: 0;
 		left: 0;
 		z-index: 999;
+		box-sizing: border-box;
 		.search-from{
 			width: 582rpx;
 			height: 64rpx;
@@ -309,16 +232,15 @@
 			line-height: 64rpx;
 			text-align: center;
 			font-size: $font-size-28;
-			color: $text-color;
+			color: #666666;
 			float: left;
 			background: #FFFFFF;
 		}
 	}
-	.supplier-main{
+	.equipment-main{
 		box-sizing: border-box;
 		padding: 0 24rpx;
-		background-color:#FFFFFF ;
-		padding-top: 112rpx;
+		margin-top: 94rpx;
 	}
 	.list{
 		width: 340rpx;

+ 89 - 215
pages/search/search-supplier.vue

@@ -6,9 +6,10 @@
 				<input class="input" 
 					   type="text" 
 					   confirm-type="search" 
-					   v-model="searchInputVal" 
+					   v-model="listQuery.keyword" 
+					   :focus="isFocus"
 					   @input="onShowClose" 
-					   @confirm="initsupplierList()" 
+					   @confirm="GetSearchSupplierList()" 
 					   placeholder="请输入供应商名称" 
 					   maxlength="16"/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
@@ -19,16 +20,16 @@
 		</view>
 		<view class="supplier-main">
 			<view v-if="isEmpty" class="empty-container">
-				<image class="supplier-empty-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png" mode="aspectFit"></image>
-				<view class="txt">暂无供应商数据</view>
+				<image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
+				<view class="txt">暂无供应商数据^_^</view>
 			</view>
 			<view v-else class="supplier-list">
 					<view class="list clearfix" v-for="(item, index) in supplierList" :key="index">
 						<view class="list-top">
-							<view class="list-top-supplier" @click="goSupplier">
-								<view class="logo"><img :src="item.image" alt=""></view>
+							<view class="list-top-supplier" @click="goSupplier(item.id)">
+								<view class="logo"><img :src="item.s_logo" alt=""></view>
 								<view class="main">
-									<view class="name">{{ item.name }}</view>
+									<view class="name">{{ item.s_name }}</view>
 									<view class="massgs">
 										<view class="label">满意度:</view>
 										<view class="p-stars">
@@ -41,20 +42,23 @@
 							<view class="list-top-msg">
 								<view class="msg-pin clearfix">
 									<view class="label">经营品项:</view>
-									<view class="label-li">
-										<text class="text" v-for="(label, idx) in item.labels" :key="idx">{{ label.text }}</text>
+									<view class="label-li" v-if="item.s_business">
+										<text class="text" v-for="(label, idx) in SetNewBusiness(item.s_business)" :key="idx">{{ label }}</text>
+									</view>
+									<view class="label-li" v-else>
+										<text class="none">暂无</text>
 									</view>
 								</view>
 								<view class="msg-pin clearfix">
-									<view class="label">经营品项:</view>
-									<view class="label-text">广东省深圳市</view>
+									<view class="label">所在地区:</view>
+									<view class="label-text">{{ item.s_address ? item.s_address : '暂无'}}</view>
 								</view>
 							</view>
 						</view>
 						<view class="list-bottom">
-							<view class="pros-item" v-for="(pros, pdx) in item.list" :key="pdx">
-								<image class="pros-item-image" :src="pros.image" mode="scaleToFill"></image>
-								<view class="pros-name">{{ pros.name }}</view>
+							<view class="pros-item" v-for="(pros, pdx) in item.products" :key="pdx" @click.stop="navToDetailPage(pros.p_id)">
+								<image class="pros-item-image" :src="pros.p_image" mode="scaleToFill"></image>
+								<view class="pros-name">{{ pros.p_name }}</view>
 							</view>
 						</view>
 					</view>
@@ -72,8 +76,6 @@
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	
-	import { getFindAllsupplierList } from "@/api/seller.js"
 	export default {
 		components:{
 			tuiLoadmore,
@@ -86,159 +88,46 @@
 				iconColor:'#ff9100',
 				serviceProviderId:'',
 				isShowClose:false,
-				searchInputVal:'',
 				isEmpty:false,
+				isFocus:true,
+				productNoneImage:'http://static-b.caimei365.com/app/img/icon/icon-pnone.png',
 				nomoreText: '上拉显示更多',
-				pageNum:1,
-				pageSize:10,
-				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
 				pullFlag: true,
-				allowDataStatus:true,
-				wrapperHeight:'100%',
-				scrollHeight:'',
-				deleteAddressId:'',
-				currPage:'',//当前页面
-				prevPage:'',//上一个页面
-				tabCurrentIndex:0,
-				listStatus:1,
-				supplierList:[
-					{
-						image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-						name:'北京恩盛众成国际贸易有限公司',
-						labels:[
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'}
-						],
-						areatext:'广东省深圳市福田区',
-						list:[
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-						]
-					},{
-						image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-						name:'北京恩盛众成国际贸易有限公司',
-						labels:[
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'}
-						],
-						areatext:'广东省深圳市福田区',
-						list:[
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-						]
-					},{
-						image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-						name:'北京恩盛众成国际贸易有限公司',
-						labels:[
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'}
-						],
-						areatext:'广东省深圳市福田区',
-						list:[
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-						]
-					},{
-						image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-						name:'北京恩盛众成国际贸易有限公司',
-						labels:[
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'},
-							{text:'仪器护理类'}
-						],
-						areatext:'广东省深圳市福田区',
-						list:[
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-							{
-								image:'https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png',
-								name:'北京恩盛众成国际贸易有限公司',
-							},
-						]
-					},
-				],
+				supplierList:[],
 				isIphoneX:this.$store.state.isIphoneX,
-				show_index:0,//控制显示那个组件
+				listQuery:{
+					keyword: '',
+					pageSize: 10,
+					pageNum: 1
+				},
+				total:0
 			}
 		},
-		onLoad(){				
-			this.setScrollHeight();
+		onLoad(option){
+			if(option.keyword){
+				this.listQuery.keyword = option.keyword
+				this.GetSearchSupplierList();
+			}
 		},
 		methods: {
-			setScrollHeight() {
-				// 窗口高度 - 底部距离
-				setTimeout(()=> {
-					const query = wx.createSelectorQuery().in(this);
-					query.selectAll('.add-btn').boundingClientRect();
-					query.exec(res => {
-						if(res[0][0]){
-							let winHeight = this.$api.getWindowHeight(),
-								eleTop = res[0][0].top - 1;
-								this.scrollHeight =  eleTop;
-						}
-					})
-				}, 500)
-			},
-			searchsupplierList(){
-				this.pageNum=1
-				this.initsupplierList()
+			searchsupplierList(){//搜索
+				this.listQuery.pageNum=1
+				this.GetSearchSupplierList()
 			},
-			initsupplierList(){	
-				let params = { searchWord:this.searchInputVal,pageNum:1,pageSize:this.pageSize }
-				getFindAllsupplierList(params).then(response =>{
-					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
+			GetSearchSupplierList(){//查询供应商列表	
+				this.ShopService.GetSearchSupplierList(this.listQuery).then(response =>{
+					let data = JSON.parse(response.data)
+					let dataList = data.items
+					console.log(data)
+					this.total = data.total
+					if(dataList && dataList.length > 0){
 						this.isEmpty = false
-						this.hasNextPage = response.data.hasNextPage
-						this.supplierList =responseData.results
+						this.supplierList = dataList
 						this.pullFlag = false;
 						setTimeout(()=>{this.pullFlag = true;},500)
-						if(this.hasNextPage){
+						if(this.total>this.supplierList.length){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
 						}else{
@@ -253,84 +142,63 @@
 					this.$util.msg(error.msg,2000)
 				})
 			},	
-			getOnReachBottomData(){
-				this.pageNum+=1
-				let params = {searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize }
-				getFindAllsupplierList(params).then(response =>{
-					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
-						this.hasNextPage = response.data.hasNextPage
-						this.supplierList = this.supplierList.concat(responseData.results) 
-						this.pullFlag = false;// 防上拉暴滑
-						setTimeout(()=>{this.pullFlag = true;},500)
-						if(this.hasNextPage){
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						}else{
-							this.pullUpOn = false
-							this.loadding = false
-							this.nomoreText = '已至底部'
-						}
+			GetSearchSupplierListBottomData(){//上滑加载
+				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.supplierList = this.supplierList.concat(data.items) 
+					if(this.total>this.supplierList.length){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.pullUpOn = true
+						this.loadding = false
+						this.nomoreText = '已至底部'
 					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			goOperator(item){
-				this.$api.setStorage('orderUserInfo',item)
-				this.$api.navigateTo('/seller/pages/supplier/addoperator')
-			},
 			onShowClose () {//输入框失去焦点时触发
-				if(this.searchInputVal != ''){
+				if(this.listQuery.keyword != ''){
 					this.isShowClose = true
 				}else{					
 					this.isShowClose = false
-					this.pageNum=1
-					this.initsupplierList()
+					this.listQuery.pageNum=1
+					this.GetSearchSupplierList()
 				}
 			},
 			delInputText(){//清除输入框内容
-				this.searchInputVal = ''
+				this.listQuery.keyword = ''
 				this.isShowClose = false
-				this.pageNum=1
-				this.initsupplierList()
+				this.listQuery.pageNum=1
+				this.GetSearchSupplierList()
 			},
-			hidePhone(val){
-				let phone
-				if(val==null || val==""){
-					phone = ""	
-				}else{
-					phone = this.$reg.hidePhone(val)
-				}
-				return phone
+			navToDetailPage(id) {//跳转商品详情页
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 			},
-			checkData (value){
-				let data;
-				if(value == null || value ==""){
-					data = ''
-				}else{
-					data = value
-				}
-				return data
+			SetNewBusiness(value){//回显处理主营内容
+				let Array = []
+				value.split('/').forEach((item,index) =>{
+					Array.push(item)
+				})
+				return Array
+			},
+			goSupplier(value){//跳供应商资料页
+				this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+value)
 			},
-			desensitizationName(val){
-				let name = this.$reg.desensitizationName(val)
-				return name
-			}
 		},
 		onReachBottom() {
-			if(this.hasNextPage){
+			if(this.total>this.supplierList.length){
 				this.loadding = true
 				this.pullUpOn = true
-				this.getOnReachBottomData()
+				this.GetSearchSupplierListBottomData()
 			}	
 		},
 		onShow() {
-			this.$api.getStorage().then(response =>{
-				this.serviceProviderId = response.serviceProviderID
-				this.pageNum = 1;
-				this.initsupplierList();
-			})
+			
 		}
 	}
 </script>
@@ -352,9 +220,9 @@
 		box-sizing: border-box;
 	}
 	.supplier-search{
-		height: 64rpx;
-		width: 702rpx;
-		padding: 24rpx;
+		height: 84rpx;
+		width: 100%;
+		padding:10rpx 24rpx;
 		background: #FFFFFF;
 		display: flex;
 		align-items: center;
@@ -362,6 +230,7 @@
 		top: 0;
 		left: 0;
 		z-index: 999;
+		box-sizing: border-box;
 		.search-from{
 			width: 582rpx;
 			height: 64rpx;
@@ -405,13 +274,13 @@
 			line-height: 64rpx;
 			text-align: center;
 			font-size: $font-size-28;
-			color: $text-color;
+			color: #666666;
 			float: left;
 			background: #FFFFFF;
 		}
 	}
 	.supplier-main{
-		padding-top: 112rpx;
+		margin-top: 94rpx;
 	}
 	.list{
 		box-sizing: border-box;
@@ -454,6 +323,11 @@
 					font-size: $font-size-20;
 					text-align: center;
 					margin: 10rpx;
+					margin-top: 5rpx;
+				}
+				.none{
+					font-size: $font-size-20;
+					color: #999999;
 				}
 			}
 			.label-text{

+ 59 - 53
pages/search/search.vue

@@ -13,9 +13,9 @@
 					<view class="tui-menu-item" @tap="selectTabs(3)">项目仪器</view>
 				</tui-bubble-popup>
 			</view>
-			<view class="gosearch-btn" @click="this.$api.navigateTo(clickPath)">
+			<view class="gosearch-btn">
 				<text class="iconfont icon-sousuo"></text>
-				<input class="input" maxlength="20" :focus="isFocus" type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="subMitSearch()" placeholder="请输入关键词" v-model.trim="searchInputVal"/>
+				<input class="input" maxlength="20" :focus="isFocus" type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="subMitSearch()" placeholder="请输入关键词" v-model.trim="listQuery.keyword"/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click.stop="delInputText()"></text>
 			</view>
 			<view class="search-btn" @click="subMitSearch()">搜索</view>
@@ -51,13 +51,13 @@
 								<view class="floor-tags">阶梯价格</view>	
 							</view>
 							<view v-if="hasLogin"class="list-price">
-								<view v-if="userIdentity == 1">
+								<template v-if="userIdentity == 1">
 									<text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
 									<text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
 									</text>
-								</view>	
-								<view v-if="userIdentity == 4">
+								</template>	
+								<template v-if="userIdentity == 4">
 									<view class="price-larger" v-if="item.p_price_flag == '1'">
 										<text class="txt">¥未公开价格</text>
 									</view>
@@ -70,8 +70,25 @@
 											¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
 										</text>
 									</view>
-								</view>
-								<view v-if="userIdentity == 2">
+								</template>
+								<template v-if="userIdentity == 3">
+									<template v-if="item.supplierId == shopId">
+										<view class="price-larger" v-if="item.p_price_flag == '1'">
+											<text class="txt">¥未公开价格</text>
+										</view>
+										<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
+										<text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
+											¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
+										</text>
+									</template>
+									<template v-else>
+										<view  class="list-login-now">
+											<text class="p-no">¥</text>
+											<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
+										</view>
+									</template>
+								</template>
+								<template v-if="userIdentity == 2">
 									<view class="price-larger" v-if="item.p_price_flag == '1'">
 										<text class="txt">¥未公开价格</text>
 									</view>
@@ -79,11 +96,11 @@
 									<text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
 										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
 									</text>
-								</view>
+								</template>
 							</view>	
 							<view  v-else class="list-login-now">
 								<text class="p-no">¥</text>
-								<uni-stars :stars="parseInt(item.p_price_grade)" :font-size='36' :width-info="180"></uni-stars>
+								<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
 							</view>
 						</view>
 					</view>
@@ -106,27 +123,21 @@
 <script>
 	import { mapState,mapMutations } from 'vuex'
 	import modalLayer from "@/components/modal-layer"
-	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'
-	import { 
-		queryNewSearchProduct , 
-		querySearchHistory,
-		clearSearchHistory,
-		searchHistoryAdd
-	} from "@/api/product.js" 
 	
 	export default {
 		components: {
 			modalLayer,
-			uniStars
+			uniGrader
 		},
 		data() {
 			return {
+				shopId:0,
 				userID:0,
 				tabValue:'产品',
 				themeClass: 'block',
 				show:false,
-				searchInputVal:'',	//搜索关键词
 				userIdentity:'',	
 				identity:2,
 				searchKeyType:1,
@@ -145,19 +156,22 @@
 				showLoading: false,
 				loadingNow: true,
 				loadingText: '上拉加载更多',
-				pageSize: 20,
-				pageNum: 1,
-				hasNextPage: false,
-				totalPage: 1,
 				pullFlag: true,
+				listQuery:{
+					identity:0,
+					keyword:'',
+					sortField:'',
+					sortType:'',
+					pageNum: 1,
+					pageSize: 20,
+				},
+				total:0
 			}
 		},
 		onLoad(option) {
 			this.isFocus = true
-			console.log(option)
 			if(option.keyWord){
-				this.searchInputVal = option.keyWord
-				this.getListFromServer();
+				
 			}
 			this.initGetSerachRecord()			
 		},
@@ -173,21 +187,22 @@
 			initGetSerachRecord(){
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID ? resolve.userID : 0;
+					this.shopId = resolve.shopID ? resolve.shopID : 0;
 					this.userIdentity = resolve.userIdentity ? resolve.userIdentity : '';
 					if(this.userIdentity == 1){
-						this.identity = 1
+						this.listQuery.identity = 1
 					}else{
-						this.identity = 2
+						this.listQuery.identity = 2
 					}
-				    querySearchHistory({userId:this.userID}).then(response =>{
+				    this.ProductService.GetProductSearchHistory({userId:this.userID}).then(response =>{
 						if(response.code == 0){
 							this.serachRecordList = response.data
 						}
 				    })
 				})	
 			},
-			subMitSearch() {
-				if (this.searchInputVal == '') {
+			subMitSearch() {//搜索
+				if (this.listQuery.keyword == '') {
 					this.$util.msg('请输入商品关键词',2000);
 				}else{
 					switch(this.searchKeyType){
@@ -198,16 +213,16 @@
 							this.isFocus = false
 							break;
 						case 2:
-							this.$api.navigateTo(`/pages/search/search-supplier?keyword=${this.searchInputVal}`);
+							this.$api.navigateTo(`/pages/search/search-supplier?keyword=${this.listQuery.keyword}`);
 							break;
 						case 3:
-							this.$api.navigateTo(`/pages/search/search-instrument?keyword=${this.searchInputVal}`);
+							this.$api.navigateTo(`/pages/search/search-instrument?keyword=${this.listQuery.keyword}`);
 							break;
 					}
 				}
 			},
 			scrolltolower() {
-				if(this.totalPage>this.listData.length && this.pullFlag) {
+				if(this.total>this.listData.length && this.pullFlag) {
 					this.getListFromServer(true);
 				}
 			},
@@ -217,23 +232,14 @@
 				this.loadingText = '加载中';
 				this.showEmpty = false;				
 				if(loadMore) {
-					this.pageNum += 1;
+					this.listQuery.pageNum += 1;
 				}
-				let params = {
-						identity:this.identity,
-						keyword:this.searchInputVal,
-						pageNum:this.pageNum,
-						pageSize:this.pageSize,
-						sortField:'',
-						sortType:'',
-					}
-				queryNewSearchProduct(params).then(response =>{
+				this.ProductService.GetProductSearchList(this.listQuery).then(response =>{
 					this.isShowWrapper = true
 					const resData = JSON.parse(response.data);
 					const resList = resData.items;
-					// console.log(resData)
 					if(resList && resList.length > 0){
-						this.totalPage = resData.total;
+						this.total = resData.total;
 						this.showEmpty = false;
 						if(loadMore) {
 							this.listData = [...this.listData,...resList];
@@ -263,7 +269,7 @@
 			},
 			setSearchHistoryAdd(){//添加搜索记录
 				if (!this.hasLogin) {return false;}
-				searchHistoryAdd({userId: this.userID,keyword:this.searchInputVal}).then(response =>{
+				this.ProductService.GetAddProductSearchHistory({userId: this.userID,keyword:this.listQuery.keyword}).then(response =>{
 					//此为每次搜索同时添加用户的搜索记录
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
@@ -306,27 +312,27 @@
 				return false
 			},
 			onShowClose () {//输入框输入时触发
-				this.inputEmpty(this.searchInputVal)
+				this.inputEmpty(this.listQuery.keyword)
 			},
 			onFocus () { //输入框获取焦点时触发
-				this.inputEmpty(this.searchInputVal)
+				this.inputEmpty(this.listQuery.keyword)
 				this.initGetSerachRecord()
 			},
 			delInputText () { //清除输入框内容
-				this.searchInputVal = ''
+				this.listQuery.keyword = ''
 				this.isShowClose = false
 				this.isShowWrapper = false
-				this.inputEmpty(this.searchInputVal)
+				this.inputEmpty(this.listQuery.keyword)
 				this.initGetSerachRecord()
 			},
 			keywordsClick (item) {//关键词搜索与历史搜索
-				this.searchInputVal = item;
+				this.listQuery.keyword = item;
 				this.isShowClose = true;
 				this.subMitSearch();
 			},
 			confirmDetele() {//清空历史记录
 				this.$util.modal('提示','确定删除历史记录?','确定','取消',true,() =>{
-					clearSearchHistory({userId:this.userID}).then(response =>{
+					this.ProductService.GetDeleteProductSearchHistory({userId:this.userID}).then(response =>{
 						this.$util.msg('删除成功',2000,true,'success')
 						this.serachRecordList=[];
 					}).catch(error =>{
@@ -468,7 +474,7 @@
 			line-height: 70rpx;
 			float: right;
 			text-align: center;
-			color: $color-system;
+			color: #666666;
 			font-size: $font-size-24;
 		}
 	}

+ 1 - 2
pages/tabBar/category/category.vue

@@ -36,7 +36,6 @@
 </template>
 <script>
 	import btSearch from '@/components/uni-search/bt-search.vue'
-	import { queryGoodscategory } from "@/api/product.js"
 	export default {
 		components: {
 			btSearch
@@ -64,7 +63,7 @@
 			},
 			// 获取商品分类列表
 			getProductCate () {
-				queryGoodscategory().then(res =>{
+				this.ProductService.GetProductClassify().then(res =>{
 					this.categoryList = res.data
 					// 查询第一个拥有二级菜单的子菜单
 					for (let i = 0; i < this.categoryList.length; i++) {

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

@@ -107,11 +107,6 @@
 		},
 		onLoad() {
 			
-		},
-		filters: {
-			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2);
-			},
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo','isActivity'])
@@ -203,18 +198,10 @@
 			GetHomeRecommendInfo(){//首页热门推荐
 				this.CommonService.GetHomeRecommendInfo().then(response =>{
 					this.RecommendList = response.data
-					this.getProductPrice()
-				})
-			},
-			getOrganizeProducts(){//获取模块三商品
-				this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:6}).then(res =>{
-					this.organizeProducts = res.data.results
-					this.getProductPrice()
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
+					this.GetProductPrice()
 				})
 			},
-			getProductPrice(){//获取商品或者活动价格
+			GetProductPrice(){//获取商品或者活动价格
 				let productIdArr = [];
 				let productIds ='';
 				this.RecommendList.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开

+ 2 - 3
pages/user/invoice/invoice.vue

@@ -31,7 +31,6 @@
 	</view>
 </template>
 <script>
-	import { querySaveInvoice, queryInvoice } from "@/api/other.js"
 	export default {
 		data() {
 			return {
@@ -132,7 +131,7 @@
 			},
 			getInvoiceInfo(){
 				this.$api.getStorage().then((resolve) =>{
-					queryInvoice({userId:resolve.userID}).then(response =>{
+					this.ProductService.GetPersonalCenterFindInvoice({userId:resolve.userID}).then(response =>{
 						let resData = response.data
 						this.invoiceData.companyName = resData.invoiceTitle;
 						this.invoiceData.taxId = resData.corporationTaxNum;
@@ -151,7 +150,7 @@
 						bankNum: bankAccountNo, phoneNum:registeredPhone, address:registeredAddress} = invoiceData;
 				let params = {userId: this.userId, invoiceTitle, corporationTaxNum, openBank,
 							bankAccountNo: bankAccountNo.replace(/\s*/g,""), registeredPhone, registeredAddress};
-				querySaveInvoice(params).then(response =>{
+				this.ProductService.GetPersonalCenterInvoice(params).then(response =>{
 					this.$util.msg('保存成功',2000);
 					setTimeout(()=>{
 						uni.navigateBack({

+ 10 - 10
pages/user/operator/addoperator.vue

@@ -24,7 +24,6 @@
 
 <script>	
 	import authorize from '@/common/config/authorize.js'	
-	import { addOperator } from "@/api/operator.js"
 	
 	export default {
 		data() {
@@ -61,7 +60,7 @@
 						clubID:this.clubID,
 						configFlag:2
 					}
-				addOperator(params).then(response =>{
+				this.UserService.PostAddOperator(params).then(response =>{
 					this.$util.msg('添加成功',2000,true,'success')
 					setTimeout(() =>{
 						uni.navigateBack();
@@ -89,17 +88,18 @@
 	.operator{
 		padding-top: 160rpx;
 		.operator-content{
-			width: 702rpx;
-			padding:0 24rpx;
+			width: 100%;
+			padding: 0 75rpx;
+			box-sizing: border-box;
 			.operator-from{
 				width: 100%;
 				height: auto;
 				.from-row{
 					height: 40rpx;
-					padding: 24rpx;
+					padding: 24rpx 40rpx;
 					background: #F7F7F7;
-					border-radius: 14rpx;
-					margin-bottom: 20rpx;
+					border-radius: 44rpx;
+					margin-bottom: 40rpx;
 					font-size: $font-size-28;
 					color: $text-color;
 					.input{
@@ -145,7 +145,7 @@
 			
 		}
 		.add-btn{
-			width: 702rpx;
+			width: 600rpx;
 			height: 88rpx;
 			font-size: $font-size-28;
 			line-height: 88rpx;
@@ -153,12 +153,12 @@
 			margin: 0 auto;
 			text-align: center;
 			background: $btn-confirm;
-			border-radius: 14rpx;
+			border-radius: 44rpx;
 			margin-top: 80rpx;
 		}
 		.add-btn.disabled{
 			background: #F8F8F8;
-			border-radius: 14rpx;
+			border-radius: 44rpx;
 		}
 	}
 </style>

+ 16 - 18
pages/user/operator/list.vue

@@ -83,8 +83,6 @@
 	import authorize from '@/common/config/authorize.js'	
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	
-	import { queryOperatorList, deleteOperator , updateCode } from "@/api/operator.js"
 	export default {
 		components:{
 			tuiLoadmore,
@@ -142,7 +140,7 @@
 			},
 			initOperatorList(){	
 				let params = {clubID:this.clubID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryOperatorList(params).then(response =>{
+				this.UserService.QueryOperatorList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
@@ -168,7 +166,7 @@
 			getOnReachBottomData(){
 				this.pageNum+=1
 				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryOperatorList(params).then(response =>{
+				this.UserService.QueryOperatorList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = response.data.hasNextPage
@@ -197,7 +195,7 @@
 			},
 			deleteOperator(id){//删除运营人员
 				this.$util.modal('','确定删除运营人员吗?','确定删除','取消',true,() =>{
-					deleteOperator({id:id}).then(response =>{
+					this.UserService.PostDeleteOperator({id:id}).then(response =>{
 						this.$util.msg('删除成功',2000,true,'success')
 						this.initOperatorList()
 					}).catch(error =>{
@@ -207,7 +205,7 @@
 			},
 			updateInvitationCode(item){	//更新邀请码	
 				this.$util.modal('','确定更新邀请码并发送给运营人员?','确定更新','取消',true,() =>{
-					updateCode({id:item.id,status:item.status}).then(response =>{
+					this.UserService.PostUpdateOperatorCode({id:item.id,status:item.status}).then(response =>{
 						this.$util.msg('更新邀请码成功',2000)
 						this.isOperatorModel = false
 						this.initOperatorList()
@@ -337,13 +335,13 @@
 			.head{
 				width: 92rpx;
 				height: 92rpx;
-				border-radius: 14rpx;
+				border-radius: 50%;
 				border: 1px solid #ebebeb;
 				float: left;
 				image{
 					width: 92rpx;
 					height: 92rpx;
-					border-radius: 14rpx;
+					border-radius: 50%;
 				}
 			}
 		}
@@ -355,7 +353,7 @@
 				height: 40rpx;
 				padding: 20rpx;
 				background: $sub-bg-color;
-				border-radius: 14rpx;
+				border-radius: 40rpx;
 				position: relative;
 				margin-bottom: 20rpx;
 				float: left;
@@ -391,7 +389,7 @@
 					.search-btn{
 						width: 170rpx;
 						height: 78rpx;
-						border-radius: 14rpx;
+						border-radius: 39rpx;
 						font-size: $font-size-28;
 						color: #FFFFFF;
 						line-height: 78rpx;
@@ -429,11 +427,11 @@
 			.list-head{
 				width: 92rpx;
 				height: 92rpx;
-				border-radius: 14rpx;
+				border-radius: 50%;
 				image{
 					width: 92rpx;
 					height: 92rpx;
-					border-radius: 14rpx;
+					border-radius: 50%;
 				}
 			}
 			.list-tel{
@@ -458,7 +456,7 @@
 					width: 186rpx;
 					height: 64rpx;
 					padding:0 16rpx;
-					border-radius: 10rpx;
+					border-radius: 32rpx;
 					border: 1px solid #DDDDDD;
 					line-height: 64rpx;
 					font-size: $font-size-24;
@@ -479,7 +477,7 @@
 					width: 86rpx;
 					height: 64rpx;
 					padding:0 24rpx;
-					border-radius: 10rpx;
+					border-radius: 32rpx;
 					border: 1px solid #DDDDDD;
 					line-height: 64rpx;
 					font-size: $font-size-24;
@@ -560,18 +558,18 @@
 		align-items: center;
 		justify-content: center;
 		.add-btn{
-			width: 702rpx;
+			width: 600rpx;
 			height: 88rpx;
 			font-size: $font-size-28;
 			line-height: 88rpx;
 			color: #FFFFFF;
 			text-align: center;
 			background: $btn-confirm;
-			border-radius: 14rpx;
+			border-radius: 44rpx;
 		}
 	}
 	.adds-btn{
-		width: 702rpx;
+		width: 600rpx;
 		height: 88rpx;
 		font-size: 28rpx;
 		line-height: 88rpx;
@@ -579,7 +577,7 @@
 		margin: 0 auto;
 		text-align: center;
 		background: #000000;
-		border-radius: 14rpx;
+		border-radius: 44rpx;
 	}
 </style>
 

+ 1 - 2
seller/pages/cart/immediately.vue

@@ -88,7 +88,6 @@
 
 <script>
 	import immediatelyList from '@/components/cm-module/listTemplate/immediatelyList'
-	import { querySearchProductLadderPrice } from "@/api/product.js"
 	export default{
 		components:{
 			immediatelyList
@@ -164,7 +163,7 @@
 					this.buyRetailPriceStep = data.step
 					this.specClass = 'show';
 					if(this.handleData.ladderPriceFlag == '1'){
-						querySearchProductLadderPrice({productId:this.handleData.p_id}).then(response=>{
+						this.ProductService.GetSearchProductLadderPrice({productId:this.handleData.p_id}).then(response=>{
 							this.handleDataLadderPriceList = response.data
 							this.handleDataLadderPriceList.forEach((item,index)=>{
 								if(this.number>=item.buyNum){

+ 0 - 1
seller/pages/cart/second.vue

@@ -41,7 +41,6 @@
 
 <script>
 	import secondHand from '@/components/cm-module/listTemplate/secondHand'
-	import { querySearchProductLadderPrice } from "@/api/product.js"
 	export default{
 		components:{
 			secondHand

+ 4 - 10
seller/pages/search/search.vue

@@ -82,12 +82,6 @@
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import authorize from '@/common/config/authorize.js'
-	import { 
-		queryNewSearchProduct , 
-		querySearchHistory,
-		clearSearchHistory,
-		searchHistoryAdd
-	} from "@/api/product.js" 
 	
 	export default {
 		components: {
@@ -140,7 +134,7 @@
 					}else{
 						this.identity = 2
 					}
-				    querySearchHistory({userId:this.userID}).then(response =>{
+				    this.ProductService.GetProductSearchHistory({userId:this.userID}).then(response =>{
 						if(response.code == 0){
 							this.serachRecordList = response.data
 						}
@@ -178,7 +172,7 @@
 						sortField:'',
 						sortType:'',
 					}
-				queryNewSearchProduct(params).then(response =>{
+				this.ProductService.GetProductSearchList(params).then(response =>{
 					this.isShowWrapper = true
 					const resData = JSON.parse(response.data);
 					const resList = resData.items;
@@ -214,7 +208,7 @@
 			},
 			setSearchHistoryAdd(){//添加搜索记录
 				if (!this.hasLogin) {return false;}
-				searchHistoryAdd({userId: this.userID,keyword:this.searchInputVal}).then(response =>{
+				this.ProductService.GetAddProductSearchHistory({userId: this.userID,keyword:this.searchInputVal}).then(response =>{
 					//此为每次搜索同时添加用户的搜索记录
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
@@ -273,7 +267,7 @@
 			},
 			confirmDetele() {//清空历史记录
 				this.$util.modal('提示','确定删除历史记录?','确定','取消',true,() =>{
-					clearSearchHistory({userId:this.userID}).then(response =>{
+					this.ProductService.GetDeleteProductSearchHistory({userId:this.userID}).then(response =>{
 						this.$util.msg('删除成功',2000,true,'success')
 						this.serachRecordList=[];
 					}).catch(error =>{

+ 2 - 2
services/ajax.env.js

@@ -1,10 +1,10 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	URL_CONFIG = 'http://192.168.2.68: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-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境

+ 50 - 3
services/product.service.js

@@ -86,7 +86,6 @@ export default class ProductService {
 	shoppingCartUpdate (data = {}) {
 		return this.AjaxService.post({ url:'/shoppingCart/update', data, isLoading: true })
 	}
-	
 	/**
 	 * @删除购物车商品
 	 * @param:userId 用户ID(必填)
@@ -97,7 +96,7 @@ export default class ProductService {
 	}
 	/* 二级列表 */
 	GetPageTopic (data = {}) {
-		return this.AjaxService.get({ url:'/page/topic', data, isLoading: false })
+		return this.AjaxService.get({ url:'/page/topic', data, isLoading: true })
 	}
 	/* 二级列表banner */
 	GetPageTopicBanner (data = {}) {
@@ -105,6 +104,54 @@ export default class ProductService {
 	}
 	/* 活动专题列表 */
 	GetPromotionsrList (data = {}) {
-		return this.AjaxService.get({ url:'/promotions/list', data, isLoading: false })
+		return this.AjaxService.get({ url:'/promotions/list', data, isLoading: true })
+	}
+	/* 搜索项目仪器列表 */
+	GetSearchEquipmentList (data = {}) {
+		return this.AjaxService.get({ url:'/search/query/equipment', data, isLoading: true })
+	}
+	/* 项目仪器详情 */
+	GetEquipmentDetails (data = {}) {
+		return this.AjaxService.get({ url:'/equipment/recommend', data, isLoading: true })
+	}
+	/* 查询搜索历史记录 */
+	GetProductSearchHistory (data = {}) {
+		return this.AjaxService.get({ url:'/product/searchHistory', data, isLoading: false })
+	}
+	/* 添加搜索历史记录 */
+	GetAddProductSearchHistory (data = {}) {
+		return this.AjaxService.get({ url:'/product/history/add', data, isLoading: true })
+	}
+	/* 清除搜索历史记录 */
+	GetDeleteProductSearchHistory (data = {}) {
+		return this.AjaxService.get({ url:'/product/searchHistory/delete', data, isLoading: false })
+	}
+	/* 搜索商品列表 */
+	GetProductSearchList (data = {}) {
+		return this.AjaxService.get({ url:'/search/query/product', data, isLoading: true })
+	}
+	/* 获取商品评价 */
+	GetProductEvaluate (data = {}) {
+		return this.AjaxService.get({ url:'/product/evaluate', data, isLoading: false })
+	}
+	/* 获取再次购买商品列表 */
+	GetRepeatBuyAgainProductList (data = {}) {
+		return this.AjaxService.get({ url:'/repeat/buyAgain', data, isLoading: true })
+	}
+	/* 新商品搜索查询商品阶梯价格 */
+	GetSearchProductLadderPrice (data = {}) {
+		return this.AjaxService.get({ url:'/product/ladderPrice', data, isLoading: false })
+	}
+	/* 获取分类导航 */
+	GetProductClassify (data = {}) {
+		return this.AjaxService.get({ url:'/product/classify', data, isLoading: true })
+	}
+	/* 获取小程序三个模块商品列表 */
+	GetProductPreferred (data = {}) {
+		return this.AjaxService.get({ url:'/product/preferred', data, isLoading: true })
+	}
+	/* 发票信息保存 */
+	GetPersonalCenterInvoice (data = {}) {
+		return this.AjaxService.post({ url:'/personalCenter/invoice', data, isLoading: true })
 	}
 }

+ 4 - 0
services/shop.service.js

@@ -6,6 +6,10 @@ export default class ShopService {
 		Object.assign(this, { AjaxService })
 		this.name = 'ShopService'
 	}
+	/* 小程序-搜索供应商列表 */
+	GetSearchSupplierList (data = {}) {
+		return this.AjaxService.get({ url:'/search/query/supplier', data, isLoading: true })
+	}
 	/* 小程序供应商个人中心 */
 	GetHomePageData (data = {}) {
 		return this.AjaxService.get({ url:'/supplier/homePageData', data, isLoading: true })

+ 16 - 0
services/user.service.js

@@ -51,5 +51,21 @@ export default class UserService {
 	PersonalInfo (data = {}) {
 		return this.AjaxService.get({ url:'/personalCenter/myCentre', data, isLoading: true })
 	}
+	/* 运营人员管理-列表 */
+	QueryOperatorList (data = {}) {
+		return this.AjaxService.get({ url:'/operation/list', data, isLoading: true })
+	}
+	/* 运营人员管理-添加 */
+	PostAddOperator (data = {}) {
+		return this.AjaxService.post({ url:'/operation/add', data, isLoading: true })
+	}
+	/* 运营人员管理-删除 */
+	PostDeleteOperator (data = {}) {
+		return this.AjaxService.post({ url:'/operation/delete', data, isLoading: true })
+	}
+	/* 运营人员管理-更新邀请码 */
+	PostUpdateOperatorCode (data = {}) {
+		return this.AjaxService.post({ url:'/operation/updateInvitationCode', data, isLoading: true })
+	}
 	
 }

+ 292 - 183
supplier/pages/user/my-shop.vue

@@ -1,68 +1,116 @@
 <template>
 	<view class="container shop clearfix" :style="{paddingTop:CustomBar+'px'}">
 		<!-- 主页内容 -->
-		<view class="container-shop tui-skeleton">
-			<!-- 轮播 -->
-			<view class="shop-search">
-				<text class="iconfont icon-sousuo"></text>
-				<input class="input" maxlength="20" type="text" value="" v-model.trim="listQuery.keyword" confirm-type="search" @confirm="SubMitSearch()" placeholder="搜索本店铺商品" />
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<template v-else>
+			<view class="shop-search-main">
+				<view class="shop-search">
+					<text class="iconfont icon-sousuo"></text>
+					<input class="input" maxlength="20" type="text" value="" v-model.trim="listQuery.keyword" confirm-type="search" @confirm="SubMitSearch()" placeholder="搜索本店铺商品" />
+				</view>
 			</view>
-			<view class="product-supplier" @click="goSupplier">
-				<view class="logo"><img :src="shopLogo" alt=""></view>
-				<view class="main">
-					<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> {{ normalNum }} </text>件商品
+			<view class="container-shop tui-skeleton">
+				<!-- 轮播 -->
+				<view class="product-supplier" @click="goSupplier">
+					<view class="logo"><img :src="shopLogo" alt=""></view>
+					<view class="main">
+						<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> {{ normalNum }} </text>件商品
+							</view>
 						</view>
 					</view>
+					<view class="right"><text class="iconfont icon-xiayibu"></text></view>
 				</view>
-				<view class="right"><text class="iconfont icon-xiayibu"></text></view>
-			</view>
-			<banner :list="bannerImageList"></banner>
-		</view>	
-		<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 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="" v-if="hasLogin">
-							<view v-if="userIdentity == 4">
-								<view class="title-none" v-show="item.priceFlag == '1'">
-									<text class="p big">¥未公开价格</text>
-								</view>
-								<view class="title-none" v-show="item.priceFlag == '2'">
-									<text class="p big">¥价格仅会员可见</text>
-								</view>
-								<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>
+				<banner :list="bannerImageList"></banner>
+			</view>	
+			<view class="container-section tui-skeleton" v-if="recommendList.length > 0">
+				<view class="tab-title">主推商品</view>
+				<view class="section-product clearfix">
+					<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="" v-if="hasLogin">
+								<template v-if="userIdentity == 4">
+									<view class="title-none" v-show="item.priceFlag == '1'">
+										<text class="p big">¥未公开价格</text>
+									</view>
+									<view class="title-none" v-show="item.priceFlag == '2'">
+										<text class="p big">¥价格仅会员可见</text>
+									</view>
+									<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>
+								</template>
+								<template v-if="userIdentity == 3">
+									<template v-if="item.supplierId == shopId">
+										<view class="title-none" v-if="item.p_price_flag == '1'">
+											<text class="p big">未公开价格</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>	
+										<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>
+									</template>	
+									<template v-else>
+										<view class="no-price">
+											<view class="p-stars">
+												<text class="p-no">¥</text>
+												<uni-grader :grade="Number(item.priceGrade)"></uni-grader>
+											</view>
+										</view>	
 									</template>
-								</view>
+								</template>
+								<template v-else>
+									<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>
+								</template>
 							</view>
-							<view v-else>
-								<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>
+							<view v-else class="no-price">
+								<view class="p-stars">
+									<text class="p-no">¥</text>
+									<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>
@@ -73,87 +121,103 @@
 										<view class="floor-tags">阶梯价格</view>	
 									</template>
 								</view>
-							</view>
+							</view>	
 						</view>
-						<view v-else class="no-price">
-							<view class="p-stars">
-								<text class="p-no">¥</text>
-								<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>
 				</view>
 			</view>
-		</view>
-		<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 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.p_name}}</text>
-						</view>
-						<view class="" v-if="hasLogin">
-							<view v-if="userIdentity == 4">
-								<view class="title-none" v-show="item.p_price_flag == '1'">
-									<text class="p big">¥未公开价格</text>
-								</view>
-								<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.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 class="container-section tui-skeleton">
+				<view class="tab-title">全部商品</view>
+				<view class="section-product clearfix">
+					<view class="floor-item-none" v-if="isEmpty">
+						<text>暂无数据~</text>
+					</view>
+					<view v-else 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.p_name}}</text>
 							</view>
-							<view v-else>
-								<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 class="" v-if="hasLogin">
+								<template v-if="userIdentity == 4">
+									<view class="title-none" v-show="item.p_price_flag == '1'">
+										<text class="p big">¥未公开价格</text>
+									</view>
+									<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.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>
+								</template>
+								<template v-if="userIdentity == 3">
+									<template v-if="item.supplierId == shopId">
+										<view class="title-none" v-if="item.p_price_flag == '1'">
+											<text class="p big">未公开价格</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>	
+										<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>
+									</template>	
+									<template v-else>
+										<view class="no-price">
+											<view class="p-stars">
+												<text class="p-no">¥</text>
+												<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
+											</view>
+										</view>	
 									</template>
-								</view>
+								</template>
+								<template v-else>
+									<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>
+								</template>
 							</view>
+							<view v-else class="no-price">
+								<view class="p-stars">
+									<text class="p-no">¥</text>
+									<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
+								</view>
+							</view>	
 						</view>
-						<view v-else class="no-price">
-							<view class="p-stars">
-								<text class="p-no">¥</text>
-								<uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
-							</view>
-						</view>	
 					</view>
 				</view>
 			</view>
-		</view>
+		</template>
 		<!-- 侧边 -->
 		<scroll-top v-if="isScrollTop"></scroll-top>
 	</view>
@@ -173,6 +237,7 @@
 		data() {
 			return {
 				userID:0,
+				supplierId:0,
 				shopId:0,
 				iconClass:'icon-aixin',
 				iconColor:'#ff9100',
@@ -180,9 +245,12 @@
 				shopName:'',
 				shopLogo:'',
 				normalNum:0,
+				isEmpty:false,
+				skeletonShow: true,
 				bannerImageList:[],
 				recommendList:[],
 				productList:[],
+				userIdentity:'',
 				listQuery:{
 					keyword: '',
 					pageSize: 10,
@@ -193,10 +261,15 @@
 			}
 		},
 		onLoad(option) {
-			this.listQuery.id = this.shopId = option.shopId
-			console.log(this.shopId)
-			console.log(this.listQuery.id)
-			this.InitShopDataInfo()
+			this.listQuery.id = this.supplierId = option.shopId
+			this.$api.getStorage().then((resolve) =>{
+				this.shopId = resolve.shopID
+				this.userID = resolve.userID
+				this.userIdentity = resolve.userIdentity
+				this.InitShopDataInfo()
+			}).catch( error =>{
+				this.InitShopDataInfo()
+			})
 		},
 		filters: {
 			NumFormat:function(text) {//处理金额
@@ -213,16 +286,17 @@
 				this.GetSupplierHomeDeatils()
 				this.GetSupplierHomeProduct()
 				this.GetSupplierHomeProductList()
+				this.skeletonShow =false
 			},
 			GetSupplierHomeBanner(){//轮播图
-				this.ShopService.GetSupplierHomeBanner({supplierId:this.shopId}).then(response =>{
+				this.ShopService.GetSupplierHomeBanner({supplierId:this.supplierId}).then(response =>{
 					this.bannerImageList = response.data;
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetSupplierHomeDeatils(){//商铺详情
-				this.ShopService.GetSupplierHomeDeatils({supplierId:this.shopId}).then(response =>{
+				this.ShopService.GetSupplierHomeDeatils({supplierId:this.supplierId}).then(response =>{
 					let data = response.data
 					this.normalNum = data.normalNum
 					this.shopName = data.name
@@ -232,7 +306,7 @@
 				})
 			},
 			GetSupplierHomeProduct(){//主推商品
-				this.ShopService.GetSupplierHomeProduct({supplierId:this.shopId}).then(response =>{
+				this.ShopService.GetSupplierHomeProduct({supplierId:this.supplierId}).then(response =>{
 					let data = response.data
 					this.QueryProductPrice(data)
 				}).catch(error =>{
@@ -245,8 +319,13 @@
 					let dataList = data.items
 					console.log(data)
 					this.total = data.total
-					this.productList = dataList
-					this.QueryProductPrice1(this.productList)
+					if(this.total>0){
+						this.isEmpty = false
+						this.productList = dataList
+						this.QueryProductPrice1(this.productList)
+					}else{
+						this.isEmpty = true
+					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
@@ -314,13 +393,23 @@
 				return NewArray
 			},
 			SubMitSearch() {//搜索
-				if (this.searchInputVal == '') {
+				if (this.listQuery.keyword == '') {
 					this.$util.msg('请输入商品关键词',2000);
-				}else{
-					this.listQuery.pageNum = 1
-					this.GetSupplierHomeProductList()
+					return
 				}
-			},	
+				this.listQuery.pageNum = 1
+				this.GetSupplierHomeProductList()
+			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			goSupplier(){//跳供应商资料页
 				this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+this.shopId)
 			},
@@ -362,40 +451,51 @@
 		width: 100%;
 		height: auto;
 	}
-	.container-shop{
+	.shop-search-main{
 		width: 100%;
-		height: auto;
-		padding:24rpx;
-		box-sizing: border-box;
+		height: 86rpx;
 		background-color: #FFFFFF;
-	}
-	.shop-search{
-		width: 100%;
-		height: 66rpx;
-		border-radius: 33rpx;
-		background-color: #F7F7F7;
 		box-sizing: border-box;
-		padding: 0 20rpx;
-		.icon-sousuo{
-			width: 60rpx;
-			height: 66rpx;
-			display: block;
-			float: left;
-			color: #707070;
-			line-height: 66rpx;
-			text-align: center;
-			font-size: 36rpx;
-		}
-		.input{
-			width: 600rpx;
+		padding:10rpx 24rpx;
+		position: fixed;
+		top:0;
+		left: 0;
+		z-index: 999;
+		.shop-search{
+			width: 100%;
 			height: 66rpx;
+			border-radius: 33rpx;
+			background-color: #F7F7F7;
 			box-sizing: border-box;
-			padding: 0 20rpx;
-			color: #666666;
-			overflow: hidden;
-			font-size: $font-size-24;
+			.icon-sousuo{
+				width: 60rpx;
+				height: 66rpx;
+				display: block;
+				float: left;
+				color: #707070;
+				line-height: 66rpx;
+				text-align: center;
+				font-size: 36rpx;
+			}
+			.input{
+				width: 600rpx;
+				height: 66rpx;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				color: #666666;
+				overflow: hidden;
+				font-size: $font-size-24;
+			}
 		}
 	}
+	.container-shop{
+		width: 100%;
+		height: auto;
+		padding:24rpx;
+		box-sizing: border-box;
+		background-color: #FFFFFF;
+		margin-top: 96rpx;
+	}
 	.product-supplier{
 		width: 100%;
 		height: 140rpx;
@@ -481,6 +581,15 @@
 		.section-product{
 			width: 100%;
 			height: auto;
+			.floor-item-none{
+				min-height: 300rpx;
+				line-height: 300rpx;
+				text-align: center;
+				font-size: $font-size-28;
+				color: #999999;
+				background-color: #FFFFFF;
+				border-radius: 20rpx;
+			}
 			.floor-item{
 				width: 341rpx;
 				height: auto;
@@ -493,7 +602,7 @@
 				margin-bottom: 20rpx;
 				float: left;
 				box-sizing: border-box;
-				padding-bottom: 16rpx;
+				padding-bottom: 10rpx;
 				&:nth-child(2n){
 					margin-right: 0;
 				}
@@ -516,23 +625,24 @@
 					box-sizing: border-box;
 					padding: 16rpx 0;
 					margin-top: 8rpx;
-					.floor-tags{
-						float: left;
-						height: 36rpx;
-						border-radius: 4rpx;
-						background-color: rgba(225, 86, 22, 0.1);
-						line-height: 36rpx;
-						color: $color-system;
-						text-align: center;
-						display: inline-block;
-						padding:0 16rpx;
-						font-size: $font-size-20;
-					}
+				}
+				.floor-tags{
+					height: 36rpx;
+					border-radius: 6rpx;
+					background-color: #FFFFFF;
+					line-height: 36rpx;
+					color: $color-system;
+					text-align: center;
+					display: inline-block;
+					padding:0 16rpx;
+					font-size: $font-size-20;
+					margin-left: 15rpx;
+					border: 1px solid #E15616;
 				}
 				.title-none{
 					font-size: $font-size-26;
 					color: #FF2A2A;
-					line-height: 44rpx;
+					line-height: 70rpx;
 					.btn{
 						display: inline-block;
 						float: right;
@@ -552,10 +662,10 @@
 					height: 72rpx;
 					display: flex;
 					flex-direction: column;
-					margin-bottom: 10rpx;
+					margin-bottom: 15rpx;
 					.mclap{
 						width: 100%;
-						line-height: 36rpx;
+						line-height:40rpx;
 						text-overflow:ellipsis;
 						display: -webkit-box;
 						word-break: break-all;
@@ -577,13 +687,12 @@
 						float: left;
 					}
 					.p-stars{
-						width: 230rpx;
 						float: left;
 					}
 				}
 				.price{
 					color: #FF2A2A;
-					line-height: 44rpx;
+					line-height:70rpx;
 					&.none{
 						text-decoration: line-through;
 						color: #999999;

+ 26 - 31
supplier/pages/user/operator/addoperator.vue

@@ -3,12 +3,12 @@
 		<view class="operator-content">
 			<view class="operator-from">
 				<view class="from-row">
-					<input class="input" type="text" v-model="linkman" placeholder="请输入运营人员姓名" maxlength="6"/>
+					<input class="input" type="text" v-model="params.linkName" placeholder="请输入运营人员姓名" maxlength="6"/>
 				</view>
 				<view class="from-row">
-					<input class="input" type="text" v-model="clubMobile" placeholder="请输入运营人员手机号" maxlength="11"/>
+					<input class="input" type="text" v-model="params.mobile" placeholder="请输入运营人员手机号" maxlength="11"/>
 				</view>
-				<button class="add-btn" @click="confirm">确定</button>
+				<button class="add-btn" @click="AddConfirm">确定</button>
 			</view>
 			<view class="operator-text">
 				<view class="text-main">
@@ -24,15 +24,16 @@
 
 <script>	
 	import authorize from '@/common/config/authorize.js'	
-	import { addOperator } from "@/api/operator.js"
-	
 	export default {
 		data() {
 			return {
-				clubID:'',
-				userID:'',
-				linkman:'',
-				clubMobile:'',
+				params:{
+					shopID:'',
+					userID:'',
+					mobile:'',
+					linkName:'',
+					configFlag:2
+				}
 			}
 		},
 		onLoad(option){
@@ -40,28 +41,21 @@
 		},
 		methods: {			
 			//提交
-			confirm(){
+			AddConfirm(){
 				let data = this.addressData;
-				if(this.linkman== ''){
+				if(this.params.linkName== ''){
 					this.$util.msg('请输入运营人员姓名');
 					return;
 				}
-				if(this.clubMobile == ''){
+				if(this.params.mobile == ''){
 					this.$util.msg('请输入运营人员手机号');
 					return;
 				}
-				if(!/(^1[0-9][0-9]{9}$)/.test(this.clubMobile)){
+				if(!/(^1[0-9][0-9]{9}$)/.test(this.params.mobile)){
 					this.$util.msg('请输入正确的手机号码');
 					return;
 				}
-				let params = {
-						mobile:this.clubMobile,
-						linkName:this.linkman,
-						userID:this.userID,
-						clubID:this.clubID,
-						configFlag:2
-					}
-				addOperator(params).then(response =>{
+				this.UserService.PostAddOperator(this.params).then(response =>{
 					this.$util.msg('添加成功',2000,true,'success')
 					setTimeout(() =>{
 						uni.navigateBack();
@@ -73,8 +67,8 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
-				this.clubID = resolve.clubID
+				this.params.userID = resolve.userID
+				this.params.shopID = resolve.shopID
 			})
 		}
 	}
@@ -89,17 +83,18 @@
 	.operator{
 		padding-top: 160rpx;
 		.operator-content{
-			width: 702rpx;
-			padding:0 24rpx;
+			width: 100%;
+			padding: 0 75rpx;
+			box-sizing: border-box;
 			.operator-from{
 				width: 100%;
 				height: auto;
 				.from-row{
 					height: 40rpx;
-					padding: 24rpx;
+					padding: 24rpx 40rpx;
 					background: #F7F7F7;
-					border-radius: 14rpx;
-					margin-bottom: 20rpx;
+					border-radius: 44rpx;
+					margin-bottom: 40rpx;
 					font-size: $font-size-28;
 					color: $text-color;
 					.input{
@@ -145,7 +140,7 @@
 			
 		}
 		.add-btn{
-			width: 702rpx;
+			width: 600rpx;
 			height: 88rpx;
 			font-size: $font-size-28;
 			line-height: 88rpx;
@@ -153,12 +148,12 @@
 			margin: 0 auto;
 			text-align: center;
 			background: $btn-confirm;
-			border-radius: 14rpx;
+			border-radius: 44rpx;
 			margin-top: 80rpx;
 		}
 		.add-btn.disabled{
 			background: #F8F8F8;
-			border-radius: 14rpx;
+			border-radius: 44rpx;
 		}
 	}
 </style>

+ 53 - 44
supplier/pages/user/operator/list.vue

@@ -3,15 +3,15 @@
 		<view class="operator-top clearfix">
 			<view class="operator-title">
 				<view class="head"><image :src="shopLogo == null ? '../../../static/temp/icon-club@3x.png' : shopLogo" mode=""></image></view>
-				<view class="title">{{shopNmae}}</view>
+				<view class="title">{{shopName}}</view>
 			</view>
 			<view class="operator-search">
 				<view class="search-wrap">
 					<view class="search-from name">
-						<input class="input" type="text" v-model="linkman" placeholder="请输入姓名" maxlength="6"/>
+						<input class="input" type="text" v-model="listQuery.linkName" placeholder="请输入姓名" maxlength="6"/>
 					</view>
 					<view class="search-from phone">
-						<input class="input" type="text" v-model="clubMobile" placeholder="请输入手机号" maxlength="11"/>
+						<input class="input" type="text" v-model="listQuery.mobile" placeholder="请输入手机号" maxlength="11"/>
 					</view>
 					<view class="search-from search">
 						<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
@@ -59,7 +59,7 @@
 			</view>
 		</view>
 		<div class="operator-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
-			<view class="add-btn" @click="this.$api.navigateTo('/pages/user/operator/addoperator')">添加运营人员</view>
+			<view class="add-btn" @click="this.$api.navigateTo('/supplier/pages/user/operator/addoperator')">添加运营人员</view>
 		</div>
 		<view class="operator-model" v-if="isOperatorModel" @click.stop="closeModel">
 			<view class="operator-alert">
@@ -83,8 +83,6 @@
 	import authorize from '@/common/config/authorize.js'	
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	
-	import { queryOperatorList, deleteOperator , updateCode } from "@/api/operator.js"
 	export default {
 		components:{
 			tuiLoadmore,
@@ -93,11 +91,10 @@
 		data() {
 			return {
 				shopId:'',
-				shopNmae:'',
+				shopName:'',
 				shopLogo:'',
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
-				userID:'',
 				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
@@ -113,8 +110,9 @@
 				isIphoneX:this.$store.state.isIphoneX,
 				modelData:'',
 				listQuery:{
-					linkman:'',
-					clubMobile:'',
+					userID:0,
+					linkName:'',
+					mobile:'',
 					pageNum:1,
 					pageSize:10,
 				}
@@ -138,18 +136,33 @@
 					})
 				}, 500)
 			},
-			searchOpertor(){
-				this.pageNum=1
+			GetHomePageData(){//初始化供应商信息
+				this.$api.getStorage().then((resolve) =>{
+					this.userId = resolve.userID
+					this.ShopService.GetHomePageData({userId:this.userId}).then(response =>{
+						console.log(response)
+						let data = response.data
+						this.shopId = data.shop.shopID
+						this.shopName = data.shop.name
+						this.shopLogo = data.shop.logo
+						this.listQuery.userID = data.shop.userID
+						this.initOperatorList()
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})	
+			},
+			searchOpertor(){//搜索
+				this.listQuery.pageNum=1
 				this.initOperatorList()
 			},
-			initOperatorList(){	
-				let params = {clubID:this.clubID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryOperatorList(params).then(response =>{
+			initOperatorList(){	//查询列表
+				this.UserService.QueryOperatorList(this.listQuery).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
 						this.hasNextPage = response.data.hasNextPage
-						this.operatorList =responseData.results
+						this.operatorList = responseData.results
 						this.pullFlag = false;
 						setTimeout(()=>{this.pullFlag = true;},500)
 						if(this.hasNextPage){
@@ -167,10 +180,9 @@
 					this.$util.msg(error.msg,2000)
 				})
 			},	
-			getOnReachBottomData(){
-				this.pageNum+=1
-				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryOperatorList(params).then(response =>{
+			getOnReachBottomData(){//上滑加载
+				this.listQuery.pageNum+=1
+				this.UserService.QueryOperatorList(this.listQuery).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = response.data.hasNextPage
@@ -199,9 +211,11 @@
 			},
 			deleteOperator(id){//删除运营人员
 				this.$util.modal('','确定删除运营人员吗?','确定删除','取消',true,() =>{
-					deleteOperator({id:id}).then(response =>{
+					this.UserService.PostDeleteOperator({id:id}).then(response =>{
 						this.$util.msg('删除成功',2000,true,'success')
-						this.initOperatorList()
+						setTimeout(()=>{
+							this.initOperatorList()
+						},2000)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
@@ -209,10 +223,12 @@
 			},
 			updateInvitationCode(item){	//更新邀请码	
 				this.$util.modal('','确定更新邀请码并发送给运营人员?','确定更新','取消',true,() =>{
-					updateCode({id:item.id,status:item.status}).then(response =>{
+					this.UserService.PostUpdateOperatorCode({id:item.id,status:item.status}).then(response =>{
 						this.$util.msg('更新邀请码成功',2000)
 						this.isOperatorModel = false
-						this.initOperatorList()
+						setTimeout(()=>{
+							this.initOperatorList()
+						},2000)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
@@ -284,14 +300,7 @@
 			}	
 		},
 		onShow() {
-			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.GetHomePageData()
 		}
 	}
 </script>
@@ -340,13 +349,13 @@
 			.head{
 				width: 92rpx;
 				height: 92rpx;
-				border-radius: 14rpx;
+				border-radius: 50%;
 				border: 1px solid #ebebeb;
 				float: left;
 				image{
 					width: 92rpx;
 					height: 92rpx;
-					border-radius: 14rpx;
+					border-radius: 50%;
 				}
 			}
 		}
@@ -358,7 +367,7 @@
 				height: 40rpx;
 				padding: 20rpx;
 				background: $sub-bg-color;
-				border-radius: 14rpx;
+				border-radius: 40rpx;
 				position: relative;
 				margin-bottom: 20rpx;
 				float: left;
@@ -394,7 +403,7 @@
 					.search-btn{
 						width: 170rpx;
 						height: 78rpx;
-						border-radius: 14rpx;
+						border-radius: 39rpx;
 						font-size: $font-size-28;
 						color: #FFFFFF;
 						line-height: 78rpx;
@@ -432,11 +441,11 @@
 			.list-head{
 				width: 92rpx;
 				height: 92rpx;
-				border-radius: 14rpx;
+				border-radius: 50%;
 				image{
 					width: 92rpx;
 					height: 92rpx;
-					border-radius: 14rpx;
+					border-radius: 50%;
 				}
 			}
 			.list-tel{
@@ -461,7 +470,7 @@
 					width: 186rpx;
 					height: 64rpx;
 					padding:0 16rpx;
-					border-radius: 10rpx;
+					border-radius: 32rpx;
 					border: 1px solid #DDDDDD;
 					line-height: 64rpx;
 					font-size: $font-size-24;
@@ -482,7 +491,7 @@
 					width: 86rpx;
 					height: 64rpx;
 					padding:0 24rpx;
-					border-radius: 10rpx;
+					border-radius: 32rpx;
 					border: 1px solid #DDDDDD;
 					line-height: 64rpx;
 					font-size: $font-size-24;
@@ -563,18 +572,18 @@
 		align-items: center;
 		justify-content: center;
 		.add-btn{
-			width: 702rpx;
+			width: 600rpx;
 			height: 88rpx;
 			font-size: $font-size-28;
 			line-height: 88rpx;
 			color: #FFFFFF;
 			text-align: center;
 			background: $btn-confirm;
-			border-radius: 14rpx;
+			border-radius: 44rpx;
 		}
 	}
 	.adds-btn{
-		width: 702rpx;
+		width: 600rpx;
 		height: 88rpx;
 		font-size: 28rpx;
 		line-height: 88rpx;
@@ -582,7 +591,7 @@
 		margin: 0 auto;
 		text-align: center;
 		background: #000000;
-		border-radius: 14rpx;
+		border-radius: 44rpx;
 	}
 </style>