Browse Source

错误页面返回直接退出

lsh 4 months ago
parent
commit
725729e1c4
5 changed files with 1920 additions and 406 deletions
  1. 1904 401
      node_modules/.package-lock.json
  2. 1 1
      package-lock.json
  3. 1 1
      pages.json
  4. 1 2
      pages/accredit/index.vue
  5. 13 1
      pages/error/index.vue

File diff suppressed because it is too large
+ 1904 - 401
node_modules/.package-lock.json


+ 1 - 1
package-lock.json

@@ -1,5 +1,5 @@
 {
-	"name": "ykz-wx",
+	"name": "ykz",
 	"lockfileVersion": 3,
 	"requires": true,
 	"packages": {

+ 1 - 1
pages.json

@@ -21,7 +21,7 @@
 		{
 			"path": "pages/error/index",
 			"style": {
-				"navigationBarTitleText": "错误页面",
+				"navigationBarTitleText": "中医用药一件事",
 				"h5":{
 					"titleNView":false
 				}

+ 1 - 2
pages/accredit/index.vue

@@ -31,8 +31,7 @@
 					getUserInfo(formData.value.authCode);
 				}, 0);
 			}).catch(err => {
-				// alert('不是钉钉环境', err)
-				link.goLogin()
+				link.getErrorPage()
 			})
 		})
 	}

+ 13 - 1
pages/error/index.vue

@@ -6,7 +6,19 @@
 	</view>
 </template>
 
-<script>
+<script setup lang="ts">
+	import { onUnload } from "@dcloudio/uni-app";
+	import dd from 'gdt-jsapi';
+	
+	onUnload(() => {
+		pageAwayEvent()
+	})
+	
+	const pageAwayEvent = ()=> {
+		dd.ready(() => {
+			dd.closePage({ message: '返回工作台!' });
+		})
+	}
 </script>
 
 <style lang="scss">