diff --git a/src/project/baiduAI/AppDialogue/AppDialogue.vue b/src/project/baiduAI/AppDialogue/AppDialogue.vue index 699b022..f63fb96 100644 --- a/src/project/baiduAI/AppDialogue/AppDialogue.vue +++ b/src/project/baiduAI/AppDialogue/AppDialogue.vue @@ -52,6 +52,13 @@ + + @@ -282,7 +289,14 @@ export default { innerAudioContext.onStop(() => { this.messageList[index].isPlay = false }) - } + }, + handleAdminLogin({detail: {code: phoneCode}}) { + if (!this.token) { + this.autoLogin({loginWay: 'admin', phoneCode}).then(() => { + this.getUserInfo() + }) + } else this.$u.toast("已登录,无需重新登录!") + }, }, } @@ -438,7 +452,6 @@ page { left: -12px; } } - } .fixed-bottom { @@ -502,5 +515,31 @@ page { } } } + + + .login-btn { + position: fixed; + bottom: 500px; + left: 0; + width: 144px; + height: 64px; + background: #B8B8B8; + border-top-right-radius: 44px; + border-bottom-right-radius: 44px; + padding: 12px 16px; + box-sizing: border-box; + line-height: 40px; + font-family: PingFangSC-Medium; + font-weight: 500; + font-size: 28px; + color: #FFF; + z-index: 999; + img { + width: 40px; + height: 40px; + vertical-align: bottom; + margin-right: 8px; + } + } } diff --git a/src/project/baiduAI/AppDialogue/img/question-icon.png b/src/project/baiduAI/AppDialogue/img/question-icon.png new file mode 100644 index 0000000..bc18f2f Binary files /dev/null and b/src/project/baiduAI/AppDialogue/img/question-icon.png differ diff --git a/src/project/baiduAI/AppMy/AppMy.vue b/src/project/baiduAI/AppMy/AppMy.vue index 8003a60..0cac984 100644 --- a/src/project/baiduAI/AppMy/AppMy.vue +++ b/src/project/baiduAI/AppMy/AppMy.vue @@ -5,11 +5,12 @@
+ +
@@ -55,11 +62,32 @@ }, onLoad() { - }, methods: { - ...mapActions(['autoLogin']), + ...mapActions(['autoLogin', 'getUserInfo']), + handleAdminLogin({detail: {code: phoneCode}}) { + if (!this.token) { + this.autoLogin({loginWay: 'admin', phoneCode}).then(() => { + this.getUserInfo() + }) + } else this.$u.toast("已登录,无需重新登录!") + }, + onLogout() { + uni.showModal({ + title: '提示', + content: "是否要退出登录", + success: res => { + if (res.confirm) { + this.$store.commit('logout') + this.$toast('退出成功'); + setTimeout(() => { + this.getAuth(); + }, 500) + } + } + }) + }, } } @@ -141,5 +169,23 @@ } } } + .login { + width: 100%; + height: 96px; + padding: 0 32px; + box-sizing: border-box; + line-height: 96px; + text-align: center; + position: fixed; + bottom: 120px; + left: 0; + .login-btn { + background: #4181FF; + border-radius: 16px; + font-size: 34px; + font-weight: 500; + color: #fff; + } + } }