فهرست منبع

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

yuwenjun 4 سال پیش
والد
کامیت
8b38873412
100فایلهای تغییر یافته به همراه4294 افزوده شده و 1461 حذف شده
  1. 26 9
      App.vue
  2. 0 30
      api/use.js
  3. 30 3
      common/config/authorize.js
  4. 50 46
      common/config/wxLogin.js
  5. 7 7
      common/json/data.json.js
  6. 1 2
      components/cm-module/cm-seller/home.vue
  7. 25 22
      components/cm-module/cm-seller/user.vue
  8. 3 3
      components/cm-module/creatOrder/invoiceTent.vue
  9. 2 0
      components/cm-module/homeIndex/navbars.vue
  10. 1 1
      components/cm-module/listTemplate/classifyProductList.vue
  11. 2 2
      components/cm-module/listTemplate/commodityList.vue
  12. 1 1
      components/cm-module/listTemplate/productList.vue
  13. 1 1
      components/cm-module/pageFloorTemplate/templateA.vue
  14. 1 1
      components/cm-module/pageFloorTemplate/templateB.vue
  15. 1 1
      components/cm-module/pageFloorTemplate/templateC.vue
  16. 1 1
      components/cm-module/pageFloorTemplate/templateD.vue
  17. 1 1
      components/cm-module/pageFloorTemplate/templateE.vue
  18. 1 1
      components/cm-module/pageFloorTemplate/templateF.vue
  19. 1 1
      components/cm-module/pageTemplate/templateA.vue
  20. 1 1
      components/cm-module/pageTemplate/templateB.vue
  21. 1 1
      components/cm-module/pageTemplate/templateC.vue
  22. 1 1
      components/cm-module/pageTemplate/templateD.vue
  23. 1 1
      components/cm-module/pageTemplate/templateE.vue
  24. 1 1
      components/cm-module/pageTemplate/templateF.vue
  25. 1 1
      components/cm-module/pageTemplate/templateG.vue
  26. 1 1
      components/cm-module/pageTemplate/templateH.vue
  27. 1 2
      components/cm-module/supplier/home.vue
  28. 24 22
      components/cm-module/supplier/user.vue
  29. 8 8
      h5/pages/activity/activity_mid.vue
  30. 0 1
      h5/pages/activity/meobohui-booth.vue
  31. 0 1
      h5/pages/activity/meobohui-supplier.vue
  32. 2 3
      h5/pages/activity/meobohui.vue
  33. 25 18
      main.js
  34. 39 0
      pages.json
  35. 50 28
      pages/authorization/authorization.vue
  36. 8 8
      pages/goods/cart.vue
  37. 189 0
      pages/goods/good-floor-temp.vue
  38. 9 10
      pages/goods/good-floor.vue
  39. 2 2
      pages/goods/good-floorMore.vue
  40. 1 1
      pages/goods/goods-active.vue
  41. 9 10
      pages/goods/goods-classify.vue
  42. 8 9
      pages/goods/instrument-details.vue
  43. 37 38
      pages/goods/product.vue
  44. 38 38
      pages/login/apply-supplier.vue
  45. 109 89
      pages/login/apply.vue
  46. 79 71
      pages/login/bindOperator.vue
  47. 1 1
      pages/login/bindemail.vue
  48. 575 0
      pages/login/binding.vue
  49. 69 65
      pages/login/bindwechat.vue
  50. 145 130
      pages/login/information.vue
  51. 44 43
      pages/login/login.vue
  52. 34 37
      pages/login/logincode.vue
  53. 40 41
      pages/login/register-supplier.vue
  54. 89 49
      pages/login/register.vue
  55. 8 8
      pages/tabBar/cart/cart.vue
  56. 60 22
      pages/tabBar/home/index.vue
  57. 23 23
      pages/tabBar/user/user.vue
  58. 1 1
      pages/user/account/account.vue
  59. 1 1
      pages/user/address/address.vue
  60. 1 1
      pages/user/address/addressManage.vue
  61. 2 2
      pages/user/operator/addoperator.vue
  62. 2 2
      pages/user/operator/list.vue
  63. 9 5
      pages/user/order/create-order.vue
  64. 1 1
      pages/user/order/order-list.vue
  65. 1 1
      pages/user/regularPurchase/regularPurchase.vue
  66. 1 1
      pages/user/setting/phone.vue
  67. 1 1
      pages/user/setting/setting.vue
  68. 6 8
      search/pages/search/search-instrument.vue
  69. 1 1
      search/pages/search/search-order.vue
  70. 6 8
      search/pages/search/search-supplier.vue
  71. 8 10
      search/pages/search/search.vue
  72. 15 18
      second/pages/product/product-details.vue
  73. 6 8
      second/pages/product/product-list.vue
  74. 1 1
      seller/pages/address/address.vue
  75. 1 1
      seller/pages/cart/buyagain.vue
  76. 1 1
      seller/pages/cart/cart.vue
  77. 1 1
      seller/pages/cart/immediately.vue
  78. 1 1
      seller/pages/cart/second.vue
  79. 2 2
      seller/pages/club/allClub-list.vue
  80. 96 57
      seller/pages/club/club-list.vue
  81. 138 75
      seller/pages/club/list.vue
  82. 97 91
      seller/pages/login/apply.vue
  83. 81 77
      seller/pages/login/information.vue
  84. 59 61
      seller/pages/login/login.vue
  85. 271 0
      seller/pages/login/register-general.vue
  86. 979 0
      seller/pages/login/register-member.vue
  87. 105 0
      seller/pages/login/register-select.vue
  88. 88 84
      seller/pages/login/register.vue
  89. 2 2
      seller/pages/order/create-order.vue
  90. 287 0
      seller/pages/order/create-recharge-order.vue
  91. 1 1
      seller/pages/order/myOrder.vue
  92. 2 2
      seller/pages/order/order-details.vue
  93. 1 1
      seller/pages/order/order-historylist.vue
  94. 3 3
      seller/pages/order/order-list.vue
  95. 3 3
      seller/pages/search/search-order.vue
  96. 9 3
      services/ajax.service.js
  97. 11 0
      services/config.env.js
  98. 58 3
      services/public.service.js
  99. 40 3
      services/sellse.service.js
  100. 6 1
      services/shop.service.js

+ 26 - 9
App.vue

@@ -5,7 +5,6 @@
 	import Vue from 'vue'
 	import { mapState,mapMutations} from 'vuex';
 	import authorize from '@/common/config/authorize.js'
-	import wxLogin from "@/common/config/wxLogin.js"
 	export default {
 		onLaunch: function() {
 			let self = this
@@ -67,17 +66,35 @@
 			// }
 		},
 		methods:{
+			...mapMutations(['login','logout']),
+			async getWxAuthorize(){
+				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.$store.commit('updateStatus',response.data)
+					this.login(response.data);
+					uni.setStorageSync('token',response.data.token)
+					uni.setStorageSync('unionId',response.data.unionId)
+				})
+				.catch(error =>{
+					this.logout(response.data)
+					uni.setStorageSync('unionId',response.data.unionId)
+					this.$store.commit('updateStatus',response.data)
+				})
+			},		
 			refresh(){
 				let TIME = (20*60)*1000;
 				setInterval(()=>{
-					authorize.getSetting().then(res =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-						if(res == 1){
-							wxLogin.wxLoginAuthorize()
-						}else{
-							console.log('授权失败============>:'+'用户取消授权或者未操作')
-						}
-					}).catch(error=>{
-						console.log('授权失败============>:'+'用户授权失败,提醒用户重新授权')
+					authorize.checkLogin().then(res => {
+						this.getWxAuthorize()
+					})
+					.catch(err => {
+						console.log(new Date +'用户未授权微信信息')
 					})
 				},TIME)
 			},

+ 0 - 30
api/use.js

@@ -104,20 +104,6 @@ export function bindingWechat(params) {
 		})
 	})
 }
-/**
- *邀请码授权登录
- */
-export function invitationCodeLogin(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/club/invitationCode',params,true, res => {
-			if(res.code == 0 || res.code == 4){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
 /**
  *获取个人中心信息
  */
@@ -128,22 +114,6 @@ export function personalInfo(params) {
 		})
 	})
 }
-/**
- *取消提示
- * userId
- */
-export function cancelPrompt(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/personalCenter/cancelPrompt',params,false, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-
 /**
  *获取账户余额明细
  */

+ 30 - 3
common/config/authorize.js

@@ -72,6 +72,7 @@ const getCode = provider => {
         uni.login({
             provider: provider,
             success: function(loginRes) {
+				console.log(loginRes)
                 if (loginRes && loginRes.code) { 
 					resolve(loginRes.code) 
 				} else {
@@ -81,7 +82,10 @@ const getCode = provider => {
 					})
 				}
             },
-			fail:function(){ reject("获取code失败")}
+			fail:function(error){ 
+				console.log(err)
+				reject("获取code失败")
+			}
         });
     })
 }
@@ -96,7 +100,8 @@ const getSetting = function() {
                 if(authSetting['scope.userInfo']===false){resolve(0);return;}//拒绝授权
                 resolve(2) //2未操作
             },
-            fail:function() { 
+            fail:function(error) { 
+				console.log(error)
 				reject("获取用户授权失败") 
 			}
         })
@@ -122,5 +127,27 @@ const getUserInfo = (provider)=>{
 		});
 	})
 }
+// 获取用户登录状态
+const checkLogin = () => {
+	return new Promise((resolve, reject) => {
+		uni.checkSession({
+			success() {
+				resolve(1)
+				console.log('登录成功')
+			},
+			fail(err) {
+				reject(0)
+			}
+		})
+	})
+}
 
-export default {getProvider,getSetting,checkSessionKey,getCode,login,getUserInfo}
+export default {
+	getProvider,
+	getSetting,
+	checkSessionKey,
+	getCode,
+	login,
+	getUserInfo,
+	checkLogin
+}

+ 50 - 46
common/config/wxLogin.js

@@ -1,54 +1,58 @@
 import store from '@/store/index.js'
 import authorize from '@/common/config/authorize.js'
-import { userInfoLogin } from "@/api/use.js"
+import ajaxService from '@/services/ajax.service.js'
+import UserService from '@/services/user.service'
+
+const newUserService = new UserService(ajaxService)
+
 // 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-const wxLoginAuthorize = function(){
-	authorize.getCode('weixin').then(wechatcode =>{
-		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);
-				store.commit('wxLogin',wxResponse.userInfo);
-				uni.setStorageSync('token',response.data.token)
-				uni.removeStorageSync('sessionid')
-				uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-			}).catch(error =>{
-				uni.removeStorageSync('sessionid')
-				uni.setStorageSync('sessionid','JSESSIONID='+error.data)
-				store.commit('logout',error.data)
-				store.commit('updateStatus',error.data)
-				store.commit('wxLogin',wxResponse.userInfo);
-			})
-		})
+const wxLoginAuthorize = async function(){
+	const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+	const getUserInfo = await authorize.getUserInfo('weixin');
+	newUserService.UserLoginAuthApplets({ 
+		code:wechatCode,
+		encryptedData:getUserInfo.encryptedData,
+		iv:getUserInfo.iv
+	})
+	.then(response =>{
+		store.commit('updateStatus',response.data)
+		store.commit('login',response.data);
+		uni.setStorageSync('token',response.data.token)
+		uni.setStorageSync('unionId',response.data.unionId)
+	})
+	.catch(error =>{
+		uni.setStorageSync('unionId',error.data.unionId)
+		store.commit('logout',error.data)
+		store.commit('updateStatus',error.data)
 	})
 }
-const wxLoginQuick = function(){// 根据微信的code获取用户登录状态:1已登录过 -1未登录过跳转
-		authorize.getCode('weixin').then(wechatcode =>{
-			// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-			authorize.getUserInfo('weixin').then(wxResponse =>{
-				userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
-					console.log(response)
-					store.commit('updateStatus',response.data)
-					store.commit('login',response.data);
-					store.commit('wxLogin',wxResponse.userInfo);
-					uni.setStorageSync('token',response.data.token)
-					uni.removeStorageSync('sessionid')
-					uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-					if(response.data.userIdentity ==1){
-						uni.navigateTo({url:'/seller/pages/index/index'})
-					}else if(response.data.userIdentity === 3){
-						uni.navigateTo({url:'/supplier/pages/index/index'})
-					}else{
-						uni.switchTab({url:'/pages/tabBar/user/user'})
-					}
-				}).catch(error =>{
-					uni.removeStorageSync('sessionid')
-					uni.setStorageSync('sessionid','JSESSIONID='+error.data)
-					store.commit('logout',error.data)
-					store.commit('updateStatus',error.data)
-					store.commit('wxLogin',wxResponse.userInfo);
-				})
-			})
+const wxLoginQuick = async function(){// 根据微信的code获取用户登录状态:1已登录过 -1未登录过跳转
+		const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+		const getUserInfo = await authorize.getUserInfo('weixin');
+		const params = 
+		newUserService.UserLoginAuthApplets({ 
+			code:wechatCode,
+			encryptedData:getUserInfo.encryptedData,
+			iv:getUserInfo.iv
+		})
+		.then(response =>{
+			console.log(response)
+			store.commit('updateStatus',response.data)
+			store.commit('login',response.data);
+			uni.setStorageSync('token',response.data.token)
+			uni.setStorageSync('unionId',response.data.unionId)
+			if(response.data.userIdentity ==1){
+				uni.navigateTo({url:'/seller/pages/index/index'})
+			}else if(response.data.userIdentity === 3){
+				uni.navigateTo({url:'/supplier/pages/index/index'})
+			}else{
+				uni.switchTab({url:'/pages/tabBar/user/user'})
+			}
+		})
+		.catch(error =>{
+			uni.setStorageSync('unionId',error.data.unionId)
+			store.commit('logout',error.data)
+			store.commit('updateStatus',error.data)
 		})
 }
 export default{

+ 7 - 7
common/json/data.json.js

@@ -1,7 +1,7 @@
 const beautyList =  [
-						{value:'1',name:'诊所'},
-						{value:'2',name:'门诊'},
-						{value:'3',name:'医院'},
+						{value:1,name:'诊所'},
+						{value:2,name:'门诊'},
+						{value:3,name:'医院'},
 					]
 const mentuzCampNullList = [
 						{value:'1',name:'整形'},
@@ -20,10 +20,10 @@ const medicaCampNullList = [
 					]
 
 const supplierList = [
-						{value:'1',name:'一类器械'},
-						{value:'2',name:'二类器械'},
-						{value:'3',name:'三类器械'},
-						{value:'4',name:'其他'},
+						{value:1,name:'一类器械'},
+						{value:2,name:'二类器械'},
+						{value:3,name:'三类器械'},
+						{value:4,name:'其他'},
 					]
 const supplierMedicaCampNullList = [
 						{value:'1',name:'产品'},

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

@@ -32,7 +32,6 @@
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import { userInfoLogin } from "@/api/use.js"
 	import { mapState,mapMutations} from 'vuex';
 	export default {
 		components:{
@@ -77,7 +76,7 @@
 		},
 		created() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID ? resolve.userID : 0
+				this.userID = resolve.userId ? resolve.userId : 0
 				this.userIdentity = resolve.userIdentity
 				this.getHomeInformation()
 			})

+ 25 - 22
components/cm-module/cm-seller/user.vue

@@ -101,7 +101,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
 	import { mapState,mapMutations } from 'vuex'
-	import { userInfoLogin } from "@/api/use.js"
 	
 	export default{
 		components: {
@@ -135,7 +134,7 @@
 				firstList:[
 					{name:'机构列表',path:'/seller/pages/club/list',icon:'icon-jigouliebiao'},
 					{name:'帮机构下单',path:'/seller/pages/club/club-list',icon:'icon-bangjigouxiadan'},
-					{name:'拉机构上线',path:'/seller/pages/login/register',icon:'icon-lajigoushangxian'},
+					{name:'拉机构上线',path:'/seller/pages/login/register-select',icon:'icon-lajigoushangxian'},
 					{name:'邀请运营人员',path:'/seller/pages/club/allClub-list',icon:'icon-yaoqingyunyingrenyuan'}
 				],
 			}
@@ -148,29 +147,33 @@
 		},
 		methods:{
 			...mapMutations(['login','logout']),
-			initData(){
-				authorize.getCode('weixin').then(wechatcode =>{// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					authorize.getUserInfo('weixin').then(wxResponse =>{
-						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
-							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)
-							this.getUserSellerHome()
-						}).catch(response =>{
-							this.logout()
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-							this.$store.commit('updateStatus',response.data)
-							this.$api.navigateTo('/seller/pages/login/login')
-						})
-					})
+			async initData(){
+				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.$store.commit('updateStatus',response.data)
+						this.login(response.data);
+						uni.setStorageSync('token',response.data.token)
+						uni.setStorageSync('unionId',response.data.unionId)
+						this.getUserSellerHome()
+					}else{
+						this.isLogin = false;
+						this.logout()
+						uni.setStorageSync('unionId',response.data.unionId)
+						this.$store.commit('updateStatus',response.data)
+						this.$api.navigateTo('/seller/pages/login/login')
+					}
 				})
-			},
+			},	
 			getUserSellerHome(){
 				this.$api.getStorage().then((resolve) =>{
-					this.userId = resolve.userID
+					this.userId = resolve.userId ? resolve.userId : 0
 					this.SellerService.GetSellerHome({userId:this.userId}).then(response =>{
 						let sellerData = response.data
 						this.name = sellerData.seller.linkMan1?sellerData.seller.linkMan1:'' 	//协销名称

+ 3 - 3
components/cm-module/creatOrder/invoiceTent.vue

@@ -138,7 +138,7 @@
 		methods:{
 			getUseFindInvoice(){//获取发票信息
 				this.$api.getStorage().then((resolve) => {
-					this.OrderService.GetFindInvoice({userId:resolve.userID}).then(response =>{
+					this.OrderService.GetFindInvoice({userId:resolve.userId}).then(response =>{
 						if(response.data == null){
 							this.invoiceData = Object.assign(this.invoiceData,'',{type:0})
 						}else{
@@ -149,8 +149,8 @@
 			},
 			updateInvoiceFn(){//保存发票信息
 				this.$api.getStorage().then((resolve) => {
-					console.log(resolve.userID)
-					this.OrderService.UpdateInvoice(Object.assign({userId:resolve.userID},this.invoiceData)).then(response =>{})
+					console.log(resolve.userId)
+					this.OrderService.UpdateInvoice(Object.assign({userId:resolve.userId},this.invoiceData)).then(response =>{})
 				})
 			},
 			choiceaInvoiceConfim(){

+ 2 - 0
components/cm-module/homeIndex/navbars.vue

@@ -42,6 +42,7 @@
 				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
 				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
 				 **/
+				console.log(pros);
 				if(pros.linkType){
 					 const typeMap = {
 						1:`/pages/goods/goods-instrument?linkId=${pros.linkParam.id}&title=${pros.name}`,
@@ -52,6 +53,7 @@
 						18:`/h5/pages/article/path?link=${pros.link}`,
 						20:`/pages/goods/good-floor?linkId=${pros.linkParam.id}&title=${pros.name}`,
 						21:`/h5/pages/activity/meobohui`,
+						22:`/pages/goods/good-floor-temp?linkId=${pros.linkParam.id}&title=${pros.name}`
 					 }
 					const url = typeMap[pros.linkType];
 					this.$api.navigateTo(url)

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

@@ -135,7 +135,7 @@
 			this.setScrollHeight();		
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userID ? resolve.userID :0;
+				this.userID = resolve.userId ? resolve.userId :0;
 				this.userIdentity = resolve.userIdentity
 				this.getListFromServer();
 			}).catch(error =>{

+ 2 - 2
components/cm-module/listTemplate/commodityList.vue

@@ -157,8 +157,8 @@
 			this.setScrollHeight();		
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userID ? resolve.userID : 0;
-				this.shopId = resolve.shopID ? resolve.shopID : 0;
+				this.userID = resolve.userId ? resolve.userId : 0;
+				this.shopId = resolve.shopId ? resolve.shopId : 0;
 				this.userIdentity = resolve.userIdentity
 				this.getListFromServer();
 			}).catch(error =>{

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

@@ -109,7 +109,7 @@
 		created() {
 			this.setScrollHeight();		
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 				this.getProductAgainInfo()
 			})
 		},

+ 1 - 1
components/cm-module/pageFloorTemplate/templateA.vue

@@ -167,7 +167,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				console.log(this.floorData)

+ 1 - 1
components/cm-module/pageFloorTemplate/templateB.vue

@@ -179,7 +179,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageFloorTemplate/templateC.vue

@@ -179,7 +179,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageFloorTemplate/templateD.vue

@@ -191,7 +191,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageFloorTemplate/templateE.vue

@@ -167,7 +167,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageFloorTemplate/templateF.vue

@@ -155,7 +155,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateA.vue

@@ -167,7 +167,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateB.vue

@@ -179,7 +179,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateC.vue

@@ -179,7 +179,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateD.vue

@@ -191,7 +191,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateE.vue

@@ -167,7 +167,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateF.vue

@@ -167,7 +167,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateG.vue

@@ -155,7 +155,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				this.floorData = data
 				// console.log(this.floorData)

+ 1 - 1
components/cm-module/pageTemplate/templateH.vue

@@ -171,7 +171,7 @@
 		methods:{
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopId = resolve.shopID ? resolve.shopID : 0
+					this.shopId = resolve.shopId ? resolve.shopId : 0
 				})
 				if(data.floorImageList.length>0){
 					this.productList.splice(0,this.productList.length);

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

@@ -32,7 +32,6 @@
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import { userInfoLogin } from "@/api/use.js"
 	import { mapState,mapMutations} from 'vuex';
 	export default {
 		components:{
@@ -77,7 +76,7 @@
 		},
 		created() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID ? resolve.userID : 0
+				this.userID = resolve.userId ? resolve.userId : 0
 				this.userIdentity = resolve.userIdentity
 				this.getHomeInformation()
 			})

+ 24 - 22
components/cm-module/supplier/user.vue

@@ -99,7 +99,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
 	import { mapState,mapMutations } from 'vuex'
-	import { userInfoLogin } from "@/api/use.js"
 	
 	export default{
 		components: {
@@ -155,30 +154,33 @@
 		},
 		methods:{
 			...mapMutations(['login','logout']),
-			initData(){
-				authorize.getCode('weixin').then(wechatcode =>{// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					authorize.getUserInfo('weixin').then(wxResponse =>{
-						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
-							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)
-							this.GetHomePageData()
-							this.getPhone()
-						}).catch(response =>{
-							this.logout()
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-							this.$store.commit('updateStatus',response.data)
-							// this.$api.navigateTo('/seller/pages/login/login')
-						})
-					})
+			async initData(){
+				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.$store.commit('updateStatus',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.logout()
+						uni.setStorageSync('unionId',response.data.unionId)
+						this.$store.commit('updateStatus',response.data)
+					}
 				})
-			},
+			},	
 			GetHomePageData(){
 				this.$api.getStorage().then((resolve) =>{
-					this.userId = resolve.userID
+					this.userId = resolve.userId ? resolve.userId : 0
 					this.ShopService.GetHomePageData({userId:this.userId}).then(response =>{
 						let data = response.data
 						this.name = data.shop.name 	//协销名称

+ 8 - 8
h5/pages/activity/activity_mid.vue

@@ -239,14 +239,14 @@
 				this.$api.navigateTo(`/pages/goods/product?id=${item.productID}&path=activity`)
 			},
 			navigator(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$store.commit('setLoginType',9)
-						this.$api.navigateTo('/pages/login/login?type=0')
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					this.$store.commit('setLoginType',9)
+					this.$api.navigateTo('/pages/login/login?type=0')
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				})
 			},	
 			toFixedFn(text){//处理小数点后两位数
 				return Number(text).toFixed(2);

+ 0 - 1
h5/pages/activity/meobohui-booth.vue

@@ -23,7 +23,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import { userInfoLogin } from "@/api/use.js"
 	import { mapState,mapMutations} from 'vuex';
 	var isPreviewImg;
 	export default {

+ 0 - 1
h5/pages/activity/meobohui-supplier.vue

@@ -17,7 +17,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import { userInfoLogin } from "@/api/use.js"
 	import { mapState,mapMutations} from 'vuex';
 	export default {
 		components:{

+ 2 - 3
h5/pages/activity/meobohui.vue

@@ -205,7 +205,6 @@
 	import authorize from '@/common/config/authorize.js'
 	import uniGrader from '@/components/uni-grade/uni-grade.vue'
 	import modalLayer from "@/components/modal-layer"
-	import { userInfoLogin } from "@/api/use.js"
 	import { mapState,mapMutations} from 'vuex';
 	var isPreviewImg;
 	export default {
@@ -276,8 +275,8 @@
 			this.modallayer = false
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userID ? resolve.userID : 0;
-				this.shopId = resolve.shopID ? resolve.shopID : 0;
+				this.userID = resolve.userId ? resolve.userId : 0;
+				this.shopId = resolve.shopId ? resolve.shopId : 0;
 				this.userIdentity = resolve.userIdentity
 				this.GetActitityInit()
 			}).catch(error =>{

+ 25 - 18
main.js

@@ -4,15 +4,21 @@ import App from './App'
 import './services/index.js'
 import * as Api from '@/common/config/caimeiApi.js'
 import * as Regs from '@/common/config/common.js'
+import { umtrackWxKey } from '@/utils/config.js'
+import uma from 'umtrack-wx';
+
 import { msg, modal,prePage } from'./utils/util'
 import cuCustom from './components/cm-custom/cu-custom.vue'
 import auCustom from './components/cm-custom/au-custom.vue'
 import cmCustom from './components/cm-custom/cm-custom.vue'
 import scrollTop from '@/components/cm-module/scrollTop/scrollTop.vue'
+import CityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'//全局注册地址组件
+
 Vue.component('cu-custom',cuCustom)
 Vue.component('au-custom',auCustom)
 Vue.component('cm-custom',cmCustom)
 Vue.component('scroll-top',scrollTop)
+Vue.component('city-Picker',CityPicker)
 
 Vue.prototype.$getStorage = function(key){
 	var userParam = uni.getStorageSync(key);
@@ -25,33 +31,34 @@ Vue.prototype.$getStorage = function(key){
 /**
  * 友盟+小程序统计
  */
+if(process.env.NODE_ENV != 'development'){
 // #ifdef MP-WEIXIN
-// import { umtrackWxKey } from '@/utils/config.js'
-// import uma from 'umtrack-wx';
-// uma.init({
-// 	appKey: umtrackWxKey, //由友盟分配的APP_KEY
-// 	// 使用Openid进行统计,此项为false时将使用友盟+uuid进行用户统计。
-// 	// 使用Openid来统计微信小程序的用户,会使统计的指标更为准确,对系统准确性要求高的应用推荐使用Openid。
-// 	useOpenid: true,
-// 	// 使用openid进行统计时,是否授权友盟自动获取Openid,
-// 	// 如若需要,请到友盟后台"设置管理-应用信息"(https://mp.umeng.com/setting/appset)中设置appId及secret
-// 	autoGetOpenid: true,
-// 	debug: true, //是否打开调试模式
-// 	uploadUserInfo: false // 自动上传用户信息,设为false取消上传,默认为false
-// });
-// uma.install = function (Vue) {
-// 	Vue.prototype.$uma = uma;
-// }
+	uma.init({
+		appKey: umtrackWxKey, //由友盟分配的APP_KEY
+		// 使用Openid进行统计,此项为false时将使用友盟+uuid进行用户统计。
+		// 使用Openid来统计微信小程序的用户,会使统计的指标更为准确,对系统准确性要求高的应用推荐使用Openid。
+		useOpenid: true,
+		// 使用openid进行统计时,是否授权友盟自动获取Openid,
+		// 如若需要,请到友盟后台"设置管理-应用信息"(https://mp.umeng.com/setting/appset)中设置appId及secret
+		autoGetOpenid: true,
+		debug: true, //是否打开调试模式
+		uploadUserInfo: false // 自动上传用户信息,设为false取消上传,默认为false
+	});
+	uma.install = function (Vue) {
+		Vue.prototype.$uma = uma;
+	}
+	Vue.use(uma);
 // #endif
+}
 
-
+// Vue实例化
 Vue.config.productionTip = false
 Vue.prototype.$fire = new Vue();
 Vue.prototype.$store = store;
 Vue.prototype.$util = {msg,prePage,modal};
 Vue.prototype.$api = Api;
 Vue.prototype.$reg = Regs;
-// Vue.use(uma);
+
 App.mpType = 'app'
 
 const app = new Vue({

+ 39 - 0
pages.json

@@ -85,6 +85,15 @@
 		{
 			"root": "pages/goods/",//商品模块
 			"pages": [
+				/*美体节临时页面*/
+				{
+					"path": "good-floor-temp",
+					"style": {
+						"navigationBarTitleText": "美体节",
+						"enablePullDownRefresh":true,
+						"navigationStyle":"custom"
+					}
+				},
 				{
 					"path": "goods",
 					"style": {
@@ -208,6 +217,12 @@
 						"navigationBarTitleText": "绑定邮箱"
 					}
 				},
+				{
+					"path": "binding",
+					"style": {
+						"navigationBarTitleText": "注册信息"
+					}
+				},
 				{
 					"path": "bindwechat",
 					"style": {
@@ -414,6 +429,12 @@
 						"navigationBarTitleText": "确认订单"
 					}
 				},
+				{
+					"path": "pages/order/create-recharge-order",
+					"style": {
+						"navigationBarTitleText": "确认订单"
+					}
+				},
 				{
 					"path": "pages/order/order-details",
 					"style": {
@@ -466,6 +487,24 @@
 						"navigationStyle":"custom"
 					}
 				},
+				{
+					"path": "pages/login/register-select",
+					"style": {
+						"navigationBarTitleText": "拉机构上线"
+					}
+				},
+				{
+					"path": "pages/login/register-general",
+					"style": {
+						"navigationBarTitleText": "普通机构"
+					}
+				},
+				{
+					"path": "pages/login/register-member",
+					"style": {
+						"navigationBarTitleText": "会员机构"
+					}
+				},
 				{
 					"path": "pages/login/information",
 					"style": {

+ 50 - 28
pages/authorization/authorization.vue

@@ -9,7 +9,7 @@
 			<text>您暂未授权采美采购小程序获取您的信息,将无法正常使用小程序的功能。如需正常使用,请点击“授权”按钮,并允许头像、昵称等信息的授权。</text>
 		</view>
 		<view class="login-form">
-			<button class="login-btn use" type="primary" size="small" open-type="getUserInfo" lang="zh_CN" @getuserinfo="getuserinfo">微信授权</button>
+			<button class="login-btn use" type="primary" open-type="getUserInfo" size="small" @click="getUserProfile" lang="zh_CN">微信授权</button>
 			<view class="login-btn back" @tap="undGetuserinfo">取消</view>
 		</view>
 	</view>
@@ -45,9 +45,34 @@
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods:{
-			getuserinfo: function (e) {//微信授权
+			...mapMutations(['wxLogin']),
+			getUserProfile(){
+				const self = this
+				// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope
+				wx.getUserProfile({
+					desc: '采美采购商城小程序获取您的信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success(res) {
+						console.log('新API',res)	
+						self.wxLogin(res.userInfo)		
+						uni.login({
+							provider: 'weixin',
+							scopes: 'auth_user',
+							success(res) {
+								self.WxGetUserInfo()
+							},
+							fail(err) {
+								self.$util.msg(err, 2000)
+							}
+						})
+					},
+					fail() {
+						self.$util.msg('授权失败', 2000)
+					}
+				})
+			},
+			Getuserinfo: function (e) {//微信授权(暂时弃用)
 			    if (e.detail.userInfo) {
-					this.wxGetUserInfo()
+					this.WxGetUserInfo()
 			    }else{
 					this.$util.msg('授权失败',2000)
 			    }
@@ -67,33 +92,30 @@
 						uni.navigateBack({delta: 1})
 				}
 			},
-			wxGetUserInfo(){
+			WxGetUserInfo(){
 				let self = this
-				authorize.getCode('weixin').then(wechatcode =>{
-					wx.getUserInfo({
-						success: res => {
-							console.log(self.authorizeType)
-							wxLogin.wxLoginAuthorize()
-							switch(self.authorizeType){
-								case '0':
-									self.$api.switchTabTo('/pages/tabBar/home/index')
-									break;
-								case '1':
-									self.$api.navigateTo('/pages/login/login')
-									break;
-								case '2':
-									self.$api.navigateTo('/pages/login/register')
-									break;
-								case '3':
-									self.$api.navigateTo('/pages/login/logincode')
-									break;
-								default:
-									setTimeout(()=>{
-										uni.navigateBack({delta: 1});
-									},2000)
-							}
+				wx.getUserInfo({
+					success: res => {
+						wxLogin.wxLoginAuthorize()
+						switch(self.authorizeType){
+							case '0':
+								self.$api.switchTabTo('/pages/tabBar/home/index')
+								break;
+							case '1':
+								self.$api.navigateTo('/pages/login/login')
+								break;
+							case '2':
+								self.$api.navigateTo('/pages/login/register')
+								break;
+							case '3':
+								self.$api.navigateTo('/pages/login/logincode')
+								break;
+							default:
+								setTimeout(()=>{
+									uni.navigateBack({delta: 1});
+								},2000)
 						}
-					})
+					}
 				})
 			}
 		}

+ 8 - 8
pages/goods/cart.vue

@@ -231,18 +231,18 @@
 				this.isCheckAll=false//是否全选
 				this.submitIds = []
 				this.$api.getStorage().then((resolve) => {
-					this.userID = resolve.userID;
+					this.userID = resolve.userId;
 					this.initGetCartGoodsList();
 				})	
 			},
 			initLogin(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$api.redirectTo('/pages/login/login?type=4')
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=0')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					this.$api.redirectTo('/pages/login/login?type=4')
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=0')
+				})
 			},
 			clickPopupShow(pros,type){
 				this.popupShow = true;

+ 189 - 0
pages/goods/good-floor-temp.vue

@@ -0,0 +1,189 @@
+<template>
+	<view class="container floor clearfix" :style="{ paddingTop: CustomBar + 'px' }">
+		<custom-floor
+			:systeminfo="systeminfo"
+			:navbar-data="nvabarData"
+			:headerBtnPosi="headerBtnPosi"
+		>
+		</custom-floor>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		></tui-skeleton>
+		<view class="container-home tui-skeleton">
+			<!-- 金刚区菜单 -->
+			<!-- <templateNav :list="navBarsList" v-if="isRequest"></templateNav> -->
+			<image v-if="isRequest"
+				src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-d3717fcc-9817-4afd-b47a-7b028f85f0f1/5ff8784d-9665-498e-9f7a-39a6e2194021.jpg"
+				mode="widthFix"
+			></image>
+		</view>
+		<!-- 楼层 -->
+		<view class="container-section tui-skeleton">
+			<page-floor
+				:list="pageList"
+				:userIdentity="userIdentity"
+				:pageType="2"
+				v-if="isRequest"
+			></page-floor>
+		</view>
+		<!-- 侧边 -->
+		<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
+	</view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex'
+import customFloor from '@/components/cm-custom/custom-floor' //自定义导航
+import templateNav from '@/components/cm-module/pageTemplate/templateNav.vue'
+import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
+import authorize from '@/common/config/authorize.js'
+import wxLogin from '@/common/config/wxLogin.js'
+
+export default {
+	components: {
+		customFloor,
+		templateNav,
+		pageFloor
+	},
+	data() {
+		return {
+			userID: 0,
+			shopId: 0,
+			userIdentity: 0,
+			skeletonShow: true,
+			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
+			systeminfo: this.setSysteminfo(), //获取设备信息
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			navBarsList: [],
+			pageList: [], //楼层
+			isRequest: false,
+			isScrollTop: false,
+			pageId: '',
+			typeSort: ''
+		}
+	},
+	onLoad(option) {
+		if (option.type == 'share') {
+			authorize.getSetting().then(wxResponse => {
+				// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+				console.log(wxResponse)
+				if (wxResponse == 1) {
+					wxLogin.wxLoginAuthorize()
+				} else {
+					console.log(new Date() + '用户未授权微信信息')
+				}
+			})
+		}
+		this.pageId = option.linkId
+		// this.pageId = '286'
+		this.$api
+			.getComStorage('userInfo')
+			.then(resolve => {
+				this.userID = resolve.userId ? resolve.userId : 0
+				this.shopId = resolve.shopId ? resolve.shopId : 0
+				this.userIdentity = resolve.userIdentity
+				this.GetInstrumentPageData()
+			})
+			.catch(error => {
+				this.GetInstrumentPageData()
+			})
+		setTimeout(() => {
+			this.skeletonShow = false
+		}, 2000)
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity'])
+	},
+	methods: {
+		GetInstrumentPageData() {
+			//获取楼层数据
+			this.CommonService.GetInstrumentPageData({
+				pageId: this.pageId,
+				userId: this.userID,
+				source: 2
+			})
+				.then(response => {
+					let data = response.data
+					this.typeSort = data.page.typeSort
+					this.pageList = data.floorList
+					this.GetHomeInit()
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		GetHomeInit() {
+			//金刚区分类
+			this.CommonService.GetFirstClassly({ typeSort: this.typeSort, source: 'crm' })
+				.then(response => {
+					this.navBarsList = response.data
+					this.isRequest = true
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		setHeaderBtnPosi() {
+			// 获得胶囊按钮位置信息
+			let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
+			return headerBtnPosi
+		},
+		setSysteminfo() {
+			let systeminfo
+			uni.getSystemInfo({
+				// 获取设备信息
+				success: res => {
+					systeminfo = res
+				}
+			})
+			return systeminfo
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+		if (e.scrollTop > 400) {
+			this.isScrollTop = true
+		} else {
+			this.isScrollTop = false
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShareAppMessage(res) {
+		//分享转发
+		if (res.from === 'button') {
+			// 来自页面内转发按钮
+		}
+		return {
+			title: '采美-一站式生/医美采购服务平台',
+			path: `pages/goods/good-floor?type=share&linkId=${this.pageId}`
+		}
+	},
+	onShow() {}
+}
+</script>
+
+<style lang="scss">
+page {
+	background-color: #ffffff;
+}
+.container-home {
+	width: 100%;
+	height: auto;
+	image{
+		width: 100%;
+	}
+}
+.container-section {
+	width: 100%;
+	height: auto;
+	background-color: #f7f7f7;
+}
+</style>

+ 9 - 10
pages/goods/good-floor.vue

@@ -51,19 +51,18 @@
 		},
 		onLoad(option) {
 			if(option.type =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 			this.pageId = option.linkId
 			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.userID = resolve.userID ? resolve.userID : 0;
-				this.shopId = resolve.shopID ? resolve.shopID : 0;
+				this.userID = resolve.userId ? resolve.userId : 0;
+				this.shopId = resolve.shopId ? resolve.shopId : 0;
 				this.userIdentity = resolve.userIdentity
 				this.GetInstrumentPageData();
 			}).catch(error =>{

+ 2 - 2
pages/goods/good-floorMore.vue

@@ -69,8 +69,8 @@
 			uni.setNavigationBarTitle({title:option.title});
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userID ? resolve.userID : 0;
-				this.shopId = resolve.shopID ? resolve.shopID : 0;
+				this.userID = resolve.userId ? resolve.userId : 0;
+				this.shopId = resolve.shopId ? resolve.shopId : 0;
 				this.userIdentity = resolve.userIdentity
 				this.GetHomeFloorContentDetails(this.pageType);
 			}).catch(error =>{

+ 1 - 1
pages/goods/goods-active.vue

@@ -65,7 +65,7 @@
 		onLoad(option) {
 			this.promotionsId=option.id
 			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.userID = resolve.userID ? resolve.userID :0;
+				this.userID = resolve.userId ? resolve.userId :0;
 				this.initSsoMemberCollectionList()
 			}).catch(error =>{
 				this.initSsoMemberCollectionList()

+ 9 - 10
pages/goods/goods-classify.vue

@@ -238,14 +238,13 @@
 		onLoad(option) {
 			console.log(option)
 			if(option.type =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 			this.SetScrollHeight()
 			this.InitOption(option)
@@ -264,8 +263,8 @@
 				this.listQuery.idType = this.classifyType = Number(option.classType);
 				uni.setNavigationBarTitle({title:option.title});
 				this.$api.getComStorage('userInfo').then((resolve) =>{
-					this.userID = resolve.userID ? resolve.userID : 0
-					this.shopID = resolve.shopID ? resolve.shopID : 0
+					this.userID = resolve.userId ? resolve.userId : 0
+					this.shopID = resolve.shopId ? resolve.shopId : 0
 					this.userIdentity = resolve.userIdentity
 					this.isRequest = true
 					this.GetProductListInfo()

+ 8 - 9
pages/goods/instrument-details.vue

@@ -203,14 +203,13 @@
 				this.backPage = option.page
 			}
 			if(this.isShareType =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 		},
 		computed: {
@@ -326,7 +325,7 @@
 		},
 		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;

+ 37 - 38
pages/goods/product.vue

@@ -366,14 +366,13 @@
 				this.backPage = option.page
 			}
 			if(this.isShareType =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 			this.getWinHeight()
 		},
@@ -484,29 +483,29 @@
 
 			},
 			buyProductCart(){//底部购物车按钮点击
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						if(this.hasLogin){
-							this.$api.navigateTo('/pages/goods/cart')
-						}else{					
-							this.$api.navigateTo('/pages/login/login?type=1')
-						}
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				authorize.checkLogin()
+				.then(res => {
+					if(this.hasLogin){
+						this.$api.navigateTo('/pages/goods/cart')
+					}else{					
+						this.$api.navigateTo('/pages/login/login?type=1')
 					}
-				})	
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				})
 			},
 			btnGetConfirm(type){//加入购物车&&立即购买点击
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						if(this.hasLogin){
-							this.showSpec(type);
-						}else{
-							this.$api.navigateTo('/pages/login/login?type=1')
-						}
+				authorize.checkLogin()
+				.then(res => {
+					if(this.hasLogin){
+						this.showSpec(type);
 					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}	
+						this.$api.navigateTo('/pages/login/login?type=1')
+					}
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
 				})
 			},	
 			changeCountAdd(){//popup弹窗数量增加按钮
@@ -602,15 +601,15 @@
 				})
 			},
 			navToLogin(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$store.commit('setLoginType',8)
-						this.$store.commit('setLoginProductId',this.productID)
-						this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					this.$store.commit('setLoginType',8)
+					this.$store.commit('setLoginProductId',this.productID)
+					this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				})
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
@@ -745,9 +744,9 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
-				this.userID = resolve.userID ? resolve.userID : '';	
+				this.userID = resolve.userId ? resolve.userId : '';	
 				this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 0
-				this.shopID =  resolve.shopID ? resolve.shopID : '';
+				this.shopID =  resolve.shopId ? resolve.shopId : '';
 				if(this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4){
 					this.isShowButton = true
 				}else{

+ 38 - 38
pages/login/apply-supplier.vue

@@ -38,7 +38,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">公司简称:</view>
-					<input class="row-input" type="text" v-model="shopInfo.sname" placeholder="请输入您的公司简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shopInfo.shortName" placeholder="请输入您的公司简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -75,9 +75,9 @@
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="shopInfo.businessLicenseImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="shopInfo.businessLicense === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="shopInfo.businessLicenseImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="shopInfo.businessLicense" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -187,22 +187,22 @@
 				auditStatus:'',			//审核状态
 				isPreviewImage:false,   //预览图片开关
 				shopInfo:{
-					userID:'',				//用户ID
-					shopID:'',				//供应商ID
+					userId:'',				//用户ID
+					shopId:'',				//供应商ID
 					linkMan:'',				//联系人
 					name:'',				//公司名称
 					email:"",				//法人邮箱地址
-				    provinceID :'',			//省ID
-					cityID : '',			//市ID
-					townID : '',			//区ID
+				    provinceId :'',			//省ID
+					cityId : '',			//市ID
+					townId : '',			//区ID
 					address:'',				//公司详细地址
-					sname:'',	 			//公司简称
+					shortName:'',	 			//公司简称
 					socialCreditCode:'',	//统一社会信用代码
-					businessLicenseImage:'',//营业执照图片
-					firstShopType:0,		//公司类型
-					secondShopType: '',
-					mainpro:'',				//公司主营内容
-					isAgreed:0,				//勾选协议状态
+					businessLicense:'',//营业执照图片
+					firstShopType: 0,		//公司类型
+					secondShopType: 0,
+					mainProduct:'',				//公司主营内容
+					isAgreed:1,				//勾选协议状态
 				},
 				addressText:'请选择公司所在地区',
 				isDisabled:true,
@@ -219,7 +219,7 @@
 				customItemValue:'', 	//自定义项目
 				isMainproCheck:false,
 				isSupplierAlert:true,
-				isCheck:false
+				isCheck:true
 			}	
 		},
 		onLoad() {
@@ -235,8 +235,8 @@
 			},
 			GetSupplierInfo(){
 				this.$api.getStorage().then((resolve) =>{
-					this.shopInfo.userID = resolve.userID
-					this.UserService.SupplierShopInfo({userId:this.shopInfo.userID}).then(response =>{
+					this.shopInfo.userId = resolve.userId ? resolve.userId : 0
+					this.UserService.SupplierShopInfo({userId:this.shopInfo.userId}).then(response =>{
 						let responseData = response.data
 						let supplierShop = responseData.shop
 						let supplierUser = responseData.user
@@ -244,27 +244,27 @@
 						if(supplierUser.auditNoteList!=null){
 							this.errorList = supplierUser.auditNoteList
 						}
-						this.shopInfo.shopID = supplierUser.shopID
+						this.shopInfo.shopId = supplierUser.shopId
 						this.shopInfo.name = this.$reg.checkData(supplierShop.name)
 						this.shopInfo.linkMan = this.$reg.checkData(supplierShop.linkMan)
 						this.shopInfo.email = this.$reg.checkData(supplierUser.email)
-						this.shopInfo.sname = this.$reg.checkData(supplierShop.sname)
+						this.shopInfo.shortName = this.$reg.checkData(supplierShop.shortName)
 						this.addressText = supplierShop.provincialAddress ? supplierShop.provincialAddress : '请选择公司所在地区'
 						this.shopInfo.address = supplierShop.address
-						this.shopInfo.provinceID = supplierShop.provinceID
-						this.shopInfo.cityID = supplierShop.cityID
-						this.shopInfo.townID = supplierShop.townID
+						this.shopInfo.provinceId = supplierShop.provinceId
+						this.shopInfo.cityId = supplierShop.cityId
+						this.shopInfo.townId = supplierShop.townId
 						this.shopInfo.socialCreditCode = this.$reg.checkData(supplierShop.socialCreditCode)
-						this.shopInfo.businessLicenseImage = this.$reg.checkData(supplierShop.businessLicenseImage) 
+						this.shopInfo.businessLicense = this.$reg.checkData(supplierShop.businessLicense) 
 						this.shopInfo.firstShopType = supplierShop.firstShopType
 						this.shopInfo.secondShopType = this.$reg.checkData(supplierShop.secondShopType)
 						//机构类型&&主营项目
 						switch(this.shopInfo.firstShopType){
-							case '1':
+							case 1:
 								this.organizationTypeText = '医疗'
 								this.shopInfo.firstShopType = 1
 								break;
-							case '2':
+							case 2:
 								this.organizationTypeText = '非医疗'
 								this.shopInfo.firstShopType = 2
 								break;
@@ -273,10 +273,10 @@
 								this.shopInfo.firstShopType = 0
 								break;
 						}	
-						if(supplierShop.mainpro){
-							this.supplierMedicaCampList = this.setNewMainpro(supplierShop.mainpro)
+						if(supplierShop.mainProduct){
+							this.supplierMedicaCampList = this.setNewMainpro(supplierShop.mainProduct)
 							console.log(this.supplierMedicaCampList)
-							this.mainpro = supplierShop.mainpro;
+							this.shopInfo.mainProduct = supplierShop.mainProduct;
 						}else{
 							this.supplierMedicaCampList = this.medicaCampList
 							console.log(this.supplierMedicaCampList)
@@ -310,7 +310,7 @@
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
-				if( this.shopInfo.townID == ''){
+				if( this.shopInfo.townId == ''){
 					this.$util.msg('请选择公司地址',2000);
 					return
 				}
@@ -322,7 +322,7 @@
 					this.$util.msg('请填写统一社会信用代码',2000);
 					return
 				}
-				if( !this.shopInfo.businessLicenseImage){
+				if( !this.shopInfo.businessLicense){
 					this.$util.msg('请上传您的营业执照',2000);
 					return
 				}
@@ -330,7 +330,7 @@
 					this.$util.msg('请选择公司类型',2000);
 					return
 				}
-				if(this.shopInfo.mainpro == ''){
+				if(this.shopInfo.mainProduct == ''){
 					this.$util.msg('请选择主营内容',2000);
 					return
 				}
@@ -348,11 +348,11 @@
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.shopInfo.businessLicenseImage = JSON.parse(res.data).data
+					this.shopInfo.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
-				this.myPreviewImageFn(this.businessLicenseImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			myPreviewImageFn(url){
 				this.isPreviewImage = true
@@ -365,7 +365,7 @@
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.shopInfo.businessLicenseImage = ''
+					 this.shopInfo.businessLicense = ''
 				})
 			},
 			radioChange(e) {
@@ -374,7 +374,7 @@
 			},
 			chooseMaleLike(e){
 				this.isMainproCheck = true
-				this.shopInfo.mainpro = this.checkLikes(e,this.supplierMedicaCampList)
+				this.shopInfo.mainProduct = this.checkLikes(e,this.supplierMedicaCampList)
 			},
 			bindPickerChange(e) {
 				let self = this
@@ -412,9 +412,9 @@
 			},
 			onConfirm(e) {
 				this.addressText = e.name;
-				this.shopInfo.townID = e.townCode;
-				this.shopInfo.cityID = e.cityCode;
-				this.shopInfo.provinceID = e.provinceCode;
+				this.shopInfo.townId = e.townCode;
+				this.shopInfo.cityId = e.cityCode;
+				this.shopInfo.provinceId = e.provinceCode;
 				console.log(this.shopInfo)
 			},	
 			onTextareaInput(e){

+ 109 - 89
pages/login/apply.vue

@@ -21,7 +21,7 @@
 			<view class="register-row none clearfix">
 				<view class="register-from">
 					<view class="label">邮箱</view>
-					<input class="row-input" type="text" name="input" v-model="registerEmail" placeholder="请输入您的常用邮箱"placeholder-class="placeholder" maxlength="30"/>
+					<input class="row-input" type="text" name="input" v-model="contractEmail" placeholder="请输入您的常用邮箱"placeholder-class="placeholder" maxlength="30"/>
 				</view>
 				<view class="register-tip"><text>提示:邮箱可用作登录账号,请使用公司邮箱或法人邮箱</text></view>
 			</view>
@@ -34,7 +34,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称</view>
-					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" placeholder-class="placeholder" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shortName" placeholder="请输入您的机构简称" placeholder-class="placeholder" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -71,11 +71,11 @@
 				<view class="register-picture">
 					<view class="label">营业执照</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage === ''"  @click="chooseBusinessImage">
+						<view class="upload-none" v-if="businessLicense === ''"  @click="chooseBusinessImage">
 							<image src="https://static.caimei365.com/app/img/upload/club-zizhi.png"></image>
 						</view>
 						<view class="upload-image" v-else>
-							<image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="businessLicense" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -87,11 +87,11 @@
 				<view class="register-picture">
 					<view class="label">门头照</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMentuzImage === ''" @click="chooseMentuzImage">
-							<image src="https://static.caimei365.com/app/img/upload/club-zizhi.png"></image>
+						<view class="upload-none" v-if="shopPhoto === ''" @click="chooseMentuzImage">
+							<image src="https://static.caimei365.com/app/img/upload/club-door.png"></image>
 						</view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMentuzImage" mode=""  @click="viewMentuzImage"></image>
+							<image :src="shopPhoto" mode=""  @click="viewMentuzImage"></image>
 							<view class="upload-del" @click="delMentuzImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -122,11 +122,11 @@
 				<view class="register-picture zz">
 					<view class="label zz">医疗执业许可证</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage === ''" @click="chooseMedicalImage">
+						<view class="upload-none" v-if="medicalPracticeLicense === ''" @click="chooseMedicalImage">
 							<image src="https://static.caimei365.com/app/img/upload/club-zizhi.png"></image>
 							</view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
+							<image :src="medicalPracticeLicense" mode=""  @click="viewMedicalImage"></image>
 							<view class="upload-del" @click="delMedicalImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -146,7 +146,7 @@
 					<view class="content-class">
 						<checkbox-group @change="chooseMaleLike" >
 							<label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
-							   <checkbox :value="item.value"></checkbox>
+							   <checkbox class="item-checkbox" :value="item.value"></checkbox>
 							   <text class="item-text">{{item.name}}</text>
 							</label>
 						</checkbox-group>
@@ -168,7 +168,7 @@
 					<view class="content-class">
 						<checkbox-group @change="chooseMaleLikes">
 							<label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
-							   <checkbox :value="item.value"></checkbox>
+							   <checkbox class="item-checkbox" :value="item.value" :checked="item.checked"></checkbox>
 							   <text class="item-text">{{item.name}}</text>
 							</label>
 						</checkbox-group>
@@ -223,22 +223,22 @@
 				tabCurrentIndex:3,	
 				clubStatus:'',			//审核状态
 				isPreviewImage:false,   //预览图片开关
-				userID:'',				//用户ID
-				clubID:'',				//会所ID
-				registerEmail:'',		//邮箱
+				userId:'',				//用户ID
+				clubId:'',				//会所ID
+				contractEmail:'',		//邮箱
 				clubName:'',	 		//机构名称
-				abbreviation:'',	 	//机构简称
+				shortName:'',	 	//机构简称
 				socialCreditCode:'',	//统一社会信用代码
 				isDisabled:true,
 				isShowInput:true,
 				textareaFocus:false,
-				uploadBusinessImage:'',	//营业执照图片
-				uploadMentuzImage:'',  	//门头照图片
-				uploadMedicalImage:'', 	//资质照图片
+				businessLicense:'',	//营业执照图片
+				shopPhoto:'',  	//门头照图片
+				medicalPracticeLicense:'', 	//资质照图片
 				department:'',			//科室
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
-				mainpro:'',				//主营内容
+				mainProduct:'',				//主营内容
 				firstClubType:'',		//机构类型
 				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
@@ -255,14 +255,14 @@
 				isMainproCheck:false,
 				addressData:{
 					address:'请选择机构所在地区',
-					townID:'',			//区ID
-					cityID:'',			//市ID
-					provinceID:'',		//省ID
+					townId:'',			//区ID
+					cityId:'',			//市ID
+					provinceId:'',		//省ID
 					addressDetail: '',	//地址详情
 				},
 				typename:[
-					{name:'医美',value:'1'},
-					{name:'生美',value:'2'}
+					{name:'医美',value:1},
+					{name:'生美',value:2}
 				],
 			}	
 		},
@@ -281,49 +281,53 @@
 			},
 			organizationInfo(){
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					this.UserService.OrganizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+					this.userId = resolve.userId ? resolve.userId : 0
+					this.UserService.OrganizationUpdateModifyInfo({userId:this.userId}).then(response =>{
 						let organizationClub = response.data.club
 						let organizationUser = response.data.user
 						if(organizationUser.auditNoteList!=null){
 							this.errorList =organizationUser.auditNoteList
 						}
-						this.registerEmail = organizationUser.email	
-						this.clubID = organizationUser.clubID
-						this.clubName = this.$reg.checkData(organizationClub.name)
-						this.abbreviation = this.$reg.checkData(organizationClub.sname)
-						if( organizationClub.provinceID==''||organizationClub.provinceID==null){
-							this.addressData.provinceID = ''
+						this.contractEmail = organizationClub.contractEmail	
+						console.log(this.contractEmail)
+						this.clubId = organizationUser.clubId
+						if(this.contractEmail){
+							this.clubName = this.$reg.checkData(organizationClub.name)
+						}else{
+							this.clubName = ''
+						}
+						this.shortName = this.$reg.checkData(organizationClub.shortName)
+						if( organizationClub.provinceId==''||organizationClub.provinceId==null){
+							this.addressData.provinceId = ''
 						}else{
-							this.addressData.provinceID = organizationClub.provinceID
+							this.addressData.provinceId = organizationClub.provinceId
 						}
-						if( organizationClub.cityID==''||organizationClub.cityID===null){
-							this.addressData.cityID = ''
+						if( organizationClub.cityId==''||organizationClub.cityId===null){
+							this.addressData.cityId = ''
 						}else{
-							this.addressData.cityID = organizationClub.cityID
+							this.addressData.cityId = organizationClub.cityId
 						}
-						if( organizationClub.townID==''||organizationClub.townID==null){
-							this.addressData.townID = ''
+						if( organizationClub.townId==''||organizationClub.townId==null){
+							this.addressData.townId = ''
 						}else{
-							this.addressData.townID = organizationClub.townID
+							this.addressData.townId = organizationClub.townId
 						}
-						console.log('66666666666666')
 						this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress:'请选择机构所在地区'
 						this.addressData.addressDetail = this.$reg.checkData(organizationClub.address)
 						this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
 						this.firstClubType = organizationClub.firstClubType
 						this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
-						this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage) 
-						this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
-						this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
+						this.businessLicense = this.$reg.checkData(organizationClub.businessLicense) 
+						this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
+						this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
 						this.department = this.$reg.checkData(organizationClub.department)		
 						//机构类型&&主营项目
 						switch(this.firstClubType){
-							case '1':
+							case 1:
 								this.organizationTypeText = '医美'
 								this.isOrganizationType = 1
 								break;
-							case '2':
+							case 2:
 								this.organizationTypeText = '生美'
 								this.isOrganizationType = 2
 								break;
@@ -332,24 +336,24 @@
 								this.isOrganizationType = 0
 								break;
 						}	
-						if(organizationClub.mainpro == "" || organizationClub.mainpro == null){
+						if(organizationClub.mainProduct == "" || organizationClub.mainProduct == null){
 							this.mentuzCampList = this.mentuzCampNullList
 							this.medicaCampList = this.medicaCampNullList
 						}else{
-							if(this.firstClubType == '1'){
-								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+							if(this.firstClubType == 1){
+								this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
 								this.medicaCampList = this.medicaCampNullList							
 							}else{
-								this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+								this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
 								this.mentuzCampList = this.mentuzCampNullList
 							}
-							this.mainpro = organizationClub.mainpro;
+							this.mainProduct = organizationClub.mainProduct;
 						}
 						//机构类型
 						switch(this.secondClubType){
-							case '1':this.current = 0;break;
-							case '2':this.current = 1;this.isDepartment=true;break;
-							case '3':this.current = 2;this.isDepartment=true;break;
+							case 1:this.current = 0;break;
+							case 2:this.current = 1;this.isDepartment=true;break;
+							case 3:this.current = 2;this.isDepartment=true;break;
 						}
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -359,7 +363,7 @@
 			organizationUpdateInfo(){//提交审核
 				if(!this.isMainproCheck){
 					let mainproList = []
-					if(this.firstClubType == '1'){
+					if(this.firstClubType == 1){
 						this.mentuzCampList.forEach(item =>{
 							mainproList.push(item.name)
 						})
@@ -368,13 +372,13 @@
 							mainproList.push(item.name)
 						})
 					}
-					this.mainpro = mainproList.join('/')
+					this.mainProduct = mainproList.join('/')
 				}
-				if( this.registerEmail == ''){
+				if( this.contractEmail == ''){
 					this.$util.msg('请输入邮箱地址',2000);
 					return
 				}
-				if( !this.$reg.isEmail(this.registerEmail)){
+				if( !this.$reg.isEmail(this.contractEmail)){
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
@@ -382,7 +386,7 @@
 					this.$util.msg('请输入机构名称',2000);
 					return
 				}
-				if( this.addressData.townID == ''){
+				if( this.addressData.townId == ''){
 					this.$util.msg('请选择机构地址',2000);
 					return
 				}
@@ -390,34 +394,34 @@
 					this.$util.msg('请填写机构详细地址',2000);
 					return
 				}
-				if( this.uploadBusinessImage == ''){
+				if( this.businessLicense == ''){
 					this.$util.msg('请上传您的营业执照',2000);
 					return
 				}
 				if(this.isOrganizationType!=0){
-					if(this.mainpro == ''){
+					if(this.mainProduct == ''){
 						this.$util.msg('请选择住机构主营内容',2000);
 						return
 					}
 				}
 				let params ={
-						userID:this.userID,
-						clubID:this.clubID,					//会所ID
-						contractEmail1:this.registerEmail,
+						userId:this.userId,
+						clubId:this.clubId,					//会所ID
+						contractEmail:this.contractEmail,
 						name:this.clubName,
-						sname:this.abbreviation,
-						provinceID:this.addressData.provinceID,
-						cityID:this.addressData.cityID,
-						townID:this.addressData.townID,
+						shortName:this.shortName,
+						provinceId:this.addressData.provinceId,
+						cityId:this.addressData.cityId,
+						townId:this.addressData.townId,
 						address:this.addressData.addressDetail,
 						socialCreditCode:this.socialCreditCode,
-						businessLicenseImage:this.uploadBusinessImage,
-						headpic:this.uploadMentuzImage,
+						businessLicense:this.businessLicense,
+						shopPhoto:this.shopPhoto,
 						firstClubType:this.isOrganizationType,  //机构类型分类 医美:1和生美:2
 						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,				//科室
-						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						mainpro:this.mainpro,
+						medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
+						mainProduct:this.mainProduct,
 				}
 				this.UserService.OrganizationRegister(params).then(response =>{
 					this.$util.msg('您的升级申请已提交审核',2000);
@@ -435,9 +439,9 @@
 			},
 			onConfirm(e) {
 				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
+				this.addressData.townId = e.townCode;
+				this.addressData.cityId = e.cityCode;
+				this.addressData.provinceId = e.provinceCode;
 			},	
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
@@ -452,27 +456,27 @@
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadBusinessImage = JSON.parse(res.data).data
+					this.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			chooseMentuzImage() {//门头照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMentuzImage = JSON.parse(res.data).data
+					this.shopPhoto = JSON.parse(res.data).data
 				})
 			},
 			chooseMedicalImage() {//资质照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMedicalImage = JSON.parse(res.data).data
+					this.medicalPracticeLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
-				this.myPreviewImageFn(this.uploadBusinessImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			viewMentuzImage(e) {
-				this.myPreviewImageFn(this.uploadMentuzImage)
+				this.myPreviewImageFn(this.shopPhoto)
 			},
 			viewMedicalImage(e) {
-				this.myPreviewImageFn(this.uploadMedicalImage)
+				this.myPreviewImageFn(this.medicalPracticeLicense)
 			},
 			myPreviewImageFn(url){
 				this.isPreviewImage = true
@@ -485,17 +489,17 @@
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.uploadBusinessImage = ''
+					 this.businessLicense = ''
 				})
 			},
 			delMentuzImage(){
 				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
-					this.uploadMentuzImage = ''
+					this.shopPhoto = ''
 				})
 			},			
 			delMedicalImage(){
 				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
-					this.uploadMedicalImage = ''
+					this.medicalPracticeLicense = ''
 				})
 			},
 			bindPickerChange(e) {
@@ -523,7 +527,7 @@
 			},
 			radioChange(item) {
 				this.secondClubType = item.value;
-				if( this.secondClubType == '2' || this.secondClubType == '3'){
+				if( this.secondClubType == 2 || this.secondClubType == 3){
 					this.isDepartment = true
 				}else{
 					this.isDepartment = false
@@ -537,11 +541,11 @@
 			},
 			chooseMaleLike(e){
 				this.isMainproCheck = true
-				this.mainpro = this.checkLikes(e,this.mentuzCampList)
+				this.mainProduct = this.checkLikes(e,this.mentuzCampList)
 			},
 			chooseMaleLikes(e){
 				this.isMainproCheck = true
-				this.mainpro = this.checkLikes(e,this.medicaCampList)
+				this.mainProduct = this.checkLikes(e,this.medicaCampList)
 			},
 			checkLikes(e,list){
 				let	values = e.detail.value
@@ -915,7 +919,8 @@
 						  font-size:$font-size-28;
 						  line-height: 60rpx;
 						  border-radius:10rpx;
-						  margin-left: 40rpx;
+						  margin-left: 20rpx;
+						  margin-bottom: 10rpx;
 						  box-sizing: border-box;
 						  // border: 1rpx solid #EFEFEF;
 						  float: left;
@@ -923,9 +928,24 @@
 							// display: none;
 						 //  }
 						}
+						.item-checkbox{
+							display: none;
+						}
+						.item-text{
+							border: 2rpx solid #e1e1e1;
+							display: inline-block;
+							font-size: 26rpx;
+							color: #999999;
+							padding: 0 30rpx;
+							border-radius: 28rpx;
+							line-height: 50rpx;
+							float: left;
+						}
 						.on {
-						  border-color: $color-system;
-						  color:$color-system;
+							.item-text{
+								border-color: $color-system;
+								color:$color-system;
+							}
 						}
 					}
 				}

+ 79 - 71
pages/login/bindOperator.vue

@@ -80,7 +80,6 @@
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { userInfoLogin } from "@/api/use.js"
 	import { getbindOperatorCode } from "@/api/utils.js"
 	export default{
 		data() {
@@ -103,45 +102,51 @@
 			console.log(option)
 			uni.setStorageSync('bind_id', option.userID);
 			this.getVerificationCode()
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse == 1){
-					this.getWxAuthorize()
-				}else{
-					this.$api.navigateTo('/pages/authorization/authorization')
-					this.isUserInfo = true
-				}
-			})	
+			authorize.checkLogin().then(res => {
+				this.getWxAuthorize()
+			})
+			.catch(err => {
+				this.$api.navigateTo('/pages/authorization/authorization')
+				this.isUserInfo = true
+			})
 		},
 		computed: {
 			...mapState(['isWxAuthorize'])
 		},
 		methods:{
 			...mapMutations(['login','logout']),
-			getWxAuthorize(){// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-				authorize.getCode('weixin').then(wechatcode =>{
-					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					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)
-							if(response.data.userIdentity ==1){
-								// this.$api.navigateTo('/seller/pages/index/index')
-							}else{
-								// this.$api.switchTabTo('/pages/tabBar/home/index')
-							}
-						}).catch(error =>{
-							this.logout()
-							this.isUserInfo = true
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+error.data)
-							this.$store.commit('updateStatus',error.data)
-						})
-					})
+			async getWxAuthorize(){
+				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.login(response.data);
+					this.$store.commit('updateStatus',response.data)
+					uni.setStorageSync('token',response.data.token)
+					uni.setStorageSync('unionId',response.data.unionId)
+					setTimeout(()=>{
+						if(response.data.userIdentity === 1){
+							this.$api.navigateTo('/seller/pages/index/index')
+						}else if(response.data.userIdentity === 2 || response.data.userIdentity === 4){
+							this.$api.switchTabTo('/pages/tabBar/user/user')
+						}else if(response.data.userIdentity === 3){
+							this.$api.navigateTo('/supplier/pages/index/index')
+						}else{
+							this.isUserInfo= true
+						}
+					},1000)
+				})
+				.catch(error =>{
+					this.logout()
+					uni.setStorageSync('unionId',error.data.unionId)
+					this.$store.commit('updateStatus',error.data)
+					this.isUserInfo = true
+				})
+			},	
 			bindWechatInfo(){
 				if( this.bindLinkName == ''){
 					this.$util.msg('请输入姓名',2000)
@@ -163,13 +168,12 @@
 					this.$util.msg('验证码格式不正确',2000)
 					return
 				}
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.bindingWechatLogin()
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					this.bindingWechatLogin()
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization')
+				})
 			},
 			getVerificationCode(){//图形验证
 				this.PublicService.GetImgVerifyCode().then(res => {
@@ -189,37 +193,40 @@
 				if( this.imageCode == ''){
 					this.$util.msg('请输入图形验证码',2000);
 					return
-				}			
+				}		
 				let params = {
-						userId:uni.getStorageSync('bind_id'),
 						mobile:this.bindMobile,
+						userId:uni.getStorageSync('bind_id'),
 						platformType:2,
+						isCheckCaptcha:0,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
 				}
 				this.isMobileDisabled = true;
-				getbindOperatorCode(params).then(res =>{
-					const TIME_COUNT = 60;
-					this.$util.msg('验证短信已发送',2000)
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
-						this.isMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.mobileCodeText = this.count +'s重新发送'
-			        		} else {
-				         		this.isMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
-								this.mobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}
-				}).catch( res =>{
-					this.$util.msg(res.msg,2000)
-					this.isMobileDisabled = false;
-				})
+				this.PublicService.GetBindMobileCode(params)
+					.then(res =>{
+						const TIME_COUNT = 60;
+						this.$util.msg('验证短信已发送',2000)
+				     	if (!this.codeTime) {
+				       		this.count = TIME_COUNT;
+							this.isMobileDisabled = true;
+				       		this.codeTime = setInterval(() => {
+				       			if (this.count > 1 && this.count <= TIME_COUNT) {
+				         			this.count--
+				         			this.mobileCodeText = this.count +'s重新发送'
+				        		} else {
+					         		this.isMobileDisabled = false;
+					         		clearInterval(this.codeTime)
+					         		this.codeTime = null
+									this.mobileCodeText = '获取验证码'
+				        		}
+				       		},1000)
+				      	}
+					})
+					.catch( error =>{
+						this.$util.msg(error.msg,2000)
+						this.isMobileDisabled = false;
+					})
 			},
 			
 			bindingWechatLogin(){//获取用户基本信息登录
@@ -227,14 +234,15 @@
 					success: res => {
 						this.wxUserInfo = res.userInfo;
 						let params ={
-								userID: uni.getStorageSync('bind_id'),
-								mobile: this.bindMobile,
-								linkName: this.bindLinkName,
-								verificationCode: this.mobildeCode,
-								nickName: this.wxUserInfo.nickName,
-								headimgurl: this.wxUserInfo.avatarUrl,
+								userId:uni.getStorageSync('bind_id'),
+								mobile:this.bindMobile,
+								linkName:this.bindLinkName,
+								smsCode:this.mobildeCode,
+								unionId:uni.getStorageSync('unionId'),
+								nickName:this.wxUserInfo.nickName,
+								avatarUrl:this.wxUserInfo.avatarUrl,
 						}
-						this.SellerService.SellerBindingOperation(params).then(response =>{
+						this.UserService.BindingWechat(params).then(response =>{
 							this.login(response.data)
 							this.$api.switchTabTo('/pages/tabBar/home/index')
 						}).catch(error =>{

+ 1 - 1
pages/login/bindemail.vue

@@ -133,7 +133,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
-				this.userID = resolve.userID
+				this.userID = resolve.userId
 			})
 		}
 	}

+ 575 - 0
pages/login/binding.vue

@@ -0,0 +1,575 @@
+
+<template>
+	<view class="register" v-show="isRegisterShow">
+		<view class="register-main" v-if="isUserIdentity == 4">
+			<view class="main-form-item">
+				<view class="form-label">联系人</view>
+				<view class="form-text"> {{ clubInfo.linkMan }} </view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">手机号</view>
+				<view class="form-text">{{ clubInfo.contractMobile }}</view>
+			</view>
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-agree">
+					<view class="agree-text">
+						提示:采美销售顾问已帮您填写好注册信息,请确认信息是否正确,点击确认并登录按钮可直接登录采美商城。
+					</view>
+				</view>
+				<view class="register-row">
+					<view class="register-btn sub" @click.stop="SubmitRegister">确认并登录</view>
+				</view>
+			</view>
+		</view>
+		<view class="register-main" v-if="isUserIdentity == 2">
+			<view class="main-form-item">
+				<view class="form-label">联系人</view>
+				<view class="form-text"> {{ clubInfo.linkMan }} </view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">手机号</view>
+				<view class="form-text">{{ clubInfo.contractMobile }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">邮箱</view>
+				<view class="form-text">{{ clubInfo.contractEmail ? clubInfo.contractEmail : '' }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构名称</view>
+				<view class="form-text">{{ clubInfo.name }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构简称</view>
+				<view class="form-text">{{ clubInfo.shortName }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构地址</view>
+				<view class="form-input">{{ clubInfo.provincialAddress }}</view>		
+			</view>
+			<view class="main-form-item">
+				<view class="form-textarea">{{ clubInfo.address }}</view>		
+			</view>
+			<view class="main-form-item">
+				<view class="form-label lang">营业执照编号</view>
+				<view class="form-input lang">{{ clubInfo.socialCreditCode }}</view>		
+			</view>
+			<view class="main-form-item file">
+				<view class="main-form-upload">
+					<view class="label">营业执照</view>
+					<view class="upload-picture">
+						<view class="upload-image"><image :src="clubInfo.businessLicense" mode="" @click="ShowPreviewImage(1)"></image></view>
+					</view>
+				</view>
+				<view class="main-form-upload">
+					<view class="label">门头照</view>
+					<view class="upload-picture">
+						<view class="upload-image"><image :src="clubInfo.shopPhoto" mode=""  @click="ShowPreviewImage(2)"></image></view>
+					</view>	
+				</view>
+			</view>	
+			<view class="main-form-item">
+				<view class="form-label">机构类型</view>
+				<view class="form-text">
+					{{ clubInfo.firstClubType | FirstFormat }}
+					-
+					{{ clubInfo.secondClubType | TwoFormat }}
+				</view>
+			</view>
+			<view class="main-form-item file" v-if="clubInfo.firstClubType == 1">
+				<view class="main-form-upload">
+					<view class="label">资质</view>
+					<view class="upload-picture">
+						<view class="upload-image"><image :src="clubInfo.medicalPracticeLicense" mode=""  @click="ShowPreviewImage(2)"></image></view>
+					</view>	
+				</view>
+			</view>	
+			<view class="main-form-item" v-if="clubInfo.secondClubType == 2">
+				<view class="form-label">科室</view>
+				<view class="form-text">{{ clubInfo.department }}</view>
+			</view>
+			<view class="main-form-item none">
+				<view class="form-label none">主营内容</view>
+				<view class="form-checkbox-group">
+					<view class="form-table-item" v-for="(item, index) in medicaCampList" :key="index">
+						{{ item.name }}
+					</view>
+				</view>
+			</view>
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-agree">
+					<view class="agree-text">
+						提示:采美销售顾问已帮您填写好注册信息,请确认信息是否正确,点击确认并登录按钮可直接登录采美商城。
+					</view>
+				</view>
+				<view class="register-row">
+					<view class="register-btn sub" @click.stop="SubmitRegister">确定</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { mapState,mapMutations } from 'vuex'
+	import { uploadFileImage } from "@/api/utils.js"
+	import authorize from '@/common/config/authorize.js'
+	import wxLogin from "@/common/config/wxLogin.js"
+	export default{
+		data() {
+			return{
+				isRegisterShow:false,
+				isUserIdentity:0,
+				isIphoneX:this.$store.state.isIphone,
+				medicaCampList:[],
+				params:{
+					userId:0,
+					mobile:'',
+					linkName:'',
+					unionId:uni.getStorageSync('unionId'),
+					isCheckSmsCode:1,
+					nickName:'',
+					avatarUrl:'',
+				},
+				clubInfo:{
+					linkMan:'',
+					bindMobile:'',
+					userId:0
+				}
+			}
+		},
+		filters: {
+			
+		},	
+		onLoad(option) {
+			console.log(option)
+			uni.setStorageSync('bind_id', option.userId);
+			this.params.userId = option.userId
+		},
+		filters: {
+			FirstFormat:function(type) {//处理金额
+				let name='';
+				switch(type){
+					case 1: name = '医美'; break;
+					case 2: name = '生美'; break;
+				}	
+				return name;
+			},
+			TwoFormat:function(type) {//处理金额
+				let text='';
+				switch(type){
+					case 1: text = '诊所'; break;
+					case 2: text = '门诊'; break;
+					case 3: text = '医院'; break;
+				}	
+				return text;
+			},
+		},	
+		computed: {
+			...mapState(['isWxAuthorize'])
+		},
+		methods:{
+			...mapMutations(['login','logout']),
+			async getWxAuthorize(){
+				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.login(response.data);
+					this.$store.commit('updateStatus',response.data)
+					uni.setStorageSync('token',response.data.token)
+					uni.setStorageSync('unionId',response.data.unionId)
+					setTimeout(()=>{
+						if(response.data.userIdentity === 1){
+							this.$api.navigateTo('/seller/pages/index/index')
+						}else if(response.data.userIdentity === 2 || response.data.userIdentity === 4){
+							this.$api.switchTabTo('/pages/tabBar/user/user')
+						}else if(response.data.userIdentity === 3){
+							this.$api.navigateTo('/supplier/pages/index/index')
+						}else{
+							this.GetClubUserInfo(this.params.userId)
+							this.isRegisterShow= true
+						}
+					},1000)
+				})
+				.catch(error =>{
+					this.logout()
+					uni.setStorageSync('unionId',error.data.unionId)
+					this.$store.commit('updateStatus',error.data)
+					this.GetClubUserInfo(this.params.userId)
+					this.isRegisterShow = true
+				})
+			},	
+			SubmitRegister(){//微信用户帮机构运营人员
+				const userInfo = uni.getStorageSync('wechatUserInfo')
+				this.params.nickName = userInfo.nickName
+				this.params.avatarUrl = userInfo.avatarUrl
+				this.UserService.BindingWechat(this.params)
+				.then(response =>{
+					this.login(response.data)
+					this.$api.switchTabTo('/pages/tabBar/home/index')
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+					this.isUserInfo = true
+				})			
+			},
+			GetClubUserInfo(userId){
+				this.UserService.OrganizationUpdateModifyInfo({userId:userId})
+				.then(response =>{
+					this.isUserIdentity = response.data.user.userIdentity
+					this.clubInfo = response.data.club
+					this.params.mobile = this.clubInfo.contractMobile
+					this.params.linkName = this.clubInfo.linkMan
+					if(this.clubInfo.mainProduct){
+						this.medicaCampList = this.ArrayFormat(this.clubInfo.mainProduct)
+					}
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ArrayFormat(Array) {//处理金额
+				const newArray = []
+				Array.split('/').forEach((item,index) =>{
+					let _OBJ = {value:(index+1).toString(),name:item,checked:true}
+					newArray.push(_OBJ)
+				})
+				return newArray
+			}
+		},
+		onShow() {
+			authorize.checkLogin().then(res => {
+				this.getWxAuthorize()
+			})
+			.catch(err => {
+				this.isRegisterShow= true
+				this.$api.navigateTo('/pages/authorization/authorization')
+			})
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: auto;
+	}
+	.register{
+		width: 100%;
+		position: relative;
+		box-sizing: border-box;
+		padding-bottom: 411rpx;
+		.register-main{
+			width: 100%;
+			height: auto;
+			box-sizing: border-box;
+			padding: 0 24rpx;
+			margin-top: 24rpx;
+			.main-form-item{
+				width: 100%;
+				height: 88rpx;
+				box-sizing: border-box;
+				padding: 13rpx 0;
+				border-bottom: 1px solid #e1e1e1;
+				margin-top: 10rpx;
+				position: relative;
+				&.none{
+					border-bottom: none;
+					height: auto;
+				}
+				&.file{
+					height: 273rpx;
+					border-bottom: none;
+					.main-form-upload{
+						width: 50%;
+						height: 100%;
+						float: left;
+						.label{
+							width: 100%;
+							float: left;
+							height: 56rpx;
+							line-height: 56rpx;
+							font-size: $font-size-28;
+							text-align: left;
+							color: #999999;
+						}
+						.upload-picture{
+							width: 100%;
+							height: 180rpx;
+							float: left;
+							margin-top: 17rpx;
+							.upload-none{
+								width: 200rpx;
+								height: 180rpx;
+								border-radius: 6rpx;
+								border:1px solid #e1e1e1;
+								box-sizing: border-box;
+								padding-top: 64rpx;
+								.icon-jiahao{
+									display: inline-block;
+									width: 100%;
+									text-align: center;
+									line-height: 48rpx;
+									font-size: 40rpx;
+									color: #b2b2b2;
+								}
+								.upload-text{
+									display: inline-block;
+									width: 100%;
+									text-align: center;
+									line-height: 40rpx;
+									font-size: $font-size-24;
+									color: #b2b2b2;
+								}
+							}
+							.upload-image{
+								width: 200rpx;
+								height: 180rpx;
+								border-radius: 6rpx;
+								border:1px solid #e1e1e1;
+								box-sizing: border-box;
+								position: relative;
+								image{
+									width: 200rpx;
+									height: 180rpx;
+									display: block;
+								}
+								.upload-del{
+									width: 40rpx;
+									height: 40rpx;
+									position: absolute;
+									top: -20rpx;
+									right: -20rpx;
+									line-height: 40rpx;
+									text-align: center;
+									.iconfont{
+										font-size: $font-size-32;
+										color: #999999;
+									}
+								}
+							}
+						}
+					}
+				}
+				&.picker{
+					border-bottom: none;
+					.label-radio{
+						margin-left: 30rpx;
+						font-size: $font-size-28;
+						float: left;
+					}
+					.row-radio{
+						float: left;
+						transform: scale(0.7);
+					}
+					.row-text{
+						text-align: center;
+						float: left;
+						font-size: $font-size-28;
+					}
+					.picker-radio{
+						box-sizing: border-box;
+						padding-left: 180rpx;
+						.secondTyperadio{
+							border: 2rpx solid #e1e1e1;
+							display: inline-block;
+							font-size: 26rpx;
+							color: #999999;
+							padding: 0 24rpx;
+							border-radius: 22rpx;
+							line-height: 42rpx;
+							margin-right: 56rpx;
+							float: left;
+							&.active{
+								border: 2rpx solid #ffe6dc;
+								color: $color-system;
+							}
+						}	
+					}
+				}
+				&.textarea{
+					height: 142rpx;
+					.textarea{
+						width: 100%;
+						height: 142rpx;
+						box-sizing: border-box;
+						font-size: $font-size-28;
+						color: $text-color;
+						z-index: 1;
+					}
+					.textarea.hide{
+						opacity: 0;
+					}
+					.textarea.show{
+						color: #999999;
+					}
+				}
+				.textarea-ke{
+					width: 100%;
+					height: 160rpx;
+					border-radius: 6rpx;
+					border: 1px solid #e1e1e1;
+					font-size: $font-size-28;
+					box-sizing: border-box;
+					padding: 15rpx 20rpx;
+				}
+				.form-textarea{
+					font-size: $font-size-28;
+					color: #333333;
+				}
+				.form-label{
+					width: 148rpx;
+					float: left;
+					height: 100%;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #999999;
+					&.lang{
+						width: 188rpx;
+					}
+					&.none{
+						width: 100%;
+					}
+				}
+				.form-input{
+					width: 554rpx;
+					height: 56rpx;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #333333;
+					float: left;
+					&.lang{
+						width: 514rpx;
+					}
+					&.phone{
+						width: 418rpx;
+					}
+				}
+				.form-text{
+					width: 554rpx;
+					height: 56rpx;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #333333;
+					float: left;
+				}
+				.form-btn{
+					width: 136rpx;
+					height: 56rpx;
+					background: $btn-confirm;
+					color: #FFFFFF;
+					font-size: $font-size-28;
+					text-align: center;
+					border-radius: 28rpx;
+					line-height: 56rpx;
+					float: left;
+				}
+				.icon-xiayibu{
+					width: 80rpx;
+					height: 80rpx;
+					position: absolute;
+					right: 0;
+					top: 0;
+					line-height: 80rpx;
+					text-align: center;
+					color: #b2b2b2;
+				}
+				.form-checkbox-group {
+					width: 100%;
+					float: left;
+					.form-table-item{
+						height: 48rpx;
+						padding: 0 32rpx;
+						border: 1px solid #b2b2b2;
+						text-align: center;
+						font-size: $font-size-28;
+						color: #333333;
+						float: left;
+						line-height: 48rpx;
+						border-radius: 26rpx;
+						margin-right: 12rpx;
+						margin-top: 20rpx;
+					}
+				}
+				.form-checkbox-input{
+					width: 100%;
+					height: 64rpx;
+					margin-top: 20rpx;
+					.checkbox-input{
+						width: 518rpx;
+						height: 64rpx;
+						box-sizing: border-box;
+						text-align: left;
+						font-size: $font-size-26;
+						color: #333333;
+						line-height: 64rpx;
+						float: left;
+						border: 1px solid #e1e1e1;
+						border-radius: 32rpx;
+						padding: 0 20rpx;
+					}
+					.checkbox-btn{
+						width: 160rpx;
+						height: 64rpx;
+						border-radius: 32rpx;
+						background-color: #ffe6dc;
+						line-height: 64rpx;
+						text-align: center;
+						color: #e15616;
+						font-size: $font-size-28;
+						float: right;
+					}
+				}
+			}
+			.register-fiexd{
+				width: 100%;
+				height: auto;
+				padding: 20rpx 0;
+				position: fixed;
+				bottom: 0;
+				left: 0;
+				z-index: 888;
+				background: #FFFFFF;
+				.register-agree{
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					margin:0 0 32rpx 0;
+					box-sizing: border-box;
+					padding: 0 105rpx;
+					.agree-text{
+						font-size: 20rpx;
+						line-height: 38rpx;
+						color: #fea785;
+					}
+				}
+			}
+			.register-btn{
+				width: 702rpx;
+				height: 88rpx;
+				border-radius: 44rpx;
+				font-size: $font-size-28;
+				line-height: 88rpx;
+				color: #FFFFFF;
+				margin: 0 auto;
+				text-align: center;
+				background: $btn-confirm;
+				margin-top: 96rpx;
+				&.none{
+					background: #FFFFFF;
+					color: $text-color;
+					margin-top: 0;
+				}
+				&.sub{
+					margin-top: 0;
+				}
+			}
+		}
+	}
+</style>

+ 69 - 65
pages/login/bindwechat.vue

@@ -46,7 +46,7 @@
 			<view class="login-form clearfix">
 				<view class="login-input code">
 					<input type="number" 
-						   v-model="mobildeCode"  
+						   v-model="smsCode"  
 						   maxlength="6" 
 						   class="input" 
 						   placeholder="请输入短信验证码"
@@ -72,17 +72,17 @@
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { bindingWechat } from "@/api/use.js"
 	import { getbindWechatCode } from "@/api/utils.js"
 	export default{
 		data() {
 			return{
 				userIdentity:'',
-				userID:'',
+				userId:'',
+				unionId:'',
 				bindMobile:'',
 				bindLinkName:'',  		//用户姓名
 				bindLinkPhone:'',  		//用户手机号
-				mobildeCode:'',  		//手机验证码
+				smsCode:'',  		//手机验证码
 				imageCode:'',			//图形验证码
 				imageCodeUrl:'',		//图形验证码地址
 				imageCodetoken:'',		//图形校验token
@@ -113,11 +113,11 @@
 					this.$util.msg('请输入正确的手机号',2000)
 					return
 				}
-				if( this.mobildeCode == ''){
+				if( this.smsCode == ''){
 					this.$util.msg('请输入手机验证码',2000)
 					return
 				}
-				if(!this.$reg.isMobileCode(this.mobildeCode)){
+				if(!this.$reg.isMobileCode(this.smsCode)){
 					this.$util.msg('验证码格式不正确',2000)
 					return
 				}
@@ -144,72 +144,73 @@
 				}
 				let params = {
 						mobile:this.bindLinkPhone,
-						mobileOrEmail:this.bindMobile,
+						bindMobile:this.bindMobile,
 						platformType:2,
+						isCheckCaptcha:0,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
 				}
 				this.isMobileDisabled = true;
-				getbindWechatCode(params).then(res =>{
-					const TIME_COUNT = 60;
-					this.$util.msg('验证短信已发送',2000)
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
-						this.isMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.mobileCodeText = this.count +'s重新发送'
-			        		} else {
-				         		this.isMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
-								this.mobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}
-				}).catch( error =>{
-					this.$util.msg(error.msg,2000)
-					this.isMobileDisabled = false;
-				})
+				this.PublicService.GetBindMobileCode(params)
+					.then(res =>{
+						const TIME_COUNT = 60;
+						this.$util.msg('验证短信已发送',2000)
+				     	if (!this.codeTime) {
+				       		this.count = TIME_COUNT;
+							this.isMobileDisabled = true;
+				       		this.codeTime = setInterval(() => {
+				       			if (this.count > 1 && this.count <= TIME_COUNT) {
+				         			this.count--
+				         			this.mobileCodeText = this.count +'s重新发送'
+				        		} else {
+					         		this.isMobileDisabled = false;
+					         		clearInterval(this.codeTime)
+					         		this.codeTime = null
+									this.mobileCodeText = '获取验证码'
+				        		}
+				       		},1000)
+				      	}
+					})
+					.catch( error =>{
+						this.$util.msg(error.msg,2000)
+						this.isMobileDisabled = false;
+					})
 			},
 			bindingWechatLogin(){//获取用户基本信息登录
-				wx.getUserInfo({
-					success: res => {
-						this.isUserInfo = false;
-						this.userInfo = res.userInfo;
-						let params ={
-								userID:this.userID,
-								mobile:this.bindLinkPhone,
-								linkName:this.bindLinkName,
-								verificationCode:this.mobildeCode,
-								nickName:res.userInfo.nickName,
-								headimgurl:res.userInfo.avatarUrl,
-						}
-						// console.log(params)
-						bindingWechat(params).then(response =>{
-							if(this.userIdentity === 3){
-								this.$api.navigateTo('/supplier/pages/index/index')
-							}else{
-								switch(this.isLoginType){
-									case 9:
-										this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
-										break;
-									case 8:
-										this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
-										break;
-									case 7:
-										this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.isLoginOrderId}`)
-										break;
-									default:
-										this.$api.switchTabTo('/pages/tabBar/user/user')
-								}
+				const userInfo = uni.getStorageSync('wechatUserInfo')
+				this.isUserInfo = false;
+				let params ={
+						userId:this.userId,
+						mobile:this.bindLinkPhone,
+						linkName:this.bindLinkName,
+						smsCode:this.smsCode,
+						unionId:this.unionId,
+						nickName:userInfo.nickName,
+						avatarUrl:userInfo.avatarUrl,
+				}
+				this.UserService.BindingWechat(params)
+					.then(response =>{
+						if(this.userIdentity === 3){
+							this.$api.navigateTo('/supplier/pages/index/index')
+						}else{
+							switch(this.isLoginType){
+								case 9:
+									this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+									break;
+								case 8:
+									this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
+									break;
+								case 7:
+									this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.isLoginOrderId}`)
+									break;
+								default:
+									this.$api.switchTabTo('/pages/tabBar/user/user')
 							}
-						}).catch(error =>{
-							this.$util.msg(error.msg,2000)
-						})							
-					}
-				})
+						}
+					})
+					.catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})							
 			},
 			//关闭未授权用户授权提示弹窗
 			hideModel(){
@@ -218,7 +219,10 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
-				this.userID = resolve.userID
+				console.log(resolve)
+				this.unionId = resolve.unionId
+				console.log(this.unionId)
+				this.userId = resolve.userId
 				this.bindMobile = resolve.bindMobile
 				this.userIdentity = resolve.userIdentity
 			})

+ 145 - 130
pages/login/information.vue

@@ -8,7 +8,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">联系人</view>
-					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" placeholder-class="placeholder" maxlength="6"/>
+					<input class="row-input" type="text" v-model="linkMan" placeholder="请输入联系姓名" placeholder-class="placeholder" maxlength="6"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -18,27 +18,26 @@
 				</view>
 			</view>
 		</view>
-		<view class="register-main clearfix" >
-			<!-- v-if="userIdentity === 2"  -->
+		<view class="register-main clearfix" v-if="userIdentity === 2">
 			<view class="register-row">
 				<view class="register-title">升级信息</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">邮箱</view>
-					<input class="row-input" type="text" name="input" v-model="email" placeholder="请输入邮箱地址"placeholder-class="placeholder" maxlength="30"/>
+					<input class="row-input" type="text" name="input" v-model="contractEmail" placeholder="请输入邮箱地址"placeholder-class="placeholder" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构名称</view>
-					<input class="row-input" type="text" v-model="clubName" placeholder="请输入您的机构名称" placeholder-class="placeholder" maxlength="30"/>
+					<input class="row-input" type="text" v-model="name" placeholder="请输入您的机构名称" placeholder-class="placeholder" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称</view>
-					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" placeholder-class="placeholder" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shortName" placeholder="请输入您的机构简称" placeholder-class="placeholder" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -75,11 +74,11 @@
 				<view class="register-picture">
 					<view class="label">营业执照</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage == ''"  @click="chooseBusinessImage">
+						<view class="upload-none" v-if="businessLicense == ''"  @click="chooseBusinessImage">
 							<image src="https://static.caimei365.com/app/img/upload/club-zizhi.png"></image>
 						</view>
 						<view class="upload-image" v-else>
-							<image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="businessLicense" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -91,11 +90,11 @@
 				<view class="register-picture">
 					<view class="label">门头照</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMentuzImage == ''" @click="chooseMentuzImage">
+						<view class="upload-none" v-if="shopPhoto == ''" @click="chooseMentuzImage">
 							<image src="https://static.caimei365.com/app/img/upload/club-door.png"></image>
 						</view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMentuzImage" mode=""  @click="viewMentuzImage"></image>
+							<image :src="shopPhoto" mode=""  @click="viewMentuzImage"></image>
 							<view class="upload-del" @click="delMentuzImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -109,28 +108,28 @@
 					<view class="row-input">
 						<radio-group @change="bindPickerChange">
 							 <label class="label-radio" v-for="(item, index) in typename" :key="item.value">
-								 <radio class="row-radio" :value="item.value" :checked="item.value === isOrganizationType" color='#E15616'/>{{item.name }}
+								 <radio class="row-radio" :value="item.value" :checked="item.value === firstClubType" color='#E15616'/>{{item.name }}
 							 </label>
 						</radio-group>
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="firstClubType == 1">
 				<view class="register-from bordernone second" >
 					<view class="secondTyperadio" v-for="(item,index) in beautyList" :key="item.value" @click="radioChange(item)" :class="item.value==secondClubType?'active':''">
 						<view class="secondRadio" >{{item.name}}</view>
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="firstClubType == 1">
 				<view class="register-picture zz">
 					<view class="label zz">医疗执业许可证</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage == ''||uploadMedicalImage == null" @click="chooseMedicalImage">
+						<view class="upload-none" v-if="medicalPracticeLicense == ''||medicalPracticeLicense == null" @click="chooseMedicalImage">
 							<image src="https://static.caimei365.com/app/img/upload/club-yiliao.png"></image>
 						</view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
+							<image :src="medicalPracticeLicense" mode=""  @click="viewMedicalImage"></image>
 							<view class="upload-del" @click="delMedicalImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -144,13 +143,13 @@
 					<textarea class="keshi"  placeholder="请填写经营的科室,至少三个,用逗号隔开" placeholder-style="placeholder" v-model="department" maxlength="16"></textarea>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="firstClubType == 1">
 				<view class="register-from group bordernone">
 					<view class="label">主营内容</view>
 					<view class="content-class">
 						<checkbox-group @change="chooseMaleLike" >
 							<label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
-							   <checkbox :value="item.value"></checkbox>
+							   <checkbox class="item-checkbox" :value="item.value"></checkbox>
 							   <text class="item-text">{{item.name}}</text>
 							</label>
 						</checkbox-group>
@@ -174,13 +173,13 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 2">
+			<view class="register-row clearfix" v-if="firstClubType == 2">
 				<view class="register-from group">
 					<view class="label">主营内容</view>
 					<view class="content-class">
 						<checkbox-group @change="chooseMaleLikes">
 							<label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
-							   <checkbox :value="item.value"></checkbox>
+							   <checkbox class="item-checkbox" :value="item.value"></checkbox>
 							   <text class="item-text">{{item.name}}</text>
 							</label>
 						</checkbox-group>
@@ -231,7 +230,7 @@
 				<view class="label">公司介绍</view>
 					<textarea 	class="textarea" 
 								type="text" 
-								v-model="companyPprofile" 
+								v-model="profile" 
 								placeholder="请填写公司简介,最多500字" 
 								placeholder-class="placeholder"
 								maxlength="500"
@@ -270,30 +269,30 @@
 				isIphoneX:this.$store.state.isIphoneX,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isPreviewImage:false,   	//预览图片开关
-				userID:'',					//用户ID
-				clubID:'',					//会所ID
+				userId:'',					//用户ID
+				clubId:'',					//会所ID
 				userIdentity:'',			//机构用户类型
-				email:'',					//邮箱
-				clubName:'',	 			//机构名称
-				abbreviation:'',	 		//机构简称
-				clubContact:'',	 			//联系人
+				contractEmail:'',					//邮箱
+				name:'',	 			//机构名称
+				shortName:'',	 		//机构简称
+				linkMan:'',	 			//联系人
 				mobile:'',					//联系人手机号
 				socialCreditCode:'',	//统一社会信用代码
 				isDisabled:true,
 				isShowInput:true,
 				textareaFocus:false,
-				uploadBusinessImage:'',	//营业执照图片
-				uploadMentuzImage:'',  	//门头照图片
-				uploadMedicalImage:'', 	//资质照图片
+				businessLicense:'',	//营业执照图片
+				shopPhoto:'',  	//门头照图片
+				medicalPracticeLicense:'', 	//资质照图片
 				department:'',			//科室
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
-				mainpro:'',				//主营内容
+				mainProduct:'',				//主营内容
 				clubTelePhone:'',		//固定电话
 				clubFax:'',				//传真
-				companyPprofile:'',		//公司简介
+				profile:'',		//公司简介
 				firstClubType:'',		//机构类型
-				isOrganizationType:0,
+				firstClubType:0,
 				organizationTypeText:'请选择机构类型',
 				beautyList:beautyList,
 				mentuzCampNullList:mentuzCampNullList,
@@ -308,14 +307,14 @@
 				isMainproCheck:false,
 				addressData:{
 					address:'请选择机构所在地区',
-					townID:'',			//区ID
-					cityID:'',			//市ID
-					provinceID:'',		//省ID
+					townId:'',			//区ID
+					cityId:'',			//市ID
+					provinceId:'',		//省ID
 					addressDetail: '',	//地址详情
 				},
 				typename:[
-					{name:'医美',value:'1'},
-					{name:'生美',value:'2'}
+					{name:'医美',value:1},
+					{name:'生美',value:2}
 				],
 			}	
 		},
@@ -332,76 +331,76 @@
 			},
 			organizationInfo(){
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					this.UserService.OrganizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+					this.userId = resolve.userId ? resolve.userId : 0
+					this.UserService.OrganizationUpdateModifyInfo({userId:this.userId}).then(response =>{
 						let organizationClub = response.data.club
 						let organizationUser = response.data.user
-						this.email = organizationUser.email ? organizationUser.email :''	
-						this.clubID = organizationUser.clubID
+						this.contractEmail = organizationClub.contractEmail ? organizationClub.contractEmail : organizationClub.email	
+						this.clubId = organizationUser.clubId
 						this.userIdentity = organizationUser.userIdentity
-						this.clubName = organizationClub.name ? organizationClub.name : ''
-						this.clubContact = organizationClub.linkMan1
+						this.name = organizationClub.name ? organizationClub.name : ''
+						this.linkMan = organizationClub.linkMan
 						this.mobile = organizationUser.bindMobile ? organizationUser.bindMobile : ''
-						this.abbreviation = this.$reg.checkData(organizationClub.sname)
-						if( organizationClub.provinceID == null ){
-							this.addressData.provinceID = ''
+						this.shortName = this.$reg.checkData(organizationClub.shortName)
+						if( organizationClub.provinceId == null ){
+							this.addressData.provinceId = ''
 						}else{
-							this.addressData.provinceID = organizationClub.provinceID
+							this.addressData.provinceId = organizationClub.provinceId
 						}
-						if( organizationClub.cityID == null ){
-							this.addressData.cityID = ''
+						if( organizationClub.cityId == null ){
+							this.addressData.cityId = ''
 						}else{
-							this.addressData.cityID = organizationClub.cityID
+							this.addressData.cityId = organizationClub.cityId
 						}
-						if( organizationClub.townID == null ){
-							this.addressData.townID = ''
+						if( organizationClub.townId == null ){
+							this.addressData.townId = ''
 						}else{
-							this.addressData.townID = organizationClub.townID
+							this.addressData.townId = organizationClub.townId
 						}
 						this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
 						this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
 						this.firstClubType = organizationClub.firstClubType
 						this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
 						this.addressData.address =  organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
-						this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage)
-						this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
-						this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
+						this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
+						this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
+						this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
 						this.department = organizationClub.department						
 						this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
 						this.clubFax = this.$reg.checkData(organizationClub.fax)
-						this.companyPprofile = this.$reg.checkData(organizationClub.info)
+						this.profile = this.$reg.checkData(organizationClub.profile)
 						//机构类型&&主营项目
 						switch(this.firstClubType){
-							case '1':
+							case 1:
 								this.organizationTypeText = '医美'
-								this.isOrganizationType = 1
+								this.firstClubType = 1
 								break;
-							case '2':
+							case 2:
 								this.organizationTypeText = '生美'
-								this.isOrganizationType = 2
+								this.firstClubType = 2
 								break;
 							case null:
 								this.organizationTypeText = '请选择机构类型'
-								this.isOrganizationType = 0
+								this.firstClubType = 0
 								break;
 						}	
-						if(organizationClub.mainpro == "" || organizationClub.mainpro == null){
+						if(organizationClub.mainProduct == "" || organizationClub.mainProduct == null){
 							this.mentuzCampList = this.mentuzCampNullList
 							this.medicaCampList = this.medicaCampNullList
 						}else{
-							if(this.firstClubType == '1'){
-								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+							if(this.firstClubType == 1){
+								this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
 								this.medicaCampList = this.medicaCampNullList
 							}else{
-								this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+								this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
 								this.mentuzCampList = this.mentuzCampNullList
 							}
 						}
 						//机构类型
 						switch(this.secondClubType){
-							case '1':this.current = 0;break;
-							case '2':this.current = 1;this.isDepartment=true;break;
-							case '3':this.current = 2;this.isDepartment=true;break;
+							case 1:this.current = 0;break;
+							case 2:this.current = 1;this.isDepartment=true;break;
+							case 3:this.current = 2;this.isDepartment=true;break;
 						}
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -412,17 +411,17 @@
 				let params = {}
 				if(this.userIdentity === 4){
 					 params = {
-							userID:this.userID,
-							clubID:this.clubID,					//会所ID
-							linkMan1:this.clubContact,
+							userId:this.userId,
+							clubId:this.clubId,					//会所ID
+							linkMan:this.linkMan,
 							fax:this.clubFax,
 							contractPhone:this.clubTelePhone,
-							info : this.companyPprofile,
+							profile : this.profile,
 						}		
 				}else{
 					if(!this.isMainproCheck){
 						let mainproList = []
-						if(this.firstClubType == '1'){
+						if(this.firstClubType == 1){
 							this.mentuzCampList.forEach(item =>{
 								mainproList.push(item.name)
 							})
@@ -431,30 +430,30 @@
 								mainproList.push(item.name)
 							})
 						}
-						this.mainpro = mainproList.join('/')
+						this.mainProduct = mainproList.join('/')
 					}
 					params 	= {
-							userID:this.userID,
-							clubID:this.clubID,					//会所ID
-							name:this.clubName,
-							linkMan1:this.clubContact,
-							sname:this.abbreviation,
-							contractEmail1:this.email,
-							provinceID:this.addressData.provinceID,
-							cityID:this.addressData.cityID,
-							townID:this.addressData.townID,
+							userId:this.userId,
+							clubId:this.clubId,					//会所ID
+							name:this.name,
+							linkMan:this.linkMan,
+							shortName:this.shortName,
+							contractEmail:this.contractEmail,
+							provinceId:this.addressData.provinceId,
+							cityId:this.addressData.cityId,
+							townId:this.addressData.townId,
 							address:this.addressData.addressDetail,
 							socialCreditCode:this.socialCreditCode,
-							businessLicenseImage:this.uploadBusinessImage,
-							headpic:this.uploadMentuzImage,
-							firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
+							businessLicense:this.businessLicense,
+							shopPhoto:this.shopPhoto,
+							firstClubType:this.firstClubType, //机构类型分类 医美:0和生美:1
 							secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
 							department:this.department,				//科室
-							medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-							mainpro:this.mainpro,
+							medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
+							mainProduct:this.mainProduct,
 							fax:this.clubFax,
 							contractPhone:this.clubTelePhone,
-							info : this.companyPprofile
+							profile : this.profile
 					}
 				}
 				this.UserService.OrganizationUpdate(params).then(response =>{
@@ -473,9 +472,9 @@
 			},
 			onConfirm(e) {
 				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
+				this.addressData.townId = e.townCode;
+				this.addressData.cityId = e.cityCode;
+				this.addressData.provinceId = e.provinceCode;
 			},	
 			onTextareaInput(e){//文本框获取焦点
 			   this.addressData.addressDetail = e.detail.value;
@@ -489,31 +488,31 @@
 				this.textareaFocus = false
 			},
 			onTextareaInputInfo(e){
-			   this.companyPprofile = e.detail.value;
+			   this.profile = e.detail.value;
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadBusinessImage = JSON.parse(res.data).data
+					this.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			chooseMentuzImage() {//门头照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMentuzImage = JSON.parse(res.data).data
+					this.shopPhoto = JSON.parse(res.data).data
 				})
 			},
 			chooseMedicalImage() {//资质照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMedicalImage = JSON.parse(res.data).data
+					this.medicalPracticeLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
-				this.myPreviewImageFn(this.uploadBusinessImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			viewMentuzImage(e) {
-				this.myPreviewImageFn(this.uploadMentuzImage)
+				this.myPreviewImageFn(this.shopPhoto)
 			},
 			viewMedicalImage(e) {
-				this.myPreviewImageFn(this.uploadMedicalImage)
+				this.myPreviewImageFn(this.medicalPracticeLicense)
 			},
 			myPreviewImageFn(url){
 				this.isPreviewImage = true
@@ -526,27 +525,27 @@
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.uploadBusinessImage = ''
+					 this.businessLicense = ''
 				})
 			},
 			delMentuzImage(){
 				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
-					this.uploadMentuzImage = ''
+					this.shopPhoto = ''
 				})
 			},			
 			delMedicalImage(){
 				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
-					this.uploadMedicalImage = ''
+					this.medicalPracticeLicense = ''
 				})
 			},
 			bindPickerChange(e) {
-				this.isOrganizationType = e.target.value;
+				this.firstClubType = e.target.value;
 				// let self = this
 				// uni.showActionSheet({
 				// 	title:'标题',
 				// 	itemList: ['医美', '生美'],
 				// 	success: (e) => {
-				// 		self.isOrganizationType = e.tapIndex+1
+				// 		self.firstClubType = e.tapIndex+1
 				// 		switch(e.tapIndex){
 				// 			case 0:
 				// 				this.organizationTypeText = '医美'
@@ -561,11 +560,11 @@
 			},
 			bindPickerChange2(e) {
 				this.typtIndex = e.target.value
-				this.isOrganizationType = e.target.value
+				this.firstClubType = e.target.value
 			},
 			radioChange(item) {
 				this.secondClubType =item.value;
-				if( this.secondClubType == '2' || this.secondClubType == '3'){
+				if( this.secondClubType == 2 || this.secondClubType == 3){
 					this.isDepartment = true
 				}else{
 					this.isDepartment = false
@@ -596,6 +595,7 @@
 						this.$set(item,'checked',false)
 					}
 				})
+				console.log(list)
 				return arr.join('/')
 			},
 			onBlurInput(e){//
@@ -614,38 +614,38 @@
 					let _OBJ = {value:(index+1).toString(),name:item,checked:true}
 					_ARRAY.push(_OBJ)
 				})
+				console.log(_ARRAY)
 				return _ARRAY
 			},
 			addCustomItem(){
 				if(this.customItemValue==''){
 					this.$util.msg('请输入自定义项目',2000);
+				}else{
+					if(this.firstClubType == 1){
+						let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
+						if(this.checkedArray(this.customItemValue,this.mentuzCampList)){
+							this.$util.msg('主营内容已存在!',2000)
+						}else{
+							this.mentuzCampList.push(item)
+						}
 					}else{
-						if(this.isOrganizationType == 1){
-							let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
-							if(this.checkedArray(this.customItemValue,this.mentuzCampList)){
-								this.$util.msg('主营内容已存在!',2000)
-							}else{
-								this.mentuzCampList.push(item)
-							}
+						let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
+						if(this.checkedArray(this.customItemValue,this.medicaCampList)){
+							this.$util.msg('主营内容已存在!',2000)
 						}else{
-							let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
-							if(this.checkedArray(this.customItemValue,this.medicaCampList)){
-								this.$util.msg('主营内容已存在!',2000)
-							}else{
-								this.medicaCampList.push(item)
-							}
+							this.medicaCampList.push(item)
 						}
 					}
+				}
 			},
 			checkedArray(content,arr){//判断主营内容是否已存在
-			console.log(content,arr)
-					 for(var i in arr){
-							if(arr[i].name == content){
-								return true;
-							}
-						}
-			           return false;
-			       },
+				for(var i in arr){
+					if(arr[i].name == content){
+						return true;
+					}
+				}
+				return false;
+		   },
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
@@ -933,9 +933,24 @@
 						  box-sizing: border-box;
 						  float: left;
 						}
+						.item-checkbox{
+							display: none;
+						}
+						.item-text{
+							border: 2rpx solid #e1e1e1;
+							display: inline-block;
+							font-size: 26rpx;
+							color: #999999;
+							padding: 0 30rpx;
+							border-radius: 28rpx;
+							line-height: 50rpx;
+							float: left;
+						}
 						.on {
-						  border-color: $color-system;
-						  color:$color-system;
+							.item-text{
+								border-color: $color-system;
+								color:$color-system;
+							}
 						}
 					}
 				}

+ 44 - 43
pages/login/login.vue

@@ -6,15 +6,15 @@
 		<view class="login-form">
 			<view class="login-input">
 				<input type="text" 
-					   v-model="accountNumber"  
+					   v-model="params.mobileOrEmail"  
 					   maxlength="30" 
 					   class="input" 
 					   placeholder="请输入邮箱/手机号"
 				/>
 			</view>
 			<view class="login-input">
-				<input v-show="isShowEye" type="text" v-model="password"  maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
-				<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
+				<input v-show="isShowEye" type="text" v-model="params.password"  maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
+				<input v-show="!isShowEye" type="password" v-model="params.password"  :password="true" maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
 				<view class="iconfont" :class="isShowEye ? iconEyen : iconEyes"  @click="passwordClick"></view>
 			</view>
 			<view class="login-input link">
@@ -38,17 +38,12 @@
 				isShowEye:false,
 				iconEyes:'icon-yanjing_yincang_o',
 				iconEyen:'icon-yanjing_xianshi_o',
-				accountNumber:'',  //用户登录账号
-				password:'',	   //用户登录密码	
-				toestText:'',
-				telPhone:'',
-				loginType:'',		//跳转类型
-				alertText:'',
-				listType: '',
-				listVal: '',
-				detilType:'',
-				id:'',			//商品ID
-				getOption:''	//页面传递参数
+				getOption:'',	//页面传递参数
+				params:{
+					mobileOrEmail:'',//用户登录账号
+					password:'',//用户登录密码	
+					unionId:''
+				}
 			}
 		},
 		onLoad(option) {
@@ -59,37 +54,38 @@
 		},
 		methods:{
 			...mapMutations(['login']),
-			confirmLogin(){
-				if( this.accountNumber == ''){
+			async confirmLogin(){
+				if( this.params.mobileOrEmail == ''){
 					this.$util.msg('请输入账户名',2000)
 					return
 				}
-				if( this.password == ''){
+				if( this.params.password == ''){
 					this.$util.msg('请输入密码',2000)
 					return
 				}
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.AorganizationLogin()
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=0')
-					}
+				authorize.checkLogin()
+				.then(res => {
+					this.AorganizationLogin()
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=0')
 				})
 			},
 			AorganizationLogin(){
-				this.UserService.AorganizationLogin({mobileOrEmail:this.accountNumber,password:this.password,source:'www'}).then(response =>{
-					if(response.code === 0){
-						this.storeUpdataeStatus(response.data)
-						this.$api.navigateTo(`/pages/login/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
-					}else if(response.code === -3){
-						this.$util.modal('','您的企业账号审核未通过,请修改资料','前往修改','',false,() =>{
-							this.$store.commit('updateStatus',response.data)
-							this.$api.navigateTo('/pages/login/apply-supplier')
-						})
-					}else{
-						this.$util.msg(response.msg,2000);
-					}
-				})
+				this.UserService.AorganizationLogin(this.params)
+					.then(response =>{
+						if(response.code === 0){
+							this.storeUpdataeStatus(response.data)
+							this.$api.navigateTo(`/pages/login/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
+						}else if(response.code === -3){
+							this.$util.modal('','您的企业账号审核未通过,请修改资料','前往修改','',false,() =>{
+								this.$store.commit('updateStatus',response.data)
+								this.$api.navigateTo('/pages/login/apply-supplier')
+							})
+						}else{
+							this.$util.msg(response.msg,2000);
+						}
+					})
 			},
 			storeUpdataeStatus(data){
 				uni.setStorageSync('token',data.token)
@@ -99,16 +95,21 @@
 			passwordClick() { //密码显隐操作
 				this.isShowEye = !this.isShowEye;
 			},
-		},
-		onShow() {
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse == 1){
+			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
+				authorize.checkLogin()
+				.then(res => {
 					wxLogin.wxLoginQuick()
-					console.log(this.isLoginType)
-				}else{
+				})
+				.catch(err => {
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				}	
+				})
+			}
+		},
+		onShow() {
+			this.$api.getStorage().then((resolve) =>{
+				this.params.unionId = resolve.unionId
 			})
+			this.InitAuthorize()
 		}
 	}
 </script>

+ 34 - 37
pages/login/logincode.vue

@@ -22,11 +22,11 @@
 	import authorize from '@/common/config/authorize.js'
 	import wxLogin from "@/common/config/wxLogin.js"
 	import {mapState,mapMutations } from 'vuex';
-	import { invitationCodeLogin  } from '@/api/use.js'
 	export default{
 		data() {
 			return{
 				invitationCode:'',  //获取用户登录的邀请码
+				unionId:'',
 			}
 		},
 		onLoad(option) {
@@ -38,49 +38,46 @@
 		methods:{
 			...mapMutations(['login']),
 			goLogin() {
+				const userInfo = uni.getStorageSync('wechatUserInfo')
 				if( this.invitationCode == ''){
 					this.$util.msg('请输入邀请码',2000)
 					return
 				}
-				wx.getUserInfo({
-					success: res => {
-						this.isUserInfo = false
-						this.userInfo = res.userInfo;
-						let params ={
-								invitationCode:this.invitationCode,
-								nickName:res.userInfo.nickName,
-								headimgurl:res.userInfo.avatarUrl,
-						}							
-						invitationCodeLogin(params).then(response =>{
-							this.login(response.data)
-							wxLogin.wxLoginAuthorize()
-							if(response.data.userIdentity === 3){
-								setTimeout(()=>{
-									this.$api.navigateTo('/supplier/pages/index/index')
-								},1000)
-							}else{
-								setTimeout(()=>{
-									switch(this.isLoginType){
-										case 9:
-											this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
-											break;
-										case 8:
-											this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
-											break;
-										case 7:
-											this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.isLoginOrderId}`)
-											break;
-										default:
-											this.$api.switchTabTo('/pages/tabBar/user/user')
-									}
-								},1000)
+				this.isUserInfo = false
+				this.UserService.InvitationCodeLogin({
+						invitationCode:this.invitationCode,
+						nickName:userInfo.nickName,
+						avatarUrl:userInfo.avatarUrl,
+						unionId:uni.getStorageSync('unionId')
+				})
+				.then(response =>{
+					wxLogin.wxLoginAuthorize()
+					if(response.data.userIdentity === 3){
+						setTimeout(()=>{
+							this.$api.navigateTo('/supplier/pages/index/index')
+						},1500)
+					}else{
+						setTimeout(()=>{
+							switch(this.isLoginType){
+								case 9:
+									this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+									break;
+								case 8:
+									this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
+									break;
+								case 7:
+									this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.isLoginOrderId}`)
+									break;
+								default:
+									this.$api.switchTabTo('/pages/tabBar/user/user')
 							}
-						}).catch(error =>{
-							this.$util.msg(error.msg,2000)
-							this.isUserInfo = false
-						})
+						},1500)
 					}
 				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+					this.isUserInfo = false
+				})
 			}
 		}
 	}

+ 40 - 41
pages/login/register-supplier.vue

@@ -41,7 +41,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">短信验证码:</view>
-					<input class="row-input code" type="text" v-model="firstParmas.mobileCode" placeholder="请输入短信验证码" maxlength="6"/>
+					<input class="row-input code" type="text" v-model="firstParmas.smsCode" placeholder="请输入短信验证码" maxlength="6"/>
 					<view class="row-btn" :class="[isMobileDisabled  ? 'disabled' : '']">
 						<button class="row-input"
 								type="button" 
@@ -100,7 +100,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">公司简称:</view>
-					<input class="row-input" type="text" v-model="threeParmas.sname" placeholder="请输入您的公司简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="threeParmas.shortName" placeholder="请输入您的公司简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -137,9 +137,9 @@
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="threeParmas.businessLicenseImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="threeParmas.businessLicense === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="threeParmas.businessLicenseImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="threeParmas.businessLicense" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -263,7 +263,7 @@
 				stepIndex:0,
 				firstParmas:{
 					bindMobile:'',
-					mobileCode:'',
+					smsCode:'',
 					password:'',
 					passWordConfirm:'',
 					whichStep:1
@@ -275,20 +275,17 @@
 					whichStep:2
 				},
 				threeParmas:{
-				    provinceID :'',
-					cityID : '',
-					townID : '',
 					address:'',
-					sname:'',	 	//公司简称
+					shortName:'',	 	//公司简称
 					socialCreditCode:'',	//统一社会信用代码
-					businessLicenseImage:'',	//营业执照图片
-					provinceID :'',
-					cityID : '',
-					townID : '',
+					businessLicense:'',	//营业执照图片
+					provinceId :'',
+					cityId : '',
+					townId : '',
 					address:'',
 					firstShopType:0,
 					secondShopType: '',
-					mainpro:'',
+					mainProduct:'',
 					isAgreed:0,
 					whichStep:3,
 					source:1,
@@ -343,12 +340,13 @@
 				let params = {
 						mobile:this.firstParmas.bindMobile,
 						imgCode:this.imageCode,
+						isCheckCaptcha:0,
+						token:this.imageCodetoken,
 						activateCodeType:3,
 						platformType:2,
-						token:this.imageCodetoken
 					}
 				this.isMobileDisabled = true;
-				this.PublicService.GetMobileCode(params).then(response =>{
+				this.PublicService.GetRegisterMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.mobilTime) {
@@ -401,11 +399,11 @@
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				if( this.firstParmas.mobileCode == ''){
+				if( this.firstParmas.smsCode == ''){
 					this.$util.msg('请输入手机验证码',2000);
 					return
 				}
-				if(!this.$reg.isMobileCode(this.firstParmas.mobileCode)){
+				if(!this.$reg.isMobileCode(this.firstParmas.smsCode)){
 					this.$util.msg('验证码格式不正确',2000);
 					return
 				}
@@ -421,7 +419,7 @@
 					uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
 					return
 				}
-				this.ShopService.SupplierAppletsRegistered(this.firstParmas).then(response =>{
+				this.UserService.SupplierAppletsRegistered(this.firstParmas).then(response =>{
 					this.stepIndex = 1
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
@@ -444,14 +442,15 @@
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
-				this.ShopService.SupplierAppletsRegistered(this.twoParmas).then(response =>{
+				let postParmas =  Object.assign(this.firstParmas,this.twoParmas)
+				this.UserService.SupplierAppletsRegistered(postParmas).then(response =>{
 					this.stepIndex = 2
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})	
 			},
 			SupplierRegisteredThree(){
-				if( this.threeParmas.townID == ''){
+				if( this.threeParmas.townId == ''){
 					this.$util.msg('请选择公司地址',2000);
 					return
 				}
@@ -463,15 +462,15 @@
 					this.$util.msg('请填写统一社会信用代码',2000);
 					return
 				}
-				if( !this.threeParmas.businessLicenseImage){
-					this.$util.msg('请上传您的营业执照',2000);
-					return
-				}
+				// if( !this.threeParmas.businessLicense){
+				// 	this.$util.msg('请上传您的营业执照',2000);
+				// 	return
+				// }
 				if(this.threeParmas.firstShopType == 0){
 					this.$util.msg('请选择公司类型',2000);
 					return
 				}
-				if(this.threeParmas.mainpro == ''){
+				if(this.threeParmas.mainProduct == ''){
 					this.$util.msg('请选择主营内容',2000);
 					return
 				}
@@ -483,9 +482,9 @@
 				this.supplierMedicaCampList.forEach(item =>{
 					mainproList.push(item.name)
 				})
-				this.threeParmas.mainpro = mainproList.join('/')
+				this.threeParmas.mainProduct = mainproList.join('/')
 				let postParmas =  Object.assign(this.firstParmas,this.twoParmas,this.threeParmas)
-				this.UserService.appSupplierRegister(postParmas).then(response =>{
+				this.UserService.SupplierAppletsRegistered(postParmas).then(response =>{
 					this.$util.modal('','您的资料已提交成功,系统将在1-2个工作日内进行审核~','知道了','',false,() =>{
 						this.$api.switchTabTo('/pages/tabBar/home/index')
 					})
@@ -495,11 +494,11 @@
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.threeParmas.businessLicenseImage = JSON.parse(res.data).data
+					this.threeParmas.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
-				this.myPreviewImageFn(this.businessLicenseImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			myPreviewImageFn(url){
 				this.isPreviewImage = true
@@ -512,7 +511,7 @@
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.threeParmas.businessLicenseImage = ''
+					 this.threeParmas.businessLicense = ''
 				})
 			},
 			radioChange(e) {
@@ -520,7 +519,7 @@
 			},
 			chooseMaleLike(e){
 				this.isMainproCheck = true
-				this.threeParmas.mainpro = this.checkLikes(e,this.supplierMedicaCampList)
+				this.threeParmas.mainProduct = this.checkLikes(e,this.supplierMedicaCampList)
 			},
 			checkLikes(e,list){
 				let	values = e.detail.value
@@ -554,9 +553,9 @@
 			},
 			onConfirm(e) {
 				this.addressText = e.name;
-				this.threeParmas.townID = e.townCode;
-				this.threeParmas.cityID = e.cityCode;
-				this.threeParmas.provinceID = e.provinceCode;
+				this.threeParmas.townId = e.townCode;
+				this.threeParmas.cityId = e.cityCode;
+				this.threeParmas.provinceId = e.provinceCode;
 			},	
 			onTextareaInput(e){
 			   this.threeParmas.address = e.detail.value;
@@ -598,12 +597,12 @@
 			}
 		},
 		onShow() {
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse == 1){
-					wxLogin.wxLoginQuick()
-				}else{
-					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				}	
+			authorize.checkLogin()
+			.then(res => {
+				wxLogin.wxLoginQuick()
+			})
+			.catch(err => {
+				this.$api.navigateTo('/pages/authorization/authorization?type=0')
 			})
 		}
 	}

+ 89 - 49
pages/login/register.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="container register" :style="{paddingTop:CustomBar+'px'}" v-if="isWxAuthorize">
+	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-main clearfix">
 			<view class="register-logo">
@@ -8,19 +8,19 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">联系人:</view>
-					<input class="row-input" type="text" name="input" v-model="userName" placeholder="请输入机构联系人姓名" maxlength="6"/>
+					<input class="row-input" type="text" name="input" v-model="params.userName" placeholder="请输入机构联系人姓名" maxlength="6"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" name="input" v-model="bindMobile" placeholder="请输入联系人常用手机号" maxlength="11"/>
+					<input class="row-input" type="number" name="input" v-model="params.bindMobile" placeholder="请输入联系人常用手机号" maxlength="11"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">短信验证码:</view>
-					<input class="row-input code" type="text" v-model="mobileCode" placeholder="请输入短信验证码" maxlength="6"/>
+					<input class="row-input code" type="text" v-model="params.smsCode" placeholder="请输入短信验证码" maxlength="6"/>
 					<view class="row-btn" :class="[isMobileDisabled  ? 'disabled' : '']">
 						<button class="row-input"
 								type="button" 
@@ -34,13 +34,13 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">登录密码:</view>
-					<input class="row-input" type="password" name="input" v-model="password" placeholder="密码必须为8-16位字母数字组合" maxlength="16"/>
+					<input class="row-input" type="password" name="input" v-model="params.password" placeholder="密码必须为8-16位字母数字组合" maxlength="16"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">确认密码:</view>
-					<input class="row-input" type="password" name="input" v-model="passwordCheck" placeholder="请确认密码" maxlength="16"/>
+					<input class="row-input" type="password" name="input" v-model="params.passWordConfirm" placeholder="请确认密码" maxlength="16"/>
 				</view>
 			</view>
 			<view class="register-main clearfix">
@@ -72,7 +72,7 @@
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 	import { organizationVerifyRegisterFirst } from "@/api/use.js"
-	import { getRegisterMobileCode, uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/api/utils.js"
 	export default{
 		components:{
 			mpvueCityPicker
@@ -91,15 +91,21 @@
 			    mobilCount: '',				//倒计时
 			    mobileCodeText: '获取验证码',
 			    mobilTime: null,
-				password:'',			//密码
-				passwordCheck:'',		//校验密码
-				userName:'',	 		//联系人
-				bindMobile:'',		//联系人手机号
-				mobileCode:'',			//手机验证码
+				params:{
+					userName:'',
+					bindMobile:'',
+					isAgreed:0,	
+					password:'',	
+					passWordConfirm:'',	
+					smsCode:'',
+					avatarUrl:'',	
+					nickName:'',	
+					source:1,	
+					unionId:''	
+				},
 				imageCode:'',			//图形验证码
 				imageCodeUrl:'',		//图形验证码图片
 				imageCodetoken:'',		//图形验证校验
-				isAgreed:0,				//是否勾选协议
 				isCheck:false,			//是否勾选协议
 				userID:'',		//机构userID
 				clubID:'',		//机构ID
@@ -121,30 +127,57 @@
 				})
 			},
 			registerStepsfirst(){
-				wx.getUserInfo({
-					success: res => {
-						let params ={
-								source:1,
-								userName:this.userName,
-								bindMobile:this.bindMobile,
-								activationCode:this.mobileCode,
-								password:this.password,
-								passWordConfirm:this.passwordCheck,
-								isAgreed:this.isAgreed,	//是否勾选协议
-								nickName:res.userInfo.nickName,
-								headimgurl:res.userInfo.avatarUrl,
-						}
-						organizationVerifyRegisterFirst(params).then(response =>{
-							this.storeUpdataeStatus(response.data)
-							wxLogin.wxLoginAuthorize()
-							setTimeout(() =>{
-								this.$api.switchTabTo('/pages/tabBar/user/user')
-							},2000)
-						}).catch(error =>{
-							this.$util.msg(error.msg,2000);
-						})		
-					}
-				})
+				const userInfo = uni.getStorageSync('wechatUserInfo')
+				this.params.nickName = userInfo.nickName
+				this.params.avatarUrl = userInfo.avatarUrl
+				if( this.params.userName == ''){
+					this.$util.msg('请输入联系人名称',2000);
+					return
+				}
+				if( this.params.bindMobile == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.bindMobile)){
+					this.$util.msg('手机格式不正确',2000);
+					return
+				}
+				if( this.params.smsCode == ''){
+					this.$util.msg('请输入手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.params.smsCode)){
+					this.$util.msg('验证码格式不正确',2000);
+					return
+				}
+				if( this.params.password == ''){
+					this.$util.msg('请输入密码',2000);
+					return
+				}
+				if(!this.$reg.checkPwd(this.params.password)){
+					this.$util.msg('密码必须为8-16位字母数字的组合',2000);
+					return
+				}
+				if( this.params.passWordConfirm == ''){
+					this.$util.msg('请再次确认密码',2000);
+					return
+				}
+				if( this.params.passWordConfirm !== this.params.password){
+					this.$util.msg('两次输入的密码不一致',2000);
+					return
+				}
+				if(this.params.isAgreed == 0){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
+				this.UserService.UserRegisterClub(this.params).then(response =>{
+					wxLogin.wxLoginAuthorize()
+					setTimeout(() =>{
+						this.$api.switchTabTo('/pages/tabBar/user/user')
+					},2000)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})		
 			},
 			storeUpdataeStatus(data){
 				uni.setStorageSync('token',data.token)
@@ -152,21 +185,21 @@
 				this.login(data);
 			},
 			getMobileCodeFn(){
-				if( this.bindMobile == ''){
+				if( this.params.bindMobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.bindMobile)){
+				if(!this.$reg.isMobile(this.params.bindMobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
 				let params = {
-						mobile:this.bindMobile,
+						mobile:this.params.bindMobile,
 						activateCodeType:2,
 						platformType:2
 					}
 				this.isMobileDisabled = true;
-				getRegisterMobileCode(params).then(response =>{
+				this.PublicService.GetRegisterMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.mobilTime) {
@@ -192,20 +225,26 @@
 			agreeCheck() {
 				this.isCheck = !this.isCheck
 				if(this.isCheck){
-					this.isAgreed = 1
+					this.params.isAgreed = 1
 				}else{
-					this.isAgreed = 0
+					this.params.isAgreed = 0
 				}
+			},
+			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
+				authorize.checkLogin()
+				.then(res => {
+					wxLogin.wxLoginQuick()
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=0')
+				})
 			}
 		},
 		onShow() {
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse == 1){
-					wxLogin.wxLoginQuick()
-				}else{
-					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				}	
+			this.$api.getStorage().then((resolve) =>{
+				this.params.unionId = resolve.unionId
 			})
+			this.InitAuthorize()
 		}
 	}
 </script>
@@ -435,6 +474,7 @@
 							.row-input{
 								background: #F7F7F7;
 								color: #999999;
+								font-size: 24rpx;
 							}
 						}
 					}

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

@@ -219,18 +219,18 @@
 				this.isCheckAll=false//是否全选
 				this.submitIds = []
 				this.$api.getStorage().then((resolve) => {
-					this.userID = resolve.userID;
+					this.userID = resolve.userId;
 					this.initGetCartGoodsList();
 				})	
 			},
 			initLogin(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$api.redirectTo('/pages/login/login?type=4')
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=0')
-					}
-				})	
+				authorize.checkLogin()
+				.then(res => {
+					this.$api.redirectTo('/pages/login/login?type=4')
+				})
+				.catch(err =>{
+					this.$api.navigateTo('/pages/authorization/authorization?type=0')
+				})
 			},
 			clickPopupShow(pros,type){
 				this.popupShow = true;

+ 60 - 22
pages/tabBar/home/index.vue

@@ -33,7 +33,6 @@
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
 	import activityAlert from '@/components/cm-module/activity/activity_01.vue'
-	import { userInfoLogin } from "@/api/use.js"
 	import { mapState,mapMutations} from 'vuex';
 	export default {
 		components:{
@@ -85,34 +84,70 @@
 		},
 		methods: {
 			...mapMutations(['login','logout']),
-			getWxAuthorize(){
+			GetWxAuthorize(){
 				authorize.getCode('weixin').then(wechatcode =>{// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					authorize.getUserInfo('weixin').then(wxResponse =>{
-						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
+					authorize.getUserInfo('weixin').then(getUserInfo =>{
+						this.UserService.UserLoginAuthApplets({ 
+							code:wechatcode,
+							encryptedData:getUserInfo.encryptedData,
+							iv:getUserInfo.iv ,
+						})
+						.then(response =>{
 							this.isLogin = true;
-							this.userID = response.data.userID;						
+							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);
 							uni.setStorageSync('token',response.data.token)
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							uni.setStorageSync('unionId',response.data.unionId)
 							if(response.data.userIdentity ==1){
 								this.$api.redirectTo('/seller/pages/index/index')
 							}else if(response.data.userIdentity === 3){
 								this.$api.redirectTo('/supplier/pages/index/index')
 							}
 							this.getHomeInformation()
-						}).catch(error =>{
+						})
+						.catch(error =>{
 							this.isLogin = false;
 							this.logout()
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+error.data)
+							uni.setStorageSync('unionId',error.data.unionId)
 							this.$store.commit('updateStatus',error.data)
 							this.getHomeInformation()
 						})
 					})
+				})						
+			},
+			async getWxAuthorize(){
+				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.$store.commit('updateStatus',response.data)
+					this.login(response.data);
+					uni.setStorageSync('token',response.data.token)
+					uni.setStorageSync('unionId',response.data.unionId)
+					if(response.data.userIdentity ==1){
+						this.$api.redirectTo('/seller/pages/index/index')
+					}else if(response.data.userIdentity === 3){
+						this.$api.redirectTo('/supplier/pages/index/index')
+					}
+					this.getHomeInformation()
+				})
+				.catch(error =>{
+					this.isLogin = false;
+					this.logout()
+					uni.setStorageSync('unionId',error.data.unionId)
+					this.$store.commit('updateStatus',error.data)
+					this.getHomeInformation()
 				})
 			},		
 			GetHomeInit(){//金刚区分类
@@ -168,6 +203,20 @@
 				uni.setStorageSync('lockTime',Date.now())
 				uni.setStorageSync('isActivityStatus',true)	
 			},
+			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
+				authorize.checkLogin()
+				.then(res => {
+					this.GetWxAuthorize()
+				})
+				.catch(err => {
+					this.$api.getComStorage('userInfo').then((resolve) =>{
+						this.userID = resolve.userId ? resolve.userId :0;
+						this.getHomeInformation()
+					}).catch(error =>{
+						this.getHomeInformation()
+					})
+				})
+			}
 		},
 		onPageScroll(e){//实时获取到滚动的值
 			if(e.scrollTop>50){
@@ -197,18 +246,7 @@
 		},
 		onShow(){
 			this.modallayer = false
-			authorize.getSetting().then(res =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(res == 1){
-					this.getWxAuthorize()
-				}else{
-					this.$api.getComStorage('userInfo').then((resolve) =>{
-						this.userID = resolve.userID ? resolve.userID :0;
-						this.getHomeInformation()
-					}).catch(error =>{
-						this.getHomeInformation()
-					})
-				}
-			})		
+			this.InitAuthorize()
 		}
 	}
 </script>

+ 23 - 23
pages/tabBar/user/user.vue

@@ -235,6 +235,9 @@
 					}else{
 						this.name = $userData.userName //普通机构名称
 						this.userType = '普通机构'
+					}		
+					if($userData.guideFlag == 0){
+						this.isUpgradeAlert = true
 					}
 					this.headpic = $userData.image //会所头像
 					this.bindMobile = $userData.bindMobile//登录手机号
@@ -246,9 +249,6 @@
 					this.shipmentsCount = this.showBadge(data.shipmentsCount)//已发货	
 					this.salesReturnCount = this.showBadge(data.salesReturnCount)//退货/款	
 					let clubInfo ={name:this.name,image:this.headpic,clubID:$clubData.clubID}
-					if($userData.tipStatus == '0'){
-						this.isUpgradeAlert = true
-					}
 					uni.setStorage({key: 'clubInfo',data: clubInfo}) 
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -267,39 +267,39 @@
 				});
 			},
 			hanldUnBindUpgrade(){//普通用户不升级会员机构
-				cancelPrompt({ userId:this.userID}).then(response =>{
+				this.UserService.CancelPrompt({ userId:this.userID}).then(response =>{
 					this.isUpgradeAlert = false
 				})
 			},
 			hanldGoApply(){
-				cancelPrompt({ userId:this.userID}).then(response =>{
+				this.UserService.CancelPrompt({ userId:this.userID}).then(response =>{
 					this.isUpgradeAlert = false
 					this.$api.navigateTo(`/pages/login/apply?clubStatus=${this.clubStatus}`);
 				})
 			},
 			navigator(url){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						if(this.hasLogin){
-							this.$api.navigateTo(url)
-						}else{
-							this.$api.navigateTo('/pages/login/login?type=0')
-						}
+				authorize.checkLogin()
+				.then(res => {
+					if(this.hasLogin){
+						this.$api.navigateTo(url)
 					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
+						this.$api.navigateTo('/pages/login/login?type=0')
 					}
-				})	
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				})
 			},	
 			navigatorNex(url,type){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						if(!this.hasLogin){
-							this.$api.navigateTo(url)
-						}
-					}else{
-						this.$api.navigateTo(`/pages/authorization/authorization?type=${type}`)
+				authorize.checkLogin()
+				.then(res => {
+					if(!this.hasLogin){
+						this.$api.navigateTo(url)
 					}
-				})	
+				})
+				.catch(err => {
+					this.$api.navigateTo(`/pages/authorization/authorization?type=${type}`)
+				})
 			},		
 			showBadge(n){
 				let num ='';
@@ -344,7 +344,7 @@
 		onShow(){
 			if(this.hasLogin){
 				this.$api.getComStorage('userInfo').then((resolve) =>{
-					this.userID = resolve.userID
+					this.userID = resolve.userId ? resolve.userId : 0
 					this.getUserInfo()
 				}).catch(reject =>{
 					console.log('异常处理=========>',reject)

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

@@ -137,7 +137,7 @@
 					 }
 				})
 				this.$api.getStorage().then((resolve) =>{
-					 this.userID =resolve.userID
+					 this.userID =resolve.userId ? resolve.userId : 0
 					 /**
 					  * @余额明细初始化加载  仅加载第一页码
 					  * @param:type(查询余额类型:0全部,1收入,2支出)

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

@@ -152,7 +152,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 				this.pageNum = 1;
 				this.addressList = [];
 				this.initAddressList();

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

@@ -189,7 +189,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.addressData.userID = resolve.userID
+				this.addressData.userID = resolve.userId ? resolve.userId : 0
 			})
 		}
 	}

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

@@ -72,8 +72,8 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
-				this.clubID = resolve.clubID
+				this.userID = resolve.userId ? resolve.userId : 0
+				this.clubID = resolve.clubId ? resolve.clubId : 0
 			})
 		}
 	}

+ 2 - 2
pages/user/operator/list.vue

@@ -29,8 +29,8 @@
 						<view class="list-left">
 							<view class="list-head"><image :src="item.headimgurl ? item.headimgurl : 'https://static.caimei365.com/app/img/icon/icon-seller@3x.png'" mode=""></image></view>
 							<view class="list-tel">
-								<text class="txt">{{item.linkName}}</text>
-								<text class="txt">{{item.mobile}}</text>
+								<text class="txt">{{ item.linkName ? item.linkName : ''}}</text>
+								<text class="txt">{{ item.mobile ? item.mobile : '' }}</text>
 							</view>
 						</view>
 						<view class="list-opea">

+ 9 - 5
pages/user/order/create-order.vue

@@ -130,7 +130,7 @@
 				this.productIds = data.data.productID
 			}
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 				this.getInitCrearOrder(option);
 			})
 		},
@@ -141,8 +141,13 @@
 		},	
 		methods: {
 			getInitCrearOrder(option){//获取订单商品信息
-				let params ={userId:this.userID,count:this.productCount,productIds:this.productIds}
-				this.OrderService.CreateOrderInfo(params).then(response =>{
+				this.OrderService.CreateOrderInfo({
+					userId:this.userID,
+					count:this.productCount,
+					productIds:this.productIds,
+					unionId:uni.getStorageSync('unionId')
+				})
+				.then(response =>{
 					let resData = response.data
 					this.isRequest = true
 					this.goodsData = resData.list
@@ -178,7 +183,7 @@
 			},
 			getAddressData(){//获取地址信息
 				this.$api.getStorage().then((resolve) => {
-					this.UserService.QueryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
+					this.UserService.QueryAddressList({pageNum:1,pageSize:1,userID:resolve.userId}).then(response =>{
 						this.isAddress = true
 						this.addressData = {}
 						if(response.data.results != ''){
@@ -315,7 +320,6 @@
 					const data = response.data;
 					if(data.code === '1'){
 						this.submitState ='success'
-						this.isSubLoading = false;
 						setTimeout(()=>{
 							this.isSubLoading = false;
 						},2000)

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

@@ -263,7 +263,7 @@
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
-						this.userID = resolve.userID
+						this.userID = resolve.userId ? resolve.userId : 0
 						let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
 						this.OrderService.QueryOrderList(params).then(response =>{
 							let orderList = response.data.results.filter(item=>{

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

@@ -160,7 +160,7 @@
 		onShow() {
 			let pages = getCurrentPages(),thisPage = pages[pages.length - 1];
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 			})
 		},
 	}

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

@@ -153,7 +153,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 			})
 		}
 	}

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

@@ -31,7 +31,7 @@
 		methods:{
 			initSetting(){
 				this.$api.getStorage().then((resolve) =>{
-					this.UserService.PersonalInfo({userID:resolve.userID}).then(response =>{
+					this.UserService.PersonalInfo({userID:resolve.userId}).then(response =>{
 						this.bindMobile=response.data.user.bindMobile
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)

+ 6 - 8
search/pages/search/search-instrument.vue

@@ -70,14 +70,12 @@
 		},
 		onLoad(option){
 			if(option.type =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 			if(option.keyWord){
 				this.listQuery.keyword = option.keyWord

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

@@ -182,7 +182,7 @@
 			},
 			initGetSerachRecord(){
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
+					this.userID = resolve.userId ? resolve.userId : 0
 					this.OrderService.SearchOrderHistory({userId:this.userID}).then(response =>{
 						this.serachRecordList = response.data
 						if(this.serachRecordList.length>0){

+ 6 - 8
search/pages/search/search-supplier.vue

@@ -109,14 +109,12 @@
 		},
 		onLoad(option){
 			if(option.type =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 			if(option.keyWord){
 				console.log(option.keyWord)

+ 8 - 10
search/pages/search/search.vue

@@ -212,18 +212,16 @@
 		onLoad(option) {
 			console.log(option)
 			if(option.type =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID ? resolve.userID : 0;
-				this.shopId = resolve.shopID ? resolve.shopID : 0;
+				this.userID = resolve.userId ? resolve.userId : 0;
+				this.shopId = resolve.shopId ? resolve.shopId : 0;
 				this.userIdentity = resolve.userIdentity;
 				this.listQuery.identity = this.identity;
 				if(option.keyWord){

+ 15 - 18
second/pages/product/product-details.vue

@@ -220,14 +220,12 @@
 				this.backPage = option.page
 			}
 			if(this.isShareType =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 		},
 		computed: {
@@ -285,15 +283,14 @@
 
 			},
 			navToLogin(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$store.commit('setLoginType',8)
-						this.$store.commit('setLoginProductId',this.productID)
-						this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					this.$store.commit('setLoginType',8)
+					this.$store.commit('setLoginProductId',this.productID)
+					this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				})
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
@@ -430,7 +427,7 @@
 		},
 		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;

+ 6 - 8
second/pages/product/product-list.vue

@@ -149,14 +149,12 @@
 		},
 		onLoad(option) {
 			if(option.type =='share'){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					console.log(wxResponse)
-					if(wxResponse == 1){
-						wxLogin.wxLoginAuthorize()
-					}else{
-						console.log(new Date +'用户未授权微信信息')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					wxLogin.wxLoginAuthorize()
+				})
+				.catch(err => {
+					console.log(new Date +'用户未授权微信信息')
+				})
 			}
 		},
 		computed: {

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

@@ -157,7 +157,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 				this.pageNum = 1;
 				this.addressList = [];
 				this.initAddressList();

+ 1 - 1
seller/pages/cart/buyagain.vue

@@ -169,7 +169,7 @@
 				this.clubID = resolve.clubID
 			})
 			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderID
+				this.serviceProviderId = resolve.serviceProviderId
 				this.getClubProductNum()
 			})
 		},

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

@@ -231,7 +231,7 @@
 				this.isCheckAll=false//是否全选
 				this.submitIds = []
 				this.$api.getStorage().then((resolve) => {
-					this.serviceProviderId = resolve.serviceProviderID;
+					this.serviceProviderId = resolve.serviceProviderId;
 					this.initGetCartGoodsList();
 				})	
 			},

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

@@ -307,7 +307,7 @@
 				this.clubID = resolve.clubID
 			})
 			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderID
+				this.serviceProviderId = resolve.serviceProviderId
 				this.getClubProductNum()
 			})
 		},

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

@@ -189,7 +189,7 @@
 				this.clubID = resolve.clubID
 			})
 			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderID
+				this.serviceProviderId = resolve.serviceProviderId
 				this.getClubProductNum()
 			})
 		},

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

@@ -29,7 +29,7 @@
 							<view class="list-tel">
 								<text class="txt">{{item.name == null ? item.username : item.name}}</text>
 								<text class="txt sm">
-									<text class="txt-le">{{checkData(item.linkMan1)  ? desensitizationName(item.linkMan1) : ''}}</text>
+									<text class="txt-le">{{checkData(item.linkMan)  ? desensitizationName(item.linkMan) : ''}}</text>
 									{{item.contractMobile1 ? hidePhone(item.contractMobile1) : ''}}
 								</text>
 							</view>
@@ -206,7 +206,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then(response =>{
-				this.serviceProviderId = response.serviceProviderID
+				this.serviceProviderId = response.serviceProviderId
 				this.pageNum = 1;
 				this.initclubList();
 			})

+ 96 - 57
seller/pages/club/club-list.vue

@@ -25,14 +25,21 @@
 			<view v-else class="club-list">
 				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in clubList" :key="index">
-						<view class="list-left">
-							<view class="list-head"><image :src="item.headpic ? item.headpic : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'" mode=""></image></view>
-						</view>
-						<view class="list-item">
-							<view class="list-title">
-								<text class="list-name">{{item.name}}</text>
-								<text class="list-hist" @click.stop="_goHistory(item)"><text class="iconfont icon-dingdanxuanzhong"></text>订单列表</text>
+						<view class="club-list-top">
+							<view class="list-left">
+								<view class="list-head"><image :src="item.headpic ? item.headpic : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'" mode=""></image></view>
+							</view>
+							<view class="list-item">
+								<view class="list-title">
+									<text class="list-name">{{item.name}}</text>
+									<text class="list-hist" @click.stop="_goHistory(item)"><text class="iconfont icon-dingdanxuanzhong"></text>订单列表</text>
+								</view>
+								<view class="list-opea">
+									
+								</view>
 							</view>
+						</view>
+						<view class="club-list-bot">
 							<view class="list-opea">
 								<view class="btn org" @click.stop="_goImmediately(item)">
 									<text>立即下单</text>
@@ -43,8 +50,11 @@
 								<view class="btn yel" @click.stop="_goBuyagain(item)">
 									<text>再次购买</text>
 								</view>
+								<view class="btn yeo" @click.stop="_goRechargeOrder(item)">
+									<text>充值/下定金</text>
+								</view>
 							</view>
-						</view>
+						</view>	
 					</view>
 					<!--加载loadding-->
 					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
@@ -174,6 +184,10 @@
 				this.$api.setStorage('orderUserInfo',item)
 				this.$api.navigateTo('/seller/pages/cart/buyagain')
 			},
+			_goRechargeOrder(item){
+				this.$api.setStorage('orderUserInfo',item)
+				this.$api.navigateTo('/seller/pages/order/create-recharge-order')
+			},
 			_goSecond(item ){
 				this.$api.setStorage('orderUserInfo',item)
 				this.$api.navigateTo('/seller/pages/cart/second')
@@ -192,7 +206,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then(response =>{
-				this.serviceProviderId = response.serviceProviderID
+				this.serviceProviderId = response.serviceProviderId
 				this.pageNum = 1;
 				this.initclubList();
 			})
@@ -280,78 +294,99 @@
 			background: #FFFFFF;
 			position: relative;
 			border-bottom: 1px solid #EBEBEB;
-			display: flex;
-			.list-left{
+			float: left;
+			.club-list-top{
+				width: 100%;
 				height: 140rpx;
-				flex: 2;
-				margin-right: 10rpx;
-				.list-head{
-					width: 140rpx;
+				float: left;
+				display: flex;
+				align-items: center;
+				.list-left{
 					height: 140rpx;
-					border-radius: 14rpx;
-					image{
+					flex: 2;
+					margin-right: 10rpx;
+					.list-head{
 						width: 140rpx;
 						height: 140rpx;
 						border-radius: 14rpx;
+						image{
+							width: 140rpx;
+							height: 140rpx;
+							border-radius: 14rpx;
+						}
 					}
 				}
-			}
-			.list-item{
-				height: 140rpx;
-				flex: 8;
-				display: flex;
-				flex-direction:column ;
-				.list-title{
-					flex: 2;
-					line-height: 80rpx;
-					width: 100%;
-					font-size: $font-size-28;
-					color: $text-color;
-					padding-left: 11rpx;
-					flex-direction: row;
-					justify-content: flex-start;
-					.list-name{
-						width: 400rpx;
-						display: block;
-						float: left;
-						text-align: left;
-						-o-text-overflow: ellipsis;
-						text-overflow: ellipsis;
-						display: -webkit-box;
-						word-break: break-all;
-						-webkit-box-orient: vertical;
-						-webkit-line-clamp: 1;
-						overflow: hidden;
-					}
-					.list-hist{
-						display: block;
-						float: right;
-						color: #E19B30;
-						font-size: $font-size-24;
-						text-align: right;
-						padding-right: 30rpx;
-						.icon-dingdanxuanzhong{
-							font-size: $font-size-34;
+				.list-item{
+					height: 140rpx;
+					flex: 8;
+					display: flex;
+					flex-direction:column ;
+					.list-title{
+						flex: 2;
+						line-height: 80rpx;
+						width: 100%;
+						font-size: $font-size-28;
+						color: $text-color;
+						padding-left: 11rpx;
+						flex-direction: row;
+						justify-content: flex-start;
+						.list-name{
+							width: 390rpx;
+							display: block;
+							float: left;
+							text-align: left;
+							-o-text-overflow: ellipsis;
+							text-overflow: ellipsis;
+							display: -webkit-box;
+							word-break: break-all;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 1;
+							overflow: hidden;
+						}
+						.list-hist{
+							display: block;
+							float: right;
 							color: #E19B30;
+							font-size: $font-size-24;
+							text-align: right;
+							padding-right: 30rpx;
+							.icon-dingdanxuanzhong{
+								font-size: $font-size-34;
+								color: #E19B30;
+							}
 						}
 					}
+					.list-opea{
+						width: 100%;
+						display: flex;
+						flex: 4;
+						color: #166CE1;
+						flex-direction: row;
+						align-items: center;
+					}
 				}
+			}
+			.club-list-bot{
+				width: 100%;
+				height: 60rpx;
+				float: left;
+				margin-top: 20rpx;
 				.list-opea{
 					width: 100%;
 					display: flex;
-					flex: 4;
+					flex: 1;
 					color: #166CE1;
 					flex-direction: row;
 					align-items: center;
 					.btn{
-						width: 156rpx;
+						width: 160rpx;
 						height: 60rpx;
 						line-height: 60rpx;
 						border-radius: 30rpx;
 						font-size: $font-size-24;
 						color: $text-color;
 						text-align: center;
-						margin: 0 17rpx;
+						margin: 0 15rpx;
 						&.org{
 							background:rgba(22,225,77,.1);
 							color: #16E14D;
@@ -364,6 +399,10 @@
 							background:rgba(225,86,22,.1);
 							color: #E15616;
 						}
+						&.yeo{
+							background: #fff5cf;
+							color: #ffaa01;
+						}
 					}
 				}
 			}

+ 138 - 75
seller/pages/club/list.vue

@@ -31,14 +31,16 @@
 			</view>
 			<view v-else class="club-list">
 				<scroll-view scroll-y="true" >
-					<view class="list" v-for="(item, index) in clubList" :key="index">
+					<!-- <view class="list" v-for="(item, index) in clubList" :key="index">
 						<view class="list-left">
-							<view class="list-head"><image :src="item.headpic ? item.headpic : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'" mode=""></image></view>
+							<view class="list-head">
+								<image :src="item.headpic ? item.headpic : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'" mode=""></image>
+							</view>
 							<view class="list-tel">
-								<text class="txt">{{item.userIdentity ===2 ? item.name : item.linkMan1}}</text>
+								<text class="txt">{{item.userIdentity ===2 ? item.name : item.linkMan}}</text>
 								<text class="txt sm">
-									<text class="txt-le">{{item.linkMan1 ? item.linkMan1 : ''}}</text>
-									{{item.contractMobile1 ? item.contractMobile1 : ''}}</text>
+									<text class="txt-le">{{item.linkMan ? item.linkMan : ''}}</text>
+									{{item.contractMobile ? item.contractMobile : ''}}</text>
 							</view>
 						</view>
 						<view class="list-opea">
@@ -56,7 +58,30 @@
 								<text>修改资料</text>
 							</view>
 						</view>
-					</view>
+					</view> -->
+					<view class="list" v-for="(item, index) in clubList" :key="index">
+						<view class="list-logo">
+							<image :src="item.headpic ? item.headpic : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png'" mode=""></image>
+						</view>	
+						<view class="list-content">
+							<view class="list-name">{{item.userIdentity ===2 ? item.name : item.linkMan}}</view>
+							<view class="list-ntel">
+								<text class="list-link">{{item.linkMan ? item.linkMan : ''}}</text>
+								<text class="list-texl">{{item.contractMobile ? item.contractMobile : ''}}</text>
+							</view>
+							<view class="list-opera">
+								<button class="btn org" @click.stop="checkData(item)">修改资料</button>
+								<view class="btn gre"  @click.stop="orderHistory(item)">
+									历史订单
+									<text v-if="item.orderNum >0"
+										  class="opea-badge uni-badge uni-badge-error uni-small uni-badge--small icon-num">
+										  {{showBadge(item.orderNum)}}
+									</text>
+								</view>
+								<button open-type="share" class="btn yel" @tap="shareBindClub">分享登录</button>
+							</view>
+						</view>	
+					</view>		
 					<!--加载loadding-->
 					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
 					<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text='nomoreText'></tui-nomore>
@@ -144,8 +169,15 @@
 				this.initclubList()
 			},
 			initclubList(){	
-				let params = {userIdentity:this.userIdentity,name:this.searchInputVal,pageNum:1,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
-				this.SellerService.GetSellerClubList(params).then(response =>{
+				this.SellerService.GetSellerClubList({
+					userIdentity:this.userIdentity,
+					name:this.searchInputVal,
+					pageNum:1,
+					pageSize:this.pageSize,
+					spId:this.serviceProviderId,
+					status:this.listStatus,
+				})
+				.then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
@@ -164,14 +196,22 @@
 					}else{
 						this.isEmpty = true
 					}
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},	
 			getOnReachBottomData(){
 				this.pageNum+=1
-				let params = {userIdentity:this.userIdentity,name:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
-				this.SellerService.GetSellerClubList(params).then(response =>{
+				this.SellerService.GetSellerClubList({
+					userIdentity:this.userIdentity,
+					name:this.searchInputVal,
+					pageNum:this.pageNum,
+					pageSize:this.pageSize,
+					spId:this.serviceProviderId,
+					status:this.listStatus,
+				})
+				.then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = response.data.hasNextPage
@@ -187,7 +227,8 @@
 							this.nomoreText = '已至底部'
 						}
 					}
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
@@ -222,7 +263,7 @@
 						break
 				}
 			},	
-			checkData(item){
+			checkData(item){//修改机构资料
 				switch(this.tabCurrentNum){
 					case 0:
 						this.$api.navigateTo(`/seller/pages/login/apply?userID=${item.userID}`)
@@ -232,10 +273,17 @@
 						break;
 				}
 			},
-			orderHistory(item){
+			orderHistory(item){//跳转机构历史订单
 				this.$api.setStorage('orderUserInfo',item)
 				this.$api.navigateTo(`/seller/pages/order/order-historylist?clubID=${item.clubID}&listType=0`)
 			},
+			shareBindClub(item){//分享登录
+				return {
+				  title: '您已注册采美365网,请点击登录',
+				  path: `pages/login/binding?userId=${item.userID}`,
+				  imageUrl:'https://static.caimei365.com/app/img/icon/icon-sharebind.jpg'
+				}
+			},
 			onShowClose () {//输入框失去焦点时触发
 				if(this.searchInputVal != ''){
 					this.isShowClose = true
@@ -262,7 +310,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then(response =>{
-				this.serviceProviderId = response.serviceProviderID
+				this.serviceProviderId = response.serviceProviderId
 				this.pageNum = 1;
 				this.initclubList();
 			})
@@ -383,75 +431,90 @@
 	.club-main{
 		padding-top: 224rpx;
 		.list{
-			display: flex;
-			align-items: center;
-			width: 702rpx;
-			height: 92rpx;
+			width: 100%;
+			height: 228rpx;
 			padding: 24rpx;
+			box-sizing: border-box;
 			background: #FFFFFF;
 			position: relative;
 			border-bottom: 1px solid #EBEBEB;
-			.list-left{
-				display: flex;
-				flex: 8;
-				.list-head{
-					width: 92rpx;
-					height: 92rpx;
-					border-radius: 14rpx;
-					image{
-						width: 92rpx;
-						height: 92rpx;
-						border-radius: 14rpx;
-					}
-				}
-				.list-tel{
-					margin-left: 18rpx;
-					.txt{
-						display: flex;
-						flex: 1;
-						font-size: $font-size-28;
-						color: $text-color;
-						line-height: 46rpx;
-						&.sm{
-							font-size: $font-size-24;
-							color: #666666;
-							.txt-le{
-								margin-right: 26rpx;
-							}
-						}
-					}
+			.list-logo{
+				width: 180rpx;
+				height: 180rpx;
+				float: left;
+				image{
+					width: 180rpx;
+					height: 180rpx;
+					border-radius: 8rpx;
 				}
 			}
-			.list-opea{
-				display: flex;
-				flex: 2;
-				color: #166CE1;
-				flex-direction: column;
-				.opea-type-cell{
-					font-size: 24rpx;
-					.iconfont{
-						font-size: 34rpx;
-						margin-right: 5rpx;
-					}
+			.list-content{
+				width: 498rpx;
+				height: 180rpx;
+				float: right;
+				.list-name{
+					width: 100%;
+					height: 50rpx;
+					float: left;
+					line-height: 50rpx;
+					text-align: left;
+					font-size: $font-size-26;
+					color: #333333;
 				}
-				.opea-type-dell{
-					line-height: 46rpx;
-					font-size: 24rpx;
-					position: relative;
-					.opea-badge{
-						position: absolute;
-						left: -45rpx;
-						top: -10rpx;
-						&.right{
-							left: -20rpx;
-						}
+				.list-ntel{
+					width: 100%;
+					height: 50rpx;
+					float: left;
+					line-height: 50rpx;
+					text-align: left;
+					font-size: $font-size-26;
+					color: #666666;
+					.list-link{
+						display: inline-block;
+						float: left;
+						margin-right: 40rpx;
 					}
-					&.or{
-						color: #E19B16;
+					.list-texl{
+						display: inline-block;
+						float: left;
 					}
-					.iconfont{
-						font-size: 34rpx;
-						margin-right: 5rpx;
+				}
+				.list-opera{
+					width: 100%;
+					height: 60rpx;
+					display: flex;
+					color: #166CE1;
+					flex-direction: row;
+					align-items: center;
+					float: left;
+					margin-top: 20rpx;
+					.btn{
+						width: 160rpx;
+						height: 60rpx;
+						line-height: 60rpx;
+						border-radius: 30rpx;
+						font-size: $font-size-24;
+						color: $text-color;
+						text-align: center;
+						margin:0 20rpx 0 0;
+						position: relative;
+						.opea-badge{
+							position: absolute;
+							right: -10rpx;
+							top: -20rpx;
+						}
+						&.org{
+							border: 1px solid #2769d5;
+							color: #2769d5;
+						}
+						&.gre{
+							border: 1px solid #e15616;
+							color: #e15616;
+						}
+						&.yel{
+							border: 1px solid #4ad04c;
+							color: #4ad04c;
+						}
 					}
 				}
 			}

+ 97 - 91
seller/pages/login/apply.vue

@@ -87,7 +87,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">邮箱:</view>
-					<input class="row-input" type="text" name="input" v-model="registerEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
+					<input class="row-input" type="text" name="input" v-model="contractEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -99,7 +99,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
-					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shortName" placeholder="请输入您的机构简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -121,7 +121,6 @@
 							placeholder-class="placeholder"
 							maxlength="25"
 							@input="onTextareaInput"
-							@focus="textareaFocus"
 							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
@@ -136,9 +135,9 @@
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="businessLicense === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="businessLicense" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -148,9 +147,9 @@
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMentuzImage === ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="shopPhoto === ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMentuzImage" mode=""  @click="viewMentuzImage"></image>
+							<image :src="shopPhoto" mode=""  @click="viewMentuzImage"></image>
 							<view class="upload-del" @click="delMentuzImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -185,9 +184,9 @@
 				<view class="register-picture zz">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage === ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="medicalPracticeLicense === ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
+							<image :src="medicalPracticeLicense" mode=""  @click="viewMedicalImage"></image>
 							<view class="upload-del" @click="delMedicalImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -290,13 +289,13 @@ import { mapMutations } from 'vuex';
 				tabCurrentIndex:3,	
 				clubStatus:'',			//审核状态
 				isPreviewImage:false,   //预览图片开关
-				userID:'',				//用户ID
-				clubID:'',				//会所ID
+				userId:'',				//用户ID
+				clubId:'',				//会所ID
 				clubContact:'',			//联系人姓名
 				mobile:'',				//联系人手机号
-				registerEmail:'',		//邮箱
+				contractEmail:'',		//邮箱
 				clubName:'',	 		//机构名称
-				abbreviation:'',	 	//机构简称
+				shortName:'',	 	//机构简称
 				socialCreditCode:'',	//统一社会信用代码
 				isDisabled:true,
 				isShowInput:true,
@@ -304,17 +303,17 @@ import { mapMutations } from 'vuex';
 				isUpgrade:false,
 				isShowUpgrade:false,
 				isDownUpgrade:true,
-				uploadBusinessImage:'',	//营业执照图片
-				uploadMentuzImage:'',  	//门头照图片
-				uploadMedicalImage:'', 	//资质照图片
+				businessLicense:'',	//营业执照图片
+				shopPhoto:'',  	//门头照图片
+				medicalPracticeLicense:'', 	//资质照图片
 				department:'',			//科室
 				isDepartment:false,     //是否显示科室
-				secondClubType:'',		//机构类型二级分类
-				mainpro:'',				//主营内容
+				secondClubType:null,		//机构类型二级分类
+				mainProduct:'',				//主营内容
 				clubTelePhone:'',		//固定电话
 				clubFax:'',				//传真
 				companyPprofile:'',		//公司简介
-				firstClubType:'',		//机构类型
+				firstClubType:null,		//机构类型
 				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
 				beautyList:beautyList,//医美分类
@@ -330,16 +329,16 @@ import { mapMutations } from 'vuex';
 				isMainproCheck:false,
 				addressData:{
 					address:'请选择机构所在地区',
-					townID:'',			//区ID
-					cityID:'',			//市ID
-					provinceID:'',		//省ID
+					townId:'',			//区ID
+					cityId:'',			//市ID
+					provinceId:'',		//省ID
 					addressDetail: '',	//地址详情
 				},
 				registerBtnText:'确定'
 			}	
 		},
 		onLoad(option) {
-			this.userID = option.userID
+			this.userId = option.userID
 			this.organizationInfo()
 		},
 		methods:{
@@ -351,7 +350,7 @@ import { mapMutations } from 'vuex';
 				})
 			},
 			organizationInfo(){
-				this.UserService.OrganizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+				this.UserService.OrganizationUpdateModifyInfo({userId:this.userId}).then(response =>{
 					let organizationClub = response.data.club
 					let organizationUser = response.data.user
 					this.clubStatus = organizationClub.status
@@ -363,46 +362,46 @@ import { mapMutations } from 'vuex';
 					if(organizationUser.auditNoteList!=null){
 						this.errorList =organizationUser.auditNoteList
 					}
-					this.clubContact = organizationClub.linkMan1
+					this.clubContact = organizationClub.linkMan
 					this.mobile = organizationUser.bindMobile
-					this.registerEmail = organizationUser.email	
-					this.clubID = organizationUser.clubID
+					this.contractEmail = organizationClub.contractEmail	
+					this.clubId = organizationUser.clubId
 					this.clubName = this.$reg.checkData(organizationClub.name)
-					this.abbreviation = this.$reg.checkData(organizationClub.sname)
-					if( organizationClub.provinceID == null ){
-						this.addressData.provinceID = ''
+					this.shortName = this.$reg.checkData(organizationClub.shortName)
+					if( organizationClub.provinceId == null ){
+						this.addressData.provinceId = ''
 					}else{
-						this.addressData.provinceID = organizationClub.provinceID
+						this.addressData.provinceId = organizationClub.provinceId
 					}
-					if( organizationClub.cityID == null ){
-						this.addressData.cityID = ''
+					if( organizationClub.cityId == null ){
+						this.addressData.cityId = ''
 					}else{
-						this.addressData.cityID = organizationClub.cityID
+						this.addressData.cityId = organizationClub.cityId
 					}
-					if( organizationClub.townID == null ){
-						this.addressData.townID = ''
+					if( organizationClub.townId == null ){
+						this.addressData.townId = ''
 					}else{
-						this.addressData.townID = organizationClub.townID
+						this.addressData.townId = organizationClub.townId
 					}
 					this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress:'请选择机构所在地区'
 					this.addressData.addressDetail = this.$reg.checkData(organizationClub.address)
 					this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
 					this.firstClubType = organizationClub.firstClubType
 					this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
-					this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage) 
-					this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
-					this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
+					this.businessLicense = this.$reg.checkData(organizationClub.businessLicense) 
+					this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
+					this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
 					this.department = this.$reg.checkData(organizationClub.department)
 					this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
 					this.clubFax = this.$reg.checkData(organizationClub.fax)
-					this.companyPprofile = this.$reg.checkData(organizationClub.info)
+					this.companyPprofile = this.$reg.checkData(organizationClub.profile)
 					//机构类型&&主营项目
 					switch(this.firstClubType){
-						case '1':
+						case 1:
 							this.organizationTypeText = '医美'
 							this.isOrganizationType = 1
 							break;
-						case '2':
+						case 2:
 							this.organizationTypeText = '生美'
 							this.isOrganizationType = 2
 							break;
@@ -411,24 +410,24 @@ import { mapMutations } from 'vuex';
 							this.isOrganizationType = 0
 							break;
 					}	
-					if(organizationClub.mainpro == "" || organizationClub.mainpro == null){
+					if(organizationClub.mainProduct == "" || organizationClub.mainProduct == null){
 						this.mentuzCampList = this.mentuzCampNullList
 						this.medicaCampList = this.medicaCampNullList
 					}else{
-						if(this.firstClubType == '1'){
-							this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+						if(this.firstClubType == 1){
+							this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
 							this.medicaCampList = this.medicaCampNullList							
 						}else{
-							this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+							this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
 							this.mentuzCampList = this.mentuzCampNullList
 						}
-						this.mainpro = organizationClub.mainpro;
+						this.mainProduct = organizationClub.mainProduct;
 					}
 					//机构类型
 					switch(this.secondClubType){
-						case '1':this.current = 0;break;
-						case '2':this.current = 1;this.isDepartment=true;break;
-						case '3':this.current = 2;this.isDepartment=true;break;
+						case 1:this.current = 0;break;
+						case 2:this.current = 1;this.isDepartment=true;break;
+						case 3:this.current = 2;this.isDepartment=true;break;
 					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -441,13 +440,17 @@ import { mapMutations } from 'vuex';
 				if(this.isUpgrade){
 					this.clubUpgradeApi()
 				}else{
+					if( this.clubContact == ''){
+						this.$util.msg('请输入联系人姓名',2000);
+						return
+					}
 					 let params = {
-							userID:this.userID,
-							clubID:this.clubID,					//会所ID
-							linkMan1:this.clubContact,
+							userId:this.userId,
+							clubId:this.clubId,	//会所ID
+							linkMan:this.clubContact,
 							fax:this.clubFax,
 							contractPhone:this.clubTelePhone,
-							info : this.companyPprofile,
+							profile : this.companyPprofile,
 						}		
 					this.UserService.OrganizationUpdate(params).then(response =>{
 						this.$util.msg('修改成功',2000,true,'success')
@@ -462,7 +465,7 @@ import { mapMutations } from 'vuex';
 			clubUpgradeApi(){
 				if(this.isMainproCheck){
 					let mainproList = []
-					if(this.firstClubType == '1'){
+					if(this.firstClubType == 1){
 						this.mentuzCampList.forEach(item =>{
 							mainproList.push(item.name)
 						})
@@ -471,14 +474,14 @@ import { mapMutations } from 'vuex';
 							mainproList.push(item.name)
 						})
 					}
-					this.mainpro = mainproList.join('/')
+					this.mainProduct = mainproList.join('/')
 				}
-				console.log(this.mainpro)
-				if( this.registerEmail == ''){
+				console.log(this.mainProduct)
+				if( this.contractEmail == ''){
 					this.$util.msg('请输入邮箱地址',2000);
 					return
 				}
-				if( !this.$reg.isEmail(this.registerEmail)){
+				if( !this.$reg.isEmail(this.contractEmail)){
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
@@ -486,7 +489,7 @@ import { mapMutations } from 'vuex';
 					this.$util.msg('请输入机构名称',2000);
 					return
 				}
-				if( this.addressData.townID == ''){
+				if( this.addressData.townId == ''){
 					this.$util.msg('请选择机构地址',2000);
 					return
 				}
@@ -494,39 +497,39 @@ import { mapMutations } from 'vuex';
 					this.$util.msg('请填写机构详细地址',2000);
 					return
 				}
-				if( this.uploadBusinessImage == ''){
+				if( this.businessLicense == ''){
 					this.$util.msg('请上传您的营业执照',2000);
 					return
 				}
 				console.log(this.isOrganizationType)
 				if(this.isOrganizationType!=0){
-					if(this.mainpro == ''){
+					if(this.mainProduct == ''){
 						this.$util.msg('请选择住机构主营内容',2000);
 						return
 					}
 				}
 				let params = {
-						userID:this.userID,
-						clubID:this.clubID,		//会所ID	
-						linkMan1:this.clubContact,
-						contractEmail1:this.registerEmail,
+						userId:this.userId,
+						clubId:this.clubId,		//会所ID	
+						linkMan:this.clubContact,
+						contractEmail:this.contractEmail,
 						name:this.clubName,
-						sname:this.abbreviation,
-						provinceID:this.addressData.provinceID,
-						cityID:this.addressData.cityID,
-						townID:this.addressData.townID,
+						shortName:this.shortName,
+						provinceId:this.addressData.provinceId,
+						cityId:this.addressData.cityId,
+						townId:this.addressData.townId,
 						address:this.addressData.addressDetail,
 						socialCreditCode:this.socialCreditCode,
-						businessLicenseImage:this.uploadBusinessImage,
-						headpic:this.uploadMentuzImage,
+						businessLicense:this.businessLicense,
+						shopPhoto:this.shopPhoto,
 						firstClubType:this.isOrganizationType,  //机构类型分类 医美:0和生美:1
 						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,				//科室
-						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						mainpro:this.mainpro,
+						medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
+						mainProduct:this.mainProduct,
 						fax:this.clubFax,
 						contractPhone:this.clubTelePhone,
-						info : this.companyPprofile,
+						profile : this.companyPprofile,
 				}
 				this.UserService.OrganizationRegister(params).then(response =>{
 					this.$util.msg('您的升级申请已提交审核',2000);
@@ -544,9 +547,9 @@ import { mapMutations } from 'vuex';
 			},
 			onConfirm(e) {
 				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
+				this.addressData.townId = e.townCode;
+				this.addressData.cityId = e.cityCode;
+				this.addressData.provinceId = e.provinceCode;
 			},	
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
@@ -559,29 +562,32 @@ import { mapMutations } from 'vuex';
 				this.isShowInput = true
 				this.textareaFocus = false
 			},
+			onTextareaInputInfo(e){
+			   this.companyPprofile = e.detail.value;
+			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadBusinessImage = JSON.parse(res.data).data
+					this.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			chooseMentuzImage() {//门头照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMentuzImage = JSON.parse(res.data).data
+					this.shopPhoto = JSON.parse(res.data).data
 				})
 			},
 			chooseMedicalImage() {//资质照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMedicalImage = JSON.parse(res.data).data
+					this.medicalPracticeLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
-				this.myPreviewImageFn(this.uploadBusinessImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			viewMentuzImage(e) {
-				this.myPreviewImageFn(this.uploadMentuzImage)
+				this.myPreviewImageFn(this.shopPhoto)
 			},
 			viewMedicalImage(e) {
-				this.myPreviewImageFn(this.uploadMedicalImage)
+				this.myPreviewImageFn(this.medicalPracticeLicense)
 			},
 			myPreviewImageFn(url){
 				this.isPreviewImage = true
@@ -594,17 +600,17 @@ import { mapMutations } from 'vuex';
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.uploadBusinessImage = ''
+					 this.businessLicense = ''
 				})
 			},
 			delMentuzImage(){
 				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
-					this.uploadMentuzImage = ''
+					this.shopPhoto = ''
 				})
 			},			
 			delMedicalImage(){
 				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
-					this.uploadMedicalImage = ''
+					this.medicalPracticeLicense = ''
 				})
 			},
 			bindPickerChange() {
@@ -632,7 +638,7 @@ import { mapMutations } from 'vuex';
 			},
 			radioChange(e) {
 				this.secondClubType = e.target.value;
-				if( this.secondClubType == '2' || this.secondClubType == '3'){
+				if( this.secondClubType == 2 || this.secondClubType == 3){
 					this.isDepartment = true
 				}else{
 					this.isDepartment = false
@@ -646,11 +652,11 @@ import { mapMutations } from 'vuex';
 			},
 			chooseMaleLike(e){
 				this.isMainproCheck = true
-				this.mainpro = this.checkLikes(e,this.mentuzCampList)
+				this.mainProduct = this.checkLikes(e,this.mentuzCampList)
 			},
 			chooseMaleLikes(e){
 				this.isMainproCheck = true
-				this.mainpro = this.checkLikes(e,this.medicaCampList)
+				this.mainProduct = this.checkLikes(e,this.medicaCampList)
 			},
 			checkLikes(e,list){
 				let	values = e.detail.value

+ 81 - 77
seller/pages/login/information.vue

@@ -67,7 +67,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">邮箱:</view>
-					<input class="row-input" type="text" name="input" v-model="email" placeholder="请输入邮箱地址" maxlength="30"/>
+					<input class="row-input" type="text" name="input" v-model="contractEmail" placeholder="请输入邮箱地址" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -79,7 +79,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
-					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shortName" placeholder="请输入您的机构简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -116,9 +116,9 @@
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage == ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="businessLicense == ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="businessLicense" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -128,9 +128,9 @@
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMentuzImage == ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="shopPhoto == ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMentuzImage" mode=""  @click="viewMentuzImage"></image>
+							<image :src="shopPhoto" mode=""  @click="viewMentuzImage"></image>
 							<view class="upload-del" @click="delMentuzImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -165,9 +165,9 @@
 				<view class="register-picture zz">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage == ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="medicalPracticeLicense == ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
+							<image :src="medicalPracticeLicense" mode=""  @click="viewMedicalImage"></image>
 							<view class="upload-del" @click="delMedicalImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -267,13 +267,13 @@
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isPreviewImage:false,   //预览图片开关
-				userID:'',				//机构的userID
-				clubID:'',				//会所ID
+				userId:'',				//机构的userId
+				clubId:'',				//会所ID
 				mobile:'',				//联系人手机号
 				userIdentity:'',		//机构用户类型
-				email:'',				//邮箱
+				contractEmail:'',				//邮箱
 				clubName:'',	 		//机构名称
-				abbreviation:'',	 	//机构简称
+				shortName:'',	 	//机构简称
 				clubContact:'',	 		//联系人
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:1,				//是否勾选协议
@@ -281,13 +281,13 @@
 				isShowInput:true,
 				textareaFocus:false,
 				isCheck:true,			//是否勾选协议
-				uploadBusinessImage:'',	//营业执照图片
-				uploadMentuzImage:'',  	//门头照图片
-				uploadMedicalImage:'', 	//资质照图片
+				businessLicense:'',	//营业执照图片
+				shopPhoto:'',  	//门头照图片
+				medicalPracticeLicense:'', 	//资质照图片
 				department:'',			//科室
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
-				mainpro:'',				//主营内容
+				mainProduct:'',				//主营内容
 				clubTelePhone:'',		//固定电话
 				clubFax:'',				//传真
 				companyPprofile:'',		//公司简介
@@ -307,16 +307,16 @@
 				isMainproCheck:false,
 				addressData:{
 					address:'请选择机构所在地区',
-					townID:'',			//区ID
-					cityID:'',			//市ID
-					provinceID:'',		//省ID
+					townId:'',			//区ID
+					cityId:'',			//市ID
+					provinceId:'',		//省ID
 					addressDetail: '',	//地址详情
 				},
 			}	
 		},
 		onLoad(option) {
 			console.log(option)
-			this.userID = option.userID
+			this.userId = option.userID
 			this.organizationInfo()
 		},
 		methods:{
@@ -328,50 +328,54 @@
 				})
 			},
 			organizationInfo(){
-				this.UserService.OrganizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+				this.UserService.OrganizationUpdateModifyInfo({userId:this.userId}).then(response =>{
 					let organizationClub = response.data.club
 					let organizationUser = response.data.user
-					this.clubID = organizationUser.clubID
+					this.clubId = organizationUser.clubId
 					this.userIdentity = organizationUser.userIdentity
-					this.clubContact = organizationClub.linkMan1
+					this.clubContact = organizationClub.linkMan
 					this.mobile = organizationUser.bindMobile
 					this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
 					this.clubFax = organizationClub.fax ? organizationClub.fax : ''
-					this.companyPprofile = organizationClub.info ? organizationClub.info : ''
-					this.email = organizationUser.email	
-					this.clubName = organizationClub.name
-					this.abbreviation = organizationClub.sname
-					if( organizationClub.provinceID == null ){
-						this.addressData.provinceID = ''
+					this.companyPprofile = organizationClub.profile ? organizationClub.profile : ''
+					this.contractEmail = organizationClub.contractEmail	
+					if(this.contractEmail){
+						this.clubName = this.$reg.checkData(organizationClub.name)
 					}else{
-						this.addressData.provinceID = organizationClub.provinceID
+						this.clubName = ''
 					}
-					if( organizationClub.cityID == null ){
-						this.addressData.cityID = ''
+					this.shortName = organizationClub.shortName
+					if( organizationClub.provinceId == null ){
+						this.addressData.provinceId = ''
 					}else{
-						this.addressData.cityID = organizationClub.cityID
+						this.addressData.provinceId = organizationClub.provinceId
 					}
-					if( organizationClub.townID == null ){
-						this.addressData.townID = ''
+					if( organizationClub.cityId == null ){
+						this.addressData.cityId = ''
 					}else{
-						this.addressData.townID = organizationClub.townID
+						this.addressData.cityId = organizationClub.cityId
+					}
+					if( organizationClub.townId == null ){
+						this.addressData.townId = ''
+					}else{
+						this.addressData.townId = organizationClub.townId
 					}
 					this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
 					this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
 					this.firstClubType = this.$reg.checkData(organizationClub.firstClubType)
 					this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
 					this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
-					this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage)
-					this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
-					this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
+					this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
+					this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
+					this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
 					this.department = this.$reg.checkData(organizationClub.department)						
 					//机构类型&&主营项目
 					switch(this.firstClubType){
-						case '1':
+						case 1:
 							this.organizationTypeText = '医美'
 							this.isOrganizationType = 1
 							break;
-						case '2':
+						case 2:
 							this.organizationTypeText = '生美'
 							this.isOrganizationType = 2
 							break;
@@ -380,23 +384,23 @@
 							this.isOrganizationType = 0
 							break;
 					}	
-					if(organizationClub.mainpro == "" || organizationClub.mainpro == null){
+					if(organizationClub.mainProduct == "" || organizationClub.mainProduct == null){
 						this.mentuzCampList = this.mentuzCampNullList
 						this.medicaCampList = this.medicaCampNullList
 					}else{
-						if(this.firstClubType == '1'){
-							this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+						if(this.firstClubType == 1){
+							this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
 							this.medicaCampList = this.medicaCampNullList
 						}else{
-							this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+							this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
 							this.mentuzCampList = this.mentuzCampNullList
 						}
 					}
 					//机构类型
 					switch(this.secondClubType){
-						case '1':this.current = 0;break;
-						case '2':this.current = 1;this.isDepartment=true;break;
-						case '3':this.current = 2;this.isDepartment=true;break;
+						case 1:this.current = 0;break;
+						case 2:this.current = 1;this.isDepartment=true;break;
+						case 3:this.current = 2;this.isDepartment=true;break;
 					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -405,7 +409,7 @@
 			organizationUpdateInfo(){//提交审核
 				if(!this.isMainproCheck){
 					let mainproList = []
-					if(this.firstClubType == '1'){
+					if(this.firstClubType == 1){
 						this.mentuzCampList.forEach(item =>{
 							mainproList.push(item.name)
 						})
@@ -414,30 +418,30 @@
 							mainproList.push(item.name)
 						})
 					}
-					this.mainpro = mainproList.join('/')
+					this.mainProduct = mainproList.join('/')
 				}
 				let params = {
-						userID:this.userID,
-						clubID:this.clubID,					//会所ID
+						userId:this.userId,
+						clubId:this.clubId,					//会所ID
 						name:this.clubName,
-						linkMan1:this.clubContact,
-						sname:this.abbreviation,
-						provinceID:this.addressData.provinceID,
-						cityID:this.addressData.cityID,
-						townID:this.addressData.townID,
+						linkMan:this.clubContact,
+						shortName:this.shortName,
+						provinceId:this.addressData.provinceId,
+						cityId:this.addressData.cityId,
+						townId:this.addressData.townId,
 						address:this.addressData.addressDetail,
 						socialCreditCode:this.socialCreditCode,
-						businessLicenseImage:this.uploadBusinessImage,
-						headpic:this.uploadMentuzImage,
+						businessLicense:this.businessLicense,
+						shopPhoto:this.shopPhoto,
 						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
 						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,				//科室
-						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
+						medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
 						isAgreed:this.isAgreed,				//是否勾选协议	
-						mainpro:this.mainpro,
+						mainProduct:this.mainProduct,
 						fax:this.clubFax,
 						contractPhone:this.clubTelePhone,
-						info : this.companyPprofile,
+						profile : this.companyPprofile,
 					}
 				this.UserService.OrganizationUpdate(params).then(response =>{
 					this.$util.msg('修改成功',2000,true,'success')
@@ -457,9 +461,9 @@
 			},
 			onConfirm(e) {
 				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
+				this.addressData.townId = e.townCode;
+				this.addressData.cityId = e.cityCode;
+				this.addressData.provinceId = e.provinceCode;
 			},	
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
@@ -477,27 +481,27 @@
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadBusinessImage = JSON.parse(res.data).data
+					this.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			chooseMentuzImage() {//门头照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMentuzImage = JSON.parse(res.data).data
+					this.shopPhoto = JSON.parse(res.data).data
 				})
 			},
 			chooseMedicalImage() {//资质照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMedicalImage = JSON.parse(res.data).data
+					this.medicalPracticeLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
-				this.myPreviewImageFn(this.uploadBusinessImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			viewMentuzImage(e) {
-				this.myPreviewImageFn(this.uploadMentuzImage)
+				this.myPreviewImageFn(this.shopPhoto)
 			},
 			viewMedicalImage(e) {
-				this.myPreviewImageFn(this.uploadMedicalImage)
+				this.myPreviewImageFn(this.medicalPracticeLicense)
 			},
 			myPreviewImageFn(url){
 				this.isPreviewImage = true
@@ -510,17 +514,17 @@
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.uploadBusinessImage = ''
+					 this.businessLicense = ''
 				})
 			},
 			delMentuzImage(){
 				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
-					this.uploadMentuzImage = ''
+					this.shopPhoto = ''
 				})
 			},			
 			delMedicalImage(){
 				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
-					this.uploadMedicalImage = ''
+					this.medicalPracticeLicense = ''
 				})
 			},
 			bindPickerChange() {
@@ -548,7 +552,7 @@
 			},
 			radioChange(e) {
 				this.secondClubType = e.target.value;
-				if( this.secondClubType == '2' || this.secondClubType == '3'){
+				if( this.secondClubType == 2 || this.secondClubType == 3){
 					this.isDepartment = true
 				}else{
 					this.isDepartment = false
@@ -562,11 +566,11 @@
 			},
 			chooseMaleLike(e){
 				this.isMainproCheck = true
-				this.mainpro = this.checkLikes(e,this.mentuzCampList)
+				this.mainProduct = this.checkLikes(e,this.mentuzCampList)
 			},
 			chooseMaleLikes(e){
 				this.isMainproCheck = true
-				this.mainpro = this.checkLikes(e,this.medicaCampList)
+				this.mainProduct = this.checkLikes(e,this.medicaCampList)
 			},
 			checkLikes(e,list){
 				let	values = e.detail.value

+ 59 - 61
seller/pages/login/login.vue

@@ -7,11 +7,11 @@
 		</view>
 		<view class="login-form">
 			<view class="login-input">
-				<input type="number" v-model="accountNumber"  maxlength="11" class="input" placeholder="请输入手机号"/>
+				<input type="number" v-model="params.mobileOrEmail"  maxlength="11" class="input" placeholder="请输入手机号"/>
 			</view>
 			<view class="login-input">
-				<input v-show="isShowEye" type="text" v-model="password"  maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
-				<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
+				<input v-show="isShowEye" type="text" v-model="params.password"  maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
+				<input v-show="!isShowEye" type="password" v-model="params.password"  :password="true" maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
 				<view class="iconfont" :class="isShowEye ? iconEyen : iconEyes"  @click="passwordClick"></view>
 			</view>
 		</view>
@@ -25,7 +25,6 @@
 	import { mapState,mapMutations } from 'vuex';
 	import errorAlert from '@/components/cm-module/modelAlert/errorAlert.vue'
 	import authorize from '@/common/config/authorize.js' 
-	import { userInfoLogin } from "@/api/use.js"
 	var self;
 	export default{
 		components:{
@@ -47,59 +46,54 @@
 				iseErrorAlert:false,
 				iconEyes:'icon-yanjing_yincang_o',
 				iconEyen:'icon-yanjing_xianshi_o',
-				accountNumber:'',  //协销用户登录账号
-				password:'',	   //协销登录密码	
+				params:{
+					mobileOrEmail:'',//协销用户登录账号
+					password:'',//协销登录密码	
+					unionId:uni.getStorageSync('unionId')
+				}
 			}
 		},
 		onLoad() {
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse == 1){
-					this.getWxAuthorize()
-				}else{
-					this.$api.navigateTo('/pages/authorization/authorization')
-					this.isSeller= true
-				}
-			})	
+			authorize.checkLogin().then(res => {
+				this.getWxAuthorize()
+			})
+			.catch(err => {
+				this.$api.navigateTo('/pages/authorization/authorization')
+				this.isSeller= true
+			})
 		},
 		computed: {
 			...mapState(['isWxAuthorize'])
 		},
 		methods:{
 			...mapMutations(['login','logout']),
-			getWxAuthorize(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					authorize.getUserInfo('weixin').then(wxResponse =>{
-						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
-							if(response.code != -6){//判断是否为微信绑定了供应商的账户
-								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('/seller/pages/index/index')
-								}
-							}else{
-								this.isSeller= true
-								this.iseErrorAlert= true
-							}
-						}).catch(error =>{
-							this.logout()
-							uni.removeStorageSync('sessionid')
-							uni.setStorageSync('sessionid','JSESSIONID='+error.data)
-							this.isSeller= true
-						})
-					})
-				})	
+			async getWxAuthorize(){
+				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.login(response.data);
+					this.$store.commit('updateStatus',response.data)
+					uni.setStorageSync('token',response.data.token)
+					uni.setStorageSync('unionId',response.data.unionId)
+					if(response.data.userIdentity === 1){
+						setTimeout(()=>{
+							this.$api.navigateTo('/seller/pages/index/index')
+						},1500)
+					}
+				}).catch(error =>{
+					this.logout()
+					uni.setStorageSync('unionId',error.data.unionId)
+					this.$store.commit('updateStatus',error.data)
+					this.isSeller= true
+				})
 			},	
 			confirmLogin(){
-				if( this.accountNumber == ''){
+				if( this.params.mobileOrEmail == ''){
 					this.$util.msg('请输入账户名',2000)
 					return
 				}
@@ -107,25 +101,29 @@
 					this.$util.msg('请输入密码',2000)
 					return
 				}
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.SellerLogin()
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=1')
-					}
-				})	
+				authorize.checkLogin().then(res => {
+					this.SellerLogin()
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/authorization/authorization?type=1')
+				})
 			},
 			SellerLogin(){
-				this.SellerService.SellerLogin({mobile:this.accountNumber,password:this.password}).then(response =>{
-						this.$store.commit('updateStatus',response.data)
+				this.SellerService.SellerLogin(this.params)
+					.then(response =>{
 						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.redirectTo('/seller/pages/index/index')
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
+						uni.setStorageSync('unionId',response.data.unionId)
+						this.$api.navigateTo('/seller/pages/index/index')
+						this.isSeller= false
+						setTimeout(()=>{
+							this.isSeller= true
+						},1500)
+					})
+					.catch(error =>{
+						this.$util.msg(error.msg,2000);
+					})
 			},
 			storeUpdataeStatus(data){
 				let user_key = {

+ 271 - 0
seller/pages/login/register-general.vue

@@ -0,0 +1,271 @@
+
+<template>
+	<view class="register">
+		<view class="register-main" v-if="isRegisterStep">
+			<view class="main-form-item">
+				<view class="form-label">联系人</view>
+				<input class="form-input" type="text" name="input" v-model="params.linkMan" placeholder="请输入联系姓名" maxlength="6"/>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">手机号</view>
+				<input class="form-input phone" type="text" v-model="params.bindMobile" placeholder="请输入联系人手机号" maxlength="11"/>
+				<view class="form-btn" @click.stop="CheckMobile()">检测</view>
+			</view>
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-agree">
+					<view class="agree-text"  @tap.stop="agreeCheck()">
+						<button class="checkbox iconfont" :class="[isCheck ?'icon-gouxuan':'icon-weigouxuan']"></button> 
+						我已阅读并同意
+						<text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
+						<text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
+						<text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
+					</view>
+				</view>
+				<view class="register-row">
+					<view class="register-btn sub" @click.stop="SubmitRegister">确定</view>
+				</view>
+			</view>
+		</view>
+		<view class="register-main" v-else>
+			<view class="main-form-item">
+				<view class="form-label">联系人</view>
+				<view class="form-text"> {{ clubInfo.linkMan }} </view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">手机号</view>
+				<view class="form-text">{{ clubInfo.bindMobile }}</view>
+			</view>
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-row">
+					<button open-type="share" class="register-btn sub" @tap="ShareRegister">分享</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data() {
+			return{
+				isRegisterStep:true,
+				isIphoneX:this.$store.state.isIphone,
+				isCheck:false,
+				clubUserId:0,
+				params:{
+					linkMan:'',
+					bindMobile:'',
+					isAgreed:0,
+					userId:0
+				},
+				clubInfo:{
+					linkMan:'',
+					bindMobile:'',
+					userId:0
+				}
+			}
+		},
+		onLoad(option) {
+			this.$api.getStorage().then((resolve) =>{
+				this.params.userId = resolve.userId ? resolve.userId : 0
+			})
+		},
+		computed: {
+			
+		},
+		methods:{
+			CheckMobile(){//检测手机是否能注册
+				if( this.params.bindMobile == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.bindMobile)){
+					this.$util.msg('请输入正确的手机号',2000);
+					return
+				}
+				this.SellerService.SellerClubCheck({bindMobile:this.params.bindMobile})
+				.then(response =>{
+					this.$util.msg(response.data,2000);
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			SubmitRegister(){//提交注册
+				if( this.params.linkMan == ''){
+					this.$util.msg('请输入联系人姓名',2000);
+					return
+				}
+				if( this.params.bindMobile == ''){
+					this.$util.msg('请输入联系人手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.bindMobile)){
+					this.$util.msg('手机格式不正确',2000);
+					return
+				}	
+				if(this.params.isAgreed == 0){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
+				this.SellerService.SellerClubRegister(this.params).then(response =>{
+					this.$util.msg('注册成功',2000);
+					// this.clubInfo.userId = response.data.userId
+					setTimeout(()=>{
+						this.isRegisterStep = false
+						this.GetClubUserInfo(11162)
+					},1500)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			GetClubUserInfo(userId){
+				this.UserService.OrganizationUpdateModifyInfo({userId:userId})
+				.then(response =>{
+					this.clubInfo = response.data.club
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ShareRegister(res){
+				if (res.from === 'button') { // 来自页面内转发按钮
+				}
+				return {
+				  title: '您已注册采美365网,请点击登录',
+				  path: `/pages/login/binding?userId=${this.clubInfo.userId}`,
+				  imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
+				}
+			},
+			agreeCheck() {//勾选协议
+				this.isCheck = !this.isCheck
+				if(this.isCheck){
+					this.params.isAgreed = 1
+				}else{
+					this.params.isAgreed = 0
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: auto;
+	}
+	.register{
+		width: 100%;
+		position: relative;
+		box-sizing: border-box;
+		.register-main{
+			width: 100%;
+			height: auto;
+			box-sizing: border-box;
+			padding: 0 24rpx;
+			margin-top: 24rpx;
+			.main-form-item{
+				width: 100%;
+				height: 82rpx;
+				box-sizing: border-box;
+				padding: 13rpx 0;
+				border-bottom: 1px solid #e1e1e1;
+				margin-top: 10rpx;
+				position: relative;
+				.form-label{
+					width: 148rpx;
+					float: left;
+					height: 100%;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #999999;
+				}
+				.form-input{
+					width: 554rpx;
+					height: 56rpx;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #333333;
+					float: left;
+					&.phone{
+						width: 418rpx;
+					}
+				}
+				.form-text{
+					width: 554rpx;
+					height: 56rpx;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #333333;
+					float: left;
+				}
+				.form-btn{
+					width: 136rpx;
+					height: 56rpx;
+					background: $btn-confirm;
+					color: #FFFFFF;
+					font-size: $font-size-28;
+					text-align: center;
+					border-radius: 28rpx;
+					line-height: 56rpx;
+					float: left;
+				}
+			}
+			.register-fiexd{
+				width: 100%;
+				height: auto;
+				padding: 20rpx 0;
+				position: fixed;
+				bottom: 0;
+				left: 0;
+				z-index: 9999;
+				background: #FFFFFF;
+				.register-agree{
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					margin: 32rpx 0;
+					.agree-text{
+						.checkbox{
+							float: left;
+							margin: 4rpx 6rpx 0 0;
+							color: #999999;
+							font-size: $font-size-32;
+							&.icon-gouxuan{
+								color: $color-system;
+							}
+						}
+						font-size: 20rpx;
+						line-height: 44rpx;
+						color: #999999;
+						text{
+							color:#0091FF;
+						}
+					}
+				}
+			}
+			.register-btn{
+				width: 702rpx;
+				height: 88rpx;
+				border-radius: 44rpx;
+				font-size: $font-size-28;
+				line-height: 88rpx;
+				color: #FFFFFF;
+				margin: 0 auto;
+				text-align: center;
+				background: $btn-confirm;
+				margin-top: 96rpx;
+				&.none{
+					background: #FFFFFF;
+					color: $text-color;
+					margin-top: 0;
+				}
+				&.sub{
+					margin-top: 0;
+				}
+			}
+		}
+	}
+</style>

+ 979 - 0
seller/pages/login/register-member.vue

@@ -0,0 +1,979 @@
+
+<template>
+	<view class="register">
+		<view class="register-main" v-if="isRegisterStep">
+			<view class="main-form-item">
+				<view class="form-label">联系人</view>
+				<input class="form-input" type="text" name="input" v-model="params.linkMan" placeholder="请输入联系姓名" maxlength="6"/>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">手机号</view>
+				<input class="form-input phone" type="text" v-model="params.bindMobile" placeholder="请输入联系人手机号" maxlength="11"/>
+				<view class="form-btn" @click.stop="CheckMobile()">检测</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">邮箱</view>
+				<input class="form-input" type="text" name="input" v-model="params.contractEmail" placeholder="请输入机构邮箱地址" maxlength="30"/>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构名称</view>
+				<input class="form-input" type="text" name="input" v-model="params.name" placeholder="请输入机构名称" maxlength="30"/>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构简称</view>
+				<input class="form-input" type="text" name="input" v-model="params.shortName" placeholder="请输入机构简称" maxlength="10"/>
+			</view>
+			<view class="main-form-item" @click="showMulLinkageThreePicker">
+				<view class="form-label">机构地址</view>
+				<view  class="form-input" 
+					   :class="params.address === '请选择机构所在地区' ? 'none' : ''">
+					   {{params.address}}
+				</view>		
+				<view class="iconfont icon-xiayibu"></view>
+			</view>
+			<view class="main-form-item textarea">
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{params.addressDetail ? params.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
+				<textarea 	v-else
+							class="textarea" 
+							type="text" 
+							v-model="params.addressDetail" 
+							placeholder="详细地址:如道路、门牌号、小区等" 
+							placeholder-class="placeholder"
+							maxlength="35"
+							@input="onTextareaInput"
+							@blur="hideTextareaFocus"
+							:class="isShowInput ? '':''"
+				/>			
+			</view>
+			<view class="main-form-item">
+				<view class="form-label lang">营业执照编号</view>
+				<input class="form-input lang" type="text" name="input" v-model="params.socialCreditCode" placeholder="请输入社会信用统一代码" maxlength="18"/>
+			</view>
+			<view class="main-form-item file">
+				<view class="main-form-upload">
+					<view class="label">营业执照</view>
+					<view class="upload-picture">
+						<view class="upload-none" v-if="params.businessLicense === ''"  @click="UploadPicture(1)">
+							<text class="iconfont icon-jiahao"></text><text class="upload-text">营业执照</text>
+						</view>
+						<view class="upload-image" v-else>
+							<image :src="params.businessLicense" mode="" @click="ShowPreviewImage(1)"></image>
+							<view class="upload-del" @click="DeletePicture(1)">
+								<text class='iconfont icon-shanchu1'></text>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="main-form-upload">
+					<view class="label">门头照</view>
+					<view class="upload-picture">
+						<view class="upload-none" v-if="params.shopPhoto === ''" @click="UploadPicture(2)">
+							<text class="iconfont icon-jiahao"></text><text class="upload-text">门头照</text>
+						</view>
+						<view class="upload-image" v-else>
+							<image :src="params.shopPhoto" mode=""  @click="ShowPreviewImage(2)"></image>
+							<view class="upload-del" @click="DeletePicture(2)">
+								<text class='iconfont icon-shanchu1'></text>
+							</view>
+						</view>
+					</view>	
+				</view>
+			</view>	
+			<view class="main-form-item picker">
+				<view class="form-label">机构类型</view>
+				<radio-group @change="bindPickerChange">
+					 <label class="label-radio" v-for="(item, index) in radioGroup1" :key="item.value">
+						 <radio class="row-radio" :value="item.value" :checked="index === current" color='#E15616'/>
+						 <view class="row-text">{{item.name}}</view>
+					 </label>
+				</radio-group>
+			</view>	
+			<view class="main-form-item picker" v-if="params.firstClubType == 1">
+				<view class="picker-radio">
+					<view class="secondTyperadio" v-for="(item,index) in beautyList" :key="item.value" @click="radioChange(item)" :class="item.value==params.secondClubType?'active':''">
+						<view class="secondRadio" >{{item.name}}</view>
+					</view>
+				</view>
+			</view>
+			<view class="main-form-item file"  v-if="params.firstClubType == 1">
+				<view class="main-form-upload">
+					<view class="label">资质</view>
+					<view class="upload-picture">
+						<view class="upload-none" v-if="params.medicalPracticeLicense === ''"  @click="UploadPicture(3)">
+							<text class="iconfont icon-jiahao"></text><text class="upload-text">医疗执业许可证</text>
+						</view>
+						<view class="upload-image" v-else>
+							<image :src="params.medicalPracticeLicense" mode="" @click="ShowPreviewImage(3)"></image>
+							<view class="upload-del" @click="DeletePicture(3)">
+								<text class='iconfont icon-shanchu1'></text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>		
+			<view class="main-form-item none" v-if="isDepartment">
+				<view class="form-label none">科室</view>
+				<textarea class="textarea-ke"  placeholder="请填写经营的科室,至少三个,用逗号隔开" placeholder-style="placeholder" v-model="params.department" maxlength="16"></textarea>
+			</view>	
+			<view class="main-form-item none" v-if="params.firstClubType == 1">
+				<view class="form-label none">主营内容</view>
+				<view class="form-checkbox-group">
+					<checkbox-group  @change="ChooseMaleLike" >
+						<label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
+							<checkbox class="item-checkbox" :value="item.value" color="#E15616" style="transform:scale(0.7)" :checked="item.checked"></checkbox>
+							<text class="item-text">{{item.name}}</text>
+						</label>
+					</checkbox-group>
+				</view>	
+				<view class="form-checkbox-input">
+					<input class="checkbox-input" type="text" v-model="customItemValue"  placeholder="请输入其他自定义品项目" maxlength="5"/>
+					<view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
+				</view>	
+			</view>
+			<view class="main-form-item none" v-if="params.firstClubType == 2">
+				<view class="form-label none">主营内容</view>
+				<view class="form-checkbox-group">
+					<checkbox-group @change="ChooseMaleLike">
+						<label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
+							<checkbox class="item-checkbox" :value="item.value" color="#E15616" style="transform:scale(0.7)" :checked="item.checked"></checkbox>
+						    <text class="item-text">{{item.name}}</text>
+						</label>
+					</checkbox-group>
+				</view>	
+				<view class="form-checkbox-input">
+					<input class="checkbox-input" type="text" v-model="customItemValue"  placeholder="请输入其他自定义品项目" maxlength="5"/>
+					<view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
+				</view>	
+			</view>		
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-agree">
+					<view class="agree-text"  @tap.stop="agreeCheck()">
+						<button class="checkbox iconfont" :class="[isCheck ?'icon-gouxuan':'icon-weigouxuan']"></button> 
+						我已阅读并同意
+						<text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
+						<text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
+						<text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
+					</view>
+				</view>
+				<view class="register-row">
+					<view class="register-btn sub" @click.stop="SubmitRegister">确定</view>
+				</view>
+			</view>
+		</view>
+		<view class="register-main" v-else>
+			<view class="main-form-item">
+				<view class="form-label">联系人</view>
+				<view class="form-text"> {{ clubInfo.linkMan }} </view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">手机号</view>
+				<view class="form-text">{{ clubInfo.contractMobile }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">邮箱</view>
+				<view class="form-text">{{ clubInfo.contractEmail }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构名称</view>
+				<view class="form-text">{{ clubInfo.name }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构简称</view>
+				<view class="form-text">{{ clubInfo.shortName }}</view>
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">机构地址</view>
+				<view class="form-input">{{ clubInfo.provincialAddress }}</view>		
+			</view>
+			<view class="main-form-item">
+				<view class="form-textarea">{{ clubInfo.address }}</view>		
+			</view>
+			<view class="main-form-item">
+				<view class="form-label lang">营业执照编号</view>
+				<view class="form-input lang">{{ clubInfo.socialCreditCode }}</view>		
+			</view>
+			<view class="main-form-item file">
+				<view class="main-form-upload">
+					<view class="label">营业执照</view>
+					<view class="upload-picture">
+						<view class="upload-image"><image :src="clubInfo.businessLicense" mode="" @click="ShowPreviewImage(1)"></image></view>
+					</view>
+				</view>
+				<view class="main-form-upload">
+					<view class="label">门头照</view>
+					<view class="upload-picture">
+						<view class="upload-image"><image :src="clubInfo.shopPhoto" mode=""  @click="ShowPreviewImage(2)"></image></view>
+					</view>	
+				</view>
+			</view>	
+			<view class="main-form-item">
+				<view class="form-label">机构类型</view>
+				<view class="form-text">
+					{{ clubInfo.firstClubType | FirstFormat }}
+					-
+					{{ clubInfo.secondClubType | TwoFormat }}
+				</view>
+			</view>
+			<view class="main-form-item file" v-if="clubInfo.firstClubType == 1">
+				<view class="main-form-upload">
+					<view class="label">资质</view>
+					<view class="upload-picture">
+						<view class="upload-image"><image :src="clubInfo.medicalPracticeLicense" mode=""  @click="ShowPreviewImage(2)"></image></view>
+					</view>	
+				</view>
+			</view>	
+			<view class="main-form-item" v-if="clubInfo.secondClubType == 2">
+				<view class="form-label">科室</view>
+				<view class="form-text">{{ clubInfo.department }}</view>
+			</view>
+			<view class="main-form-item none">
+				<view class="form-label none">主营内容</view>
+				<view class="form-checkbox-group">
+					<view class="form-table-item" v-for="(item, index) in medicaCampList" :key="index">
+						{{ item.name }}
+					</view>
+				</view>
+			</view>
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-row">
+					<button open-type="share" class="register-btn sub" @tap="ShareRegister">分享</button>
+				</view>
+			</view>
+		</view>
+		<city-Picker :themeColor="themeColor"
+					 ref="CityPicker" 
+					 :pickerValueDefault="cityPickerValueDefault"
+					 @onCancel="onCancel" 
+					 @onConfirm="onConfirm">
+		</city-Picker>
+	</view>
+</template>
+
+<script>
+	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
+	import { uploadFileImage } from "@/api/utils.js"
+	export default{
+		data() {
+			return{
+				isRegisterStep:false,
+				isIphoneX:this.$store.state.isIphone,
+				isCheck:false,
+				clubUserId:0,
+				isShowInput:true,
+				isDepartment:false,
+				textareaFocus:false,
+				beautyList:beautyList,
+				mentuzCampList:mentuzCampNullList,
+				medicaCampList:medicaCampNullList,
+				params:{
+					userId:0,
+					name:'',
+					shortName:'',
+					linkMan:'',
+					bindMobile:'',
+					contractEmail:'',
+					socialCreditCode:'',
+					isAgreed:0,
+					address:'请选择机构所在地区',
+					townId:'',			//区ID
+					cityId:'',			//区ID
+					provinceId:'',		//区ID
+					addressDetail: '',	//地址
+					businessLicense:'', //营业执照
+					shopPhoto:'',		//门头照
+					medicalPracticeLicense:'',//资质
+					firstClubType:1, //1医美;2生美
+					secondClubType:1, //1诊所;2门诊;3医院 
+					department:'',//科室
+					mainProduct:'',
+				},
+				clubInfo:{
+					linkMan:'',
+					bindMobile:'',
+					userId:0
+				},
+				radioGroup1:[
+					{name:'医美',value:1},
+					{name:'生美',value:2}
+				],
+				current:0,
+				customItemValue:'', 	//自定义项目
+			}
+		},
+		filters: {
+			FirstFormat:function(type) {//处理金额
+				let name='';
+				switch(type){
+					case 1: name = '医美'; break;
+					case 2: name = '生美'; break;
+				}	
+				return name;
+			},
+			TwoFormat:function(type) {//处理金额
+				let text='';
+				switch(type){
+					case 1: text = '诊所'; break;
+					case 2: text = '门诊'; break;
+					case 3: text = '医院'; break;
+				}	
+				return text;
+			},
+		},	
+		onLoad(option) {
+			this.$api.getStorage().then((resolve) =>{
+				this.params.userId = resolve.userId ? resolve.userId : 0
+			})
+		},
+		computed: {
+			
+		},
+		methods:{
+			CheckMobile(){//检测手机是否能注册
+				if( this.params.bindMobile == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.bindMobile)){
+					this.$util.msg('请输入正确的手机号',2000);
+					return
+				}
+				this.SellerService.SellerClubCheck({bindMobile:this.params.bindMobile})
+				.then(response =>{
+					this.$util.msg(response.data,2000);
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			SubmitRegister(){//提交注册
+				if( this.params.linkMan == ''){
+					this.$util.msg('请输入联系人姓名',2000);
+					return
+				}
+				if( this.params.bindMobile == ''){
+					this.$util.msg('请输入联系人手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.bindMobile)){
+					this.$util.msg('手机格式不正确',2000);
+					return
+				}	
+				if( this.params.contractEmail == ''){
+					this.$util.msg('请输入邮箱地址',2000);
+					return
+				}
+				if(!this.$reg.isEmail(this.params.contractEmail)){
+					this.$util.msg('请输入正确的邮箱地址',2000);
+					return
+				}
+				if( this.params.name == ''){
+					this.$util.msg('请输入机构名称',2000);
+					return
+				}
+				if( this.params.townId == ''){
+					this.$util.msg('请选择机构地址',2000);
+					return
+				}
+				if( this.params.addressDetail == ''){
+					this.$util.msg('请填写机构详细地址',2000);
+					return
+				}
+				if( this.params.businessLicense == ''){
+					this.$util.msg('请上传您的营业执照',2000);
+					return
+				}
+				if(this.params.firstClubType!=0){
+					console.log(this.params.mainProduct)
+					if(this.params.mainProduct == ''){
+						this.$util.msg('请选择住机构主营内容',2000);
+						return
+					}
+				}
+				if(this.params.isAgreed == 0){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
+				this.SellerService.SellerClubRegister(this.params).then(response =>{
+					this.$util.msg('提交成功',2000);
+					this.clubInfo.userId = response.data.userId
+					setTimeout(()=>{
+						this.isRegisterStep = false
+						this.GetClubUserInfo(response.data.userId)
+					},2000)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			GetClubUserInfo(userId){
+				this.UserService.OrganizationUpdateModifyInfo({userId:11162})
+				.then(response =>{
+					this.clubInfo = response.data.club
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ShareRegister(res){
+				if (res.from === 'button') { // 来自页面内转发按钮
+				}
+				return {
+				  title: '您已注册采美365网,请点击登录',
+				  path: `/pages/login/binding?userId=${this.clubInfo.userId}`,
+				  imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
+				}
+			},
+			agreeCheck() {//勾选协议
+				this.isCheck = !this.isCheck
+				if(this.isCheck){
+					this.params.isAgreed = 1
+				}else{
+					this.params.isAgreed = 0
+				}
+			},
+			showMulLinkageThreePicker() {//三级地址联动
+				this.isShowInput = true
+				this.$refs.CityPicker.show()
+			},
+			showTextareaFocus(){//文本框获取焦点
+				this.isShowInput = false
+				this.textareaFocus = true
+			},
+			hideTextareaFocus(){//文本框失去焦点
+				this.isShowInput = true
+				this.textareaFocus = false
+			},
+			onTextareaInput(e){//地址详细信息
+			   this.params.addressDetail = e.detail.value;
+			},
+			onConfirm(e) {//获取选择的地址信息
+				console.log('地址',e);
+				this.params.address = e.name;
+				this.params.townId = e.townCode;
+				this.params.cityId = e.cityCode;
+				this.params.provinceId = e.provinceCode;
+			},	
+			UploadPicture(NUM) {//图片上传
+				uploadFileImage().then(res =>{
+					switch(NUM){
+						case 1:
+							this.params.businessLicense = JSON.parse(res.data).data
+							break;
+						case 2:
+							this.params.shopPhoto = JSON.parse(res.data).data
+							break;
+						case 3:
+							this.params.medicalPracticeLicense = JSON.parse(res.data).data
+							break;
+					}
+				})
+			},
+			DeletePicture(NUM){//删除照片
+				switch(NUM){
+					case 1:
+						this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
+							 this.params.businessLicense = ''
+						})
+						break;
+					case 2:
+						this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
+							this.params.shopPhoto = ''
+						})
+						break;
+					case 3:
+						this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
+							this.params.medicalPracticeLicense = ''
+						})
+						break;
+				}
+			},
+			ShowPreviewImage(NUM) {//预览照片
+				switch(NUM){
+					case 1:
+						this.myPreviewImageFn(this.businessLicense)
+						break;
+					case 2:
+						this.myPreviewImageFn(this.shopPhoto)
+						break;
+					case 3:
+						this.myPreviewImageFn(this.medicalPracticeLicense)
+						break;
+				}
+			},
+			myPreviewImageFn(url){//预览证件照
+				this.isPreviewImage = true
+				let mentuzArray = []
+				mentuzArray.push(url)
+				uni.previewImage({
+					urls: mentuzArray,
+					current: 0
+				});
+			},
+			bindPickerChange(e) {//选择机构类型
+				this.params.firstClubType = Number(e.target.value);
+			},
+			radioChange(item) {//选择
+				this.params.secondClubType = item.value;
+				if( this.params.secondClubType == 2 || this.params.secondClubType == 3){
+					this.isDepartment = true
+				}else{
+					this.isDepartment = false
+				}
+				for (let i = 0; i < this.beautyList.length; i++) {
+					if (this.beautyList[i].value === this.params.secondClubType) {
+						break;
+					}
+				}
+			},
+			ChooseMaleLike(e){
+				switch(this.params.firstClubType){
+					case 1:
+						this.params.mainProduct = this.CheckLikes(e,this.mentuzCampList)
+						console.log(this.params.mainProduct)
+						break;
+					case 2:
+						this.params.mainProduct = this.CheckLikes(e,this.medicaCampList)
+						console.log(this.params.mainProduct)
+						break;
+				}
+			},
+			CheckLikes(e,list){
+				let	values = e.detail.value
+				let arr = []
+				list.forEach(item => {
+					if(values.indexOf(item.value) >= 0){
+						this.$set(item,'checked',true)
+						arr.push(item.name)
+					}else{
+						this.$set(item,'checked',false)
+					}
+				})
+				return arr.join('/')
+			},
+			addCustomItem(){
+				if(this.customItemValue==''){
+					this.$util.msg('请输入自定义主营内容',2000);
+				}else{
+					if(this.params.firstClubType == 1){
+						let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
+						if(this.CheckedArray(this.customItemValue,this.mentuzCampList)){
+							this.$util.msg('主营内容已存在!',2000)
+						}else{
+							this.mentuzCampList.push(item)
+						}
+					}else{
+						let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
+						if(this.CheckedArray(this.customItemValue,this.medicaCampList)){
+							this.$util.msg('主营内容已存在!',2000)
+						}else{
+							this.medicaCampList.push(item)
+						}
+					}
+				}
+			},
+			CheckedArray(content,arr){//判断主营内容是否已存在
+				console.log(content,arr)
+				for(var i in arr){
+					if(arr[i].name == content){
+						return true;
+					}
+				}
+				return false;
+		   },
+		},
+		onShareAppMessage(res){//分享转发
+			if (res.from === 'button') { // 来自页面内转发按钮
+		    }
+			return {
+			  title: '您已注册采美365网,请点击登录',
+			  path: `/pages/login/binding?userId=${this.clubInfo.userId}`,
+			  imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
+			}
+		},
+		onShow() {
+			this.GetClubUserInfo()
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: auto;
+	}
+	.register{
+		width: 100%;
+		position: relative;
+		box-sizing: border-box;
+		padding-bottom: 332rpx;
+		.register-main{
+			width: 100%;
+			height: auto;
+			box-sizing: border-box;
+			padding: 0 24rpx;
+			margin-top: 24rpx;
+			.main-form-item{
+				width: 100%;
+				height: 88rpx;
+				box-sizing: border-box;
+				padding: 13rpx 0;
+				border-bottom: 1px solid #e1e1e1;
+				margin-top: 10rpx;
+				position: relative;
+				&.none{
+					border-bottom: none;
+					height: auto;
+				}
+				&.file{
+					height: 273rpx;
+					border-bottom: none;
+					.main-form-upload{
+						width: 50%;
+						height: 100%;
+						float: left;
+						.label{
+							width: 100%;
+							float: left;
+							height: 56rpx;
+							line-height: 56rpx;
+							font-size: $font-size-28;
+							text-align: left;
+							color: #999999;
+						}
+						.upload-picture{
+							width: 100%;
+							height: 180rpx;
+							float: left;
+							margin-top: 17rpx;
+							.upload-none{
+								width: 200rpx;
+								height: 180rpx;
+								border-radius: 6rpx;
+								border:1px solid #e1e1e1;
+								box-sizing: border-box;
+								padding-top: 64rpx;
+								.icon-jiahao{
+									display: inline-block;
+									width: 100%;
+									text-align: center;
+									line-height: 48rpx;
+									font-size: 40rpx;
+									color: #b2b2b2;
+								}
+								.upload-text{
+									display: inline-block;
+									width: 100%;
+									text-align: center;
+									line-height: 40rpx;
+									font-size: $font-size-24;
+									color: #b2b2b2;
+								}
+							}
+							.upload-image{
+								width: 200rpx;
+								height: 180rpx;
+								border-radius: 6rpx;
+								border:1px solid #e1e1e1;
+								box-sizing: border-box;
+								position: relative;
+								image{
+									width: 200rpx;
+									height: 180rpx;
+									display: block;
+								}
+								.upload-del{
+									width: 40rpx;
+									height: 40rpx;
+									position: absolute;
+									top: -20rpx;
+									right: -20rpx;
+									line-height: 40rpx;
+									text-align: center;
+									.iconfont{
+										font-size: $font-size-32;
+										color: #999999;
+									}
+								}
+							}
+						}
+					}
+				}
+				&.picker{
+					border-bottom: none;
+					.label-radio{
+						margin-left: 30rpx;
+						font-size: $font-size-28;
+						float: left;
+					}
+					.row-radio{
+						float: left;
+						transform: scale(0.7);
+					}
+					.row-text{
+						text-align: center;
+						float: left;
+						font-size: $font-size-28;
+					}
+					.picker-radio{
+						box-sizing: border-box;
+						padding-left: 180rpx;
+						.secondTyperadio{
+							border: 2rpx solid #e1e1e1;
+							display: inline-block;
+							font-size: 26rpx;
+							color: #999999;
+							padding: 0 24rpx;
+							border-radius: 22rpx;
+							line-height: 42rpx;
+							margin-right: 56rpx;
+							float: left;
+							&.active{
+								border: 2rpx solid #ffe6dc;
+								color: $color-system;
+							}
+						}	
+					}
+				}
+				&.textarea{
+					height: 142rpx;
+					.textarea{
+						width: 100%;
+						height: 142rpx;
+						box-sizing: border-box;
+						font-size: $font-size-28;
+						color: $text-color;
+						z-index: 1;
+					}
+					.textarea.hide{
+						opacity: 0;
+					}
+					.textarea.show{
+						color: #999999;
+					}
+				}
+				.textarea-ke{
+					width: 100%;
+					height: 160rpx;
+					border-radius: 6rpx;
+					border: 1px solid #e1e1e1;
+					font-size: $font-size-28;
+					box-sizing: border-box;
+					padding: 15rpx 20rpx;
+				}
+				.form-textarea{
+					font-size: $font-size-28;
+					color: #333333;
+				}
+				.form-label{
+					width: 148rpx;
+					float: left;
+					height: 100%;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #999999;
+					&.lang{
+						width: 188rpx;
+					}
+					&.none{
+						width: 100%;
+					}
+				}
+				.form-input{
+					width: 554rpx;
+					height: 56rpx;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #333333;
+					float: left;
+					&.lang{
+						width: 514rpx;
+					}
+					&.phone{
+						width: 418rpx;
+					}
+				}
+				.form-text{
+					width: 554rpx;
+					height: 56rpx;
+					line-height: 56rpx;
+					font-size: $font-size-28;
+					text-align: left;
+					color: #333333;
+					float: left;
+				}
+				.form-btn{
+					width: 136rpx;
+					height: 56rpx;
+					background: $btn-confirm;
+					color: #FFFFFF;
+					font-size: $font-size-28;
+					text-align: center;
+					border-radius: 28rpx;
+					line-height: 56rpx;
+					float: left;
+				}
+				.icon-xiayibu{
+					width: 80rpx;
+					height: 80rpx;
+					position: absolute;
+					right: 0;
+					top: 0;
+					line-height: 80rpx;
+					text-align: center;
+					color: #b2b2b2;
+				}
+				.form-checkbox-group {
+					width: 100%;
+					display: flex;
+					flex-flow: row wrap;
+					justify-content: space-between;
+					align-items: center;
+					&.btn{
+						margin: 0 auto;
+						margin-left: 116rpx;
+					}
+					.row-input{
+						display: flex;
+						width: 220rpx;
+						height: 40rpx;
+						padding: 24rpx;
+						text-align: left;
+						border-radius: 10rpx;
+						font-size: $font-size-28;
+						color: $text-color;
+					}
+					.confirm-btn{
+						width: 160rpx;
+						height: 64rpx;
+						border-radius: 45rpx;
+						line-height: 64rpx;
+						text-align: center;
+						background:#ffe6dc;
+						color: $color-system;
+						&.other{
+							width: 213rpx;
+						}
+					}
+					.item {
+					  height: 60rpx;
+					  font-size:$font-size-28;
+					  line-height: 60rpx;
+					  border-radius:10rpx;
+					  margin-right: 20rpx;
+					  margin-bottom: 10rpx;
+					  box-sizing: border-box;
+					  float: left;
+					}
+					.item-text{
+						display: inline-block;
+						font-size: 26rpx;
+						color: #999999;
+						border-radius: 28rpx;
+						line-height: 50rpx;
+					}
+					.on {
+						.item-text{
+							border-color: $color-system;
+							color:$color-system;
+						}
+					}
+					.form-table-item{
+						height: 48rpx;
+						padding: 0 32rpx;
+						border: 1px solid #b2b2b2;
+						text-align: center;
+						font-size: $font-size-28;
+						color: #333333;
+						float: left;
+						line-height: 48rpx;
+						border-radius: 26rpx;
+						margin-right: 12rpx;
+						margin-top: 20rpx;
+					}
+				}
+				.form-checkbox-input{
+					width: 100%;
+					height: 64rpx;
+					margin-top: 20rpx;
+					.checkbox-input{
+						width: 518rpx;
+						height: 64rpx;
+						box-sizing: border-box;
+						text-align: left;
+						font-size: $font-size-26;
+						color: #333333;
+						line-height: 64rpx;
+						float: left;
+						border: 1px solid #e1e1e1;
+						border-radius: 32rpx;
+						padding: 0 20rpx;
+					}
+					.checkbox-btn{
+						width: 160rpx;
+						height: 64rpx;
+						border-radius: 32rpx;
+						background-color: #ffe6dc;
+						line-height: 64rpx;
+						text-align: center;
+						color: #e15616;
+						font-size: $font-size-28;
+						float: right;
+					}
+				}
+			}
+			.register-fiexd{
+				width: 100%;
+				height: auto;
+				padding: 20rpx 0;
+				position: fixed;
+				bottom: 0;
+				left: 0;
+				z-index: 888;
+				background: #FFFFFF;
+				.register-agree{
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					margin:0 0 32rpx 0;
+					.agree-text{
+						.checkbox{
+							float: left;
+							margin: 4rpx 6rpx 0 0;
+							color: #999999;
+							font-size: $font-size-32;
+							&.icon-gouxuan{
+								color: $color-system;
+							}
+						}
+						font-size: 20rpx;
+						line-height: 44rpx;
+						color: #999999;
+						text{
+							color:#0091FF;
+						}
+					}
+				}
+			}
+			.register-btn{
+				width: 702rpx;
+				height: 88rpx;
+				border-radius: 44rpx;
+				font-size: $font-size-28;
+				line-height: 88rpx;
+				color: #FFFFFF;
+				margin: 0 auto;
+				text-align: center;
+				background: $btn-confirm;
+				margin-top: 96rpx;
+				&.none{
+					background: #FFFFFF;
+					color: $text-color;
+					margin-top: 0;
+				}
+				&.sub{
+					margin-top: 0;
+				}
+			}
+		}
+	}
+</style>

+ 105 - 0
seller/pages/login/register-select.vue

@@ -0,0 +1,105 @@
+
+<template>
+	<view class="container register">
+		<view class="main">
+			<view class="main-item">
+				<view class="item" @click.stop="this.$api.navigateTo('/seller/pages/login/register-general')">
+					<view class="icon">
+						<image src="https://static.caimei365.com/app/img/icon/icon-general.png" mode=""></image>
+					</view>
+					<view class="text">普通机构</view>
+				</view>
+				<view class="item" @click.stop="this.$api.navigateTo('/seller/pages/login/register-member')">
+					<view class="icon">
+						<image src="https://static.caimei365.com/app/img/icon/icon-member.png" mode=""></image>
+					</view>
+					<view class="text">会员机构</view>
+				</view>
+			</view>
+			<view class="main-item-text">
+				提示:请尽量搜集客户完整信息,优先注册会员机构
+			</view>	
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data() {
+			return{
+				
+			}
+		},
+		onLoad(option) {
+
+		},
+		computed: {
+			
+		},
+		methods:{
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.register{
+		width: 100%;
+		height: 100%;
+		position: relative;
+		box-sizing: border-box;
+		padding-top: 100rpx;
+		.main{
+			width: 100%;
+			height: 370rpx;
+			.main-item-text{
+				width: 100%;
+				height: 100rpx;
+				float: left;
+				box-sizing: border-box;
+				margin-top: 150rpx;
+				text-align: center;
+				font-size: 24rpx;
+				line-height: 100rpx;
+				color: #fea785;
+			}
+			.main-item{
+				width: 100%;
+				height: auto;
+				float: left;
+				box-sizing: border-box;
+				margin-top: 20rpx;
+				.item{
+					width: 100%;
+					height: auto;
+					float: left;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					margin-top: 80rpx;
+					.icon{
+						width: 190rpx;
+						height: 190rpx;
+						image{
+							width: 190rpx;
+							height: 190rpx;
+							display: block;
+						}
+					}
+					.text{
+						line-height: 54rpx;
+						font-size: $font-size-30;
+						text-align: center;
+						color: #333333;
+					}
+					.text-small{
+						line-height: 54rpx;
+						font-size: $font-size-24;
+						text-align: center;
+						color: #999999;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 88 - 84
seller/pages/login/register.vue

@@ -14,7 +14,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from code">
 					<view class="label">手机号:</view>
-					<input class="row-input phone" type="text" v-model="registerMobile" placeholder="请输入联系人手机号" maxlength="11"/>
+					<input class="row-input phone" type="text" v-model="bindMobile" placeholder="请输入联系人手机号" maxlength="11"/>
 				</view>
 				<view class="register-from btn">
 					<button class="row-input" type="button" @click.stop="registerCheckMobile()">检测</button>
@@ -66,7 +66,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
-					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shortName" placeholder="请输入您的机构简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -88,7 +88,6 @@
 							placeholder-class="placeholder"
 							maxlength="35"
 							@input="onTextareaInput"
-							@focus="textareaFocus"
 							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
@@ -103,10 +102,10 @@
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="businessLicense === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
-							<view class="upload-del" @click="delBusinessImage">
+							<image :src="businessLicense" mode="" @click="viewBusinessImage"></image>
+							<view class="upload-del" @click="DelImage(1)">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
 						</view>
@@ -115,10 +114,10 @@
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMentuzImage === ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="shopPhoto === ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMentuzImage" mode=""  @click="viewMentuzImage"></image>
-							<view class="upload-del" @click="delMentuzImage">
+							<image :src="shopPhoto" mode=""  @click="viewMentuzImage"></image>
+							<view class="upload-del" @click="DelImage(2)">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
 						</view>
@@ -152,10 +151,10 @@
 				<view class="register-picture zz">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage === ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="medicalPracticeLicense === ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
-							<view class="upload-del" @click="delMedicalImage">
+							<image :src="medicalPracticeLicense" mode=""  @click="viewMedicalImage"></image>
+							<view class="upload-del" @click="DelImage(3)">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
 						</view>
@@ -256,13 +255,13 @@
 				},
 				isIphoneX:this.$store.state.isIphone,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				userID:'',//协销ID
+				userId:'',//协销ID
 				isPreviewImage:false,   	//预览图片开关
 				registerEmail:'', 		//注册邮箱
 				clubName:'',	 		//机构名称
-				abbreviation:'',	 	//机构简称
+				shortName:'',	 	//机构简称
 				clubContact:'',	 		//联系人
-				registerMobile:'',		//联系人手机号
+				bindMobile:'',		//联系人手机号
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
@@ -271,13 +270,13 @@
 				isUpgrade:false,
 				isDownUpgrade:true,
 				isCheck:false,			//是否勾选协议
-				uploadBusinessImage:'',	//营业执照图片
-				uploadMentuzImage:'',  	//门头照图片
-				uploadMedicalImage:'', 	//资质照图片
+				businessLicense:'',	//营业执照图片
+				shopPhoto:'',  	//门头照图片
+				medicalPracticeLicense:'', 	//资质照图片
 				department:'',			//科室
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
-				mainpro:'',				//主营内容
+				mainProduct:'',				//主营内容
 				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
 				beautyList:beautyList,
@@ -290,9 +289,9 @@
 				customItemValue:'', 	//自定义项目
 				addressData:{
 					address:'请选择机构所在地区',
-					townID:'',			//区ID
-					cityID:'',			//区ID
-					provinceID:'',		//区ID
+					townId:'',			//区ID
+					cityId:'',			//区ID
+					provinceId:'',		//区ID
 					addressDetail: '',	//地址
 				},
 				registerBtnText:'确定'
@@ -309,19 +308,21 @@
 				})
 			},
 			registerCheckMobile(){
-				if( this.registerMobile == ''){
+				if( this.bindMobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.registerMobile)){
+				if(!this.$reg.isMobile(this.bindMobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				this.SellerService.SellerClubCheck({mobileOrEmail:this.registerMobile}).then(response =>{
-					this.$util.msg(response.data,2000);
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
+				this.SellerService.SellerClubCheck({bindMobile:this.bindMobile})
+					.then(response =>{
+						this.$util.msg(response.data,2000);
+					})
+					.catch(error =>{
+						this.$util.msg(error.msg,2000);
+					})
 			},
 			registerStepsSub(){
 				let params = {};
@@ -330,11 +331,11 @@
 						this.$util.msg('请输入联系人姓名',2000);
 						return
 					}
-					if( this.registerMobile == ''){
+					if( this.bindMobile == ''){
 						this.$util.msg('请输入联系人手机号',2000);
 						return
 					}
-					if(!this.$reg.isMobile(this.registerMobile)){
+					if(!this.$reg.isMobile(this.bindMobile)){
 						this.$util.msg('手机格式不正确',2000);
 						return
 					}	
@@ -350,7 +351,7 @@
 						this.$util.msg('请输入机构名称',2000);
 						return
 					}
-					if( this.addressData.townID == ''){
+					if( this.addressData.townId == ''){
 						this.$util.msg('请选择机构地址',2000);
 						return
 					}
@@ -358,12 +359,12 @@
 						this.$util.msg('请填写机构详细地址',2000);
 						return
 					}
-					if( this.uploadBusinessImage == ''){
+					if( this.businessLicense == ''){
 						this.$util.msg('请上传您的营业执照',2000);
 						return
 					}
 					if(this.isOrganizationType!=0){
-						if(this.mainpro == ''){
+						if(this.mainProduct == ''){
 							this.$util.msg('请选择住机构主营内容',2000);
 							return
 						}
@@ -373,37 +374,36 @@
 						return
 					}
 					params ={
-						source:1,
-						email:this.registerEmail,
+						contractEmail:this.registerEmail,
 						name:this.clubName,
-						linkMan1:this.clubContact,
-						bindMobile:this.registerMobile,
-						sname:this.abbreviation,
-						provinceID:this.addressData.provinceID,
-						cityID:this.addressData.cityID,
-						townID:this.addressData.townID,
+						linkMan:this.clubContact,
+						bindMobile:this.bindMobile,
+						shortName:this.shortName,
+						provinceId:this.addressData.provinceId,
+						cityId:this.addressData.cityId,
+						townId:this.addressData.townId,
 						address:this.addressData.addressDetail,
 						socialCreditCode:this.socialCreditCode,
-						businessLicenseImage:this.uploadBusinessImage,
-						headpic:this.uploadMentuzImage,
-						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
-						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
-						department:this.department,			//科室
-						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						isAgreed:this.isAgreed,				//是否勾选协议	
-						mainpro:this.mainpro,
-						userID:this.userID
+						businessLicense:this.businessLicense,
+						shopPhoto:this.shopPhoto,
+						firstClubType:Number(this.isOrganizationType), //机构类型分类 医美:0和生美:1
+						secondClubType:Number(this.secondClubType),	   //机构类型二级分类 诊所:1,门诊:2,医院:3
+						department:this.department,	//科室
+						medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
+						isAgreed:this.isAgreed,//是否勾选协议	
+						mainProduct:this.mainProduct,
+						userId:this.userId
 					}
 				}else{
 					if( this.clubContact == ''){
 						this.$util.msg('请输入联系人姓名',2000);
 						return
 					}
-					if( this.registerMobile == ''){
+					if( this.bindMobile == ''){
 						this.$util.msg('请输入联系人手机号',2000);
 						return
 					}
-					if(!this.$reg.isMobile(this.registerMobile)){
+					if(!this.$reg.isMobile(this.bindMobile)){
 						this.$util.msg('手机格式不正确',2000);
 						return
 					}	
@@ -412,11 +412,10 @@
 						return
 					}
 					params ={
-						source:1,
-						linkMan1:this.clubContact,
-						bindMobile:this.registerMobile,
+						linkMan:this.clubContact,
+						bindMobile:this.bindMobile,
 						isAgreed:this.isAgreed,				//是否勾选协议	
-						userID:this.userID
+						userId:this.userId
 					}
 				}
 				this.SellerService.SellerClubRegister(params).then(response =>{
@@ -437,9 +436,9 @@
 			onConfirm(e) {//获取选择的地址信息
 				console.log('地址',e);
 				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
+				this.addressData.townId = e.townCode;
+				this.addressData.cityId = e.cityCode;
+				this.addressData.provinceId = e.provinceCode;
 			},	
 			onTextareaInput(e){//地址详细信息
 			   this.addressData.addressDetail = e.detail.value;
@@ -457,27 +456,27 @@
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadBusinessImage = JSON.parse(res.data).data
+					this.businessLicense = JSON.parse(res.data).data
 				})
 			},
 			chooseMentuzImage() {//门头照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMentuzImage = JSON.parse(res.data).data
+					this.shopPhoto = JSON.parse(res.data).data
 				})
 			},
 			chooseMedicalImage() {//资质照图片上传
 				uploadFileImage().then(res =>{
-					this.uploadMedicalImage = JSON.parse(res.data).data
+					this.medicalPracticeLicense = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {//预览营业执照图片
-				this.myPreviewImageFn(this.uploadBusinessImage)
+				this.myPreviewImageFn(this.businessLicense)
 			},
 			viewMentuzImage(e) {//预览门头照图片
-				this.myPreviewImageFn(this.uploadMentuzImage)
+				this.myPreviewImageFn(this.shopPhoto)
 			},
 			viewMedicalImage(e) {//预览资质照图片
-				this.myPreviewImageFn(this.uploadMedicalImage)
+				this.myPreviewImageFn(this.medicalPracticeLicense)
 			},
 			myPreviewImageFn(url){//预览图片公共方法
 				this.isPreviewImage = true
@@ -488,20 +487,25 @@
 					current: 0
 				});
 			},
-			delBusinessImage(){//删除营业执照图片
-				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.uploadBusinessImage = ''
-				})
-			},
-			delMentuzImage(){//删除门头照图片
-				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
-					this.uploadMentuzImage = ''
-				})
-			},			
-			delMedicalImage(){//删除资质图片
-				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
-					this.uploadMedicalImage = ''
-				})
+			DelImage(index){//删除营业执照图片
+				switch(index){
+					case 1:
+						this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
+							 this.businessLicense = ''
+						})
+						break;
+					case 2:
+						this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
+							this.shopPhoto = ''
+						})
+						break;
+					case 3:
+						this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
+							this.medicalPracticeLicense = ''
+						})
+						break;
+				}
+				
 			},
 			bindPickerChange() {//机构类型选择
 				let self = this
@@ -528,7 +532,7 @@
 			},
 			radioChange(e) {
 				this.secondClubType = e.target.value;
-				if( this.secondClubType == '2' || this.secondClubType == '3'){
+				if( this.secondClubType == 2 || this.secondClubType == 3){
 					this.isDepartment = true
 				}else{
 					this.isDepartment = false
@@ -541,10 +545,10 @@
 				}
 			},
 			chooseMaleLike(e){
-				this.mainpro = this.checkLikes(e,this.mentuzCampList)
+				this.mainProduct = this.checkLikes(e,this.mentuzCampList)
 			},
 			chooseMaleLikes(e){
-				this.mainpro = this.checkLikes(e,this.medicaCampList)
+				this.mainProduct = this.checkLikes(e,this.medicaCampList)
 			},
 			checkLikes(e,list){
 				let	values = e.detail.value
@@ -605,7 +609,7 @@
 				return
 			}
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userId = resolve.userId ? resolve.userId : 0
 			})
 		}
 	}

+ 2 - 2
seller/pages/order/create-order.vue

@@ -180,7 +180,7 @@
 			getInitProdcutCrearOrder(option){//二手下单初始化查询
 				this.$api.getStorage().then((resolve) =>{
 					this.seconDepositFlg = false;
-					this.serviceProviderId = resolve.serviceProviderID
+					this.serviceProviderId = resolve.serviceProviderId
 					let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,productCount:this.productCount,productId:this.productIds}
 					this.SellerService.GetSettlementBySencondProduct(params).then(response =>{
 						let resData = response.data
@@ -195,7 +195,7 @@
 			},
 			getInitCrearOrder(option){//协销购物车跳转确认订单初始化信息
 				this.$api.getStorage().then((resolve) =>{
-					this.serviceProviderId = resolve.serviceProviderID
+					this.serviceProviderId = resolve.serviceProviderId
 					let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,count:this.productCount,productIds:this.productIds}
 					this.SellerService.SellerSettlement(params).then(response =>{
 						let data = response.data

+ 287 - 0
seller/pages/order/create-recharge-order.vue

@@ -0,0 +1,287 @@
+<template>
+	<view class="container order clearfix" :style="{paddingBottom :isIphoneX ? '170rpx' : '134rpx'}">
+		<view class="product-info">
+			<view class="product-logo">
+				<image :src="productInfo.mainImage" mode=""></image>
+			</view>
+			<view class="product-cent">
+				<view class="product-name">商品编码:{{  productInfo.productCode }}</view>
+				<view class="product-note">规格:{{  productInfo.unit }}</view>
+				<view class="product-nums">X1</view>
+			</view>
+		</view>
+		<view class="created-info">
+			<view class="created-item">
+				<view class="label">商品名称:</view>
+				<input class="input" type="text" v-model="params.name" placeholder="必填,最多不超过40个汉字" maxlength="40"/>
+			</view>
+			<view class="created-item">
+				<view class="label">商品价格:</view>
+				<input class="input" type="number" v-model="params.price" placeholder="必填" maxlength="20"/>
+			</view>
+			<view class="created-item">
+				<view class="label">备注:</view>
+				<input class="input" type="number" v-model="params.note" placeholder="选填,最多不超过50个汉字" maxlength="50"/>
+			</view>
+			<view class="created-item">
+				<view class="label-total">合计:<text class="red">¥{{params.price | NumFormat}}</text>  </view>
+			</view>	
+		</view>
+		<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
+			<view class="footer-le">
+				<view class="footer-count">
+					<text>共1件商品</text>
+				</view>
+				<view class="footer-price">
+					<view class="sum">总价:<text class="price">¥{{params.price | NumFormat}}</text></view>
+				</view>
+			</view>
+			<view class="footer-submit" @click.stop="orderSubmitMit">
+				<view class="btn">提交订单</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				isIphoneX:this.$store.state.isIphoneX,
+				productInfo:{},
+				params:{
+					name:'',
+					price:'', 
+					note:'', 
+					userId:0 , 
+					serviceProviderId:0
+				}
+			}
+		},
+		onLoad(option){//商品数据
+			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
+				this.params.userId = resolve.userID
+				this.getInitCrearOrder();
+			})
+		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		},
+		methods: {
+			getInitCrearOrder(option){//协销购物车跳转确认订单初始化信息
+				this.$api.getStorage().then((resolve) =>{
+					this.params.serviceProviderId = resolve.serviceProviderId
+					this.SellerService.SellerProductRechargeGoods({
+						productId:6060,
+					})
+					.then(response =>{
+						this.productInfo = response.data
+						console.log(this.productInfo)
+					})
+					.catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})
+			},
+			orderSubmitMit(){//提交订单
+				if( this.params.name == ''){
+					this.$util.msg('请填写商品名称',2000);
+					return
+				}
+				if( this.params.price == ''){
+					this.$util.msg('请填写商品价格',2000);
+					return
+				}
+				this.SellerService.SellerSubmitRechargeOrder({'params':JSON.stringify(this.params)}).then(response =>{
+					const data = response.data;
+					if(data.code === '1'){
+						this.$util.msg('支付成功',2000,true,'success')
+						setTimeout(() =>{
+							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
+						},2000)
+					}else{
+						this.$util.msg('订单提交成功',2000,true,'success')
+						setTimeout(()=>{
+							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
+						},2000)
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+		},
+		onShow() {
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: auto;
+		background:#F7F7F7;
+	}
+	.product-info{
+		width: 100%;
+		height: 228rpx;
+		float: left;
+		box-sizing: border-box;
+		padding: 24rpx;
+		background-color: #ffffff;
+		.product-logo{
+			width: 180rpx;
+			height: 180rpx;
+			border-radius: 8rpx;
+			float: left;
+			image{
+				width: 180rpx;
+				height: 180rpx;
+				display: block;
+				border-radius: 8rpx;
+			}
+		}
+		.product-cent{
+			width: 498rpx;
+			height: 180rpx;
+			float: right;
+			.product-name{
+				width: 100%;
+				height: 50rpx;
+				float: left;
+				line-height: 50rpx;
+				font-size: $font-size-28;
+				color: #333333;
+				text-align: left;
+			}
+			.product-note{
+				width: 100%;
+				height: 50rpx;
+				float: left;
+				line-height: 50rpx;
+				font-size: $font-size-28;
+				color: #999999;
+				text-align: left;
+			}
+			.product-nums{
+				width: 100%;
+				height: 50rpx;
+				float: left;
+				line-height: 50rpx;
+				font-size: $font-size-28;
+				color: #333333;
+				text-align: right;
+				margin-top: 40rpx;
+			}
+		}
+	}
+	.created-info{
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		padding: 24rpx;
+		background-color: #FFFFFF;
+		float: left;
+		.created-item{
+			width: 100%;
+			height: 64rpx;
+			float: left;
+			margin-bottom: 24rpx;
+			.label{
+				width: 148rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				font-size: $font-size-28;
+				text-align: left;
+				color: #666666;
+				float: left;
+			}
+			.input{
+				width: 550rpx;
+				height: 64rpx;
+				box-sizing: border-box;
+				border: 1px solid #e1e1e1;
+				padding: 0 20rpx;
+				line-height: 64rpx;
+				font-size: $font-size-26;
+				color: #666666;
+				float: left;
+				border-radius: 8rpx;
+			}
+			.label-total{
+				text-align: right;
+				font-size: $font-size-28;
+				.red{
+					color: #f94b4b;
+				}
+			}
+		}
+	}
+	.footer{
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 995;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 110rpx;
+		line-height: 110rpx;
+		justify-content: space-between;
+		font-size: $font-size-28;
+		background-color: #FFFFFF;
+		z-index: 998;
+		color: $text-color;
+		.footer-le{
+			width:570rpx;
+			height:100%;
+			float: left;
+		}
+		.footer-count{
+			float: left;
+			padding-left: 24rpx;
+			width:190rpx;
+			box-sizing: border-box;
+			font-size: $font-size-26;
+		}
+		.footer-price{
+			width:370rpx;
+			float: right;
+			text-align: right;
+			color: $text-color;
+			padding: 10rpx 20rpx 10rpx 0;
+			box-sizing: border-box;
+			.sum{
+				width: 100%;
+				height: 90rpx;
+				line-height: 90rpx;
+				float: left;
+				.price{
+					font-size: $font-size-32;
+					color: #FF2A2A;
+				}
+			}
+			
+		}
+		.footer-submit{
+			display:flex;
+			align-items:center;
+			justify-content: center;
+			width: 180rpx;
+			height: 100%;
+			box-sizing: border-box;
+			padding: 15rpx 5rpx;
+			.btn{
+				width: 100%;
+				height: 100%;
+				color: #FFFFFF;
+				background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+				font-size: $font-size-26;
+				text-align: center;
+				line-height: 80rpx;
+				border-radius: 40rpx;
+			}
+		}
+	}
+</style>

+ 1 - 1
seller/pages/order/myOrder.vue

@@ -178,7 +178,7 @@
 				 */ 
 				// setTimeout(()=>{this.skeletonShow = false},1500)
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
+					this.userID = resolve.userId ? resolve.userId : 0
 					let param = {orderState:index,userID:this.userID,index:1,pageSize:this.pageSize,organizeID:this.userOrganizeID}
 					this.$api.lodingGet('/order/myOrder',param,
 						response => {

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

@@ -139,7 +139,7 @@
 				this.listType = option.listType
 			}
 			this.$api.getStorage().then((resolve) =>{
-				this.againUserId = resolve.userID
+				this.againUserId = resolve.userId ? resolve.userId : 0
 			})
 			this.getHeaderTopHeight()
 			this.initOrderDetaileData()
@@ -360,7 +360,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderID
+				this.serviceProviderId = resolve.serviceProviderId
 			})
 		}
 	}

+ 1 - 1
seller/pages/order/order-historylist.vue

@@ -184,7 +184,7 @@
 				}
 			});
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 			})
 		},
 		filters:{

+ 3 - 3
seller/pages/order/order-list.vue

@@ -31,7 +31,7 @@
 						<view v-else class="tui-order-content">
 							<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-name">{{order.clubName}}</view>
+									<view class="order-title-name">{{order.clubName ? order.clubName : ''}}</view>
 									<view class="order-title-t">
 										<view class="Rebate " v-if="order.rebateFlag==1">返佣</view>
 										<text class="bage-buss tui-skeleton-fillet" v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4">协销</text>
@@ -222,7 +222,7 @@
 				}
 			});
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
+				this.userID = resolve.userId ? resolve.userId : 0
 			})
 		},
 		filters:{
@@ -299,7 +299,7 @@
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
-						this.serviceProviderId = resolve.serviceProviderID
+						this.serviceProviderId = resolve.serviceProviderId
 						let params = {
 								listType:index,
 								orderSubmitType:this.screenTab,

+ 3 - 3
seller/pages/search/search-order.vue

@@ -30,7 +30,7 @@
 					<view v-else class="tui-order-content">
 						<view  class="tui-order-item" v-for="(order,orderIndex) in orderList" :key="orderIndex" @click.stop="detail(order.orderID)">
 							<view class="order-title">
-								<view class="order-title-name">{{order.clubName}}</view>
+								<view class="order-title-name">{{order.clubName ? order.clubName : ''}}</view>
 								<view class="order-title-t">
 									<text class="bage-buss tui-skeleton-fillet" v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4">协销</text>
 									<text class="bage-auto tui-skeleton-fillet" v-if="order.orderSubmitType == 0 || order.orderSubmitType == 1 || order.orderSubmitType == 2">自主</text>
@@ -185,7 +185,7 @@
 			},
 			initGetSerachRecord(){
 				this.$api.getComStorage('userInfo').then((resolve) =>{
-					this.userID = resolve.userID
+					this.userID = resolve.userId ? resolve.userId : 0
 					this.OrderService.SearchOrderHistory({userId:this.userID}).then(response =>{
 						this.serachRecordList = response.data
 						if(this.serachRecordList.length>0){
@@ -429,7 +429,7 @@
 		onShow() {
 			this.setScrollHeight();
 			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderID
+				this.serviceProviderId = resolve.serviceProviderId
 			})
 		}
 	}

+ 9 - 3
services/ajax.service.js

@@ -1,7 +1,8 @@
 /**
  * ajax请求相关的服务
  */
-import baseUrl from './ajax.env'
+import spiServiceUrl from './ajax.env'
+import corServiceUrl from './config.env'
 import { msg } from '@/utils/util'
 
 class AjaxService {
@@ -9,7 +10,7 @@ class AjaxService {
 		this.name = 'AjaxService'
 	}
 	getBaseUrl (url = '') {
-		return url.indexOf('://') > -1 ? url : baseUrl + url
+		return url.indexOf('://') > -1 ? url : url
 	}
 	getHeaders({ header = {} }) {
 		const REV_TOKEN_ENV = uni.getStorageSync('token') ? uni.getStorageSync('token') : 'X-token';
@@ -22,10 +23,15 @@ class AjaxService {
 	}
 	request(options = {}) {
 		let header = this.getHeaders(options)
+		let url = this.getBaseUrl(options.url)
 		if (options.header) {
 			header = Object.assign(header, options.header)
 		}
-		let url = this.getBaseUrl(options.url)
+		if(options.isHost){
+			url = corServiceUrl + url
+		}else{
+			url = spiServiceUrl + url
+		}
 		let { isLoading = true } = options
 		if (isLoading) {
 			wx.showLoading({ title: '加载中' })

+ 11 - 0
services/config.env.js

@@ -0,0 +1,11 @@
+let URL_CONFIG = ''
+if(process.env.NODE_ENV === 'development'){
+    // 开发环境
+    // URL_CONFIG = 'http://192.168.2.75:18002'	 //采美测试地址
+	// URL_CONFIG = 'http://192.168.2.67:18002'	 //裴裴联调地址
+	URL_CONFIG = 'https://core-b.caimei365.com'
+}else{
+    // 生产环境
+	URL_CONFIG = 'https://core.caimei365.com'
+}
+export default URL_CONFIG

+ 58 - 3
services/public.service.js

@@ -11,13 +11,68 @@ export default class PublicService {
 	 * platformType:小程序 2  WWW 0  CRM 1 
 	 */
 	GetImgVerifyCode (data = {platformType:2}) {
-		return this.AjaxService.get({ url:'/user/getImgVerifyCode', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/user/captcha', 
+			data, 
+			isLoading: true,
+			isHost:true
+		})
 	}
 	/**
 	 * 获取图形验证码
 	 * activateCodeType:机构 2  供应商 3 找回密码 1 
 	 */
 	GetMobileCode (data = {}) {
-		return this.AjaxService.get({ url:'/user/activateCodeByReg', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/user/activateCodeByReg', 
+			data, 
+			isLoading: true 
+		})
 	}
-}
+	/**
+	 * 获取图形验证码
+	 * activateCodeType:机构 2  供应商 3 找回密码 1 
+	 */
+	GetMobileCode (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/user/activateCodeByReg', 
+			data, 
+			isLoading: true 
+		})
+	}
+	/**
+	 * 获取手机短信验证码
+	 * isCheckCaptcha 	是否需要图形验证码:1:检查 , 0:不检查
+	 * mobile			手机号
+	 * activateCodeType 短信类型 :1:找回密码, 2:手机号注册机构, 3:供应商注册
+	 * imgCode          图片验证码
+	 * token            图片验证码token
+	 * platformType: 	来源:0:www,1:crm/h5,2:小程序
+	 */
+	GetRegisterMobileCode (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/user/sms/code', 
+			data, 
+			isLoading: true,
+			isHost:true
+		})
+	}
+	/**
+	 * 获取手机短信验证码
+	 * bindMobile 		机构手机号
+	 * isCheckCaptcha 	是否需要图形验证码:1:检查 , 0:不检查z
+	 * mobile			运营人员手机号
+	 * userId			机构用户UserId
+	 * imgCode          图片验证码
+	 * token            图片验证码token
+	 * platformType: 	来源:0:www,1:crm/h5,2:小程序
+	 */
+	GetBindMobileCode (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/user/sms/bind', 
+			data, 
+			isLoading: true,
+			isHost:true
+		})
+	}
+}	

+ 40 - 3
services/sellse.service.js

@@ -14,7 +14,12 @@ export default class SellerService {
 	 *@param password 密码
 	 */
 	SellerLogin (data={}){
-		return this.AjaxService.post({ url:'/seller/login', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/user/login/seller', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销账户中心
@@ -28,14 +33,24 @@ export default class SellerService {
 	 *@param userID 协销ID
 	 */
 	SellerClubRegister (data={}){
-		return this.AjaxService.post({ url:'/seller/club/register', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/user/register/club/online', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销拉机构上线检测手机号和邮箱
 	 *@param mobileOrEmail 手机号和邮箱
 	 */
 	SellerClubCheck (data={}){
-		return this.AjaxService.post({ url:'/seller/club/check', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/user/register/check', 
+			data, 
+			isLoading: true,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销机构列表
@@ -180,6 +195,28 @@ export default class SellerService {
 	SellerSettlement (data = {}) {
 		return this.AjaxService.post({ url:'/seller/settlement', data, isLoading: true })
 	}
+	/**
+	 *@协销下定金商品订单初始化
+	 *@param productIds 商品ID
+	 */
+	SellerProductRechargeGoods (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/product/rechargeGoods', 
+			data, 
+			isLoading: true ,
+		})
+	}
+	/**
+	 *@协销帮机构下定金商品订单提交
+	 *@param productIds 商品ID
+	 */
+	SellerSubmitRechargeOrder (data = {}) {
+		return this.AjaxService.post({ 
+			url:'/order/submit/rechargeOrder', 
+			data, 
+			isLoading: true ,
+		})
+	}
 	/**
 	 *@协销帮机构下单提交订单
 	 *@param orderSource 2,//提交来源

+ 6 - 1
services/shop.service.js

@@ -8,7 +8,12 @@ export default class ShopService {
 	}
 	/* 小程序-供应商注册第一步 */
 	SupplierAppletsRegistered (data = {}) {
-		return this.AjaxService.post({ url:'/supplier/appletsRegistered', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/user/register/shop', 
+			data, 
+			isLoading: true,
+			isHost:true
+		})
 	}
 	/* 小程序-搜索供应商列表 */
 	GetSearchSupplierList (data = {}) {

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است