Browse Source

commit 4月小需求

zhengjinyi 4 years ago
parent
commit
87e7104281

+ 5 - 8
App.vue

@@ -90,14 +90,11 @@
 			refresh(){
 			refresh(){
 				let TIME = (20*60)*1000;
 				let TIME = (20*60)*1000;
 				setInterval(()=>{
 				setInterval(()=>{
-					authorize.getSetting().then(res =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-						if(res == 1){
-							this.getWxAuthorize()
-						}else{
-							console.log('授权失败============>:'+'用户取消授权或者未操作')
-						}
-					}).catch(error=>{
-						console.log('授权失败============>:'+'用户授权失败,提醒用户重新授权')
+					authorize.checkLogin().then(res => {
+						this.getWxAuthorize()
+					})
+					.catch(err => {
+						console.log(new Date +'用户未授权微信信息')
 					})
 					})
 				},TIME)
 				},TIME)
 			},
 			},

+ 23 - 1
common/config/authorize.js

@@ -127,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
+}

+ 1 - 0
common/config/wxLogin.js

@@ -9,6 +9,7 @@ const newUserService = new UserService(ajaxService)
 const wxLoginAuthorize = async function(){
 const wxLoginAuthorize = async function(){
 	const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 	const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 	const getUserInfo = await authorize.getUserInfo('weixin');
 	const getUserInfo = await authorize.getUserInfo('weixin');
+	console.log(getUserInfo)
 	newUserService.UserLoginAuthApplets({ 
 	newUserService.UserLoginAuthApplets({ 
 		code:wechatCode,
 		code:wechatCode,
 		encryptedData:getUserInfo.encryptedData,
 		encryptedData:getUserInfo.encryptedData,

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

@@ -239,14 +239,14 @@
 				this.$api.navigateTo(`/pages/goods/product?id=${item.productID}&path=activity`)
 				this.$api.navigateTo(`/pages/goods/product?id=${item.productID}&path=activity`)
 			},
 			},
 			navigator(){
 			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){//处理小数点后两位数
 			toFixedFn(text){//处理小数点后两位数
 				return Number(text).toFixed(2);
 				return Number(text).toFixed(2);

+ 3 - 0
main.js

@@ -12,10 +12,13 @@ import cuCustom from './components/cm-custom/cu-custom.vue'
 import auCustom from './components/cm-custom/au-custom.vue'
 import auCustom from './components/cm-custom/au-custom.vue'
 import cmCustom from './components/cm-custom/cm-custom.vue'
 import cmCustom from './components/cm-custom/cm-custom.vue'
 import scrollTop from '@/components/cm-module/scrollTop/scrollTop.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('cu-custom',cuCustom)
 Vue.component('au-custom',auCustom)
 Vue.component('au-custom',auCustom)
 Vue.component('cm-custom',cmCustom)
 Vue.component('cm-custom',cmCustom)
 Vue.component('scroll-top',scrollTop)
 Vue.component('scroll-top',scrollTop)
+Vue.component('city-Picker',CityPicker)
 
 
 Vue.prototype.$getStorage = function(key){
 Vue.prototype.$getStorage = function(key){
 	var userParam = uni.getStorageSync(key);
 	var userParam = uni.getStorageSync(key);

+ 18 - 0
pages.json

@@ -466,6 +466,24 @@
 						"navigationStyle":"custom"
 						"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",
 					"path": "pages/login/information",
 					"style": {
 					"style": {

+ 47 - 28
pages/authorization/authorization.vue

@@ -9,7 +9,7 @@
 			<text>您暂未授权采美采购小程序获取您的信息,将无法正常使用小程序的功能。如需正常使用,请点击“授权”按钮,并允许头像、昵称等信息的授权。</text>
 			<text>您暂未授权采美采购小程序获取您的信息,将无法正常使用小程序的功能。如需正常使用,请点击“授权”按钮,并允许头像、昵称等信息的授权。</text>
 		</view>
 		</view>
 		<view class="login-form">
 		<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 class="login-btn back" @tap="undGetuserinfo">取消</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -45,9 +45,31 @@
 			...mapState(['hasLogin','userInfo'])
 			...mapState(['hasLogin','userInfo'])
 		},
 		},
 		methods:{
 		methods:{
-			getuserinfo: function (e) {//微信授权
+			getUserProfile(){
+				const self = this
+				// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope
+				wx.getUserProfile({
+					desc: '采美采购商城小程序获取您的信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success(res) {
+						uni.login({
+							provider: 'weixin',
+							scopes: 'auth_user',
+							success() {
+								self.WxGetUserInfo()
+							},
+							fail(err) {
+								self.$util.msg(err, 2000)
+							}
+						})
+					},
+					fail() {
+						self.$util.msg('授权失败', 2000)
+					}
+				})
+			},
+			Getuserinfo: function (e) {//微信授权(暂时弃用)
 			    if (e.detail.userInfo) {
 			    if (e.detail.userInfo) {
-					this.wxGetUserInfo()
+					this.WxGetUserInfo()
 			    }else{
 			    }else{
 					this.$util.msg('授权失败',2000)
 					this.$util.msg('授权失败',2000)
 			    }
 			    }
@@ -67,33 +89,30 @@
 						uni.navigateBack({delta: 1})
 						uni.navigateBack({delta: 1})
 				}
 				}
 			},
 			},
-			wxGetUserInfo(){
+			WxGetUserInfo(){
 				let self = this
 				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)
 						}
 						}
-					})
+					}
 				})
 				})
 			}
 			}
 		}
 		}

+ 7 - 7
pages/goods/cart.vue

@@ -236,13 +236,13 @@
 				})	
 				})	
 			},
 			},
 			initLogin(){
 			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){
 			clickPopupShow(pros,type){
 				this.popupShow = true;
 				this.popupShow = true;

+ 7 - 8
pages/goods/good-floor.vue

@@ -51,14 +51,13 @@
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			if(option.type =='share'){
 			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.pageId = option.linkId
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 			this.$api.getComStorage('userInfo').then((resolve) =>{

+ 7 - 8
pages/goods/goods-classify.vue

@@ -238,14 +238,13 @@
 		onLoad(option) {
 		onLoad(option) {
 			console.log(option)
 			console.log(option)
 			if(option.type =='share'){
 			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.SetScrollHeight()
 			this.InitOption(option)
 			this.InitOption(option)

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

@@ -203,14 +203,13 @@
 				this.backPage = option.page
 				this.backPage = option.page
 			}
 			}
 			if(this.isShareType =='share'){
 			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: {
 		computed: {

+ 35 - 36
pages/goods/product.vue

@@ -366,14 +366,13 @@
 				this.backPage = option.page
 				this.backPage = option.page
 			}
 			}
 			if(this.isShareType =='share'){
 			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()
 			this.getWinHeight()
 		},
 		},
@@ -484,29 +483,29 @@
 
 
 			},
 			},
 			buyProductCart(){//底部购物车按钮点击
 			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){//加入购物车&&立即购买点击
 			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{
 					}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弹窗数量增加按钮
 			changeCountAdd(){//popup弹窗数量增加按钮
@@ -602,15 +601,15 @@
 				})
 				})
 			},
 			},
 			navToLogin(){
 			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(){
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
 				// 获得胶囊按钮位置信息

+ 13 - 15
pages/login/bindOperator.vue

@@ -102,14 +102,13 @@
 			console.log(option)
 			console.log(option)
 			uni.setStorageSync('bind_id', option.userID);
 			uni.setStorageSync('bind_id', option.userID);
 			this.getVerificationCode()
 			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: {
 		computed: {
 			...mapState(['isWxAuthorize'])
 			...mapState(['isWxAuthorize'])
@@ -169,13 +168,12 @@
 					this.$util.msg('验证码格式不正确',2000)
 					this.$util.msg('验证码格式不正确',2000)
 					return
 					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(){//图形验证
 			getVerificationCode(){//图形验证
 				this.PublicService.GetImgVerifyCode().then(res => {
 				this.PublicService.GetImgVerifyCode().then(res => {

+ 10 - 8
pages/login/login.vue

@@ -63,12 +63,13 @@
 					this.$util.msg('请输入密码',2000)
 					this.$util.msg('请输入密码',2000)
 					return
 					return
 				}
 				}
-				const wxCode = await authorize.getSetting();
-				if(wxCode == 1){
+				authorize.checkLogin()
+				.then(res => {
 					this.AorganizationLogin()
 					this.AorganizationLogin()
-				}else{
+				})
+				.catch(err => {
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				}
+				})
 			},
 			},
 			AorganizationLogin(){
 			AorganizationLogin(){
 				this.UserService.AorganizationLogin(this.params)
 				this.UserService.AorganizationLogin(this.params)
@@ -95,12 +96,13 @@
 				this.isShowEye = !this.isShowEye;
 				this.isShowEye = !this.isShowEye;
 			},
 			},
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
-				const code = await authorize.getSetting();
-				if(code == 1){
+				authorize.checkLogin()
+				.then(res => {
 					wxLogin.wxLoginQuick()
 					wxLogin.wxLoginQuick()
-				}else{
+				})
+				.catch(err => {
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				}
+				})
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {

+ 6 - 6
pages/login/register-supplier.vue

@@ -597,12 +597,12 @@
 			}
 			}
 		},
 		},
 		onShow() {
 		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')
 			})
 			})
 		}
 		}
 	}
 	}

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

@@ -224,13 +224,13 @@
 				})	
 				})	
 			},
 			},
 			initLogin(){
 			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){
 			clickPopupShow(pros,type){
 				this.popupShow = true;
 				this.popupShow = true;

+ 5 - 5
pages/tabBar/home/index.vue

@@ -204,18 +204,18 @@
 				uni.setStorageSync('isActivityStatus',true)	
 				uni.setStorageSync('isActivityStatus',true)	
 			},
 			},
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
-				const code = await authorize.getSetting();
-				console.log(code)
-				if(code == 1){
+				authorize.checkLogin()
+				.then(res => {
 					this.GetWxAuthorize()
 					this.GetWxAuthorize()
-				}else{
+				})
+				.catch(err => {
 					this.$api.getComStorage('userInfo').then((resolve) =>{
 					this.$api.getComStorage('userInfo').then((resolve) =>{
 						this.userID = resolve.userId ? resolve.userId :0;
 						this.userID = resolve.userId ? resolve.userId :0;
 						this.getHomeInformation()
 						this.getHomeInformation()
 					}).catch(error =>{
 					}).catch(error =>{
 						this.getHomeInformation()
 						this.getHomeInformation()
 					})
 					})
-				}
+				})
 			}
 			}
 		},
 		},
 		onPageScroll(e){//实时获取到滚动的值
 		onPageScroll(e){//实时获取到滚动的值

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

@@ -278,28 +278,28 @@
 				})
 				})
 			},
 			},
 			navigator(url){
 			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{
 					}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){
 			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){
 			showBadge(n){
 				let num ='';
 				let num ='';

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

@@ -70,14 +70,12 @@
 		},
 		},
 		onLoad(option){
 		onLoad(option){
 			if(option.type =='share'){
 			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){
 			if(option.keyWord){
 				this.listQuery.keyword = option.keyWord
 				this.listQuery.keyword = option.keyWord

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

@@ -109,14 +109,12 @@
 		},
 		},
 		onLoad(option){
 		onLoad(option){
 			if(option.type =='share'){
 			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){
 			if(option.keyWord){
 				console.log(option.keyWord)
 				console.log(option.keyWord)

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

@@ -212,14 +212,12 @@
 		onLoad(option) {
 		onLoad(option) {
 			console.log(option)
 			console.log(option)
 			if(option.type =='share'){
 			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.$api.getStorage().then((resolve) =>{
 				this.userID = resolve.userId ? resolve.userId : 0;
 				this.userID = resolve.userId ? resolve.userId : 0;

+ 14 - 17
second/pages/product/product-details.vue

@@ -220,14 +220,12 @@
 				this.backPage = option.page
 				this.backPage = option.page
 			}
 			}
 			if(this.isShareType =='share'){
 			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: {
 		computed: {
@@ -285,15 +283,14 @@
 
 
 			},
 			},
 			navToLogin(){
 			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(){
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
 				// 获得胶囊按钮位置信息

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

@@ -149,14 +149,12 @@
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			if(option.type =='share'){
 			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: {
 		computed: {

+ 13 - 15
seller/pages/login/login.vue

@@ -54,14 +54,13 @@
 			}
 			}
 		},
 		},
 		onLoad() {
 		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: {
 		computed: {
 			...mapState(['isWxAuthorize'])
 			...mapState(['isWxAuthorize'])
@@ -102,13 +101,12 @@
 					this.$util.msg('请输入密码',2000)
 					this.$util.msg('请输入密码',2000)
 					return
 					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(){
 			SellerLogin(){
 				this.SellerService.SellerLogin(this.params)
 				this.SellerService.SellerLogin(this.params)

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

@@ -0,0 +1,280 @@
+
+<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" @click.stop="ShareRegister">分享</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data() {
+			return{
+				isRegisterStep:false,
+				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(response.data.userId)
+					},2000)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			GetClubUserInfo(userId){
+				this.UserService.OrganizationUpdateModifyInfo({userId:userId})
+				.then(response =>{
+					
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ShareRegister(res){
+				if (res.from === 'button') { // 来自页面内转发按钮
+				}
+				return {
+				  title: '您已注册采美365网,请点击登录',
+				  path: `pages/login/bindOperator?clubUserId=${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
+				}
+			},
+		},
+		onShareAppMessage(res){//分享转发
+			if (res.from === 'button') { // 来自页面内转发按钮
+		    }
+			return {
+			  title: '您已注册采美365网,请点击登录',
+			  path: `pages/login/bindOperator?clubUserId=${this.clubInfo.userId}`,
+			  imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
+			}
+		},
+	}
+</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>

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

@@ -0,0 +1,938 @@
+
+<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.bindMobile }}</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.address }}</view>		
+			</view>
+			<view class="main-form-item">
+				<view class="form-textarea">{{ clubInfo.addressDetail }}</view>		
+			</view>
+			<view class="main-form-item">
+				<view class="form-label">营业执照编号</view>
+				<view class="form-input">{{ 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="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
+				<view class="register-row">
+					<button open-type="share" class="register-btn sub" @click.stop="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:true,
+				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) {//处理金额
+				const text='';
+				switch(type){
+					case 1: text = '医美'; break;
+					case 2: text = '生美'; break;
+				}	
+				return text;
+			},
+			TwoFormat:function(type) {//处理金额
+				const 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:userId})
+				.then(response =>{
+					
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ShareRegister(res){
+				if (res.from === 'button') { // 来自页面内转发按钮
+				}
+				return {
+				  title: '您已注册采美365网,请点击登录',
+				  path: `pages/login/bindOperator?clubUserId=${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/bindOperator?clubUserId=${this.clubInfo.userId}`,
+			  imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
+			}
+		},
+	}
+</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-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-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>

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

@@ -0,0 +1,117 @@
+
+<template>
+	<view class="container register">
+		<view class="main">
+			<view class="title">请选择注册的账号类型</view>
+			<view class="main-item">
+				<view class="item" @click.stop="this.$api.navigateTo('/pages/login/register')">
+					<view class="icon">
+						<image src="https://static.caimei365.com/app/img/icon/icon-club.png" mode=""></image>
+					</view>
+					<view class="text by">采购方(买家)</view>
+					<view class="text-small">医院机构/美容会所/个人买家</view>
+				</view>
+				<view class="item" @click.stop="this.$api.navigateTo('/pages/login/register-supplier')">
+					<view class="icon">
+						<image src="https://static.caimei365.com/app/img/icon/icon-supplier.png" mode=""></image>
+					</view>
+					<view class="text my">供应商(卖家)</view>
+					<view class="text-small">仪器/产品/服务供应商</view>
+				</view>
+			</view>
+		</view>
+		<image class="bg_image" src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/11/%E8%83%8C%E6%99%AF.png" mode=""></image>
+	</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;
+			.title{
+				width: 100%;
+				height: 46rpx;
+				line-height: 46rpx;
+				float: left;
+				text-align: center;
+				font-size: $font-size-34;
+				color: $text-color;
+				font-weight: bold;
+			}
+			.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: 50rpx;
+					.icon{
+						width: 186rpx;
+						height: 186rpx;
+						image{
+							width: 186rpx;
+							height: 186rpx;
+							display: block;
+						}
+					}
+					.text{
+						line-height: 54rpx;
+						font-size: $font-size-30;
+						text-align: center;
+						&.by{
+							color: #3b77ff;
+						}
+						&.my{
+							color: #ff7a51;
+						}
+					}
+					.text-small{
+						line-height: 54rpx;
+						font-size: $font-size-24;
+						text-align: center;
+						color: #999999;
+					}
+				}
+			}
+		}
+		.bg_image{
+			position: absolute;
+			width: 100%;
+			height:354rpx;
+			left: 0;
+			bottom: 0;
+		}
+	}
+</style>

+ 16 - 16
supplier/pages/login/share-info.vue

@@ -35,16 +35,15 @@
 					this.source = 3
 					this.source = 3
 				}
 				}
 			}
 			}
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse != 1){
-					this.$api.navigateTo('/pages/authorization/authorization?type=4')
-					setTimeout(()=>{
-						this.isRequest = true
-					},2000)
-				}else{
-					this.infoMiniShipments();
-				}
-			})	
+			authorize.checkLogin().then(res => {
+				this.$api.navigateTo('/pages/authorization/authorization?type=4')
+				setTimeout(()=>{
+					this.isRequest = true
+				},2000)
+			})
+			.catch(err => {
+				this.infoMiniShipments();
+			})
 		},
 		},
 		methods:{
 		methods:{
 			infoMiniShipments(){
 			infoMiniShipments(){
@@ -88,12 +87,13 @@
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {
-			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(wxResponse == 1){
-					this.isRequest = false;
-					this.infoMiniShipments();
-				}
-			})	
+			authorize.checkLogin().then(res => {
+				this.isRequest = false;
+				this.infoMiniShipments();
+			})
+			.catch(err => {
+				console.log('用户未授权')
+			})
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 6 - 8
supplier/pages/user/my-shop.vue

@@ -274,14 +274,12 @@
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			if(option.type =='share'){
 			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.listQuery.id = this.supplierId = option.shopId
 			this.listQuery.id = this.supplierId = option.shopId
 			this.$api.getStorage().then((resolve) =>{
 			this.$api.getStorage().then((resolve) =>{