feat: 短信验证码功能已完成,手机端同步实现。

This commit is contained in:
RockYang
2023-07-03 15:18:15 +08:00
parent ce0267e25b
commit a49d54d66c
13 changed files with 267 additions and 26 deletions

View File

@@ -60,6 +60,13 @@
<span>修改密码</span>
</el-dropdown-item>
<el-dropdown-item @click="showBindMobileDialog = true">
<el-icon>
<Iphone/>
</el-icon>
<span>绑定手机号</span>
</el-dropdown-item>
<el-dropdown-item @click="clearAllChats">
<el-icon>
<Delete/>
@@ -188,7 +195,8 @@
<password-dialog v-if="isLogin" :show="showPasswordDialog" @hide="showPasswordDialog = false"
@logout="logout"/>
<bind-mobile/>
<bind-mobile v-if="isLogin" :show="showBindMobileDialog" :mobile="loginUser.mobile"
@hide="showBindMobileDialog = false"/>
</div>
@@ -202,7 +210,7 @@ import {
Check,
Close,
Delete,
Edit,
Edit, Iphone,
Plus,
Promotion,
RefreshRight,
@@ -242,6 +250,7 @@ const newChatItem = ref(null);
const router = useRouter();
const showConfigDialog = ref(false);
const showPasswordDialog = ref(false);
const showBindMobileDialog = ref(false);
const isLogin = ref(false)
if (isMobile()) {
@@ -253,6 +262,9 @@ onMounted(() => {
checkSession().then((user) => {
loginUser.value = user
isLogin.value = true
if (user.mobile === '') {
showBindMobileDialog.value = true
}
// 加载角色列表
httpGet(`/api/role/list?user_id=${user.id}`).then((res) => {
roles.value = res.data;