Browse Source

修改返回问题

lex-xin 5 years ago
parent
commit
3d1ff68c8d

File diff suppressed because it is too large
+ 0 - 0
dist/app.f06125a08847d90a0160.js


File diff suppressed because it is too large
+ 0 - 0
dist/css/PaymentResult.8d12146c.css


File diff suppressed because it is too large
+ 0 - 0
dist/css/PaymentResult.c7ddf093.css


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/js/PaymentResult.4dba3af8.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/PaymentResult.776dcbbc.js


+ 28 - 28
src/views/app/PaymentResult.vue

@@ -137,23 +137,22 @@ export default {
     },
     onAppBack() {
       // app回调页面
-      // let courseApply = localStorage.getItem('courseApply')
+      let courseApply = localStorage.getItem('courseApply')
       clearInterval(this.timer)
-      // if(courseApply) {
-      //   window.location.replace(
-      //   window.location.href.toString().replace(window.location.hash, "") +
-      //     "#" + "/courseApply" );
-      //   this.$router.push("/courseApply");
-      // } else {
-      //   window.location.replace(
-      //   window.location.href.toString().replace(window.location.hash, "") +
-      //     "#" + "/PeriodExchange" );
-      //   this.$router.push("/PeriodExchange");
-      // }
       let historyLength = window.history.length
-      window.history.go(-(historyLength - 1))
-      
-
+      if(courseApply) {
+        // window.location.replace(
+        // window.location.href.toString().replace(window.location.hash, "") +
+        //   "#" + "/courseApply" );
+        // this.$router.push("/courseApply");
+        window.history.go(-(historyLength - 1))
+      } else {
+        // window.location.replace(
+        // window.location.href.toString().replace(window.location.hash, "") +
+        //   "#" + "/PeriodExchange" );
+        // this.$router.push("/PeriodExchange");
+        window.history.go(-(historyLength - 2))
+      }
       // if (browser().android) {
       //     DAYA.postMessage(JSON.stringify({ api: "back" }));
       // } else if (browser().iPhone) {
@@ -163,21 +162,22 @@ export default {
       // }
     },
     onRepay() {
-      // let courseApply = localStorage.getItem('courseApply')
+      let courseApply = localStorage.getItem('courseApply')
       clearInterval(this.timer)
-      // if(courseApply) {
-      //   window.location.replace(
-      //   window.location.href.toString().replace(window.location.hash, "") +
-      //     "#" + "/courseApply" );
-      //   this.$router.push("/courseApply");
-      // } else {
-      //   window.location.replace(
-      //   window.location.href.toString().replace(window.location.hash, "") +
-      //     "#" + "/PeriodExchange" );
-      //   this.$router.push("/PeriodExchange");
-      // }
       let historyLength = window.history.length
-      window.history.go(-(historyLength - 1))
+      if(courseApply) {
+        // window.location.replace(
+        // window.location.href.toString().replace(window.location.hash, "") +
+        //   "#" + "/courseApply" );
+        // this.$router.push("/courseApply");
+        window.history.go(-(historyLength - 1))
+      } else {
+        // window.location.replace(
+        // window.location.href.toString().replace(window.location.hash, "") +
+        //   "#" + "/PeriodExchange" );
+        // this.$router.push("/PeriodExchange");
+        window.history.go(-(historyLength - 2))
+      }
     },
     CountDown() {
       let s = 60;

Some files were not shown because too many files changed in this diff