Commit e0fb8d86 by huyue

提交兑换券

1 parent d829d7c5

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 { ...@@ -103,6 +103,7 @@ export default {
}) })
}, },
handleGo(val) { handleGo(val) {
console.log(val);
this.selectItem = val this.selectItem = val
if (val.jump) { if (val.jump) {
this.timer = setInterval(() => { this.timer = setInterval(() => {
......
...@@ -44,9 +44,29 @@ ...@@ -44,9 +44,29 @@
<view class="card-top"> <view class="card-top">
<view class="sprite-icon icon-certificate"></view> <view class="sprite-icon icon-certificate"></view>
<view class="card-title">我的兑换券</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>
<view class="card-content"></view>
</view> </view>
</view> </view>
<view class="point-right"> <view class="point-right">
...@@ -139,6 +159,26 @@ export default { ...@@ -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'), }], { title: '平板接待精英',medalType: 4, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), }],
myStar: [], 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}], 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'], inject: ['showPage'],
...@@ -213,15 +253,34 @@ export default { ...@@ -213,15 +253,34 @@ export default {
padding: toRpx(76) toRpx(64) toRpx(48); padding: toRpx(76) toRpx(64) toRpx(48);
} }
&.coupon-box { &.coupon-box {
background-image: url('../../../../assets//images/point/ticket_bg.png'); // background-image: url('../../../../assets//images/point/ticket_bg.png');
background-size: 100% 100%; // background-size: 100% 100%;
border: none; // border: none;
background-color: transparent; // background-color: transparent;
box-shadow: none; // box-shadow: none;
height: calc(100vh - #{toRpx(1118)}); height: calc(100vh - #{toRpx(1118)});
.card-title { .card-title {
font-size: toRpx(36); 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 { .card-wait {
width: toRpx(144); width: toRpx(144);
...@@ -238,6 +297,7 @@ export default { ...@@ -238,6 +297,7 @@ export default {
.card-top { .card-top {
display: flex; display: flex;
line-height: toRpx(64); line-height: toRpx(64);
align-items: center;
.card-logo { .card-logo {
width: toRpx(64); width: toRpx(64);
height: toRpx(64); height: toRpx(64);
...@@ -280,7 +340,50 @@ export default { ...@@ -280,7 +340,50 @@ export default {
} }
} }
.card-content { .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 { &.day-rate {
font-size: toRpx(80); font-size: toRpx(80);
color: #4673ff; color: #4673ff;
......
import { getTime } from './util' import { getTime } from './util'
import { serializeIfObject } from '../utils' import { serializeIfObject } from '../utils'
class LogCat { class LogCat {
main = plus.android.runtimeMainActivity() // main = plus.android.runtimeMainActivity()
File = plus.android.importClass('java.io.File') // File = plus.android.importClass('java.io.File')
Environment = plus.android.importClass('android.os.Environment') // Environment = plus.android.importClass('android.os.Environment')
BufferedWriter = plus.android.importClass('java.io.BufferedWriter') // BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
FileOutputStream = plus.android.importClass('java.io.FileOutputStream') // FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter') // OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// BufferedReader = plus.android.importClass('java.io.BufferedReader') // // BufferedReader = plus.android.importClass('java.io.BufferedReader')
// FileInputStream = plus.android.importClass('java.io.FileInputStream') // // FileInputStream = plus.android.importClass('java.io.FileInputStream')
// InputStreamReader = plus.android.importClass('java.io.InputStreamReader') // // InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
LogPath = '' // LogPath = ''
constructor(folderName = '_zyzs_log') { constructor(folderName = '_zyzs_log') {
if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) { // if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName // this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
} else { // } else {
this.LogPath = this.main.getFilesDir().getPath() + folderName // this.LogPath = this.main.getFilesDir().getPath() + folderName
} // }
console.log('日志文件存放路径->', this.LogPath) // console.log('日志文件存放路径->', this.LogPath)
} }
writeLog(tag, messages) { writeLog(tag, messages) {
let msg = serializeIfObject(messages) // let msg = serializeIfObject(messages)
let date = getTime('YYYY-MM-DD') // let date = getTime('YYYY-MM-DD')
let datetime = getTime() // let datetime = getTime()
//文件名 // //文件名
let fileName = this.LogPath + '/' + date + '.txt' // let fileName = this.LogPath + '/' + date + '.txt'
//写入的内容 // //写入的内容
let content = `${datetime} [${tag}] : ${msg}\n` // let content = `${datetime} [${tag}] : ${msg}\n`
console.log(content.replace(/\n/g, '')) // console.log(content.replace(/\n/g, ''))
let path = new this.File(this.LogPath) // let path = new this.File(this.LogPath)
if (!path.exists()) { // if (!path.exists()) {
path.mkdirs() //创建父路径 // path.mkdirs() //创建父路径
} // }
let fos = null // let fos = null
let bw = null // let bw = null
try { // try {
fos = new this.FileOutputStream(fileName, true) // fos = new this.FileOutputStream(fileName, true)
bw = new this.BufferedWriter(new this.OutputStreamWriter(fos)) // bw = new this.BufferedWriter(new this.OutputStreamWriter(fos))
//bw.write(log); // //bw.write(log);
bw.append(content) // bw.append(content)
} catch (e) { // } catch (e) {
console.log('e->', e) // console.log('e->', e)
} finally { // } finally {
try { // try {
if (bw != null) { // if (bw != null) {
bw.close() //关闭缓冲流 // bw.close() //关闭缓冲流
fos.close() //关闭文件输出流 // fos.close() //关闭文件输出流
} // }
} catch (closeEx) { // } catch (closeEx) {
console.log('closeEx->', closeEx) // console.log('closeEx->', closeEx)
} // }
} // }
} }
// 删除日志 // 删除日志
removeLogFile(fileName) { removeLogFile(fileName) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!