<template>
|
<view class="sign">
|
<!-- 头部 -->
|
<view class="container_h">
|
<view class="container_head" :style="{height: navHeight + 'px', marginTop: statusbarHeight + 'px'}">
|
<view class="container_head_address" @click="toSelectCity">
|
<uni-icons type="back" size="25" color="#333333"></uni-icons>
|
</view>
|
</view>
|
</view>
|
<!-- 咖豆 -->
|
<view class="sign_img" @click="Open">
|
<image src="@/static/images/qiandao_bg@2x.png" mode="widthFix"></image>
|
<view class="sign_img_text" :style="{top: navHeight + statusbarHeight + 'px'}">
|
<text>我的咖豆</text>
|
<text>8902</text>
|
</view>
|
</view>
|
<view class="sign_date">
|
<!-- 日期 -->
|
<view class="sign_date_box">
|
<view class="title">
|
<text>本月已连续签到3天</text>
|
<uni-icons :type="open ? 'top' : 'bottom'" size="20" @click="open = !open"></uni-icons>
|
</view>
|
<view class="list">
|
<view class="list_item" v-for="(item, index) in open ? dateList : dateList.slice(0,7)" :key="index">
|
<image src="@/static/icon/Frame 45@2x.png" mode="widthFix"></image>
|
<text>{{item.date}}</text>
|
</view>
|
<view class="list_item1" v-for="(item, index) in 5" :key="index"></view>
|
</view>
|
<view class="submit">今日已签到,明天再来吧~</view>
|
</view>
|
<!-- 任务 -->
|
<view class="sign_date_rw">
|
<view class="title">
|
<text>做任务赚咖豆</text>
|
<view class="title_right" @click="toDesc">
|
<uni-icons type="help" color="#999999" size="18"></uni-icons>
|
<text>咖豆获取规则</text>
|
</view>
|
</view>
|
<view class="list">
|
<view class="list_item">
|
<view class="list_item_left">
|
<view class="top">
|
<text>分享资讯</text>
|
<text>(1/4)</text>
|
</view>
|
<text>10咖豆</text>
|
</view>
|
<view class="list_item_submit">去分享</view>
|
</view>
|
<view class="list_item">
|
<view class="list_item_left">
|
<view class="top">
|
<text>发布评论</text>
|
<text>(1/4)</text>
|
</view>
|
<text>10咖豆</text>
|
</view>
|
<view class="list_item_submit" @click="topl">去评论</view>
|
</view>
|
<view class="list_item">
|
<view class="list_item_left">
|
<view class="top">
|
<text>邀请新用户注册</text>
|
</view>
|
<text>双方各得100咖豆</text>
|
</view>
|
<view class="list_item_submit">去邀请</view>
|
</view>
|
<view class="list_item">
|
<view class="list_item_left">
|
<view class="top">
|
<text>分享邀请海报</text>
|
<text>(0/1)</text>
|
</view>
|
<text>20咖豆</text>
|
</view>
|
<view class="list_item_submit">去分享</view>
|
</view>
|
<view class="list_item">
|
<view class="list_item_left">
|
<view class="top">
|
<text>咖啡地图消费</text>
|
</view>
|
<text>25咖豆</text>
|
</view>
|
<view class="list_item_submit" @click="toMap">去消费</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
<!-- 签到弹框 -->
|
<uni-popup ref="popup">
|
<view class="popup">
|
<image src="@/static/images/qiandao1bg@2x.png" mode="widthFix"></image>
|
<text class="popup_box_info">每日签到领咖豆,咖豆可兑商品</text>
|
<view class="popup_num">
|
<image src="@/static/icon/Frame 47@2x.png" mode="widthFix"></image>
|
<text>+5</text>
|
</view>
|
<text class="popup_lx">本月已连续签到3天</text>
|
<view class="popup_submit">
|
<view class="popup_submit_btn">确定</view>
|
</view>
|
</view>
|
</uni-popup>
|
</view>
|
</template>
|
|
<script>
|
import { mapState } from 'vuex'
|
import { getMonthDay } from '@/common/utils.js'
|
export default {
|
data() {
|
return {
|
dateList: [],
|
open: false
|
}
|
},
|
computed: {
|
...mapState(['statusbarHeight', 'navHeight'])
|
},
|
onLoad() {
|
var date = new Date()
|
let year = date.getFullYear()
|
var month = date.getMonth() + 1
|
let num = getMonthDay(`${year}-${month < 10 ? `0${month}` : `${month}`}`)
|
let arr = []
|
for (let i = 0; i < num; i++) {
|
arr.push({ date: `${month}.${i + 1}` })
|
}
|
this.dateList = arr
|
},
|
methods: {
|
Open() {
|
this.$refs.popup.open('center')
|
},
|
toSelectCity() {
|
uni.navigateBack({
|
delta: 1
|
});
|
},
|
toDesc() {
|
uni.navigateTo({
|
url: '/pages/details/index?title=咖豆获取规则'
|
});
|
},
|
topl() {
|
uni.switchTab({
|
url: '/pages/find/index'
|
});
|
},
|
toMap() {
|
uni.switchTab({
|
url: '/pages/map/index'
|
});
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.sign {
|
width: 100%;
|
.container_h {
|
width: 100%;
|
height: auto;
|
position: fixed;
|
top: 0;
|
left: 0;
|
z-index: 9;
|
.container_head {
|
width: 100%;
|
padding: 0 32rpx;
|
box-sizing: border-box;
|
display: flex;
|
align-items: center;
|
justify-content: flex-start;
|
background-color: rgba(0, 0, 0, 0);
|
.container_head_address {
|
display: flex;
|
align-items: center;
|
justify-content: flex-start;
|
}
|
}
|
}
|
.sign_img {
|
width: 100%;
|
height: 578rpx;
|
position: relative;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
.sign_img_text {
|
position: absolute;
|
left: 32rpx;
|
margin-top: 76rpx;
|
display: flex;
|
flex-direction: column;
|
text {
|
&:first-child {
|
font-size: 36rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #FFFFFF;
|
}
|
&:last-child {
|
font-size: 80rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #FFFFFF;
|
letter-spacing: 1px;
|
text-shadow: 2px 4px 8px #BD0202;
|
-webkit-background-clip: text;
|
}
|
}
|
}
|
}
|
.sign_date {
|
width: 100%;
|
padding: 0 32rpx;
|
box-sizing: border-box;
|
position: relative;
|
top: -140rpx;
|
left: 0;
|
display: flex;
|
justify-content: center;
|
flex-direction: column;
|
.sign_date_box {
|
width: 100%;
|
padding: 34rpx 28rpx;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
border-radius: 20rpx;
|
.title {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
text {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
}
|
.list {
|
display: flex;
|
align-items: flex-start;
|
flex-wrap: wrap;
|
justify-content: space-between;
|
margin-top: 12rpx;
|
.list_item1 {
|
width: 80rpx;
|
height: 0;
|
}
|
.list_item {
|
width: 80rpx;
|
height: 124rpx;
|
background: #F5F5F5;
|
border-radius: 8rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
margin-top: 12rpx;
|
&:last-child {
|
margin-right: 0 !important;
|
}
|
image {
|
width: 68rpx;
|
height: 68rpx;
|
}
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #999999;
|
margin-top: 6rpx;
|
}
|
}
|
}
|
.submit {
|
width: 100%;
|
height: 72rpx;
|
line-height: 72rpx;
|
text-align: center;
|
background: #F5F5F5;
|
border-radius: 36rpx;
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #999999;
|
margin-top: 32rpx;
|
}
|
}
|
.sign_date_rw {
|
width: 100%;
|
padding: 32rpx 28rpx;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
box-shadow: 0rpx 8rpx 12rpx 0rpx rgba(0,0,0,0.02);
|
border-radius: 12rpx;
|
margin-top: 18rpx;
|
.title {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
text {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
.title_right {
|
display: flex;
|
align-items: center;
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
}
|
}
|
.list {
|
display: flex;
|
flex-direction: column;
|
margin-top: 18rpx;
|
.list_item {
|
width: 100%;
|
height: 132rpx;
|
border-bottom: 2rpx solid #F4F5F4;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
&:last-child {
|
border: none !important;
|
}
|
.list_item_left {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
.top {
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
&:nth-child(2) {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
}
|
}
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
margin-top: 20rpx;
|
}
|
}
|
.list_item_submit {
|
flex-shrink: 0;
|
width: 128rpx;
|
height: 48rpx;
|
line-height: 48rpx;
|
text-align: center;
|
background: linear-gradient(90deg, #D95A5A 0%, #D20A0A 100%);
|
border-radius: 30rpx;
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #FFFFFF;
|
}
|
}
|
}
|
}
|
}
|
.popup {
|
width: 500rpx;
|
height: 756rpx;
|
position: relative;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
.popup_box_info {
|
position: absolute;
|
top: 356rpx;
|
left: 0;
|
width: 100%;
|
text-align: center;
|
font-size: 26rpx;
|
font-family: PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
.popup_num {
|
position: absolute;
|
top: 426rpx;
|
left: 0;
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
image {
|
width: 68rpx;
|
height: 68rpx;
|
// margin-right: 24rpx;
|
}
|
text {
|
font-size: 50rpx;
|
font-family: PingFang SC;
|
font-weight: 500;
|
color: #D20A0A;
|
}
|
}
|
.popup_lx {
|
position: absolute;
|
top: 532rpx;
|
left: 0;
|
width: 100%;
|
text-align: center;
|
font-size: 32rpx;
|
font-family: PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
.popup_submit {
|
position: absolute;
|
top: 638rpx;
|
left: 0;
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
.popup_submit_btn {
|
width: 380rpx;
|
height: 75rpx;
|
line-height: 75rpx;
|
text-align: center;
|
background: linear-gradient(90deg, #D95A5A, #D20A0A);
|
border-radius: 38rpx;
|
font-size: 32rpx;
|
font-family: PingFang SC;
|
font-weight: 400;
|
color: #FFFFFF;
|
}
|
}
|
}
|
}
|
</style>
|