|
@@ -0,0 +1,82 @@
|
|
|
+<route lang="yaml">
|
|
|
+style:
|
|
|
+navigationBarTitleText: 确认卷码信息
|
|
|
+navigationBarBackgroundColor: '#fff'
|
|
|
+</route>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { ref } from 'vue';
|
|
|
+import { productByOrderNo , scanCodeCheckPaper } from "@/core/libs/requests";
|
|
|
+import { qrCodeString2Object, requestToast } from '@designer-hub/app/src/core/utils/common'
|
|
|
+const productInfo = ref({
|
|
|
+ productName: '',
|
|
|
+ productCoverImgUrl: '',
|
|
|
+ productPoints: '',
|
|
|
+ num: 0,
|
|
|
+ price: '',
|
|
|
+});
|
|
|
+const orderNo =ref()
|
|
|
+const query = computed(() => ({ orderNo: orderNo.value}))
|
|
|
+// 获取接口数据
|
|
|
+const getProductByOrderNo = async () => {
|
|
|
+ const response = await productByOrderNo({ orderNo: '241229224706IZ00018' });
|
|
|
+ if (response) {
|
|
|
+ productInfo.value = response.data;
|
|
|
+ }
|
|
|
+};
|
|
|
+const submit = async () =>{
|
|
|
+ const { data } = await requestToast(() => scanCodeCheckPaper({ orderNo: orderNo.value}))
|
|
|
+ if (data) {
|
|
|
+ uni.navigateTo({ url: '/pages/home/result/success' })
|
|
|
+ }
|
|
|
+}
|
|
|
+// 页面加载时调用
|
|
|
+onLoad(async (query) => {
|
|
|
+ orderNo.value = query?.orderNo
|
|
|
+ await getProductByOrderNo();
|
|
|
+});
|
|
|
+
|
|
|
+// 返回上一页
|
|
|
+const navigateBack = () => {
|
|
|
+ uni.navigateBack();
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <view class="bg-white p-[16px] flex-grow flex flex-col">
|
|
|
+ <!-- 商品信息 -->
|
|
|
+ <view class="flex items-center bg-white p-[16px] shadow-sm rounded-md">
|
|
|
+ <wd-img
|
|
|
+ class="w-[80px] h-[80px] rounded-md mr-[16px]"
|
|
|
+ :src="productInfo.productCoverImgUrl"
|
|
|
+ mode="aspectFill"
|
|
|
+ ></wd-img>
|
|
|
+ <view class="flex-1">
|
|
|
+ <view class="text-lg font-bold mb-[8px]">{{ productInfo.productName }}</view>
|
|
|
+ <view class="text-sm text-gray-500 mb-[8px]">数量: x{{ productInfo.num }}</view>
|
|
|
+ <view class="text-sm text-gray-500">
|
|
|
+ {{ productInfo.productPoints }} 积分
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <div class="w-full mt-auto pb-[20px]">
|
|
|
+ <wd-button block :round="false" @click="submit">
|
|
|
+ <div
|
|
|
+ class="text-center text-white text-base font-normal font-['PingFang_SC'] leading-normal"
|
|
|
+ >
|
|
|
+ 确认核销
|
|
|
+ </div>
|
|
|
+ </wd-button>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.image {
|
|
|
+ border-radius: 8px;
|
|
|
+}
|
|
|
+.shadow-sm {
|
|
|
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
+}
|
|
|
+</style>
|