submit
This commit is contained in:
parent
216aee9b4c
commit
ad4d788585
@ -47,9 +47,15 @@ export const upload = (data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export const updateAvatar = (data) => {
|
export const updateInfo = (data) => {
|
||||||
return uniReq.post({
|
return uniReq.post({
|
||||||
url: '/api/user/update',
|
url: '/api/user/update',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const extractingBlindBoxes= (data) => {
|
||||||
|
return uniReq.post({
|
||||||
|
url: '/api/smart/appointment/draw/ticket/from/blind/box',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -12,22 +12,84 @@
|
|||||||
<div class="content2">
|
<div class="content2">
|
||||||
<image src="https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/76216159-e5a9-49ef-a6b3-6043924243e7.png"></image>
|
<image src="https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/76216159-e5a9-49ef-a6b3-6043924243e7.png"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="content3">领取兑换</div>
|
<div class="content3" @click="goGet">领取兑换</div>
|
||||||
<div class="content4"></div>
|
<div class="content4"></div>
|
||||||
<div class="content5">
|
<div class="content5">
|
||||||
<div class="wrap1" v-for="item in imgList" :key="item.url">
|
<div class="wrap1" v-for="item in imgList" :key="item.url">
|
||||||
<image :src="item.url"></image>
|
<image :src="item.url"></image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<tm-drawer hideHeader color="#B1292E" :width="510" :height="324" ref="calendarView" placement="center" v-model:show="showWin2">
|
||||||
|
<div class="content6">
|
||||||
|
<div class="wrap1">领取盲盒失败</div>
|
||||||
|
<div class="wrap2">失败原因:未实名</div>
|
||||||
|
<div class="wrap3" @click="goRealName">前往实名</div>
|
||||||
|
<div class="wrap4">*即将跳转实名页面</div>
|
||||||
|
</div>
|
||||||
|
</tm-drawer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import {ref} from 'vue'
|
import {ref} from 'vue'
|
||||||
|
import {extractingBlindBoxes} from "@/http/apis";
|
||||||
const imgList=ref([{url:'https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/8395f322-b677-4f24-a13d-b79474c09d35.png'},{url:'https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/8395f322-b677-4f24-a13d-b79474c09d35.png'}])
|
const imgList=ref([{url:'https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/8395f322-b677-4f24-a13d-b79474c09d35.png'},{url:'https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/8395f322-b677-4f24-a13d-b79474c09d35.png'}])
|
||||||
|
const showWin2=ref(false)
|
||||||
|
const userInfo=ref(uni.getStorageSync('userInfo'))
|
||||||
|
const goRealName=()=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/facial/index'
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
const goGet=async ()=>{
|
||||||
|
if (!userInfo.idNum){
|
||||||
|
showWin2.value=true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const data={
|
||||||
|
"userName": "邢雨杨", //用户姓名
|
||||||
|
"idCard": "411527200009129056", //用户身份证号
|
||||||
|
"phone": "18606216921", //预约电话
|
||||||
|
"blindBoxName": "博物馆开馆纪念盲盒" //盲盒名称
|
||||||
|
}
|
||||||
|
const res=await extractingBlindBoxes(data)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.content6{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.wrap4{
|
||||||
|
margin-top: 6rpx;
|
||||||
|
font-size: 16rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.wrap3{
|
||||||
|
margin-top: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
width: 436rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
color: #B1292E;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.wrap2{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
.wrap1{
|
||||||
|
margin-top: 58rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
.container{
|
.container{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<custom-title class="title-block" title="人脸核验">
|
<custom-title class="title-block" title="人脸核验">
|
||||||
</custom-title>
|
</custom-title>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<tm-message ref="msg" :lines="2"></tm-message>
|
||||||
<div class="content1">
|
<div class="content1">
|
||||||
身份证认证
|
身份证认证
|
||||||
</div>
|
</div>
|
||||||
@ -32,12 +33,35 @@
|
|||||||
</template>
|
</template>
|
||||||
</display-box>
|
</display-box>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="content3" @click="submit">
|
||||||
|
提交
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import displayBox from '../../components/display-box/index.vue'
|
import displayBox from '../../components/display-box/index.vue'
|
||||||
import {ref} from "vue";
|
import {ref} from "vue";
|
||||||
|
import {getInfo, updateInfo} from "@/http/apis";
|
||||||
|
const msg=ref(null)
|
||||||
|
const getUserInfo = async () => {
|
||||||
|
const res=await getInfo()
|
||||||
|
if (res.code===200){
|
||||||
|
uni.setStorageSync('userInfo',res.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submit=async ()=>{
|
||||||
|
const res=await updateInfo({
|
||||||
|
idNum:idInfo.value.idCard,
|
||||||
|
realName:idInfo.value.name
|
||||||
|
})
|
||||||
|
if (res.code===200){
|
||||||
|
msg.value.show({ model: 'success' })
|
||||||
|
/* await uni.showToast({title: '实名成功', icon: 'none', duration: 2000})*/
|
||||||
|
await getUserInfo()
|
||||||
|
await uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
const idInfo=ref({
|
const idInfo=ref({
|
||||||
name:'',
|
name:'',
|
||||||
idCard:''
|
idCard:''
|
||||||
@ -60,6 +84,21 @@ const validateIDCardNumber=(idNumber)=> {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
background-image: url('https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/16968647-fc99-46fe-b95c-620c55b7646f.png');
|
background-image: url('https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/16968647-fc99-46fe-b95c-620c55b7646f.png');
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
|
.content3{
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 156rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
width: 436rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #000;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
.content2{
|
.content2{
|
||||||
margin-top: 38rpx;
|
margin-top: 38rpx;
|
||||||
.box-left{
|
.box-left{
|
||||||
|
@ -41,24 +41,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content3"></div>
|
<div class="content3"></div>
|
||||||
<div class="content4">·历史预约门票</div>
|
<div class="content4" :style="{color:currentTab===0?'#EB783C':'#72665F'}">{{currentTab===0?'·我未使用的票务':'·历史预约门票'}}</div>
|
||||||
<div class="content5">
|
<div class="content5">
|
||||||
<div class="wrap1" :style="{backgroundImage: item.ticketCoverPic}" v-for="(item,index) in tabList?.tickets" :key="item.appointmentUid">
|
<div class="wrap1" :class="[`status${item.status}`]" v-for="(item,index) in tabList?.tickets" :key="item.appointmentUid">
|
||||||
<div class="wrap1_4">
|
|
||||||
<image src="item.ticketCoverPic"></image>
|
<div class="wrap1_5">
|
||||||
</div>
|
<image :src="item.ticketCoverPic"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap1_1" :class="[`status${item.status}`]">{{statusList.find(x=>x.value===item.status).label}}</div>
|
<div class="wrap1_6">
|
||||||
<div class="wrap1_2">
|
|
||||||
<div class="wrap1_2_1">首都博物馆门票</div>
|
|
||||||
<div class="wrap1_2_2">预约场馆:首都博物馆</div>
|
|
||||||
<div class="wrap1_2_2">预约日期:2023.12.30</div>
|
|
||||||
<div class="wrap1_2_2">预约类型:1</div>
|
|
||||||
</div>
|
|
||||||
<div class="wrap1_3" @click="goViewVenues">
|
|
||||||
<image src="../../static/zu762@3x.png" alt=""/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="wrap1_1" >{{statusList.find(x=>x.value===item.status).label}}</div>
|
||||||
|
<div class="wrap1_2">
|
||||||
|
<div class="wrap1_2_1">首都博物馆门票</div>
|
||||||
|
<div class="wrap1_2_2">预约场馆:首都博物馆</div>
|
||||||
|
<div class="wrap1_2_2">预约日期:2023.12.30</div>
|
||||||
|
<div class="wrap1_2_2">预约类型:1</div>
|
||||||
|
</div>
|
||||||
|
<div class="wrap1_3" @click="goViewVenues">
|
||||||
|
<image src="../../static/zu762@3x.png" alt=""/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -148,7 +150,129 @@ const goSetUp = () => {
|
|||||||
margin-top: 14rpx;
|
margin-top: 14rpx;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
.wrap1 {
|
|
||||||
|
|
||||||
|
.wrap1{
|
||||||
|
&:nth-child(n+2){
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
margin-bottom: 100rpx;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
width: 686rpx;
|
||||||
|
height: 210rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 2rpx solid #fff;
|
||||||
|
background-size: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
&.status2 {
|
||||||
|
.wrap1_1{
|
||||||
|
background-color: #fff;
|
||||||
|
color: #FF5C62;
|
||||||
|
}
|
||||||
|
.wrap1_6{
|
||||||
|
background-color: #B29E92;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.status4 {
|
||||||
|
.wrap1_1{
|
||||||
|
background-color: #000000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.wrap1_6{
|
||||||
|
background-color: #B29E92;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.status5{
|
||||||
|
.wrap1_6{
|
||||||
|
background-color: #EB783C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.status1{
|
||||||
|
.wrap1_6{
|
||||||
|
background-color: #EB783C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.status3 {
|
||||||
|
.wrap1_6{
|
||||||
|
background-color: #B29E92;
|
||||||
|
}
|
||||||
|
.wrap1_1{
|
||||||
|
background-color: #fff;
|
||||||
|
color: #72665F;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.wrap1_3 {
|
||||||
|
bottom: 18rpx;
|
||||||
|
right: 16rpx;
|
||||||
|
position: absolute;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 119.5rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap1_2 {
|
||||||
|
top: 16rpx;
|
||||||
|
right: 178rpx;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
.wrap1_2_1 {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap1_2_2 {
|
||||||
|
margin-bottom: 2rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap1_1 {
|
||||||
|
top: 26rpx;
|
||||||
|
left: 26rpx;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 112rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border-radius: 22rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.wrap1_6{
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-left: 7rpx solid #fff;
|
||||||
|
height: 208rpx;
|
||||||
|
flex-grow: 1;
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
.wrap1_5{
|
||||||
|
width: 262rpx;
|
||||||
|
height: 208rpx;
|
||||||
|
image{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*.wrap1 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
@ -215,13 +339,12 @@ const goSetUp = () => {
|
|||||||
color: #72665F;
|
color: #72665F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.content4 {
|
.content4 {
|
||||||
margin-top: 22rpx;
|
margin-top: 22rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #72665F;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content3 {
|
.content3 {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {updateAvatar, upload} from "@/http/apis";
|
import {updateInfo, upload} from "@/http/apis";
|
||||||
import {nextTick, ref} from 'vue'
|
import {nextTick, ref} from 'vue'
|
||||||
const currentAvatar=ref('')
|
const currentAvatar=ref('')
|
||||||
const changeAvatar=()=>{
|
const changeAvatar=()=>{
|
||||||
@ -56,7 +56,7 @@ const changeAvatar=()=>{
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const reqAvatar=async ()=>{
|
const reqAvatar=async ()=>{
|
||||||
const res= await updateAvatar({
|
const res= await updateInfo({
|
||||||
avatar:currentAvatar.value
|
avatar:currentAvatar.value
|
||||||
})
|
})
|
||||||
if (res.code===200) {
|
if (res.code===200) {
|
||||||
|
Loading…
Reference in New Issue
Block a user