喻文俊 3 lat temu
rodzic
commit
fa43ac2536

+ 1 - 1
common/config/caimeiApi.js

@@ -3,7 +3,7 @@
  * @Author Zhengjingyi
  * @Action 全局公共方法
  */
-import requestUrl from '@/services/ajax.env.js'
+import requestUrl from '@/services/config.env.js'
 const caimeiApi = {
     /**
 	 * @封装公共get数据请求方法无加载动画

+ 10 - 14
components/cm-module/cm-seller/home.vue

@@ -91,15 +91,6 @@
 		},
 		methods: {
 			...mapMutations(['login','logout']),
-			GetHomeInit(){//金刚区分类
-				this.CommonService.GetHomeInit({source:2}).then(response =>{
-					let data = response.data
-					this.navBarsList = data.topMenuList
-					this.isNavRequest = true
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
 			GetHomeTopDataInfo(){//直播、活动、文章模块
 				this.CommonService.GetHomeTopDataInfo({source:2}).then(response =>{
 					this.templateData = response.data
@@ -111,7 +102,6 @@
 			GetHomeFloorInfo(){//初始化首页楼层数据
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
 					let data = response.data;
-					this.liveList = data.liveList;
 					this.pageList = data.homePageFloor;
 					this.supplierObj = data.supplierImage;
 					this.isRequest = true;
@@ -120,19 +110,25 @@
 				})
 			},
 			getHomeInformation(){//初始化首页数据	
-				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
+				this.CommonService.GetHomeModulesDataInfo({ source: 2 }).then(res =>{
 					let data = res.data;
-					this.bannerImageList = data.bannerImageList
+					this.bannerImageList = data.bannerList
 					this.mallPageModules = data.mallPageModules
-					this.$store.commit('updateAllNum',data.shoppingCartCount)
 					this.skeletonShow = false;
-					this.GetHomeInit()
+					this.navBarsList = data.topMenuList
+					this.isNavRequest = true
 					this.GetHomeTopDataInfo()
 					this.GetHomeFloorInfo()
+                    this.initShoppingCartCount()
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+            initShoppingCartCount(){// 获取购物车数量
+                this.OrderService.ShoppingCartCount({ userId: this.userID}).then(res =>{
+                    this.$store.commit('updateAllNum',res.data)
+                })
+            },
 			handleClick(data){
 				this.$api.navigateTo(`/pages/h5/activity/meobohui`)
 				this.$store.commit('setActivity',data)

+ 27 - 19
components/cm-module/cm-seller/user.vue

@@ -134,8 +134,9 @@
 				name:'',
 				headpic:'',
 				userId:'',
+                serviceProviderId: '',
 				skeletonShow:true,
-				orderNum:0,//机构自主下单订单数
+				orderNum:0,//未查看订单数量
 				beforeConfirmCount:0,//待确认角标
 				beforePayCount:0, 	//待付款角标
 				beforeShipCount:0, //待发货角标
@@ -187,22 +188,24 @@
 		methods:{
 			...mapMutations(['login','logout']),
 			async initData(){
-				const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-				const getUserInfo = await authorize.getUserInfo('weixin');
+				const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+				const getUserInfo = await authorize.getUserInfo('weixin')
 				const params = { code:wechatCode,encryptedData:getUserInfo.encryptedData,iv:getUserInfo.iv }
 				this.UserService.UserLoginAuthApplets(params).then(response =>{
 					if(response.code == 0 || response.code == 4){
-						this.isLogin = true;
-						this.userID = response.data.userId;						
-						this.userIdentity = response.data.userIdentity;						
-						this.clubStatus = response.data.clubStatus;						
+						this.isLogin = true
+						this.userID = response.data.userId						
+						this.userIdentity = response.data.userIdentity						
+						this.clubStatus = response.data.clubStatus
+                        this.serviceProviderId = response.data.serviceProviderId
 						this.$store.commit('updateStatus',response.data)
-						this.login(response.data);
+						this.login(response.data)
 						uni.setStorageSync('token',response.data.token)
 						uni.setStorageSync('unionId',response.data.unionId)
 						this.getUserSellerHome()
+                        this.getOrderCount()
 					}else{
-						this.isLogin = false;
+						this.isLogin = false
 						this.logout()
 						uni.setStorageSync('unionId',response.data.unionId)
 						this.$store.commit('updateStatus',response.data)
@@ -217,18 +220,23 @@
 						let sellerData = response.data
 						this.name = sellerData.seller.linkMan1?sellerData.seller.linkMan1:'' 	//协销名称
 						this.headpic = sellerData.seller.logo //会所头像
-						this.beforeConfirmCount = this.showBadge(sellerData.beforeConfirmCount)//待付款
-						this.beforePayCount = this.showBadge(sellerData.beforePayCount)//待付款
-						this.beforeShipCount = this.showBadge(sellerData.beforeShipCount)//待发货		
-						this.shippedCount = this.showBadge(sellerData.shippedCount)//已发货	
-						this.refundsCount = this.showBadge(sellerData.refundsCount)//退货/款	
-						this.orderNum = this.showBadge(sellerData.orderNum)//机构自主下单订单数
-						this.skeletonShow = false;
+						this.skeletonShow = false
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
 				})	
 			},
+            getOrderCount(){
+                this.SellerService.GetOrderCount({serviceProviderId: this.serviceProviderId}).then(response=>{
+                    let data = response.data
+                    this.beforeConfirmCount = this.showBadge(data.confirmedCount)//待确认
+                    this.beforePayCount = this.showBadge(data.paymentCount)//待付款
+                    this.beforeShipCount = this.showBadge(data.waitShipmentsCount)//待发货		
+                    this.shippedCount = this.showBadge(data.shipmentsCount)//已发货	
+                    this.refundsCount = this.showBadge(data.salesReturnCount)//退货/款	
+                    this.orderNum = this.showBadge(data.uncheckedOrderCount)//未查看订单数量
+                })
+            },
 			TestZHIboFn(){//测试跳转直播小程序
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx92d650b253f8f2e3',
@@ -247,9 +255,9 @@
 				this.$api.navigateTo(url)
 			},			
 			showBadge(n){
-				let num ='';
-				if(n>100){num = 99}else{num = n;}
-				return num;
+				let num =''
+				if(n>100){num = 99}else{num = n}
+				return num
 			},
 			onPullDownRefresh() {//下拉刷新
 				this.initData()

+ 15 - 15
components/cm-module/homeIndex/pageSpecial.vue

@@ -55,9 +55,9 @@
 </template>
 
 <script>
-	import { mapState,mapMutations} from 'vuex';
+	import { mapState,mapMutations} from 'vuex'
 	export default{
-		name:"pagesProduct",
+		name:'pagesProduct',
 		props:{
 			templateData:{
 				type:Object
@@ -73,18 +73,18 @@
 			statusType:function(value) {
 				switch (value) {
 					case 1:
-						return  '未开始';
-						break;
+						return  '未开始'
+						break
 					case 2:
-						return  '直播中';
-						break;
+						return  '直播中'
+						break
 					case 3:
-						return  '看回放';
-						break;
+						return  '看回放'
+						break
 				}
 			},
 			NumFormat:function(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 		},
 		created(){
@@ -131,19 +131,19 @@
 						4:`/pages/h5/activity/activity?title=${pros.title}&link=${pros.appletsLink}`,
 					 	5:`/pages/goods/product?id=${pros.linkParam.id}`,
 					 	// 7:`/pages/supplier/user/my-shop?shopId=${pros.linkParam.id}`,
-					 	8:`/pages/h5/activity/activity-list`,
-					 	9:`/pages/second/form/introduce`,
-					 	10:`/pages/second/product/product-list`,
-					 	11:`/pages/second/form/form`,
+					 	8:'/pages/h5/activity/activity-list',
+					 	9:'/pages/second/form/introduce',
+					 	10:'/pages/second/product/product-list',
+					 	11:'/pages/second/form/form',
 					 	12:`/pages/search/search?keyWord=${pros.linkParam.keyword}`,
 					 	13:`/pages/h5/article/path?link=${pros.link}`,
 					 	14:`/pages/h5/article/path?link=${pros.link}`,
 					 	15:`/pages/h5/article/path?link=${pros.link}`,
-					 	17:`/pages/login/register-select`,
+					 	17:'/pages/login/register-select',
 					 	18:`/pages/h5/article/path?link=${pros.link}`,
 					 	19:`/pages/search/search-supplier?keyWord=${pros.linkParam.keyword}`
 					}
-					const url = typeMap[pros.linkType];
+					const url = typeMap[pros.linkType]
 					uni.navigateTo({
 					  	url:url
 					})

+ 10 - 14
components/cm-module/supplier/home.vue

@@ -91,15 +91,6 @@
 		},
 		methods: {
 			...mapMutations(['login','logout']),
-			GetHomeInit(){//金刚区分类
-				this.CommonService.GetHomeInit({source:2}).then(response =>{
-					let data = response.data
-					this.navBarsList = data.topMenuList
-					this.isNavRequest = true
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
 			GetHomeTopDataInfo(){//直播、活动、文章模块
 				this.CommonService.GetHomeTopDataInfo({source:2}).then(response =>{
 					this.templateData = response.data
@@ -111,7 +102,6 @@
 			GetHomeFloorInfo(){//初始化首页楼层数据
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
 					let data = response.data;
-					this.liveList = data.liveList;
 					this.pageList = data.homePageFloor;
 					this.supplierObj = data.supplierImage;
 					this.isRequest = true;
@@ -120,19 +110,25 @@
 				})
 			},
 			getHomeInformation(){//初始化首页数据	
-				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
+				this.CommonService.GetHomeModulesDataInfo({ source:2 }).then(res =>{
 					let data = res.data;
-					this.bannerImageList = data.bannerImageList
+					this.bannerImageList = data.bannerList
 					this.mallPageModules = data.mallPageModules
-					this.$store.commit('updateAllNum',data.shoppingCartCount)
 					this.skeletonShow = false;
-					this.GetHomeInit()
+					this.navBarsList = data.topMenuList
+					this.isNavRequest = true
 					this.GetHomeTopDataInfo()
 					this.GetHomeFloorInfo()
+                    this.initShoppingCartCount()
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+            initShoppingCartCount(){// 获取购物车数量
+                this.OrderService.ShoppingCartCount({ userId: this.userID}).then(res =>{
+                    this.$store.commit('updateAllNum',res.data)
+                })
+            },
 			handleClick(data){
 				this.$api.navigateTo(`/pages/h5/activity/meobohui`)
 				this.$store.commit('setActivity',data)

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

@@ -106,7 +106,7 @@
 				});
 			},
 			GetSupplierHomeDeatils(shopId){//供应商详情
-				this.ShopService.GetSupplierHomeDeatils({supplierId:shopId}).then(response =>{
+				this.ShopService.GetSupplierHomeDeatils({shopId:shopId}).then(response =>{
 					this.shopData = response.data
 					console.log(this.shopData)
 				}).catch(error =>{

+ 18 - 18
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('/pages/supplier/user/my-shop?shopId='+shopID)">
+						<view class="user-item" @click="navigator('/pages/supplier/user/my-shop?shopId='+shopId)">
 							<text class="u-shop">进入店铺</text><text class="iconfont icon-jinrudianpu"></text>
 						</view>
 					</view>
@@ -132,7 +132,7 @@
 				name:'这里是供应商的名字',
 				headpic:'',
 				userId:'',
-				shopID:0,
+				shopId:0,
 				skeletonShow:true,
 				contactNumber:0,
 				orderNum:0,//机构自主下单订单数
@@ -163,12 +163,12 @@
 		},
 		filters: {
 			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2);
+				return Number(text).toFixed(2)
 			},
 			BadgeType(n){
-				let num ='';
-				if( n>999 ){ num = '999+' } else{ num = n;}
-				return num;
+				let num =''
+				if( n>999 ){ num = '999+' } else{ num = n}
+				return num
 			},
 		},
 		computed: {
@@ -177,23 +177,23 @@
 		methods:{
 			...mapMutations(['login','logout']),
 			async initData(){
-				const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-				const getUserInfo = await authorize.getUserInfo('weixin');
+				const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+				const getUserInfo = await authorize.getUserInfo('weixin')
 				const params = { code:wechatCode,encryptedData:getUserInfo.encryptedData,iv:getUserInfo.iv }
 				this.UserService.UserLoginAuthApplets(params).then(response =>{
 					if(response.code == 0 || response.code == 4){
-						this.isLogin = true;
-						this.userID = response.data.userId;						
-						this.userIdentity = response.data.userIdentity;						
-						this.clubStatus = response.data.clubStatus;						
+						this.isLogin = true
+						this.userID = response.data.userId						
+						this.userIdentity = response.data.userIdentity						
+						this.clubStatus = response.data.clubStatus						
 						this.$store.commit('updateStatus',response.data)
-						this.login(response.data);
+						this.login(response.data)
 						uni.setStorageSync('token',response.data.token)
 						uni.setStorageSync('unionId',response.data.unionId)
 						this.GetHomePageData()
 						this.getPhone()
 					}else{
-						this.isLogin = false;
+						this.isLogin = false
 						this.logout()
 						uni.setStorageSync('unionId',response.data.unionId)
 						this.$store.commit('updateStatus',response.data)
@@ -206,12 +206,12 @@
 					this.ShopService.GetHomePageData({userId:this.userId}).then(response =>{
 						let data = response.data
 						this.name = data.shop.name 	//协销名称
-						this.shopID = data.shop.shopID 	//供应商ID
+						this.shopId = data.shop.shopId 	//供应商ID
 						this.headpic = data.shop.logo //会所头像
 						this.allNum = data.allNum	//全部商品
 						this.upNum = data.upNum 	//已上架
 						this.downNum = data.downNum //已下架
-						this.skeletonShow = false;
+						this.skeletonShow = false
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
@@ -221,13 +221,13 @@
 				this.CommonService.QueryAfterSale().then(response =>{
 					this.contactNumber = response.data.contactNumber
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			toPhone(){
 				uni.makePhoneCall({
 				    phoneNumber:this.contactNumber //仅为示例
-				});
+				})
 			},
 			navigator(url){
 				this.$api.navigateTo(url)

+ 17 - 25
pages/goods/goods-instrument.vue

@@ -71,30 +71,22 @@
 		},
 		methods:{
 			GetPageTopicInfo(){//获取数据
-				this.ProductService.GetPageTopic({type:this.linkId}).then(response =>{
-					let data = response.data
-					this.list = data
-					this.GetPageTopicBanner()
+				this.ProductService.GetPageTopic({pageId:this.linkId, source:2}).then(response =>{
+					let { floorList, page } = response.data
+					this.list = floorList
+                    this.banner = page.image
+                    this.content = page.content
+                    this.buttonLink = page.buttonLink
+                    this.buttonName = page.buttonName
+                    this.buttonLinkType = page.linkType
+                    this.buttonLinkParam = page.linkParam
+                    this.buttonLinkKeyword = page.keywords
+                    uni.setNavigationBarTitle({title:page.title})
 					this.skeletonShow = false
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			GetPageTopicBanner(){//获取banner
-				this.ProductService.GetPageTopicBanner({type:this.linkId}).then(response =>{
-					let data = response.data
-					this.banner = data.image
-					this.content = data.content
-					this.buttonLink = data.buttonLink
-					this.buttonName = data.buttonName
-					this.buttonLinkType = data.linkType
-					this.buttonLinkParam = data.linkParam
-					this.buttonLinkKeyword = data.keywords
-					uni.setNavigationBarTitle({title:data.title});
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
 			NavToDetailPage(pros) {//跳转
 				if(pros.linkType){
 					const typeMap = {
@@ -103,19 +95,19 @@
 						4:`/pages/h5/activity/activity?title=${pros.crmTitle}&link=${pros.crmLink}`,
 					 	5:`/pages/goods/product?id=${pros.linkParam.id}`,
 					 	// 7:`/pages/supplier/user/my-shop?shopId=${pros.linkParam.id}`,
-					 	8:`/pages/h5/activity/activity-list`,
-					 	9:`/pages/second/form/introduce`,
-					 	10:`/pages/second/product/product-list`,
-					 	11:`/pages/second/form/form`,
+					 	8:'/pages/h5/activity/activity-list',
+					 	9:'/pages/second/form/introduce',
+					 	10:'/pages/second/product/product-list',
+					 	11:'/pages/second/form/form',
 					 	12:`/pages/search/search?keyWord=${pros.linkParam.keyword}`,
 					 	13:`/pages/h5/article/path?link=${pros.link}`,
 					 	14:`/pages/h5/article/path?link=${pros.link}`,
 					 	15:`/pages/h5/article/path?link=${pros.link}`,
-					 	17:`/pages/login/register-select`,
+					 	17:'/pages/login/register-select',
 					 	18:`/pages/h5/article/path?link=${pros.link}`,
 					 	19:`/pages/search/search-supplier?keyWord=${pros.linkParam.keyword}`
 					}
-					const url = typeMap[pros.linkType];
+					const url = typeMap[pros.linkType]
 					uni.navigateTo({
 					  	url:url
 					})

+ 3 - 3
pages/h5/activity/activity-topic.vue

@@ -32,7 +32,7 @@
 		},
 		data(){
 			return{
-				userID:0,
+				userId:0,
 				shopId:0,
 				userIdentity:0,
 				skeletonShow:true,
@@ -62,7 +62,7 @@
 			}
 			this.pageId = option.linkId
 			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.userID = resolve.userId ? resolve.userId : 0
+				this.userId = resolve.userId ? resolve.userId : 0
 				this.shopId = resolve.shopId ? resolve.shopId : 0
 				this.userIdentity = resolve.userIdentity
 				this.GetInstrumentPageData()
@@ -79,7 +79,7 @@
 		methods:{
             
 			GetInstrumentPageData(){//获取楼层数据
-				this.CommonService.GetActivityFloorData({pageId:this.pageId,userId:this.userID,source:2}).then(response =>{
+				this.CommonService.GetActivityFloorData({pageId:this.pageId,userId:this.userId,source:2}).then(response =>{
 					let data = response.data
 					console.log(data)
 					uni.setNavigationBarTitle({title:data.page.title})

+ 41 - 41
pages/second/product/product-details.vue

@@ -117,7 +117,7 @@
 						<!-- 相关推荐 -->
 						<view class="title"><view class="title-tab">相关推荐</view></view>
 						<view class="content hot">
-							<recommend :query-productid="product.productID" v-if="isRequest" ></recommend>
+							<recommend :query-productid="product.productId" v-if="isRequest" ></recommend>
 						</view>
 					</view>
 					<!-- 商品参数 -->
@@ -143,15 +143,15 @@
 <script>
 	import { mapState,mapMutations } from 'vuex'
 	import customP from '@/components/cm-module/headerNavbar/header-poduct' 		 //自定义导航
-	import secondPrice from "@/components/cm-module/productDetails/secondPrice.vue" //价格显示
+	import secondPrice from '@/components/cm-module/productDetails/secondPrice.vue' //价格显示
 	import authorize from '@/common/config/authorize.js'
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import recommend from "@/components/cm-module/productDetails/secondRecommend" //相关推荐
-	import cmParameter from "@/components/cm-module/productDetails/secondParameters.vue" //相关参数
-	import wxLogin from "@/common/config/wxLogin.js"
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
+	import recommend from '@/components/cm-module/productDetails/secondRecommend' //相关推荐
+	import cmParameter from '@/components/cm-module/productDetails/secondParameters.vue' //相关参数
+	import wxLogin from '@/common/config/wxLogin.js'
 	import { debounce } from '@/common/config/common.js'
-	var isPreviewImg;
+	var isPreviewImg
 	export default{
 		components:{
 			uniStars,
@@ -216,7 +216,7 @@
 			...mapState(['hasLogin','userInfo','isWxAuthorize'])
 		},
 		onLoad(option) {
-			this.productID = option.id;//获取商品ID
+			this.productID = option.id//获取商品ID
 			this.isShareType = option.type
 			this.linkPath = option.path
 			this.isHeaderPoduct = true
@@ -231,15 +231,15 @@
 			initData(){// 初始化商品详情查询
 				this.SecondService.ProductDetail({productId:this.productID,userId:this.userId}).then(response =>{
 					this.skeletonShow = false
-					this.productImage=[];
+					this.productImage=[]
 					this.shop = response.data.shop
 					this.product = response.data
 					//处理商品图片列表
 					this.product.imageList.forEach(item =>{
-						this.productImage.push(item);
+						this.productImage.push(item)
 					})
 					setTimeout(()=>{
-						this.getSectionProps();
+						this.getSectionProps()
 					},2000)
 					this.isRequest = true
 				}).catch(error =>{
@@ -249,8 +249,8 @@
 				})
 			},
 			swiperChange(e) {//顶部商品图片切换
-				const index = e.detail.current;
-				this.current = index;
+				const index = e.detail.current
+				this.current = index
 			},
 			previewImg (index) {//顶部商品图片预览
 				isPreviewImg = true
@@ -263,8 +263,8 @@
 			},
 			tabClick(index) {//商品详情&&供应商信息tab切换
 				this.tabSelectFlag = true
-				this.tabCurrentIndex = index;
-				let classIndex = '.productDetails'+index;
+				this.tabCurrentIndex = index
+				let classIndex = '.productDetails'+index
 				uni.createSelectorQuery().select('.container-product-main').boundingClientRect((data)=>{//最外层盒子节点
 				  uni.createSelectorQuery().select(classIndex).boundingClientRect((res)=>{//最外层盒子节点
 				    uni.pageScrollTo({
@@ -272,7 +272,7 @@
 				      scrollTop:res.top - data.top - 150,//滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离
 				    })
 						setTimeout(()=>{
-							this.tabSelectFlag = false;
+							this.tabSelectFlag = false
 						},500)
 				  }).exec()
 				}).exec()
@@ -282,11 +282,11 @@
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
 				return headerBtnPosi
 			},
 			setSysteminfo(){
-				let systeminfo;
+				let systeminfo
 				uni.getSystemInfo({ // 获取设备信息
 					success: (res) => {
 						systeminfo = res
@@ -318,7 +318,7 @@
 			},
 			getSectionProps() {//获取每个tab对应区域的scrollTop值
 				let className = '.product-details',
-					sectionPropsArr = [];
+					sectionPropsArr = []
 				uni.createSelectorQuery().select('.container-product-main').boundingClientRect((data)=>{//最外层盒子节点
 				  uni.createSelectorQuery().selectAll(className).boundingClientRect((res)=>{//最外层盒子节点
 						res.forEach((item, index) => {
@@ -327,50 +327,50 @@
 								scrollTop: item.top - data.top - 150
 							})
 						})
-						this.sectionPropsArr = sectionPropsArr;
-						this.sectionTopRangeArr = this.getSectionRange(sectionPropsArr);
+						this.sectionPropsArr = sectionPropsArr
+						this.sectionTopRangeArr = this.getSectionRange(sectionPropsArr)
 				  }).exec()
 				}).exec()
 			},
 			getSectionRange(arr) {// 获取每个tab对应区域的区间
-				let sectionScrollTopList = [];
+				let sectionScrollTopList = []
 				for(let i = 0; i < arr.length; i++) {
-					let thisScrollTop = arr[i].scrollTop;
+					let thisScrollTop = arr[i].scrollTop
 					if(i < arr.length - 1) {
-						let nextScrollTop = arr[i+1].scrollTop;
+						let nextScrollTop = arr[i+1].scrollTop
 						if(i == 0) {
-							sectionScrollTopList.push(`0-${thisScrollTop}`);
+							sectionScrollTopList.push(`0-${thisScrollTop}`)
 						} else if(i == arr.length - 1){
-							sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop - this.winHeight}`);
+							sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop - this.winHeight}`)
 						} else {
-							sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop}`);
+							sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop}`)
 						}
 					} else {
-						sectionScrollTopList.push(`${thisScrollTop}-${thisScrollTop+500}`);
+						sectionScrollTopList.push(`${thisScrollTop}-${thisScrollTop+500}`)
 					}
 				}
-				return sectionScrollTopList;
+				return sectionScrollTopList
 			},
 			activeTab: debounce((top, _this)=> {//当滑动时也能同步激活tab
-				const { sectionTopRangeArr } = _this;
+				const { sectionTopRangeArr } = _this
 				if(sectionTopRangeArr.length > 0) {
 					sectionTopRangeArr.forEach((item, index) => {
 						let splitItem = item.split('-'),
 							openInterval = Number(splitItem[0]),
-							closedInterval = Number(splitItem[1]);
+							closedInterval = Number(splitItem[1])
 						if(top >= openInterval && top < closedInterval) {
-							_this.tabCurrentIndex = index;
+							_this.tabCurrentIndex = index
 						}
 					})
 				}
 			},100, true),
 			getWinHeight() {
-				this.winHeight = wx.getSystemInfoSync().windowHeight;
+				this.winHeight = wx.getSystemInfoSync().windowHeight
 			},
 			goIndex(){//商城首页
 				uni.switchTab({
 				    url: '/pages/tabBar/home/index'
-				});
+				})
 			}
 		},
 		onPullDownRefresh() {
@@ -380,9 +380,9 @@
 			}, 200)
 		},
 		onPageScroll(e){//实时获取到滚动的值
-			const { scrollTop } = e;
+			const { scrollTop } = e
 			if(!this.tabSelectFlag) {
-				this.activeTab(scrollTop, this);
+				this.activeTab(scrollTop, this)
 			}
 			if(e.scrollTop>100){
 				this.headerColor = true
@@ -419,16 +419,16 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
-				this.userId = resolve.userId ? resolve.userId : '';
+				this.userId = resolve.userId ? resolve.userId : ''
 				this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 3
 				if (isPreviewImg) {
-					isPreviewImg = false;
-					return;
+					isPreviewImg = false
+					return
 				} else {
-					this.initData();
+					this.initData()
 				}
 			}).catch(error =>{
-				this.initData();
+				this.initData()
 			})
 		}
 	}

+ 21 - 21
pages/seller/club/allClub-list.vue

@@ -53,8 +53,8 @@
 
 <script>
 	import authorize from '@/common/config/authorize.js'	
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	export default {
 		components:{
 			tuiLoadmore,
@@ -87,19 +87,19 @@
 			}
 		},
 		onLoad(){				
-			this.setScrollHeight();
+			this.setScrollHeight()
 		},
 		methods: {
 			setScrollHeight() {
 				// 窗口高度 - 底部距离
 				setTimeout(()=> {
-					const query = wx.createSelectorQuery().in(this);
-					query.selectAll('.add-btn').boundingClientRect();
+					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;
+								eleTop = res[0][0].top - 1
+								this.scrollHeight =  eleTop
 						}
 					})
 				}, 500)
@@ -112,12 +112,12 @@
 				let params = { searchWord:this.searchInputVal,pageNum:1,pageSize:this.pageSize }
 				this.SellerService.GetFindAllClubList(params).then(response =>{
 					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
+					if(responseData.list&&responseData.list.length > 0){
 						this.isEmpty = false
 						this.hasNextPage = response.data.hasNextPage
-						this.clubList =responseData.results
-						this.pullFlag = false;
-						setTimeout(()=>{this.pullFlag = true;},500)
+						this.clubList =responseData.list
+						this.pullFlag = false
+						setTimeout(()=>{this.pullFlag = true},500)
 						if(this.hasNextPage){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
@@ -138,11 +138,11 @@
 				let params = {searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize }
 				this.SellerService.GetFindAllClubList(params).then(response =>{
 					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
+					if(responseData.list&&responseData.list.length > 0){
 						this.hasNextPage = response.data.hasNextPage
-						this.clubList = this.clubList.concat(responseData.results) 
-						this.pullFlag = false;// 防上拉暴滑
-						setTimeout(()=>{this.pullFlag = true;},500)
+						this.clubList = this.clubList.concat(responseData.list) 
+						this.pullFlag = false// 防上拉暴滑
+						setTimeout(()=>{this.pullFlag = true},500)
 						if(this.hasNextPage){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
@@ -177,16 +177,16 @@
 			},
 			hidePhone(val){
 				let phone
-				if(val==null || val==""){
-					phone = ""	
+				if(val==null || val==''){
+					phone = ''	
 				}else{
 					phone = this.$reg.hidePhone(val)
 				}
 				return phone
 			},
 			checkData (value){
-				let data;
-				if(value == null || value ==""){
+				let data
+				if(value == null || value ==''){
 					data = ''
 				}else{
 					data = value
@@ -208,8 +208,8 @@
 		onShow() {
 			this.$api.getStorage().then(response =>{
 				this.serviceProviderId = response.serviceProviderId
-				this.pageNum = 1;
-				this.initclubList();
+				this.pageNum = 1
+				this.initclubList()
 			})
 		}
 	}

+ 1 - 1
pages/seller/index/index.vue

@@ -53,7 +53,7 @@
 					showSearch: 0,
 					title: '账户中心',  // 导航栏 中间的标题
 					textLeft:false
-				},
+				}, 
 				isIphoneX:this.$store.state.isIphoneX,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 			}

+ 3 - 1
pages/seller/remarks/add.vue

@@ -148,7 +148,9 @@ export default {
 				}
 				array.push(obj)
 				console.log('array', array)
-			})
+			}).catch(err=>{
+                console.log(err)
+            })
 		},
 		uploadPhotoFn(array) {
 			//添加图片

+ 4 - 4
pages/service/service.vue

@@ -17,14 +17,14 @@
 			}
 		},
 		onLoad(option){
-			this.initData(option);
+			this.initData(option)
 		},
 		methods:{
 			initData(option){
-				uni.setNavigationBarTitle({title:option.title});
-				this.OtherService.QueryClubProtocol({helpPageID:option.id}).then(response =>{
+				uni.setNavigationBarTitle({title:option.title})
+				this.OtherService.QueryClubProtocol({helpPageId:option.id}).then(response =>{
 					let data =response.data.content
-					this.$refs.childTemplate.html = this.$api.adaptRichTextImg(data);
+					this.$refs.childTemplate.html = this.$api.adaptRichTextImg(data)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})

+ 1 - 1
pages/service/shoppingnotice.vue

@@ -17,7 +17,7 @@
 			}
 		},
 		onLoad(){
-			this.serverUrl = '/home/afterSale';
+			this.serverUrl = '/commodity/home/sale/tips';
 			this.type = 'shoppingNotes';
 			this.initData();
 		},

+ 71 - 71
pages/supplier/user/my-product.vue

@@ -127,9 +127,9 @@
 	</view>
 </template>
 <script>
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import modalLayer from "@/components/modal-layer"
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
+	import modalLayer from '@/components/modal-layer'
 	import { mapState,mapMutations } from 'vuex'
 	const defaultListQuery = {
 			shopId:'',
@@ -143,7 +143,7 @@
 			bigTypeId:0,//一级
 			smallTypeId:0,//二级
 			tinyTypeId:0//三级
-	 };
+	 }
 	export default{
 		components: {
 			tuiLoadmore,
@@ -208,23 +208,22 @@
 			switch(option.listType){
 				case '0':
 					this.listQuery.validFlag =''
-					break;
+					break
 				case '1':
 					this.listQuery.validFlag = 2
-					break;
+					break
 				case '2':
 					this.listQuery.validFlag = 3
-					break;
+					break
 			}
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.listQuery.shopId = this.shopId = resolve.shopId
 				this.GetProductListInfo()
-				this.GetPrimaryClassification(this.listQuery.commodityType)
 			})
 		},
 		filters: {
 			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2);
+				return Number(text).toFixed(2)
 			},
 			verifyStatusFilter: function(state){
 				let stateText = '',
@@ -237,13 +236,13 @@
 						9:'已隐身',
 						10:'已冻结',
 						
-					};
+					}
 				Object.keys(stateTextObject).forEach(function(key) {
 					if(key == state){
 						stateText = stateTextObject[key]
 					}
-				});
-				return stateText;
+				})
+				return stateText
 			},
 		},
 		computed: {
@@ -258,8 +257,8 @@
 					this.featuredNum = response.data.featuredNum
 					this.hasNextPage = data.hasNextPage
 					if(data.results && data.results.length > 0){
-						this.isEmpty = false;
-						this.dataList = data.results;
+						this.isEmpty = false
+						this.dataList = data.results
 						this.handleDataList()
 						if(this.hasNextPage){
 							this.pullUpOn = false
@@ -272,13 +271,14 @@
 								this.nomoreText = '已至底部'
 							}
 						}
+                        this.GetPrimaryClassification(this.listQuery.commodityType)
 					}else{
 						this.dataList = []
 						this.isEmpty = true
 						this.pullUpOn = true
 					}
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			}, 
 			GetOnReachBottomData(index){//上拉加载
@@ -286,11 +286,11 @@
 				this.ShopService.GetSupplierPyProduct(this.listQuery).then(response =>{
 					let data = response.data.productPage
 					this.featuredNum = response.data.featuredNum
-					this.hasNextPage = data.hasNextPage;
+					this.hasNextPage = data.hasNextPage
 					this.dataList = this.dataList.concat(data.results)
 					this.handleDataList()
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
+					this.pullFlag = false// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true},500)
 					if(this.hasNextPage){
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
@@ -331,20 +331,20 @@
 			},
 			handSearchList(){//搜索
 				this.GetProductListInfo()
-				this.leftDrawer = false;
-				this.rightDrawer = false;
+				this.leftDrawer = false
+				this.rightDrawer = false
 			},	
 			handSearchClear(){//重置搜索条件
 				this.listQuery = Object.assign({}, defaultListQuery)
 				this.listQuery.shopId = this.shopId
-				this.validFlagText='';
-				this.featuredFlagText='';
-				this.commodityTypeText='';
-				this.firstClassificationText='';
-				this.twoClassificationText='';
-				this.threeClassificationText='';
-				this.classificationTwoList = [];
-				this.classificationThreeList = [];
+				this.validFlagText=''
+				this.featuredFlagText=''
+				this.commodityTypeText=''
+				this.firstClassificationText=''
+				this.twoClassificationText=''
+				this.threeClassificationText=''
+				this.classificationTwoList = []
+				this.classificationThreeList = []
 			},
 			handlerButton(e,item){//监听侧滑按钮点击事件
 				if(item.validFlag === 0 || item.validFlag === 3 || item.validFlag === 8 || item.validFlag === 9){
@@ -359,42 +359,42 @@
 					switch(e.index){
 						case 0:
 							this.$api.navigateTo(`/pages/goods/product?id=${item.productId}`)
-							break;
+							break
 						case 1:
 							if(item.featuredFlag === 1){
 								this.handleDeleteShopRemb(item)
 							}else{
 								this.handleAddShopRemb(item)
 							}
-							break;
+							break
 						case 2:
 							this.handleUnder(item)
 					}
 				}
 			},
 			handleAddShopRemb(item){//添加主页推荐
-				let num = 4- this.featuredNum;
+				let num = 4- this.featuredNum
 				this.OperationType = 'add'
 				this.handlerProduct = item
-				this.modal = true;
-				this.contentModalText = `总共能添加4个主推商品,您还能添加${num}个确定将该商品添加为主推商品吗?`;
+				this.modal = true
+				this.contentModalText = `总共能添加4个主推商品,您还能添加${num}个确定将该商品添加为主推商品吗?`
 			},
 			handleDeleteShopRemb(item){//删除主页推荐
 				this.OperationType = 'delete'
 				this.handlerProduct = item
-				this.modal = true;
-				this.contentModalText = '是否把该商品从主推商品中删除?';
+				this.modal = true
+				this.contentModalText = '是否把该商品从主推商品中删除?'
 			},
 			handleUnder(item){//下架操作
 				this.OperationType = 'under'
 				this.handlerProduct = item
-				this.modal = true;
-				this.contentModalText = '确定下架该商品吗?';
+				this.modal = true
+				this.contentModalText = '确定下架该商品吗?'
 			},
 			handleAllUnder(){//批量下架操作
-				let checkedArray = [];
-				let isValidFlag = false;
-				this.productIds = '';
+				let checkedArray = []
+				let isValidFlag = false
+				this.productIds = ''
 				if(this.isProductChecked){
 					this.dataList.forEach(el => {
 						if(el.isChecked) { 
@@ -406,16 +406,16 @@
 							this.productIds += el.productId+','
 						}
 						if(el.validFlag != 2){
-							isValidFlag = true; 
+							isValidFlag = true 
 						}	
 					})
 					if(isValidFlag){
 						this.$util.modal('','部分选中的商品暂未上架,不能进行下架操作','确定','',false,() =>{})
-						return;
+						return
 					}
 					this.OperationType = 'allunder'
-					this.modal = true;
-					this.contentModalText = '确定下架选中的商品吗?';												
+					this.modal = true
+					this.contentModalText = '确定下架选中的商品吗?'												
 				}
 			},
 			handleClick(e) {//弹窗提示用户操作
@@ -423,23 +423,23 @@
 					switch(this.OperationType){
 						case 'delete'://删除主页推荐
 							this.SupplierDeleteSwitchFeatured(this.handlerProduct)
-							break;
+							break
 						case 'add'://添加主页推荐
 							this.SupplierAddSwitchFeatured(this.handlerProduct)
-							break;
+							break
 						case 'under'://下架商品
 							this.SupplierSoldOutProduct(this.handlerProduct)
-							break;
+							break
 						case 'allunder'://批量下架
 							this.SupplierAllSoldOutProduct(this.productIds)
-							break;
+							break
 					}
 				}
-				this.modal = false;
+				this.modal = false
 			},
 			SupplierDeleteSwitchFeatured(item){//操作删除主页推荐
 				this.ShopService.SupplierSwitchFeaturedyProduct({productId:item.productId,featuredFlag:0}).then(response =>{
-					this.$util.msg('删除成功',2000,true,'success');
+					this.$util.msg('删除成功',2000,true,'success')
 					setTimeout(() => {
 						this.GetProductListInfo()
 					},2000)
@@ -449,7 +449,7 @@
 			},
 			SupplierAddSwitchFeatured(item){//操作添加主页推荐
 				this.ShopService.SupplierSwitchFeaturedyProduct({productId:item.productId,featuredFlag:1}).then(response =>{
-					this.$util.msg('添加成功',2000,true,'success');
+					this.$util.msg('添加成功',2000,true,'success')
 					setTimeout(() => {
 						this.GetProductListInfo()
 					},2000)
@@ -459,7 +459,7 @@
 			},
 			SupplierSoldOutProduct(item){//操作下架商品
 				this.ShopService.SupplierSoldOutProduct({productIds:item.productId}).then(response =>{
-					this.$util.msg('下架成功',2000,true,'success');
+					this.$util.msg('下架成功',2000,true,'success')
 					setTimeout(() => {
 						this.GetProductListInfo()
 					},2000)
@@ -469,8 +469,8 @@
 			},
 			SupplierAllSoldOutProduct(ids){//操作批量下架商品
 				this.ShopService.SupplierSoldOutProduct({productIds:ids}).then(response =>{
-					this.$util.msg('下架成功',2000,true,'success');
-					this.productIds = '';
+					this.$util.msg('下架成功',2000,true,'success')
+					this.productIds = ''
 					setTimeout(() => {
 						this.GetProductListInfo()
 					},2000)
@@ -483,22 +483,22 @@
 					case 0:
 						this.commodityTypeText = this.statusActions[e.target.value].name
 						this.listQuery.commodityType = this.commodityTypeActons[e.target.value].value
-						break;
+						break
 					case 1:
 						this.validFlagText = this.statusActions[e.target.value].name
 						this.listQuery.validFlag = this.statusActions[e.target.value].value
-						break;
+						break
 					case 2:
 						this.featuredFlagText = this.recommendActions[e.target.value].name
 						this.listQuery.featuredFlag = this.recommendActions[e.target.value].value
-						break;
+						break
 					case 3:			
 						this.firstClassificationText = this.classificationFirstList[e.target.value].name
 						this.listQuery.bigTypeId = this.classificationFirstList[e.target.value].value
 						this.GetPrimarySecondaryClassification(this.listQuery.bigTypeId)
 						this.twoClassificationText = ''
 						this.threeClassificationText=''
-						break;
+						break
 					case 4:
 						if(this.listQuery.bigTypeId == 0){
 							this.$util.msg('请先选择一级分类',2000)
@@ -507,7 +507,7 @@
 						this.twoClassificationText = this.classificationTwoList[e.target.value].name
 						this.listQuery.smallTypeId = this.classificationTwoList[e.target.value].value
 						this.GetPrimaryThreeLevelClassification(this.listQuery.smallTypeId)
-						break;
+						break
 					case 5:
 						if(this.listQuery.smallTypeId == 0){
 							this.$util.msg('请先选择二级分类',2000)
@@ -515,7 +515,7 @@
 						}
 						this.threeClassificationText = this.classificationThreeList[e.target.value].name
 						this.listQuery.tinyTypeId = this.classificationThreeList[e.target.value].value
-						break;
+						break
 				}
 			},
 			GetPrimaryClassification(value){//获取筛选条件一级分类
@@ -554,14 +554,14 @@
 				})
 			},
 			hideMobel(){
-				this.modal = false;
+				this.modal = false
 			},
 			updateCheckAllBtn() {//勾选单个判断全选
 				let goodsCheckedLength = 0
 				this.dataList.forEach(item => {
-					if(item.isChecked) { goodsCheckedLength++; }
+					if(item.isChecked) { goodsCheckedLength++ }
 				})
-				this.isAllChecked = goodsCheckedLength === this.dataList.length;
+				this.isAllChecked = goodsCheckedLength === this.dataList.length
 				if(goodsCheckedLength>0){
 					this.isProductChecked = true
 				}else{
@@ -594,15 +594,15 @@
 				this.isSuperv = false
 			},
 			searchClickFn() {//弹出抽屉
-				this.rightDrawer = true;
+				this.rightDrawer = true
 			},
 			closeDrawer(e) {//关闭抽屉
-				this.leftDrawer = false;
-				this.rightDrawer = false;
+				this.leftDrawer = false
+				this.rightDrawer = false
 			},
 			orderPriceToFixed (n){
-				let price ='';
-				price = Number(n).toFixed(2);
+				let price =''
+				price = Number(n).toFixed(2)
 				return price
 			},
 			verifyColorFilter: function(state){
@@ -614,13 +614,13 @@
 						3:'#627386',
 						8:'#FF2A2A',
 						9:'#f94b4b'
-					};
+					}
 				Object.keys(stateColorObject).forEach(function(key){
 					if(key == state){
 						stateColor = stateColorObject[key]
 					}
-				});
-				return stateColor;
+				})
+				return stateColor
 			},
 		},
 		onPageScroll(e){//实时获取到滚动的值

+ 2 - 2
pages/supplier/user/my-shop.vue

@@ -432,7 +432,7 @@ export default {
 		},
 		GetSupplierHomeBanner() {
 			//轮播图
-			this.ShopService.GetSupplierHomeBanner({ supplierId: this.supplierId })
+			this.ShopService.GetSupplierHomeBanner({ shopId: this.supplierId })
 				.then(response => {
 					this.bannerImageList = response.data
 				})
@@ -442,7 +442,7 @@ export default {
 		},
 		GetSupplierHomeDeatils() {
 			//商铺详情
-			this.ShopService.GetSupplierHomeDeatils({ supplierId: this.supplierId })
+			this.ShopService.GetSupplierHomeDeatils({ shopId: this.supplierId })
 				.then(response => {
 					let data = response.data
 					this.normalNum = data.normalNum

+ 35 - 38
pages/tabBar/home/index.vue

@@ -28,7 +28,7 @@
 </template>
 
 <script>
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
 	import authorize from '@/common/config/authorize.js'
 	import customer from '@/components/cm-module/homeIndex/customer.vue'
 	import banner from '@/components/cm-module/homeIndex/banner.vue'
@@ -39,7 +39,7 @@
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
 	import activityAlert from '@/components/cm-module/activity/activity.vue'
 	import activityBean from '@/components/cm-module/activity/activityBean.vue'
-	import { mapState,mapMutations} from 'vuex';
+	import { mapState,mapMutations} from 'vuex'
 	export default {
 		components:{
 			tuiSkeleton,
@@ -97,20 +97,20 @@
 		methods: {
 			...mapMutations(['login','logout']),
 			async GetWxAuthorize(){
-				const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-				const getUserInfo = await authorize.getUserInfo('weixin');
+				const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+				const getUserInfo = await authorize.getUserInfo('weixin')
 				this.UserService.UserLoginAuthApplets({ 
 					code:wechatCode,
 					encryptedData:getUserInfo.encryptedData,
 					iv:getUserInfo.iv
 				})
 				.then(response =>{
-					this.isLogin = true;
-					this.userID = response.data.userId;						
-					this.userIdentity = response.data.userIdentity;						
-					this.clubStatus = response.data.clubStatus;						
+					this.isLogin = true
+					this.userID = response.data.userId						
+					this.userIdentity = response.data.userIdentity						
+					this.clubStatus = response.data.clubStatus						
 					this.$store.commit('updateStatus',response.data)
-					this.login(response.data);
+					this.login(response.data)
 					uni.setStorageSync('token',response.data.token)
 					uni.setStorageSync('unionId',response.data.unionId)
 					if(response.data.userIdentity ==1){
@@ -122,7 +122,7 @@
 					this.getHomeInformation()
 				})
 				.catch(error =>{
-					this.isLogin = false;
+					this.isLogin = false
 					this.logout()
 					uni.setStorageSync('unionId',error.data.unionId)
 					this.$store.commit('updateStatus',error.data)
@@ -130,23 +130,6 @@
 					
 				})
 			},		
-			GetHomeInit(){//金刚区分类
-				this.CommonService.GetHomeInit({source:2}).then(response =>{
-					let data = response.data
-					this.navBarsList = data.topMenuList
-					this.couponEntry = data.couponEntry
-					if(!this.hasLogin && this.couponEntry == 1){
-						if(uni.getStorageSync('isActivitySwitch')){
-							this.$store.commit('setActivity',false)
-						}else{
-							this.$store.commit('setActivity',true)
-						}
-					}
-					this.isNavRequest = true
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
 			GetHomeTopDataInfo(){//直播、活动、文章模块
 				this.CommonService.GetHomeTopDataInfo({source:2}).then(response =>{
 					this.templateData = response.data
@@ -157,11 +140,11 @@
 			},
 			GetHomeFloorInfo(){//初始化首页楼层数据
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
-					let data = response.data;
-					this.pageList = data.homePageFloor;
-					this.supplierObj = data.supplierImage;
+					let data = response.data
+					this.pageList = data.homePageFloor
+					this.supplierObj = data.supplierImage
 					setTimeout(()=>{
-						this.isRequest = true;
+						this.isRequest = true
 					},500)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -177,22 +160,36 @@
 				})
 			},
 			getHomeInformation(){//初始化首页数据	
-				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
-					let data = res.data;
-					this.bannerImageList = data.bannerImageList
+				this.CommonService.GetHomeModulesDataInfo({ source: 2 }).then(res =>{
+					let data = res.data
+					this.bannerImageList = data.bannerList
 					this.mallPageModules = data.mallPageModules
-					this.$store.commit('updateAllNum',data.shoppingCartCount)
-					this.skeletonShow = false;
-					this.GetHomeInit()
+					this.skeletonShow = false
+                    this.navBarsList = data.topMenuList
+                    this.couponEntry = data.couponEntry
+                    if(!this.hasLogin && this.couponEntry == 1){
+                    	if(uni.getStorageSync('isActivitySwitch')){
+                    		this.$store.commit('setActivity',false)
+                    	}else{
+                    		this.$store.commit('setActivity',true)
+                    	}
+                    }
 					this.GetHomeTopDataInfo()
 					this.GetHomeFloorInfo()
+                    this.initShoppingCartCount()
+                    this.isNavRequest = true
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+            initShoppingCartCount(){ // 获取购物车数量
+                this.OrderService.ShoppingCartCount({ userId: this.userID}).then(res =>{
+                    this.$store.commit('updateAllNum',res.data)
+                })
+            },
 			handleClick(data){
 				const pageId = 306
-				this.$api.navigateTo(`/pages/user/coupon/coupon-collection`)
+				this.$api.navigateTo('/pages/user/coupon/coupon-collection')
 				this.$store.commit('setActivity',data)
 				uni.setStorageSync('lockTime',Date.now())	
 				uni.setStorageSync('isActivitySwitch',true)

+ 7 - 7
services/ajax.service.js

@@ -1,8 +1,7 @@
 /**
  * ajax请求相关的服务
  */
-import spiServiceUrl from './ajax.env'
-import corServiceUrl from './config.env'
+import requestUrl from '@/services/config.env.js'
 import { msg } from '@/utils/util'
 
 class AjaxService {
@@ -27,11 +26,12 @@ class AjaxService {
         if (options.header) {
             header = Object.assign(header, options.header)
         }
-        if(options.isHost){
-            url = corServiceUrl + url
-        }else{
-            url = spiServiceUrl + url
-        }
+        url = requestUrl + url
+        // if(options.isHost){
+        //     url = corServiceUrl + url
+        // }else{
+        //     url = spiServiceUrl + url
+        // }
         let { isLoading = true } = options
         if (isLoading) {
             uni.showLoading({ title: '加载中' })

+ 6 - 6
services/common.service.js

@@ -17,7 +17,7 @@ export default class CommonService {
 	/* 首页初始化 */
 	GetHomeModulesDataInfo(data = {}) {
 		return this.AjaxService.get({
-			url: '/home/modules',
+			url: '/commodity/home/init',
 			data,
 			isLoading: false,
 		})
@@ -52,7 +52,7 @@ export default class CommonService {
 	/* 首页顶部三个模块数据 */
 	GetHomeTopDataInfo(data = {}) {
 		return this.AjaxService.get({
-			url: '/home/top/data',
+			url: '/commodity/home/sidebar',
 			data,
 			isLoading: false,
 		})
@@ -60,7 +60,7 @@ export default class CommonService {
 	/* 获取其他服务信息 */
 	QueryAfterSale(data = {}) {
 		return this.AjaxService.get({
-			url: '/home/afterSale',
+			url: '/commodity/home/sale/tips',
 			data,
 			isLoading: false,
 		})
@@ -100,7 +100,7 @@ export default class CommonService {
 	/* 直播专题页图片 */
 	GetHomeLiveAdvertising(data = {}) {
 		return this.AjaxService.get({
-			url: '/home/live/advertising',
+			url: '/commodity/home/sidebar',
 			data,
 			isLoading: false,
 		})
@@ -108,7 +108,7 @@ export default class CommonService {
 	/* 搜索热门关键词 */
 	GetHomeHotSearchTerms(data = {}) {
 		return this.AjaxService.get({
-			url: '/home/hotSearchTerms',
+			url: '/commodity/search/query/hot/keyword',
 			data,
 			isLoading: false,
 		})
@@ -151,7 +151,7 @@ export default class CommonService {
 	/*活动页面获取楼层*/
 	GetActivityFloorData(data = {}) {
 		return this.AjaxService.get({
-			url: '/commodity/page/floor',
+			url: '/commodity/page/beauty',
 			data,
 			isLoading: false,
 			isHost: true

+ 2 - 2
services/config.env.js

@@ -3,8 +3,8 @@ if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
-    // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-    URL_CONFIG = 'https://core-b.caimei365.com'
+    URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
+    // URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境

+ 12 - 0
services/order.service.js

@@ -161,6 +161,18 @@ export default class OrderService {
             isHost:true
         })
     }
+    /**
+     *@机构-购物车商品数量
+     *@param userId 用户ID
+     */
+    ShoppingCartCount (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/cart/count', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
     /**
 	 *@机构-购物车去结算确认订单初始化数据
 	 *@param userId 用户ID

+ 1 - 1
services/other.service.js

@@ -21,6 +21,6 @@ export default class OtherService {
 	 * 协议
 	 */
 	QueryClubProtocol (data) {
-		return this.AjaxService.get({ url:'/club/protocol', data, isLoading: true })
+		return this.AjaxService.get({ url:'/user/center/protocol', data, isLoading: true })
 	}
 }

+ 5 - 5
services/product.service.js

@@ -188,11 +188,11 @@ export default class ProductService {
     }
     /* 二级列表 */
     GetPageTopic (data = {}) {
-        return this.AjaxService.get({ url:'/page/topic', data, isLoading: false })
+        return this.AjaxService.get({ url:'/commodity/page/floor', data, isLoading: false })
     }
     /* 二级列表banner */
     GetPageTopicBanner (data = {}) {
-        return this.AjaxService.get({ url:'/page/topic/info', data, isLoading: false })
+        return this.AjaxService.get({ url:'/commodity/page/floor', data, isLoading: false })
     }
     /* 活动专题列表 */
     GetPromotionsrList (data = {}) {
@@ -223,15 +223,15 @@ export default class ProductService {
     }
     /* 查询搜索历史记录 */
     GetProductSearchHistory (data = {}) {
-        return this.AjaxService.get({ url:'/product/searchHistory', data, isLoading: false })
+        return this.AjaxService.get({ url:'/commodity/search/query/history', data, isLoading: false })
     }
     /* 添加搜索历史记录 */
     GetAddProductSearchHistory (data = {}) {
-        return this.AjaxService.get({ url:'/product/history/add', data, isLoading: true })
+        return this.AjaxService.get({ url:'/commodity/search/query/history/add', data, isLoading: true })
     }
     /* 清除搜索历史记录 */
     GetDeleteProductSearchHistory (data = {}) {
-        return this.AjaxService.get({ url:'/product/searchHistory/delete', data, isLoading: false })
+        return this.AjaxService.get({ url:'/commodity/search/query/history/delete', data, isLoading: false })
     }
     /* 搜索商品列表 */
     GetProductSearchList (data = {}) {

+ 6 - 5
services/public.js

@@ -4,7 +4,7 @@
  *@date 2020/03/19 14:56:57
  *@param registerByPass
  */
-import requestUrl from '@/services/ajax.env.js'
+import requestUrl from '@/services/config.env.js'
 import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
 
@@ -38,7 +38,7 @@ export function uploadFileImage() {
                 const tempFilePaths = res.tempFilePaths
                 wx.showLoading({ title: '上传中~' })
                 const uploadTask = uni.uploadFile({
-                    url: requestUrl + '/formData/MultiPictareaddData',
+                    url: requestUrl + '/tools/image/upload/multi',
                     filePath: tempFilePaths[0],
                     name: 'file',
                     header: {
@@ -75,7 +75,7 @@ export function uploadFilePdfDocDocx() {
                 const size = tempFilePaths[0].size //获取图片的大小,单位B
                 const filename = res.tempFiles[0].name
                 const newfilename = filename + ''
-                const url = requestUrl + '/file/upload'
+                const url = requestUrl + '/tools/file/upload/oss'
                 uni.setStorageSync('fileName', filename)
                 console.log('filename', filename)
                 //截取
@@ -140,7 +140,7 @@ export function uploadFilePdf() {
                 const size = tempFilePaths[0].size //获取图片的大小,单位B
                 const filename = res.tempFiles[0].name
                 const newfilename = filename + ''
-                const url = requestUrl + '/file/upload'
+                const url = requestUrl + '/tools/file/upload/oss'
                 uni.setStorageSync('fileName', filename)
                 console.log('filename', filename)
                 //截取
@@ -195,6 +195,7 @@ export function uploadFilePdf() {
  * 限制pdf,doc,docx
  */
 export function uploadFilePdfDocDocxXlsx() {
+    debugger
     return new Promise(function(resolve, reject) {
         wx.chooseMessageFile({
             count: 1,
@@ -205,7 +206,7 @@ export function uploadFilePdfDocDocxXlsx() {
                 const size = tempFilePaths[0].size //获取图片的大小,单位B
                 const filename = res.tempFiles[0].name
                 const newfilename = filename + ''
-                const url = requestUrl + '/file/upload'
+                const url = requestUrl + '/tools/file/upload/oss'
                 uni.setStorageSync('fileName', filename)
                 console.log('filename', filename)
                 //截取

+ 1 - 1
services/second.service.js

@@ -20,7 +20,7 @@ export default class SecondService {
 	}
 	/*二手发布/品牌列表 */
 	brandList (data = {}) {
-		return this.AjaxService.get({ url:'/product/brandList', data, isLoading: true })
+		return this.AjaxService.get({ url:'/commodity/second/brands', data, isLoading: true })
 	}
 	/*二手发布/提交发布 */
 	SecondHandProduct (data = {}) {

+ 16 - 3
services/sellse.service.js

@@ -26,7 +26,7 @@ export default class SellerService {
 	 *@param userID 协销ID
 	 */
     GetSellerHome (data = {}) {
-        return this.AjaxService.get({ url:'/seller/home', data, isLoading: true })
+        return this.AjaxService.get({ url:'/user/seller/home', data, isLoading: true })
     }
     /**
 	 *@协销拉机构上线(资料填写)
@@ -80,6 +80,19 @@ export default class SellerService {
             isHost:true
         })
     }
+    /**
+     *@协销机构列表
+     *@param serviceProviderId 协销ID
+     *@param pageNum  页码
+     *@param pageSize 条数
+     */
+    GetOrderCount (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/seller/count', 
+            data, 
+            isLoading: true ,
+        })
+    }
     /**
 	 *@协销机构列表
 	 *@param name 	  机构名字关键字(搜索用)
@@ -88,7 +101,7 @@ export default class SellerService {
 	 */
     GetFindAllClubList (data = {}) {
         return this.AjaxService.get({ 
-            url:'/seller/findAllClub', 
+            url:'/user/seller/club/all', 
             data, 
             isLoading: true ,
         })
@@ -181,7 +194,7 @@ export default class SellerService {
 	 *@param productId:商品ID(数字类型,必传)
 	 */
     ProductRecommend (data={}){//相关推荐
-        return this.AjaxService.get({ url:'/product/getSecondHandProductRecommend', data, isLoading: true })
+        return this.AjaxService.get({ url:'/commodity/second/recommend', data, isLoading: true })
     }
     /*协销下单购物车->api*/
     /**

+ 4 - 4
services/shop.service.js

@@ -26,7 +26,7 @@ export default class ShopService {
 	}
 	/* 小程序供应商个人中心 */
 	GetHomePageData (data = {}) {
-		return this.AjaxService.get({ url:'/supplier/homePageData', data, isLoading: true })
+		return this.AjaxService.get({ url:'/user/shop/personal/data', data, isLoading: true })
 	}
 	/* 小程序供应商我的商品 */
 	GetSupplierPyProduct (data = {}) {
@@ -58,7 +58,7 @@ export default class ShopService {
 	/* 小程序供应商我的店铺详情 */
 	GetSupplierHomeDeatils (data = {}) {
 		return this.AjaxService.get({ 
-			url:'/supplier/home/detail', 
+			url:'/user/shop/home/data', 
 			data, 
 			isLoading: true ,
 		})
@@ -66,7 +66,7 @@ export default class ShopService {
 	/* 小程序供应商我的店铺banner */
 	GetSupplierHomeBanner (data = {}) {
 		return this.AjaxService.get({ 
-			url:'/supplier/home/images', 
+			url:'/user/shop/home/images', 
 			data, 
 			isLoading: true ,
 		})
@@ -227,7 +227,7 @@ export default class ShopService {
 	/* 一级分类 */
 	GetPrimaryClassification (data = {}) {
 		return this.AjaxService.get({ 
-			url:'/supplier/primaryClassification',
+			url:'/commodity/type/first',
 			data, 
 			isLoading: false ,
 		})

+ 1 - 1
services/upload.service.js

@@ -9,7 +9,7 @@ export default class UploadService {
 	/*删除oss对应文件*/
 	PostFileDelete (data = {}) {
 		return this.AjaxService.post({ 
-			url:'/file/delete', 
+			url:'/tools/file/delete/oss', 
 			data, 
 			isLoading: false
 		})

+ 1 - 1
services/user.service.js

@@ -230,7 +230,7 @@ export default class UserService {
 	 */
     GetAccountInfo (data = {}) {
         return this.AjaxService.get({ 
-            url:'/personalCenter/touchBalance', 
+            url:'/user/center/balance', 
             data, 
             isLoading: true ,
         })