Browse Source

feat: 每日签到页面;

pull/1/head
fox 2 months ago
parent
commit
ec7151374f
5 changed files with 231 additions and 6 deletions
  1. +3
    -0
      pages.json
  2. +11
    -6
      pages/index/center.vue
  3. +217
    -0
      pages_order/mine/signIn.vue
  4. BIN
      pages_order/static/signIn/icon-arrow.png
  5. BIN
      pages_order/static/signIn/icon-tips.png

+ 3
- 0
pages.json View File

@ -91,6 +91,9 @@
{
"path": "mine/verifyRecord"
},
{
"path": "mine/signIn"
},


+ 11
- 6
pages/index/center.vue View File

@ -110,13 +110,13 @@
<image class="fun-common-icon" src="@/static/image/center/icon-voucher.png" mode="widthFix"></image>
<text class="fun-common-label">代金券</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<!-- todo: check -> @click="openServicePopup" -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/home/contact')">
<image class="fun-common-icon" src="@/static/image/center/icon-service.png" mode="widthFix"></image>
<text class="fun-common-label">联系客服</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/signIn')">
<image class="fun-common-icon" src="@/static/image/center/icon-sign-in.png" mode="widthFix"></image>
<text class="fun-common-label">每日签到</text>
</view>
@ -136,7 +136,8 @@
<view class="left">
<image class="left-bg" src="@/static/image/center/bg-verify.png"></image>
<view class="flex left-content">
<!-- todo: navigateTo -->
<view class="flex left-content" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<text>核销明细</text>
<image class="left-icon" src="@/static/image/center/icon-arrow.png" mode="widthFix"></image>
</view>
@ -148,6 +149,8 @@
</view>
</view>
<customerServicePopup ref="customerServicePopup" />
<!-- todo: delete -->
<template v-if="false">
@ -214,8 +217,6 @@
</swiper>
</div>
<customerServicePopup ref="customerServicePopup" />
</template>
<tabber select="center" />
@ -292,6 +293,10 @@
})
},
openServicePopup(phone, title) {
// todo
this.$refs.customerServicePopup.open(phone, title)
},
onScan() {
// todo
},


+ 217
- 0
pages_order/mine/signIn.vue View File

@ -0,0 +1,217 @@
<template>
<view class="page">
<navbar title="每日签到" leftClick @leftClick="$utils.navigateBack" color="#fff" />
<view class="content">
<view class="flex info">
<view class="flex flex-column info-item">
<view class="info-value">5</view>
<view class="info-label">连续签到/</view>
</view>
<view class="flex flex-column info-item">
<view class="info-value">20</view>
<view class="info-label">累计签到/</view>
</view>
<view class="flex flex-column info-item">
<view class="info-value">50</view>
<view class="info-label">获得积分</view>
</view>
</view>
<view class="calendars">
<uv-calendars
insert
:showMonth="false"
:selected="selected"
/>
<view class="flex tips">
<image class="tips-icon" src="../static/signIn/icon-tips.png" mode="widthFix"></image>
<text>签到一次得 5 积分</text>
</view>
</view>
<view style="text-align: right;">
<button class="flex btn btn-record">
<text>积分明细</text>
<image class="btn-record-icon" src="../static/signIn/icon-arrow.png" mode="widthFix"></image>
</button>
</view>
<view class="tools">
<button class="flex btn btn-sign" @click="onSignIn">我要签到</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
const SELECTED_DATE_ARR = ['2025-03-04', '2025-03-05', '2025-03-06', '2025-03-07']
return {
// todo: fetch
selected: SELECTED_DATE_ARR.map(date => {
return {
date,
info: date[date.length - 1],
infoColor: '#FFFFFF',
badge: true,
}
}),
}
},
methods: {
onSignIn() {
// todo
}
},
}
</script>
<style lang="scss" scoped>
.page {
background-color: $uni-bg-color;
position: relative;
/deep/ .nav-bar__view {
padding-bottom: 409rpx;
background-image: linear-gradient(#84A73F, #D8FF8F);
}
/deep/ .uv-calendar {
width: calc(100vw - 14rpx*2);
}
/deep/ .uv-calendar__header {
border: none;
}
/deep/ .uv-calendar__header-btn {
border-color: $uni-color-light;
}
/deep/ .uv-calendar__backtoday,
/deep/ .uv-calendar-item--isDay-text.uv-calendar-item__weeks-lunar-text {
display: none;
}
/deep/ .uv-calendar__weeks-day {
border-color: #E6E6E6;
}
/deep/ .uv-calendar-item__weeks-box-item {
height: 72rpx;
}
/deep/ .uv-calendar-item--isDay {
color: #333 !important;
background-color: transparent !important;
}
/deep/ .uv-calendar-item__weeks-box-circle {
top: 50%;
left: 50%;
width: 53rpx;
height: 53rpx;
transform: translate(-50%, -50%);
border-radius: 50%;
background-color: $uni-color-light;
}
/deep/ .uv-calendar-item__weeks-lunar-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 28rpx;
line-height: 1;
}
}
.content {
position: absolute;
top: 243rpx;
z-index: 999;
}
.info {
width: 100vw;
box-sizing: border-box;
padding: 0 48rpx;
font-size: 0;
justify-content: space-between;
&-item {
color: $uni-text-color-inverse;
}
&-value {
font-size: 46rpx;
}
&-label {
font-size: 26rpx;
margin-top: 19rpx;
}
}
.calendars {
background-color: $uni-fg-color;
margin: 56rpx 14rpx 0 14rpx;
border-radius: 45rpx;
overflow: hidden;
.tips {
padding: 30rpx 30rpx 38rpx 30rpx;
color: $uni-color-light;
justify-content: flex-start;
&-icon {
width: 36rpx;
height: auto;
margin-right: 11rpx;
}
}
}
.tools {
margin-top: 146rpx;
width: 100%;
padding: 0 82rpx;
box-sizing: border-box;
}
.btn {
border: none;
&-record {
margin-top: 19rpx;
margin-right: 28rpx;
display: inline-flex;
color: #999999;
&-icon {
width: 21rpx;
height: auto;
margin-left: 18rpx;
}
}
&-sign {
width: 100%;
padding: 29rpx 0;
color: $uni-text-color-inverse;
font-size: 28rpx;
line-height: 40rpx;
border-radius: 44rpx;
background-image: linear-gradient(to right, #84A73F, #D8FF8F);
}
}
</style>

BIN
pages_order/static/signIn/icon-arrow.png View File

Before After
Width: 21  |  Height: 22  |  Size: 1.0 KiB

BIN
pages_order/static/signIn/icon-tips.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.8 KiB

Loading…
Cancel
Save