feat: 修改api地址
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user