Browse Source

Merge branch 'master' of http://git.qiniu1314.com/zhang/jingcai

zyx 1 year ago
parent
commit
b60199f92e
1 changed files with 15 additions and 7 deletions
  1. 15 7
      pages/public/login.vue

+ 15 - 7
pages/public/login.vue

@@ -18,9 +18,10 @@
 					<image src="/static/icon/ze2.png"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus
-						:placeholder="$t('login.a3')"  /></view>
+						:placeholder="$t('login.a3')" /></view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">{{$t('login.a4')}}</button>
 			</view>
-			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">{{$t('login.a4')}}</button></view>
 			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true"
 					hover-class="none" @click="register">{{$t('login.a7')}}</button></view>
 			<navigator url="./forget">
@@ -64,7 +65,7 @@
 		getAppVersion
 	} from '@/api/index.js'
 	// #endif
-	
+
 	export default {
 		data() {
 			return {
@@ -119,7 +120,7 @@
 						})
 						return
 					}
-					if(type=="ios"){
+					if (type == "ios") {
 						window.open("/index/dom/iosdom.mobileconfig");
 					}
 				}
@@ -239,7 +240,13 @@
 							obj.login();
 							// 保存返回用户数据
 							obj.setUserInfo(e.data);
-							let ur = uni.getStorageSync('present') || '/pages/index/index';
+							let ur = '';
+							let url = uni.getStorageSync('present') || '';
+							if (url != '/pages/public/login' && url) {
+								ur = uni.getStorageSync('present')
+							} else {
+								ur = '/pages/index/index';
+							}
 							//成功跳转首页
 							uni.switchTab({
 								url: ur,
@@ -247,7 +254,7 @@
 									uni.navigateTo({
 										url: ur,
 										fail(e) {
-											uni.navigateTo({
+											uni.switchTab({
 												url: '/pages/index/index',
 											});
 										}
@@ -446,6 +453,7 @@
 		color: #cbb174;
 		font-size: 40rpx;
 	}
+
 	/* #ifdef H5 */
 	.loadapp {
 		margin-top: 20rpx;
@@ -454,6 +462,6 @@
 		color: #feb041;
 		width: 45%;
 	}
+
 	/* #endif */
-	
 </style>