oil-station/gasStation-uni/pagesMy/signIn/index.vue

286 lines
5.4 KiB
Vue
Raw Normal View History

2024-09-21 17:37:21 +08:00
<template>
<view class='container'>
<view class="top_banner">
<image src="../../static/imgs/qdmr.png" mode=""></image>
</view>
2024-09-22 10:32:05 +08:00
<view class="cont-title">
<view class="or-size">已连续签到</view>
<view class="or-num">0</view>
<view class="or-num">5</view>
<view class="or-size"></view>
</view>
<view class="wrap-box">
2024-09-22 14:12:52 +08:00
<view class="w_box" v-for="(item,index) in 30" :key="index" @click="setIndex(index)"
:class="{'acv_w' : wIndex == index }">
2024-09-22 10:32:05 +08:00
<view class="">第6天</view>
<image src="@/static/imgs/jinbi.png" style="width: 25px; height: 25px; "></image>
<view class="">5积分</view>
</view>
</view>
2024-09-22 14:12:52 +08:00
<view class="bottom_bs" @click="equityShow = true">
<view class="">连续签到获得更多积分</view>
<view class="d-s"> <u-icon name="info-circle" size="14px"></u-icon>
<view style="font-size: 14px; color: #333; margin-left: 5px; ">签到规则</view>
</view>
</view>
2024-09-22 10:32:05 +08:00
<view class="anniu">
签到
</view>
2024-09-22 14:12:52 +08:00
<u-overlay :show="show" @click="show = false">
<view class="box_">
<view class="r_size">+10积分</view>
</view>
</u-overlay>
<u-popup :show="equityShow" :closeable="true" :round="10" mode="bottom" @close="equityclose">
<view class="_tbox">
<view class="_btop">签到规则</view>
<view class="_bbox">
<!-- <view class="b_title">获取您的位置信息</view> -->
<view class="">
1.签到时间
全天可签到不限制具体时间段
2.签到方式
用户通过小程序的签到入口进行点击签到
3签到奖励
为鼓励用户签到我们设置了签到奖励积分
签到奖励可能随着连续签到天数的增加而增加形成签到
激励机制
4补签与断签
不允许用户进行补签以恢复连续签到天数
断签后用户需重新开始计算连续签到天数
</view>
</view>
</view>
</u-popup>
2024-09-21 17:37:21 +08:00
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
2024-09-22 14:12:52 +08:00
wIndex: 0,
show: false,
equityShow: false
2024-09-21 17:37:21 +08:00
}
},
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: {
2024-09-22 14:12:52 +08:00
equityclose() {
this.equityShow = false
},
setIndex(index) {
this.wIndex = index
this.show = true
},
2024-09-21 17:37:21 +08:00
//滞空方法
resetting() {
this.pageNo = 1
this.pageSize = 10
this.totalPage = ''
this.List = []
},
// 分页——网络请求
async getList() {
2024-09-22 10:32:05 +08:00
// uni.showLoading({
// title: '加载中'
// });
2024-09-21 17:37:21 +08:00
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">
.container {
width: 100%;
box-sizing: border-box;
2024-09-22 10:32:05 +08:00
padding-bottom: 50px;
2024-09-21 17:37:21 +08:00
}
.top_banner {
width: 100%;
height: 200px;
image {
width: 100%;
height: 100%;
}
}
2024-09-22 10:32:05 +08:00
.cont-title {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.or-size {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.or-num {
box-sizing: border-box;
padding: 0px 5px;
background: #FF9655;
color: #fff;
font-weight: 600;
font-size: 32px;
color: #FFFFFF;
margin: 10px;
}
.wrap-box {
width: 100%;
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
padding: 10px;
}
.w_box {
width: 19%;
box-sizing: border-box;
padding: 5px 15px;
background: #F7F7F7;
text-align: center;
font-size: 12px;
border-radius: 4px;
margin-right: 1%;
margin-bottom: 2%;
image {
margin: 5px auto;
}
}
.anniu {
width: 80%;
height: 40px;
background: #FF9655;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
border-radius: 50px;
margin: 25px auto;
2024-09-22 14:12:52 +08:00
2024-09-22 10:32:05 +08:00
}
.acv_w {
background: #FF9655 !important;
2024-09-22 14:12:52 +08:00
color: #fff !important;
}
.bottom_bs {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 10px;
font-size: 14px;
color: #999999;
}
.d-s {
display: flex;
align-items: center;
}
.box_ {
width: 230px;
height: 200px;
background: url('http://47.94.122.58:83/qdcg.png') no-repeat;
background-size: 100% 100%;
position: relative;
left: 50%;
transform: translate(-50%, 150%);
bottom: 10%;
}
.r_size {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
bottom: 10%;
color: #FA6400;
}
._tbox {
border-radius: 10px;
background: #fff;
width: 100%;
}
._btop {
box-sizing: border-box;
padding: 15px;
border-bottom: 1px solid #EEEEEE;
text-align: center;
font-weight: 600;
font-size: 14px;
color: #333333;
}
._bbox {
box-sizing: border-box;
padding: 15px;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 18px;
2024-09-22 10:32:05 +08:00
}
2024-09-21 17:37:21 +08:00
</style>