diff --git a/src/project/baiduAI/AppDialogue/AppDialogue.vue b/src/project/baiduAI/AppDialogue/AppDialogue.vue index 699b022..e70731d 100644 --- a/src/project/baiduAI/AppDialogue/AppDialogue.vue +++ b/src/project/baiduAI/AppDialogue/AppDialogue.vue @@ -2,7 +2,7 @@
- +
@@ -96,23 +103,9 @@ export default { ...mapState(['user', 'token']), }, onLoad() { - this.autoLogin().then(() => { + if(this.token) { this.getHistoryList() - // uni.getLocation({ - // type: 'wgs84', // 返回可以用于uni.openLocation的经纬度,默认为wgs84的gps坐标 - // success : (res) => { - // let location = `${res.latitude}, ${res.longitude}` - // this.$instance.post(`/admin/area/reverseGeocoding?location=${location}`).then(res => { - // if(res && res.code == 0){ - // this.areaId = res.data.result.addressComponent.adcode + '000000' - // } - // }) - // }, - // fail: (error) => { - // console.log('获取位置失败:', error); - // } - // }); - }) + } recorderManager.onStop((res)=> { this.upLoad(res.tempFilePath) }); @@ -195,7 +188,7 @@ export default { }, sendMsg() { this.$loading() - this.$instance.post("/app/appaigccopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId}).then(res => { + this.$instance.post("/app/appaicopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId}).then(res => { if(res.code == 0) { this.content = '' this.messageList.push(res.data[0]) @@ -212,7 +205,7 @@ export default { }, sendVoice() { this.$loading() - this.$instance.post("/app/appaigccopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0}).then(res => { + this.$instance.post("/app/appaicopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0}).then(res => { if(res.code == 0) { this.voiceUrl = '' this.voiceId = '' @@ -233,7 +226,7 @@ export default { }, getHistoryList() { this.$loading() - this.$instance.post(`/app/appaigccopilotinfo/list?current=${this.current}&size=10`).then(res => { + this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10`).then(res => { if(res.code == 0 && res.data.records.length) { res.data.records.map((item) => { if(item.sdkFileUrl) { @@ -282,7 +275,14 @@ export default { innerAudioContext.onStop(() => { this.messageList[index].isPlay = false }) - } + }, + handleAdminLogin({detail: {code: phoneCode}}) { + if (!this.token) { + this.autoLogin({corpId: "ww596787bb70f08288", loginWay: 'admin', phoneCode}).then(() => { + this.getUserInfo() + }) + } else this.$u.toast("已登录,无需重新登录!") + }, }, } @@ -438,7 +438,6 @@ page { left: -12px; } } - } .fixed-bottom { @@ -502,5 +501,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 @@
- + +
-

张总

-
党委书记
+

{{user.nickName || '微信用户'}}

+
{{user.departmentName || ''}}
+
+ +
+
+ +
@@ -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; + } + } } diff --git a/src/project/baiduAI/AppRecord/AppRecord.vue b/src/project/baiduAI/AppRecord/AppRecord.vue index 0c90318..4670c20 100644 --- a/src/project/baiduAI/AppRecord/AppRecord.vue +++ b/src/project/baiduAI/AppRecord/AppRecord.vue @@ -1,131 +1,256 @@ + - diff --git a/src/project/baiduAI/AppRecord/img/del-icon.png b/src/project/baiduAI/AppRecord/img/del-icon.png deleted file mode 100644 index eaa9bca..0000000 Binary files a/src/project/baiduAI/AppRecord/img/del-icon.png and /dev/null differ diff --git a/src/project/baiduAI/AppRecord/img/send-btn.png b/src/project/baiduAI/AppRecord/img/send-btn.png deleted file mode 100644 index 2e12933..0000000 Binary files a/src/project/baiduAI/AppRecord/img/send-btn.png and /dev/null differ