|
@@ -301,7 +301,7 @@ import axios from "axios";
|
|
|
import qs from "qs";
|
|
|
import { API_CONFIG } from "@/common/apiConfig";
|
|
|
import "@/common/wxLogin";
|
|
|
-import { getUser, loginOut } from "@/api/user";
|
|
|
+import { getUser, loginOut,GetSuffix } from "@/api/user";
|
|
|
import { myMixin } from "@/mixins/mixin.js";
|
|
|
|
|
|
export default {
|
|
@@ -405,34 +405,16 @@ export default {
|
|
|
// 获取组织后缀
|
|
|
async getSuffix() {
|
|
|
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
-
|
|
|
- let params = [
|
|
|
- {
|
|
|
- functionName: API_CONFIG.ajax_getliyuanCode.functionName,
|
|
|
- mode: this.SuffixData
|
|
|
- },
|
|
|
- ];
|
|
|
- this.$ajax
|
|
|
- .post(API_CONFIG.baseUrl, params)
|
|
|
- .then((res) => {
|
|
|
- let data = [...res.data[0], ...res.data[1]]
|
|
|
- console.log('data',data);
|
|
|
- if (data.length) {
|
|
|
- this.orginfo = data;
|
|
|
- this.org = this.orginfo[0].mail;
|
|
|
- } else {
|
|
|
- this.orginfo = [];
|
|
|
- this.org = "";
|
|
|
- }
|
|
|
- resolve(1)
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- console.log(e);
|
|
|
- reject(e)
|
|
|
- })
|
|
|
- })
|
|
|
+ let res = await GetSuffix({ mode: this.SuffixData });
|
|
|
+ console.log("res.data[0]", res.data[0]);
|
|
|
|
|
|
+ if (res.data[0].length && this.SuffixData) {
|
|
|
+ this.orginfo = res.data[0];
|
|
|
+ this.org = this.orginfo[0].mail;
|
|
|
+ } else {
|
|
|
+ this.orginfo = [];
|
|
|
+ this.org = "";
|
|
|
+ }
|
|
|
// let res = await getliyuanCode({ mode: this.SuffixData });
|
|
|
// console.log("res.data", res.data);
|
|
|
|