Commit f48fa9df by 前端

积分优化

1 parent ae54a9a7
......@@ -52,10 +52,10 @@ export default {
label: "接待记录",
icon: "record",
},
// {
// label: "积分权益",
// icon: "point",
// },
{
label: "积分权益",
icon: "point",
},
],
}
},
......
......@@ -26,25 +26,10 @@
</view>
</view>
<view class="point-up">
<view class="card-box level-card">
<view class="card-top">
<view class="sprite-icon icon-level"></view>
<view class="card-title">成长级别</view>
</view>
<view @click="jump('LevelPoint')" class="card-content level-box" v-if="pointDetail.levelCode" :style="levelList[pointDetail.levelCode - 1].style">
<view class="level-logo"><image :src="levelList[pointDetail.levelCode - 1].logo"></image></view>
<view class="level-name" :style="levelList[pointDetail.levelCode - 1].titleStyle">{{ pointDetail.levelName }}</view>
<view class="level-month" :style="levelList[pointDetail.levelCode - 1].subTitleStyle">{{ month == 1 ? 12 : month - 1 }}月</view>
</view>
<view class="level-empty" v-else>
<image :src="require('@/assets/images/point/level_empty.png')" mode="heightFix" />
<view class="empty-text">没评上,请加油~</view>
</view>
</view>
<view class="card-box medal-card" @click="jump('LevelPoint')">
<view class="card-top">
<view class="sprite-icon icon-medal"></view>
<view class="card-title">我的勋章</view>
<view class="card-title">成长勋章</view>
</view>
<view class="card-content star-box">
<view class="card-item" v-for="(item, index) in starList" :key="index">
......@@ -215,7 +200,8 @@ export default {
height: toRpx(408);
}
&.medal-card {
height: toRpx(392);
height: toRpx(892);
margin-bottom: 0;
}
&.rule-box {
background-image: url('../../../assets//images/point/rule_bg.png');
......@@ -430,7 +416,7 @@ export default {
margin-left: toRpx(48);
.card-box {
&:first-child {
margin-bottom: toRpx(48);
// margin-bottom: toRpx(48);
}
}
.card-top {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-25 21:08:27
* @LastEditTime: 2025-01-03 14:32:15
-->
<template>
<view class="point-box">
......@@ -63,12 +63,13 @@
</template>
<script>
import point from '@/mixin/point'
import utils from '@/utils/utils'
export default {
mixins: [point],
data() {
return {
pointClassification: ['C001', 'C002', 'C003'],
pointClassName: ['课程学习类', '日常行为类', '分享授课类'],
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')],
detail: [],
......@@ -89,7 +90,7 @@ export default {
getList(countDate, i) {
uni.$api.pointApi.pointRecordList({ countDate, pointClassification: this.pointClassification[i] }).then(res => {
const pointClassificationName = this.pointClassName[i]
const score = res.reduce((a, b) => a + b.pointValue, 0)
const score = res.reduce((a, b) => utils.calcAdd(a, b.pointValue), 0)
this.$set(this.pointList, i, { list: res, pointClassificationName, score })
})
},
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-25 17:00:42
* @LastEditTime: 2025-01-03 14:25:52
-->
<template>
<view class="point-box">
......@@ -60,7 +60,7 @@ export default {
{ 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: 'T003', content: '带教课程学习', rules: '请联系督导了解最近培训计划并参与培训', logo: require('@/assets/images/point/day-training.png') },
{ title: 'AI话术对练', typeCode: 'T002', content: '完成AI对练', rules: '请打开嘀加智慧云企业微信生意助手员工版,进行AI趣练学习', logo: require('@/assets/images/point/day-ai.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') }
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 4
const index = 2
/**
*
0本地
......
......@@ -249,17 +249,17 @@ export default {
uni.showLoading({
mask: true
})
const result = await this.$permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
if (result !== 1) {
uni.showToast({
title: '为了记录语音通话,请打开录音权限',
icon: 'none'
})
return
}
// const result = await this.$permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
// if (result !== 1) {
// uni.showToast({
// title: '为了记录语音通话,请打开录音权限',
// icon: 'none'
// })
// return
// }
this.getSoure()
this.clearHistory()
this.$refs.home.startAudio()
// this.$refs.home.startAudio()
this.id = this.moduleList[0].id
this.type = 'edit'
this.recording = true
......
......@@ -51,6 +51,22 @@ function accDiv(arg1, arg2) {
r2 = Number(arg2.toString().replace('.', ''))
return (r1 / r2) * Math.pow(10, t2 - t1)
}
// 两数相减
function calcAdd(num1, num2) {
var r1, r2, m
try {
r1 = num1.toString().split('.')[1].length
} catch (e) {
r1 = 0
}
try {
r2 = num2.toString().split('.')[1].length
} catch (e) {
r2 = 0
}
m = Math.pow(10, Math.max(r1, r2))
return (num1 * m + num2 * m) / m
}
function debounce(fn, timer) {
var t = null
return function () {
......@@ -198,5 +214,6 @@ export default {
getFilePath,
getFileSaveFolderOnClient,
serializeIfObject,
getAudioFilePath
getAudioFilePath,
calcAdd
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!