This commit is contained in:
yangtao 2024-04-08 19:01:38 +08:00
parent 741a36aad5
commit 2e5079df27
15 changed files with 116 additions and 23 deletions

View File

@ -342,3 +342,10 @@ export function getCateData(data) {
noAuth: true noAuth: true
}); });
} }
/**
* 用户实名认证
* @param {Object} data
*/
export function userReal(data) {
return request.post("user/real", data, { noAuth: true });
}

View File

@ -9,7 +9,7 @@
恭喜你获得 {{wheel}} 次盲盒抽奖机会 恭喜你获得 {{wheel}} 次盲盒抽奖机会
</view> </view>
<view class="blind-box"> <view class="blind-box">
<image src="@/static/images/shop/3.png" @click="openBlindBox(index)" :class="actionIndex==index?'action':''" class="box-item" v-for="(item,index) in 6"> <image src="@/static/images/mh-item.png" @click="openBlindBox(index)" :class="actionIndex==index?'action':''" class="box-item" v-for="(item,index) in 6">
</view> </view>
<view class='iconfont icon-guanbi3' @click='closePop()'></view> <view class='iconfont icon-guanbi3' @click='closePop()'></view>
</view> </view>
@ -245,12 +245,16 @@
background-position: center; background-position: center;
} }
.blind-box{ .blind-box{
width: 80%; width: 100%;
height: 500rpx; height: 480rpx;
background: #D753FC; // background: #D753FC;
background-image: url('@/static/images/mh-bg.png');
background-repeat: no-repeat;
background-size: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 40rpx; padding: 40rpx;
padding-bottom: 80rpx;
grid-gap: 20rpx; grid-gap: 20rpx;
.box-item{ .box-item{
flex: 30%; flex: 30%;

View File

@ -2,13 +2,17 @@
<view class="content"> <view class="content">
<view class="bg"> <view class="bg">
<view class="top"> <view class="top">
<view class="iconfont icon-guanbi2" style="position: absolute;right: 20px;top:-40px;font-size: 30px;color: white;" @click="close"></view>
</view> </view>
<view class="lucky-draw" @click="openBox()" style="border: solid 1px red;width: 160px;height: 160px;margin: 0 auto;"> <view class="lucky-draw">
<image src="@/static/images/box.png" mode="aspectFit" style="width: 220px;height: 220px;position: relative;top: 12px;right: 16px;" v-if="!gifShow&&!popShow"></image>
<image src="@/static/images/box.gif" mode="aspectFit" style="width: 350px;height: 350px;" v-else-if="gifShow"></image>
<image src="@/static/images/box2.png" mode="aspectFit" style="width: 350px;height: 350px;position: relative;top: 10px;right: 10px;" v-else-if="!gifShow&&popShow"></image>
</view>
<view class="btn" @click="openBox">
立刻开启
</view> </view>
</view> </view>
<view class="coupon_popups" v-if="popShow"> <view class="coupon_popups" v-if="popShow">
<view class="bg2"></view> <view class="bg2"></view>
@ -39,6 +43,7 @@
return { return {
wheel:0, wheel:0,
popShow:false, popShow:false,
gifShow:false,
blindShow:false, blindShow:false,
list:[], list:[],
drawInfo:{ drawInfo:{
@ -56,8 +61,15 @@
this.blindShow=true; this.blindShow=true;
}, },
openBox(){ openBox(){
this.popShow=true; this.gifShow=true;
setTimeout(()=>{
this.gifShow=false;
this.popShow=true;
},1500)
}, },
close(){
this.$emit('closeTreasureBox')
}
} }
} }
</script> </script>
@ -69,6 +81,8 @@
position: fixed; position: fixed;
top: 0; top: 0;
z-index: 1000; z-index: 1000;
padding-top: 200rpx;
background-color: rgba(0,0,0,1);
.coupon_popups{ .coupon_popups{
z-index: 999; z-index: 999;
position: fixed; position: fixed;
@ -83,7 +97,7 @@
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(0,0,0,.5); background-color: rgba(0,0,0,.8);
} }
.con{ .con{
@ -151,9 +165,8 @@
} }
.bg { .bg {
width: 100%; width: 100%;
height: 100vh; // height: 100vh;
background-image: url('https://plus.hwms.shop/uploads/def/20240402/de991ebf4c190afcc5de692a910949f4.png');
background-size: 100% 100%;
position: relative; position: relative;
padding-bottom: 40rpx; padding-bottom: 40rpx;
.rule { .rule {
@ -180,13 +193,22 @@
} }
} }
.top{ .top{
height: 330rpx; width: 488rpx;
height: 140rpx;
background-image: url('@/static/images/box-title.png');
background-size: 100% 100%;
margin: 0 auto;
} }
.lucky-draw{ .lucky-draw{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 670rpx;
height: 670rpx;
margin: 0 auto;
// background-image: url('@/static/images/box.png');
background-size: 100% 100%;
.title{ .title{
position: relative; position: relative;
bottom: 20rpx; bottom: 20rpx;
@ -203,6 +225,21 @@
background-position: center; background-position: center;
} }
} }
.btn{
width: 460rpx;
height: 100rpx;
background: linear-gradient(180deg, #FEFD65 0%, #F3C936 100%);
border-radius: 60rpx;
border: 4rpx solid #FFFFFF;
font-weight: 600;
font-size: 36rpx;
color: #530115;
line-height: 100rpx;
text-align: center;
margin: 0 auto;
position: relative;
top: 160rpx;
}
.lucky-draw-info{ .lucky-draw-info{
margin: 80rpx auto; margin: 80rpx auto;
width: 680rpx; width: 680rpx;

View File

@ -1,16 +1,16 @@
<template> <template>
<view class="content"> <view class="content" :style="viewColor">
<view class="title"> <view class="title">
身份证信息 身份证信息
</view> </view>
<view class="input-items"> <view class="input-items">
<view class="item"> <view class="item">
<text class="input-name">姓名</text> <text class="input-name">姓名</text>
<input type="text" placeholder="请输入姓名"/> <input type="text" v-model="name" placeholder="请输入姓名"/>
</view> </view>
<view class="item"> <view class="item">
<text class="input-name">身份证号码</text> <text class="input-name">身份证号码</text>
<input type="text" placeholder="请输入身份证号码"/> <input type="text" v-model="number" placeholder="请输入身份证号码"/>
</view> </view>
</view> </view>
<view class="title"> <view class="title">
@ -58,18 +58,43 @@
</view> </view>
</view> </view>
<view class="btn" @click="submitReal">
提交认证
</view>
</view> </view>
</template> </template>
<script> <script>
import {userReal} from '@/api/api.js'
import { mapGetters } from "vuex";
export default { export default {
computed: mapGetters(['viewColor']),
data(){ data(){
return{ return{
name:'',
number:'',
image1:[], image1:[],
image2:[] image2:[],
} }
}, },
methods:{ methods:{
async submitReal(){
let data1={
real_name:this.name,
card_id:this.number,
card_front:this.image1[0],
card_back:this.image2[0],
}
await userReal(data1).then((res)=>{
console.log('res: ',res);
}).catch((err)=>{
uni.showToast({
icon:'none',
title: err
});
})
},
/** /**
* 上传文件 * 上传文件
* *
@ -110,7 +135,7 @@
} }
</script> </script>
<style lang="less" scoped> <style lang="scss" scoped>
.content{ .content{
width: 100%; width: 100%;
height: 100vh; height: 100vh;
@ -126,11 +151,12 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
grid-gap: 40rpx; grid-gap: 40rpx;
padding: 40rpx 60rpx; padding: 40rpx 28rpx;
.photo-top{ .photo-top{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
grid-column-gap: 88rpx; grid-column-gap: 88rpx;
padding: 0 32rpx;
.real-left{ .real-left{
flex: 1; flex: 1;
width: 276rpx; width: 276rpx;
@ -221,7 +247,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
grid-gap: 40rpx; grid-gap: 40rpx;
padding: 40rpx 60rpx; padding: 40rpx 28rpx;
.item{ .item{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -233,5 +259,21 @@
} }
} }
} }
.btn{
width: 660rpx;
height: 100rpx;
background-color: var(--view-theme);
border-radius: 60rpx;
// background-color: red;
color: white;
font-size: 48rpx;
text-align: center;
line-height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
margin-top: 100rpx;
}
} }
</style> </style>

View File

@ -51,7 +51,7 @@
<view class='loading' @click='goSignList' v-if="signList.length >= 3">点击加载更多<text class='iconfont icon-xiangyou'></text></view> <view class='loading' @click='goSignList' v-if="signList.length >= 3">点击加载更多<text class='iconfont icon-xiangyou'></text></view>
</view> </view>
</view> </view>
<treasureBox v-if="treasureShow"></treasureBox> <treasureBox v-if="treasureShow" @closeTreasureBox="closeBox"></treasureBox>
<view class='signTip acea-row row-center-wrapper' :class='active==true?"on":""'> <view class='signTip acea-row row-center-wrapper' :class='active==true?"on":""'>
<view class='signTipLight loadingpic'></view> <view class='signTipLight loadingpic'></view>
<view class='signTipCon' :style="'background-image: url('+domain+'/static/diy/signSuccess'+keyColor+'.png)'"> <view class='signTipCon' :style="'background-image: url('+domain+'/static/diy/signSuccess'+keyColor+'.png)'">
@ -101,6 +101,9 @@
} }
}, },
methods: { methods: {
closeBox(){
this.treasureShow=false;
},
go(){ go(){
this.treasureShow=true; this.treasureShow=true;
}, },

BIN
static/images/box-title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
static/images/box.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

BIN
static/images/box.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 KiB

BIN
static/images/box2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

BIN
static/images/close2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/images/mh-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
static/images/mh-btn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/images/mh-item.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
static/images/mh-title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB