From 05aec1e9986fbe3e907259bb1a1396f129bd0fa1 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 06 二月 2026 14:14:48 +0800
Subject: [PATCH] 优化
---
mini-program/App.vue | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/mini-program/App.vue b/mini-program/App.vue
index a425727..751f532 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -4,10 +4,13 @@
var that = this
let href = window.location.href;
if (this.$dd.env.platform !== 'notInDingTalk') {
- let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.length)
+ console.log('閽夐拤鎺堟潈鐧诲綍')
+ let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
+ // dingy7xdyzffnegiaszo 姝e紡
+ // dingulzemj5bynjciapg 娴嬭瘯
this.$dd.requestAuthCode({
- corpId: 'dingulzemj5bynjciapg',
- clientId: 'dingulzemj5bynjciapg',
+ corpId: corpId,
+ clientId: 'dingy7xdyzffnegiaszo',
onSuccess: function(result) {
that.$u.api.ddLogin({
code: result.code,
@@ -15,17 +18,18 @@
}).then(res => {
if (res.code === 200) {
that.$store.commit('setToken', res.data.token)
- this.$isResolve()
+ that.$isResolve()
}
})
}
});
} else if (href.indexOf('?token') !== -1) {
- let token = href.substring(href.lastIndexOf('?token=') + 7, href.length)
+ console.log('token鍏嶇櫥')
+ let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#'))
that.$store.commit('setToken', token)
- this.$isResolve()
+ that.$isResolve()
} else {
- this.$isResolve()
+ that.$isResolve()
}
},
onShow: function() {
--
Gitblit v1.9.3