lighter 1 سال پیش
والد
کامیت
004b7dcb0d
2فایلهای تغییر یافته به همراه22 افزوده شده و 20 حذف شده
  1. 17 15
      src/views/404.vue
  2. 5 5
      src/views/public-pages/PaymentSuccess.vue

+ 17 - 15
src/views/404.vue

@@ -6,22 +6,26 @@
   <div class="b">
     <img src="../assets/404text.png" class="center" />
     <p>
-      暂时未能找到您查找的页面<br />
-      可能输入的网址错误或此页面不存在<br />
-      <button @click="goBack">&lt;&lt;&lt;&nbsp;&nbsp;点此返回上一页</button>
+      页面不存在<br />
+      <button @click="goBack">返回上一页</button>
+      <br />
+      <button @click="goHome">返回首页</button>
     </p>
   </div>
 </template>
 
-<script>
-export default {
-  name: '404',
-  setup() {
-    const goBack = () => {
-      window.history.back(-1)
-    }
-    return { goBack }
-  },
+<script setup>
+
+import {useRouter} from "vue-router";
+
+const router = useRouter()
+
+const goBack = () => {
+  router.go(-1)
+}
+
+function goHome() {
+  router.push("/")
 }
 </script>
 
@@ -30,11 +34,9 @@ export default {
   margin: 0;
   padding: 0;
   outline: none;
-  font-family: \5fae\8f6f\96c5\9ed1, 宋体;
   -webkit-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
-  -khtml-user-select: none;
   user-select: none;
   cursor: default;
   font-weight: lighter;
@@ -106,7 +108,7 @@ button {
   background-color: transparent;
   border: 1px solid white;
   width: 200px;
-  height: 45px;
+  height: 55px;
   color: white;
   border-radius: 5px;
   font-weight: bold;

+ 5 - 5
src/views/public-pages/PaymentSuccess.vue

@@ -125,7 +125,7 @@ import {useRouter} from "vue-router";
 import store from "../../store";
 import {computed, reactive, ref} from "vue";
 import {commitNewComment} from "../../api/comment";
-import {showToast} from "vant";
+import {showDialog} from "vant";
 import WxOrderDetail from '../../components/wx-order-detail/index.vue'
 
 const router = useRouter()
@@ -180,10 +180,10 @@ function submitComment() {
   comment.patientName = createOrderRequest.patientName
   commitNewComment(comment).then(res => {
     disableSubmitComment.value = true
-    showToast({
-      message: res,
-      position: 'top',
-    });
+    showDialog({
+      type: 'success',
+      message: '提交成功,感谢您的评价!',
+    })
   })
 }
 </script>