This commit is contained in:
xvv 2024-09-26 15:23:18 +08:00
parent 3f93dd7ade
commit 21195ccf2a
3 changed files with 252 additions and 1 deletions

View File

@ -210,6 +210,13 @@
"style": { "style": {
"navigationBarTitleText": "会员注册" "navigationBarTitleText": "会员注册"
}
},
{
"path": "prize/index",
"style": {
"navigationBarTitleText": "我的奖品"
} }
} }
] ]

View File

@ -1003,6 +1003,7 @@
box-sizing: border-box; box-sizing: border-box;
padding: 15px; padding: 15px;
margin: 15px auto; margin: 15px auto;
} }
.station-title { .station-title {
@ -1225,4 +1226,4 @@
justify-content: center; justify-content: center;
color: #fff; color: #fff;
} }
</style> </style>

View File

@ -0,0 +1,243 @@
<template>
<view class="content">
<view class="container">
<view class="top_show">
<view class="wx_" v-if="show == false" @click="show =! show"></view>
<view class="x_" v-else @click="show =! show">
<u-icon name="checkbox-mark" color="#fff" size="14"></u-icon>
</view>
<view style="font-size: 14px;">仅查看已中奖的记录</view>
</view>
<view class="box_" v-for="(item,index) in 3" :key="index">
<view class="title_">抽奖</view>
<view class="box_bs">
<image src="../../static/logo.png" style="width: 80px; height: 80px; "></image>
<view class="r_box">
<view class="">
<view class="b_title">获得 <text style="color:#E02020 ;">抽纸</text> 1</view>
<view style="margin: 5px 0px;">抽纸1份</view>
<view class="">2024-08-02 12:02:24</view>
</view>
<view class="anniu">待核销</view>
</view>
</view>
</view>
<u-popup :show="showl" :round="10" mode="bottom" @close="close" @open="open">
<view class="">
<view class="pop-top">
<view style="width: 20px;"></view>
<view class="">立即使用</view>
<view class=""><u-icon name="close"></u-icon></view>
</view>
<view class="popup-box">
<view class="">
<view class="">请向商家出示此码使用</view>
<view style="display: flex;align-items: center;justify-content: center; margin: 10px auto;">
<w-qrcode :options="options"></w-qrcode>
</view>
<view class="">核销码6688172293684182</view>
</view>
</view>
</view>
</u-popup>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
title: '',
show: false,
List: [],
pageNo: 1,
pageSize: 10,
totalPage: '',
showl: true,
options: {
code: 'https://oilapi.youkerr.com/oily?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni
.getStorageSync('userId') + '&type=yaoqingyouli',
// code: 'https://www.tuofeng.cc/oily?storeId=' + uni.getStorageSync('storeId') + ' &userId=' + uni
// .getStorageSync('userId'), //
size: 400, // 460460rpx
},
}
},
onLoad() {
},
onPullDownRefresh() {
//
this.resetting() //
this.getList() //
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNo++
this.getList()
}
},
components: {
},
methods: {
//
resetting() {
this.pageNo = 1
this.pageSize = 10
this.totalPage = ''
this.List = []
},
//
async getList() {
uni.showLoading({
title: '加载中'
});
let res = await request({
url: '网络请求',
method: 'get',
data: {
pageNo: this.pageNo,
pageSize: this.pageSize,
}
})
if (res.code == 200) {
uni.hideLoading(); //
if (this.pageNo != 1) {
this.List = this.ruleList.concat(res.result.records)
} else {
this.List = res.result.records
}
this.totalPage = res.result.pages
}
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
background: #f4f5f6;
}
.box_ {
width: 95%;
background: #fff;
border-radius: 4px;
box-sizing: border-box;
padding: 10px;
margin: 15px auto;
}
.box_bs {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 12px;
}
.r_box {
width: 70%;
display: flex;
align-items: center;
justify-content: space-between;
}
.anniu {
border-radius: 13px;
border: 1px solid #FA6400;
width: 60px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
color: #FA6400;
font-size: 14px;
}
.title_ {
font-size: 16px;
color: #333333;
margin-bottom: 15px;
}
.top_show {
width: 100%;
background: #fff;
box-sizing: border-box;
padding: 10px 20px;
display: flex;
align-items: center;
}
.b_title {
font-size: 14px;
}
.wx_ {
width: 14px;
height: 14px;
border-radius: 50%;
border: 1px solid #eee;
margin-right: 5px;
}
.x_ {
width: 14px;
height: 14px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: 1px solid #FA6400;
background: #FA6400;
margin-right: 5px;
}
.popup-box {
background: #fff;
box-sizing: border-box;
padding: 10px;
background: #ffffff;
margin: 15px auto;
box-sizing: border-box;
padding: 10px;
text-align: center;
}
.pop-top {
width: 100%;
box-sizing: border-box;
padding: 10px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #eee;
}
</style>