123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <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" @click="toSettlement">立即提货</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'
- })
- },
- toSettlement() {
- uni.navigateTo({
- url: "/pages/order/settlement"
- })
- },
- }
- }
- </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>
|