|
@@ -0,0 +1,310 @@
|
|
|
+<template>
|
|
|
+ <view>
|
|
|
+ <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的奖品库"></u-navbar>
|
|
|
+ <!-- 奖品选择 -->
|
|
|
+ <view class="prize-state">
|
|
|
+ <u-tabs @change="changeTab" :scrollable="false" :list="stateArr" lineWidth="40" lineHeight="1"
|
|
|
+ lineColor="#D70909" :activeStyle="{
|
|
|
+ color: '#D70909',
|
|
|
+ transform: 'scale(1)'
|
|
|
+ }" :inactiveStyle="{
|
|
|
+ color: '#333',
|
|
|
+ transform: 'scale(1)'
|
|
|
+ }" itemStyle="padding-left: 25px; padding-right: 25px; height: 44px;">
|
|
|
+ </u-tabs>
|
|
|
+ </view>
|
|
|
+ <!-- 实物商品 -->
|
|
|
+ <view class="prize-goods" v-if="state == 0">
|
|
|
+ <view class="prize-goods-list">
|
|
|
+ <view class="flex prize-goods-list-item">
|
|
|
+ <view class="flex checkbox">
|
|
|
+ <u-checkbox-group>
|
|
|
+ <u-checkbox :value="checked" shape="circle" :checked="checked" activeColor="#E96737"
|
|
|
+ @change="changeChecked($event, item)"></u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
+ </view>
|
|
|
+ <view class="flex info">
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
+ <view class="flex desc">
|
|
|
+ <view class="content">Apple iPhone 13 (A2634) 128GB 星光色 支持移动联通电信5G 双卡双待手机</view>
|
|
|
+ <view class="num">数量:2</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex prize-goods-list-item">
|
|
|
+ <view class="flex checkbox">
|
|
|
+ <u-checkbox-group>
|
|
|
+ <u-checkbox :value="checked" shape="circle" :checked="checked" activeColor="#E96737"
|
|
|
+ @change="changeChecked($event, item)"></u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
+ </view>
|
|
|
+ <view class="flex info">
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
+ <view class="flex desc">
|
|
|
+ <view class="content">Apple iPhone 13 (A2634) 128GB 星光色 支持移动联通电信5G 双卡双待手机</view>
|
|
|
+ <view class="num">数量:2</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 卡券 -->
|
|
|
+ <view class="prize-coupon" v-else>
|
|
|
+ <view class="prize-coupon-list">
|
|
|
+ <navigator url="/pages/prize/detail" class="flex prize-coupon-list-item" hover-class="navigator-hover">
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
+ <view class="flex info">
|
|
|
+ <view class="flex desc">
|
|
|
+ <view class="title">200元代金券</view>
|
|
|
+ <view class="txt">使用期限:2022.03.02-2022.04.01</view>
|
|
|
+ <view class="txt">适用范围:星巴克xxx店</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex btn">
|
|
|
+ <view class="amt"><text>¥</text>100</view>
|
|
|
+ <view class="action">立即使用</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+ <navigator url="/pages/prize/detail" class="flex prize-coupon-list-item" hover-class="navigator-hover">
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
+ <view class="flex info">
|
|
|
+ <view class="flex desc">
|
|
|
+ <view class="title">200元代金券</view>
|
|
|
+ <view class="txt">使用期限:2022.03.02-2022.04.01</view>
|
|
|
+ <view class="txt">适用范围:星巴克xxx店</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex btn">
|
|
|
+ <view class="amt"><text>¥</text>100</view>
|
|
|
+ <view class="action">立即使用</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="prize-action">
|
|
|
+ <!-- 实物商品提货 -->
|
|
|
+ <view class="flex prize-action-goods" v-if="state == 0">
|
|
|
+ <view class="flex checkbox">
|
|
|
+ <u-checkbox-group>
|
|
|
+ <u-checkbox :value="checked" shape="circle" :checked="checked" activeColor="#E96737"
|
|
|
+ @change="changeChecked($event, item)"></u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
+ </view>
|
|
|
+ <view class="btn">立即提货</view>
|
|
|
+ </view>
|
|
|
+ <!-- 卡券使用记录 -->
|
|
|
+ <view class="flex prize-action-coupon" @click="toCoupon" v-else>
|
|
|
+ <view class="title">卡券使用记录</view>
|
|
|
+ <u-icon name="arrow-right" size="15" color="#333"></u-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ stateArr: [{
|
|
|
+ name: '实物商品'
|
|
|
+ }, {
|
|
|
+ name: '卡券',
|
|
|
+ }],
|
|
|
+ state: 0,
|
|
|
+ checked: false,
|
|
|
+
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 切换奖品
|
|
|
+ changeTab(e) {
|
|
|
+ if (e.index == 0) {
|
|
|
+ this.state = 0
|
|
|
+ } else if (e.index == 1) {
|
|
|
+ this.state = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ changeChecked() {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ // 查看卡券使用记录
|
|
|
+ toCoupon(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages/prize/coupon'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .prize-state {
|
|
|
+ position: fixed;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ width: 100%;
|
|
|
+ padding-bottom: 16rpx;
|
|
|
+ z-index: 10;
|
|
|
+ }
|
|
|
+
|
|
|
+ .prize-goods {
|
|
|
+ margin-top: 104rpx;
|
|
|
+ padding: 40rpx 30rpx 100rpx;
|
|
|
+
|
|
|
+ &-list {
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 36rpx 16rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ margin-bottom: 40rpx;
|
|
|
+
|
|
|
+ .checkbox {}
|
|
|
+
|
|
|
+ .info {
|
|
|
+ flex: 1;
|
|
|
+ justify-content: flex-start;
|
|
|
+ }
|
|
|
+
|
|
|
+ image {
|
|
|
+ width: 122rpx;
|
|
|
+ height: 164rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .desc {
|
|
|
+ height: 164rpx;
|
|
|
+ padding-left: 22rpx;
|
|
|
+ flex: 1;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-end;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ line-height: 40rpx;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ }
|
|
|
+
|
|
|
+ .num {
|
|
|
+ color: #8C8C8C;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-item:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .prize-coupon {
|
|
|
+ margin-top: 104rpx;
|
|
|
+ padding: 40rpx 30rpx 100rpx;
|
|
|
+
|
|
|
+ &-list{
|
|
|
+
|
|
|
+ &-item{
|
|
|
+ justify-content: space-between;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ padding: 40rpx 20rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ margin-bottom: 40rpx;
|
|
|
+
|
|
|
+ image{
|
|
|
+ width: 94rpx;
|
|
|
+ height: 132rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info{
|
|
|
+ justify-content: space-between;
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .desc{
|
|
|
+ height: 132rpx;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: flex-start;
|
|
|
+ padding-left: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .txt{
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn{
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .amt{
|
|
|
+ font-size: 48rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 72rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ text{
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .action{
|
|
|
+ width: 124rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ line-height: 40rpx;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ background-color: rgba(215, 9, 9, 100);
|
|
|
+ color: rgba(255, 255, 255, 100);
|
|
|
+ font-size: 24rpx;
|
|
|
+ text-align: center
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-item:last-child{
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .prize-action {
|
|
|
+ position: fixed;
|
|
|
+ bottom: var(--window-bottom);
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ z-index: 10;
|
|
|
+ box-shadow: 0 -4rpx 10rpx 0 rgba(151, 151, 151, 0.24);
|
|
|
+ background: #fff;
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ // 设置ios刘海屏底部横线安全区域
|
|
|
+ padding-bottom: constant(safe-area-inset-bottom);
|
|
|
+ padding-bottom: env(safe-area-inset-bottom);
|
|
|
+
|
|
|
+ &-goods {
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 30rpx 40rpx;
|
|
|
+
|
|
|
+ .btn {
|
|
|
+ width: 250rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ background-color: rgba(235, 112, 9, 100);
|
|
|
+ color: rgba(255, 255, 255, 100);
|
|
|
+ font-size: 28rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-coupon{
|
|
|
+ padding: 30rpx 40rpx;
|
|
|
+ .title{
|
|
|
+ margin-right: 20rpx;
|
|
|
+ line-height: 40rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|