Browse Source

兑换中心

master
jiazhipeng 6 days ago
parent
commit
2176fc5757
  1. 6
      pages.json
  2. 92
      subPackages/user/rewardsCenter.vue

6
pages.json

@ -77,6 +77,12 @@
"style" : {
"navigationBarTitleText" : "视频"
}
},
{
"path":"user/rewardsCenter",
"style" : {
"navigationBarTitleText" : "兑换中心"
}
},
{
"path": "ticket/index",

92
subPackages/user/rewardsCenter.vue

@ -1,20 +1,14 @@
<template>
<view class="bg">
<view class="popupBox">
<view class="name">
兑换优惠券
</view>
<input type="text" v-model="password" placeholder="请输入兑换码">
<view class="btns">
<view class="cancel" @click="cancel">
取消
</view>
<span></span>
<view class="sub" @click="submitPassword">
兑换
</view>
<view class="name">请输入卡密兑换</view>
<input type="text" v-model="password">
<view class="btns" @click="submitPassword">
立即兑换
</view>
</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20251014/e935f1d616f992dc05c702ba763cece2.png"></image>
</view>
</template>
@ -33,7 +27,6 @@
console.log('提交的兑换码',this.password);
let that = this
that.password = that.password.trim()
that.$refs.popup.close()
if (that.password== '') {
uni.showToast({
title: '请输入优惠券领取卡号',
@ -46,8 +39,6 @@
}, "/api/coupon/getCoupon").then((res) => {
console.log(res.code);
if (res.code == 200) {
that.coupon = []
this.getList(this.navList[0])
uni.showToast({
title: '兑换成功',
icon: 'none'
@ -67,57 +58,62 @@
<style lang="scss" scoped>
.bg {
background: #F7F7F7;
min-height: 100vh;
background: #EDF5DC;
position: relative;
padding-top: 94rpx;
}
.bottom-img{
position: absolute;
bottom: 0;
right: 0;
width: 591.33rpx;
height: 535.27rpx;
z-index: 1;
}
.popupBox {
background: #fff;
border-radius: 20rpx;
padding: 40.67rpx 39.33rpx 35.33rpx 40rpx;
height: 862rpx;
width: 708.67rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20251014/24a49d4a15b1b9a1270253d7a68cfd9e.png");
background-size: 100% 100%;
position: relative;
z-index: 2;
padding-top: 174rpx;
margin: 0 auto;
}
.popupBox .name {
font-size: 35rpx;
color: #111;
font-weight: bold;
margin-bottom: 57.33rpx;
font-size: 36rpx;
color: #6A8A2D;
text-align: center;
margin-bottom: 59rpx;
}
.popupBox input {
width: 454rpx;
height: 81rpx;
border: 1px solid #D8D8D8;
border-radius: 7rpx;
font-size: 31rpx;font-weight: 500;
color: #999999;
line-height: 81rpx;
margin: 0 39.33rpx 72.67rpx 40rpx;
width: 433rpx;
height: 80rpx;
background: #F7F7F7;
border-radius: 13rpx;
border: 1px solid #CCCCCC;
margin: 0 auto;
text-align: center;
}
.popupBox .btns {
display: flex;
align-items: center;
font-size: 35rpx;
justify-content: space-around;
}
.popupBox .btns .cancel {
color: #111;
}
.popupBox .btns span {
width: 1rpx;
height: 53rpx;
background: #D8D8D8;
width: 400rpx;
height: 80rpx;
background: #6A8A2D;
border-radius: 40rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
text-align: center;
line-height: 80rpx;
margin: 264rpx auto 0;
}
.popupBox .btns .sub {
color: #07C49B;
}
</style>

Loading…
Cancel
Save