submit
This commit is contained in:
parent
fedcb33d15
commit
c3ff3708c6
@ -58,10 +58,21 @@
|
||||
<div class="wrap1_2_2">预约日期:{{item.date?.replaceAll('/','.')}}</div>
|
||||
<div class="wrap1_2_2">预约类型:{{item.isBlindBox===1?'正常预约':'盲盒预约'}}</div>
|
||||
</div>
|
||||
<div class="wrap1_3" @click="goViewVenues" :style="{backgroundColor:item.isBlindBox===2?'#000':''}">
|
||||
<image v-if="item.isBlindBox===1" src="../../static/zu762@3x.png" alt=""/>
|
||||
<image v-if="item.isBlindBox===2" style="width: 79rpx;height: 34rpx" src="../../static/zu1216@3x.png" alt=""/>
|
||||
<div class="wrap1_3" :style="{backgroundColor:item.isBlindBox===2?'#000':''}">
|
||||
<image @click="goViewVenues" v-if="item.isBlindBox===1" src="../../static/zu762@3x.png" alt=""/>
|
||||
<image @click="exchange" v-if="item.isBlindBox===2" style="width: 79rpx;height: 34rpx" src="../../static/zu1216@3x.png" alt=""/>
|
||||
</div>
|
||||
<tm-drawer hideHeader :width="510" :height="636" ref="calendarView" placement="center" v-model:show="showWin4">
|
||||
<div class="content8">
|
||||
<div class="wrap1">领取成功</div>
|
||||
<div class="wrap2">1人1码请与工作人员核验领取</div>
|
||||
<div class="wrap3">
|
||||
<image :src="imageSrc"></image>
|
||||
</div>
|
||||
<div class="wrap4" @click="showWin4=false">确定</div>
|
||||
<div class="wrap5">*可从“我的票库”查看</div>
|
||||
</div>
|
||||
</tm-drawer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -69,10 +80,12 @@
|
||||
<script setup>
|
||||
import {ref} from 'vue'
|
||||
import {onShow} from "@dcloudio/uni-app";
|
||||
import {historicalTickets, unusedTickets} from "@/http/apis";
|
||||
import {extractingBlindBoxes, getQrCode, historicalTickets, unusedTickets} from "@/http/apis";
|
||||
const modeClass = ref('')
|
||||
const currentTab = ref(0)
|
||||
const showWin4=ref(false)
|
||||
const show = ref(true)
|
||||
const imageSrc=ref('')
|
||||
const userInfo = ref(uni.getStorageSync('userInfo') ?? {})
|
||||
onShow(() => {
|
||||
show.value = true
|
||||
@ -123,6 +136,27 @@ const switchOptions=async (num)=>{
|
||||
}
|
||||
currentTab.value=num
|
||||
}
|
||||
const exchange=async ()=>{
|
||||
const data={
|
||||
"userName": userInfo.value.realName, //用户姓名
|
||||
"idCard": userInfo.value.idNum, //用户身份证号
|
||||
"phone": userInfo.value.telNum, //预约电话
|
||||
"blindBoxName": "博物馆开馆纪念盲盒" //盲盒名称
|
||||
}
|
||||
const res=await extractingBlindBoxes(data)
|
||||
if (res.code===0){
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon:'success',
|
||||
duration: 1000
|
||||
})
|
||||
}else if (res.code===200){
|
||||
const res1= await getQrCode({appointUid:res.data.appointmentUid})
|
||||
const arrayBuffer = new Uint8Array(res1)
|
||||
imageSrc.value = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBuffer)
|
||||
showWin4.value=true
|
||||
}
|
||||
}
|
||||
const goViewVenues = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/view-venues/index'
|
||||
|
Loading…
Reference in New Issue
Block a user