| | |
| | | * @description 获取业务通用接口 |
| | | * 访问 'https://sso.mk9h.cn/webapi/dostars'或云端时,传入userid、LoginUID |
| | | */ |
| | | genericInterface (param) { |
| | | genericInterface (param, script = '', position) { |
| | | param.userid = param.userid || sessionStorage.getItem('UserID') || '' |
| | | param.lang = param.lang || sessionStorage.getItem('lang') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | |
| | | } |
| | | } |
| | | |
| | | if (param.$login) { |
| | | if (script) { |
| | | try { |
| | | // eslint-disable-next-line |
| | | let func = new Function('axios', 'Api', 'param', 'position', 'systemType', script) |
| | | let promise = func(axios, this, param, position, window.GLOB.systemType) |
| | | |
| | | if (promise instanceof Promise) { |
| | | return promise |
| | | } |
| | | } catch (e) { |
| | | console.warn(e) |
| | | } |
| | | |
| | | return Promise.resolve({ |
| | | status: false, |
| | | message: '自定义脚本执行错误', |
| | | ErrCode: 'E' |
| | | }) |
| | | } else if (param.$login) { |
| | | let rduri = param.rduri || '' |
| | | |
| | | delete param.$login |