|
@@ -280,7 +280,7 @@ import { onLoad } from '@dcloudio/uni-app'
|
|
|
import ls from "@/utils/store2";
|
|
import ls from "@/utils/store2";
|
|
|
import QrCode from '@/components/QrCode.vue'
|
|
import QrCode from '@/components/QrCode.vue'
|
|
|
import { post } from '@/utils/request'
|
|
import { post } from '@/utils/request'
|
|
|
-import { userToken } from '@/composables/config'
|
|
|
|
|
|
|
+import { userToken, chatToken } from '@/composables/config'
|
|
|
import { userApi } from '@/api/user'
|
|
import { userApi } from '@/api/user'
|
|
|
import { ucardApi } from '@/api/ucard'
|
|
import { ucardApi } from '@/api/ucard'
|
|
|
import { customApi } from '@/service/custom'
|
|
import { customApi } from '@/service/custom'
|
|
@@ -549,6 +549,7 @@ const handleTokenLogin = async (token) => {
|
|
|
|
|
|
|
|
// 获取用户信息并跳转
|
|
// 获取用户信息并跳转
|
|
|
await getCustomLoginInfo()
|
|
await getCustomLoginInfo()
|
|
|
|
|
+ // await getChatToken()
|
|
|
|
|
|
|
|
// 获取拒绝原因列表
|
|
// 获取拒绝原因列表
|
|
|
reasonsRefusalList()
|
|
reasonsRefusalList()
|
|
@@ -755,6 +756,7 @@ async function handleLogin() {
|
|
|
uni.showToast({ title: t('login.msg0_1'), icon: 'success' })
|
|
uni.showToast({ title: t('login.msg0_1'), icon: 'success' })
|
|
|
getCustomLoginInfo()
|
|
getCustomLoginInfo()
|
|
|
// getCardUserInfo();
|
|
// getCardUserInfo();
|
|
|
|
|
+ // getChatToken()
|
|
|
reasonsRefusalList()
|
|
reasonsRefusalList()
|
|
|
if (remenber.value.length) {
|
|
if (remenber.value.length) {
|
|
|
userStore.saveAccountInfo({
|
|
userStore.saveAccountInfo({
|
|
@@ -817,6 +819,14 @@ async function getCustomLoginInfo() {
|
|
|
// console.log(error, 111);
|
|
// console.log(error, 111);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+async function getChatToken() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await userApi.getChatToken()
|
|
|
|
|
+ chatToken.value = res.data
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ uni.$u.toast(error.msg || t('login.msg0'), 'error')
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
async function getCardUserInfo() {
|
|
async function getCardUserInfo() {
|
|
|
try {
|
|
try {
|
|
@@ -884,6 +894,7 @@ const handleScanLoginResult = async (data) => {
|
|
|
userToken.value = data.accessToken
|
|
userToken.value = data.accessToken
|
|
|
uni.showToast({ title: t('login.msg0_1'), icon: 'success' })
|
|
uni.showToast({ title: t('login.msg0_1'), icon: 'success' })
|
|
|
await getCustomLoginInfo()
|
|
await getCustomLoginInfo()
|
|
|
|
|
+ // await getChatToken()
|
|
|
reasonsRefusalList()
|
|
reasonsRefusalList()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|