Commit 519bf1f3 by 李伟康

Merge branch 'SAAS+V4.49' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.49

2 parents e3510914 e6ce6076
Showing 47 changed files with 996 additions and 87 deletions
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-19 11:02:25
* @LastEditTime: 2025-01-08 15:20:30
* @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -44,12 +44,20 @@ module.exports = {
projectName: 'boutique',
...data
})
} /**积分首页 */,
getPoint(data) {
},
/**积分首页 */ getPoint(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.home.page',
projectName: 'boutique',
...data
})
},
/**积分奖励规则 */
rewardRule(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.reward.rule',
projectName: 'boutique',
...data
})
}
}

1.27 MB | W: | H:

7.47 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 10:31:49
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-09 18:26:55
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Dailog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="dailog-panel">
<view class="dailog-box" :style="{ width: width }">
<view class="dailog-header flex">
<view :class="`sprite-icon icon-${icon}`" v-if="icon"></view>
<view class="sprite-icon icon-income-count" v-else></view>
<view class="dailog-title">{{ title }}</view>
<view class="dailog-close" @click="close"><uni-icons type="closeempty" size="20"></uni-icons></view>
</view>
<slot name="content" />
<slot name="footer" />
</view>
</view>
</template>
<script>
export default {
props: {
width: {
type: String,
default: '1040rpx'
},
icon: String,
title: String
},
data() {
return {
show: '',
selectItem: {
title: '权益提成',
content: '权益提成 = 权益产值 × 提成系数 × 提成比例',
desc: '提成比例'
}
}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
.dailog-box {
position: fixed;
left: 50%;
top: 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;
padding-bottom: 96rpx;
.dailog-header {
padding: 40rpx 48rpx;
.dailog-title {
font-size: 40rpx;
color: #1a1a1a;
font-weight: 600;
margin-top: -4rpx;
}
.dailog-close {
margin-left: auto;
text-align: right;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
}
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-07 13:57:40
* @LastEditTime: 2025-01-08 10:44:53
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -15,22 +15,226 @@
<view class="title"><text>历史收入记录</text></view>
</view>
<view class="history-box">
<view class="chart-box"></view>
<view class="income-box"></view>
<view class="chart-box">
<view class="chart-header">
<text class="year-text">2025年</text>
<view class="sprite-icon icon-tips-g"></view>
<text>点击柱形图切换月份</text>
</view>
<view id="mycan">
<canvas canvas-id="DataCanvas" class="canvas-box" @touchstart="handleCanvasClick"></canvas>
</view>
</view>
<view class="income-box">
<view class="income-header">
<text>2024年8月收入</text>
</view>
<view class="income-tips">
<view class="sprite-icon icon-tips-b"></view>
<text>以下未包括 个人所得税、社保等事项</text>
</view>
<view class="income-list">
<view class="income-item" v-for="(item, index) in caseList" :key="index">
<view class="item-label" @click="handleShow(item)">{{ item.title }}</view>
<uni-icons type="help" size="18" color="#A2A2A8"></uni-icons>
<view class="item-price">{{ item.price }}</view>
<view class="item-expand"></view>
</view>
</view>
<view class="income-footer">
<view class="footer-label">当月收入</view>
<view class="footer-price">
<text>¥</text>
23,746.60
</view>
</view>
</view>
</view>
<Tips @close="show = false" v-if="show">
<view class="dailog-body" slot="content">
<view class="dailog-content">6</view>
<view class="dailog-desc">6</view>
</view>
<template slot="footer">
<view class="dailog-footer">
<view class="dailog-btn">再测一次</view>
<view class="dailog-btn disabled">关闭</view>
</view>
</template>
</Tips>
</view>
</template>
<script>
import Tips from './Dailog.vue'
export default {
components: {
Tips
},
data() {
return {}
return {
title: '学习数据',
show: false,
canvasList: [
{ date: '1月', num: 0 },
{ date: '2月', num: 24 },
{ date: '3月', num: 100 },
{ date: '4月', num: 45 },
{ date: '5月', num: 15 },
{ date: '6月', num: 54 },
{ date: '7月', num: 10 },
{ date: '8月', num: 10 },
{ date: '9月', num: 10 },
{ date: '10月', num: 10 },
{ date: '11月', num: 10 },
{ date: '12月', num: 10 }
],
caseList: [
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
}
],
width: 600,
height: 420,
canPersent: [], //百分比数组
listIndex: 0,
navList: ['最近七天', '最近七个月']
}
},
methods: {}
mounted() {
const query = uni.createSelectorQuery().in(this)
query
.select('.canvas-box')
.boundingClientRect(data => {
this.width = data.width
this.height = data.height - 60
this.showChart()
})
.exec()
},
methods: {
handleShow(item) {
this.selectItem = item
this.show = true
},
back() {},
handleCanvasClick(e) {
// 获取点击位置
},
// 坐标图
showChart() {
const ctx = uni.createCanvasContext('DataCanvas')
ctx.lineWidth = 1
// 横坐标
ctx.beginPath() //新建一条path
ctx.setStrokeStyle('#c6c6c6')
ctx.moveTo(20, this.height) //把画笔移动到指定的坐标
// ctx.lineTo(this.width, this.height) //绘制一条从当前位置到指定坐标(200, 50)的直线.
ctx.closePath() //闭合路径。会拉一条从当前点到path起始点的直线。如果当前点与起始点重合,则什么都不做
ctx.stroke() //绘制路径。
// 纵坐标
ctx.beginPath()
ctx.moveTo(20, 0)
// ctx.lineTo(20, this.height)
ctx.closePath()
ctx.stroke()
var max = 0 //最大值
// 找到最大的数
for (var i = 0; i < this.canvasList.length; i++) {
if (this.canvasList[i].num >= max) {
max = this.canvasList[i].num
}
}
console.log('max---->', max)
// 计算百分比: 以数组中最大的为100%,来计算其他的百分比
for (var i = 0; i < this.canvasList.length; i++) {
this.canPersent[i] = (this.canvasList[i].num / max) * (this.height - 40) // -10 ,防止太高溢出头
}
console.log(this.canPersent)
// 柱状图之间的间隔
// 绘制7个粗线条 (300-20)/7 = 40,所以 i 每次要加上40 20为左右间隔
var gap = this.width / this.canPersent.length
console.log('--gap----->', gap)
for (var i = 0; i < this.canPersent.length; i++) {
// 横坐标的数据
ctx.fillText(this.canvasList[i].date, 30 + gap * i, this.height + 10)
// 柱状图上的数据
this.canvasList[i].num && ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
if (this.canPersent[i] == 0) {
i++
ctx.fillText(this.canvasList[i].date, 30 + gap * i, this.height + 10)
this.canvasList[i].num && ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
}
ctx.beginPath()
ctx.setStrokeStyle(i == 1 ? 'rgba(44, 102, 247, 1)' : 'rgba(44, 102, 247, 0.2)') //设置柱状图颜色
ctx.moveTo(40 + gap * i, this.height - this.canPersent[i] - 6)
ctx.lineTo(40 + gap * i, this.height - 6)
ctx.lineWidth = 10
ctx.lineCap = 'round' //设置线条样式
ctx.stroke()
}
ctx.draw()
}
}
}
</script>
<style scoped lang="scss">
#mycan {
margin: 20px;
}
.canvas-box {
height: calc(100vh - 520rpx);
width: 100%;
}
.navTab {
display: flex;
justify-content: space-evenly;
margin: 3px 0;
}
.activite {
color: #fc722d;
padding: 3px 0;
border-bottom: 3px #fc722d solid;
}
.nav-bar {
width: 100%;
height: 96rpx;
......@@ -66,6 +270,19 @@ export default {
background: #ffffff;
border-radius: 48rpx;
flex: 1;
padding: 64rpx;
.chart-header {
font-size: 24rpx;
color: #808291;
display: flex;
align-items: center;
.year-text {
font-weight: 600;
color: rgb(26, 26, 26);
font-size: 64rpx;
margin-right: 36rpx;
}
}
}
.income-box {
background-image: linear-gradient(180deg, #faf9f7 0%, #ffffff 28%);
......@@ -74,6 +291,79 @@ export default {
border-radius: 48rpx;
width: 648rpx;
margin-left: 48rpx;
padding: 56rpx 64rpx;
box-sizing: border-box;
.income-header {
font-size: 36rpx;
color: #1a1a1a;
font-weight: 600;
display: flex;
align-items: center;
}
.income-tips {
font-size: 24rpx;
color: #2c66f7;
display: flex;
align-items: center;
margin: 44rpx 0 74rpx;
}
.income-list {
height: calc(100% - 254rpx);
.income-item {
height: 80rpx;
display: flex;
align-items: center;
padding: 0 20rpx 0rpx 32rpx;
.item-label {
font-size: 26rpx;
color: #181a1f;
margin-right: 6rpx;
}
.item-price {
font-size: 30rpx;
color: #181a1f;
margin-left: auto;
}
.item-expand {
margin-left: 24rpx;
width: 0;
height: 0;
border-left: 14rpx solid transparent;
border-right: 14rpx solid transparent;
border-top: 14rpx solid #808291; /* 箭头颜色 */
}
}
}
.income-footer {
display: flex;
justify-content: space-between;
padding: 0 20rpx;
.footer-label {
font-size: 26rpx;
color: #181a1f;
}
.footer-price {
font-size: 40rpx;
color: #181a1f;
text {
font-size: 28rpx;
}
}
}
}
}
.dailog-content {
font-size: 32rpx;
color: #1a1a1a;
line-height: 52rpx;
padding: 0 120rpx 0 152rpx;
margin-top: 32rpx;
}
.dailog-desc {
font-size: 32rpx;
color: #808291;
padding: 0 120rpx 0 152rpx;
margin-top: 32rpx;
line-height: 48rpx;
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 10:31:49
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-09 11:40:02
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Dailog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="dailog-panel">
<view class="dailog-box">
<view class="dailog-left flex-center">
<view class="sprite-icon icon-locker-icon"></view>
</view>
<view class="dailog-right">
<view class="dailog-close" @click="close"><uni-icons type="closeempty" size="20"></uni-icons></view>
<view class="password-title flex">
<text>{{ passwordInfo.title }}</text>
<view :class="`sprite-icon icon-${passwordInfo.icon}`"></view>
</view>
<view class="password-tips">{{ passwordInfo.tips }}</view>
<view class="verify-box" v-if="passwordInfo.type == 'reset'">
<view class="verify-title flex-between">
<text>接收验证码手机号码:{{ phone | formatPhone }}</text>
<view :class="['verify-btn', `${count ? 'code-disabled' : ''}`]" @click="getSmsCode">{{ count ? `重新发送(${count}s)` : '发送验证码' }}</view>
</view>
<view class="verify-input flex">
<text>验证码:</text>
<input type="number" maxlength="6" />
</view>
</view>
<view class="password-warn" v-if="passwordInfo.warn">{{ passwordInfo.warn }}</view>
<view class="password-body flex">
<view class="password-input" v-for="(input, index) in passwords" :key="index">
<input type="number" :ref="'input' + index" v-model="passwords[index]" @input="handleInput(index)" @keydown="handleKeyUp($event, index)" maxlength="1" :focus="focusedIndex === index" class="password-input-single" />
</view>
</view>
<template v-if="passwordInfo.type == 'set'">
<view class="password-sure">{{ passwordInfo.sure }}</view>
<view class="password-body flex">
<view class="password-input" v-for="(input, index) in passwords" :key="index">
<input type="number" :ref="'input' + index" v-model="passwords[index]" @input="handleInput(index)" @keydown="handleKeyUp($event, index)" maxlength="1" :focus="focusedIndex === index" class="password-input-single" />
</view>
</view>
</template>
<view class="password-change" v-if="passwordInfo.type == 'input'">
<text>忘记密码?</text>
<text class="password-btn">找回密码</text>
</view>
<view class="password-complete" v-if="passwordInfo.complete">{{ passwordInfo.complete }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
passwordInfo: '',
phone: '',
count: 0,
typeList: [
{
type: 'input',
title: '输入隐私密码',
icon: 'eyes-off',
tips: '即将访问个人收入计算模块,请输入隐私密码'
},
{
type: 'set',
title: '设置隐私密码',
icon: 'eyes-off',
tips: '首次访问收入计算模块需要设置6位数字隐私密码。',
warn: '收入计算涉及个人隐私,请勿将密码告知他人。',
sure: '请再次输入以确认',
complete: '完成密码设置'
},
{
type: 'reset',
title: '重置密码',
icon: 'eyes-on',
tips: '通过短信验证码方式重置隐私密码',
complete: '确认重置密码'
}
],
passwords: ['', '', '', '', '', ''], // 初始化6个密码输入框的值为空数组
focusedIndex: 0, // 当前聚焦的输入框索引
stepList: [{ title: '设置隐私密码', content: '首次访问收入计算模块需要设置6位数字隐私密码。', warn: '收入计算涉及个人隐私,请勿将密码告知他人。' }, { title: '请再次输入以确认' }]
}
},
mounted() {
this.passwordInfo = this.typeList[2]
const { phone } = uni.$storage.get('userInfo')
this.phone = phone
},
filters: {
formatPhone(phone) {
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
}
},
methods: {
/**获取验证码 */
async getSmsCode() {
this.countDown(60)
return
const { phone, count } = this
try {
if (count) throw '验证码发送过于频繁,请稍后再试'
uni.showLoading({
mask: true
})
const { code, message } = await uni.$api.userApi.getSmsCode({ phone })
uni.hideLoading()
if (code == '0') {
uni.$logger.local.info(`${phone}发送验证码成功`)
uni.showToast({
title: '验证码已发送',
icon: 'none'
})
this.countDown(60)
} else throw message || '发送验证码失败'
} catch (error) {
uni.$logger.local.info(`${phone}发送验证码失败,失败原因:${error}`)
uni.hideLoading()
uni.showToast({
title: error,
icon: 'none'
})
}
},
/**验证码倒计时 */
countDown(countDown) {
if (countDown) this.count = countDown
setTimeout(() => {
let { count } = this
this.count = --count
if (count > 0) this.countDown()
else this.count = null
}, 1e3)
},
handleInput(index) {
// 当输入框有值时,移动焦点到下一个输入框
if (this.passwords[index]) {
// 如果不是最后一个输入框,则聚焦到下一个输入框
if (index < this.passwords.length - 1) {
this.focusedIndex = index + 1
}
}
},
handleKeyUp(event, index) {
console.log(event, index)
// 检查按下的键是否是删除键(Backspace)
if (event.keyCode === 8) {
// 如果当前输入框为空,并且不是第一个输入框,则将焦点移动到前一个输入框
if (this.passwords[index] === '' && index > 0) {
this.focusedIndex = index - 1
// 清空前一个输入框的内容
this.passwords[index - 1] = ''
}
}
},
close() {
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
.dailog-box {
position: fixed;
left: 50%;
top: 50%;
background: #fff;
transform: translate(-50%, -50%);
border-radius: 48rpx;
display: flex;
.dailog-right {
position: relative;
padding: 128rpx 112rpx;
.dailog-close {
position: absolute;
top: 64rpx;
right: 64rpx;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
.password-title {
font-size: 40rpx;
color: #1a1a1a;
line-height: 56rpx;
text {
margin-right: 10rpx;
}
}
.verify-box {
.verify-title {
font-size: 32rpx;
color: #808291;
margin-top: 10rpx;
.verify-btn {
width: 208rpx;
height: 64rpx;
background: #ffffff;
border: 2rpx solid #2c66f7;
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 12rpx;
font-size: 28rpx;
color: #2c66f7;
text-align: center;
line-height: 60rpx;
&.code-disabled {
color: #9b9b9e;
border: 2rpx solid #9b9b9e;
}
}
}
.verify-input {
font-size: 32rpx;
color: #808291;
margin-top: 40rpx;
input {
width: 392rpx;
height: 104rpx;
background: #f2f4f7;
border-radius: 16rpx;
line-height: 104rpx;
padding-left: 20rpx;
}
}
}
.password-tips {
font-size: 32rpx;
color: #808291;
margin-top: 16rpx;
}
.password-warn {
font-size: 32rpx;
color: #f47f13;
line-height: 46rpx;
}
.password-sure {
font-size: 32rpx;
color: #f47f13;
line-height: 46rpx;
font-size: 32rpx;
color: #1a1a1a;
}
.password-body {
margin: 96rpx 0;
.password-input {
margin-right: 24rpx;
input {
width: 112rpx;
height: 136rpx;
text-align: center;
line-height: 136rpx;
background: #f2f4f7;
border-radius: 20rpx;
}
}
}
.password-change {
font-size: 32rpx;
color: #808291;
.password-btn {
color: #2c66f7;
}
}
.password-complete {
width: 376rpx;
height: 96rpx;
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 16rpx;
font-size: 36rpx;
color: #ffffff;
line-height: 96rpx;
text-align: center;
}
}
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-08 10:31:05
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="dailog-panel">
<view class="dailog-box">
<view class="dailog-header">
<view class="dailog-title">{{ selectItem.title }}</view>
<view class="dailog-close" @click="close"><uni-icons type="closeempty" size="20"></uni-icons></view>
</view>
<view class="dailog-content">{{ selectItem.content }}</view>
<view class="dailog-desc">{{ selectItem.desc }}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: '',
selectItem: {
title: '权益提成',
content: '权益提成 = 权益产值 × 提成系数 × 提成比例',
desc: '提成比例'
}
}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
.dailog-box {
position: fixed;
left: 50%;
top: 50%;
width: 1040rpx;
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;
padding-bottom: 96rpx;
.dailog-header {
display: flex;
padding: 40rpx 48rpx;
.dailog-title {
font-size: 40rpx;
color: #1a1a1a;
font-weight: 600;
}
.dailog-close {
margin-left: auto;
text-align: right;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
}
.dailog-content {
font-size: 32rpx;
color: #1a1a1a;
line-height: 52rpx;
padding: 0 120rpx 0 152rpx;
margin-top: 32rpx;
}
.dailog-desc {
font-size: 32rpx;
color: #808291;
padding: 0 120rpx 0 152rpx;
margin-top: 32rpx;
line-height: 48rpx;
}
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
}
}
</style>
<template>
<view class="income-container">
<view class="income-header">
<view class="level-box">
<view class="sprite-icon icon-zj-icon"></view>
<view class="level-label">职级</view>
<view class="level-desc">初级驻店</view>
<view class="sprite-icon icon-js-icon"></view>
</view>
<view class="time-box">
<view class="sprite-icon icon-work-icon"></view>
<view class="level-label">本月出勤</view>
<view class="time-day">22/27</view>
<view class="time-go"></view>
</view>
</view>
<view class="footer-box flex-center">
<view class="sprite-icon icon-tips-b"></view>
最终的交付数以厂家提供的交付数为准,个人填写的交付数仅为工资测算参考。
</view>
<view class="income-body">
<view class="income-store">
<view class="store-header"></view>
<view class="my-store"></view>
<My-Store></My-Store>
</view>
<view class="income-item">
<Day-Tips></Day-Tips>
</view>
<view class="income-item"></view>
<view class="income-item"></view>
</view>
<Password v-if="showPassword" @close="showPassword = false"></Password>
</view>
</template>
<script>
import DayTips from './DayTips'
import Password from './Password.vue'
import MyStore from './MyStore'
export default {
components: { DayTips, Password, MyStore },
data() {
return {}
return {
showPassword: false
}
},
inject: ['hideFooter'],
mounted() {
this.hideFooter(false)
},
destroyed() {
this.hideFooter(true)
},
methods: {}
}
......@@ -22,28 +54,85 @@ export default {
<style scoped lang="scss">
.income-container {
padding-right: 66rpx;
position: relative;
.income-header {
position: absolute;
top: -120rpx;
right: 64rpx;
display: flex;
.level-box {
width: 464rpx;
height: 84rpx;
background: #f0f6ff00;
border: 2rpx solid #c0d8fb;
border-radius: 42rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
.level-desc {
font-size: 28rpx;
color: #181a1f;
margin-left: 38rpx;
}
}
.time-box {
display: flex;
align-items: center;
justify-content: space-between;
width: 398rpx;
height: 84rpx;
background: #f0f6ff00;
border: 2rpx solid #b0ccf5;
border-radius: 42rpx;
margin-left: 32rpx;
padding: 0 32rpx;
.level-label {
font-size: 28rpx;
color: #181a1f;
}
.time-day {
font-size: 36rpx;
color: #2d66f7;
margin-left: 48rpx;
}
.time-go {
border-bottom: 10rpx solid transparent;
border-left: 14rpx solid #2d66f7;
border-top: 10rpx solid transparent; /* 箭头颜色 */
}
}
}
.footer-box {
color: #3773f8;
font-size: 24rpx;
width: 100%;
font-weight: 600;
position: absolute;
bottom: -50rpx;
left: 0;
text-align: center;
}
}
.income-body {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: 66% 34%;
column-gap: 48rpx;
height: calc(100vh - 260rpx);
width: calc(100% - 110rpx);
margin-top: 32rpx;
.income-store {
.my-store {
background-image: linear-gradient(180deg, #f4fbfe 0%, #ffffff 50%);
border: 4rpx solid #ffffff;
box-shadow: inset 0 4rpx 8rpx 0 rgba(255, 255, 255, 0.5);
border-radius: 48rpx;
height: 50vh;
}
background: #f2f7ff;
border: 4rpx solid #ffffff;
box-shadow: inset 0 4rpx 8rpx 0 #ffffff80;
border-radius: 48rpx;
overflow: hidden;
}
.income-item {
height: 100%;
background-image: linear-gradient(180deg, #faf9f7 0%, #ffffff 28%);
background: #f0f5ff;
border: 4rpx solid #ffffff;
box-shadow: inset 0 4rpx 8rpx 0 rgba(255, 255, 255, 0.5);
box-shadow: inset 0 4rpx 8rpx 0 #ffffff80;
border-radius: 48rpx;
}
}
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-07 10:22:28
* @LastEditTime: 2025-01-09 16:23:06
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -30,9 +30,9 @@ export default {
componentList:['Point','Income'],
tabName: 'Point',
tabList:[{
name:'积分权益',
name:'我的积分',
},{
name:'收入计算',
name:'我的收入',
}]
}
},
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-03 14:32:15
* @LastEditTime: 2025-01-08 15:15:41
-->
<template>
<view class="point-box">
......@@ -68,7 +68,7 @@ export default {
mixins: [point],
data() {
return {
pointClassification: ['C001', 'C002', 'C003'],
pointClassification: ['C001', 'C003', 'C002'],
pointClassName: ['能力类', '日常行为类', '学习类'],
statistics: {},
levelImg: [require('@/assets/images/point/bronze.png'), require('@/assets/images/point/silver.png'), require('@/assets/images/point/gold.png'), require('@/assets/images/point/masonry.png')],
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-06 14:32:00
* @LastEditTime: 2025-01-08 16:17:34
-->
<template>
<view class="point-box">
......@@ -48,7 +48,6 @@
</template>
<script>
import point from '@/mixin/point'
import { rules } from 'eslint-config-prettier'
export default {
mixins: [point],
data() {
......@@ -57,13 +56,14 @@ export default {
timer: null,
selectItem: {},
list: [
{ title: '考勤打卡', typeCode: 'T005', content: '完成日常打卡', rules: '请打开嘀加智慧云企业微信进行上下班打卡', logo: require('@/assets/images/point/day-time.png') },
{ title: '日报填写', typeCode: 'T004', content: '完成日报填写', rules: '请打开嘀加智慧云企业微信生意助手员工版填写日报', logo: require('@/assets/images/point/day-report.png') },
{ title: '平板接待', typeCode: 'T006', content: '完成平板接待', rules: '即将跳转至展业助手开始接待', logo: require('@/assets/images/point/day-ipad.png'), jump: true },
{ title: '飞行督导带教', typeCode: 'T003', content: '带教课程学习', rules: '请联系督导了解最近培训计划并参与培训', logo: require('@/assets/images/point/day-training.png') },
{ title: '考勤打卡', typeCode: 'T006', content: '完成日常打卡', rules: '请打开嘀加智慧云企业微信进行上下班打卡', logo: require('@/assets/images/point/day-time.png') },
{ title: '日报填写', typeCode: 'T005', content: '完成日报填写', rules: '请打开嘀加智慧云企业微信生意助手员工版填写日报', logo: require('@/assets/images/point/day-report.png') },
{ title: '平板接待', typeCode: 'T007', content: '完成平板接待', rules: '即将跳转至展业助手开始接待', logo: require('@/assets/images/point/day-ipad.png'), jump: true },
{ title: '飞行督导带教', typeCode: 'T001', content: '带教课程学习', rules: '请联系督导了解最近培训计划并参与培训', logo: require('@/assets/images/point/day-training.png') },
{ title: '总部集中培训', typeCode: 'T002', content: '总部集中培训', rules: '请打开嘀加智慧云企业微信生意助手员工版,进行AI趣练学习', logo: require('@/assets/images/point/day-train.png') },
{ title: '学习类', typeCode: 'T007', content: '完成学习课程', rules: '请联系运营同事,将您的优秀的经验进行开课分享', logo: require('@/assets/images/point/day-course.png') },
{ title: '预学习', typeCode: 'T001', content: '完成预学习', rules: '即将跳转至客户档案通过录入预交车客户学习推荐套餐方案话术或客户案例广场学习更多套餐方案话术', logo: require('@/assets/images/point/day-study.png') }
{ title: '学习类', typeCode: 'T004', content: '完成学习课程', rules: '请联系运营同事,将您的优秀的经验进行开课分享', logo: require('@/assets/images/point/day-course.png') },
{ title: '预学习', typeCode: 'T003', content: '完成预学习', rules: '即将跳转至客户档案通过录入预交车客户学习推荐套餐方案话术或客户案例广场学习更多套餐方案话术', logo: require('@/assets/images/point/day-study.png') },
{ title: '行为异常', typeCode: 'T008', content: '完成预学习', rules: '即将跳转至客户档案通过录入预交车客户学习推荐套餐方案话术或客户案例广场学习更多套餐方案话术', logo: require('@/assets/images/point/day-study.png') }
],
dayList: [],
completed: 0,
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-06 14:13:58
* @LastEditTime: 2025-01-09 10:38:48
-->
<template>
<view class="point-box">
......@@ -37,8 +37,8 @@
<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.title }}</view>
<view :class="{ 'star-desc': true, grey: !badgeList.includes(item.medalType) && !isHigh }">{{ item.content }}</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>
......@@ -91,18 +91,11 @@ export default {
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: 4, 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: 3, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), content: '平板接待月度无扣分记录', couponName: '50元水果券', couponNum: '1张' }
],
badgeList: [],
tabelTh: [
{ title: '积分区间', width: 7 },
{ title: '80-100', width: 18 },
{ title: '60-79', width: 18 },
{ title: '50-59', width: 17 },
{ title: '40-49', width: 17 },
{ title: '39及以下', width: 17 }
],
tabelTr: [{ content: '奖惩规则(每月)' }, { list: ['咖啡奶茶券 6 张', '生日当月专享哈根达斯券 1 张', '美团外卖直兑券 6 张', '闭门课分享活动参加资格', '定制公司公仔礼包'] }, { list: ['奖惩规则(每月)'] }, { list: ['奖惩规则(每月)'] }, { list: ['奖惩规则(每月)'] }, { list: ['奖惩规则(每月)'] }]
tabelTh: [{ title: '积分区间', width: 7 }],
tabelTr: [{ content: '奖惩规则(每月)' }, { list: ['咖啡奶茶券 6 张', '生日当月专享哈根达斯券 1 张', '美团外卖直兑券 6 张', '闭门课分享活动参加资格', '定制公司公仔礼包'] }, { list: ['咖啡奶茶券 4 张', '生日当月专享哈根达斯券 1 张', '美团外卖直兑券 4 张', '定制公司公仔礼包'] }, { list: ['咖啡奶茶券 1 张', '美团外卖直兑券 1 张'] }, { list: ['咖啡奶茶券 1 张', '美团外卖直兑券 1 张'] }, { list: ['专项培训与辅导'] }]
}
},
props: {
......@@ -116,11 +109,25 @@ export default {
this.isHigh = isHigh
},
methods: {
getDetail(countDate) {
uni.$api.pointApi.getPoint({ countDate }).then(res => {
const { levelCode, badgeList } = res || {}
this.badgeList = badgeList.map(i => i.medalType)
this.levelIndex = levelCode - 1
getDetail() {
this.getRule(1)
this.getRule(2)
},
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]
}
})
},
updateDetail(countDate) {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-26 15:55:10
* @LastEditTime: 2025-01-08 15:14:37
-->
<template>
<view class="point-box">
......@@ -62,8 +62,8 @@ export default {
selectItem: {},
detail: [],
currentIndex: 0,
pointImg: [require('@/assets/images/point/bronze_ranking.png'), require('@/assets/images/point/silver_ranking.png'), require('@/assets/images/point/gold_ranking.png'), require('@/assets/images/point/masonry_ranking.png')],
starImg: [require('@/assets/images/point/study_star.png'), require('@/assets/images/point/time_star.png'), require('@/assets/images/point/teacher_star.png'), require('@/assets/images/point/elite_star.png')],
pointImg: [require('@/assets/images/point/bronze_ranking.png'), require('@/assets/images/point/silver_ranking.png'), require('@/assets/images/point/masonry_ranking.png')],
starImg: [require('@/assets/images/point/study_star.png'), require('@/assets/images/point/time_star.png'), require('@/assets/images/point/elite_star.png')],
pointList: [
{
src: require('@/assets/images/point/point_bg.png'),
......@@ -79,10 +79,6 @@ export default {
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
src: require('@/assets/images/point/teacher_bg.png'),
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
},
{
src: require('@/assets/images/point/ipad_bg.png'),
style: 'background-image: linear-gradient(270deg, #c2d8fc59 0%, #d1e9ff59 100%);'
}
......@@ -92,7 +88,7 @@ export default {
mounted() {},
methods: {
getDetail(countDate) {
for (let i = 0; i < 4; i++) {
for (let i = 0; i < 3; i++) {
this.getList(countDate, i + 1)
}
this.getList(countDate)
......
......@@ -20,6 +20,7 @@
<template v-if="item.pointValue">{{ item.pointValue }}</template>
<text v-else>导入</text>
</td>
<td>{{ item.pointsValueMax }}</td>
<td>{{ item.detail }}</td>
</tr>
</table>
......@@ -35,10 +36,11 @@ export default {
return {
selectItem: {},
tabelTh: [
{ title: '分类', width: 7 },
{ title: '积分类型', width: 8 },
{ title: '积分描述', width: 14 },
{ title: '积分值', width: 6 },
{ title: '分类', width: 6 },
{ title: '积分类型', width: 7 },
{ title: '积分描述', width: 13 },
{ title: '积分值', width: 5 },
{ title: '月满积分值', width: 8 },
{ title: '说明', width: 50 }
],
tabelTr: [],
......
......@@ -141,6 +141,7 @@ export default {
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}],
}
},
inject: ['showPage'],
mounted () {
const year = new Date().getFullYear()
this.month = ((new Date().getMonth() + 1) + '').padStart(2, '0')
......@@ -166,7 +167,7 @@ export default {
},
jump(name,val) {
console.log(name,99)
this.$emit('showPage',name,val)
this.showPage(name,val)
}
}
}
......
......@@ -17,7 +17,7 @@
<template v-else>
<component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" />
</template>
<view class="store-addr">
<view class="store-addr" v-if="footerBox">
<view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view>
......@@ -86,8 +86,9 @@ export default {
data() {
return {
transfer: '',
showHome: false,
pointComponentName: 'History',
footerBox: true,
showHome: true,
pointComponentName: 'Point',
userInfo: {},
tabIndex: 0
}
......@@ -96,7 +97,12 @@ export default {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
},
provide() {
return {
showPage: this.handleShowPage,
hideFooter: this.handleFooter
}
},
computed: {
previewRef() {
return this.$refs.previewRef
......@@ -113,6 +119,10 @@ export default {
}
},
methods: {
handleFooter(val) {
console.log(val, 88)
this.footerBox = val
},
backHome() {
this.showHome = true
},
......
......@@ -2,29 +2,29 @@
* 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量
* uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用
*/
$fixedWidth:2346;
$detailVW:100vmin * (1173 / 768);
$fixedWidth: 2346;
$detailVW: 100vmin * (1173 / 768);
@function toRpx($val) {
@return $detailVW * ($val / $fixedWidth)
@return $detailVW * ($val / $fixedWidth);
}
@function toMinusRpx($val) {
@return $detailVW * ($val / $fixedWidth) * -1
@return $detailVW * ($val / $fixedWidth) * -1;
}
$margin:0 calc((100vmax - #{$detailVW}) / 2);
$margin: 0 calc((100vmax - #{$detailVW}) / 2);
@import './assets/css/sprite.scss';
@import "./assets/css/sprite.scss";
@font-face {
font-family: 'number-700';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf');
font-family: "number-700";
src: url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf");
}
@font-face {
font-family: 'number-400';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-400-Regular.ttf');
font-family: "number-400";
src: url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-400-Regular.ttf");
}
@keyframes show-view {
......@@ -67,7 +67,16 @@ $margin:0 calc((100vmax - #{$detailVW}) / 2);
display: flex;
align-items: center;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
......@@ -84,10 +93,9 @@ $margin:0 calc((100vmax - #{$detailVW}) / 2);
}
.byd-layout {
background-image: url('@/assets/images/media/byd-media-bg.webp');
background-image: url("@/assets/images/media/byd-media-bg.webp");
}
@media screen and (min-width: 500px) {
.fixforpc-width {
min-width: auto !important;
......@@ -104,7 +112,6 @@ $margin:0 calc((100vmax - #{$detailVW}) / 2);
}
}
@keyframes show-view-opacity {
0% {
opacity: 0;
......@@ -113,4 +120,4 @@ $margin:0 calc((100vmax - #{$detailVW}) / 2);
100% {
opacity: 1;
}
}
\ No newline at end of file
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!