更新到0.1.4版本

This commit is contained in:
lyswhut
2019-08-18 20:36:17 +08:00
parent ba8991a034
commit a580cedcb1
22 changed files with 306 additions and 161 deletions
+28
View File
@@ -0,0 +1,28 @@
import kw_api_messoer from './kw/api-messoer'
import kw_api_temp from './kw/api-temp'
import tx_api_messoer from './tx/api-messoer'
const apis = {
kw_api_messoer,
tx_api_messoer,
kw_api_temp,
}
const getAPI = source => {
switch (window.globalObj.apiSource) {
case 'messoer':
return apis[`${source}_api_messoer`]
case 'temp':
return apis[`${source}_api_temp`]
}
}
export default source => {
switch (source) {
case 'tx':
return getAPI('tx')
default:
return getAPI('kw')
}
}