From 38d111cb6defedff3bf06314ca30d22a01faae22 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期一, 09 二月 2026 16:30:36 +0800
Subject: [PATCH] 功能开发

---
 mini-program/App.vue |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/mini-program/App.vue b/mini-program/App.vue
index 233a4bb..751f532 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -1,7 +1,36 @@
 <script>
 	export default {
 		onLaunch: function() {
-			console.log('App Launch')
+			var that = this
+			let href = window.location.href;
+			if (this.$dd.env.platform !== 'notInDingTalk') {
+				console.log('閽夐拤鎺堟潈鐧诲綍')
+				let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
+				// dingy7xdyzffnegiaszo 姝e紡
+				// dingulzemj5bynjciapg 娴嬭瘯
+				this.$dd.requestAuthCode({
+					corpId: corpId,
+					clientId: 'dingy7xdyzffnegiaszo',
+					onSuccess: function(result) {
+						that.$u.api.ddLogin({
+							code: result.code,
+							corpId: corpId
+						}).then(res => {
+							if (res.code === 200) {
+								that.$store.commit('setToken', res.data.token)
+								that.$isResolve()
+							}
+						})
+					}
+				});
+			} else if (href.indexOf('?token') !== -1) {
+				console.log('token鍏嶇櫥')
+				let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#'))
+				that.$store.commit('setToken', token)
+				that.$isResolve()
+			} else {
+				that.$isResolve()
+			}
 		},
 		onShow: function() {
 			console.log('App Show')
@@ -14,4 +43,4 @@
 
 <style lang="scss">
 	@import "uview-ui/index.scss";
-</style>
+</style>
\ No newline at end of file

--
Gitblit v1.9.3