修改url
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
<!-- 消息列表 -->
|
<!-- 消息列表 -->
|
||||||
<scroll-view scroll-y class="message-list" :scroll-top="scrollTop" scroll-with-animation="true"
|
<scroll-view scroll-y class="message-list" :scroll-top="scrollTop" scroll-with-animation="true"
|
||||||
show-scrollbar="false" enhanced="true" bounces="true"
|
show-scrollbar="false" enhanced="true" bounces="true" @scroll="onScroll" @scrolltoupper="loadMoreHistory"
|
||||||
@scroll="onScroll" @scrolltoupper="loadMoreHistory" upper-threshold="50">
|
upper-threshold="50">
|
||||||
<!-- 加载提示 -->
|
<!-- 加载提示 -->
|
||||||
<view v-if="isLoadingHistory" class="loading-history">
|
<view v-if="isLoadingHistory" class="loading-history">
|
||||||
<text>正在加载历史记录...</text>
|
<text>正在加载历史记录...</text>
|
||||||
@@ -254,13 +254,16 @@
|
|||||||
this.scrollTop = 0;
|
this.scrollTop = 0;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollTop = targetScrollTop;
|
this.scrollTop = targetScrollTop;
|
||||||
console.log('forceScrollToBottom: 设置scrollTop为', targetScrollTop);
|
console.log('forceScrollToBottom: 设置scrollTop为',
|
||||||
|
targetScrollTop);
|
||||||
|
|
||||||
// 延迟再次确保滚动到底部
|
// 延迟再次确保滚动到底部
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const finalScrollTop = (res.scrollHeight || 99999) + 1000;
|
const finalScrollTop = (res.scrollHeight ||
|
||||||
|
99999) + 1000;
|
||||||
this.scrollTop = finalScrollTop;
|
this.scrollTop = finalScrollTop;
|
||||||
console.log('forceScrollToBottom: 延迟设置scrollTop完成', finalScrollTop);
|
console.log('forceScrollToBottom: 延迟设置scrollTop完成',
|
||||||
|
finalScrollTop);
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@@ -3,12 +3,12 @@ import axios from 'axios'
|
|||||||
import {
|
import {
|
||||||
getToken
|
getToken
|
||||||
} from './auth'
|
} from './auth'
|
||||||
|
import config from '@/config'
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// baseURL: 'http://localhost:9090/dev-api/aitutor/aichat',
|
// baseURL: 'http://localhost:9090/dev-api/aitutor/aichat',
|
||||||
// baseURL: 'http://localhost:8088/aitutor/aichat',
|
// baseURL: 'http://localhost:8088/aitutor/aichat',
|
||||||
// baseURL: 'http://localhost:8080/aitutor/aichat',
|
// baseURL: 'http://localhost:8080/aitutor/aichat',
|
||||||
baseURL: 'http://localhost:8088',
|
baseURL: config.baseUrl,
|
||||||
timeout: 15000,
|
timeout: 15000,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
import {
|
import {
|
||||||
getToken
|
getToken
|
||||||
} from '@/utils/auth';
|
} from '@/utils/auth';
|
||||||
|
import config from '@/config'
|
||||||
const BASE_URL = (() => {
|
const BASE_URL = (() => {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
return 'http://localhost:8088';
|
return config.baseUrl;
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// return 'http://192.168.x.x:8088'; // 换成你的电脑 IP
|
// return 'http://192.168.x.x:8088'; // 换成你的电脑 IP
|
||||||
|
Reference in New Issue
Block a user