风格统一,砍价样式修改
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const DiyTemplateApi = {
|
||||
getUsedDiyTemplate: () => {
|
||||
return request({
|
||||
url: '/app-api/promotion/diy-template/used',
|
||||
method: 'GET',
|
||||
});
|
||||
},
|
||||
// getUsedDiyTemplate: () => {
|
||||
// return request({
|
||||
// url: '/app-api/promotion/diy-template/used',
|
||||
// method: 'GET',
|
||||
// });
|
||||
// },
|
||||
getDiyTemplate: (id) => {
|
||||
return request({
|
||||
url: '/app-api/promotion/diy-template/get',
|
||||
|
||||
@@ -94,7 +94,7 @@ http.interceptors.request.use(
|
||||
if (config.url.indexOf('/app-api/') !== -1) {
|
||||
config.header['Accept'] = '*/*'
|
||||
config.header['tenant-id'] = '1';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['Authorization'] = 'Bearer test247';
|
||||
}
|
||||
return config;
|
||||
@@ -113,10 +113,10 @@ http.interceptors.response.use(
|
||||
if (response.header.authorization || response.header.Authorization) {
|
||||
$store('user').setToken(response.header.authorization || response.header.Authorization);
|
||||
}
|
||||
// TODO 芋艿:如果是登录的 API,则自动设置 token
|
||||
if (response.data?.data?.accessToken) {
|
||||
$store('user').setToken(response.data.data.accessToken);
|
||||
}
|
||||
// TODO 芋艿:如果是登录的 API,则自动设置 token
|
||||
if (response.data?.data?.accessToken) {
|
||||
$store('user').setToken(response.data.data.accessToken);
|
||||
}
|
||||
|
||||
response.config.custom.showLoading && closeLoading();
|
||||
if (response.data.error !== 0 && response.data.code !== 0) {
|
||||
@@ -128,10 +128,10 @@ http.interceptors.response.use(
|
||||
});
|
||||
return Promise.resolve(response.data);
|
||||
}
|
||||
// 成功时的提示
|
||||
// 成功时的提示
|
||||
if (
|
||||
(response.data.error === 0 || response.data.code === 0) &&
|
||||
( response.data.msg !== '' || response.config.custom.successMsg !== '' ) &&
|
||||
(response.data.msg !== '' || response.config.custom.successMsg !== '') &&
|
||||
response.config.custom.showSuccess
|
||||
) {
|
||||
uni.showToast({
|
||||
@@ -218,8 +218,8 @@ const request = (config) => {
|
||||
}
|
||||
// TODO 芋艿:额外拼接
|
||||
if (config.url.indexOf('/app-api/') >= 0) {
|
||||
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
// config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】
|
||||
}
|
||||
return http.middleware(config);
|
||||
|
||||
Reference in New Issue
Block a user