优化字典工具获取字典的取值
This commit is contained in:
@@ -9,11 +9,13 @@ const $dict = {
|
||||
this.url = config?.url || this.url
|
||||
},
|
||||
dicts() {
|
||||
return uni.getStorageSync('dicts') || [];
|
||||
let dicts = uni.getStorageSync('dicts')
|
||||
typeof dicts == "string" ? (dicts = JSON.parse(dicts)) : dicts
|
||||
return dicts || [];
|
||||
},
|
||||
load(...code) {
|
||||
return this.instance && this.instance.post(this.url, null, {
|
||||
withoutToken:true,
|
||||
withoutToken: true,
|
||||
params: {
|
||||
codeList: code.toString()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user