ljc 3 месяцев назад
Родитель
Сommit
2e3b0e6436
3 измененных файлов с 41 добавлено и 7 удалено
  1. 10 1
      PayInfo.html
  2. 19 0
      css/index.css
  3. 12 6
      js/forget.js

+ 10 - 1
PayInfo.html

@@ -18,7 +18,7 @@
 <div class="container" id="forget" v-loading="pictLoading" element-loading-background="rgba(43, 48, 67, 0.65)"
      element-loading-spinner="el-icon-loading">
   <div class="Va-document">
-    <div class="content-info">
+    <div v-if="timeStatus == 1" class="content-info">
       <p class="title"><span class="tit1">{{ lang.serial }}</span> <span class="tit2">{{ params.serial || '--' }}</span>
       </p>
       <div class="pays">
@@ -143,6 +143,15 @@
 
       </div>
     </div>
+    <div v-if="timeStatus == 2" class="content-info">
+      <div class="timeout">
+        <svg t="1773048670401" class="icon img_timeout" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16256" id="mx_n_1773048670402" width="256" height="256"><path d="M512 32C246.912 32 32 246.912 32 512c0 265.088 214.912 480 480 480 265.088 0 480-214.912 480-480 0-265.088-214.912-480-480-480z m0 896C282.24 928 96 741.76 96 512S282.24 96 512 96s416 186.24 416 416-186.24 416-416 416z" p-id="16257" fill="#bfbfbf"></path><path d="M512 384a32 32 0 0 0-32 32v352a32 32 0 0 0 64 0V416a32 32 0 0 0-32-32z" p-id="16258" fill="#bfbfbf"></path><path d="M512 272m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z" p-id="16259" fill="#bfbfbf"></path></svg>
+        <div class="timeout_tips">
+          {{lang['orderTip']}}
+        </div>
+      </div>
+
+    </div>
   </div>
 </div>
 

+ 19 - 0
css/index.css

@@ -95,6 +95,25 @@ html,body{
 .Va-document .content-info .btn-box .r-btn{
     margin-left: 10px;
 }
+.Va-document .content-info .timeout{
+    height: 100%;
+    min-height: 80vh;
+    display: flex;
+    align-content: center;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+}
+.Va-document .content-info .timeout .img_timeout{
+    width: 128px;
+    height: 128px;
+    margin-bottom: 50px;
+}
+.Va-document .content-info .timeout .timeout_tips{
+    color: #666;
+    font-weight: bold;
+    font-size: 18px;
+}
 
 
 @media screen and (max-width: 768px) {

+ 12 - 6
js/forget.js

@@ -17,6 +17,8 @@ var content = {
     BankCode: "银行Code:",
     expireTime: "过期时间:",
     success:'成功',
+    timeout:'订单已过期!',
+    orderTip:'找不到该订单或订单已过期!',
   },
   'en':{
     item1:'Order',
@@ -35,6 +37,8 @@ var content = {
     BankCode: "Bank Code:",
     expireTime: "ExpireTime:",
     success:'success',
+    timeout:'订单已过期!',
+    orderTip:'找不到该订单或订单已过期!',
   }
 };
 let config = {
@@ -82,7 +86,7 @@ let vm = new Vue({
 
         time:'',
         timer:null,
-        timeStatus:1,
+        timeStatus:0,
 
         rules: {
           
@@ -125,7 +129,6 @@ let vm = new Vue({
       send: async function () {
         this.pictLoading = true;
         axios.get(this.ho + '/pay/order/get?serial=' + this.serial, {
-          
           //参数
         }).then(res => {//请求成功后的处理函数
           if (res.data.code == 200) {
@@ -135,10 +138,13 @@ let vm = new Vue({
             });
             this.params = res.data.data;
           } else {
-            this.$message.error(res.data.msg);
+            // 过期或者单号不对前端来提示不用后端的字段
+            // this.$message.error(res.data.msg);
+            this.$message.error(this.lang['orderTip']);
           }
           this.timer = setInterval(() => {this.getDate()}, 1000);
-        }).catch(err => {                 //请求失败后的处理函数
+        }).catch(err => {
+          //请求失败后的处理函数
 
         })
         setTimeout(() => {
@@ -209,8 +215,8 @@ let vm = new Vue({
       
     },
     mounted() {
-      // this.ho ='http://192.168.0.21:15233';
-      this.ho = window.location.origin;
+      this.ho ='http://192.168.0.21:15233';
+      // this.ho = window.location.origin;
       // this.params.token = window.location.search.split('?token=')[1];
       this.serial = window.location.search.split('?serial=')[1];