This commit is contained in:
GaoHao 2024-10-31 09:31:44 +08:00
commit fef46aa24f
1 changed files with 87 additions and 78 deletions

View File

@ -1,83 +1,86 @@
<template> <template>
<!-- 顶部菜单 --> <view class="container">
<view class="tagClass"> <!-- 顶部菜单 -->
<view class="tag-item" @tap="tagClick(item)" :class="{active:item.type===pageData.query.type}" <view class="tagClass">
v-for="(item,index) in pageData.status.list" :key="index"> <view class="tag-item" @tap="tagClick(item)" :class="{active:item.type===pageData.query.type}"
{{item.name}} v-for="(item,index) in pageData.status.list" :key="index">
</view> {{item.name}}
</view> </view>
<!-- 搜搜 --> </view>
<!-- <view class="search"> <!-- 搜搜 -->
<up-input <!-- <view class="search">
placeholder="搜索优惠券名称" <up-input
prefixIcon="search" placeholder="搜索优惠券名称"
shape="circle" prefixIcon="search"
border="none" shape="circle"
fontSize="14px" border="none"
prefixIconStyle="font-size: 28px;color: #999;" fontSize="14px"
:customStyle="{backgroundColor:'#F9F9F9',padding: '10rpx 18rpx'}" prefixIconStyle="font-size: 28px;color: #999;"
></up-input> :customStyle="{backgroundColor:'#F9F9F9',padding: '10rpx 18rpx'}"
<view class="searchBtn"> ></up-input>
搜索 <view class="searchBtn">
</view> 搜索
</view> --> </view>
<!-- 内容 --> </view> -->
<view class="couponContentList"> <!-- 内容 -->
<view class="couponContent" v-for="(item,index) in pageData.couponList" :key="index"> <view class="couponContentList">
<view class="couponContent" v-for="(item,index) in pageData.couponList" :key="index">
<view class="couponContentListTop">
<view class="title"> {{ item.title }} </view>
<view> ID:{{item.id}} </view>
</view>
<view class="couponContentListcontent">
<view>
<view> 使用门槛 </view>
<view v-if="item.type == 1"> {{ item.fullAmount }} 元减 {{ item.discountAmount }} </view>
<view v-if="item.type == 2"> {{ item.fullAmount }} 元可用 </view>
</view>
<view>
<view> 领取方式 </view>
<view> 用户不可自行领取 </view>
</view>
<view v-if="item.type == 1">
<view> 有效期 </view>
<view> 领券后{{ item.validDays }}天过期 </view>
</view>
<view class="JQclass">
<image :src="'/static/coupon/qrcode.svg'" mode="scaleToFill" />
</view>
</view>
<view class="couponContentListcontent2">
<view class="">
<view class="num"> {{ item.number }} </view>
<view class="lable"> 发放数量 </view>
</view>
<view class="">
<view class="num"> {{ item.number-item.leftNumber }} </view>
<view class="lable"> 已领取 </view>
</view>
<view class="">
<view class="num"> {{ item.leftNumber }} </view>
<view class="lable"> 剩余 </view>
</view>
<view class="">
<view class="num"> {{ item.useNumber }} </view>
<view class="lable"> 已使用 </view>
</view>
</view>
<view class="couponContentListbottom">
<button @tap="editCoupon(item)">编辑</button>
<button @tap="delCoupon(item)">删除</button>
</view>
</view>
<template v-if="pageData.couponList.length">
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
@change="pageChange"></my-pagination>
</template>
</view>
<view class="couponContentListTop">
<view class="title"> {{ item.title }} </view> <view class="bottomPop">
<view> ID:{{item.id}} </view> <button @click="addCoupon">+添加{{pageData.status.tagName}}</button>
</view> </view>
<view class="couponContentListcontent">
<view>
<view> 使用门槛 </view>
<view> {{ item.fullAmount }} 元减 {{ item.discountAmount }} </view>
</view>
<view>
<view> 领取方式 </view>
<view> 用户不可自行领取 </view>
</view>
<view>
<view> 有效期 </view>
<view> 领券后{{ item.validDays }}天过期 </view>
</view>
<view class="JQclass">
<image :src="'/static/coupon/qrcode.svg'" mode="scaleToFill" />
</view>
</view>
<view class="couponContentListcontent2">
<view class="">
<view class="num"> {{ item.number }} </view>
<view class="lable"> 发放数量 </view>
</view>
<view class="">
<view class="num"> {{ item.number-item.leftNumber }} </view>
<view class="lable"> 已领取 </view>
</view>
<view class="">
<view class="num"> {{ item.leftNumber }} </view>
<view class="lable"> 剩余 </view>
</view>
<view class="">
<view class="num"> {{ item.useNumber }} </view>
<view class="lable"> 已使用 </view>
</view>
</view>
<view class="couponContentListbottom">
<button @tap="editCoupon(item)">编辑</button>
<button @tap="delCoupon(item)">删除</button>
</view>
</view>
<template v-if="pageData.couponList.length">
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
@change="pageChange"></my-pagination>
</template>
</view>
<view class="bottomPop">
<button @click="addCoupon">+添加{{pageData.status.tagName}}</button>
</view> </view>
</template> </template>
@ -182,6 +185,9 @@
body{ body{
background-color: #f9f9f9; background-color: #f9f9f9;
} }
.container{
position: relative;
}
.tagClass { .tagClass {
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;
@ -190,6 +196,9 @@
padding-top: 44rpx; padding-top: 44rpx;
padding: 32rpx 28rpx; padding: 32rpx 28rpx;
background-color: #fff; background-color: #fff;
position: fixed;
top: 79rpx;
z-index: 999;
.tag-item { .tag-item {
display: inline-block; display: inline-block;
padding: 10rpx 24rpx; padding: 10rpx 24rpx;
@ -244,7 +253,7 @@
/* height: 544rpx; */ /* height: 544rpx; */
margin: 32rpx auto 0; margin: 32rpx auto 0;
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 0 28rpx 182rpx 28rpx; padding: 122rpx 28rpx 182rpx 28rpx;
} }
.couponContent { .couponContent {
/* background-color: #f9f9f9; */ /* background-color: #f9f9f9; */