|
@@ -48,6 +48,32 @@ const actions = {
|
|
}
|
|
}
|
|
return res;
|
|
return res;
|
|
},
|
|
},
|
|
|
|
+ // 关联用户
|
|
|
|
+ async getList({ commit }, { skip = 0, limit, ...info } = {}) {
|
|
|
|
+ const res = await this.$axios.$get(`${api.organizationInfo}/getList`, {
|
|
|
|
+ skip,
|
|
|
|
+ limit,
|
|
|
|
+ ...info,
|
|
|
|
+ });
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
|
|
+ async bind({ commit }, payload) {
|
|
|
|
+ const res = await this.$axios.$post(`${api.organizationInfo}/bind`, payload);
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
|
|
+ async bindRemove({ commit }, payload) {
|
|
|
|
+ const res = await this.$axios.$post(`${api.organizationInfo}/bindRemove`, payload);
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
|
|
+ async wxLogin({ commit }, payload) {
|
|
|
|
+ const res = await this.$axios.$post(`${api.organizationInfo}/wxLogin`, payload);
|
|
|
|
+ if (res.errcode === 0) {
|
|
|
|
+ localStorage.setItem('token', res.data);
|
|
|
|
+ let user = jwt.decode(res.data);
|
|
|
|
+ commit('setUser', user, { root: true });
|
|
|
|
+ }
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
};
|
|
};
|
|
export default {
|
|
export default {
|
|
namespaced: true,
|
|
namespaced: true,
|