新增管理端登录方法和场景示例
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
<div class="home">
|
||||
<div class="header-bg">
|
||||
<div class="header-info">
|
||||
<div class="wrap" @click="handleLogin()">
|
||||
<div class="wrap">
|
||||
<div class="user-img-div">
|
||||
<open-data type="userAvatarUrl" lang="zh_CN" class="user-img"></open-data>
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<div class="user-info" @click="handleLogin()">
|
||||
<div class="option">
|
||||
<template v-if="!user.id">
|
||||
<p>登录</p>
|
||||
@@ -19,6 +19,7 @@
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<button class="phoneBtn" open-type="getPhoneNumber" @getphonenumber="handleAdminLogin">管理账号登录</button>
|
||||
</div>
|
||||
<input class="codeText" v-model="search" placeholder="搜索要查找的应用"/>
|
||||
</div>
|
||||
@@ -63,6 +64,11 @@ export default {
|
||||
this.autoLogin();
|
||||
} else this.$u.toast("已登录,无需重新登录!")
|
||||
},
|
||||
handleAdminLogin({detail: {code: phoneCode}}) {
|
||||
if (!this.token) {
|
||||
this.autoLogin({corpId: "ww596787bb70f08288", loginWay: 'admin', phoneCode});
|
||||
} else this.$u.toast("已登录,无需重新登录!")
|
||||
},
|
||||
handleGotoApp(app) {
|
||||
uni.navigateTo({url: `${app.path}`})
|
||||
},
|
||||
@@ -201,5 +207,13 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.phoneBtn {
|
||||
font-size: 34px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 54px;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user