页面切图
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<view class="login-des">{{ companyName }}</view>
|
||||
<view class="login-box">
|
||||
<!-- <image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image> -->
|
||||
<image class="login-box-logo" mode="widthFix" src="/static/logo2.png"></image>
|
||||
<image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image>
|
||||
<template v-if="loginType == 'yzm'">
|
||||
<view class="login-box-input mt100">
|
||||
<input class="login-box-input-main" v-model="yzmForm.phone" placeholder="请输入手机号" />
|
||||
@@ -100,98 +100,21 @@ export default {
|
||||
if (!this.pwdForm.account && !this.pwdForm.pwd) {
|
||||
return this.$util.toast('请填写登录信息!')
|
||||
}
|
||||
this.$request({
|
||||
url: '/org/login/valid',
|
||||
data: {
|
||||
account: this.pwdForm.account.trim(),
|
||||
password: this.pwdForm.pwd,
|
||||
tenantId: this.tenantId,
|
||||
},
|
||||
method: 'POST',
|
||||
}).then(res => {
|
||||
uni.setStorageSync('login', true)
|
||||
uni.setStorageSync('Authorization', res.data)
|
||||
uni.setStorageSync('password', this.pwdForm.pwd)
|
||||
uni.setStorageSync('account', this.pwdForm.account.trim())
|
||||
this.$util.toast('登录成功!')
|
||||
// #ifndef MP
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}, 100);
|
||||
// #endif
|
||||
this.$util.loadConfig(() => { }, true)
|
||||
// #ifdef MP
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
console.log(loginRes)
|
||||
this.$request({
|
||||
url: '/org/wxxcx/login',
|
||||
data: {
|
||||
code: loginRes.code,
|
||||
tenantId: this.tenantId,
|
||||
},
|
||||
method: 'POST',
|
||||
}).then(res => {
|
||||
this.$request({
|
||||
url: '/org/wxxcx/bindUser',
|
||||
data: {
|
||||
account: this.pwdForm.account.trim(),
|
||||
password: this.pwdForm.pwd,
|
||||
openid: res.data.openid,
|
||||
tenantId: this.tenantId,
|
||||
},
|
||||
method: 'POST'
|
||||
}).then(res => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
// #endif
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
},
|
||||
yzmLogin () {
|
||||
if (!this.yzmForm.phone && !this.yzmForm.code) {
|
||||
return this.$util.toast('请填写登录信息!')
|
||||
}
|
||||
this.$request({
|
||||
url: '/org/login/valid',
|
||||
data: {
|
||||
account: this.yzmForm.phone.trim(),
|
||||
code: this.yzmForm.code,
|
||||
tenantId: this.tenantId,
|
||||
},
|
||||
method: 'POST',
|
||||
}).then(res => {
|
||||
uni.setStorageSync('Authorization', res.data)
|
||||
this.$util.toast('登录成功!')
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}, 1500)
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad (o) {
|
||||
uni.removeStorageSync('Authorization')
|
||||
if (o.alias) {
|
||||
this.tenantId = o.alias
|
||||
this.companyName = o.name
|
||||
this.pwdForm.account = o.account
|
||||
uni.setStorageSync('tenantId', this.tenantId)
|
||||
uni.setStorageSync('companyName', this.companyName)
|
||||
uni.setStorageSync('account', this.pwdForm.account)
|
||||
} else {
|
||||
this.tenantId = uni.getStorageSync('tenantId')
|
||||
this.companyName = uni.getStorageSync('companyName')
|
||||
this.pwdForm.account = uni.getStorageSync('account')
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -220,7 +143,7 @@ export default {
|
||||
width: 680rpx;
|
||||
padding: 100rpx 40rpx;
|
||||
border-radius: 40rpx;
|
||||
background: #fff;
|
||||
background: $uni-theme-white;
|
||||
overflow: hidden;
|
||||
|
||||
.login-box-logo {
|
||||
|
||||
Reference in New Issue
Block a user