liuzhihui %!s(int64=2) %!d(string=před) roky
rodič
revize
e355cb5673
1 změnil soubory, kde provedl 16 přidání a 1 odebrání
  1. 16 1
      CallCenterWeb.UI/RMYYAPP/App.vue

+ 16 - 1
CallCenterWeb.UI/RMYYAPP/App.vue

1
 <script>
1
 <script>
2
-  
2
+    import { getCode } from '@/utils/dd'
3
 	export default {
3
 	export default {
4
 		onLaunch: function() {
4
 		onLaunch: function() {
5
 			console.log('App Launch')
5
 			console.log('App Launch')
6
 		},
6
 		},
7
 		onShow: function() {
7
 		onShow: function() {
8
 			console.log('App Show')
8
 			console.log('App Show')
9
+			this.init()//判断是不是钉钉环境
9
 		},
10
 		},
10
 		onHide: function() {
11
 		onHide: function() {
11
 			console.log('App Hide')
12
 			console.log('App Hide')
12
 		},
13
 		},
14
+		methods: {
15
+			init() {
16
+				getCode((type,code) => {
17
+					console.log(type,code)
18
+					if(type == 'H5') {
19
+						if(code == 'fail'){
20
+							uni.navigateTo({
21
+								url: '/pages/noDing/noDing'
22
+							});
23
+						}						
24
+					}
25
+				})
26
+			},
27
+		}
13
 		
28
 		
14
 	}
29
 	}
15
 </script>
30
 </script>