|
@@ -29,12 +29,14 @@ defineOptions({name: 'confirm_order-index'})
|
|
import Confirm from '@/plugins/confirm'
|
|
import Confirm from '@/plugins/confirm'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
-import { useRouter } from 'vue-router'; const router = useRouter()
|
|
|
|
|
|
+import { useRouter, useRoute } from 'vue-router'; const router = useRouter()
|
|
import { computed, ref } from 'vue'
|
|
import { computed, ref } from 'vue'
|
|
import confirm from './confirm.vue'
|
|
import confirm from './confirm.vue'
|
|
import pay from './pay.vue'
|
|
import pay from './pay.vue'
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
|
|
|
|
|
|
+const route = useRoute()
|
|
|
|
+const { spuId } = route.query
|
|
const skuInfo = ref(localStorage.getItem('confirm_order_data')) // 购买商品规格信息
|
|
const skuInfo = ref(localStorage.getItem('confirm_order_data')) // 购买商品规格信息
|
|
|
|
|
|
const confirmRef = ref()
|
|
const confirmRef = ref()
|
|
@@ -68,7 +70,7 @@ let closeConfirm = false // 关闭路由拦截
|
|
|
|
|
|
const paySuccess = (e) => {
|
|
const paySuccess = (e) => {
|
|
closeConfirm = true
|
|
closeConfirm = true
|
|
- router.replace({ path: '/mall/payOver', query: { price: e.price, spuId: id, orderId: orderId.value } })
|
|
|
|
|
|
+ router.replace({ path: '/mall/payOver', query: { price: e.price, spuId, orderId: orderId.value } })
|
|
}
|
|
}
|
|
const payCancel = () => {
|
|
const payCancel = () => {
|
|
Snackbar.warning('您已取消支付!')
|
|
Snackbar.warning('您已取消支付!')
|