Commit e0fb8d86 by huyue

提交兑换券

1 parent d829d7c5
......@@ -31,6 +31,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.5852514919011083) calc(100vmin * (1173 / 768) * -0.4484228473998295);}
.icon-clone { width: calc(100vmin * (1173 / 768) * 0.010230179028132993); height: calc(100vmin * (1173 / 768) * 0.010230179028132993);
background-position: calc(100vmin * (1173 / 768) * -0.5967604433077579) calc(100vmin * (1173 / 768) * -0.16197783461210571);}
.icon-coupon-arrow { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.17220801364023872) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-customer-1 { width: calc(100vmin * (1173 / 768) * 0.17050298380221654); height: calc(100vmin * (1173 / 768) * 0.17050298380221654);
background-position: calc(100vmin * (1173 / 768) * -0.15302642796248933) calc(100vmin * (1173 / 768) * 0);}
.icon-customer-2 { width: calc(100vmin * (1173 / 768) * 0.17050298380221654); height: calc(100vmin * (1173 / 768) * 0.17050298380221654);
......@@ -48,11 +50,11 @@
.icon-detail-start { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
background-position: calc(100vmin * (1173 / 768) * -0.04049445865302643) calc(100vmin * (1173 / 768) * -0.5507246376811594);}
.icon-eye-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.17220801364023872) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-eyes-off { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.19224211423699913) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-eyes-on { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
.icon-eyes-off { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.21227621483375958) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-eyes-on { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.23231031543052003) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-face-error-active { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
background-position: calc(100vmin * (1173 / 768) * -0.2144075021312873) calc(100vmin * (1173 / 768) * -0.289002557544757);}
.icon-face-error { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
......@@ -72,19 +74,27 @@
.icon-home { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.27408354646206307) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-icon-arrow { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.23231031543052003) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.25234441602728047) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-close { width: calc(100vmin * (1173 / 768) * 0.030690537084398978); height: calc(100vmin * (1173 / 768) * 0.030690537084398978);
background-position: calc(100vmin * (1173 / 768) * -0.32395566922421143) calc(100vmin * (1173 / 768) * -0.5507246376811594);}
.icon-icon-female { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.25234441602728047) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-male { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.27237851662404094) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-shop { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
.icon-icon-instructions { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.29241261722080136) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-male { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.3124467178175618) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-navigation { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.33248081841432225) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-notice { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.3525149190110827) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-shop { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.37254901960784315) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-store { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.39258312020460356) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-icon-upload { width: calc(100vmin * (1173 / 768) * 0.05456095481670929); height: calc(100vmin * (1173 / 768) * 0.05456095481670929);
background-position: calc(100vmin * (1173 / 768) * -0.5068201193520887) calc(100vmin * (1173 / 768) * -0.35805626598465473);}
.icon-icon-weixin { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.3124467178175618) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.41261722080136404) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-income-card { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.5545609548167093);}
.icon-income-count { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
......@@ -102,13 +112,13 @@
.icon-js-icon { width: calc(100vmin * (1173 / 768) * 0.05456095481670929); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.06095481670929241) calc(100vmin * (1173 / 768) * -0.5230179028132992);}
.icon-kf-0 { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.33248081841432225) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.43265132139812446) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-kf-1 { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.3525149190110827) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.45268542199488493) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-kf-2 { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.37254901960784315) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.47271952259164535) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-kf-3 { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.39258312020460356) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.4927536231884058) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-level { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.5814151747655584) calc(100vmin * (1173 / 768) * -0.3171355498721228);}
.icon-locker-icon { width: calc(100vmin * (1173 / 768) * 0.1466325660699062); height: calc(100vmin * (1173 / 768) * 0.20119352088661552);
......@@ -182,7 +192,7 @@
.icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.5967604433077579) calc(100vmin * (1173 / 768) * -0.12702472293265132);}
.icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.41261722080136404) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.5127877237851662) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-scene-0 { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
background-position: calc(100vmin * (1173 / 768) * -0.45098039215686275) calc(100vmin * (1173 / 768) * -0.289002557544757);}
.icon-scene-1 { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
......@@ -194,7 +204,7 @@
.icon-setting { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.4620630861040068) calc(100vmin * (1173 / 768) * -0.5507246376811594);}
.icon-store-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.43265132139812446) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.5328218243819267) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-store { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
background-position: calc(100vmin * (1173 / 768) * -0.5379369138959932) calc(100vmin * (1173 / 768) * -0.4215686274509804);}
.icon-tag-checked { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
......@@ -202,7 +212,7 @@
.icon-tdcj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.484228473998295);}
.icon-tips-b { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.45268542199488493) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.5528559249786871) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-tips-g { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.05370843989769821);}
.icon-tips { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
......@@ -214,16 +224,16 @@
.icon-tool-pay { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.02557544757033248);
background-position: calc(100vmin * (1173 / 768) * -0.5596760443307758) calc(100vmin * (1173 / 768) * -0.5507246376811594);}
.icon-total { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.47271952259164535) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.5728900255754475) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-two-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.010230179028132993);
background-position: calc(100vmin * (1173 / 768) * -0.5967604433077579) calc(100vmin * (1173 / 768) * -0.1453537936913896);}
.icon-visible { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.5076726342710998);}
.icon-work-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.4927536231884058) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
background-position: calc(100vmin * (1173 / 768) * -0.592924126172208) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-ybtc_icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.5311167945439045);}
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.1504688832054561) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5127877237851662) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
\ No newline at end of file
background-position: calc(100vmin * (1173 / 768) * -0.04390451832907076) calc(100vmin * (1173 / 768) * -0.5008525149190111);}
\ No newline at end of file

131 KB | W: | H:

189 KB | W: | H:

assets/images/boutique/nothing.png
assets/images/boutique/nothing.png
assets/images/boutique/nothing.png
assets/images/boutique/nothing.png
  • 2-up
  • Swipe
  • Onion skin

2.3 MB | W: | H:

2.31 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

6.42 KB | W: | H:

6.89 KB | W: | H:

assets/spritesmith/certificate.png
assets/spritesmith/certificate.png
assets/spritesmith/certificate.png
assets/spritesmith/certificate.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -103,6 +103,7 @@ export default {
})
},
handleGo(val) {
console.log(val);
this.selectItem = val
if (val.jump) {
this.timer = setInterval(() => {
......
......@@ -11,7 +11,7 @@
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view v-if="isHigh" class="title"><text>兑换券介绍</text></view>
<view v-if="isHigh" class="title"><text>我的兑换券</text></view>
<view class="month-box" v-else>
<view class="month-tabs">
<view class="tab-prev" v-if="month <= currentMonth && month > 1" @click="prevTab">
......@@ -29,47 +29,126 @@
</view>
</view>
<view class="point-body">
<view class="level-box">
<view class="level-logo">
<view class="sprite-icon icon-medal"></view>
<view class="level-title">成长勋章</view>
<view class="data-container">
<view :class="['type-box']">
<view class="tab-item" v-for="(i, index) in typeList" :key="index" @click="changeType(index, 'firstIndex')">
<view
:class="['sprite-icon', firstIndex == index ? `icon-${firstClass[index]} active` : '', firstLeft[index]]">
</view>
<view class="text" :class="[firstIndex == index ? `active` : '']">
{{ i.tabName }}
<template>{{ i.num() }}</template>
<!-- <template>({{ preRecordFailList.length }})</template> -->
<div class="dot" :style="{ right: '86rpx' }" v-if="i.dot && i.dot()"></div>
</view>
</view>
</view>
<view class="level-desc">
<view class="level-item" :style="badgeList.includes(item.medalType) || isHigh ? item.style : ''" v-for="(item, index) in groupList" :key="index">
<view class="star-logo"><image :src="badgeList.includes(item.medalType) || isHigh ? item.logo : item.logo_grey"></image></view>
<view :class="{ 'star-name': true, grey: !badgeList.includes(item.medalType) && !isHigh }">{{ item.levelName }}</view>
<view :class="{ 'star-desc': true, grey: !badgeList.includes(item.medalType) && !isHigh }">{{ item.levelDesc }}</view>
<view class="star-coupon">
<view class="coupon-box">
<image :src="require('@/assets/images/point/coupon_bg.png')" v-if="badgeList.includes(item.medalType) || isHigh"></image>
<image :src="require('@/assets/images/point/coupon_grey.png')" v-else></image>
<view :class="{ 'coupon-title': true, grey: !badgeList.includes(item.medalType) && !isHigh }">{{ item.couponName }}</view>
<view :class="{ 'coupon-num': true, grey: !badgeList.includes(item.medalType) && !isHigh }">{{ item.couponNum }}</view>
<view class="tabs-bottom"></view>
<scroll-view :class="['record-list']" scroll-y @scrolltolower="pageonReachBottom" @scroll="scroll">
<template v-if="list.length">
<view class="coupon-list">
<template v-for="item in list">
<view :class="['coupon-bg', `${item.type}-bg`]">
<view class="coupon-img">
<img class="img" src="../../../../assets/images/point/study_star.png" alt="">
</view>
<view class="coupon-info">
<view :class="['coupon-name', { 'gray-name': item.type == 'expired' }]">{{ item.name }}星巴克中杯全国通兑券
</view>
<view :class="['coupon-price', { 'gray-text': item.type == 'expired' }]">官方价:¥{{ item.price }}
</view>
<view :class="['coupon-time', { 'gray-text': item.type == 'expired' }]">有效期:{{ item.time }}</view>
</view>
<view @click="openCoupon(item)"
:class="['coupon-btn', item.type == 'claimed' ? 'blue' : item.type == 'expired' ? 'gray gray-name' : 'red']">
{{ item.type == 'claimed' ? '查看券码' : item.type == 'expired' ? '已过期' : '使用领取' }}</view>
</view>
</template>
</view>
</template>
<template v-else>
<view class="nothing flex">
<image class="icon" src="../../../../assets/images/home/nothing.webp" />
暂无兑换券
</view>
</template>
</scroll-view>
</view>
</view>
<!-- 弹窗 -->
<view class="coupon-pop" v-if="showCouponPon">
<view class="pop-box">
<view class="coupon-card">
<view :class="['coupon-header', couponDetailInfo.type == 'claimed' ? 'detail-header' : '']">
<view class="header-img">
<img src="../../../../assets/images/point/teacher_star.png" alt="">
</view>
<view class="coupon-base-info">
<h3>星巴克中杯全国通兑券</h3>
<p>官方价:¥45</p>
<p>有效期:2025-3-31 00:00</p>
</view>
</view>
<view class="coupon-line"></view>
<view class="coupon-body">
<view class="coupon-qr" v-if="couponDetailInfo.type == 'claimed'">
<view class="coupon-tips">
<view class="sprite-icon icon-icon-instructions"></view>
<view>请截屏发送至手机或手机拍摄保存,按「使用须知」使用卡券</view>
</view>
<view class="coupon-qrcode">
<img class="qr-img" src="../../../../assets/images/point/teacher_star.png" alt="">
</view>
</view>
<view class="store-info">
<view class="sprite-icon icon-icon-store"></view>
<p class="store-label">附近门店</p>
<p class="store-address">深圳市南山区留仙大道1024号</p>
</view>
<view :class="['usage-notice', couponDetailInfo.type == 'claimed' ? 'claimed-usage':'']">
<view :class="[couponDetailInfo.type == 'claimed' ? 'claimed-notice':'']">
<view class="notice-title">
<view class="sprite-icon icon-icon-notice"></view>
<view class="m-l-8">使用须知</view>
</view>
<ol>
<li class="first-li">本产品有效期为购买后24小时内,请于24小时内到店使用。</li>
<li>如有质量问题,请于购买后24小时内联系客服,过期作废,非质量问题无法退换货,不同意勿拍。</li>
<li>到店出示本券由门店扫描验证即可兑换。星巴克全国指定直营门店可用(臻选店,机场店,火车站等交通枢纽和景区门店除外)。</li>
<li>请在本产品使用后再确认收货,一旦收货无法提供售后服务。如有售后,请妥善保管好您的星巴克小票以备使用。</li>
</ol>
</view>
</view>
<view class="coupon-footer" v-if="couponDetailInfo.type == 'unclaimed'">
<button class="claim-button" @click="handleUse">领取使用</button>
</view>
</view>
</view>
<view class="close-box" @click="closePop">
<view class="close-btn">×</view>
</view>
</view>
<view class="level-box">
<view class="level-logo">
<view class="sprite-icon icon-level"></view>
<view class="level-title">积分奖励</view>
</view>
<!-- 确认弹窗 -->
<view class="dailog-panel" v-if="show">
<view class="dailog-box">
<view class="dailog-close" @click="show = false"><uni-icons type="closeempty" size="20"></uni-icons></view>
<view class="dailog-logo">
<image src="../../../../assets/images/point/tips.png"></image>
</view>
<view class="table-box">
<table class="score-table">
<tr class="th">
<th v-for="(item, index) in tabelTh" :key="index" :style="{ width: item.width + 'vw' }">{{ item.title }}</th>
</tr>
<tr class="tr">
<td v-for="(item, index) in tabelTr" :key="index">
<!-- <ul v-if="item.list">
<li v-for="(l, i) in item.list">{{ l }}</li>
</ul> -->
<view v-html="getHtml(item.content || item.otherRewards)"></view>
</td>
</tr>
</table>
<view class="dailog-title">领取提醒</view>
<view class="dailog-content">
<view>卡券领取后需要在<view class="highlight">「24小时」</view>内按使用须知使用,</view>
<view>如24小时内未使用则将失效,请合理规划使用时间进行领取。</view>
<view> 请确认是否领取卡券?</view>
</view>
<view class="dailog-footer">
<template>
<view class="dailog-btn disabled" @click="show = false">暂不领取</view>
<view class="dailog-btn" @click="handleConfirm">确认领取</view>
</template>
</view>
</view>
</view>
......@@ -81,25 +160,62 @@ export default {
mixins: [point],
data() {
return {
selectItem: {},
detail: [],
isHigh: false,
currentIndex: 0,
levelIndex: 100,
groupList: [
{ title: '学习之星', style: 'background: #FFFAED;', medalType: 1, logo: require('@/assets/images/point/study_star.png'), logo_grey: require('@/assets/images/point/study_grey.png'), content: '月度学习类积分排名前10名', couponName: '50元话费券', couponNum: '1张' },
{ title: '全勤之星', style: 'background: #FFFAED;', medalType: 2, logo: require('@/assets/images/point/time_star.png'), logo_grey: require('@/assets/images/point/time_grey.png'), content: '当月全勤准时打卡,不包含请假特批', couponName: '50元饮品券', couponNum: '1张' },
{ title: '平板接待精英', style: 'background: #FFFAED;', medalType: 3, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), content: '平板接待月度无扣分记录', couponName: '50元水果券', couponNum: '1张' }
typeList: Object.freeze([
{ tabName: '全部', num: () => '' },
{ tabName: '未领取', num: () => '' },
{ tabName: '已领取', num: () => '' },
{ tabName: '已过期', num: () => '' }
]),
firstIndex: 0,
firstLeft: ['first', 'second', 'three'],
firstClass: ['first-nav', 'second-nav', 'second-nav'],
list: [
{
id: 1,
name: '星巴克中杯全国通兑券',
price: 45,
time: '2025-3-31 00:00',
type: 'claimed'
},
{
id: 2,
name: '星巴克中杯全国通兑券',
price: 45,
time: '2025-3-31 00:00',
type: 'unclaimed'
},
{
id: 3,
name: '星巴克中杯全国通兑券',
price: 45,
time: '2025-3-31 00:00',
type: 'expired'
},
{
id: 4,
name: '星巴克中杯全国通兑券',
price: 45,
time: '2025-3-31 00:00',
type: 'unclaimed'
},
{
id: 4,
name: '星巴克中杯全国通兑券',
price: 45,
time: '2025-3-31 00:00',
type: 'unclaimed'
}
],
badgeList: [],
tabelTh: [{ title: '积分区间', width: 8 }],
tabelTr: [{ content: '奖惩规则(每月)' }]
showCouponPon: false,
show: false,
couponDetailInfo: {}
}
},
props: {
transfer: {
type: Object,
default: () => {}
default: () => { }
}
},
mounted() {
......@@ -107,39 +223,47 @@ export default {
this.isHigh = isHigh
},
methods: {
getHtml(val) {
return val.replace(/\n/g, '<br/>')
changeType(index, name) {
console.log(index, name);
if (this[name] == index) return // 点击同一个
this.direction = ''
if (this[name] < index) {
this.direction = 'right'
} else {
this.direction = 'left'
}
this[name] = index
},
getDetail(countDate) {
this.getRule(1)
this.getRule(2)
this.getBadgeList(countDate)
openCoupon(row) {
console.log(row);
const { type } = row
switch (type) {
case 'unclaimed':
// 使用优惠券
this.showCouponPon = true
this.couponDetailInfo = row
break
case 'claimed':
this.showCouponPon = true
this.couponDetailInfo = row
break
default:
return
}
},
getBadgeList(countDate) {
uni.$api.pointApi.badgeList({ countDate }).then(res => {
this.badgeList = res.map(item => item.medalType)
})
closePop() {
this.showCouponPon = false
},
getRule(levelType) {
uni.$api.pointApi.rewardRule({ levelType }).then(res => {
if (levelType == 2) {
this.groupList = this.groupList.map(item => {
const findData = res.find(i => i.medalType == item.medalType)
return { ...item, ...findData }
})
console.log(this.groupList)
}
if (levelType == 1) {
const th = res.map(item => {
return { title: item.levelName, width: Math.floor(93 / res.length) }
})
this.tabelTh = [...this.tabelTh, ...th]
this.tabelTr = [...this.tabelTr, ...res]
}
})
// 领取使用按钮
handleUse() {
console.log(111);
this.show = true
this.showCouponPon = false
},
updateDetail(countDate) {
this.getBadgeList(countDate)
// 确认领取
handleConfirm() {
console.log('确认领取');
this.show = false
}
}
}
......@@ -148,6 +272,7 @@ export default {
.point-box {
position: relative;
}
.nav-bar {
width: 100%;
height: toRpx(96);
......@@ -155,6 +280,7 @@ export default {
margin-bottom: toRpx(12);
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
......@@ -170,22 +296,27 @@ export default {
color: #1a1a1a;
flex: 1;
text-align: center;
text {
margin-left: -96rpx;
}
}
.month-box {
flex: 1;
.month-tabs {
display: flex;
justify-content: center;
align-items: center;
.tab-mid {
font-size: toRpx(32);
color: #1a1a1a;
margin: 0 toRpx(120);
}
}
.tab-prev,
.tab-next {
display: flex;
......@@ -198,9 +329,211 @@ export default {
}
}
}
.point-body {
padding: 0 toRpx(64);
margin-top: toRpx(30);
.data-container {
background: #ffffff;
border-radius: toRpx(48);
margin-top: toRpx(48);
height: 72.39vh;
margin-right: toRpx(66);
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box;
position: relative;
overflow: hidden;
.type-box {
position: relative;
display: flex;
width: 100%;
background-color: #eef4fe;
height: toRpx(176);
line-height: toRpx(128);
border-radius: toRpx(48) toRpx(48) 0 0;
z-index: 0;
.tab-item {
width: toRpx(400);
text-align: center;
font-weight: 500;
font-size: toRpx(40);
color: #1f2133;
.first {
left: 0;
}
.second {
left: toRpx(352);
}
.three {
left: toRpx(756);
}
.text {
position: relative;
text-align: center;
width: toRpx(400);
.dot {
width: toRpx(16);
height: toRpx(16);
background: #f24724;
position: absolute;
top: toRpx(40);
border-radius: 50%;
right: toRpx(86);
}
}
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 700;
font-size: toRpx(40);
color: #2c66f7;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #2c66f7;
border-radius: toRpx(16);
}
}
}
}
}
.record-list {
height: calc(100% - #{toRpx(248)});
position: relative;
z-index: 4;
.coupon-list {
display: flex;
flex-wrap: wrap;
gap: toRpx(48) toRpx(60);
padding-left: toRpx(80);
}
.expired-bg {
background: url('../../../../assets/images/point/expired-bg.png') no-repeat;
}
.unclaimed-bg {
background: url('../../../../assets/images/point/unclaimed-bg.png') no-repeat;
}
.claimed-bg {
background: url('../../../../assets/images/point/claimed-bg.png') no-repeat;
}
.coupon-bg {
width: toRpx(452);
height: toRpx(536);
background-size: 100%;
.coupon-img {
display: flex;
align-items: center;
justify-content: center;
background-color: #fff;
width: toRpx(152);
height: toRpx(152);
margin: toRpx(40) auto;
border-radius: toRpx(32);
.img {
width: toRpx(152);
height: toRpx(152);
}
}
.coupon-info {
margin-top: toRpx(68);
padding: toRpx(0) toRpx(40);
.coupon-name {
// width: toRpx(372);
font-weight: 500;
font-size: toRpx(28);
color: #181A1F;
line-height: toRpx(48);
margin-bottom: toRpx(8);
overflow: hidden;
/* 超出部分隐藏 */
white-space: nowrap;
/* 文本不换行 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
.coupon-price,
.coupon-time {
font-size: toRpx(24);
color: #808291;
line-height: toRpx(40);
}
}
.coupon-btn {
margin: toRpx(32) toRpx(96);
width: toRpx(260);
height: toRpx(72);
font-weight: 500;
font-size: toRpx(28);
color: #FFFFFF;
box-shadow: inset 0 0 toRpx(32) 0 #ffffff59;
border-radius: toRpx(16);
text-align: center;
line-height: toRpx(72);
}
.gray-name {
color: #808291;
}
.gray-text {
color: #A2A2A8;
}
.red {
background-image: linear-gradient(180deg, #FF8243 0%, #FE4152 46%, #FE5496 100%);
}
.blue {
background-image: linear-gradient(180deg, #61C0FF 0%, #2C66F7 100%);
}
.gray {
background: #DCDCE0;
}
}
}
.tabs-bottom {
background: #fff;
height: toRpx(48);
position: relative;
z-index: 3;
border-radius: 24px 24px 0 0;
position: absolute;
width: 100%;
top: toRpx(128);
}
.table-box {
height: 100%;
background: #ffffffe6;
......@@ -216,10 +549,12 @@ export default {
/* 防止边框合并 */
border-spacing: 0;
border: none;
.th {
position: sticky;
top: 0;
}
/* 单元格之间没有间距 */
tr {
border: none;
......@@ -263,24 +598,33 @@ export default {
color: #333333;
text-align: left;
padding: 20rpx 40rpx;
text {
color: #c8c8cc;
}
ul {
width: 100%;
padding: 0;
li {
list-style: none; /* 移除默认的列表样式 */
list-style: none;
/* 移除默认的列表样式 */
font-size: 26rpx;
color: #333333;
line-height: 46rpx;
&::before {
content: '•'; /* 使用Unicode字符作为点 */
color: #a2a2a8; /* 设置点的颜色 */
margin-right: 12rpx; /* 设置点与文字的间距 */
content: '•';
/* 使用Unicode字符作为点 */
color: #a2a2a8;
/* 设置点的颜色 */
margin-right: 12rpx;
/* 设置点与文字的间距 */
}
}
}
&.line {
border-bottom: 16rpx solid #fff;
}
......@@ -295,16 +639,20 @@ export default {
}
}
}
.level-box {
height: calc(50vh - #{toRpx(136)});
display: flex;
&:first-child {
margin-bottom: toRpx(48);
}
.level-logo {
.sprite-icon {
transform: scale(0.8);
}
.level-title {
font-weight: 600;
font-size: toRpx(36);
......@@ -316,6 +664,7 @@ export default {
margin-top: toRpx(16);
}
}
.level-desc {
height: 100%;
background: #ffffffe6;
......@@ -327,10 +676,12 @@ export default {
grid-template-columns: repeat(3, 1fr);
gap: toRpx(64);
padding: toRpx(56) toRpx(48);
.level-item {
background: #f7f7f7;
border-radius: toRpx(36);
position: relative;
.my-level {
position: absolute;
width: toRpx(154);
......@@ -338,6 +689,7 @@ export default {
top: -4rpx;
left: -4rpx;
}
.item-name {
font-size: toRpx(40);
color: #a2a2a8;
......@@ -346,14 +698,17 @@ export default {
top: toRpx(80);
font-weight: 600;
}
.star-logo {
margin-top: toRpx(44);
text-align: center;
image {
width: toRpx(168);
height: toRpx(168);
}
}
.star-coupon {
position: absolute;
bottom: toRpx(38);
......@@ -361,6 +716,7 @@ export default {
display: flex;
justify-content: center;
width: 100%;
.coupon-box {
width: toRpx(424);
height: toRpx(96);
......@@ -370,6 +726,7 @@ export default {
justify-content: space-between;
padding: 0 toRpx(32);
z-index: 0;
image {
position: absolute;
left: 0;
......@@ -378,22 +735,27 @@ export default {
height: toRpx(96);
z-index: -1;
}
.coupon-title {
font-size: toRpx(28);
color: #5c3537;
&.grey {
color: #fdfdff;
}
}
.coupon-num {
font-size: toRpx(28);
color: #db832c;
&.grey {
color: #fdfdff;
}
}
}
}
.star-name {
text-align: center;
font-size: toRpx(40);
......@@ -401,40 +763,49 @@ export default {
margin-top: toRpx(4);
color: #292d33;
font-weight: 600;
&.grey {
color: #a2a2a8;
}
}
.star-desc {
font-size: toRpx(24);
color: #181a1f;
text-align: center;
line-height: toRpx(60);
&.grey {
color: #a2a2a8;
}
}
.item-logo {
position: absolute;
top: toRpx(0);
right: toRpx(32);
image {
width: toRpx(184);
}
}
.item-desc {
padding-left: toRpx(40);
font-size: toRpx(24);
&.grey {
color: #a2a2a8;
}
}
.item-footer {
position: absolute;
left: 0;
bottom: toRpx(26);
width: 100%;
}
.item-detail {
width: calc(100% - #{toRpx(48)});
box-sizing: border-box;
......@@ -444,6 +815,7 @@ export default {
margin: toRpx(16) toRpx(24);
padding: toRpx(12) toRpx(0);
color: #a2a2a8;
.item-coupon {
position: relative;
font-size: toRpx(24);
......@@ -455,4 +827,325 @@ export default {
}
}
}
.nothing {
width: 100%;
flex-direction: column;
margin-top: toRpx(112);
font-size: toRpx(28);
color: #999999;
.icon {
width: toRpx(678);
height: toRpx(284);
margin-bottom: toRpx(24);
}
}
// 弹窗
.coupon-pop {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .7);
z-index: 11;
height: 100vh;
.pop-box {
position: relative;
width: toRpx(1040);
// height: toRpx(1036);
// background-color: #fff;
border-radius: toRpx(64);
.coupon-card {
// background-color: #fff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
width: 100%;
position: relative;
overflow: hidden;
}
.coupon-header {
display: flex;
align-items: center;
padding: toRpx(28) toRpx(80) toRpx(52);
height: toRpx(292);
background-image: linear-gradient(104deg, #FFF2D0 0%, #FFF7E3 31%, #FCE5E6 85%, #FBDCE7 100%);
-webkit-mask: radial-gradient(circle at 12px 12px, transparent 12px, red 12px) -12px -12px;
-webkit-mask-position: -12px -24px;
border-radius: toRpx(64);
&.detail-header {
background-image: linear-gradient(104deg, #DBEBFF 0%, #F1F5FD 39%, #E2F2FE 82%, #D1F0FF 100%);
}
.header-img {
width: toRpx(200);
height: toRpx(200);
background: #FFFFFF;
border-radius: toRpx(32);
img {
width: toRpx(200);
height: toRpx(200);
}
}
h3 {
margin: 0;
font-size: toRpx(36);
margin-bottom: toRpx(56);
}
p {
margin-top: toRpx(5);
color: #808291;
}
.coupon-base-info {
margin-left: toRpx(40);
}
}
.coupon-line {
margin-top: toRpx(-24);
height: toRpx(50);
background-color: #fff;
-webkit-mask: radial-gradient(circle at 12px 12px, transparent 12px, red 12px) 12px 12px;
-webkit-mask-position: -12px -12px;
}
.coupon-body {
margin-top: toRpx(-24);
background-color: #fff;
padding: toRpx(20) toRpx(80);
border-radius: 0 0 toRpx(32) toRpx(32);
.coupon-qr {
text-align: center;
.coupon-tips {
display: flex;
align-items: center;
justify-content: center;
color: #EF6F2C;
font-size: toRpx(28);
}
.coupon-qrcode {
width: 100%;
// width: toRpx(544);
height: toRpx(322);
margin: toRpx(56) 0;
}
}
}
.store-info {
display: flex;
align-items: center;
margin-bottom: toRpx(24);
background-image: linear-gradient(90deg, #ffffff99 0%, #ffffffeb 23%, #F5F7FA 100%);
border-radius: toRpx(16);
padding: toRpx(16) toRpx(32);
.store-label {
margin-left: toRpx(8);
font-weight: 500;
font-size: toRpx(28);
color: #020305;
line-height: toRpx(40);
}
.store-address {
margin-left: toRpx(32);
font-size: toRpx(28);
}
}
.icon-store {
display: inline-block;
width: 20px;
height: 20px;
background-color: #ffcc00;
border-radius: 50%;
margin-right: 10px;
}
.store-info p {
margin: 0;
}
.notice-title {
display: flex;
align-items: center;
font-size: toRpx(28);
color: #020305;
margin-bottom: toRpx(16);
}
.usage-notice {
background-color: #F5F7FA;
padding: toRpx(24) toRpx(32);
border-radius: toRpx(24);
&.claimed-usage {
margin-bottom: toRpx(56);
}
}
.claimed-notice {
height: toRpx(284);
overflow-y: auto;
}
.usage-notice {
.m-l-8 {
margin-left: toRpx(8);
}
}
.usage-notice ol {
padding-left: toRpx(40);
.first-li {
color: #EF6F2C;
}
}
.usage-notice li {
margin-bottom: toRpx(10);
color: #808291;
}
.coupon-footer {
display: flex;
justify-content: center;
padding: toRpx(48) 0 toRpx(64);
}
.claim-button {
background-image: linear-gradient(107deg, #FD8442 0%, #FE3D3E 51%, #FE5495 100%);
box-shadow: 0 toRpx(24) toRpx(20) toRpx(-16) #ff2e5580;
border-radius: toRpx(24);
color: #fff;
border: none;
padding: toRpx(18) toRpx(116);
font-weight: 500;
font-size: toRpx(40);
}
.close-box {
position: absolute;
right: toRpx(-160);
top: 0;
width: toRpx(74);
height: toRpx(74);
border: 1px solid #fff;
border-radius: 50%;
color: #fff;
text-align: center;
box-sizing: content-box;
.close-btn {
font-weight: 100;
font-size: toRpx(70);
line-height: toRpx(72);
}
}
}
}
// 领取弹窗样式
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 11;
.dailog-box {
position: fixed;
left: 50%;
top: 50%;
width: 50%;
transform: translate(-50%, -50%);
background: #fff;
background-image: linear-gradient(179deg, #d6e9ff 12%, #ffffff 100%);
/* 顶部渐变和底部白色 */
background-size:
100% 110rpx,
100% calc(100% - 110rpx);
/* 分别设置渐变和白色的背景大小 */
background-repeat: no-repeat, no-repeat;
/* 确保背景不重复 */
background-position: top, bottom;
/* 分别设置渐变和白色的位置 */
border-radius: 48rpx;
.dailog-close {
text-align: right;
margin-right: 48rpx;
margin-top: 48rpx;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
.dailog-title {
font-size: 40rpx;
color: #1a1a1a;
text-align: center;
margin-top: 40rpx;
}
.dailog-content {
font-size: 32rpx;
color: #808291;
text-align: center;
line-height: 46rpx;
margin-top: 16rpx;
padding: 0 64rpx;
.highlight {
display: inline-block;
color: #2C66F7;
}
}
.dailog-footer {
display: flex;
justify-content: center;
margin: 80rpx 0 70rpx;
}
.dailog-btn {
width: 400rpx;
height: 96rpx;
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 16rpx;
text-align: center;
font-size: 36rpx;
color: #ffffff;
line-height: 96rpx;
&.disabled {
background-color: #f0f1f5;
background-image: none;
color: #1a1a1a;
margin-right: 48rpx;
}
}
}
}
</style>
......@@ -44,9 +44,29 @@
<view class="card-top">
<view class="sprite-icon icon-certificate"></view>
<view class="card-title">我的兑换券</view>
<view class="card-wait">敬请期待</view>
<!-- <view class="card-wait">敬请期待</view> -->
<view class="card-number">{{couponList.length}}</view>
<view class="sprite-icon icon-coupon-arrow card-arrow"></view>
</view>
<view class="card-content">
<template v-if="couponList.length > 0">
<view class="coupon-card">
<view v-for="item in couponList" :key="item.id" class="card-bg" :class="item.isclaimed ? 'claimed-bg': 'unclaimed-bg'">
<view class="coupon-img"></view>
<view class="coupon-right">
<view class="coupon-name">{{ item.name }}</view>
<view class="coupon-price">价值¥{{ item.price }}</view>
</view>
</view>
</view>
</template>
<template v-else>
<view class="empty-box">
<image :src="require('@/assets/images/boutique/nothing.png')" mode="heightFix" />
<view class="empty-text">暂无可用卡券</view>
</view>
</template>
</view>
<view class="card-content"></view>
</view>
</view>
<view class="point-right">
......@@ -139,6 +159,26 @@ export default {
{ title: '平板接待精英',medalType: 4, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), }],
myStar: [],
recordList:[{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10}],
couponList: [
{
id: 1,
name: '星巴克中杯全国通兑券星巴克中杯全国通兑券',
price: 45,
isclaimed: true
},
{
id: 2,
name: '星巴克中杯全国通兑券',
price: 45,
isclaimed: false
},
{
id: 3,
name: '星巴克中杯全国通兑券星巴克中杯全国通兑券',
price: 45,
isclaimed: false
}
]
}
},
inject: ['showPage'],
......@@ -213,15 +253,34 @@ export default {
padding: toRpx(76) toRpx(64) toRpx(48);
}
&.coupon-box {
background-image: url('../../../../assets//images/point/ticket_bg.png');
background-size: 100% 100%;
border: none;
background-color: transparent;
box-shadow: none;
// background-image: url('../../../../assets//images/point/ticket_bg.png');
// background-size: 100% 100%;
// border: none;
// background-color: transparent;
// box-shadow: none;
height: calc(100vh - #{toRpx(1118)});
.card-title {
font-size: toRpx(36);
color: #ffffff !important;
color: #1A1A1A !important;
}
.card-number {
font-weight: 700;
font-size: toRpx(80);
color: #FA9D23;
margin-left: auto;
}
.card-arrow {
margin-left: toRpx(24);
}
.empty-box {
text-align: center;
image {
height: toRpx(208);
}
.empty-text {
font-size: toRpx(26);
color: #808291;
}
}
.card-wait {
width: toRpx(144);
......@@ -238,6 +297,7 @@ export default {
.card-top {
display: flex;
line-height: toRpx(64);
align-items: center;
.card-logo {
width: toRpx(64);
height: toRpx(64);
......@@ -280,7 +340,50 @@ export default {
}
}
.card-content {
margin-top: toRpx(40);
.coupon-card {
margin-top: toRpx(48);
display: flex;
.card-bg {
display: flex;
align-items: center;
width: toRpx(356);
height: toRpx(188);
margin-right: toRpx(40);
padding: toRpx(32) toRpx(24);
}
.claimed-bg {
background: url(../../../../assets//images/boutique/coupon-1.png) no-repeat;
background-size: 100% 100%;
}
.unclaimed-bg {
background: url(../../../../assets//images/boutique/coupon-2.png) no-repeat;
background-size: 100% 100%;
}
.coupon-img {
background-color: #fff;
width: toRpx(88);
height: toRpx(112);
border-radius: toRpx(16);
}
.coupon-right {
margin-left: toRpx(24);
.coupon-name {
width: toRpx(196);
font-size: toRpx(28);
color: #181A1F;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.coupon-price {
margin-top: toRpx(16);
font-size: toRpx(26);
color: #4D9CFB;
}
}
}
&.day-rate {
font-size: toRpx(80);
color: #4673ff;
......
import { getTime } from './util'
import { serializeIfObject } from '../utils'
class LogCat {
main = plus.android.runtimeMainActivity()
File = plus.android.importClass('java.io.File')
Environment = plus.android.importClass('android.os.Environment')
BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// BufferedReader = plus.android.importClass('java.io.BufferedReader')
// FileInputStream = plus.android.importClass('java.io.FileInputStream')
// InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
LogPath = ''
// main = plus.android.runtimeMainActivity()
// File = plus.android.importClass('java.io.File')
// Environment = plus.android.importClass('android.os.Environment')
// BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
// FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
// OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// // BufferedReader = plus.android.importClass('java.io.BufferedReader')
// // FileInputStream = plus.android.importClass('java.io.FileInputStream')
// // InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
// LogPath = ''
constructor(folderName = '_zyzs_log') {
if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
} else {
this.LogPath = this.main.getFilesDir().getPath() + folderName
}
console.log('日志文件存放路径->', this.LogPath)
// if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
// this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
// } else {
// this.LogPath = this.main.getFilesDir().getPath() + folderName
// }
// console.log('日志文件存放路径->', this.LogPath)
}
writeLog(tag, messages) {
let msg = serializeIfObject(messages)
let date = getTime('YYYY-MM-DD')
let datetime = getTime()
//文件名
let fileName = this.LogPath + '/' + date + '.txt'
//写入的内容
let content = `${datetime} [${tag}] : ${msg}\n`
console.log(content.replace(/\n/g, ''))
let path = new this.File(this.LogPath)
if (!path.exists()) {
path.mkdirs() //创建父路径
}
let fos = null
let bw = null
try {
fos = new this.FileOutputStream(fileName, true)
bw = new this.BufferedWriter(new this.OutputStreamWriter(fos))
//bw.write(log);
bw.append(content)
} catch (e) {
console.log('e->', e)
} finally {
try {
if (bw != null) {
bw.close() //关闭缓冲流
fos.close() //关闭文件输出流
}
} catch (closeEx) {
console.log('closeEx->', closeEx)
}
}
// let msg = serializeIfObject(messages)
// let date = getTime('YYYY-MM-DD')
// let datetime = getTime()
// //文件名
// let fileName = this.LogPath + '/' + date + '.txt'
// //写入的内容
// let content = `${datetime} [${tag}] : ${msg}\n`
// console.log(content.replace(/\n/g, ''))
// let path = new this.File(this.LogPath)
// if (!path.exists()) {
// path.mkdirs() //创建父路径
// }
// let fos = null
// let bw = null
// try {
// fos = new this.FileOutputStream(fileName, true)
// bw = new this.BufferedWriter(new this.OutputStreamWriter(fos))
// //bw.write(log);
// bw.append(content)
// } catch (e) {
// console.log('e->', e)
// } finally {
// try {
// if (bw != null) {
// bw.close() //关闭缓冲流
// fos.close() //关闭文件输出流
// }
// } catch (closeEx) {
// console.log('closeEx->', closeEx)
// }
// }
}
// 删除日志
removeLogFile(fileName) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!