时味苏州
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
2.1 KiB

7 days ago
<template>
<view class="bg">
<view class="popupBox">
7 days ago
<view class="name">请输入卡密兑换</view>
<input type="text" v-model="password">
<view class="btns" @click="submitPassword">
立即兑换
7 days ago
</view>
</view>
7 days ago
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20251014/e935f1d616f992dc05c702ba763cece2.png"></image>
7 days ago
</view>
</template>
<script>
export default {
data() {
return {
password:''
}
},
onShow() {
},
methods: {
submitPassword() {
console.log('提交的兑换码',this.password);
let that = this
that.password = that.password.trim()
if (that.password== '') {
uni.showToast({
title: '请输入优惠券领取卡号',
icon: 'none'
})
return
}
that.Post({
7 days ago
key: that.password
}, "/api/coupon/get_coupon").then((res) => {
7 days ago
console.log(res.code);
if (res.code == 200) {
uni.showToast({
title: '兑换成功',
icon: 'none'
})
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
that.password = ''
},
}
}
</script>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
7 days ago
background: #EDF5DC;
position: relative;
padding-top: 94rpx;
}
.bottom-img{
position: absolute;
bottom: 0;
right: 0;
width: 591.33rpx;
height: 535.27rpx;
z-index: 1;
7 days ago
}
.popupBox {
7 days ago
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;
7 days ago
}
.popupBox .name {
font-weight: bold;
7 days ago
font-size: 36rpx;
color: #6A8A2D;
7 days ago
text-align: center;
7 days ago
margin-bottom: 59rpx;
7 days ago
}
.popupBox input {
7 days ago
width: 433rpx;
height: 80rpx;
background: #F7F7F7;
border-radius: 13rpx;
border: 1px solid #CCCCCC;
margin: 0 auto;
7 days ago
text-align: center;
}
.popupBox .btns {
7 days ago
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;
7 days ago
}
</style>