Browse Source

支付成功

lifanagju_citu 4 tháng trước cách đây
mục cha
commit
ccade6e764

+ 8 - 0
src/router/modules/recruit.js

@@ -124,6 +124,14 @@ const recruit = [
           title: '我的购物车'
         }
       },
+      {
+        path: '/mall/payOver',
+        component: () => import('@/views/mall/payOver/index.vue'),
+        name: 'mallPayOver',
+        meta: {
+          title: '支付成功'
+        }
+      },
     ]
   },
   {

+ 7 - 7
src/utils/payType.js

@@ -60,6 +60,13 @@ const channelsWechat = [
   }
 ]
 const channelsMock = [
+  {
+    name: '模拟支付',
+    // icon: 'wallet',
+    size: 22,
+    color: 'success',
+    code: 'mock'
+  },
   {
     name: '钱包支付',
     icon: 'wallet',
@@ -74,13 +81,6 @@ const channelsMock = [
     color: 'success',
     code: 'currency'
   },
-  {
-    name: '模拟支付',
-    // icon: 'wallet',
-    size: 22,
-    color: 'success',
-    code: 'mock'
-  }
 ]
 
 export const definePayTypeList = [

+ 4 - 3
src/views/mall/cart/index.vue

@@ -239,9 +239,10 @@ const payCancel = () => {
   setTimeout(() => { router.push({ path: '/mall/user/order', query: { tab: 0 } }) }, 500);
 }
 const paySuccess = () => {
-  Snackbar.success('支付成功!')
-  showPay.value = false
-  setTimeout(() => { router.push({ path: '/mall/user/order', query: { tab: 10 } }) }, 500);
+  // Snackbar.success('支付成功!')
+  // showPay.value = false
+  // setTimeout(() => { router.push({ path: '/mall/user/order', query: { tab: 10 } }) }, 500);
+  router.push({ path: '/mall/payOver'})
 }
 </script>
 

+ 3 - 2
src/views/mall/components/details.vue

@@ -172,8 +172,9 @@ const payCancel = () => {
   setTimeout(() => { router.push({ path: '/mall/user/order', query: { tab: 0 } }) }, 500);
 }
 const paySuccess = () => {
-  Snackbar.success('支付成功,请前往我的订单查看!')
-  showPay.value = false
+  // Snackbar.success('支付成功,请前往我的订单查看!')
+  // showPay.value = false
+  router.push({ path: '/mall/payOver'})
 }
 
 // 添加购物车

+ 14 - 0
src/views/mall/payOver/index.vue

@@ -0,0 +1,14 @@
+<!--  -->
+<template>
+  <!-- <Navbar v-if="props.showNavbar" class="mb-3" /> -->
+  <v-card class="default-width">
+    <div class="my-15" style="margin: 0 auto;">支付成功</div>
+  </v-card>
+</template>
+
+<script setup>
+defineOptions({name: 'payOver-index'})
+// import Navbar from '../components/navbar.vue'
+</script>
+<style lang="scss" scoped>
+</style>

+ 5 - 4
src/views/mall/user/order/index.vue

@@ -54,7 +54,7 @@ import GoodsItem from '../../components/GoodsItem/index.vue'
 import CommentForm from './commentForm.vue'
 import pay from '@/views/mall/components/details/order/pay.vue'
 import { useRoute } from 'vue-router'; const route = useRoute()
-// import { useRouter } from 'vue-router'; const router = useRouter()
+import { useRouter } from 'vue-router'; const router = useRouter()
 
 const props = defineProps({
   tabListBg: {
@@ -177,9 +177,10 @@ const payCancel = () => {
   // router.push({ path: '/mall/user/order', query: { tab: 0 } })
 }
 const paySuccess = () => {
-  Snackbar.success('支付成功!')
-  showPay.value = false
-  getOrderPage()
+  // Snackbar.success('支付成功!')
+  // showPay.value = false
+  // getOrderPage()
+  router.push({ path: '/mall/payOver'})
 }
 
 </script>