已调通微信小程序,支持域名调用

This commit is contained in:
ZLI263
2025-11-23 20:03:56 +08:00
parent 7a7ffbfd0c
commit 78d8db3c68
4 changed files with 26 additions and 71 deletions

View File

@@ -8,6 +8,9 @@
"h5" : { "h5" : {
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" : {
"launchtype" : "local"
},
"provider" : "alipay", "provider" : "alipay",
"type" : "uniCloud" "type" : "uniCloud"
} }

View File

@@ -50,15 +50,15 @@
"port" : 8080, "port" : 8080,
"proxy" : { "proxy" : {
"^/api" : { "^/api" : {
"target" : "http://localhost:9060", "target" : "https://api.huayang-star.com",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false "secure" : true
} }
} }
} }
}, },
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "wx534c58a9db510fba",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },

View File

@@ -80,7 +80,6 @@
</view> </view>
<text class="banner-text">AI总结提炼关键, 为销售减负</text> <text class="banner-text">AI总结提炼关键, 为销售减负</text>
</view> </view>
<text class="banner-right">样板间</text>
</view> </view>
<!-- 音频播放器 --> <!-- 音频播放器 -->
@@ -259,7 +258,6 @@
</view> </view>
<text class="banner-text">AI总结提炼关键,为销售减负</text> <text class="banner-text">AI总结提炼关键,为销售减负</text>
</view> </view>
<text class="banner-right">样板间</text>
</view> </view>
<!-- 音频播放器如果有 --> <!-- 音频播放器如果有 -->
<view class="performance-audio" v-if="category.showAudio"> <view class="performance-audio" v-if="category.showAudio">
@@ -428,6 +426,7 @@
import ServiceList from './components/ServiceList.vue'; import ServiceList from './components/ServiceList.vue';
import CustomerProfileModal from './components/CustomerProfileModal.vue'; import CustomerProfileModal from './components/CustomerProfileModal.vue';
import { initCustomerProfile, initSummaryList, initPerformanceData } from './utils/dataInit.js'; import { initCustomerProfile, initSummaryList, initPerformanceData } from './utils/dataInit.js';
import { API_BASE_URL } from '@/common/config.js';
export default { export default {
// #ifdef APP // #ifdef APP
@@ -649,22 +648,13 @@
return; return;
} }
// H5环境下使用代理路径其他环境使用完整URL // 统一使用完整URL
let url; const url = `${API_BASE_URL}api/audioTextAnalysisFurniture/byParentId?parentId=${parentId}`;
// #ifdef H5
url = `/api/audioTextAnalysisFurniture/byParentId?parentId=${parentId}`;
// #endif
// #ifndef H5
url = `http://localhost:9060/api/audioTextAnalysisFurniture/byParentId?parentId=${parentId}`;
// #endif
const res = await uni.request({ const res = await uni.request({
url: url, url: url,
method: 'GET', method: 'GET',
timeout: 10000, timeout: 10000
header: {
'Content-Type': 'application/json'
}
}); });
if (res.statusCode === 200 && res.data && res.data.success) { if (res.statusCode === 200 && res.data && res.data.success) {
@@ -1090,22 +1080,13 @@
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`) .map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&'); .join('&');
// H5环境下使用代理路径其他环境使用完整URL // 统一使用完整URL
let url; const url = `${API_BASE_URL}api/todoItem/list?${queryString}`;
// #ifdef H5
url = `/api/todoItem/list?${queryString}`;
// #endif
// #ifndef H5
url = `http://localhost:9060/api/todoItem/list?${queryString}`;
// #endif
const res = await uni.request({ const res = await uni.request({
url: url, url: url,
method: 'GET', method: 'GET',
timeout: 10000, timeout: 10000
header: {
'Content-Type': 'application/json'
}
}); });
if (res.statusCode === 200 && res.data && res.data.success) { if (res.statusCode === 200 && res.data && res.data.success) {
@@ -1237,14 +1218,8 @@
} }
try { try {
// H5环境下使用代理路径其他环境使用完整URL // 统一使用完整URL
let url; const url = `${API_BASE_URL}api/todoItem/updateTodoStatus`;
// #ifdef H5
url = `/api/todoItem/updateTodoStatus`;
// #endif
// #ifndef H5
url = `http://localhost:9060/api/todoItem/updateTodoStatus`;
// #endif
const res = await uni.request({ const res = await uni.request({
url: url, url: url,
@@ -1300,7 +1275,7 @@
url = `/api/todoItem/delayProcessTodo`; url = `/api/todoItem/delayProcessTodo`;
// #endif // #endif
// #ifndef H5 // #ifndef H5
url = `http://localhost:9060/api/todoItem/delayProcessTodo`; url = `${API_BASE_URL}api/todoItem/delayProcessTodo`;
// #endif // #endif
const res = await uni.request({ const res = await uni.request({
@@ -1351,22 +1326,13 @@
return; return;
} }
// H5环境下使用代理路径其他环境使用完整URL // 统一使用域名服务器地址
let url; const url = `${API_BASE_URL}api/audioTextAnalysisFurniture/byParentId?parentId=${parentId}`;
// #ifdef H5
url = `/api/audioTextAnalysisFurniture/byParentId?parentId=${parentId}`;
// #endif
// #ifndef H5
url = `http://localhost:8080/api/audioTextAnalysisFurniture/byParentId?parentId=${parentId}`;
// #endif
const res = await uni.request({ const res = await uni.request({
url: url, url: url,
method: 'GET', method: 'GET',
timeout: 10000, timeout: 10000
header: {
'Content-Type': 'application/json'
}
}); });
if (res.statusCode === 200 && res.data && res.data.success) { if (res.statusCode === 200 && res.data && res.data.success) {
@@ -1461,16 +1427,13 @@
url = `/api/audioTextAnalysisSop/listByParentId?parentId=${parentId}`; url = `/api/audioTextAnalysisSop/listByParentId?parentId=${parentId}`;
// #endif // #endif
// #ifndef H5 // #ifndef H5
url = `http://localhost:9060/api/audioTextAnalysisSop/listByParentId?parentId=${parentId}`; url = `${API_BASE_URL}api/audioTextAnalysisSop/listByParentId?parentId=${parentId}`;
// #endif // #endif
const res = await uni.request({ const res = await uni.request({
url: url, url: url,
method: 'GET', method: 'GET',
timeout: 10000, timeout: 10000
header: {
'Content-Type': 'application/json'
}
}); });
if (res.statusCode === 200 && res.data && res.data.success) { if (res.statusCode === 200 && res.data && res.data.success) {
@@ -1682,23 +1645,13 @@
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`) .map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&'); .join('&');
// H5环境下使用代理路径其他环境使用完整URL // 统一使用域名服务器地址
let url; const url = `${API_BASE_URL}api/audioManagement/list?${queryString}`;
// #ifdef H5
// 使用代理路径会被manifest.json中的proxy配置转发
url = `/api/audioManagement/list?${queryString}`;
// #endif
// #ifndef H5
url = `http://localhost:9060/api/audioManagement/list?${queryString}`;
// #endif
const res = await uni.request({ const res = await uni.request({
url: url, url: url,
method: 'GET', method: 'GET',
timeout: 10000, timeout: 10000
header: {
'Content-Type': 'application/json'
}
}); });
if (res.statusCode === 200 && res.data && res.data.success) { if (res.statusCode === 200 && res.data && res.data.success) {

View File

@@ -19,7 +19,6 @@
<!-- AI功能横幅 --> <!-- AI功能横幅 -->
<view class="ai-banner"> <view class="ai-banner">
<text class="banner-text">AI让销售过程和团队管理更透明</text> <text class="banner-text">AI让销售过程和团队管理更透明</text>
<text class="banner-btn">样板间</text>
</view> </view>
<!-- 标签页 --> <!-- 标签页 -->