This commit is contained in:
weipengfei 2024-01-19 18:10:45 +08:00
parent 69ddd11bf7
commit 2755927c6d
4 changed files with 44 additions and 17 deletions

View File

@ -280,7 +280,12 @@ export function storeActivityStatus(data) {
return request.get(`storeActivity/status`, data);
}
// 拉新红包活动完成状态
// 领取红包
export function storeActivityReceive(data) {
return request.post(`storeActivity/receive`, data);
}
// 拉新红包活动完成状态
export function storeActivityRecord(data) {
return request.get(`storeActivity/record`, data);
}

View File

@ -2,25 +2,25 @@
<view>
<view style="height: var(--status-bar-height);background-color: #e54841;"></view>
<view class="bg">
<image class="bg_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/09c95202401191053435021.png"></image>
<image @click="back" class="bg_back" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/59275202401190916492722.png"></image>
<image class="bg_img" mode="widthFix" src="/static/new_activity/subsidy.png"></image>
<image @click="back" class="bg_back" src="/static/new_activity/back.png"></image>
<view class="b_title">
<view>总计获得</view> <view class="count">580</view> <view>元补贴红包</view>
<view>总计获得</view> <view class="count">{{total_amount}}</view> <view>元补贴红包</view>
</view>
<view class="b_body">
<image class="body_head_img" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0720d202401191138543586.png"></image>
<image class="body_head_img" mode="widthFix" src="/static/new_activity/srecord.png"></image>
<view class="b_head">
<view class="head_title">消费金额</view>
<view class="head_title">补贴金额</view>
<view class="head_title">红包获得时间</view>
<view class="head_title2">红包获得时间</view>
</view>
<view class="b_content">
<view class="content_list" v-for="(item, index) in 3">
<view class="content_item">200<text class="mall"></text></view>
<view class="content_item">110<text class="mall"></text></view>
<view class="content_item">2024-01-20</view>
<view class="content_list" v-for="(item, index) in list" :key="index">
<view class="content_item">{{item.order_amount}}<text class="mall"></text></view>
<view class="content_item">{{item.coupon_price}}<text class="mall"></text></view>
<view class="content_item2"><text class="mall">{{item.create_time}}</text></view>
</view>
<view class="mall none">暂无记录</view>
<view class="mall none" style="padding-top: 0;" v-if="list.length==0" @click="navTo">{{'暂无记录, 去消费领补贴 >>'}}</view>
</view>
</view>
</view>
@ -28,22 +28,35 @@
</template>
<script>
import { consumption, chooseConsumption } from "@/api/activity.js"
import { storeActivityRecord } from "@/api/activity.js"
import { Toast } from "../../../libs/uniApi";
import { getUserInfo } from '@/api/user.js';
export default {
data() {
return {
total_amount: '0.00',
list: []
}
},
onLoad() {},
onShow() {
this.storeActivityRecord();
},
methods: {
back(){
uni.navigateBack()
},
storeActivityRecord(){
storeActivityRecord().then(res=>{
this.list = res.data.record;
this.total_amount = res.data.total_amount || "0.00"
})
},
navTo(){
uni.switchTab({
url:'/pages/index/index'
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
@ -115,10 +128,15 @@ page{
color: #C44100;
display: flex;
margin-top: 28rpx;
font-size: 28rpx;
padding: 20rpx 0;
.head_title{
flex: 1;
padding: 20rpx;
font-size: 28rpx;
padding-left: 20rpx;
width: 190rpx;
}
.head_title2{
padding-left: 20rpx;
width: 280rpx;
}
}
.b_content{
@ -135,8 +153,12 @@ page{
display: flex;
padding-bottom: 20rpx;
.content_item{
padding: 0 20rpx;
flex: 1;
padding-left: 20rpx;
width: 190rpx;
}
.content_item2{
padding-left: 20rpx;
width: 280rpx;
}
}
.none{

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB