This commit is contained in:
ln1778 2024-06-20 15:34:10 +08:00
parent 92b954c470
commit d4390cc9c3
2 changed files with 5 additions and 4 deletions

View File

@ -41,7 +41,7 @@ export default class Dict {
if(url){ if(url){
this.apiurl=url; this.apiurl=url;
} }
getRequest(params).then((res)=>{ getRequest(params,this.apiurl).then((res)=>{
if(res&&res.datas){ if(res&&res.datas){
const response=res.datas; const response=res.datas;
sessionStorage.setItem("dictdata",JSON.stringify(response)); sessionStorage.setItem("dictdata",JSON.stringify(response));
@ -96,7 +96,7 @@ export default class Dict {
throw new Error('need dict types') throw new Error('need dict types')
} }
getRequest(params).then((res)=>{ getRequest(params,this.apiurl).then((res)=>{
if(res&&res.datas){ if(res&&res.datas){
const response=res.datas; const response=res.datas;
Object.keys(response).map((k,i)=>{ Object.keys(response).map((k,i)=>{
@ -179,9 +179,9 @@ export default class Dict {
} }
function getRequest(options) { function getRequest(options,apiurl) {
return request({ return request({
url: this.apiurl||"/api/sysdict/get_dict", url: apiurl||"/api/sysdict/get_dict",
method: 'post', method: 'post',
data: {dict_code:Array.isArray(options)?dictType:[options]} data: {dict_code:Array.isArray(options)?dictType:[options]}
}); });

View File

@ -32,6 +32,7 @@ const removePendingAjax = (config, type, c) => {
if (!!config.data && config.data != '{}') { if (!!config.data && config.data != '{}') {
url = config.url + '_' + config.data url = config.url + '_' + config.data
} }
// 数据请求中白名单 // 数据请求中白名单
const whitelist = ['get_class_account_list', 'cate_brand_list_all', 'ai_model_v2', 'res_advanced_search', 'qrcode', 'account_class_list', 'search_accessories', 'zz_new_status', 'get_unread_msg', 'third_party_no', 'get_ws_auth_code', 'get_drafts_box', 'manual_pull_datas', 'get_unopened_module', 'sales_performance_detail', 'goal_warehouse', 'chx_product_details', 'get_oss_sign_aliyun'] const whitelist = ['get_class_account_list', 'cate_brand_list_all', 'ai_model_v2', 'res_advanced_search', 'qrcode', 'account_class_list', 'search_accessories', 'zz_new_status', 'get_unread_msg', 'third_party_no', 'get_ws_auth_code', 'get_drafts_box', 'manual_pull_datas', 'get_unopened_module', 'sales_performance_detail', 'goal_warehouse', 'chx_product_details', 'get_oss_sign_aliyun']
const index = pendingAjax.findIndex(i => i === url) const index = pendingAjax.findIndex(i => i === url)