|
@@ -97,6 +97,7 @@ export default {
|
|
|
loading: false,
|
|
|
finished: false,
|
|
|
noDate: false,
|
|
|
+ firstLoad: true,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -105,10 +106,7 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- async created() {
|
|
|
- // console.log("======created===========")
|
|
|
- await this.getLogin();
|
|
|
- },
|
|
|
+ created() {},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
toDetail(id) {
|
|
@@ -127,7 +125,12 @@ export default {
|
|
|
onSearch() {
|
|
|
this.getList();
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ async onLoad() {
|
|
|
+ if (this.firstLoad) {
|
|
|
+ this.firstLoad = false;
|
|
|
+ await this.getLogin();
|
|
|
+ }
|
|
|
+
|
|
|
this.getList();
|
|
|
},
|
|
|
getList() {
|
|
@@ -144,7 +147,7 @@ export default {
|
|
|
listResume(that.queryParams)
|
|
|
.then((response) => {
|
|
|
if (response.code == 200) {
|
|
|
- console.log("移动端=", response);
|
|
|
+ // console.log("移动端=", response);
|
|
|
that.$toast.clear();
|
|
|
let data = response.rows,
|
|
|
total = response.total;
|
|
@@ -158,7 +161,7 @@ export default {
|
|
|
} else {
|
|
|
that.finished = false;
|
|
|
that.list.push(...data);
|
|
|
- that.queryParams.page += 1;
|
|
|
+ that.queryParams.pageNum += 1;
|
|
|
}
|
|
|
that.loading = false;
|
|
|
}
|
|
@@ -170,12 +173,13 @@ export default {
|
|
|
async getLogin() {
|
|
|
let that = this;
|
|
|
// 取值-同步
|
|
|
+ // console.log("dd.env.platform=", dd.env.platform);
|
|
|
// console.log("是否是移动端=", this.$store.state.app.isMobileEnv);
|
|
|
if (dd.env.platform !== "notInDingTalk") {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
dd.ready(function () {
|
|
|
// 钉钉免登录认证-第三方企业
|
|
|
- let corpId = that.$store.state.app.corpId || "ding870ccf3c4d8fc1bc";
|
|
|
+ let corpId = that.$store.state.app.corpId;
|
|
|
// 唤起授权--统一授权套件SDK
|
|
|
openAuth({
|
|
|
clientId: "suiteyjd6ikxpg8629ydr", // 应用ID(唯一标识)
|
|
@@ -185,12 +189,12 @@ export default {
|
|
|
type: 0, // 0 标识授权个人信息;1 标识授权组织信息
|
|
|
}).then((res) => {
|
|
|
// 处理返回数据
|
|
|
- console.log("统一授权套件SDK==res=", res);
|
|
|
+ // console.log("统一授权套件SDK==res=", res);
|
|
|
//cropLogin
|
|
|
//authLogin
|
|
|
authLogin({ code: res.result.authCode, corpId: corpId })
|
|
|
.then((res) => {
|
|
|
- console.log("===登录授权=", res);
|
|
|
+ // console.log("===登录授权=", res);
|
|
|
// let userInfo = res.sysUser;
|
|
|
setToken(res.msg);
|
|
|
that.$store.commit("SET_TOKEN", res.msg);
|