|
@@ -32,6 +32,7 @@ import service from './service'
|
|
|
import notice from './notice'
|
|
|
import ability from './ability';
|
|
|
import jyzx from './jyzx'
|
|
|
+import thirdparty from './thirdparty'
|
|
|
import train from './train'
|
|
|
import common from './common'
|
|
|
import lessonRecord from './lessonRecord'
|
|
@@ -73,109 +74,110 @@ export default {
|
|
|
common,
|
|
|
lessonRecord,
|
|
|
auth,
|
|
|
+ thirdparty,
|
|
|
// 获取登录跳转链接
|
|
|
- getLoginLink: function (data) {
|
|
|
+ getLoginLink: function(data) {
|
|
|
return post('api/login/login', data)
|
|
|
},
|
|
|
// 验证登录
|
|
|
- checkLogin: function (data) {
|
|
|
+ checkLogin: function(data) {
|
|
|
return post('api/login/CheckLogin', data)
|
|
|
},
|
|
|
// 获取登录人员角色列表
|
|
|
- getLoginRoles: function (data) {
|
|
|
+ getLoginRoles: function(data) {
|
|
|
return post('api/role/GetLoginRoles', data)
|
|
|
},
|
|
|
// 查找地区对应学校列表
|
|
|
- getSchoolList: function (data) {
|
|
|
+ getSchoolList: function(data) {
|
|
|
return post('api/School/getSchool', data)
|
|
|
},
|
|
|
// 根据当前登录用户获取已授权的AI智慧学校
|
|
|
- getAuthSchool: function (data) {
|
|
|
+ getAuthSchool: function(data) {
|
|
|
return post('api/School/AuthorizedAISchool', data)
|
|
|
},
|
|
|
// 获取全部科目
|
|
|
- FindSubjectsByDict: function (data) {
|
|
|
+ FindSubjectsByDict: function(data) {
|
|
|
return post('api/subject/FindSubjectsByDict', data)
|
|
|
},
|
|
|
// 获取当前学校全部科目
|
|
|
- FindSchoolSubjectsByDict: function (data) {
|
|
|
+ FindSchoolSubjectsByDict: function(data) {
|
|
|
return post('api/subject/FindSchoolSubjectsByDict', data)
|
|
|
},
|
|
|
// 获取当前学校全部册别
|
|
|
- FindSchoolVolumesByDict: function (data) {
|
|
|
+ FindSchoolVolumesByDict: function(data) {
|
|
|
return post('api/volume/FindSchoolVolumesByDict', data)
|
|
|
},
|
|
|
// 获取当前学校全部学段
|
|
|
- FindSchoolPeriodsByDict: function (data) {
|
|
|
+ FindSchoolPeriodsByDict: function(data) {
|
|
|
return post('api/period/FindSchoolPeriodsByDict', data)
|
|
|
},
|
|
|
// 获取当前学校全部年级
|
|
|
- FindSchoolGradesByDict: function (data) {
|
|
|
+ FindSchoolGradesByDict: function(data) {
|
|
|
return post('api/grade/FindSchoolGradesByDict', data)
|
|
|
},
|
|
|
// 获取当前学校全部学期
|
|
|
- FindSchoolTermsByDict: function (data) {
|
|
|
+ FindSchoolTermsByDict: function(data) {
|
|
|
return post('api/term/FindSchoolTermsByDict', data)
|
|
|
},
|
|
|
|
|
|
|
|
|
// 获取登录人员身份信息
|
|
|
- getLoginClaim: function (data) {
|
|
|
+ getLoginClaim: function(data) {
|
|
|
return post('api/role/GetLoginClaim', data)
|
|
|
},
|
|
|
|
|
|
// 新建习题保存到题库
|
|
|
- SaveItemBank: function (data) {
|
|
|
+ SaveItemBank: function(data) {
|
|
|
return post('api/evaluation/ItemBank', data)
|
|
|
},
|
|
|
|
|
|
// 新建试卷到试卷库
|
|
|
- SaveTestPaper: function (data) {
|
|
|
+ SaveTestPaper: function(data) {
|
|
|
return post('api/Evaluation/testPaper', data)
|
|
|
},
|
|
|
|
|
|
// 新建试卷到试卷库
|
|
|
- SaveAnalyzeHtml: function (data) {
|
|
|
+ SaveAnalyzeHtml: function(data) {
|
|
|
return post('/import/parse-html', data)
|
|
|
},
|
|
|
|
|
|
// 获取所有学校信息
|
|
|
- GetAllSchool: function (data) {
|
|
|
+ GetAllSchool: function(data) {
|
|
|
return post('api/school/GetAllSchool', data)
|
|
|
},
|
|
|
|
|
|
// 取得所有學校(只取基本資料)
|
|
|
- GetAllSchoolBaesInfo: function (data) {
|
|
|
+ GetAllSchoolBaesInfo: function(data) {
|
|
|
return post('/school/init/get-all-school-base', data)
|
|
|
},
|
|
|
|
|
|
// 根据条件获取学段
|
|
|
- FindPeriodsByDict: function (data) {
|
|
|
+ FindPeriodsByDict: function(data) {
|
|
|
return post('api/period/FindPeriodsByDict', data)
|
|
|
},
|
|
|
|
|
|
// 根据条件获取年级
|
|
|
- FindGradesByDict: function (data) {
|
|
|
+ FindGradesByDict: function(data) {
|
|
|
return post('api/grade/FindGradesByDict', data)
|
|
|
},
|
|
|
// 根据条件获取学科
|
|
|
- FindSubjectsByDict: function (data) {
|
|
|
+ FindSubjectsByDict: function(data) {
|
|
|
return post('api/subject/FindSubjectsByDict', data)
|
|
|
},
|
|
|
|
|
|
|
|
|
/*
|
|
|
- *评测
|
|
|
- */
|
|
|
+ *评测
|
|
|
+ */
|
|
|
// 上传图片
|
|
|
- UploadFile: function (data) {
|
|
|
+ UploadFile: function(data) {
|
|
|
return post('/api/file/uploadFile', data)
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 通用查询接口
|
|
|
*/
|
|
|
- FindCollection: function (data) {
|
|
|
+ FindCollection: function(data) {
|
|
|
return post('/api/Common/FindCollection', data)
|
|
|
},
|
|
|
|
|
@@ -187,7 +189,7 @@ export default {
|
|
|
* @param {Boolean} hasUser - true,代表必須存在用戶,才能發送,false,代表用戶必須不存在,才能發送
|
|
|
* @param {Number} country - 手機區碼,無須+號(有phone為必填)
|
|
|
*/
|
|
|
- SendPinCode: function (item) {
|
|
|
+ SendPinCode: function(item) {
|
|
|
return new Promise((resolve) => {
|
|
|
let srvAdr = localStorage.getItem('srvAdr')
|
|
|
let url = config.state[srvAdr].coreAPIUrl
|
|
@@ -218,7 +220,7 @@ export default {
|
|
|
* @param {String} url - (必要)
|
|
|
* @returns {String} - 網址
|
|
|
*/
|
|
|
- BuildOauthUrl: async function (provider, url) {
|
|
|
+ BuildOauthUrl: async function(provider, url) {
|
|
|
return new Promise((resolve) => {
|
|
|
let result = ''
|
|
|
let redirect_uri = encodeURIComponent(url)
|
|
@@ -246,11 +248,11 @@ export default {
|
|
|
* @param {String} code
|
|
|
* @param {String} redirect_uri
|
|
|
*/
|
|
|
- OauthLogin: function (grant_type, code, redirect_uri) {
|
|
|
+ OauthLogin: function(grant_type, code, redirect_uri) {
|
|
|
return new Promise((resolve) => {
|
|
|
let srvAdr = localStorage.getItem('srvAdr')
|
|
|
let url = config.state[srvAdr].coreAPIUrl
|
|
|
- let nonceStr = 'habook' // 檢查項目
|
|
|
+ let nonceStr = 'habook' // 檢查項目
|
|
|
let data = {
|
|
|
'client_id': config.state[srvAdr].clientID,
|
|
|
'grant_type': grant_type,
|
|
@@ -282,11 +284,11 @@ export default {
|
|
|
* 大雲快速登入
|
|
|
* @param {String} code
|
|
|
*/
|
|
|
- SSOLogin: function (code) {
|
|
|
+ SSOLogin: function(code) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
let srvAdr = localStorage.getItem('srvAdr')
|
|
|
let url = config.state[srvAdr].coreAPIUrl
|
|
|
- let nonceStr = 'habook' // 檢查項目
|
|
|
+ let nonceStr = 'habook' // 檢查項目
|
|
|
let data = {
|
|
|
'grant_type': 'authorization_code',
|
|
|
'client_id': config.state[srvAdr].clientID,
|
|
@@ -307,16 +309,16 @@ export default {
|
|
|
/**
|
|
|
* 數據中心當前所有學校名單
|
|
|
*/
|
|
|
- getSchoolList: function (data) {
|
|
|
+ getSchoolList: function(data) {
|
|
|
data = (data == null) ? {} : data
|
|
|
return post('/teacher/init/get-school-list', data)
|
|
|
},
|
|
|
/* 换取短网址 */
|
|
|
- getShortUrl: function (url) {
|
|
|
+ getShortUrl: function(url) {
|
|
|
return post('/core/get-short-url', { url })
|
|
|
},
|
|
|
/* 换取长网址 */
|
|
|
- getLongUrl: function (url) {
|
|
|
+ getLongUrl: function(url) {
|
|
|
return post('/core/get-long-url', { url })
|
|
|
},
|
|
|
-}
|
|
|
+}
|