|
@@ -34,6 +34,12 @@ const api = {
|
|
|
corpLogin: '/api/corp/login',
|
|
|
dictionary: '/api/code/{type}/items', //type === xzqh:query:level(1/2);parent(无/code)
|
|
|
corpReg: '/api/corp/corps', //query:type:0=>用户名+密码 account(学号@学校id)+passwd;1-微信(wxtoken)
|
|
|
+ //验证码
|
|
|
+ verify: '/adminapi/verify/verify',
|
|
|
+ checkVerify: '/adminapi/verify/check_verify',
|
|
|
+ //短信验证码
|
|
|
+ message: '/adminapi/verify/sendmessage',
|
|
|
+ checkMessage: '/adminapi/verify/check_message',
|
|
|
};
|
|
|
|
|
|
export default new Vuex.Store({
|
|
@@ -346,15 +352,27 @@ export default new Vuex.Store({
|
|
|
let result = await this.$axios.$post(api.corpReg, data, {}, { schid: schid, schname: schname });
|
|
|
return result;
|
|
|
},
|
|
|
- //没用
|
|
|
- async schCorps({ state, commit }) {
|
|
|
- let result = await this.$axios.$get(api.corpReg, { schid: 999991 });
|
|
|
- return result;
|
|
|
- },
|
|
|
async corpLogin({ state }, { type, data }) {
|
|
|
let result = this.$axios.$post(api.corpLogin, data, {}, { type: type });
|
|
|
return result;
|
|
|
},
|
|
|
+ //验证码
|
|
|
+ async verifyOperation({ state }, { type, data }) {
|
|
|
+ let result;
|
|
|
+ if (type === 'verify') {
|
|
|
+ result = await this.$axios.$get(api.verify, {}, data);
|
|
|
+ }
|
|
|
+ if (type === 'checkVerify') {
|
|
|
+ result = await this.$axios.$post(api.checkVerify, data);
|
|
|
+ }
|
|
|
+ if (type === 'message') {
|
|
|
+ result = await this.$axios.$get(api.message, {}, data);
|
|
|
+ }
|
|
|
+ if (type === 'checkMessage') {
|
|
|
+ result = await this.$axios.$post(api.checkMessage, data);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ },
|
|
|
},
|
|
|
});
|
|
|
|