feat: 修改api地址

This commit is contained in:
2026-07-30 17:40:46 +08:00
parent d168e38305
commit cf6353759d
9 changed files with 52 additions and 43 deletions
+9 -7
View File
@@ -308,22 +308,24 @@
const openThirdPartyService = (item) => {
if (!item?.url) return;
const title = encodeURIComponent(item.title || item.name || '第三方服务');
const targetUrl = encodeURIComponent(item.url);
if (typeof plus !== 'undefined' && plus?.runtime) {
const rawUrl = String(item.url || '').trim();
const targetUrl = encodeURIComponent(rawUrl);
const openWebview = () => {
uni.navigateTo({
url: `/pages/public/webview?title=${title}&url=${targetUrl}`,
});
};
if (typeof plus !== 'undefined' && plus?.runtime) {
openWebview();
return;
}
if (typeof window !== 'undefined' && typeof window.open === 'function') {
const opened = window.open(item.url, '_blank');
const opened = window.open(rawUrl, '_blank');
if (opened) return;
window.location.href = item.url;
window.location.href = rawUrl;
return;
}
uni.navigateTo({
url: `/pages/public/webview?title=${title}&url=${targetUrl}`,
});
openWebview();
};
const updateAvatar = async (avatar) => {
if (!avatar) return;