Browse Source

修改显示

lex-xin 4 years ago
parent
commit
38b0389475

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


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


File diff suppressed because it is too large
+ 0 - 0
dist/css/PaymentResult.b1ca8d6d.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.44adf79a.js


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


+ 46 - 56
src/views/app/PaymentResult.vue

@@ -36,24 +36,26 @@
           <span>订单号:</span>
           {{ orderInfo.orderNo }}
         </p>
-          <p>
-            <!-- 订单内容:购买的小时数, -->
-            <span>购买详情:</span>
-            <span>购买:{{ orderInfo.transMinutes | calcMinute }};</span>
-            <span v-if="orderInfo.giveMinutes && orderInfo.giveMinutes > 0">赠送:{{ orderInfo.giveMinutes | calcMinute }};</span>
-          </p>
+        <p>
+          <!-- 订单内容:购买的小时数, -->
+          <span>购买详情:</span>
+          <span>购买:{{ orderInfo.transMinutes | calcMinute }};</span>
+          <span
+            v-if="orderInfo.giveMinutes && orderInfo.giveMinutes > 0"
+          >赠送:{{ orderInfo.giveMinutes | calcMinute }};</span>
+        </p>
         <!-- <img class="icon_img" v-if="!ownershipType" src="@/assets/images/icon_cw.png" alt srcset /> -->
       </div>
-      <van-button type="info" @click="onRepay" round>返回</van-button>
+      <van-button type="info" @click="onAppBack" round>返回</van-button>
     </div>
   </div>
 </template>
 
 <script>
 /* eslint-disable */
-import MHeader from "@/components/MHeader"
-import { browser } from "@/common/common"
-import { queryByOrderNoAuth } from '@/api/app'
+import MHeader from "@/components/MHeader";
+import { browser, validStudentUrl } from "@/common/common";
+import { queryByOrderNoAuth } from "@/api/app";
 
 export default {
   name: "paymentresult",
@@ -75,22 +77,31 @@ export default {
       this.headerStatus = true;
     }
     this.__init();
-    this.pushHistory()
-    window.addEventListener("popstate", function(e) { 
+    this.pushHistory();
+    window.addEventListener(
+      "popstate",
+      function(e) {
         if (browser().android) {
-            DAYA.postMessage(JSON.stringify({ api: 'back' }))
+          DAYA.postMessage(JSON.stringify({ api: "back" }));
         } else if (browser().iPhone) {
-            window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({ api: 'back' }))
+          window.webkit.messageHandlers.DAYA.postMessage(
+            JSON.stringify({ api: "back" })
+          );
+        } else {
+          window.location.replace(
+          validStudentUrl() + "/#/teacherDownload")
         }
-    }, false)
+      },
+      false
+    );
   },
   methods: {
-    pushHistory() { 
-        var state = { 
-            title: "title", 
-            url: "#"
-        }
-        window.history.pushState(state, "title", "#")
+    pushHistory() {
+      var state = {
+        title: "title",
+        url: "#"
+      };
+      window.history.pushState(state, "title", "#");
     },
     __init() {
       let params = this.$route.query;
@@ -101,8 +112,8 @@ export default {
           let result = res.data;
           if (result.code == 200) {
             let tempResult = result.data;
-            this.orderInfo = tempResult
-            this.showStatus(tempResult.status)
+            this.orderInfo = tempResult;
+            this.showStatus(tempResult.status);
           } else {
             // 订单处理中
             this.pageStatus = "paying";
@@ -140,7 +151,6 @@ export default {
         return str;
       }
     },
-    
     showStatus(status, type) {
       if (status == "ING") {
         this.pageStatus = "paying";
@@ -153,22 +163,20 @@ export default {
     },
     onAppBack() {
       // app回调页面
-      let courseApply = window.localStorage.getItem('courseApply')
-      clearInterval(this.timer)
-      let historyLength = window.history.length
-      if(courseApply) {
-        // window.location.replace(
-        // window.location.href.toString().replace(window.location.hash, "") +
-        //   "#" + "/courseApply" );
-        // this.$router.push("/courseApply");
-        window.history.go(-(historyLength - 1))
+      let courseApply = window.localStorage.getItem("courseApply");
+      clearInterval(this.timer);
+      let historyLength = window.history.length;
+      if (browser().android || browser().iPhone) {
+        if (courseApply) {
+          window.history.go(-(historyLength - 1));
+        } else {
+          window.history.go(-(historyLength - 2));
+        }
       } else {
-        // window.location.replace(
-        // window.location.href.toString().replace(window.location.hash, "") +
-        //   "#" + "/PeriodExchange" );
-        // this.$router.push("/PeriodExchange");
-        window.history.go(-(historyLength - 2))
+        window.location.replace(
+          validStudentUrl() + "/#/teacherDownload")
       }
+
       // if (browser().android) {
       //     DAYA.postMessage(JSON.stringify({ api: "back" }));
       // } else if (browser().iPhone) {
@@ -177,24 +185,6 @@ export default {
       //     );
       // }
     },
-    onRepay() {
-      let courseApply = window.localStorage.getItem('courseApply')
-      clearInterval(this.timer)
-      let historyLength = window.history.length
-      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;
       this.smsText = s;

+ 2 - 2
vue.config.js

@@ -1,7 +1,7 @@
 // let targetUrl = 'http://mteadev.dayaedu.com'
-// let targetUrl = 'http://192.168.3.139:8000' // 箭河
+let targetUrl = 'http://192.168.3.139:8000' // 箭河
 // let targetUrl = 'https://online.dayaedu.com'
-let targetUrl = 'http://dev.dayaedu.com/'
+// let targetUrl = 'http://dev.dayaedu.com/'
 // let targetUrl = 'http://192.168.3.151:8080'
 module.exports = {
   chainWebpack: config => {

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