1 line
8.2 KiB
Plaintext
1 line
8.2 KiB
Plaintext
|
{"version":3,"file":"pickUpVerify.js","sources":["../../../../../../src/modules/mall/order/pickUpVerify.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9tb2R1bGVzL21hbGwvb3JkZXIvcGlja1VwVmVyaWZ5LnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"order-details\">\r\n <!-- 自提商品核销 -->\r\n <view v-if=\"orderInfo.deliveryType === 2 && orderInfo.payStatus\" class=\"writeOff borRadius14\">\r\n <view class=\"title\">核销信息</view>\r\n <view class=\"grayBg flex-center\">\r\n <view class=\"pictrue\">\r\n <image\r\n v-if=\"!!painterImageUrl\"\r\n :src=\"painterImageUrl\"\r\n :style=\"{ width: `${state.qrcodeSize}px`, height: `${state.qrcodeSize}px` }\"\r\n :show-menu-by-longpress=\"true\"\r\n />\r\n </view>\r\n </view>\r\n <view class=\"gear\">\r\n <image :src=\"sheep.$url.static('/static/images/writeOff.png', 'local')\"></image>\r\n </view>\r\n <view class=\"num\">{{ orderInfo.pickUpVerifyCode }}</view>\r\n <view class=\"rules\">\r\n <!-- TODO puhui999: 需要后端放回:使用 receiveTime 即可 -->\r\n <!-- <view class=\"item\">-->\r\n <!-- <view class=\"rulesTitle flex flex-wrap align-center\">-->\r\n <!-- 核销时间-->\r\n <!-- </view>-->\r\n <!-- <view class=\"info\">-->\r\n <!-- 每日:-->\r\n <!-- <text class=\"time\">2020-2-+52</text>-->\r\n <!-- </view>-->\r\n <!-- </view>-->\r\n <view class=\"item\">\r\n <view class=\"rulesTitle flex flex-wrap align-center\">\r\n <text class=\"iconfont icon-shuoming1\"></text>\r\n 使用说明\r\n </view>\r\n <view class=\"info\">可将二维码出示给店员扫描或提供数字核销码</view>\r\n </view>\r\n </view>\r\n </view>\r\n <view\r\n v-if=\"orderInfo.deliveryType === 2\"\r\n class=\"map flex flex-wrap align-center ss-row-between borRadius14\"\r\n >\r\n <view>自提地址信息</view>\r\n <view class=\"place cart-color flex flex-wrap flex-center\" @tap=\"showMaoLocation\">\r\n 查看位置\r\n </view>\r\n </view>\r\n <!-- 海报画板:默认隐藏只用来生成海报。生成方式为主动调用 -->\r\n <l-painter\r\n v-if=\"showPainter\"\r\n isCanvasToTempFilePath\r\n pathType=\"url\"\r\n @success=\"setPainterImageUrl\"\r\n hidden\r\n ref=\"painterRef\"\r\n />\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport sheep from '@/sheep'\r\nimport { reactive, ref } from 'vue'\r\n\r\nconst props = defineProps({\r\n orderInfo: {\r\n type: Object,\r\n default() {},\r\n },\r\n systemStore: {\r\n type: Object,\r\n default() {},\r\n },\r\n})\r\nconst state = reactive({\r\n qrcodeSize: 145,\r\n})\r\n\r\n/**\r\n * 打开地图\r\n */\r\nconst showMaoLocation = () => {\r\n console.log(props.systemStore)\r\n if (!props.systemStore.latitude || !props.systemStore.longitude) {\r\n sheep.$helper.toast('缺少经纬度信息无法查看地图!')\r\n return\r\n }\r\n uni.openLocation({\r\n latitude: props.systemStore.latitude,\r\n longitude: props.systemStore.longitude,\r\n scale: 8,\r\n name: props.systemStore.name,\r\n address: props.systemStore.areaName + props.systemStore.detailAddress,\r\n })\r\n}\r\n/**\r\n * 拨打电话\r\n */\r\nconst makePhone = () => {\r\n uni.makePhoneCall({\r\n phoneNumber: props.systemStore.phone,\r\n })\r\n}\r\n\r\nconst painterRef = ref() // 海报画板\r\nconst painterImageUrl = ref() // 海报 url\r\nconst showPainter = ref(true)\r\n// 渲染海报\r\nconst renderPoster = async (poster) => {\r\n await painterRef.value.render(poster)\r\n}\r\n// 获得生成的图片\r\nconst setPainterImageUrl = (path) => {\r\n painterImageUrl.value = path\r\n showPainter.value = false\r\n}\r\n/**\r\n * 生成核销二维码\r\n */\r\nc
|