|
@@ -53,7 +53,9 @@ import Snackbar from '@/plugins/snackbar'
|
|
import GoodsItem from '../../components/GoodsItem/index.vue'
|
|
import GoodsItem from '../../components/GoodsItem/index.vue'
|
|
import CommentForm from './commentForm.vue'
|
|
import CommentForm from './commentForm.vue'
|
|
import pay from '@/views/mall/components/details/order/pay.vue'
|
|
import pay from '@/views/mall/components/details/order/pay.vue'
|
|
-// import { useRouter } from 'vue-router'
|
|
|
|
|
|
+import { useRoute } from 'vue-router'; const route = useRoute()
|
|
|
|
+// import { useRouter } from 'vue-router'; const router = useRouter()
|
|
|
|
+
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
tabListBg: {
|
|
tabListBg: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -61,8 +63,7 @@ const props = defineProps({
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
|
|
-// const router = useRouter()
|
|
|
|
-const tab = ref(-1)
|
|
|
|
|
|
+const tab = ref(route?.query?.tab ? (route.query.tab)-0 : -1)
|
|
const tabList = [
|
|
const tabList = [
|
|
{ title: '全部', value: -1 },
|
|
{ title: '全部', value: -1 },
|
|
{ title: '待付款', value: 0 },
|
|
{ title: '待付款', value: 0 },
|
|
@@ -171,11 +172,12 @@ const handlePay = (val) => {
|
|
}
|
|
}
|
|
//
|
|
//
|
|
const payCancel = () => {
|
|
const payCancel = () => {
|
|
- Snackbar.warning('您已取消支付,请前往我的订单中查看!')
|
|
|
|
|
|
+ Snackbar.warning('您已取消支付!')
|
|
showPay.value = false
|
|
showPay.value = false
|
|
|
|
+ // router.push({ path: '/mall/user/order', query: { tab: 0 } })
|
|
}
|
|
}
|
|
const paySuccess = () => {
|
|
const paySuccess = () => {
|
|
- Snackbar.success('支付成功,请前往我的订单查看!')
|
|
|
|
|
|
+ Snackbar.success('支付成功!')
|
|
showPay.value = false
|
|
showPay.value = false
|
|
getOrderPage()
|
|
getOrderPage()
|
|
}
|
|
}
|