|
|
@@ -13,16 +13,21 @@ const phone = ref(useUserStore().userInfo.mobile)
|
|
|
const isEdit = ref(false)
|
|
|
const points = ref(0)
|
|
|
const price = ref(0)
|
|
|
+const goodsId = ref()
|
|
|
onLoad((options: any) => {
|
|
|
- console.log(options.order)
|
|
|
- orderInfo.value = JSON.parse(options.order)
|
|
|
- getCore()
|
|
|
+ goodsId.value = options.order
|
|
|
+ getGoodsDetaile()
|
|
|
})
|
|
|
async function getCore() {
|
|
|
const res = await Apis.djk.djkAppletOrderConfirm({ data: { goodsId: orderInfo.value?.id, channelId: useUserStore().userInfo.channelId } })
|
|
|
points.value = res.data.points
|
|
|
price.value = res.data.price
|
|
|
}
|
|
|
+async function getGoodsDetaile() {
|
|
|
+ const res = await Apis.djk.goodsInfo({ data: { goodsId: goodsId.value } })
|
|
|
+ orderInfo.value = res.data
|
|
|
+ getCore()
|
|
|
+}
|
|
|
async function handlePay() {
|
|
|
if (!orderInfo.value) {
|
|
|
useGlobalToast().show({ msg: '网络异常!请联系客服' })
|