修改判断逻辑
parent
a492eb0a7d
commit
7ca12ec6e9
|
|
@ -1,12 +1,13 @@
|
||||||
import { get_type } from '@/utils/common';
|
import { get_type } from '@/utils/common';
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
import api_request from '@/utils/api-request';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
|
||||||
class CommonAPI {
|
class CommonAPI {
|
||||||
/** 链接初始化接口 */
|
/** 链接初始化接口 */
|
||||||
static getInit() {
|
static getInit() {
|
||||||
if (get_type() == 'shop') {
|
if (get_type() == 'shop') {
|
||||||
return request({
|
return api_request({
|
||||||
url: `?s=plugins/index/pluginsname/shop/pluginscontrol/diyapi/pluginsaction/init.html`,
|
url: `?s=plugins/index/pluginsname/shop/pluginscontrol/diyapi/pluginsaction/init.html`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export const font_weight = [
|
||||||
export const get_id = () => {
|
export const get_id = () => {
|
||||||
let new_id = '';
|
let new_id = '';
|
||||||
// 去除origin的数据
|
// 去除origin的数据
|
||||||
const url = document.location.href.replace(document.location.origin, '');
|
const url = document.location.href;
|
||||||
if (url.indexOf('id/') != -1) {
|
if (url.indexOf('id/') != -1) {
|
||||||
new_id = url.substring(url.indexOf('id/') + 3);
|
new_id = url.substring(url.indexOf('id/') + 3);
|
||||||
// 去除字符串的.html
|
// 去除字符串的.html
|
||||||
|
|
@ -45,7 +45,7 @@ export const get_id = () => {
|
||||||
export const get_type = () => {
|
export const get_type = () => {
|
||||||
let new_type = '';
|
let new_type = '';
|
||||||
// 去除origin的数据
|
// 去除origin的数据
|
||||||
const url = document.location.href.replace(document.location.origin, '');
|
const url = document.location.href;
|
||||||
if (url.indexOf('type/') != -1) {
|
if (url.indexOf('type/') != -1) {
|
||||||
new_type = url.substring(url.indexOf('type/') + 5);
|
new_type = url.substring(url.indexOf('type/') + 5);
|
||||||
// 去除字符串的.html
|
// 去除字符串的.html
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue