Merge branch 'master' of http://8.140.50.127:3000/JSY/jsy-app
This commit is contained in:
commit
126e6ac934
@ -51,10 +51,12 @@
|
||||
</view>
|
||||
|
||||
<view class="xieyi" style="display: flex; align-items: center;">
|
||||
<u-checkbox name="reading"></u-checkbox>
|
||||
<text class="text-blue" @click="handleUserAgrement">《用户协议》</text>
|
||||
<u-checkbox name="reading"></u-checkbox>
|
||||
<text class="text-blue" @click="handlePrivacy">《隐私协议》</text>
|
||||
<u-checkbox-group placement="row" v-model="checkboxGroup">
|
||||
<u-checkbox name="reading1" />
|
||||
<text class="text-blue" @click="handleUserAgrement">《用户协议》</text>
|
||||
<u-checkbox name="reading2" />
|
||||
<text class="text-blue" @click="handlePrivacy">《隐私协议》</text>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view class="account_agreement">
|
||||
<view>【账号安全提醒】系统账号是您登录系统唯一授权凭证,如果因为账号丢失或转交给别人,导致设备运行风险,平台方概不负责。</view>
|
||||
@ -67,6 +69,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
import {
|
||||
ref,
|
||||
watch,
|
||||
@ -101,10 +109,12 @@
|
||||
});
|
||||
const rememberPassword = ref(false); // 记住密码
|
||||
const loginBtnDisabled = ref(true); // 登陆按钮禁用状态
|
||||
const checkboxGroup = ref([]); // 登陆按钮禁用状态
|
||||
|
||||
onLoad(() => {
|
||||
const jsy_remember = uni.getStorageSync("jsy_remember");
|
||||
//获取记住密码选中状态
|
||||
if (uni.getStorageSync("jsy_remember") === true) {
|
||||
if (jsy_remember === true) {
|
||||
rememberPassword.value = true
|
||||
loginForm.value.loginName = uni.getStorageSync("jsy_username")
|
||||
loginForm.value.password = uni.getStorageSync("jsy_password")
|
||||
@ -120,12 +130,10 @@
|
||||
|
||||
// tabs标签
|
||||
const list = ref([{
|
||||
name: '账号登录'
|
||||
},
|
||||
{
|
||||
name: '手机号登录'
|
||||
}
|
||||
]);
|
||||
name: '账号登录'
|
||||
}, {
|
||||
name: '手机号登录'
|
||||
}]);
|
||||
const curNow = ref(0);
|
||||
// 选项卡切换
|
||||
function sectionChange(e) {
|
||||
@ -179,7 +187,7 @@
|
||||
|
||||
// 忘记密码
|
||||
function forgotPassword() {
|
||||
this.$toast("忘记密码,请联系管理员");
|
||||
proxy.$toast("忘记密码,请联系管理员");
|
||||
}
|
||||
|
||||
const codeBtnText = ref('获取验证码');
|
||||
@ -192,7 +200,7 @@
|
||||
}
|
||||
//验证正确手机号
|
||||
if (!checkTelephone(loginForm.value.phone)) {
|
||||
this.$toast("请输入正确手机号!");
|
||||
proxy.$toast("请输入正确手机号!");
|
||||
return
|
||||
}
|
||||
codeBtnDisabled.value = true;
|
||||
@ -203,7 +211,7 @@
|
||||
getCodePhone(loginForm.value.phone).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.smsResponse) {
|
||||
this.$toast("短信已发送");
|
||||
proxy.$toast("短信已发送");
|
||||
loginForm.value.uuid = res.uuid
|
||||
codeBtnTimer.value = 60
|
||||
setCodeTimer();
|
||||
@ -246,6 +254,10 @@
|
||||
|
||||
// 登陆
|
||||
async function handleLogin() {
|
||||
if (checkboxGroup.value.length < 2) {
|
||||
proxy.$toast("请先阅读并同意《用户协议》与《隐私协议》");
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
});
|
||||
@ -288,7 +300,7 @@
|
||||
loginSuccess()
|
||||
})
|
||||
.catch(error => {
|
||||
this.$toast(error);
|
||||
proxy.$toast(error);
|
||||
})
|
||||
.finally(() => {})
|
||||
}
|
||||
@ -303,7 +315,7 @@
|
||||
if (result.code == 200) {
|
||||
toIndex(result.user.userId);
|
||||
} else {
|
||||
this.$toast(result.msg);
|
||||
proxy.$toast(result.msg);
|
||||
}
|
||||
})
|
||||
//获取用户权限
|
||||
@ -311,7 +323,7 @@
|
||||
.dispatch("getUserRoles")
|
||||
.then(res => {})
|
||||
.catch(error => {
|
||||
this.$toast("获取用户权限失败");
|
||||
proxy.$toast("获取用户权限失败");
|
||||
})
|
||||
.finally(() => {})
|
||||
}
|
||||
@ -363,7 +375,12 @@
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
::v-deep .u-checkbox__icon-wrap.u-checkbox__icon-wrap--square{width: 15px !important;height: 15px !important;}
|
||||
|
||||
::v-deep .u-checkbox__icon-wrap.u-checkbox__icon-wrap--square {
|
||||
width: 15px !important;
|
||||
height: 15px !important;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -468,7 +485,7 @@
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.account_agreement {
|
||||
|
Loading…
Reference in New Issue
Block a user