Commit 491b59e0 by 前端

积分

1 parent 81ea7e63
......@@ -64,4 +64,9 @@
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -935rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1160rpx -668rpx;}
\ No newline at end of file
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1160rpx -668rpx;}
.icon-certificate { width: 32rpx; height: 32rpx; background-position: -982rpx -853rpx;}
.icon-level { width: 32rpx; height: 32rpx; background-position: -1029rpx -853rpx;}
.icon-medal { width: 32rpx; height: 32rpx; background-position: -1076rpx -853rpx;}
.icon-points { width: 32rpx; height: 32rpx; background-position: -1123rpx -853rpx;}
.icon-ranking { width: 32rpx; height: 32rpx; background-position: -1170rpx -853rpx;}
\ No newline at end of file

1.2 MB | W: | H:

1.22 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -52,6 +52,10 @@ export default {
label: "接待记录",
icon: "record",
},
{
label: "积分权益",
icon: "record",
},
],
}
},
......@@ -77,7 +81,7 @@ export default {
const res = await uni.$api.customerApi.haveCustomerAccess({
merchantId
})
if (res && this.tabs.length == 2) this.tabs.push({
if (res && this.tabs.length == 2) this.tabs.splice(2,0,{
label: "客户档案",
icon: "customer-file",
})
......@@ -124,7 +128,7 @@ export default {
font-size: 28rpx;
color: #8a98b5;
text-align: center;
padding-bottom: 96rpx;
padding-bottom: 60rpx;
position: relative;
.dot {
width: 16rpx;
......
<template>
<view class="point-container">
<view class="point-box">
<view class="point-left">
<view class="point-body">
<view class="point-month">
<view class="month-box">
<view class="month-up" @click="jump('day')">
<view class="month-logo"></view>
<view class="month-text">本月积分</view>
<uni-icons type="right"></uni-icons>
</view>
<view class="month-num">9</view>
<view class="month-up">
<view class="month-logo"></view>
<view class="month-text">本月排名</view>
<uni-icons type="right"></uni-icons>
</view>
<view class="month-num">9</view>
</view>
</view>
<view class="point-up">
<view class="card-box">
<view class="card-top">
<image src="/static/reward.png" class="card-logo" />
<view class="card-title">成长级别</view>
</view>
<view class="card-content"></view>
</view>
<view class="card-box">
<view class="card-top">
<image src="/static/reward.png" class="card-logo" />
<view class="card-title">我的勋章</view>
</view>
<view class="card-content"></view>
</view>
</view>
</view>
<view class="card-box coupon-box">
<view class="card-top">
<image src="/static/reward.png" class="card-logo" />
<view class="card-title">我的兑换券</view>
<view class="card-tips">即将开通</view>
</view>
<view class="card-content"></view>
</view>
</view>
<view class="point-right">
<view class="card-box">
<view class="card-top">
<image src="/static/reward.png" class="card-logo" />
<view class="card-title">每日积分</view>
</view>
<view class="card-content"></view>
</view>
<view class="point-record">
<view class="record-title">积分记录</view>
<view class="record-body">
<view class="record-item" v-for="(i, index) in recordList">
<view class="record-item-left">
<view class="item-title">{{ i.title }}</view>
<view class="item-time">{{ i.time }}</view>
</view>
<view class="record-item-num">{{ i.num }}</view>
</view>
</view>
<view class="record-more">查看更多</view>
</view>
</view>
</view>
<view class="point-b"></view>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: '',
data () {
return {
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}],
}
},
mounted () {
},
methods: {
jump() {
this.$parent.showHome = false
}
}
}
</script>
<style scoped lang="scss">
.point-b {
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
visibility: hidden;
}
.point-box {
display: flex;
height: calc(100vh - 80rpx);
padding-top: 96rpx;
.card-box {
width: 648rpx;
height: 400rpx;
box-sizing: border-box;
padding: 48rpx;
background: #ffffffcc;
border: 4rpx solid #ffffff;
box-shadow: inset 0 4rpx 8rpx 0 #ffffff80;
border-radius: 48rpx;
.card-top {
display: flex;
line-height: 64rpx;
.card-logo {
width: 64rpx;
height: 64rpx;
}
.card-title {
font-size: 36rpx;
color: #1a1a1a;
margin-left: 32rpx;
}
.card-content {
margin-top: 40rpx;
}
}
}
.point-left {
width: 1344rpx;
height: 100%;
background: rgba(101, 171, 250, 0.12);
border-radius: 80rpx;
padding: 32rpx;
.point-body {
display: flex;
.point-month {
width: 50%;
.month-box {
background-image: linear-gradient(180deg, #4172fa 0%, #8accff 100%);
border: 2rpx solid #ffffff;
height: 100%;
box-shadow:
8rpx 8rpx 32rpx 0 #5b92e680,
inset 0 -12rpx 16rpx 0 #bce7ff;
border-radius: 56rpx;
padding: 72rpx;
.month-up {
display: flex;
align-items: center;
margin-top: 150rpx;
&:first-child {
margin-top: 60rpx;
}
.month-logo {
width: 64rpx;
height: 64rpx;
background: #fff;
}
.month-text {
font-size: 36rpx;
color: #ffffff;
margin-left: 32rpx;
}
.uni-icons {
color: #ffffff !important;
font-size: 24rpx;
margin-left: 20rpx;
}
}
.month-num {
font-size: 80rpx;
color: #ffffff;
line-height: 120rpx;
margin-left: 90rpx;
}
}
}
.point-up {
margin-left: 48rpx;
.card-box {
&:first-child {
margin-bottom: 48rpx;
}
}
}
}
.coupon-box {
margin-top: 48rpx;
width: 100%;
.card-tips {
margin-left: auto;
color: #a2a2a8;
}
}
}
.point-right {
flex: 1;
margin: 0rpx 60rpx 0rpx 50rpx;
.card-box {
width: auto;
}
.point-record {
background: rgba(255, 255, 255, 0.8);
border: 4rpx solid #ffffff;
box-shadow: inset 0 4rpx 8rpx 0 rgba(255, 255, 255, 0.5);
border-radius: 48rpx;
margin-top: 35rpx;
height: calc(100% - 450rpx);
padding: 40rpx;
box-sizing: border-box;
.record-title {
font-size: 32rpx;
color: #1a1a1a;
text-align: center;
}
.record-body {
height: calc(100% - 140rpx);
overflow-y: auto;
margin: 20rpx 0;
.record-item {
margin-bottom: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
&-left {
.item-title {
font-size: 26rpx;
line-height: 40rpx;
color: #181a1f;
}
.item-time {
font-size: 24rpx;
color: #808291;
line-height: 40rpx;
}
}
&-num {
font-size: 32rpx;
color: #181a1f;
}
}
}
.record-more {
width: 144rpx;
height: 48rpx;
background: rgba(216, 216, 216, 0);
border: 2rpx solid #afb6cc;
border-radius: 24rpx;
margin: 0 auto;
font-size: 24rpx;
color: #808291;
text-align: center;
line-height: 44rpx;
}
}
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-14 16:20:48
-->
<template>
<view class="point-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">每日积分</view>
</view>
<view class="finish-title">
已完成
<text>3/7</text>
</view>
<view class="day-list">
<view class="day-item" v-for="(i, index) in dayList" :key="index">
<view class="day-logo"></view>
<view class="day-desc">
<view class="day-title">{{ i.title }}</view>
<view class="day-content">{{ i.content }}</view>
</view>
<view class="day-go" @click="handleGo(i)">去完成</view>
<!-- <uni-icons type="checkmarkempty"></uni-icons> -->
</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="30"></uni-icons></view>
<view class="dailog-logo"></view>
<view class="dailog-title">{{ selectItem.title }}</view>
<view class="dailog-content">{{ selectItem.content }}</view>
<view class="dailog-btn" @click="show = false">好的</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
selectItem: {},
dayList: [
{ title: '签到', content: '完成日常打卡' },
{ title: '签到', content: '完成日常打5卡' },
{ title: '签到', content: '完成日常打卡' },
{ title: '签到', content: '完成日常打卡' },
{ title: '签到', content: '完成日常打卡' }
],
show: false
}
},
mounted() {},
methods: {
handleGo(val) {
this.selectItem = val
this.show = true
}
}
}
</script>
<style scoped lang="scss">
.point-box {
position: relative;
}
.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: 50%;
transform: translate(-50%, -50%);
background: #fff;
background-image: linear-gradient(179deg, #d6e9ff 12%, #ffffff00 100%); /* 顶部渐变和底部白色 */
background-size:
100% 160rpx,
100% calc(100% - 160rpx); /* 分别设置渐变和白色的背景大小 */
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-title {
font-size: 40rpx;
color: #1a1a1a;
text-align: center;
margin-top: 40rpx;
}
.dailog-content {
font-size: 32rpx;
color: #808291;
text-align: center;
line-height: 60rpx;
}
.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;
margin: 80rpx auto 70rpx;
}
}
}
.nav-bar {
width: 100%;
height: 96rpx;
margin-top: 48rpx;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
flex: 1;
text-align: center;
margin-left: -96rpx;
}
}
.finish-title {
font-size: 36rpx;
color: #1a1a1a;
margin-left: 160rpx;
text {
font-size: 64rpx;
color: #4673ff;
margin-left: 24rpx;
}
}
.day-list {
margin-top: 40rpx;
padding: 0rpx 128rpx;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 48rpx;
.day-item {
background: #ffffff;
border-radius: 20rpx;
padding: 40rpx 40rpx;
display: flex;
align-items: center;
.day-logo {
width: 76rpx;
height: 63rpx;
}
.day-desc {
.day-title {
font-size: 32rpx;
color: #292d33;
line-height: 48rpx;
}
.day-content {
font-size: 26rpx;
color: #808291;
line-height: 48rpx;
}
}
.uni-icons {
margin-left: auto;
color: #14cc68 !important;
font-size: 30rpx;
font-weight: 700;
}
.day-go {
width: 148rpx;
height: 64rpx;
background: #f0f1f5;
border-radius: 32rpx;
text-align: center;
font-size: 28rpx;
color: #4673ff;
line-height: 64rpx;
margin-left: auto;
}
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-14 17:32:06
-->
<template>
<view class="point-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">积分规则</view>
</view>
<view class="rule-table">
<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 v-for="(item, index) in data" :key="index"></tr>
</table>
</view>
</view>
</template>
<script>
export default {
data() {
return {
selectItem: {},
tabelTh: [
{ title: '分类', width: 12 },
{ title: '积分类型', width: 12 },
{ title: '积分描述', width: 12 },
{ title: '积分值', width: 12 },
{ title: '说明', width: 12 },
{ title: '说明', width: 12 }
],
show: false
}
},
mounted() {},
methods: {
handleGo(val) {
this.selectItem = val
this.show = true
}
}
}
</script>
<style scoped lang="scss">
.point-box {
position: relative;
}
.nav-bar {
width: 100%;
height: 96rpx;
margin-top: 48rpx;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
flex: 1;
text-align: center;
margin-left: -96rpx;
}
}
.rule-table {
background: #ffffff;
border-radius: 48rpx;
padding: 32rpx 64rpx;
margin: 20rpx 64rpx;
.score-table {
border-collapse: separate; /* 防止边框合并 */
border-spacing: 0; /* 单元格之间没有间距 */
tr {
border: none;
th {
border: 2px solid #fff; /* 所有单元格都有边框 */
padding: 8px;
border-top: none; /* 除了首行外,所有行的上方无边框 */
border-bottom: none;
background: #edf2ff;
height: 88rpx;
font-size: 26rpx;
color: #333333;
&:first-child {
border-left: none;
}
&:last-child {
border-right: none;
}
}
}
}
}
</style>
<template>
<view class="container" @click="handleTouchStart">
<view :class="['home', { show: !id }]">
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" @changeTab="$emit('changeTab', $event)" @stopAudio="stopAudio" />
<view :class="['home', { show: !id && showHome }]">
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" ref="leftBox" @changeTab="$emit('changeTab', $event)" @stopAudio="stopAudio" />
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
......@@ -26,6 +26,9 @@
<view :class="['detail', { show: id }]">
<slot name="detail" />
</view>
<view class="point-page">
<component :is="pointComponentName" />
</view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
<!-- 停留弹框 -->
......@@ -60,9 +63,12 @@ import myClick from '@/mixin/click'
import uploader from '@/mixin/uploader.js'
import CustomerFile from './components/CustomerFile.vue'
import LeftSide from './components/LeftSide.vue'
import Point from './components/Point.vue'
import dayPoint from './components/Point/DayPoint.vue'
import rulePoint from './components/Point/RulePoint.vue'
export default {
mixins: [myClick, uploader],
components: { RecordList, CustomerFile, LeftSide },
components: { RecordList, CustomerFile, LeftSide, Point, dayPoint, rulePoint },
props: {
id: [String, Number],
finishDoneText: String,
......@@ -73,6 +79,8 @@ export default {
},
data() {
return {
showHome: false,
pointComponentName: 'rulePoint',
userInfo: {},
tabIndex: 0
}
......@@ -90,8 +98,10 @@ export default {
return this.$refs.finish
},
componentName() {
const len = this.$refs.leftBox.tabs.length
if (this.tabIndex == 0) return 'HomeSlot'
else if (this.tabIndex == 1) return 'RecordList'
else if (this.tabIndex == len - 1) return 'Point'
else return 'CustomerFile'
}
},
......@@ -121,6 +131,14 @@ export default {
left: 0;
visibility: hidden;
}
.point-page {
position: fixed;
width: 100%;
height: 100%;
z-index: 1;
top: 0;
left: 0;
}
.home {
display: flex;
height: 100vh;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!