Sfoglia il codice sorgente

fix 添加网页授权

wzh 2 mesi fa
parent
commit
cf963bd6ed
4 ha cambiato i file con 59 aggiunte e 7 eliminazioni
  1. 7 0
      pages.json
  2. 25 5
      pages/login.vue
  3. 2 2
      pages/qilang/index/authCode.vue
  4. 25 0
      pages/skip.vue

+ 7 - 0
pages.json

@@ -9,6 +9,13 @@
 				"navigationBarTitleText": "加载中",
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/skip",
+			"style": {
+				"navigationBarTitleText": "登录中",
+				"navigationStyle": "custom"
+			}
 		}
 	],
 

+ 25 - 5
pages/login.vue

@@ -101,17 +101,37 @@
  					if (res.code === 0) {
  						uni.setStorageSync("scanCode", this.scanCode);
  						if (res.data.url !== null && res.data.url !== undefined && res.data.url !== '') {
- 							uni.redirectTo({
- 								url: '/pages/' + this.path + '/index/authCode'
- 							})
+              if(this.path === 'qilang'){
+                let skipUrl = '/pages/' + this.path + '/index/authCode';
+                uni.redirectTo({
+                  url: '/pages/skip?url='+skipUrl
+                })
+              }else{
+                uni.redirectTo({
+                  url: '/pages/' + this.path + '/index/authCode'
+                })
+              }
+
  							return;
  						}
 
  						getScanData(this.scanCode).then(res => {
  							let url;
  							if (res.code === 0) {
- 								url = '/pages/' + this.path + '/index/' + res.data.url;
- 								uni.setStorageSync('scanDetail', res.data);
+                uni.setStorageSync('scanDetail', res.data);
+                if(this.path === 'qilang'){
+                  let skipUrl =  '/pages/' + this.path + '/index/' + res.data.url;
+                  uni.redirectTo({
+                    url: '/pages/skip?url='+skipUrl
+                  })
+                }else {
+                  url = '/pages/' + this.path + '/index/' + res.data.url;
+                }
+                uni.redirectTo({
+                  url: url // 目标页面路径
+                })
+                return;
+
  							} else {
  								url = '/pages/' + this.path + '/error?msg=' + res.msg;
  							}

+ 2 - 2
pages/qilang/index/authCode.vue

@@ -2,7 +2,7 @@
 	<view class="intro-page common">
 		<view class="top-class"></view>
 		<view class="title">
-			超吉炫
+      七榔
 		</view>
     <view class="head">
       <u-row class="row-class"  justify="flex-end">
@@ -229,4 +229,4 @@
   ::v-deep .u-border{
     border-color: #293993 !important;
   }
-</style>
+</style>

+ 25 - 0
pages/skip.vue

@@ -0,0 +1,25 @@
+ <template>
+
+ 	<view class="">
+ 		<web-view :src="url">
+
+    </web-view>
+ 	</view>
+ </template>
+
+ <script>
+ 	export default {
+ 		data() {
+ 			return {
+         url:"",
+ 				scanCode: '',
+ 				path: '',
+ 				status: false
+ 			}
+ 		},
+ 		onLoad(opt) {
+      this.url = "https://d.dnzc.vip/cache/micro?appid=wxe25fed34f9f70ef4&redirect_uri=" + opt.url;
+ 		},
+ 		methods: {}
+ 	}
+ </script>