|
@@ -3,7 +3,7 @@
|
|
|
<scroll-view scroll-y class="page">
|
|
|
<view class="text-center" :style="[{animation: 'show ' + 0.4+ 's 1'}]">
|
|
|
<image src="https://static.jeecg.com/upload/test/login4_1595818039175.png" mode='aspectFit' class="zai-logo "></image>
|
|
|
- <view class="zai-title text-shadow ">网上委托平台 </view>
|
|
|
+ <view class="zai-title text-shadow ">明鉴细胞 </view>
|
|
|
</view>
|
|
|
<view class="box padding-lr-xl login-paddingtop" :style="[{animation: 'show ' + 0.6+ 's 1'}]">
|
|
|
<block v-if="loginWay==1">
|
|
@@ -18,17 +18,17 @@
|
|
|
<text :class="[showPassword ? 'cuIcon-attention' : 'cuIcon-attentionforbid']" @click="changePassword"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view @tap="zhuce()"> <text style="color: #E04B28;float: right; margin-right: 20rpx; " > 还未注册?请注册</text> </view>
|
|
|
- <view class="padding text-center margin-top">
|
|
|
+ <!-- <view @tap="zhuce()"> <text style="color: #E04B28;float: right; margin-right: 20rpx; " > 还未注册?请注册</text> </view>
|
|
|
+ --><view class="padding text-center margin-top">
|
|
|
<button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" :class="[shape=='round'?'round':'']"
|
|
|
@tap="onLogin"><text space="emsp">{{loading ? "登录中...":" 登录 "}}</text>
|
|
|
</button>
|
|
|
- <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" :class="[shape=='round'?'round':'']"
|
|
|
+<!-- <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" :class="[shape=='round'?'round':'']"
|
|
|
@tap="loginWay=3-loginWay">短信登录
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
</view>
|
|
|
</block>
|
|
|
- <block v-else>
|
|
|
+<!-- <block v-else>
|
|
|
<view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']">
|
|
|
<view class="title"><text class="cuIcon-mobile margin-right-xs"></text>手机号:</view>
|
|
|
<input placeholder="请输入手机号" type="number" maxlength="11" v-model="phoneNo"></input>
|
|
@@ -50,7 +50,7 @@
|
|
|
@tap="loginWay=1">账户登录
|
|
|
</button>
|
|
|
</view>
|
|
|
- </block>
|
|
|
+ </block> -->
|
|
|
|
|
|
|
|
|
<!-- #ifdef APP-PLUS -->
|
|
@@ -191,11 +191,34 @@
|
|
|
//获取用户信息
|
|
|
let userpara={username:loginParams.username};
|
|
|
that.$http.post(url,userpara).then(res=>{
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ if(res.data.state==200){
|
|
|
+ console.log(res.data.data)
|
|
|
+ uni.setStorageSync(USER_INFO,res.data.data);
|
|
|
+
|
|
|
+ this.$tip.success('登录成功!')
|
|
|
+ this.$Router.replaceAll({name:'index'})
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if(res.data.state==500){
|
|
|
+ this.$tip.alert(res.data.message);
|
|
|
+ }else{
|
|
|
+ this.$tip.alert(res.data.cause);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //uni.setStorageSync(USER_INFO,userInfo);
|
|
|
+
|
|
|
+ }).catch((err) => {
|
|
|
+
|
|
|
+ let msg = err.data.message || "请求出现错误,请稍后再试"
|
|
|
+ console.log(msg)
|
|
|
+ this.loading=false;
|
|
|
+ this.$tip.alert(msg);
|
|
|
+ }).finally(()=>{
|
|
|
+ this.loading=false;
|
|
|
+ })
|
|
|
|
|
|
- this.$tip.success('登录成功!')
|
|
|
- this.$Router.replaceAll({name:'index'})
|
|
|
+
|
|
|
// #endif
|
|
|
}else {
|
|
|
//console.log(res.data.message)
|