瀏覽代碼

协销模块,修复测试问题

zhengjinyi 5 年之前
父節點
當前提交
e76493598f
共有 38 個文件被更改,包括 289 次插入223 次删除
  1. 14 11
      App.vue
  2. 3 1
      common/config/authorize.js
  3. 2 2
      common/config/config.js
  4. 13 11
      common/config/wxLogin.js
  5. 1 0
      components/module/creatOrder/choiceAddress.vue
  6. 22 3
      components/module/creatOrder/freight.vue
  7. 4 0
      components/module/creatOrder/sellerFreight.vue
  8. 1 1
      components/module/orderDetails/goodsList.vue
  9. 10 0
      components/module/orderDetails/orderInformation.vue
  10. 1 1
      market/pages/address/address.vue
  11. 24 19
      market/pages/address/addressManage.vue
  12. 3 3
      market/pages/club/list.vue
  13. 5 2
      market/pages/login/apply.vue
  14. 6 2
      market/pages/login/information.vue
  15. 20 18
      market/pages/login/login.vue
  16. 4 2
      market/pages/order/create-order.vue
  17. 7 3
      market/pages/order/order-details.vue
  18. 2 2
      market/pages/order/order-history.vue
  19. 1 2
      market/pages/order/order-list.vue
  20. 1 1
      market/pages/search/search-order.vue
  21. 0 5
      pages.json
  22. 1 0
      pages/authorization/authorization.vue
  23. 44 10
      pages/goods/product.vue
  24. 4 8
      pages/login/apply.vue
  25. 19 17
      pages/login/bindOperator.vue
  26. 3 3
      pages/login/information.vue
  27. 14 12
      pages/login/register.vue
  28. 1 1
      pages/search/search-order.vue
  29. 28 22
      pages/tabBar/home/home.vue
  30. 0 1
      pages/tabBar/user/user.vue
  31. 1 1
      pages/user/address/address.vue
  32. 19 14
      pages/user/address/addressManage.vue
  33. 0 5
      pages/user/operator/addoperator.vue
  34. 0 35
      pages/user/operator/bindstep.vue
  35. 4 2
      pages/user/order/create-order.vue
  36. 1 1
      pages/user/order/order-list.vue
  37. 5 1
      pages/user/order/orderShareLogin.vue
  38. 1 1
      pages/user/regularPurchase/regularPurchase.vue

+ 14 - 11
App.vue

@@ -61,18 +61,21 @@
 			getCheekeyCode(){// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 				authorize.getCode('weixin').then(wechatcode =>{
 					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					userInfoLogin({code:wechatcode}).then(response =>{
-						this.login(response.data)
-						uni.setStorageSync('token',response.data.token)
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						this.$store.commit('updateStatus',response.data)
-					}).catch(response =>{
-						this.logout()
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.$store.commit('updateStatus',response.data)
+					authorize.getUserInfo('weixin').then(wxResponse =>{
+						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
+							this.login(response.data)
+							uni.setStorageSync('token',response.data.token)
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							this.$store.commit('updateStatus',response.data)
+						}).catch(response =>{
+							this.logout()
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
+							this.$store.commit('updateStatus',response.data)
+						})
 					})
+
 				})
 			},
 			refresh(){

+ 3 - 1
common/config/authorize.js

@@ -96,7 +96,9 @@ const getSetting = function() {
                 if(authSetting['scope.userInfo']===false){resolve(0);return;}//拒绝授权
                 resolve(2) //2未操作
             },
-            fail:function() { reject("获取用户授权失败") }
+            fail:function() { 
+				reject("获取用户授权失败") 
+			}
         })
     })
 }

+ 2 - 2
common/config/config.js

@@ -1,10 +1,10 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.26:8008'	 //超超联调地址
 	// URL_CONFIG = 'http://192.168.1.24:8008'	 //俊俊联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 13 - 11
common/config/wxLogin.js

@@ -4,17 +4,19 @@ import { userInfoLogin } from "@/api/use.js"
 // 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 const wxLoginAuthorize = function(){
 	authorize.getCode('weixin').then(wechatcode =>{
-		userInfoLogin({code:wechatcode}).then(response =>{
-			store.commit('updateStatus',response.data)
-			store.commit('login',response.data);
-			uni.setStorageSync('token',response.data.token)
-			uni.removeStorageSync('sessionid')
-			uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-		}).catch(response =>{
-			uni.removeStorageSync('sessionid')
-			uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-			store.commit('logout',response.data)
-			store.commit('updateStatus',response.data)
+		authorize.getUserInfo('weixin').then(wxResponse =>{
+			userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
+				store.commit('updateStatus',response.data)
+				store.commit('login',response.data);
+				uni.setStorageSync('token',response.data.token)
+				uni.removeStorageSync('sessionid')
+				uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+			}).catch(response =>{
+				uni.removeStorageSync('sessionid')
+				uni.setStorageSync('sessionid','JSESSIONID='+response.data)
+				store.commit('logout',response.data)
+				store.commit('updateStatus',response.data)
+			})
 		})
 	})
 }

+ 1 - 0
components/module/creatOrder/choiceAddress.vue

@@ -65,6 +65,7 @@
 					this.addressSrc = '/pages/user/address/addressManage'
 				}else{
 					this.isEmpty = false
+					this.$parent.isFreight = false
 					this.addressSrc = '/pages/user/address/address?type=select'
 				}
 			}

+ 22 - 3
components/module/creatOrder/freight.vue

@@ -7,6 +7,7 @@
 			</view>
 			<view class="freight-right">
 				<text>{{freightText}}</text>
+				<text class="text" v-if="freightData.freePostFlag == 1">¥{{orderPriceToFixed(freightMoney)}}</text>
 			</view>
 		</view>
 	</view>
@@ -23,6 +24,7 @@
 		data() {
 			return{
 				freightText:'',
+				freightMoney:''
 			}
 		},
 		created(){
@@ -35,13 +37,24 @@
 			initData(res) {
 				switch(res.freePostFlag){
 					case 0:
-						this.freightText = '包邮';break
+						this.freightText = '包邮'
+						this.freightData.freight  = 0
+						break
 					case 1:
-						this.freightText = res.freePostFlag;break
+						this.freightText = '不包邮'
+						this.freightMoney = res.freight
+						break
 					case -1:
-						this.freightText = '到付';break
+						this.freightText = '到付'
+						this.freightData.freight  = 0
+						break
 				}
 			},
+			orderPriceToFixed (num){
+				let price ='';
+				price = parseInt(num).toFixed(2);
+				return price
+			},
 			showTip(){
 				this.$emit('showFreightAlert');
 			},
@@ -78,6 +91,12 @@
 			.freight-right{
 				float: right;
 				color: #2A81FF;
+				.text{
+					line-height: 88rpx;
+					color: #ff0000;
+					margin:0 20rpx;
+					font-weight: normal;
+				}
 			}
 		}
 	}

+ 4 - 0
components/module/creatOrder/sellerFreight.vue

@@ -76,22 +76,26 @@
 		},
 		methods:{
 			infoData(data){//初始化运费
+				console.log(data)
 				switch(data.freePostFlag){
 					case 1:
 						this.current = 0;
 						this.freightData.freePostFlag = data.freePostFlag;
 						this.freightData.freight = data.freight;
+						this.freightMoney = data.freight;
 						this.freightText = '不包邮'
 						break;
 					case 0:
 						this.current = 1;
 						this.freightData.freePostFlag = data.freePostFlag;
 						this.freightText = '包邮'
+						this.freightData.freight  = 0
 						break;
 					case -1:
 						this.current = 2;
 						this.freightData.freePostFlag = data.freePostFlag;
 						this.freightText = '到付'
+						this.freightData.freight  = 0
 						break;
 				}
 			},

+ 1 - 1
components/module/orderDetails/goodsList.vue

@@ -40,7 +40,7 @@
 				</view>
 				<view class="goods-pros-b">
 					<view class="count">共{{item.itemCount}}件商品</view>
-					<view class="sum">商品总额:<text class="money">¥{{item.productAmount.toFixed(2)}}</text></view>
+					<view class="sum">商品总额:<text class="money">¥{{item.totalAmount.toFixed(2)}}</text></view>
 				</view>
 			</view>
 		</view>	

+ 10 - 0
components/module/orderDetails/orderInformation.vue

@@ -26,6 +26,11 @@
 				<view class="view-num">税费:¥{{expensesOfTaxation == null ? '0.00' : expensesOfTaxation}}</view>
 				<view class="view-man bold">应付总额:<text class="red">¥{{payableAmount =='undefined' ? '0.00' : payableAmount}}</text></view>
 			</view>
+			<view class="information-view">
+				<view class="view-num">已支付:¥{{receiptAmount == null ? '0.00' : receiptAmount}}</view>
+				<view class="view-man bold">待付金额:<text class="red">¥{{pendingPayments =='undefined' ? '0.00' : pendingPayments}}</text></view>
+			</view>
+			
 			<view class="information-view">
 				<view class="view-num time">下单时间:{{orderData.orderTime =='undefined' ? '' : orderData.orderTime}}</view>
 			</view>
@@ -51,6 +56,8 @@
 				discountFee:'',
 				freePostFlag:'',
 				payableAmount:'',
+				pendingPayments:'',
+				receiptAmount:'',
 				typeText:'',
 				expensesOfTaxation:'',
 				typeTextObject:{
@@ -94,6 +101,8 @@
 				this.payableAmount =this.toFiexdFn(res.payableAmount);	//应付总额
 				this.balancePayFee = this.toFiexdFn(res.balancePayFee);
 				this.discountFee = this.toFiexdFn(res.discountFee);
+				this.pendingPayments = this.toFiexdFn(res.pendingPayments);
+				this.receiptAmount = this.toFiexdFn(res.receiptAmount);
 				this.freePostFlag = res.freePostFlag;
 				this.freight = this.toFiexdFn(res.freight);
 				this.expensesOfTaxation = this.toFiexdFn(res.expensesOfTaxation);
@@ -168,6 +177,7 @@
 					float: right;
 					text-align: right;
 					color: #FF2A2A;
+					flex: 2;
 				}
 				.clipboard{
 					width: 84rpx;

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

@@ -139,7 +139,7 @@
 			deleteAddress(id){
 				this.$util.modal('','确定要删除该地址?','确定','取消',true,() =>{
 					deleteNewAddress({addressID:id,userID:this.userID}).then(response =>{
-						this.$util.msg('删除成功',2000)
+						this.$util.msg('删除成功',2000,true,'success')
 						setTimeout(() =>{
 							this.pageNum = 1;
 							this.addressList = [];

+ 24 - 19
market/pages/address/addressManage.vue

@@ -75,12 +75,18 @@
 			if(option.type==='edit'){
 				title = '编辑收货地址'
 				this.isConfirm = false;
-				this.addType = 2;				
-				this.addressData = JSON.parse(option.data)
-				this.addressData.allAddress = `${this.addressData.province}-${this.addressData.city}-${this.addressData.town}`
-				this.addressData.addressDetail = this.addressData.address 
-				this.addressData.defaultFlag = this.addressData.defaultFlag;
-				if(this.addressData.defaultFlag == 1){
+				this.addType = 2;	
+				let optionData = JSON.parse(option.data)
+				this.addressData.allAddress = `${optionData.province}-${optionData.city}-${optionData.town}`
+				this.addressData.addressDetail = optionData.address
+				this.addressData.defaultFlag = optionData.defaultFlag;
+				this.addressData.userID = optionData.userID;
+				this.addressData.mobile = optionData.mobile;
+				this.addressData.townID = optionData.townID;
+				this.addressData.addressID = optionData.addressID;
+				this.addressData.shouHuoRen = optionData.shouHuoRen;
+				this.addressData.addressID = optionData.addressID;
+				if(optionData.defaultFlag == 1){
 					this.switchDefault = true
 				}else{
 					this.switchDefault = false
@@ -105,40 +111,39 @@
 			},
 			onConfirm(e) {
 				this.addressData.allAddress = e.name;
-				this.addressData.townID = e.cityCode;	
+				this.addressData.townID = e.townCode;	
 			},			
 			//提交
 			confirm(){
-				let data = this.addressData;
-				if(!data.shouHuoRen){
+				if(!this.addressData.shouHuoRen){
 					this.$util.msg('请填写收货人');
 				}
-				if(data.address =='所在地区'){
+				if(this.addressData.address =='所在地区'){
 					this.$util.msg('请选择所在地区');
 				}
-				if(!/(^1[0-9][0-9]{9}$)/.test(data.mobile)){
+				if(!/(^1[0-9][0-9]{9}$)/.test(this.addressData.mobile)){
 					this.$util.msg('请输入正确的手机号码');
 					return;
 				}
 				if(this.addType ==1){
 					this.params ={
-							userID:data.userID  ,		//用户id ,只在新增收货地址时传
-							shouHuoRen:data.shouHuoRen ,//收货人
-							townID:data.townID,			//区ID
-							addressDetail:data.addressDetail,//地址
-							mobile:data.mobile,			//手机
-							defaultFlag:data.defaultFlag//是否默认收货地址(0 不是默认,1 默认)
+							userID:this.addressData.userID  ,		//用户id ,只在新增收货地址时传
+							shouHuoRen:this.addressData.shouHuoRen ,//收货人
+							townID:this.addressData.townID,			//区ID
+							addressDetail:this.addressData.addressDetail,//地址
+							mobile:this.addressData.mobile,			//手机
+							defaultFlag:this.addressData.defaultFlag//是否默认收货地址(0 不是默认,1 默认)
 						}
 					this.postAddressData(this.params)	
 				}else{
-					this.params =  this.addressData;
+					this.params = this.addressData;
 					this.postAddressData(this.params)
 				}
 			},
 			postAddressData(res){
 				this.btnText(true)
 				addNewAddress(res).then( response=>{
-					this.$util.msg('添加成功',2000);
+					this.$util.msg('保存成功',2000,true,'success')
 					this.btnText(false)
 					setTimeout(()=>{
 						uni.navigateBack();

+ 3 - 3
market/pages/club/list.vue

@@ -194,13 +194,13 @@
 			checkData(item){
 				switch(this.tabCurrentIndex){
 					case 0:
-						this.$api.navigateTo(`/market/pages/login/information?userID=${item.userID}`)
+						this.$api.navigateTo(`/market/pages/login/information?userID=${item.userID}&status=${item.status}`)
 						break;
 					case 1:
-						this.$api.navigateTo(`/market/pages/login/apply?userID=${item.userID}`)
+						this.$api.navigateTo(`/market/pages/login/apply?userID=${item.userID}&status=${item.status}`)
 						break;
 					case 2:
-						this.$api.navigateTo(`/market/pages/login/information?userID=${item.userID}`)
+						this.$api.navigateTo(`/market/pages/login/information?userID=${item.userID}&status=${item.status}`)
 						break;
 				}
 			},

+ 5 - 2
market/pages/login/apply.vue

@@ -244,11 +244,12 @@ import { mapMutations } from 'vuex';
 				isPreviewImage:false,   //预览图片开关
 				userID:'',				//用户ID
 				clubID:'',				//会所ID
+				status:'',				//机构状态
 				clubName:'',	 		//机构名称
 				abbreviation:'',	 	//机构简称
 				clubContact:'',	 		//联系人
 				socialCreditCode:'',	//统一社会信用代码
-				isAgreed:0,				//是否勾选协议
+				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
 				isCheck:true,			//是否勾选协议
@@ -285,6 +286,7 @@ import { mapMutations } from 'vuex';
 		},
 		onLoad(option) {
 			this.userID = option.userID
+			this.status = option.status
 			this.organizationInfo()
 		},
 		methods:{
@@ -404,7 +406,8 @@ import { mapMutations } from 'vuex';
 						mainpro:this.mainpro,
 						fax:this.clubFax,
 						contractPhone:this.clubTelePhone,
-						info : this.companyPprofile
+						info : this.companyPprofile,
+						status:this.status
 				}
 				console.log(params)
 				sellerClubUpdate(params).then(response =>{

+ 6 - 2
market/pages/login/information.vue

@@ -252,12 +252,13 @@
 				isPreviewImage:false,   //预览图片开关
 				userID:'',				//机构的userID
 				clubID:'',				//会所ID
+				status:'',				//机构状态
 				email:'',				//邮箱
 				clubName:'',	 		//机构名称
 				abbreviation:'',	 	//机构简称
 				clubContact:'',	 		//联系人
 				socialCreditCode:'',	//统一社会信用代码
-				isAgreed:0,				//是否勾选协议
+				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
 				isCheck:true,			//是否勾选协议
@@ -294,6 +295,7 @@
 		},
 		onLoad(option) {
 			this.userID = option.userID
+			this.status = option.status					
 			this.organizationInfo()
 		},
 		methods:{
@@ -412,7 +414,9 @@
 						mainpro:this.mainpro,
 						fax:this.clubFax,
 						contractPhone:this.clubTelePhone,
-						info : this.companyPprofile
+						info : this.companyPprofile,
+						status:this.status
+						
 				}
 				sellerClubUpdate(params).then(response =>{
 					this.$util.msg('修改成功',2000,true,'success')

+ 20 - 18
market/pages/login/login.vue

@@ -57,28 +57,30 @@
 			getCheekeyCode(){
 				authorize.getCode('weixin').then(wechatcode =>{
 					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					userInfoLogin({code:wechatcode}).then(response =>{
-						if(response.data.userIdentity !=1){
+					authorize.getUserInfo('weixin').then(wxResponse =>{
+						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
+							if(response.data.userIdentity !=1){
+								this.logout()
+								uni.removeStorageSync('sessionid')
+								uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+								this.isSeller= true
+							}else{
+								this.login(response.data);
+								this.$store.commit('updateStatus',response.data)
+								uni.setStorageSync('token',response.data.token)
+								uni.removeStorageSync('sessionid')
+								uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+								// this.$api.navigateTo('/market/pages/user/user')
+								this.$api.navigateTo('/market/pages/index/index')
+							}
+						}).catch(response =>{
 							this.logout()
 							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
 							this.isSeller= true
-						}else{
-							this.login(response.data);
-							this.$store.commit('updateStatus',response.data)
-							uni.setStorageSync('token',response.data.token)
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-							// this.$api.navigateTo('/market/pages/user/user')
-							this.$api.navigateTo('/market/pages/index/index')
-						}
-					}).catch(response =>{
-						this.logout()
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.isSeller= true
+						})
 					})
-				})
+				})	
 			},	
 			confirmLogin(){
 				let params ={

+ 4 - 2
market/pages/order/create-order.vue

@@ -158,7 +158,7 @@
 						}else{
 							this.payAllPrice = this.allPrice
 						}
-					})	
+					})
 				})
 			},
 
@@ -194,6 +194,7 @@
 					}
 				}else{
 					this.freightData = data
+					this.payAllPrice = this.allPrice
 				}
 			},
 			checkedBalabce(){//勾选使用余额
@@ -308,7 +309,8 @@
 				this.isAddress = true
 				let SelectData = uni.getStorageSync('selectAddress');
 				this.addressID = SelectData.addressID;
-				this.addressData = SelectData	
+				this.addressData = SelectData
+				this.isFreight = true
 				this.getFreightData()
 			}else{
 				this.getAddressData()

+ 7 - 3
market/pages/order/order-details.vue

@@ -62,6 +62,7 @@
 				state:0,
 				userID:'',
 				orderID:'',
+				serviceProviderId:'',		//协销ID
 				shareCode:'',				//分享码
 				shareType:'',               //分享登录页过来记录的状态
 				cellPhone:'',				//客服电话
@@ -161,7 +162,7 @@
 							if(this.shareType ==='share'){
 								this.$api.navigateTo('/market/pages/user/user')
 							}else{
-								this.$api.navigateTo(`/market/pages/order/order-list?type=detele&listType=${this.listType}`)
+								this.$api.navigateTo(`/market/pages/order/order-list?type=detele&listType=0`)
 							}
 						},500)
 					}).catch(response =>{
@@ -186,7 +187,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.orderID}&userID=${this.userID}`,
+					path: `/pages/user/order/orderShareLogin?orderID=${this.orderID}&userID=${this.userID}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E8%AE%A2%E5%8D%95%E5%88%86%E4%BA%AB%E5%9B%BE%403x.png'
 				}
 			},
@@ -221,7 +222,10 @@
 			},
 		},
 		onShow() {
-
+			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
+				this.serviceProviderId = resolve.serviceProviderID
+			})
+			
 		}
 	}
 </script>

+ 2 - 2
market/pages/order/order-history.vue

@@ -195,7 +195,7 @@
 			position: relative;
 			border-bottom: 1px solid #EBEBEB;
 			.list-left{
-				flex: 8;
+				flex: 7.5;
 				.list-p{
 					line-height: 58rpx;
 					font-size: $font-size-26;
@@ -219,7 +219,7 @@
 				}
 			}
 			.list-opea{
-				flex: 2;
+				flex: 2.5;
 				color: #166CE1;
 				.opea-p{
 					line-height: 70rpx;

+ 1 - 2
market/pages/order/order-list.vue

@@ -28,7 +28,7 @@
 							<view  class="tui-order-item" v-for="(order,orderIndex) in tabItem.orderList" :key="orderIndex" @click.stop="detail(order.orderID)">
 								<view class="order-title">
 									<view class="order-title-t">
-										<view class="order-title-num tui-skeleton-fillet"><text class="tag">协销</text>订单号:{{order.orderNo}}</view>
+										<view class="order-title-num tui-skeleton-fillet">订单号:{{order.orderNo}}</view>
 										<view class="order-title-tip tui-skeleton-fillet">{{orderStateExp(order.status)}}</view>
 									</view>
 									<view class="order-title-b">下单时间:{{order.orderTime}}</view>
@@ -218,7 +218,6 @@
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
-						console.log(resolve)
 						this.serviceProviderId = resolve.serviceProviderID
 						let params = {listType:index,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize};
 						getSellerOrderList(params).then(response =>{

+ 1 - 1
market/pages/search/search-order.vue

@@ -64,7 +64,7 @@
 								<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
 								<view class="order-footer-bot">
 									<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-									<view class="money tui-skeleton-fillet">合计:¥{{orderPriceToFixed(order.payableAmount)}}</view>
+									<view class="money tui-skeleton-fillet">待付总额:¥{{orderPriceToFixed(order.pendingPayments)}}</view>
 								</view>
 							</view>
 							<!-- 底部button -->

+ 0 - 5
pages.json

@@ -219,11 +219,6 @@
 			"style": {
 				"navigationBarTitleText": "添加运营人员"
 			}
-		},{
-			"path": "pages/user/operator/bindstep",
-			"style": {
-				"navigationBarTitleText": "运营人员绑定步骤"
-			}
 		},{
 			"path": "pages/user/setting/setting",
 			"style": {

+ 1 - 0
pages/authorization/authorization.vue

@@ -24,6 +24,7 @@
 			...mapMutations(['wxLogin']),
 			//授权登录 
 			getuserinfo: function (e) {
+				console.log(e)
 			    if (e.detail.userInfo) {
 					this.wxGetUserInfo()
 			    }else{

+ 44 - 10
pages/goods/product.vue

@@ -46,6 +46,9 @@
 								</view>
 								<view class="wrap-main-price" v-else>
 									<view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
+										<view class="p-active">
+											<image class="icon-active" src="../../static/temp/icon-active.png" mode="" v-if="product.actStatus == 1"></image>
+										</view>
 										<view class="p-price tui-skeleton-fillet">
 											<text class="txt sm">¥</text>
 											<text class="txt big">{{retailPrice}}</text>
@@ -74,10 +77,14 @@
 											</view>
 										</view>
 									</view>
-								</view>
+								</view>								
 							</view>
 						</view>
 					</view>
+					<view class="wrap-active" v-if="product.actStatus == 1">
+						<text>活动时间:</text>
+						<text>{{ product.beginTime }} ~ {{ product.endTime }}</text>
+					</view>
 					<view class="wrap-label" v-if="product.tagsList.length>0">
 						<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
 					</view>
@@ -588,13 +595,14 @@
 		}
 	}
 	.product-wrap{
-		width: 702rpx;
+		width: 100%;
 		height: auto;
-		padding: 24rpx 24rpx 0 24rpx;
+		padding: 24rpx 0 0 0;
 		background-color: #FFFFFF;
 		border-bottom: 20rpx solid #F7F7F7;
 		.wrap-top{
-			width: 100%;
+			width: 702rpx;
+			padding: 0 24rpx;
 			height: auto;
 			float: left;
 			padding-bottom: 24rpx;
@@ -625,10 +633,24 @@
 				font-size: $font-size-28;
 				font-weight: 600;
 			}
+			.p-active{
+				width: 130rpx;
+				height: 44rpx;
+				display: flex;
+				align-items: center;
+				flex-direction: row;
+				float: left;
+				.icon-active{
+					width: 124rpx;
+					height: 30rpx;
+					display: block;
+				}
+			}
 			.p-price{
 				height: 44rpx;
 				line-height: 44rpx;
 				float: left;
+				
 				.txt{
 					color: #FF2A2A;
 					margin:0 2rpx;
@@ -669,9 +691,20 @@
 				}
 			}
 		}
+		.wrap-active{
+			width: 100%;
+			float: left;
+			height: 80rpx;
+			background: linear-gradient(225deg,rgba(255,143,101,1) 0%,rgba(248,79,57,1) 100%);
+			line-height: 80rpx;
+			font-size: $font-size-26;
+			color: #FFFFFF;
+			text-align: center;
+		}
 		.wrap-ladder{
 			float: left;
-			width: 100%;
+			width: 702rpx;
+			padding: 0 24rpx;
 			border-bottom: 1px solid #F8F8F8;
 			.ladder-text{
 				height: 34rpx;
@@ -725,8 +758,8 @@
 		}
 		.wrap-label{
 			float: left;
-			width: 100%;
-			padding: 24rpx 0 0 0;
+			width: 702rpx;
+			padding: 24rpx 24rpx 0 24rpx;
 			border-bottom: 1px solid #F8F8F8;
 			.label-a{
 				padding: 0 18rpx;
@@ -742,8 +775,8 @@
 		}
 		.wrap-info{
 			float: left;
-			width: 100%;
-			padding: 24rpx 0 0 0;
+			width: 702rpx;
+			padding: 24rpx 24rpx 0 24rpx;
 			border-bottom: 1px solid #F8F8F8;
 			.info-viewT{
 				width: 100%;
@@ -783,7 +816,8 @@
 		}
 		.wrap-seve{
 			float: left;
-			width: 100%;
+			width: 702rpx;
+			padding: 0 24rpx;
 			height: 72rpx;
 			line-height: 72rpx;
 			font-size: $font-size-28;

+ 4 - 8
pages/login/apply.vue

@@ -70,7 +70,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
-					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入您的机构简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -134,10 +134,6 @@
 					<view class="label">机构类型:</view>
 					<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
 					<text class="iconfont icon-xiayibu"></text>
-<!-- 				<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
-						<view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
-					</picker>
- -->					
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
@@ -293,7 +289,7 @@ import { mapMutations } from 'vuex';
 				mobileCodeText: '获取验证码',
 				newMobileCodeText: '获取验证码',
 				socialCreditCode:'',	//统一社会信用代码
-				isAgreed:0,				//是否勾选协议
+				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
 				isCheck:true,			//是否勾选协议
@@ -519,7 +515,7 @@ import { mapMutations } from 'vuex';
 			       		this.isNewMobileDisabled = true;
 			       		this.codeTimeNew = setInterval(() => {
 			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
-			         			this.newCount
+			         			this.newCount--
 			         			this.newMobileCodeText = this.newCount +'s重新发送'
 			        		} else {
 				         		this.isNewMobileDisabled = false;
@@ -529,7 +525,7 @@ import { mapMutations } from 'vuex';
 			        		}
 			       		},1000)
 			      	}
-				}).catch( res =>{
+				}).catch( response =>{
 					this.$util.msg(response.msg,2000);
 					this.isNewMobileDisabled = false;
 				})

+ 19 - 17
pages/login/bindOperator.vue

@@ -99,23 +99,25 @@
 			getCheekeyCode(){// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 				authorize.getCode('weixin').then(wechatcode =>{
 					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					userInfoLogin({code:wechatcode}).then(response =>{
-						this.login(response.data)
-						uni.setStorageSync('token',response.data.token)
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						this.$store.commit('updateStatus',response.data)
-						if(response.data.userIdentity ==1){
-							this.$api.navigateTo('/market/pages/index/index')
-						}else{
-							this.$api.navigateTo('/pages/tabBar/home/home')
-						}
-					}).catch(response =>{
-						this.logout()
-						this.isUserInfo = true
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.$store.commit('updateStatus',response.data)
+					authorize.getUserInfo('weixin').then(res =>{
+						userInfoLogin({code:wechatcode}).then(response =>{
+							this.login(response.data)
+							uni.setStorageSync('token',response.data.token)
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							this.$store.commit('updateStatus',response.data)
+							if(response.data.userIdentity ==1){
+								this.$api.navigateTo('/market/pages/index/index')
+							}else{
+								this.$api.switchTabTo('/pages/tabBar/home/home')
+							}
+						}).catch(response =>{
+							this.logout()
+							this.isUserInfo = true
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
+							this.$store.commit('updateStatus',response.data)
+						})
 					})
 				})
 			},

+ 3 - 3
pages/login/information.vue

@@ -311,7 +311,7 @@
 				mobileCodeText: '获取验证码',
 				newMobileCodeText: '获取验证码',
 				socialCreditCode:'',	//统一社会信用代码
-				isAgreed:0,				//是否勾选协议
+				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
 				isCheck:true,			//是否勾选协议
@@ -536,7 +536,7 @@
 			       		this.isNewMobileDisabled = true;
 			       		this.codeTimeNew = setInterval(() => {
 			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
-			         			this.newCount
+			         			this.newCount--
 			         			this.newMobileCodeText = this.newCount +'s重新发送'
 			        		} else {
 				         		this.isNewMobileDisabled = false;
@@ -546,7 +546,7 @@
 			        		}
 			       		},1000)
 			      	}
-				}).catch( res =>{
+				}).catch( response =>{
 					this.$util.msg(response.msg,2000);
 					this.isNewMobileDisabled = false;
 				})

+ 14 - 12
pages/login/register.vue

@@ -323,9 +323,11 @@
 				isEmialDisabled: false,		//验证码按钮控制
 				isMobileDisabled: false,	//手机验证码按钮控制
 			    count: '',					//倒计时
+			    mobilCount: '',					//倒计时
 			    emailCodeText: '获取验证码',
 			    mobileCodeText: '获取验证码',
 			    codeTime: null,
+			    mobilTime: null,
 				registerEmail:'', 		//注册邮箱
 				regEmailCode:'',  		//邮箱验证码
 				password:'',			//密码
@@ -508,27 +510,27 @@
 						token:this.imageCodetoken,
 					}
 				this.isMobileDisabled = true;
-				getMobileCode(params).then(res =>{
+				getMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
+			     	if (!this.mobilTime) {
+			       		this.mobilCount = TIME_COUNT;
 			       		this.isMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.mobileCodeText = this.count +'s重新发送'
+			       		this.mobilTime = setInterval(() => {
+			       			if (this.mobilCount > 1 && this.mobilCount <= TIME_COUNT) {
+			         			this.mobilCount--
+			         			this.mobileCodeText = this.mobilCount +'s重新发送'
 			        		} else {
 				         		this.isMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
+				         		clearInterval(this.mobilTime)
+				         		this.mobilTime = null
 								this.mobileCodeText = '获取验证码'
 			        		}
 			       		},1000)
 			      	}
-				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
-					this.isEmialDisabled = false;
+				}).catch( response =>{
+					this.$util.msg(response.msg,2000);
+					this.isMobileDisabled = false;
 				})
 			},
 			getVerificationCode(){//获取图形验证

+ 1 - 1
pages/search/search-order.vue

@@ -64,7 +64,7 @@
 								<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
 								<view class="order-footer-bot">
 									<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-									<view class="money tui-skeleton-fillet">合计:¥{{orderPriceToFixed(order.payableAmount)}}</view>
+									<view class="money tui-skeleton-fillet">待付总额:¥{{orderPriceToFixed(order.pendingPayments)}}</view>
 								</view>
 							</view>
 							<!-- 底部button -->

+ 28 - 22
pages/tabBar/home/home.vue

@@ -184,27 +184,29 @@
 			},	
 			getCheekeyCode(){
 				authorize.getCode('weixin').then(wechatcode =>{// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					userInfoLogin({code:wechatcode}).then(response =>{
-						this.isLogin = true;
-						this.userID = response.data.userID;						
-						this.$store.commit('updateStatus',response.data)
-						this.login(response.data);
-						uni.setStorageSync('token',response.data.token)
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						if(response.data.userIdentity ==1){
-							this.$api.navigateTo('/market/pages/login/login')
-						}
-						this.getHomeInformation()
-						this.getOrganizeProducts()
-					}).catch(response =>{
-						this.isLogin = false;
-						this.logout()
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.$store.commit('updateStatus',response.data)
-						this.getHomeInformation()
-						this.getOrganizeProducts()
+					authorize.getUserInfo('weixin').then(wxResponse =>{
+						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
+							this.isLogin = true;
+							this.userID = response.data.userID;						
+							this.$store.commit('updateStatus',response.data)
+							this.login(response.data);
+							uni.setStorageSync('token',response.data.token)
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							if(response.data.userIdentity ==1){
+								this.$api.navigateTo('/market/pages/login/login')
+							}
+							this.getHomeInformation()
+							this.getOrganizeProducts()
+						}).catch(response =>{
+							this.isLogin = false;
+							this.logout()
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
+							this.$store.commit('updateStatus',response.data)
+							this.getHomeInformation()
+							this.getOrganizeProducts()
+						})
 					})
 				})
 			},		
@@ -320,7 +322,11 @@
 				}else{
 					this.$api.redirectTo('/pages/authorization/authorization?type=1')
 				}
-			})				
+			}).catch(res =>{
+				this.$util.modal('提示',res,'去授权','取消',true,() =>{
+					this.$api.redirectTo('/pages/authorization/authorization?type=1')
+				})
+			})			
 		}
 	}
 </script>

+ 0 - 1
pages/tabBar/user/user.vue

@@ -186,7 +186,6 @@
 					this.shipmentsCount = this.showBadge(data.shipmentsCount)//已发货	
 					this.salesReturnCount = this.showBadge(data.salesReturnCount)//退货/款	
 					let clubInfo ={name:this.name,image:this.headpic,clubID:_clubData.clubID}
-					console.log(clubInfo)
 					uni.setStorage({//缓存机构
 						key: 'clubInfo',  
 						data: clubInfo  

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

@@ -135,7 +135,7 @@
 			deleteAddress(id){
 				this.$util.modal('','确定要删除该地址?','确定','取消',true,() =>{
 					deleteNewAddress({addressID:id,userID:this.userID}).then(response =>{
-						this.$util.msg('删除成功',2000)
+						this.$util.msg('删除成功',2000,true,'success')
 						setTimeout(() =>{
 							this.pageNum = 1;
 							this.addressList = [];

+ 19 - 14
pages/user/address/addressManage.vue

@@ -75,11 +75,17 @@
 			if(option.type==='edit'){
 				title = '编辑收货地址'
 				this.isConfirm = false;
-				this.addType = 2;				
-				this.addressData = JSON.parse(option.data)
-				this.addressData.allAddress = `${this.addressData.province}-${this.addressData.city}-${this.addressData.town}`
-				this.addressData.addressDetail = this.addressData.address 
-				this.addressData.defaultFlag = this.addressData.defaultFlag;
+				this.addType = 2;			
+				let optionData = JSON.parse(option.data)
+				this.addressData.allAddress = `${optionData.province}-${optionData.city}-${optionData.town}`
+				this.addressData.addressDetail = optionData.address
+				this.addressData.defaultFlag = optionData.defaultFlag;
+				this.addressData.userID = optionData.userID;
+				this.addressData.mobile = optionData.mobile;
+				this.addressData.townID = optionData.townID;
+				this.addressData.addressID = optionData.addressID;
+				this.addressData.shouHuoRen = optionData.shouHuoRen;
+				this.addressData.addressID = optionData.addressID;
 				if(this.addressData.defaultFlag == 1){
 					this.switchDefault = true
 				}else{
@@ -104,8 +110,9 @@
 				this.$refs.mpvueCityPicker.show()
 			},
 			onConfirm(e) {
+				console.log(e)
 				this.addressData.allAddress = e.name;
-				this.addressData.townID = e.cityCode;	
+				this.addressData.townID = e.townCode;	
 			},			
 			//提交
 			confirm(){
@@ -129,27 +136,25 @@
 							mobile:data.mobile,			//手机
 							defaultFlag:data.defaultFlag//是否默认收货地址(0 不是默认,1 默认)
 						}
+					console.log(this.params)
 					this.postAddressData(this.params)	
 				}else{
 					this.params =  this.addressData;
+					console.log(this.params)
 					this.postAddressData(this.params)
 				}
 			},
-			postAddressData(res){
+			postAddressData(params){
 				this.btnText(true)
-				addNewAddress(res).then( response=>{
-					this.$util.msg('添加成功',2000);
+				addNewAddress(params).then( response=>{
+					this.$util.msg('保存成功',1500,true,'success')
 					this.btnText(false)
 					setTimeout(()=>{
 						uni.navigateBack();
 					},2000)
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000);
-					setTimeout(function(){
-						uni.switchTab({
-							url:'/pages/tabBar/home/home'
-						})
-					},1000)
+					this.btnText(false)
 				})
 			},
 			btnText(flg){

+ 0 - 5
pages/user/operator/addoperator.vue

@@ -11,11 +11,6 @@
 				<button class="add-btn" @click="confirm">确定</button>
 			</view>
 			<view class="operator-text">
-				<view class="title" @click="this.$api.navigateTo('/pages/user/operator/bindstep')">
-					<text class="iconfont icon-gantanhao-yuankuang"></text>
-					<text class="text-m">运营人员绑定步骤</text>
-					<text class="text-s">(点击查看图片引导)</text>
-				</view>
 				<view class="text-main">
 					<view>1. 添加运营人员后,运营人员会收到一条邀请码短信</view>
 					<view>2. 运营人员在微信搜索【采美采购商城】小程序,或者搜索关注【采美365网】,从底部菜单进入【采美采购商城】小程序</view>

+ 0 - 35
pages/user/operator/bindstep.vue

@@ -1,35 +0,0 @@
-<template>
-	<view class="container step">
-		<image  class="step-img" :src="stepImage" mode="" @click="viewMentuzImage"></image>
-	</view>
-</template>
-
-<script>
-	export default {
-		data (){
-			return {
-				stepImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E8%BF%90%E8%90%A5%E4%BA%BA%E5%91%98%E7%BB%91%E5%AE%9A%E6%AD%A5%E9%AA%A41%403x.png'
-			}
-		},
-		methods:{
-			viewMentuzImage(e) {
-				let self = this
-				uni.previewImage({
-					urls: self.stepImage,
-					current: 0
-				});
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.step{
-		width: 100%;
-		height: auto;
-		.step-img{
-			width: 100%;
-			height: 3798rpx;
-		}
-	}
-</style>

+ 4 - 2
pages/user/order/create-order.vue

@@ -154,7 +154,9 @@
 					this.isFreight = true
 					this.freightData = response.data
 					if(response.data.freePostFlag== 1){
-						this.payAllPrice = this.payAllPrice+response.data.freight
+						this.payAllPrice = this.allPrice + response.data.freight
+					}else{
+						this.payAllPrice = this.allPrice
 					}
 				})	
 			},
@@ -249,7 +251,7 @@
 						clauseId:0,//条款(暂时保留)
 						orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
 						balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
-						freight:this.freightData.freight>0 ? this.freightData.freight : this.freightData.freight.toFixed(2),//邮费
+						freight:parseInt(this.freightData.freight).toFixed(2),//邮费
 						freePostFlag:parseInt(this.freightData.freePostFlag)//运费形式
 					}
 				let param = {

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

@@ -54,7 +54,7 @@
 									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
 									<view class="order-footer-bot">
 										<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-										<view class="money tui-skeleton-fillet">应付总额:¥{{orderPriceToFixed(order.payableAmount)}}</view>
+										<view class="money tui-skeleton-fillet">待付总额:¥{{orderPriceToFixed(order.pendingPayments)}}</view>
 									</view>
 								</view>
 								<!-- 底部button -->

+ 5 - 1
pages/user/order/orderShareLogin.vue

@@ -28,11 +28,14 @@
 				orderID:0,			//订单ID
 				userID:0			,//分享人的用户ID
 				isShareStatus:false,
+				serviceProviderId:''
 			}
 		},
 		onLoad(e) {
+			console.log(e)
 			this.orderID = e.orderID
 			this.userID = e.userID
+			this.serviceProviderId = e.serviceProviderId
 		},
 		methods:{
 			initQueryUser(){
@@ -41,7 +44,8 @@
 							code:wechatcode,
 							orderID:this.orderID,
 							userID:this.userID,
-							shareCode:this.shareCode
+							shareCode:this.shareCode,
+							serviceProviderId:this.serviceProviderId
 						}
 					orderShareCode(params).then(response =>{
 						if(response.code === 2){

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

@@ -120,7 +120,7 @@
 				let productStp ={
 						allPrice:this.number*this.buyRetailPrice,
 						allCount:this.number,
-						id:this.handleData.productID,
+						productID:this.handleData.productID,
 						productCount:this.number
 				}	
 				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)