zhengjinyi 5 år sedan
förälder
incheckning
cc06b355ac

+ 2 - 0
api/use.js

@@ -278,6 +278,8 @@ export function userInfoLogin(params) {
 		request.post('/club/authorization',params,false, res => {
 			if(res.code == 0 || res.code == 4){
 				resolve(res)
+			}else if(res.code == -6){
+				resolve(res)
 			}else{
 				reject(res)
 			}

+ 2 - 2
components/cu-custom.vue

@@ -1,7 +1,7 @@
 <template name="headerNavbar">
 	<!-- 自定义导航栏 -->
 	<view class='navbar-wrap' :style="{height:CustomBar+'px',paddingTop:StatusBar+'px'}"> 
-	  	<view class="navbar-text" :style="{lineHeight:(CustomBar - StatusBar)+'px;',fontSize:fontSizeSetting+'px;'}" :class="platformClass">
+	  	<view class="navbar-text" :style="{lineHeight:(CustomBar - StatusBar)+'px;',fontSize:fontSizeSetting+'px;',paddingLeft:navbarData.textLeft ? 18+'rpx' : ''}" :class="platformClass">
 	    	{{navbarData.title ? navbarData.title : " "}}
 	  	</view>
 	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 
@@ -27,7 +27,7 @@
 		},
 		data() {
 			return{
-				haveBack: true,     // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
+				haveBack: true,// 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				StatusBar: this.StatusBar,
 				fontSizeSetting:this.fontSizeSetting,

+ 26 - 35
components/module/modelAlert/errorAlert.vue

@@ -10,6 +10,9 @@
 					<view class="text">
 						<text>系统检测到您的微信已绑定供应商账户,不能继续登录</text>
 					</view>
+					<view class="exit-btn">
+						<navigator open-type="exit" target="miniProgram" class="btn">退出</navigator>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -81,53 +84,41 @@
 				width: 100%;
 				height: 68rpx;
 				line-height: 68rpx;
-				font-size: $font-size-28;
+				font-size: $font-size-30;
 				color: $text-color;
 				text-align: center;
-				margin-bottom: 32rpx;
+				margin-bottom: 20rpx;
 				position: relative;
-				.icon-iconfontguanbi{
-					width: 68rpx;
-					height: 68rpx;
-					text-align: center;
-					line-height: 68rpx;
-					position: absolute;
-					right: 0;
-					top: 0;
-					font-size: $font-size-36;
-					color: #999999;
-				}
 			}
 			.text-content{
-				width: 100%;
+				width: 70%;
 				height: auto;
+				margin: 0 auto;
 				.text{
-					padding: 40rpx 0;
 					line-height: 44rpx;
-					font-size: $font-size-26;
+					font-size: $font-size-28;
 					color:#666666;
-					text-align: justify;
+					text-align: center;
 				}
-				.text-h1{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: justify;
+				.exit-btn{
+					width: 100%;
+					height: 70rpx;
+					display: flex;
+					align-items: center;
+					flex-direction:column;
+					margin-top: 30rpx;
+					.btn{
+						width: 200rpx;
+						line-height: 70rpx;
+						font-size: $font-size-28;
+						text-align: center;
+						color: #FFFFFF;
+						border-radius: 10rpx;
+						padding: 0;
+						background: $btn-confirm;
+					}
 				}
 			}
-			.btn{
-				width: 100%;
-				height: 88rpx;
-				float: left;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				font-size: $font-size-28;
-				text-align: center;
-				color: #FFFFFF;
-				border-radius: 0;
-				padding: 0;
-				margin-top: 2rpx;
-			}
 		}
 	}
 	

+ 25 - 14
market/pages/login/login.vue

@@ -20,29 +20,36 @@
 				<view class="iconfont" :class="isShowEye ? iconEyen : iconEyes"  @click="passwordClick"></view>
 			</view>
 		</view>
-		<view class="login-btn"  @click="confirmLogin">登录</view>
-		<view class="login-tel">客服热线:0755-22907771</view>
+		<view class="login-btn"  @click="confirmLogin">协销登录</view>
+		<!-- 微信用户已绑定供应商账户 -->
+		<error-alert v-if="iseErrorAlert"></error-alert>
 	</view>
 </template>
 
 <script>
 	import { mapMutations } from 'vuex';
+	import errorAlert from '@/components/module/modelAlert/errorAlert.vue'
 	import authorize from '@/common/config/authorize.js' 
 	import { sellerLogin } from '@/api/seller.js' 
 	import { userInfoLogin } from "@/api/use.js"
 	var self;
 	export default{
+		components:{
+			errorAlert
+		},
 		data() {
 			return{
 				nvabarData: {		//顶部自定义导航
 					showCapsule: 0, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
 					title: '登录',  // 导航栏 中间的标题
+					textLeft:true
 				},
 				isIphoneX:this.$store.state.isIphoneX,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isShowEye:false,
 				isSeller:false,
+				iseErrorAlert:false,
 				iconEyes:'icon-yanjing_yincang_o',
 				iconEyen:'icon-yanjing_xianshi_o',
 				accountNumber:'',  //协销用户登录账号
@@ -59,19 +66,23 @@
 					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 					authorize.getUserInfo('weixin').then(wxResponse =>{
 						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
-							if(response.data.userIdentity !=1){
-								this.logout()
-								uni.removeStorageSync('sessionid')
-								uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-								this.isSeller= true
+							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('/market/pages/index/index')
+								}
 							}else{
-								this.login(response.data);
-								this.$store.commit('updateStatus',response.data)
-								uni.setStorageSync('token',response.data.token)
-								uni.removeStorageSync('sessionid')
-								uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-								// this.$api.navigateTo('/market/pages/user/user')
-								this.$api.navigateTo('/market/pages/index/index')
+								this.isSeller= true
+								this.iseErrorAlert= true
 							}
 						}).catch(response =>{
 							this.logout()

+ 8 - 4
pages/login/login-accont.vue

@@ -119,7 +119,7 @@
 			flex-direction: column;
 			align-items: center;
 			height: 198rpx;
-			padding: 170rpx 0 60rpx 0;
+			padding: 140rpx 0 60rpx 0;
 			.logo{
 				width: 138rpx;
 				height: 118rpx;
@@ -193,11 +193,15 @@
 		}
 		.login-btn-last{
 			width: 702rpx;
+			height: 86rpx;
+			border-radius: 14rpx;
 			font-size: $font-size-28;
-			line-height: 160rpx;
+			line-height: 88rpx;
+			color: $color-system;
 			margin: 0 auto;
-			color: $text-color;
 			text-align: center;
+			border: 1px solid $color-system;
+			margin-top: 20rpx;
 		}
 		.login-tel{
 			width: 702rpx;
@@ -206,7 +210,7 @@
 			margin: 0 auto;
 			color: $text-color;
 			text-align: center;
-			margin-top: 100rpx;
+			margin-top: 150rpx;
 		}
 		.model-authorization{
 			width: 100%;