Commit 11ed422e by 胡悦

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

2 parents 06036178 ac747446
Showing 34 changed files with 1018 additions and 268 deletions
No preview for this file type

2.51 MB | W: | H:

2.53 MB | W: | H:

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

15.8 KB | W: | H:

223 Bytes | W: | H:

assets/spritesmith/customer-add.png
assets/spritesmith/customer-add.png
assets/spritesmith/customer-add.png
assets/spritesmith/customer-add.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -48,9 +48,12 @@
v-if="messageTotal > 0"
></view>
</view> -->
<view class="btn">
<view class="sprite-icon icon-scene-change"></view>
</view>
<template v-if="showSceneChange">
<view class="btn">
<view class="sprite-icon icon-scene-change"></view>
</view>
</template>
<view
class="btn"
@click="handleSetting"
......@@ -94,9 +97,9 @@ export default {
name: 'HomeSlot'
},
{
label: "接待记录",
label: "接待中心",
icon: "record",
name: 'RecordList'
name: 'ReceptionCenter'
},
{
label: "学习中心",
......@@ -107,7 +110,7 @@ export default {
{
label: "场景集市",
icon: "scene",
name: 'AIBazaar'
name: 'SceneMarket'
}
],
messageData: {
......@@ -138,6 +141,16 @@ export default {
computed: {
perRecordNumber () {
return this.$store.state.audio.perRecordNumber
},
showSceneChange () {
const { openSceneArr } = uni.$storage.get("userInfo")
let result = []
if (openSceneArr && openSceneArr.length > 1) {
openSceneArr.map(e => {
if (e == 1 || e == 0) result.push(e)
})
}
return result.length > 1
}
},
created () {
......@@ -237,9 +250,14 @@ export default {
this.leaveTrack()
this.trackId = 0
clearInterval(this.trackInterval)
this.trackInterval = null
}
this.$emit('update:tabIndex', index)
this.$emit("changeTab", item, jumpUrl)
this.$emit("changeTab", {
item,
jumpUrl,
index
})
this.getMessageInfo()
},
async haveCustomerAccess (val) {
......@@ -248,11 +266,11 @@ export default {
// merchantId: shopMerchantId
// })
// if (res)
this.tabs.push({
label: "客户档案",
icon: "customer-file",
name: 'CustomerFile'
})
// this.tabs.push({
// label: "客户档案",
// icon: "customer-file",
// name: 'CustomerFile'
// })
// this.$store.state.user.haveCustomerAccess = res
uni.$api.customerApi.saleOpen({
merchantId: shopMerchantId,
......@@ -534,7 +552,7 @@ export default {
margin: toRpx(48) auto 0;
box-sizing: border-box;
padding-left: toRpx(60);
.icon-scene-change{
.icon-scene-change {
zoom: 2;
}
.message-number {
......
......@@ -70,7 +70,7 @@
</view>
</template>
<template v-if="nothing">
<view class="end-text">到底了!</view>
<view class="end-text">-已经到底了-</view>
</template>
</scroll-view>
</view>
......
<template>
<view class="customer-flow-box">
<view class="customer-flow-title">门店客流情况</view>
<view class="sprite-icon icon-customer-flow"></view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.customer-flow-box {
position: relative;
height: 422rpx;
.customer-flow-title {
color: #333333;
font-size: 28rpx;
font-weight: 500;
padding: 24rpx 32rpx 0;
}
.sprite-icon{
position: absolute;
top: 0;
left: 0;
zoom: 2;
}
}
</style>
\ No newline at end of file
......@@ -121,8 +121,8 @@
<script type='text/ecmascript-6'>
import CarBrands from '@/components/CarBrands.vue'
import dayjs from 'dayjs'
import CustomerTags from '../../CustomerTags.vue'
import ReceptionSence from '../../ReceptionSence.vue'
import CustomerTags from './CustomerTags.vue'
import ReceptionSence from './ReceptionSence.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{
label: '车主姓名',
......@@ -374,7 +374,7 @@ export default {
border-radius: toRpx(48);
backdrop-filter: blur(toRpx(8));
pointer-events: auto;
animation: show-info-box 0.25s forwards;
animation: left-in 0.25s forwards;
.nav-bar {
width: 100%;
height: toRpx(96);
......@@ -476,27 +476,11 @@ export default {
}
}
.backClass {
animation: back 0.25s forwards;
animation: left-out 0.25s forwards;
}
.popup {
pointer-events: auto;
}
@keyframes show-info-box {
0% {
left: 100%;
}
100% {
left: toRpx(240);
}
}
@keyframes back {
0% {
left: toRpx(240);
}
100% {
left: 100%;
}
}
}
.show-box {
......
<template>
<view class="line-bar-box">
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.line-bar-box{
height: 388rpx;
box-sizing: border-box;
padding: 24rpx;
}
</style>
\ No newline at end of file
<template>
<view class="output-value-box"></view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.output-value-box{
height: 366rpx;
}
</style>
\ No newline at end of file
<template>
<view class="reception-box">
<view :class="['record-box-content',{'hide-record':!showRecord}]">
<view class="left box-class">
<view class="common-title">
业绩看板
<view
:class="['sprite-icon',`icon-eyes-${dataShow?'on':'off'}`]"
@click="dataShow = !dataShow"
></view>
<view class="time-box flex">
时间进度
<view class="time-bar">
<view
class="time-line"
:style="{ width: timeProgress + '%' }"
></view>
</view>
<view class="progress">
{{timeProgress }}%
</view>
</view>
</view>
<view class="customer-box box">
<customer-flow />
</view>
<view class="linebar-box box">
<line-bar />
</view>
<view class="box">
<output-value />
</view>
</view>
<view class="right box-class">
<view class="type-box">
<view
class="tab-item"
v-for="(i, index) in typeList"
:key="index"
@click="tabIndex = index"
>
<view :class="['sprite-icon',tabIndex == index ? `icon-${firstClass[index]} active` : '', firstLeft[index]]"></view>
<view
class="text"
:class="[tabIndex == index ? `active` : '']"
>
{{ i.tabName }}
</view>
</view>
</view>
<view :class="['right-content']">
<customer-file />
</view>
<!-- <view class="right-content">
<record-list
@openRecordPage="openRecordPage"
ref="recordListRef"
/>
</view> -->
</view>
</view>
<template v-if="!showRecord">
<view :class="['save-record-box',backClass]">
<save-record
@cancel="handleCancel"
@submit="handleSubmit"
:customerInfoVal="customerInfo"
></save-record>
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs'
import CustomerFlow from './CustomerFlow.vue'
import LineBar from './LineBar.vue'
import OutputValue from './OutputValue.vue'
import RecordList from './RecordList.vue'
import saveRecord from './saveRecord.vue'
import CustomerFile from './CustomerFile.vue'
export default {
components: {
CustomerFlow,
LineBar,
OutputValue,
RecordList,
saveRecord,
CustomerFile
},
name: '',
data () {
return {
backClass: '',
showRecord: true,
customerInfo: {},
dataShow: true,
timeProgress: '',
tabIndex: 0,
typeList: Object.freeze([
{ tabName: '客户预录' },
{ tabName: '接待复盘' },
]),
firstLeft: Object.freeze(['first', 'second']),
firstClass: Object.freeze(['first-nav', 'second-nav']),
}
},
mounted () {
this.setTimeProgress()
},
methods: {
setTimeProgress () {
let nowNum = dayjs().date(),
monthDayNum = dayjs().daysInMonth()
this.timeProgress = parseInt(nowNum / monthDayNum * 100)
},
changeType (index, name) {
if (this[name] == index) return // 点击同一个
},
openRecordPage (item) {
this.showRecord = false
this.customerInfo = item
},
handleCancel () {
this.backClass = 'backClass'
setTimeout(() => {
this.showRecord = true;
this.backClass = ''
}, 300)
},
handleSubmit (val) {
this.handleCancel()
this.$refs.recordListRef.submitRecord(val)
},
}
}
</script>
<style scoped lang='scss'>
.reception-box {
.record-box-content {
position: relative;
height: 100vh;
box-sizing: border-box;
padding: 64rpx 0 80rpx;
display: flex;
gap: 0 48rpx;
visibility: visible;
transition: all .15s;
opacity: 1;
}
.hide-record {
opacity: 0;
z-index: -1;
visibility: hidden;
}
.box-class {
height: 100%;
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
overflow: hidden;
}
.left {
width: 656rpx;
.common-title {
.sprite-icon {
margin-left: 16rpx;
zoom: 1.5;
}
.time-box {
position: absolute;
left: 48rpx;
bottom: 8rpx;
color: #999999;
font-size: 20rpx;
.time-bar {
width: 200rpx;
height: 16rpx;
border-radius: 8rpx;
background: #ffffff;
overflow: hidden;
margin: 0 12rpx;
.time-line {
height: 100%;
border-radius: 8rpx;
background: linear-gradient(90deg, #75bcff 0%, #2c66f7 100%);
}
}
.progress {
color: #4673ff;
font-weight: 500;
}
}
}
.box {
border-radius: 32rpx;
background: #ffffff;
backdrop-filter: blur(16rpx);
box-shadow: inset 0 0 16rpx 0 #ffffff;
margin: 20rpx 32rpx 0;
}
.customer-box {
margin: 24rpx 32rpx 20rpx;
}
}
.right {
width: 1354rpx;
&-content {
border-radius: 48rpx;
background: #ffffff;
height: calc(100% - 128rpx);
transform: translateY(-32rpx);
}
.type-box {
position: relative;
display: flex;
width: 100%;
background-color: #eef4fe;
height: toRpx(160);
line-height: toRpx(128);
border-radius: toRpx(48) toRpx(48) 0 0;
overflow: hidden;
z-index: 0;
.tab-item {
width: toRpx(400);
text-align: center;
font-weight: 500;
font-size: toRpx(40);
color: #1f2133;
.first {
left: 0;
}
.second {
left: toRpx(352);
}
.three {
left: toRpx(756);
}
.text {
position: relative;
text-align: center;
width: toRpx(400);
}
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 700;
font-size: toRpx(40);
color: #2c66f7;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #2c66f7;
border-radius: toRpx(16);
}
}
}
}
}
.save-record-box {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
animation: left-in 0.25s forwards;
}
.backClass {
animation: left-out 0.25s forwards;
}
@keyframes left-in {
0% {
left: 100%;
}
100% {
left: 0;
}
}
@keyframes left-out {
0% {
left:0;
}
100% {
left: 100%;
}
}
}
</style>
<template>
<div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</style>
\ No newline at end of file
......@@ -91,7 +91,7 @@
</view>
</template>
<template v-if="nothing">
<view class="end-text">到底了!</view>
<view class="end-text">-已经到底了-</view>
</template>
</scroll-view>
</view>
......
......@@ -19,46 +19,48 @@
@click.stop="closeTips"
>{{tipsObject.text}}</view>
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
<view
class="start"
@click="$emit('start')"
>
<view class="sprite-icon icon-start-text"></view>
</view>
<view class="right-content-box flex">
<view class="content-left">
<view class="module-box box-class">
<view class="common-title">产品介绍</view>
<view class="content-box">
<slot name="module" />
</view>
</view>
<view class="tool-box box-class">
<view class="common-title">展业工具</view>
<view class="content-box">
</view>
<view :class="['app-content-box right-content',{'show-content-box':tabIndex == 0}]">
<view
class="start"
@click="$emit('start')"
>
<view class="sprite-icon icon-start-text"></view>
</view>
<view class="right-content-box flex">
<view class="content-left">
<view class="module-box box-class">
<view class="common-title">产品介绍</view>
<view class="content-box">
<swiper-component
:moduleList="moduleList"
@click="swiperClick"
:stopAutoPlay="previewOff"
></swiper-component>
</view>
</view>
<view class="content-right box-class">
<view class="common-title">服务中心</view>
<view class="tool-box box-class">
<view class="common-title">展业工具</view>
<view class="content-box">
</view>
</view>
</view>
<view class="content-right box-class">
<view class="common-title">服务中心</view>
<view class="content-box">
</view>
</view>
</view>
</template>
<template v-else-if="tabIndex == 99">
</view>
<view :class="['app-content-box right-content',{'show-content-box':tabIndex == 99}]">
<component
:is="'Point'"
ref="pointRef"
:userInfo="userInfo"
@showPage="handleShowPage"
/>
</template>
<template v-else>
</view>
<template v-if="tabIndex != 0 && tabIndex != 99">
<component
:is="componentName"
ref="pointRef"
......@@ -67,13 +69,13 @@
:isPermissionFunction="isPermission"
/>
</template>
<view
class="store-addr"
v-if="footerBox"
>
<view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view>
</view>
<view
class="store-addr"
v-if="footerBox"
>
<view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view>
</view>
<view :class="['detail', { show: id }]">
......@@ -93,12 +95,12 @@
<!-- 未点击开始接待,弹窗 -->
<MessageBox
ref="previewRef"
@confirm="$emit('preview')"
@confirm="previewHandler('preview',true)"
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
@cancel="previewHandler('previewCancel')"
@close="previewHandler('previewClose')"
></MessageBox>
<!-- 停留弹框 -->
<!-- <MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox> -->
......@@ -147,14 +149,13 @@
</view>
</template>
<script>
import RecordList from './components/RecordList.vue'
import AIBazaar from './components/AIBazaar.vue'
import ReceptionCenter from './components/ReceptionCenter/index.vue'
import SceneMarket from './components/SceneMarket/index.vue'
// import myClick from '@/mixin/click'
import timeout from '@/mixin/timeout'
import recorder from '@/mixin/record/recorder'
import uploader from '@/mixin/record/uploader.js'
import versionCheck from '@/mixin/versionCheck.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'
......@@ -169,15 +170,20 @@ import History from './components/Income/History.vue'
import merge from '@/mixin/record/merge.js'
import MessageDetail from './components/Message/MessageDetail.vue'
import StudyCenter from './components/StudyCenter.vue'
import SwiperComponent from '../SwiperComponent.vue'
export default {
mixins: [recorder, uploader, timeout, versionCheck, merge],
components: { RecordList, StudyCenter, AIBazaar, CustomerFile, LeftSide, Point, dayPoint, rulePoint, Course, Ranking, LevelPoint, Calendar, Promotion, History, LevelMedal, MessageDetail },
components: { ReceptionCenter, StudyCenter, SceneMarket, LeftSide, Point, dayPoint, rulePoint, Course, Ranking, LevelPoint, Calendar, Promotion, History, LevelMedal, MessageDetail, SwiperComponent },
props: {
id: [String, Number],
finishDoneText: String,
finishContene: {
type: String,
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
},
moduleList: {
type: Array,
default: () => []
}
},
data () {
......@@ -191,7 +197,9 @@ export default {
userInfo: {},
tabIndex: 0,
showBeisen: false,
tipsObject: {}
tipsObject: {},
autoplay: true,
previewOff: false,
}
},
mounted () {
......@@ -213,15 +221,16 @@ export default {
return this.$refs.finish
},
componentName () {
console.log(this.$refs.leftBox.tabs, this.tabIndex, this.$refs.leftBox.tabs[this.tabIndex].name)
return this.$refs.leftBox.tabs[this.tabIndex].name
let tabs = this.$refs.leftBox?.tabs
return tabs ? tabs[this.tabIndex].name : ''
}
},
methods: {
async changeTab ($event, jumpUrl) {
this.$emit('changeTab', $event)
async changeTab ({ item, jumpUrl, index }) {
this.previewOff = index != 0
this.$emit('changeTab', index)
this.showBeisen = false
if ($event.isTrack) {
if (item.isTrack) {
this.jumpUrl = jumpUrl
if (!this.jumpUrl) {
uni.showToast({
......@@ -347,8 +356,15 @@ export default {
style: '',
text: ''
}
}
},
swiperClick (e) {
this.previewOff = true
this.$emit('swiperClick', e)
},
previewHandler (name, off = false) {
this.previewOff = off
this.$emit(name)
},
}
}
</script>
......@@ -401,6 +417,43 @@ export default {
.home {
display: flex;
height: 100vh;
position: relative;
.store-addr {
position: absolute;
left: 50%;
bottom: toRpx(24);
transform: translateX(-50%);
display: flex;
align-items: center;
.icon-addr {
width: toRpx(32);
height: toRpx(32);
flex-shrink: 0;
}
.addr-text {
font-size: toRpx(24);
color: #999999;
word-wrap: break-word;
white-space: normal;
line-height: toRpx(32);
margin-left: toRpx(4);
flex-shrink: 0;
}
&::before,
&::after {
content: '';
width: toRpx(600);
height: toRpx(2);
margin: 0 toRpx(40);
}
&::before {
background-image: linear-gradient(270deg, #eeeeee 0%, #d8d8d800 100%);
}
&::after {
background-image: linear-gradient(90deg, #eeeeee 0%, #d8d8d800 100%);
}
}
}
.show {
position: absolute;
......@@ -464,6 +517,7 @@ export default {
overflow: hidden;
}
.content-box {
position: relative;
width: 100%;
height: calc(100% - #{toRpx(120)});
}
......@@ -477,7 +531,7 @@ export default {
height: toRpx(664);
margin-bottom: toRpx(48);
}
.tool-box{
.tool-box {
height: calc(100% - #{toRpx(712)});
}
}
......@@ -485,43 +539,16 @@ export default {
width: toRpx(800);
}
}
.store-addr {
.app-content-box {
position: absolute;
left: 50%;
bottom: toRpx(24);
transform: translateX(-50%);
display: flex;
align-items: center;
margin-top: toRpx(38);
.icon-addr {
width: toRpx(32);
height: toRpx(32);
flex-shrink: 0;
}
.addr-text {
font-size: toRpx(24);
color: #999999;
word-wrap: break-word;
white-space: normal;
line-height: toRpx(32);
margin-left: toRpx(4);
flex-shrink: 0;
}
&::before,
&::after {
content: '';
width: toRpx(600);
height: toRpx(2);
margin: 0 toRpx(40);
}
&::before {
background-image: linear-gradient(270deg, #eeeeee 0%, #d8d8d800 100%);
}
&::after {
background-image: linear-gradient(90deg, #eeeeee 0%, #d8d8d800 100%);
}
left: 0;
top: 0;
opacity: 0;
z-index: -999;
}
.show-content-box {
opacity: 1;
z-index: 1;
}
}
.footer {
......
<template>
<view class="select-box">
<view
class="select"
@click.stop="isSelect = !isSelect"
>
{{selectList[selectIndex].label}}
<view class="sprite-icon icon-arrow-bottom"></view>
</view>
<view
class="pop-box"
v-if="isSelect"
>
<view
v-for="(i,index) in selectList"
:key="index"
class="type-item"
:class="index == selectIndex ? 'active' : ''"
@click="chooseType(index, i)"
>{{i[labelKey]}}</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
selectList: Array,
labelKey: {
type: String,
default: 'label'
}
},
name: '',
data () {
return {
selectIndex: 0,
isSelect: false
}
},
mounted () {
},
methods: {
hideSelect () {
this.isSelect = false
},
chooseType (index, item) {
this.selectIndex = index
this.isSelect = false
this.$emit('chooseType', { item, index })
},
}
}
</script>
<style scoped lang='scss'>
.select-box {
position: relative;
z-index: 5;
.select {
display: flex;
align-items: center;
justify-content: flex-end;
height: 84rpx;
border-radius: 16rpx;
opacity: 1;
background: #f2f2f2;
padding: 0 24rpx 0 40rpx;
}
.arrow-bottom {
width: toRpx(48);
height: toRpx(48);
}
.pop-box {
position: absolute;
top: 100rpx;
left: 0;
width: 100%;
background: #ffffff;
box-shadow: 0 0 16rpx 0 #99999933;
border-radius: toRpx(16);
padding: toRpx(16) 0;
text-align: center;
animation: show-view-opacity 0.15s forwards;
.type-item {
padding: 0 toRpx(24);
margin-bottom: toRpx(8);
height: toRpx(48);
line-height: toRpx(48);
&:last-child {
margin-bottom: 0;
}
&.active {
background-color: #ecf1ff;
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="swiper-box">
<view
class="swiper-carousel"
@touchstart="starts"
@touchend="ends"
>
<template v-for="(item,index) in imagelist">
<view
:key="index"
class="carousel-block"
@click.stop="changeBlock(item)"
:style="{
left:item.left,
top:item.top,
zIndex:item.zIndex,
width:item.width,
height:item.height,
transition:item.transition+'s all',
}"
>
<image
class="image-block"
:src="item.imgKey"
@load="item.hide = true"
/>
<view :class="['error-block',{hide:item.hide}]">
<uni-icons
:type="icon"
:size="size"
color="#909399"
></uni-icons>
</view>
</view>
</template>
</view>
<view class="module-title flex">
{{moduleTitle}}
<view class="module-dots flex">
<template v-for="(i,index) in moduleList">
<div
:class="['dot', {'active': index == currentIndex}]"
:key="index"
>
</div>
</template>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'SwiperComponent',
props: {
moduleList: {
type: Array,
default: () => []
},
imgKey: {
type: String,
default: 'thumbnail'
},
icon: {
type: String,
default: 'image'
},
size: {
type: [Number, String],
default: '40'
},
interval: {
type: [Number, String],
default: 3000
},
autoplay: {
type: Boolean,
default: true
},
stopAutoPlay: {
type: Boolean,
default: false
},
},
watch: {
moduleList: {
handler (val) {
if (val.length && !this.imagelist.length) this.getDatalist()
},
deep: true
},
stopAutoPlay: {
handler (val) {
if (this.autoplay && !val) this.autoPlayFunction()
},
deep: true
}
},
computed: {
moduleTitle () {
return this.moduleList[this.currentIndex]?.detailTitle
}
},
created () {
// this.getDatalist()
},
data () {
return {
datalist: [],
imagelist: [],
ismove: 0,
currentIndex: 0,
autoPlayTimer: null,
endTimer: null,
playStatus: true,
style_object: Object.freeze([
{ index: 0, left: '150rpx', top: '68rpx', height: '306rpx', width: '468rpx', zIndex: 15, transition: 0.1 },
{ index: 1, left: '294rpx', top: '16rpx', height: '408rpx', width: '624rpx', zIndex: 20, transition: 0.3 },
{ index: 2, left: '592rpx', top: '68rpx', height: '306rpx', width: '468rpx', zIndex: 15, transition: 0.1 }
])
}
},
beforeDestroy () {
// 组件销毁时清理自动播放定时器
if (this.autoPlayTimer) {
clearTimeout(this.autoPlayTimer);
this.autoPlayTimer = null;
}
},
methods: {
getDatalist () {
if (this.moduleList) {
this.datalist = JSON.parse(JSON.stringify(this.moduleList))
let num = 3
let diff = num - this.moduleList.length
if (diff > 0) {
for (let i = 0; i < diff; i++) {
let obj = {}
obj[this.imgKey] = ''
this.datalist.push(obj)
}
}
this.getImagelist()
}
},
getImagelist () {
let { datalist, autoplay } = this
this.imagelist = JSON.parse(JSON.stringify(this.style_object))
this.imagelist.forEach((item, index) => {
const dataIndex = index - 1 < 0 ? datalist.length - 1 : index - 1
item.isIndex = dataIndex
item.isToor = index
item.imgKey = datalist[dataIndex]?.[this.imgKey] || ''
item.scale = 1
item.translateX = 0
})
if (autoplay) this.autoPlayFunction()
},
autoPlayFunction () {
if (this.stopAutoPlay || !this.playStatus) {
if (this.autoPlayTimer) {
clearTimeout(this.autoPlayTimer);
this.autoPlayTimer = null;
}
return;
}
// 设置新的自动播放定时器
this.autoPlayTimer = setTimeout(() => {
// 再次检查是否需要停止播放
if (this.stopAutoPlay || !this.playStatus) {
clearTimeout(this.autoPlayTimer);
this.autoPlayTimer = null;
return;
}
// 执行轮播动画并递归调用自身
this.updateCarouselPositions();
this.autoPlayFunction();
}, this.interval);
},
updateCarouselPositions (direction = 'left') {
let { imagelist, datalist } = this,
len = datalist.length - 1,
index = direction == 'left' ? 0 : 2,
list = JSON.parse(JSON.stringify(this.style_object))
this.imagelist.forEach(item => {
let toor = direction == 'left' ?
(item.isToor - 1) < 0 ? imagelist.length - 1 : item.isToor - 1
: (item.isToor + 1) > imagelist.length - 1 ? 0 : item.isToor + 1
item.isToor = toor
const style = list[toor]
Object.assign(item, {
transition: style.transition,
left: style.left,
top: style.top,
width: style.width,
height: style.height,
zIndex: style.zIndex,
scale: 1,
translateX: 0
})
if (item.index == index) {
let isIndex = item.isIndex + 3
if (isIndex == len + 3) isIndex = 2
if (isIndex == len + 1) isIndex = 0
if (isIndex > len) isIndex = 1
item.isIndex = isIndex
item.imgKey = datalist[isIndex][this.imgKey] || ''
}
item.index = list[toor].index
})
let currentIndex = this.imagelist.findIndex(item => item.index == 1)
this.currentIndex = this.imagelist[currentIndex].isIndex
},
changeBlock (item) {
let toor = item.isToor
if (toor === 0) this.updateCarouselPositions('right')
if (toor == 2) this.updateCarouselPositions()
this.$emit('click', item.isIndex)
},
starts (e) {
this.ismove = e.touches[0].pageX
this.playStatus = false
if (this.endTimer) {
clearInterval(this.endTimer)
this.endTimer = null
}
},
ends (e) {
let pageX = e.changedTouches[0].pageX
let nums = this.ismove - pageX
if (nums > 50) this.updateCarouselPositions()
if (nums < -50) this.updateCarouselPositions('right')
if (this.endTimer) {
clearInterval(this.endTimer)
this.endTimer = null
return
}
this.endTimer = setTimeout(() => {
this.playStatus = true
this.autoPlayFunction()
}, this.interval)
},
}
}
</script>
<style lang="scss" scoped>
.swiper-carousel {
width: 100%;
height: 428rpx;
position: relative;
overflow: hidden;
.carousel-block {
position: absolute;
border-radius: 10upx;
overflow: hidden;
box-shadow: 0 0 5px #0000001a;
transition: all 0.2s ease; /* 添加过渡 */
border: 1.5rpx solid #ffffffb3;
box-shadow: 0 3rpx 12rpx 0 #5294ff33;
border-radius: 24rpx;
.image-block {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-size: 100% 100%;
z-index: 5;
}
.error-block {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #f5f7fa;
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
}
.hide {
opacity: 0;
}
}
}
.module-title {
color: #333333;
font-size: 24rpx;
margin-top: 24rpx;
justify-content: center;
position: relative;
.module-dots {
position: absolute;
top: 50%;
right: 48rpx;
transform: translateY(-50%);
gap: 12rpx;
.dot {
width: 12rpx;
height: 12rpx;
opacity: 1;
background: #0007400d;
}
.active {
background: #fff;
}
}
}
</style>
......@@ -108,7 +108,7 @@
</template>
</view>
<template v-if="nothing">
<view class="end-text">到底了!</view>
<view class="end-text">-已经到底了-</view>
</template>
</scroll-view>
</view>
......
......@@ -9,110 +9,10 @@
finishDoneText="下一步"
finishContene="当前操作是为强制退出接待,若完成客户接待请点击「下一步」。"
@previewCancel="cancel"
@previewClose="previewOff = false"
class="container"
:moduleList="moduleList"
@swiperClick="toDetail"
>
<template slot="module">
<view class="module-box">
<view class="module-flex flex">
<template v-for="(i, index) in moduleList">
<view
class="item flex"
:key="index"
v-if="!i.hide"
@click="toDetail(i)"
>
<image
:src="i.thumbnail"
class="icon"
/>
{{ i.title }}
<template v-if="i.count">
<div class="count">
{{i.count}}
</div>
</template>
</view>
</template>
</view>
<view class="center-bg"></view>
<view class="banner-tab-scroll">
<scroll-view
class="banner-tab-box-content"
scroll-x
:scroll-into-view="bannerTabId"
scroll-with-animation
>
<view class="banner-tab-box flex">
<template v-for="(item, index) in carBannerList">
<view
:class="['banner-item',{'has-title':showCarBrand(item,index)},{'is-first':index == 0}]"
:key="index"
:id="`car-banner-${index}`"
>
<view class="banner-title">{{item.title}}</view>
<view
:class="['banner-tab', `${currentIndex == index ? 'active' : ''}`]"
@click="changeIndex(index)"
>
{{ item.name }}
</view>
</view>
</template>
<view class="block"></view>
</view>
</scroll-view>
<view class="banner-tab-mask"></view>
</view>
<swiper
class="swiper"
circular
interval="3000"
previous-margin="380rpx"
next-margin="448rpx"
@change="swiperChange"
:current="currentIndex"
:autoplay="bannerAutoplay && !previewOff"
>
<!-- :autoplay="bannerAutoplay && !previewOff" -->
<template v-for="(item, index) in carBannerList">
<swiper-item
:key="index"
:class="['swiper-item flex', carClass(index)]"
@click.prevent="clickCar(item, index)"
>
<image
:src="item.url"
class="car-item"
/>
<template v-if="currentIndex == index">
<view class="config-box">
<template v-for="(i, ind) in item.configList">
<view
:class="['config-item', i.class]"
:key="ind"
@click.stop="toDetail({ id: 1, tabId: i.tabId })"
>
<view class="config-dots"></view>
<view class="config-name flex">
<view :class="['sprite-icon', `icon-${i.icon}`]"></view>
{{ i.name }}
</view>
</view>
</template>
</view>
</template>
</swiper-item>
</template>
</swiper>
<view class="tips">
窗膜精品,更有整车搭配套餐火爆售卖。
<view>点击了解更多&gt;</view>
</view>
</view>
</template>
<template slot="detail">
<detail
:id.sync="id"
......@@ -308,16 +208,15 @@ export default {
this.moduleList = moduleList
this.toolList = toolList
this.defaultCarId = defaultCarId
this.getInviteRecordCount()
// this.getInviteRecordCount()
},
toDetail (item) {
toDetail (index) {
let item = this.moduleList[index]
this.chooseItem = item
this.$refs.home.previewRef.open();
this.previewOff = true
},
cancel () {
this.$refs.home.previewRef.close();
this.previewOff = false
},
preview () {
let { id, tabId } = this.chooseItem;
......@@ -325,6 +224,8 @@ export default {
this.id = id;
this.tabId = tabId
this.currentCarId = this.carBannerList[this.currentIndex].carModelId
console.log(id)
},
back () {
if (!this.id) return uni.navigateBack();
......@@ -346,7 +247,6 @@ export default {
this.type = "";
this.currentCarId = ''
this.bannerAutoplay = true
this.previewOff = false
this.customerType = -1
this.clearHistory();
this.recording = false
......
......@@ -93,7 +93,7 @@
</template>
</view>
<template v-if="nothing">
<view class="end-text">到底了!</view>
<view class="end-text">-已经到底了-</view>
</template>
</scroll-view>
</view>
......
......@@ -158,7 +158,7 @@
</view>
</template>
<view class="content-end">到底了!</view>
<view class="content-end">-已经到底了-</view>
</scroll-view>
</view>
</view>
......
<template>
<view class="box">
<template v-for="(item, index) in sceneList">
<view :key="index" :class="['items', `${item.actived ? 'active' : ''}`]" @click="selectScene(item, index)">
<view
:key="index"
:class="['items', `${item.actived ? 'active' : ''}`]"
@click="selectScene(item, index)"
>
<view class="left">
<view :class="['sprite-icon', `icon-scene-${item.sceneType}`]"></view>
</view>
......@@ -63,7 +67,9 @@ export default {
merchantId: userInfo?.shopMerchantId
}).then(result => {
uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
result.map(val => {
if (val.sceneOpenFlag == 0) this.openSceneArr.push(val.scene)
})
}).catch(() => {
uni.hideLoading()
})
......@@ -71,7 +77,7 @@ export default {
// 选择场景
async selectScene ({ sceneType }, index) {
uni.$logger.local.info(`选择场景${sceneType}!`)
let { sceneList, openSceneArr, userInfo } = this
let { sceneList, openSceneArr, userInfo } = this
try {
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景',
......@@ -81,6 +87,7 @@ export default {
sceneList[index].actived = true
this.sceneList = sceneList
userInfo.sceneType = sceneType
userInfo.openSceneArr = openSceneArr
uni.showLoading({
mask: true
})
......@@ -106,7 +113,7 @@ export default {
uni.$logger.local.error(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
}
},
jump:utils.throttle( async function (userInfo, data) {
jump: utils.throttle(async function (userInfo, data) {
uni.$logger.local.info(`跳转进入首页!`)
try {
uni.hideLoading()
......@@ -138,7 +145,7 @@ export default {
icon: 'none'
})
}
},3000)
}, 3000)
}
}
</script>
......
......@@ -78,7 +78,7 @@
</template>
</template>
<template v-if="nothing">
<view class="end-text">到底了!</view>
<view class="end-text">-已经到底了-</view>
</template>
</view>
</scroll-view>
......@@ -95,7 +95,7 @@
<script type="text/ecmascript-6">
import dayjs from 'dayjs'
import PackagePopup from './components/PackagePopup.vue'
import CaseItem from '@/components/HomeFrame/components/CaseItem.vue'
import CaseItem from '@/components/HomeFrame/components/ReceptionCenter/CaseItem.vue'
export default {
components: {
PackagePopup,
......
......@@ -82,7 +82,7 @@
</view>
</template>
<template v-if="nothing">
<view class="end-text">到底了!</view>
<view class="end-text">-已经到底了-</view>
</template>
</scroll-view>
</view>
......
......@@ -65,7 +65,7 @@
</template>
</block>
</block>
<view class="safeAreaInset">到底了!</view>
<view class="safeAreaInset">-已经到底了-</view>
</template>
<template v-else>
<view class="nothing flex">
......
......@@ -8,32 +8,9 @@
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
:moduleList="moduleList"
@swiperClick="toDetail"
>
<view
class="module-box"
slot="module"
>
<!-- <template v-for="(i, index) in moduleList">
<view
:key="index"
:class="['item']"
@click="toDetail(i)"
v-if="!i.hide"
>
<template v-if="!i.thumbnail">
<view class="item-text flex">{{ i.title || i.detailTitle }}</view>
</template>
<template v-else>
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
@error="errorImg(index)"
/>
</template>
</view>
</template> -->
</view>
<template slot="detail">
<detail
:id.sync="id"
......@@ -72,7 +49,6 @@ export default {
id: '',
type: '',
chooseItem: {},
tabIndex: 0,
recording: false,
aitoCarModelIds: [],
mediaId: '',
......@@ -196,7 +172,8 @@ export default {
uni.hideLoading()
}, 1e3)
},
toDetail (item) {
toDetail (index) {
let item = this.moduleList[index]
this.chooseItem = item
this.$refs.home.previewRef.open()
},
......@@ -281,7 +258,6 @@ export default {
this.$store.dispatch('setPaymentType', paymentType)
},
changeTab (index) {
this.tabIndex = index
if (index == 0) this.init()
},
......
......@@ -162,4 +162,20 @@ $margin: 0 calc((100vmax - #{$detailVW}) / 2);
filter: blur(toRpx(24));
}
}
@keyframes left-in {
0% {
left: 100%;
}
100% {
left: toRpx(240);
}
}
@keyframes left-out {
0% {
left: toRpx(240);
}
100% {
left: 100%;
}
}
\ 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!