flat: 暂存
This commit is contained in:
12
App.vue
12
App.vue
@@ -9,8 +9,7 @@ import config from '@/config.js';
|
||||
onLaunch((options) => {
|
||||
useUserStore().initSeesionId(); //更新
|
||||
useDictStore().getDictData();
|
||||
// uni.hideTabBar();
|
||||
|
||||
uni.hideTabBar();
|
||||
// 登录
|
||||
let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息
|
||||
if (token) {
|
||||
@@ -26,14 +25,7 @@ onLaunch((options) => {
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
// #ifndef MP-WEIXIN
|
||||
appendScriptTagElement('https://qd.zhaopinzao8dian.com/file/csn/jweixin-1.4.0.js').then(() => {
|
||||
console.log('✅ 微信 JSSDK 加载完成');
|
||||
// signatureFn();
|
||||
});
|
||||
// #endif
|
||||
});
|
||||
onMounted(() => {});
|
||||
|
||||
onShow(() => {
|
||||
console.log('App Show');
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
export default {
|
||||
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
||||
baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||
// baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||
baseUrl: 'http://10.133.17.161:8080/api', // 测试
|
||||
// baseUrl: 'http://192.168.3.19:8080/api', // 测试
|
||||
// sseAI+
|
||||
// StreamBaseURl: 'http://39.98.44.136:8000',
|
||||
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
||||
@@ -13,7 +15,7 @@ export default {
|
||||
// indexedDB
|
||||
DBversion: 2,
|
||||
// 只使用本地缓寸的数据
|
||||
OnlyUseCachedDB: true,
|
||||
OnlyUseCachedDB: false,
|
||||
// 使用模拟定位
|
||||
UsingSimulatedPositioning: true,
|
||||
// 应用信息
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
vConsole.destroy();
|
||||
</script> -->
|
||||
<!-- 爱山东jssdk -->
|
||||
<script type="text/javascript" src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script> -->
|
||||
</head>
|
||||
<!-- <body> -->
|
||||
<div id="app"><!--app-html--></div>
|
||||
|
||||
@@ -448,7 +448,7 @@ const scrollToBottom = throttle(function () {
|
||||
}, 500);
|
||||
|
||||
function getGuess() {
|
||||
$api.chatRequest('/guest', { sessionId: chatSessionID.value }, 'POST').then((res) => {
|
||||
$api.chatRequest('/app/chat/guest', { sessionId: chatSessionID.value }, 'POST').then((res) => {
|
||||
guessList.value = res.data;
|
||||
showGuess.value = true;
|
||||
nextTick(() => {
|
||||
|
||||
@@ -149,7 +149,7 @@ const fromValue = reactive({
|
||||
});
|
||||
|
||||
onLoad((parmas) => {
|
||||
getTreeselect();
|
||||
// getTreeselect();
|
||||
});
|
||||
|
||||
onMounted(() => {});
|
||||
|
||||
@@ -230,14 +230,14 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
|
||||
|
||||
// 云端数据
|
||||
function getHistory() {
|
||||
$api.chatRequest('/getHistory').then((res) => {
|
||||
if (!res.data.list.length) return
|
||||
let tabel = parseHistory(res.data.list)
|
||||
$api.chatRequest('/app/chat/getChatHistoryList').then((res) => {
|
||||
if (!res.rows.length) return
|
||||
let tabel = parseHistory(res.rows)
|
||||
if (tabel && tabel.length) {
|
||||
const tabelRow = tabel[0] // 默认第一个
|
||||
const [result, lastData] = insertSortData(tabel)
|
||||
// console.log('getHistory insertSortData', result, lastData)
|
||||
chatSessionID.value = tabelRow.sessionId
|
||||
chatSessionID.value = tabelRow.cahtId
|
||||
tabeList.value = result
|
||||
getHistoryRecord(false)
|
||||
baseDB.db.add(tableName.value, tabel);
|
||||
@@ -250,7 +250,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
|
||||
const params = {
|
||||
sessionId: chatSessionID.value
|
||||
}
|
||||
$api.chatRequest('/detail', params, 'GET', loading).then((res) => {
|
||||
$api.chatRequest(`/app/chat/getChatDetail/${ chatSessionID.value}`, {}, 'GET', loading).then((res) => {
|
||||
let list = parseHistoryDetail(res.data.list, chatSessionID.value)
|
||||
if (list.length) {
|
||||
baseDB.db.add(massageName.value, list).then((ids) => {
|
||||
|
||||
@@ -104,7 +104,7 @@ export function chatRequest(url, data = {}, method = 'GET', loading = false, hea
|
||||
header["Authorization"] = encodeURIComponent(Authorization);
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: config.StreamBaseURl + url,
|
||||
url: config.baseUrl + url,
|
||||
method: method,
|
||||
data: data,
|
||||
header,
|
||||
|
||||
Reference in New Issue
Block a user