Browse Source

Merge branch 'develop/3.2.2' into develop/3.2.2_tencent

Damon 9 months atrás
parent
commit
2b95b46ed5
1 changed files with 45 additions and 5 deletions
  1. 45 5
      src/pages/public/remote.vue

+ 45 - 5
src/pages/public/remote.vue

@@ -58,11 +58,51 @@ export default {
     },
 
     getSubmit1() {
-      window.location.href = this.flowUrl;
+      if (this.flowUrl.length === 0) {
+        deviceUrlInfo({
+          code: this.state,
+          code: this.openId,
+        }).then((res) => {
+          if (res.code === 0) {
+            this.flowUrl = res.data.flowUrl;
+            this.wifiUrl = res.data.wifiUrl;
+            window.location.href = this.flowUrl;
+          } else {
+            uni.showToast({
+              title: res.message,
+              icon: "none",
+              mask: true,
+              duration: 2000,
+            });
+          }
+        });
+      } else {
+        window.location.href = this.flowUrl;
+      }
     },
 
     getSubmit2() {
-      window.location.href = this.wifiUrl;
+      if (this.wifiUrl.length === 0) {
+        deviceUrlInfo({
+          code: this.state,
+          code: this.openId,
+        }).then((res) => {
+          if (res.code === 0) {
+            this.flowUrl = res.data.flowUrl;
+            this.wifiUrl = res.data.wifiUrl;
+            window.location.href = this.wifiUrl;
+          } else {
+            uni.showToast({
+              title: res.message,
+              icon: "none",
+              mask: true,
+              duration: 2000,
+            });
+          }
+        });
+      } else {
+        window.location.href = this.wifiUrl;
+      }
     },
   },
 };
@@ -70,7 +110,7 @@ export default {
   
   <style lang="scss" scoped>
 .tips {
-  padding-top: 40%;
+  padding-top: 45%;
   margin-left: 20rpx;
   margin-right: 20rpx;
   font-size: 30rpx;
@@ -88,7 +128,7 @@ export default {
   line-height: 80rpx;
   margin-left: 40rpx;
   margin-right: 20rpx;
-  border-radius: 20rpx;
+  border-radius: 50rpx;
   align-items: center;
   justify-content: center;
   text-align: center;
@@ -104,7 +144,7 @@ export default {
   justify-content: center;
   text-align: center;
   font-size: 30rpx;
-  border-radius: 20rpx;
+  border-radius: 50rpx;
   margin-right: 40rpx;
 }