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