Commit 821ac198 by 前端

权限

1 parent dc7d1f6d
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-13 11:09:59
* @LastEditTime: 2025-03-07 16:28:37
* @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -45,7 +45,8 @@ module.exports = {
...data
})
},
/**积分首页 */ getPoint(data) {
/**积分首页 */
getPoint(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.home.page',
projectName: 'boutique',
......

26.9 KB | W: | H:

89.7 KB | W: | H:

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

958 Bytes | W: | H:

6.14 KB | W: | H:

assets/images/point/coupon_grey.png
assets/images/point/coupon_grey.png
assets/images/point/coupon_grey.png
assets/images/point/coupon_grey.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-02-28 14:01:01
* @LastEditTime: 2025-03-10 15:56:08
-->
<template>
<view class="point-box">
......@@ -35,7 +35,7 @@
<view class="level-title">成长勋章</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="level-item" :style="badgeList.includes(item.medalType) || isHigh ? item.style : ''" v-for="(item, index) in couponList" :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>
......@@ -44,7 +44,7 @@
<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="{ 'coupon-num': true, grey: !badgeList.includes(item.medalType) && !isHigh }">{{ item.couponCount }}张</view>
</view>
</view>
</view>
......@@ -86,10 +86,11 @@ export default {
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张' }
{ 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名' },
{ title: '全勤之星', style: 'background: #FFFAED;', medalType: 2, logo: require('@/assets/images/point/time_star.png'), logo_grey: require('@/assets/images/point/time_grey.png'), content: '当月全勤准时打卡,不包含请假特批' },
{ title: '平板接待精英', style: 'background: #FFFAED;', medalType: 3, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), content: '平板接待月度无扣分记录' }
],
couponList: [],
badgeList: [],
tabelTh: [{ title: '积分区间', width: 8 }],
tabelTr: [{ content: '奖惩规则(每月)' }]
......@@ -113,6 +114,19 @@ export default {
this.getRule(1)
this.getRule(2)
this.getBadgeList(countDate)
this.getCouponList(countDate)
},
getCouponList(date) {
let [year, month] = date.split('-')
month = month.padStart(2, '0')
const countDate = `${year}-${month}`
uni.$api.pointApi.getPoint({ countDate }).then(res => {
const badgeList = res.badgeList || []
this.couponList = this.groupList.map(item => {
const findData = badgeList.find(i => i.medalType == item.medalType)
return { ...item, ...findData }
})
})
},
getBadgeList(countDate) {
uni.$api.pointApi.badgeList({ countDate }).then(res => {
......@@ -139,6 +153,7 @@ export default {
},
updateDetail(countDate) {
this.getBadgeList(countDate)
this.getCouponList(countDate)
}
}
}
......@@ -352,8 +367,8 @@ export default {
justify-content: center;
width: 100%;
.coupon-box {
width: toRpx(424);
height: toRpx(96);
width: toRpx(504);
height: toRpx(112);
position: relative;
display: flex;
align-items: center;
......@@ -364,13 +379,14 @@ export default {
position: absolute;
left: 0;
top: 0;
width: toRpx(424);
height: toRpx(96);
width: toRpx(504);
height: toRpx(112);
z-index: -1;
}
.coupon-title {
font-size: toRpx(28);
color: #5c3537;
width: toRpx(260);
&.grey {
color: #fdfdff;
}
......
......@@ -56,8 +56,8 @@
<image mode="aspectFit" :src="item.couUrl || require('@/assets/images/point/default-coupon.png')" alt="" />
</view>
<view class="coupon-right">
<view :class="['coupon-name', item.couponState == 2 ? 'unclaimed-name':'']">{{ item.couponName }}</view>
<view :class="['coupon-price', item.couponState == 2 ? 'unclaimed-price':'']">价值¥{{ item.lineationPrice }}</view>
<view :class="['coupon-name', item.couponState == 2 ? 'unclaimed-name' : '']">{{ item.couponName }}</view>
<view :class="['coupon-price', item.couponState == 2 ? 'unclaimed-price' : '']">价值¥{{ item.lineationPrice }}</view>
</view>
</view>
</view>
......@@ -83,7 +83,7 @@
</view>
<view class="card-content day-rate">
{{ pointDetail.done }}
<text>/{{ pointDetail.done + pointDetail.todo }}</text>
<text>/{{ pointDetail.todo ? pointDetail.done + pointDetail.todo : 0 }}</text>
</view>
<view class="process-box">
<view class="process-inter" :style="{ width: (100 * pointDetail.done) / (pointDetail.done + pointDetail.todo) + '%' }"></view>
......@@ -376,7 +376,7 @@ export default {
width: toRpx(88);
height: toRpx(112);
border-radius: toRpx(16);
}
}
}
.coupon-right {
margin-left: toRpx(24);
......@@ -390,7 +390,7 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
&.unclaimed-name {
color: #5C3537
color: #5c3537;
}
}
.coupon-price {
......@@ -398,7 +398,7 @@ export default {
font-size: toRpx(26);
color: #4d9cfb;
&.unclaimed-price {
color: #DB832C;
color: #db832c;
}
}
}
......
......@@ -47,7 +47,9 @@
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!