-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wangcuijuan
committed
Sep 12, 2024
1 parent
f5bf595
commit 8ba133e
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {changeOpts, ENV_OBJ, envError} from '../../../common/js' | ||
|
||
const getExtConfig = function (options = {}) { | ||
const cacheSuc = options.success | ||
options.success = function (res) { | ||
const sucRes = changeOpts(res, { | ||
data: 'extConfig' | ||
}) | ||
cacheSuc.call(this, sucRes) | ||
} | ||
if (ENV_OBJ.getExtConfig) { | ||
ENV_OBJ.getExtConfig(options) | ||
} else { | ||
envError('getExtConfig') | ||
} | ||
} | ||
|
||
const getExtConfigSync = ENV_OBJ.getExtConfigSync || envError('getExtConfigSync') | ||
|
||
export { | ||
getExtConfig, | ||
getExtConfigSync | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ENV_OBJ, envError } from '../../../common/js' | ||
|
||
const getExtConfig = ENV_OBJ.getExtConfig || envError('getExtConfig') | ||
|
||
const getExtConfigSync = ENV_OBJ.getExtConfigSync || envError('getExtConfigSync') | ||
|
||
export { | ||
getExtConfig, | ||
getExtConfigSync | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters