Quellcode durchsuchen

Merge branch 'developerB' of git.caimei365.com:caimei-repository/caimei-applets-caimei into developerB

Administrator vor 4 Jahren
Ursprung
Commit
2810279b07
57 geänderte Dateien mit 1882 neuen und 2265 gelöschten Zeilen
  1. 0 69
      api/operator.js
  2. 0 68
      api/other.js
  3. 0 214
      api/product.js
  4. 17 0
      api/utils.js
  5. 41 6
      components/cm-custom/custom-p.vue
  6. 1 2
      components/cm-module/cm-seller/category.vue
  7. 52 23
      components/cm-module/cm-seller/home.vue
  8. 41 6
      components/cm-module/headerNavbar/header-poduct.vue
  9. 1 1
      components/cm-module/homeIndex/banner.vue
  10. 38 6
      components/cm-module/homeIndex/hotProduct.vue
  11. 4 4
      components/cm-module/homeIndex/navbars.vue
  12. 1 1
      components/cm-module/homeIndex/pagesProduct.vue
  13. 1 1
      components/cm-module/homeIndex/specialProduct.vue
  14. 5 6
      components/cm-module/listTemplate/buyagainList.vue
  15. 4 5
      components/cm-module/listTemplate/classifyProductList.vue
  16. 32 13
      components/cm-module/listTemplate/commodityList.vue
  17. 5 6
      components/cm-module/listTemplate/immediatelyList.vue
  18. 1 2
      components/cm-module/listTemplate/memberList.vue
  19. 5 6
      components/cm-module/listTemplate/productList.vue
  20. 33 1
      components/cm-module/productDetails/cm-price.vue
  21. 2 3
      components/cm-module/productDetails/evaluate.vue
  22. 177 0
      components/cm-module/productDetails/instrument-recommend.vue
  23. 0 1
      components/cm-module/productDetails/recommend.vue
  24. 0 1
      components/cm-module/productDetails/secondDeatail.vue
  25. 0 1
      components/cm-module/productDetails/secondRecommend.vue
  26. 1 1
      components/cm-module/supplier/banner.vue
  27. 1 2
      components/cm-module/supplier/category.vue
  28. 52 23
      components/cm-module/supplier/home.vue
  29. 4 3
      components/cm-module/supplier/user.vue
  30. 7 1
      pages.json
  31. 59 85
      pages/goods/goods-instrument.vue
  32. 502 0
      pages/goods/goods-secondary.vue
  33. 65 952
      pages/goods/instrument-details.vue
  34. 8 6
      pages/goods/product.vue
  35. 71 149
      pages/search/search-instrument.vue
  36. 89 215
      pages/search/search-supplier.vue
  37. 63 53
      pages/search/search.vue
  38. 1 2
      pages/service/organagree.vue
  39. 1 2
      pages/service/privacyagree.vue
  40. 1 2
      pages/service/supplieragree.vue
  41. 1 2
      pages/service/useragree.vue
  42. 1 2
      pages/tabBar/category/category.vue
  43. 2 15
      pages/tabBar/home/index.vue
  44. 2 3
      pages/user/invoice/invoice.vue
  45. 10 10
      pages/user/operator/addoperator.vue
  46. 16 18
      pages/user/operator/list.vue
  47. 1 2
      seller/pages/cart/immediately.vue
  48. 0 1
      seller/pages/cart/second.vue
  49. 4 10
      seller/pages/search/search.vue
  50. 4 0
      services/common.service.js
  51. 12 0
      services/other.service.js
  52. 53 2
      services/product.service.js
  53. 4 0
      services/shop.service.js
  54. 16 0
      services/user.service.js
  55. 291 183
      supplier/pages/user/my-shop.vue
  56. 26 31
      supplier/pages/user/operator/addoperator.vue
  57. 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 - 68
api/other.js

@@ -1,68 +0,0 @@
-/**
- *@des 其他模块接口
- *@author zhengjinyi
- *@date 2020/03/19 14:56:57
- *@param registerByPass
- */
-import request from '@/common/config/caimeiApi.js'
-
-/**
- *医美机构正品联盟
- * @param
- */
-export function queryMember(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/home/member',params, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *机构协议,用户协议,隐私权政策
- *@param helpPageID 隐私权政策id:1013,平台规则id:1023,机构协议:1036
- */
-export function protocolAgree(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/club/protocol',params, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@发票信息回显
- *@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)
-			}
-		})
-	})
-}

+ 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)
+			}
+		})
+	});
+}
 /**
  *获取协议
  */

+ 41 - 6
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="{top:navbarBtn.top + statusBarHeight+'px;',height:navbarBtn.height+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	<view class="gosearch-btn" :style="{paddingLeft:navbarBtn.height+'px;',left:(navbarBtn.height+30)+'px;',borderRadius:navbarBtn.height/2+'px;',width:(375-navbarBtn.width-(navbarBtn.width/2)-15)+'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, // 顶部导航栏高度,
@@ -80,6 +84,7 @@
 			      // 屏幕宽度 - 胶囊right
 			      right: this.systeminfo.screenWidth - headerPosi.right
 			}
+			console.log(btnPosi)
 			let haveBack;
 			if (getCurrentPages().length === 1) { // 当只有一个页面时
 			     haveBack = false;
@@ -130,18 +135,48 @@
 		 }
 	}
 	.navbar-text {
-		 text-align: center;
 		 color: #000000;
 		 font-weight: 500;
+		 position: fixed;
+	}
+	.gosearch-btn{
+		height: 100%;
+		background: rgba(255, 255, 255, 0.6);
+		font-size: 28rpx;
+		color: #666666;
+		position: relative;
+		box-sizing: border-box;
+		position:absolute ;
+		top: 0;
+		border: 0.5px 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);
-		 border: 1px solid rgba(0,0,0, 0.1);
+		 background: rgba(255,255,255,0.6);
+		 border: 0.5px 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])) 
 						}
 					}

+ 41 - 6
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="{top:navbarBtn.top + statusBarHeight+'px;',height:navbarBtn.height+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	<view class="gosearch-btn" :style="{paddingLeft:navbarBtn.height+'px;',left:(navbarBtn.height+30)+'px;',borderRadius:navbarBtn.height/2+'px;',width:(375-navbarBtn.width-(navbarBtn.width/2)-15)+'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, // 顶部导航栏高度,
@@ -80,6 +84,7 @@
 			      // 屏幕宽度 - 胶囊right
 			      right: this.systeminfo.screenWidth - headerPosi.right
 			}
+			console.log(btnPosi)
 			let haveBack;
 			if (getCurrentPages().length === 1) { // 当只有一个页面时
 			     haveBack = false;
@@ -130,18 +135,48 @@
 		 }
 	}
 	.navbar-text {
-		 text-align: center;
 		 color: #000000;
 		 font-weight: 500;
+		 position: fixed;
+	}
+	.gosearch-btn{
+		height: 100%;
+		background: rgba(255, 255, 255, 0.6);
+		font-size: 28rpx;
+		color: #666666;
+		position: relative;
+		box-sizing: border-box;
+		position:absolute ;
+		top: 0;
+		border: 0.5px 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);
-		 border: 1px solid rgba(0,0,0, 0.1);
+		 background: rgba(255,255,255,0.6);
+		 border: 0.5px 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}`,

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

@@ -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;

+ 4 - 4
components/cm-module/homeIndex/navbars.vue

@@ -4,7 +4,7 @@
 			<view class="nav-item" v-for="(item,index) in navList" :key="index" @click="NavToDetailPage(item,index)">
 				<view class="icon">
 					<image class="icon-image" :src="item.icon" mode="widthFix"></image>
-					<image class="icon-new" src="../../../static/temp/icon-new.png" mode="widthFix" v-if="index === 7"></image>
+					<!-- <image class="icon-new" src="../../../static/temp/icon-new.png" mode="widthFix" v-if="index === 7"></image> -->
 				</view>
 				<view class="name">{{ item.name }}</view>
 			</view>
@@ -66,9 +66,9 @@
 				 * 4、二手商品列表
 				 **/
 				 const typeMap = {
-					0:`/pages/goods/goods-instrument?linkId=${item.id}`,
-					1:`/pages/goods/goods-instrument?linkId=${item.id}`,
-					2:`/pages/goods/goods-instrument?linkId=${item.id}`,
+					0:`/pages/goods/goods-secondary?linkId=${item.id}`,
+					1:`/pages/goods/goods-secondary?linkId=${item.id}`,
+					2:`/pages/goods/goods-secondary?linkId=${item.id}`,
 					3:`/h5/pages/article/page?linkType=${index}`,
 					4:`/second/pages/product/product-list`,
 					5:`/h5/pages/article/page?linkType=${index}`,

+ 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}`,

+ 5 - 6
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){
@@ -301,17 +300,17 @@
 			box-sizing: border-box;
 			float: left;
 			.floor-tags{
-				float: left;
 				height: 36rpx;
-				border-radius: 4rpx;
-				background-color: rgba(225, 86, 22, 0.1);
+				border-radius: 6rpx;
+				background-color: #FFFFFF;
 				line-height: 36rpx;
 				color: $color-system;
 				text-align: center;
 				display: inline-block;
 				padding:0 16rpx;
-				margin-top: 9rpx;
 				font-size: $font-size-20;
+				margin-left: 15rpx;
+				border: 1px solid #E15616;
 			}
 		}
 		.price-icon {

+ 4 - 5
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',
@@ -318,17 +317,17 @@
 			box-sizing: border-box;
 			float: right;
 			.floor-tags{
-				float: right;
 				height: 36rpx;
-				border-radius: 4rpx;
-				background-color: rgba(225, 86, 22, 0.1);
+				border-radius: 6rpx;
+				background-color: #FFFFFF;
 				line-height: 36rpx;
 				color: $color-system;
 				text-align: center;
 				display: inline-block;
 				padding:0 16rpx;
-				margin-top: 9rpx;
 				font-size: $font-size-20;
+				margin-left: 15rpx;
+				border: 1px solid #E15616;
 			}
 		}
 		.price-icon {

+ 32 - 13
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
@@ -330,17 +349,17 @@
 			box-sizing: border-box;
 			float: right;
 			.floor-tags{
-				float: right;
 				height: 36rpx;
-				border-radius: 4rpx;
-				background-color: rgba(225, 86, 22, 0.1);
+				border-radius: 6rpx;
+				background-color: #FFFFFF;
 				line-height: 36rpx;
 				color: $color-system;
 				text-align: center;
 				display: inline-block;
 				padding:0 16rpx;
-				margin-top: 9rpx;
 				font-size: $font-size-20;
+				margin-left: 15rpx;
+				border: 1px solid #E15616;
 			}
 		}
 		.price-icon {

+ 5 - 6
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;
@@ -781,17 +780,17 @@
 			box-sizing: border-box;
 			float: left;
 			.floor-tags{
-				float: left;
 				height: 36rpx;
-				border-radius: 4rpx;
-				background-color: rgba(225, 86, 22, 0.1);
+				border-radius: 6rpx;
+				background-color: #FFFFFF;
 				line-height: 36rpx;
 				color: $color-system;
 				text-align: center;
 				display: inline-block;
 				padding:0 16rpx;
-				margin-top: 9rpx;
 				font-size: $font-size-20;
+				margin-left: 15rpx;
+				border: 1px solid #E15616;
 			}
 		}
 		.price-icon {

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

@@ -35,7 +35,6 @@
 
 <script>
 	import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
-	import { queryMember } from "@/api/other.js"
 	export default {
 		name:'MemberList',
 		components:{
@@ -100,7 +99,7 @@
 				if(loadMore) {
 					self.pageNum += 1;
 				}
-				queryMember({pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+				this.OtherService.QueryHomeMemberList({pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
 					const resData = response.data;
 					const resList = resData.results;
 					if(resList && resList.length > 0){

+ 5 - 6
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;
@@ -303,17 +302,17 @@
 			box-sizing: border-box;
 			float: left;
 			.floor-tags{
-				float: left;
 				height: 36rpx;
-				border-radius: 4rpx;
-				background-color: rgba(225, 86, 22, 0.1);
+				border-radius: 6rpx;
+				background-color: #FFFFFF;
 				line-height: 36rpx;
 				color: $color-system;
 				text-align: center;
 				display: inline-block;
 				padding:0 16rpx;
-				margin-top: 9rpx;
 				font-size: $font-size-20;
+				margin-left: 15rpx;
+				border: 1px solid #E15616;
 			}
 		}
 		.price-icon {

+ 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)

+ 7 - 1
pages.json

@@ -89,6 +89,12 @@
 				"navigationBarTitleText": "商品列表",
 				"enablePullDownRefresh":true
 			}
+		},{
+			"path": "pages/goods/goods-secondary",
+			"style": {
+				"navigationBarTitleText": "二级分类列表",
+				"enablePullDownRefresh":true
+			}
 		},{
 			"path": "pages/goods/goods-active",
 			"style": {
@@ -156,7 +162,7 @@
 				"navigationBarTitleText": "隐私权政策"
 			}
 		},{
-			"path": "pages/service/sellconten",
+			"path": "pages/service/sellConten",
 			"style": {
 				"navigationBarTitleText": "条款内容"
 			}

+ 59 - 85
pages/goods/goods-instrument.vue

@@ -1,31 +1,34 @@
 <template>
 	<view class="container instrument">
-		<view class="banner">
-			<view class="banner-image">
-				<image :src="banner" mode=""></image>
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<template v-else>
+			<view class="banner">
+				<view class="banner-image">
+					<image :src="banner" mode=""></image>
+				</view>
 			</view>
-		</view>
-		<view class="instrument-list">
-			<view class="list-item-cell" v-for="(item,index) in list" :key="index">
-				<view class="list-item-title">
-					<view class="title" :class="item.link ? 'float' : ''">
-						<text>{{ item.title }}</text>
-					</view>
-					<view class="more" v-if="item.link" @click="details(item)">
-						<text>查看更多</text>
-						<text class="iconfont icon-xiangyou"></text>
+			<view class="instrument-list">
+				<view class="list-item-cell" v-for="(item,index) in list" :key="index">
+					<view class="list-item-title">
+						<view class="title" :class="item.link ? 'float' : ''">
+							<text>{{ item.title }}</text>
+						</view>
+						<view class="more" v-if="item.link" @click="details(item)">
+							<text>查看更多</text>
+							<text class="iconfont icon-xiangyou"></text>
+						</view>
 					</view>
-				</view>
-				<view class="list-item-pros">
-					<view class="item-pros" v-for="(pros,prosIndex) in item.floorData" :key="prosIndex" @click="details(pros)">
-						<view class="item-pros-image">
-							<image :src="pros.image" mode=""></image>
+					<view class="list-item-pros">
+						<view class="item-pros" v-for="(pros,prosIndex) in item.floorData" :key="prosIndex" @click="NavToDetailPage(pros)">
+							<view class="item-pros-image">
+								<image :src="pros.image" mode=""></image>
+							</view>
+							<view class="item-pros-name">{{ pros.title }}</view>
 						</view>
-						<view class="item-pros-name">{{ pros.title }}</view>
 					</view>
 				</view>
 			</view>
-		</view>
+		</template>
 		<!-- 侧边 -->
 		<scroll-top v-if="isScrollTop"></scroll-top>
 	</view>
@@ -40,98 +43,69 @@
 			return{
 				banner:'',
 				list:[],
-				linkType:0,
+				linkId:0,
 				isScrollTop:false,
-				linkTitle:''
+				linkTitle:'',
+				skeletonShow:true
 			}
 		},		
 		onLoad(option) {
 			console.log(option)
 			let _self = this
-			this.linkType = option.linkId
+			this.linkId = option.linkId
 			this.linkTitle = option.title
 			uni.setNavigationBarTitle({title:_self.linkTitle});
 			this.GetPageTopicInfo()
 		},
 		methods:{
 			GetPageTopicInfo(){//获取数据
-				this.ProductService.GetPageTopic({type:this.linkType}).then(response =>{
+				this.ProductService.GetPageTopic({type:this.linkId}).then(response =>{
 					let data = response.data
 					this.list = data
 					this.GetPageTopicBanner()
+					this.skeletonShow = false
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetPageTopicBanner(){//获取banner
-				this.ProductService.GetPageTopicBanner({type:this.linkType}).then(response =>{
+				this.ProductService.GetPageTopicBanner({type:this.linkId}).then(response =>{
 					let data = response.data
 					this.banner = data.image
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			details(floor){
+			NavToDetailPage(floor) {//跳转
 				console.log(floor)
-				switch(floor.linkType){
-					case 1://二级页面
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`)
-						break;
-					case 2://搜索项目仪器 
-						this.$api.navigateTo(`/pages/search/search-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 3://直播页面
-						this.$api.navigateTo(``)
-						break;
-					case 4://自由页面
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 5://商品详情
-						this.$api.navigateTo(`/pages/goods/product?id=${floor.linkParam.id}`)
-						break;
-					case 6://仪器项目详情
-						this.$api.navigateTo(`/pages/goods/instrument-details?id=${floor.linkParam.id}`)
-						break;
-					case 7://供应商主页 
-						this.$api.navigateTo(`/supplier/pages/user/my-shop?shopId=${floor.linkParam.id}`)
-						break;
-					case 8://专题活动页
-						this.$api.navigateTo(`/h5/pages/activity/activity-list`)
-						break;
-					case 9://二手市场介绍
-						this.$api.navigateTo(`/second/pages/form/introduce`)
-						break;
-					case 10://二手商品列表
-						this.$api.navigateTo(`/second/pages/product/product-list`)
-						break;
-					case 11://二手商品发布
-						this.$api.navigateTo(`/second/pages/form/form`)
-						break;
-					case 12://商品搜索
-						this.$api.navigateTo(`/pages/search/search?keyWord=${floor.title}`)
-						break;
-					case 13://信息详情
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 14://品牌招商介绍页 
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 15://维修保养介绍页 
-						this.$api.navigateTo(`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}`)
-						break;
-					case 16://首页
-						this.$api.switchTabTo(`/pages/tabBar/home/index`)
-						break;
-					case 17://注册页 
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-					case 18://信息中心
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-					case 19://供应商列表
-						this.$api.navigateTo(`/pages/login/register-select`)
-						break;
-				}
+				/**
+				 * 页面跳转类型
+				 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
+				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
+				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
+				 **/
+				 if(floor.linkType){
+					 const typeMap = {
+					 	1:`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`,
+					 	2:`/pages/search/search-instrument?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}`,
+					 	8:`/h5/pages/activity/activity-list`,
+					 	9:`/second/pages/form/introduce`,
+					 	10:`/second/pages/product/product-list`,
+					 	11:`/second/pages/form/form`,
+					 	12:`/pages/search/search?keyWord=${floor.title}`,
+					 	13:`/h5/pages/article/page?link=${floor.link}`,
+					 	14:`/h5/pages/article/page?link=${floor.link}`,
+					 	15:`/h5/pages/article/page?link=${floor.link}`,
+					 	17:`/pages/login/register-select`,
+					 	18:`/h5/pages/article/page?link=${floor.link}`,
+					 	19:`/pages/search/search-supplier?keyWord=${floor.title}`
+					 }
+					 const url = typeMap[floor.linkType];
+					 this.$api.navigateTo(url)
+				 }
 			}
 		},
 		onPageScroll(e){//实时获取到滚动的值

+ 502 - 0
pages/goods/goods-secondary.vue

@@ -0,0 +1,502 @@
+<template>
+	<view class="container instrument">
+		<!--选项卡-->
+		<view class="home-hotmaintab-fixed">
+			<view class="home-flex-tab show">
+				<view class="flex text-white">
+					<view class="basis-xxl">
+						<scroll-view scroll-x class="nav z" scroll-with-animation :scroll-left="headTab.scrollLeft">
+							<block v-for="(item,index) in headTab.list" :key="index">
+								<view class="cu-item" :class="index==headTab.TabCur?'select':''" @tap="tabSelect(index,item)" :data-id="index">
+									<view>{{item.name}}</view>
+									<view class="tab-dot bg-white"/>
+								</view>
+							</block>
+						</scroll-view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="container-main">
+			<!-- 商品专题 -->
+			<template v-if="isActivityFlag">
+				<view class="activity-container">
+					<scroll-view scroll-y="true" >
+						<view class="list" v-for="(item, index) in activityList" :key="index">
+							<image class="list-image" :src="item.image" mode="scaleToFill"></image>
+							<view class="title">{{item.title}}</view>
+							<view class="time" v-show="item.status!=3">
+								<view class="text">{{item.detail }}</view>
+							</view>
+						</view>
+						<!--加载loadding-->
+						<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+						<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text='nomoreText'></tui-nomore>
+						<!--加载loadding-->
+					</scroll-view>
+				</view>
+			</template>
+			<!-- 列表 -->
+			<template v-else>
+				<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="9"></tui-skeleton>
+				<template v-else>
+					<view class="banner">
+						<view class="banner-image">
+							<image :src="banner" mode=""></image>
+						</view>
+					</view>
+					<view class="instrument-list">
+						<view class="list-item-cell" v-for="(item,index) in list" :key="index">
+							<view class="list-item-title">
+								<view class="title" :class="item.link ? 'float' : ''">
+									<text>{{ item.title }}</text>
+								</view>
+								<view class="more" v-if="item.link" @click="NavToDetailPage(item)">
+									<text>查看更多</text>
+									<text class="iconfont icon-xiangyou"></text>
+								</view>
+							</view>
+							<view class="list-item-pros">
+								<view class="item-pros" v-for="(pros,prosIndex) in item.floorData" :key="prosIndex" @click="NavToDetailPage(pros)">
+									<view class="item-pros-image">
+										<image :src="pros.image" mode=""></image>
+									</view>
+									<view class="item-pros-name">{{ pros.title }}</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</template>
+			</template>
+		</view>
+		<!-- 侧边 -->
+		<scroll-top v-if="isScrollTop"></scroll-top>
+	</view>
+</template>
+<script>
+	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
+	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	export default{
+		components:{
+			tuiLoadmore,
+			tuiNomore,
+		},
+		data(){
+			return{
+				banner:'',
+				headTab: {
+					TabCur: 0, 
+					scrollLeft: 0, 
+					list: [],
+				},
+				headTabId:0,
+				list:[],
+				navMenuId:0,
+				isScrollTop:false,
+				listQuery:{
+					pageNum:1,
+					pageSize:10,
+				},
+				nomoreText: '上拉显示更多',
+				hasNextPage:false,
+				loadding: false,
+				pullUpOn: true,
+				pullFlag: true,
+				isActivityFlag:false,
+				skeletonShow:true,
+				activityList:[]
+			}
+		},		
+		onLoad(option) {
+			console.log(option)
+			this.navMenuId = option.linkId
+			this.GetHomeSubMenu()
+		},
+		methods:{
+			GetHomeSubMenu(){//获取数据
+				let _self = this
+				this.CommonService.GetHomeSubMenu({navMenuId:this.navMenuId}).then(response =>{
+					let data = response.data
+					this.headTab.list = data
+					uni.setNavigationBarTitle({title:_self.headTab.list[0].name});
+					if(this.headTab.list[0].linkType === 8){
+						this.isActivityFlag = true
+						this.GetPromotionsrList()
+					}else{
+						this.GetPageTopicInfo(this.headTab.list[0].linkParam.id)
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetPageTopicInfo(type){//获取数据
+				this.ProductService.GetPageTopic({type:type}).then(response =>{
+					let data = response.data
+					this.list = data
+					this.GetPageTopicBanner(type)
+					this.skeletonShow = false
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetPageTopicBanner(type){//获取banner
+				this.ProductService.GetPageTopicBanner({type:type}).then(response =>{
+					let data = response.data
+					this.banner = data.image
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetPromotionsrList(){//获取专题列表
+				this.ProductService.GetPromotionsrList(this.listQuery).then(response =>{
+					let responseData = response.data
+					if(responseData.list&&responseData.list.length > 0){
+						this.isEmpty = false
+						this.hasNextPage = responseData.hasNextPage
+						this.activityList = responseData.list
+						this.pullFlag = false;
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = true
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}else{
+						this.isEmpty = true
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetPromotionsrListBottomData(){
+				this.listQuery.pageNum+=1
+				this.ProductService.GetPromotionsrList(this.listQuery).then(response =>{
+					let responseData = response.data
+					if(responseData.list&&responseData.list.length > 0){
+						this.hasNextPage = response.data.hasNextPage
+						this.activityList = this.activityList.concat(responseData.list) 
+						this.pullFlag = false;// 防上拉暴滑
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = false
+							this.loadding = false
+							console.log('2222222222222')
+							this.nomoreText = '已至底部'
+						}
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			tabSelect(index,item) {//tab菜单被点击
+				console.log(item)
+				this.headTab.TabCur = index;
+				this.headTab.scrollLeft = (index - 1) * 50;
+				this.headTabId = item.linkParam.id;
+				console.log(this.headTabId)
+				uni.setNavigationBarTitle({title:item.name});
+				if(item.linkType === 8){
+					this.isActivityFlag = true
+					this.GetPromotionsrList()
+				}else{
+					this.isActivityFlag = false
+					this.GetPageTopicInfo(this.headTabId)
+				}
+			},
+			NavToDetailPage(floor) {//跳转
+				console.log(floor)
+				/**
+				 * 页面跳转类型
+				 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
+				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
+				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
+				 **/
+				 if(floor.linkType){
+					 const typeMap = {
+					 	1:`/pages/goods/goods-instrument?linkId=${floor.linkParam.id}&title=${floor.title}`,
+					 	2:`/pages/search/search-instrument?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}`,
+					 	8:`/h5/pages/activity/activity-list`,
+					 	9:`/second/pages/form/introduce`,
+					 	10:`/second/pages/product/product-list`,
+					 	11:`/second/pages/form/form`,
+					 	12:`/pages/search/search?keyWord=${floor.title}`,
+					 	13:`/h5/pages/article/page?link=${floor.link}`,
+					 	14:`/h5/pages/article/page?link=${floor.link}`,
+					 	15:`/h5/pages/article/page?link=${floor.link}`,
+					 	17:`/pages/login/register-select`,
+					 	18:`/h5/pages/article/page?link=${floor.link}`,
+					 	19:`/pages/search/search-supplier?keyWord=${floor.title}`
+					 }
+					 const url = typeMap[floor.linkType];
+					 this.$api.navigateTo(url)
+				 }
+			}
+		},
+		onReachBottom() {
+			if(this.isActivityFlag){
+				if(this.hasNextPage){
+					this.loadding = true
+					this.pullUpOn = true
+					this.GetPromotionsrListBottomData()
+				}	
+			}
+		},
+		onPageScroll(e){//实时获取到滚动的值
+			if(e.scrollTop>600){
+				this.isScrollTop = true
+			}else{
+				this.isScrollTop = false
+			}	
+		},
+		onShow() {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #F7F7F7;
+	}
+	.container-main{
+		padding-top: 100rpx;
+	}
+	// 活动专题列表
+	.activity-container{
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+	}
+	.list{
+		width: 100%;
+		height: 318rpx;
+		float: left;
+		margin-bottom: 10rpx;
+		position: relative;
+		.list-image{
+			width: 100%;
+			height: 318rpx;
+			display: block;
+		}
+		.title{
+			width: 100%;
+			height: 72rpx;
+			line-height: 72rpx;
+			text-align: center;
+			background: rgba(254,246,243,0.8);
+			color: $color-system;
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			font-size: $font-size-26;
+		}
+		.time{
+			width: 100%;
+			height: 48rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			.text{
+				width: 475rpx;
+				height: 48rpx;
+				font-size: $font-size-24;
+				margin: 0 auto;
+				line-height: 48rpx;
+				background:  linear-gradient(315deg, #f94b4b 0%, #bc3cff 100%);
+				color: #FFFFFF;
+				text-align: center;
+			}
+		}
+	}
+	//二级分类
+	.instrument{
+		width: 100%;
+		height: auto;
+		.banner{
+			box-sizing: border-box;
+			padding:24rpx;
+			background-color: #FFFFFF;
+			width: 100%;
+			.banner-image{
+				width: 100%;
+				height: 248rpx;
+				border-radius: 4rpx;
+			}
+			image{
+				width: 100%;
+				height: 248rpx;
+				border-radius: 4rpx;
+			}
+		}
+		.instrument-list{
+			width: 100%;
+			height: auto;
+			box-sizing: border-box;
+			padding: 0 24rpx;
+			.list-item-cell{
+				width: 100%;
+				height: auto;
+				float: left;
+				.list-item-title{
+					width: 100%;
+					height: 88rpx;
+					line-height: 88rpx;
+					float: left;
+					.title{
+						font-size: $font-size-28;
+						line-height: 80rpx;
+						color: $text-color;
+						font-weight: bold;
+						&.float{
+							float: left;
+						}
+					}
+					.more{
+						font-size: $font-size-26;
+						line-height: 80rpx;
+						color: #999999;
+						height: 80rpx;
+						float: right;
+						.icon-xiangyou{
+							font-size: $font-size-28;
+							margin-left: 10rpx;
+						}
+					}
+				}
+				.list-item-pros{
+					width: 100%;
+					height: auto;
+					float: left;
+					.item-pros{
+						width: 340rpx;
+						height: 414rpx;
+						float: left;
+						margin-right: 20rpx;
+						margin-bottom: 20rpx;
+						background-color: #FFFFFF;
+						border-radius: 4rpx;
+						&:nth-child(2n){
+							margin-right: 0;
+						}
+						.item-pros-image{
+							width: 340rpx;
+							height: 340rpx;
+							float: left;
+							image{
+								width: 340rpx;
+								height: 340rpx;
+								display: block;
+								border-radius: 4rpx 4rpx 0 0;
+							}
+						}
+						.item-pros-name{
+							width: 100%;
+							height: 74rpx;
+							line-height: 74rpx;
+							box-sizing: border-box;
+							padding: 0 24rpx;
+							white-space: normal;
+							word-break: break-all;
+							overflow: hidden;
+							text-overflow: ellipsis;
+							display: -webkit-box;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 1;
+							text-align: center;
+							font-size: $font-size-26;
+							line-height: 74rpx;
+							text-align: center;
+						}
+					}
+				}
+			}
+		}
+	}
+	.home-hotmaintab-fixed{
+		width: 100%;
+		height:auto;
+		overflow: hidden;
+		background: #FFFFFF;
+		padding-bottom: 20rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+		.home-flex-tab {
+			width: 100%;
+			position: relative;
+			transition: opacity .25s;
+			.text-white{
+				color: #666666;
+			}
+			.flex {
+				.basis-xxl {
+					flex-basis: 100%;
+					width: 100%;
+					z-index: 1;
+				}
+				.basis-xxs {
+					flex-basis: 10%;
+					z-index: 1;
+					width: 10%;
+				}
+				.sort-icon {
+					font-size: 55rpx;
+					height: 64rpx;
+					line-height: 64rpx;
+					text-align: center;
+				}
+			}
+		}
+	}
+	.nav{
+		white-space:nowrap;
+	}
+	.nav .cu-item {
+		display: inline-block;
+		margin: 0 5rpx;
+		padding: 0 15rpx;
+	}
+	.nav.z .cu-item.select {
+		font-size: $font-size-28;
+		color: $color-system;
+	}
+	.nav.z .cu-item {
+		height: 80rpx;
+		font-size: $font-size-26;
+		line-height: 80rpx;
+		position: relative;
+
+	}
+	.nav.z .cu-item.select .tab-dot {
+		position: absolute;
+		height: 8rpx;
+		border-radius: 20rpx;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		width: 40rpx;
+		margin: auto;
+	}
+	.bg-white{
+		background-color: $color-system;
+	}
+	::-webkit-scrollbar {
+		display: none;
+	}
+	.flex {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+	}
+</style>

Datei-Diff unterdrückt, da er zu groß ist
+ 65 - 952
pages/goods/instrument-details.vue


+ 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{

+ 63 - 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,24 @@
 				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.listQuery.keyword = option.keyWord
+				this.setSearchHistoryAdd()
+				this.getListFromServer()
 			}
 			this.initGetSerachRecord()			
 		},
@@ -173,21 +189,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 +215,18 @@
 							this.isFocus = false
 							break;
 						case 2:
-							this.$api.navigateTo(`/pages/search/search-supplier?keyword=${this.searchInputVal}`);
+							this.setSearchHistoryAdd()
+							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.setSearchHistoryAdd()
+							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 +236,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 +273,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 +316,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 +478,7 @@
 			line-height: 70rpx;
 			float: right;
 			text-align: center;
-			color: $color-system;
+			color: #666666;
 			font-size: $font-size-24;
 		}
 	}

+ 1 - 2
pages/service/organagree.vue

@@ -6,7 +6,6 @@
 
 <script>
 	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
-	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -24,7 +23,7 @@
 		methods:{
 			initData(){
 				let self = this;
-				protocolAgree({helpPageID:1036}).then(response =>{
+				this.OtherService.QueryClubProtocol({helpPageID:1036}).then(response =>{
 					let data =response.data.content
 					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
 				}).catch(error =>{

+ 1 - 2
pages/service/privacyagree.vue

@@ -6,7 +6,6 @@
 
 <script>
 	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
-	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -24,7 +23,7 @@
 		methods:{
 			initData(){
 				let self = this;
-				protocolAgree({helpPageID:1013}).then(response =>{
+				this.OtherService.QueryClubProtocol({helpPageID:1013}).then(response =>{
 					let data =response.data.content
 					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
 				}).catch(error =>{

+ 1 - 2
pages/service/supplieragree.vue

@@ -6,7 +6,6 @@
 
 <script>
 	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
-	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -24,7 +23,7 @@
 		methods:{
 			initData(){
 				let self = this;
-				protocolAgree({helpPageID:1036}).then(response =>{
+				this.OtherService.QueryClubProtocol({helpPageID:1036}).then(response =>{
 					let data =response.data.content
 					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
 				}).catch(error =>{

+ 1 - 2
pages/service/useragree.vue

@@ -6,7 +6,6 @@
 
 <script>
 	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
-	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -24,7 +23,7 @@
 		methods:{
 			initData(){
 				let self = this;
-				protocolAgree({helpPageID:1023}).then(response =>{
+				this.OtherService.QueryClubProtocol({helpPageID:1023}).then(response =>{
 					let data =response.data.content
 					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
 				}).catch(error =>{

+ 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 =>{

+ 4 - 0
services/common.service.js

@@ -26,6 +26,10 @@ export default class CommonService {
 	GetHomeInit (data = {}) {
 		return this.AjaxService.get({ url:'/home/init', data, isLoading: false })
 	}
+	/* 首页金刚区二级分类 */
+	GetHomeSubMenu (data = {}) {
+		return this.AjaxService.get({ url:'/home/subMenu', data, isLoading: false })
+	}
 	/* 首页楼层 */
 	GetHomeFloorInfo (data = {}) {
 		return this.AjaxService.get({ url:'/home/floor', data, isLoading: false })

+ 12 - 0
services/other.service.js

@@ -12,4 +12,16 @@ export default class OtherService {
 	QuerySaveClause (data) {
 		return this.AjaxService.get({ url:'/seller/clause', data, isLoading: true })
 	}
+	/**
+	 * 正品联盟
+	 */
+	QueryHomeMemberList (data) {
+		return this.AjaxService.get({ url:'/home/member', data, isLoading: true })
+	}
+	/**
+	 * 协议
+	 */
+	QueryClubProtocol (data) {
+		return this.AjaxService.get({ url:'/club/protocol', data, isLoading: true })
+	}
 }

+ 53 - 2
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(必填)
@@ -105,6 +104,58 @@ 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 })
+	}
+	/* 发票信息回显 */
+	GetPersonalCenterFindInvoice (data = {}) {
+		return this.AjaxService.get({ url:'/personalCenter/findInvoice', data, isLoading: false })
+	}
+	/* 发票信息保存 */
+	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 })
+	}
 	
 }

+ 291 - 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,50 @@
 		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: 80rpx;
+				height: 66rpx;
+				display: block;
+				float: left;
+				color: #707070;
+				line-height: 66rpx;
+				text-align: center;
+				font-size: 36rpx;
+			}
+			.input{
+				width: 580rpx;
+				height: 66rpx;
+				box-sizing: border-box;
+				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 +580,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 +601,7 @@
 				margin-bottom: 20rpx;
 				float: left;
 				box-sizing: border-box;
-				padding-bottom: 16rpx;
+				padding-bottom: 10rpx;
 				&:nth-child(2n){
 					margin-right: 0;
 				}
@@ -516,23 +624,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 +661,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 +686,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>
 

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.