页面切图

This commit is contained in:
仲么了
2023-02-07 17:59:54 +08:00
parent 6cd009f621
commit 3f50cca6db
35 changed files with 933 additions and 164 deletions

View File

@@ -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 {