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

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

View File

@@ -63,6 +63,9 @@
</template>
</van-picker>
</van-popup>
<bind-mobile v-if="isLogin" :show="showBindMobileDialog" :mobile="loginUser.mobile"
@hide="showBindMobileDialog = false"/>
</div>
</template>
@@ -74,6 +77,7 @@ import {checkSession} from "@/action/session";
import router from "@/router";
import {setChatConfig} from "@/store/chat";
import {removeArrayItem} from "@/utils/libs";
import BindMobile from "@/components/mobile/BindMobile.vue";
const title = ref("会话列表")
const chatName = ref("")
@@ -88,10 +92,14 @@ const roles = ref([])
const models = ref([])
const showPicker = ref(false)
const columns = ref([roles.value, models.value])
const showBindMobileDialog = ref(false)
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) => {
if (res.data) {

View File

@@ -13,6 +13,14 @@
disabled
placeholder="用户名"
/>
<van-field
v-model="form.mobile"
name="手机号"
label="手机号"
readonly
disabled
placeholder="手机号"
/>
<van-field
v-model="form.nickname"
name="昵称"
@@ -61,6 +69,7 @@ const title = ref('用户设置')
const form = ref({
username: '',
nickname: '',
mobile: '',
avatar: '',
calls: 0,
tokens: 0