From 7ca12ec6e963fe129a180e3a5477609b2e1a110d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 8 Aug 2025 18:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common.ts | 3 ++- src/utils/common.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/common.ts b/src/api/common.ts index ea43a9fc..8d66fda8 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -1,12 +1,13 @@ import { get_type } from '@/utils/common'; import request from '@/utils/request'; +import api_request from '@/utils/api-request'; import { isEmpty } from 'lodash'; class CommonAPI { /** 链接初始化接口 */ static getInit() { if (get_type() == 'shop') { - return request({ + return api_request({ url: `?s=plugins/index/pluginsname/shop/pluginscontrol/diyapi/pluginsaction/init.html`, method: 'post', }); diff --git a/src/utils/common.ts b/src/utils/common.ts index aaeccb8f..2aa19eb5 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -20,7 +20,7 @@ export const font_weight = [ export const get_id = () => { let new_id = ''; // 去除origin的数据 - const url = document.location.href.replace(document.location.origin, ''); + const url = document.location.href; if (url.indexOf('id/') != -1) { new_id = url.substring(url.indexOf('id/') + 3); // 去除字符串的.html @@ -45,7 +45,7 @@ export const get_id = () => { export const get_type = () => { let new_type = ''; // 去除origin的数据 - const url = document.location.href.replace(document.location.origin, ''); + const url = document.location.href; if (url.indexOf('type/') != -1) { new_type = url.substring(url.indexOf('type/') + 5); // 去除字符串的.html