Browse Source

兑换中心

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

6
pages.json

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

92
subPackages/user/rewardsCenter.vue

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

Loading…
Cancel
Save