Commit 9a47f6af by 胡悦

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

2 parents c018a133 4f1beab4

2.61 MB | W: | H:

2.41 MB | W: | H:

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

120 KB | W: | H:

50.3 KB | W: | H:

assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
  • 2-up
  • Swipe
  • Onion skin

165 KB | W: | H:

121 KB | W: | H:

assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<uni-popup <uni-popup
ref="customer" ref="centerPopupRef"
type="center" type="center"
:is-mask-click="false" :is-mask-click="false"
animation animation
class="customerPopup" class="center-popup"
> >
<view class="box"> <view class="box">
<view class="title flex"> <view class="title flex">
<view class="text">请选择当前洽谈的客户类型</view> <view class="text">{{title}}</view>
<view <view
class="icon-close-box flex" class="icon-close-box flex"
@click="close" @click="close"
...@@ -22,13 +22,19 @@ ...@@ -22,13 +22,19 @@
</view> </view>
</view> </view>
<view class="content flex"> <view class="content flex">
<template v-for="(i,index) in typeList"> <template v-for="(i,index) in list">
<view <view
class="item flex" class="item flex"
:key="index" :key="index"
@click="choose(index)" @click="choose(index)"
> >
<view :class="['sprite-icon',i.icon]"></view> <template v-if="tag && i.id == id">
<view class="tag flex">{{tag}}</view>
</template>
<view
:class="['sprite-icon',i.icon]"
:style="{zoom: i.zoom || 1}"
></view>
<view class="item-title">{{i.title}}</view> <view class="item-title">{{i.title}}</view>
<text class="item-describe">{{i.describe}}</text> <text class="item-describe">{{i.describe}}</text>
</view> </view>
...@@ -41,35 +47,31 @@ ...@@ -41,35 +47,31 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: 'CustomerType', name: 'CenterPopup',
props: {
list: Array,
title: String,
tag: String,
id: [Number, String]
},
data () { data () {
return { return {
typeList: [
{
title: '回店客户',
describe: '客户已领精品券且已上牌完成\n交付安排客户当日回店提车',
icon: 'icon-customer-1'
}, {
title: '现场客户',
describe: '客户未领取精品券\n首次到店',
icon: 'icon-customer-2'
}
]
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
open () { open () {
this.$refs.customer.open(); this.$refs.centerPopupRef.open();
}, },
close () { close () {
this.$refs.customer.close(); this.$refs.centerPopupRef.close();
this.$emit('cancel') this.$emit('cancel')
}, },
choose: uni.$throttle(function (index) { choose: uni.$throttle(function (index) {
this.$emit('choose', index) this.$emit('choose', index)
this.$refs.customer.close(); this.$refs.centerPopupRef.close();
}, 200) }, 200)
} }
...@@ -77,18 +79,18 @@ export default { ...@@ -77,18 +79,18 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.customerPopup { .center-popup {
z-index: 99 !important; z-index: 99 !important;
} }
.box { .box {
width: toRpx(1920); width: toRpx(1400);
height: toRpx(1120); height: toRpx(928);
background: #ffffff; background: #ffffff;
border-radius: toRpx(48); border-radius: toRpx(48);
.title { .title {
width: 100%; width: 100%;
height: toRpx(160); height: toRpx(160);
background-image: url("@/assets/images/boutique/customer-type-bg.webp"); background: url('@/assets/images/boutique/customer-type-bg.webp') no-repeat;
background-size: 100%; background-size: 100%;
position: relative; position: relative;
.text { .text {
...@@ -119,25 +121,38 @@ export default { ...@@ -119,25 +121,38 @@ export default {
border-radius: toRpx(48); border-radius: toRpx(48);
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
padding-top: toRpx(112); padding-top: toRpx(92);
position: relative; position: relative;
&::before, overflow: hidden;
&::after { .tag {
content: "";
position: absolute; position: absolute;
width: 192rpx;
height: 72rpx;
border-radius: 0 0 toRpx(48) 0;
background: #4673ff1a;
left: 0; left: 0;
width: 100%;
background: #edf5ff;
filter: blur(toRpx(40));
}
&::before {
top: 0; top: 0;
height: toRpx(62); color: #4673ff;
} font-size: 28rpx;
&::after { justify-content: center;
bottom: 0;
height: toRpx(126);
} }
// &::before,
// &::after {
// content: '';
// position: absolute;
// left: 0;
// width: 100%;
// background: #edf5ff;
// filter: blur(toRpx(40));
// }
// &::before {
// top: 0;
// height: toRpx(62);
// }
// &::after {
// bottom: 0;
// height: toRpx(126);
// }
&-title { &-title {
font-weight: 500; font-weight: 500;
font-size: toRpx(40); font-size: toRpx(40);
......
...@@ -49,7 +49,10 @@ ...@@ -49,7 +49,10 @@
></view> ></view>
</view> --> </view> -->
<template v-if="showSceneChange"> <template v-if="showSceneChange">
<view class="btn"> <view
class="btn"
@click="$refs.sceneTypeRef.open()"
>
<view class="sprite-icon icon-scene-change"></view> <view class="sprite-icon icon-scene-change"></view>
</view> </view>
</template> </template>
...@@ -73,6 +76,14 @@ ...@@ -73,6 +76,14 @@
ref="settingRef" ref="settingRef"
@stopAudio="$emit('stopAudio')" @stopAudio="$emit('stopAudio')"
/> />
<center-popup
:list="sceneTypeList"
ref="sceneTypeRef"
@choose="chooseSceneType"
title="选择场景"
tag="当前场景"
:id="userInfo.sceneType"
/>
</view> </view>
</template> </template>
...@@ -81,8 +92,9 @@ import KfBox from "./KfBox"; ...@@ -81,8 +92,9 @@ import KfBox from "./KfBox";
import MessagePop from "./MessagePop" import MessagePop from "./MessagePop"
import SettingBox from "./SettingBox"; import SettingBox from "./SettingBox";
import utils from '@/utils/utils' import utils from '@/utils/utils'
import CenterPopup from '@/components/CenterPopup.vue'
export default { export default {
components: { KfBox, SettingBox, MessagePop }, components: { KfBox, SettingBox, MessagePop, CenterPopup },
props: { props: {
tabIndex: Number, tabIndex: Number,
userInfo: Object userInfo: Object
...@@ -125,7 +137,22 @@ export default { ...@@ -125,7 +137,22 @@ export default {
collectTrack: false, collectTrack: false,
hasPerson: false, hasPerson: false,
messageType: 'study', messageType: 'study',
sopCount: 0 sopCount: 0,
sceneTypeList: Object.freeze([
{
title: '轻改',
describe: '太阳膜升级转化',
icon: 'icon-scene-1',
zoom: 2.91,
id: 1
}, {
title: '会员权益/升级',
describe: '权益延保',
icon: 'icon-scene-0',
zoom: 2.91,
id: 0
}
])
} }
}, },
watch: { watch: {
...@@ -366,6 +393,22 @@ export default { ...@@ -366,6 +393,22 @@ export default {
this.$emit('update:tabIndex', 99) this.$emit('update:tabIndex', 99)
} }
}, },
chooseSceneType (index) {
let { userInfo, sceneTypeList } = this
userInfo.sceneType = sceneTypeList[index].id
uni.showLoading({
title: '切换中',
mask: true
})
uni.$storage.set('userInfo', userInfo)
let url = {
1: '/pages/boutique/index',
0: '/pages/equity/index'
}[userInfo.sceneType]
uni.reLaunch({
url
})
}
}, },
beforeCreate () { beforeCreate () {
clearInterval(this.trackInterval) clearInterval(this.trackInterval)
......
...@@ -24,7 +24,10 @@ export default { ...@@ -24,7 +24,10 @@ export default {
type: Object, type: Object,
default: () => { } default: () => { }
}, },
dataShow: Boolean dataShow: {
type: Boolean,
default: true
}
}, },
name: '', name: '',
data () { data () {
...@@ -68,8 +71,8 @@ export default { ...@@ -68,8 +71,8 @@ export default {
font-size: 20rpx; font-size: 20rpx;
box-sizing: border-box; box-sizing: border-box;
flex-direction: column; flex-direction: column;
.num{ .num {
transition: all .15s; transition: all 0.15s;
} }
} }
.deliveries, .deliveries,
......
...@@ -22,9 +22,25 @@ export default { ...@@ -22,9 +22,25 @@ export default {
components: { components: {
PageTabs PageTabs
}, },
props: {
dataShow: {
type: Boolean,
default: true
}
},
watch: {
dataShow: {
immediate: true,
handler (newval) {
console.log(123)
this.getServerData()
}
}
},
name: '', name: '',
data () { data () {
return { return {
tabIndex: 0,
tabList: ['本月转化率', '本月客单价'], tabList: ['本月转化率', '本月客单价'],
chartData: {}, chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。 //您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
...@@ -32,7 +48,7 @@ export default { ...@@ -32,7 +48,7 @@ export default {
fontColor: '#333', fontColor: '#333',
fontSize: 10, fontSize: 10,
color: ["#2C66F7"], color: ["#2C66F7"],
padding: [9, 80, 0, 0], padding: [20, 80, 0, 0],
enableScroll: false, enableScroll: false,
legend: { legend: {
show: false show: false
...@@ -48,13 +64,11 @@ export default { ...@@ -48,13 +64,11 @@ export default {
bar: { bar: {
type: "group", type: "group",
width: 6, width: 6,
customColor: ['#389FFF', '#2C66F7'],
barColorList: [ barColorList: [
['#389FFF', '#2C66F7'], ['#389FFF', '#2C66F7'],
['#708DFF', '#6858F5'], ['#708DFF', '#6858F5'],
['#94CBFF', '#3283FB'] ['#94CBFF', '#3283FB']
], ],
barBorderRadius: [0, 2, 2, 0],
linearType: 'custom', linearType: 'custom',
barBorderCircle: true, barBorderCircle: true,
} }
...@@ -63,34 +77,34 @@ export default { ...@@ -63,34 +77,34 @@ export default {
} }
}, },
mounted () { mounted () {
this.getServerData();
}, },
methods: { methods: {
getServerData () { getServerData () {
//模拟从服务器获取数据时的延时 //模拟从服务器获取数据时的延时
setTimeout(() => { setTimeout(() => {
let { dataShow, tabIndex } = this,
series = {
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data: [11370, 12370, 10001],
}
if (tabIndex == 0) series.afterUnit = '%'
else series.beforeUnit = '¥'
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接 //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = { let res = {
categories: ['优秀门店均值', '本门店', '个人'], categories: ['优秀门店均值', '本门店', '个人'],
series: [ series: [series],
{ }
textSize: 14,
textColor: '#333',
data: [11370, 12370, 10001],
beforeUnit: '¥',
formatter (value) {
return `¥${value}`
}
}
],
};
this.chartData = JSON.parse(JSON.stringify(res)); this.chartData = JSON.parse(JSON.stringify(res));
}, 500); }, 100);
}, },
changeTab (index) { changeTab (index) {
this.tabIndex = index
this.getServerData()
} }
} }
} }
...@@ -106,7 +120,7 @@ export default { ...@@ -106,7 +120,7 @@ export default {
height: 64rpx; height: 64rpx;
} }
.canvas { .canvas {
height: 210rpx; height: 260rpx;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="output-value-box"></view> <view class="output-value-box">
<view class="output-value-title">本月产值</view>
<view class="output-value">
<view class="value">
{{formattedNumber('sumOutput')}}<view class="unit">万</view>
</view>
<view class="sub-value flex">
个人产值<view class="num">{{formattedNumber('output')}}万</view>
</view>
</view>
<view class="output-canvas">
<qiun-data-charts
type="arcbar"
:opts="opts"
:chartData="chartData"
/>
</view>
<view class="output-view flex">
<view class="item flex">目标<view class="num">{{formattedNumber('target')}}万</view>
</view>
<view class="item flex">达成比例<view class="num">{{formattedNumber('proportion','%')}}</view>
</view>
</view>
</view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: '',
data () { props: {
return { pageData: {
} type: Object,
default: () => { }
}, },
mounted () { dataShow: {
type: Boolean,
default: true
}
},
watch: {
dataShow: {
immediate: true,
handler (newval) {
this.getServerData()
}
}
},
data () {
return {
chartData: {},
opts: {
padding: undefined,
title: {
name: "产值贡献",
fontSize: 12,
color: "#333"
},
subtitle: {
name: "52%",
fontSize: 14,
color: "#4673FF"
},
extra: {
arcbar: {
type: "circle",
width: 11,
backgroundColor: "#4673ff1a",
startAngle: 1.5,
endAngle: 0.25,
gap: 2,
linearType: 'custom',
customColor: ['#2C66F7', '#389FFF']
}
}
}
}
},
mounted () {
},
methods: {
getServerData () {
//模拟从服务器获取数据时的延时
setTimeout(() => {
let { dataShow } = this
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
series: [
{
hideData: !dataShow,
data: 0.52
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 100);
}, },
methods: { formattedNumber (key, unit) {
let { dataShow, pageData } = this,
num = pageData[key]
if (unit && num) num += unit
if (!dataShow || !num) num = '--'
return num
} }
} }
}
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.output-value-box{ .output-value-box {
height: toRpx(366); height: toRpx(366);
position: relative;
.output-value-title {
font-size: toRpx(28);
font-weight: 500;
padding: toRpx(24) toRpx(32) 0;
}
.output-value {
padding: 54rpx 0 0 52rpx;
.value {
display: flex;
align-items: baseline;
color: #4673ff;
font-size: 40rpx;
line-height: 48rpx;
font-weight: 700;
margin-bottom: 14rpx;
.unit {
color: #333333;
font-size: 26rpx;
font-weight: 400;
margin-left: 4rpx;
line-height: 36rpx;
}
}
.sub-value {
color: #333333;
font-size: 24rpx;
.num {
color: #4673ff;
font-size: 28rpx;
font-weight: 700;
margin-left: 8rpx;
}
}
}
.output-canvas {
position: absolute;
right: 40rpx;
top: 60rpx;
width: 200rpx;
height: 200rpx;
}
.output-view {
position: absolute;
left: 50%;
bottom: 32rpx;
transform: translateX(-50%);
width: 528rpx;
height: 58rpx;
border-radius: 450rpx;
background: #4673ff0d;
color: #333333;
font-size: 24rpx;
&::after {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
content: '';
width: 2rpx;
height: 28rpx;
background: #cfd4e3;
}
.item {
justify-content: center;
width: 50%;
flex-shrink: 0;
.num {
margin-left: 8rpx;
color: #4673ff;
font-size: 28rpx;
font-weight: 700;
}
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
{{item.orderFinishFlag? '成交': '战败'}} {{item.orderFinishFlag? '成交': '战败'}}
</view> </view>
</template> </template>
<template v-else>
<view :class="['status flex disabled']">
{{isPrePage? '待提交': '待上传'}}
</view>
</template>
<view class="name"> <view class="name">
{{ item.customerName ? item.customerName : '未填写姓名' }} {{ item.customerName ? item.customerName : '未填写姓名' }}
</view> </view>
...@@ -94,7 +99,7 @@ export default { ...@@ -94,7 +99,7 @@ export default {
return { return {
tabList: Object.freeze([ tabList: Object.freeze([
{ text: '已提交' }, { text: '已提交' },
{ text: '未提交' }, { text: '未提交', dot: () => this.preRecordFailList.length },
]), ]),
orderTypeList: Object.freeze([ orderTypeList: Object.freeze([
{ label: '战败' }, { label: '战败' },
......
...@@ -28,10 +28,13 @@ ...@@ -28,10 +28,13 @@
/> />
</view> </view>
<view class="linebar-box box"> <view class="linebar-box box">
<line-bar /> <line-bar :dataShow="dataShow" />
</view> </view>
<view class="box"> <view class="box">
<output-value /> <output-value
:dataShow="dataShow"
:pageData="pageData"
/>
</view> </view>
</view> </view>
<view class="right box-class"> <view class="right box-class">
...@@ -136,7 +139,11 @@ export default { ...@@ -136,7 +139,11 @@ export default {
pageData: { pageData: {
deliveries: 1000000, deliveries: 1000000,
touchpoints: 100000, touchpoints: 100000,
touchpointRate: 1000.6 touchpointRate: 1000.6,
sumOutput: 188.88,
output: 88.88,
target: 2008,
proportion: 9
} }
} }
}, },
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
}" }"
> >
{{ i[tabKey] || i }} {{ i[tabKey] || i }}
<template v-if="i.dot && i.dot()">
<view class="dot"></view>
</template>
</view> </view>
</template> </template>
<view <view
...@@ -102,6 +105,15 @@ export default { ...@@ -102,6 +105,15 @@ export default {
font-size: toRpx(28); font-size: toRpx(28);
z-index: 10; z-index: 10;
position: relative; position: relative;
.dot {
position: absolute;
top: 4rpx;
right: 28rpx;
width: 12rpx;
height: 12rpx;
border-radius: 100%;
background: #f24724;
}
} }
.active { .active {
color: #333333; color: #333333;
...@@ -115,11 +127,5 @@ export default { ...@@ -115,11 +127,5 @@ export default {
transition: all 0.15s; transition: all 0.15s;
border-radius: toRpx(16); border-radius: toRpx(16);
} }
// .active-btn-0 {
// left: toRpx(4);
// }
// .active-btn-1 {
// left: toRpx(196);
// }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="swiper-box"> <view class="swiper-box">
<view <movable-area
class="swiper-carousel" class="swiper-carousel"
@touchstart="starts" @touchstart="starts"
@touchend="ends" @touchend="ends"
> >
<template v-for="(item,index) in imagelist"> <template v-for="(item,index) in imagelist">
<view <movable-view
:key="index" :key="index"
class="carousel-block" :class="['carousel-block',item.class]"
@click.stop="changeBlock(item)" @click.stop="changeBlock(item)"
:style="{ direction="horizontal"
left:item.left, @change="change"
top:item.top, :disabled="item.class != 'block-center'"
zIndex:item.zIndex, :x="item.class != 'block-center' ? 0 : viewX"
width:item.width,
height:item.height,
transition:item.transition+'s all',
}"
> >
<image <image
class="image-block" class="image-block"
...@@ -31,9 +27,9 @@ ...@@ -31,9 +27,9 @@
color="#909399" color="#909399"
></uni-icons> ></uni-icons>
</view> </view>
</view> </movable-view>
</template> </template>
</view> </movable-area>
<view class="module-title flex"> <view class="module-title flex">
{{moduleTitle}} {{moduleTitle}}
<view class="module-dots flex"> <view class="module-dots flex">
...@@ -49,6 +45,8 @@ ...@@ -49,6 +45,8 @@
</view> </view>
</template> </template>
<script> <script>
import utils from "@/utils/utils.js";
export default { export default {
name: 'SwiperComponent', name: 'SwiperComponent',
props: { props: {
...@@ -113,10 +111,12 @@ export default { ...@@ -113,10 +111,12 @@ export default {
endTimer: null, endTimer: null,
playStatus: true, playStatus: true,
style_object: Object.freeze([ style_object: Object.freeze([
{ index: 0, left: '150rpx', top: '68rpx', height: '306rpx', width: '468rpx', zIndex: 15, transition: 0.1 }, { index: 0, class: 'block-left' },
{ index: 1, left: '294rpx', top: '16rpx', height: '408rpx', width: '624rpx', zIndex: 20, transition: 0.3 }, { index: 1, class: 'block-center' },
{ index: 2, left: '592rpx', top: '68rpx', height: '306rpx', width: '468rpx', zIndex: 15, transition: 0.1 } { index: 2, class: 'block-right' }
]) ]),
blockX: 0,
viewX: 0
} }
}, },
beforeDestroy () { beforeDestroy () {
...@@ -150,8 +150,7 @@ export default { ...@@ -150,8 +150,7 @@ export default {
item.isIndex = dataIndex item.isIndex = dataIndex
item.isToor = index item.isToor = index
item.imgKey = datalist[dataIndex]?.[this.imgKey] || '' item.imgKey = datalist[dataIndex]?.[this.imgKey] || ''
item.scale = 1 item.x = 10
item.translateX = 0
}) })
if (autoplay) this.autoPlayFunction() if (autoplay) this.autoPlayFunction()
}, },
...@@ -187,17 +186,8 @@ export default { ...@@ -187,17 +186,8 @@ export default {
(item.isToor - 1) < 0 ? imagelist.length - 1 : item.isToor - 1 (item.isToor - 1) < 0 ? imagelist.length - 1 : item.isToor - 1
: (item.isToor + 1) > imagelist.length - 1 ? 0 : item.isToor + 1 : (item.isToor + 1) > imagelist.length - 1 ? 0 : item.isToor + 1
item.isToor = toor item.isToor = toor
const style = list[toor] item.class = list[toor].class
Object.assign(item, { item.x = 0
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) { if (item.index == index) {
let isIndex = item.isIndex + 3 let isIndex = item.isIndex + 3
if (isIndex == len + 3) isIndex = 2 if (isIndex == len + 3) isIndex = 2
...@@ -221,32 +211,43 @@ export default { ...@@ -221,32 +211,43 @@ export default {
this.ismove = e.touches[0].pageX this.ismove = e.touches[0].pageX
this.playStatus = false this.playStatus = false
if (this.endTimer) { if (this.endTimer) {
clearInterval(this.endTimer) clearTimeout(this.endTimer);
this.endTimer = null this.endTimer = null;
return;
} }
}, },
ends (e) { ends (e) {
let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX let pageX = e.changedTouches[0].pageX
let nums = this.ismove - pageX let nums = ismove - pageX
if (nums > 50) this.updateCarouselPositions() if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
if (nums < -50) this.updateCarouselPositions('right') this.viewX = -10
if (this.endTimer) { setTimeout(() => {
clearInterval(this.endTimer) this.viewX = 0
this.endTimer = null }, 16)
return
} }
if (nums > 50 || blockX < -30) this.updateCarouselPositions()
if (nums < -50 || blockX > 30) this.updateCarouselPositions('right')
this.endTimer = setTimeout(() => { this.endTimer = setTimeout(() => {
this.playStatus = true if (!this.playStatus) {
this.autoPlayFunction() this.playStatus = true
this.autoPlayFunction()
}
}, this.interval) }, this.interval)
}, },
change: utils.throttle(function (e, item) {
let { x } = e.detail
this.blockX = x
}, 16)
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.swiper-carousel { .swiper-carousel {
width: 100%; width: 100%;
height: 428rpx; height: toRpx(428);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.carousel-block { .carousel-block {
...@@ -255,9 +256,9 @@ export default { ...@@ -255,9 +256,9 @@ export default {
overflow: hidden; overflow: hidden;
box-shadow: 0 0 5px #0000001a; box-shadow: 0 0 5px #0000001a;
transition: all 0.2s ease; /* 添加过渡 */ transition: all 0.2s ease; /* 添加过渡 */
border: 1.5rpx solid #ffffffb3; border: toRpx(2) solid #ffffffb3;
box-shadow: 0 3rpx 12rpx 0 #5294ff33; box-shadow: 0 toRpx(3) toRpx(12) 0 #5294ff33;
border-radius: 24rpx; border-radius: toRpx(24);
.image-block { .image-block {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -279,28 +280,52 @@ export default { ...@@ -279,28 +280,52 @@ export default {
justify-content: center; justify-content: center;
z-index: 1; z-index: 1;
} }
.hide { .hide {
opacity: 0; opacity: 0;
} }
} }
.block-left,
.block-right {
top: toRpx(68);
height: toRpx(306);
width: toRpx(468);
z-index: 15;
transition: all 0.1s;
}
.block-left {
left: toRpx(150);
}
.block-right {
left: toRpx(592);
}
.block-center {
left: toRpx(294);
top: toRpx(16);
height: toRpx(408);
width: toRpx(624);
z-index: 20;
transition: all 0.3s;
}
} }
.module-title { .module-title {
color: #333333; color: #333333;
font-size: 24rpx; font-size: toRpx(24);
margin-top: 24rpx; margin-top: toRpx(24);
justify-content: center; justify-content: center;
position: relative; position: relative;
.module-dots { .module-dots {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 48rpx; right: toRpx(48);
transform: translateY(-50%); transform: translateY(-50%);
gap: 12rpx; gap: toRpx(12);
.dot { .dot {
width: 12rpx; width: toRpx(12);
height: 12rpx; height: toRpx(12);
opacity: 1; opacity: 1;
background: #0007400d; background: #0007400d;
border-radius: 100%;
} }
.active { .active {
background: #fff; background: #fff;
......
...@@ -29,9 +29,11 @@ ...@@ -29,9 +29,11 @@
/> />
</template> </template>
<template slot="content"> <template slot="content">
<customer-type <center-popup
:list="typeList"
ref="customerTypeRef" ref="customerTypeRef"
@choose="chooseCustomerType" @choose="chooseCustomerType"
title="请选择当前洽谈的客户类型"
/> />
</template> </template>
</home-frame> </home-frame>
...@@ -40,7 +42,7 @@ ...@@ -40,7 +42,7 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import HomeFrame from '@/components/HomeFrame/index.vue' import HomeFrame from '@/components/HomeFrame/index.vue'
import detail from './detail.vue' import detail from './detail.vue'
import CustomerType from './components/CustomerType.vue'; import CenterPopup from '@/components/CenterPopup.vue'
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
const defaultConfig = [ const defaultConfig = [
{ {
...@@ -66,7 +68,7 @@ const defaultConfig = [ ...@@ -66,7 +68,7 @@ const defaultConfig = [
} }
] ]
export default { export default {
components: { HomeFrame, detail, CustomerType }, components: { HomeFrame, detail, CenterPopup },
name: 'boutique', name: 'boutique',
data () { data () {
return { return {
...@@ -85,7 +87,18 @@ export default { ...@@ -85,7 +87,18 @@ export default {
previewOff: false, previewOff: false,
mediaConfigList: [], mediaConfigList: [],
bannerTabId: 'car-banner-0', bannerTabId: 'car-banner-0',
defaultCarId: '' defaultCarId: '',
typeList: Object.freeze([
{
title: '回店客户',
describe: '客户已领精品券且已上牌完成\n交付安排客户当日回店提车',
icon: 'icon-customer-1'
}, {
title: '现场客户',
describe: '客户未领取精品券\n首次到店',
icon: 'icon-customer-2'
}
])
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -367,7 +380,7 @@ export default { ...@@ -367,7 +380,7 @@ export default {
const { moduleList } = this, const { moduleList } = this,
userInfo = uni.$storage.get("userInfo"), userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId: merchantId } = userInfo, { shopMerchantId: merchantId } = userInfo,
{notInvitedCount} = await uni.$api.boutiqueApi.getInviteRecordCount({ { notInvitedCount } = await uni.$api.boutiqueApi.getInviteRecordCount({
merchantIds: [merchantId] merchantIds: [merchantId]
}) })
moduleList.map(e => { moduleList.map(e => {
......
...@@ -2224,6 +2224,7 @@ function drawActivePoint (points, color, shape, context, opts, option, seriesInd ...@@ -2224,6 +2224,7 @@ function drawActivePoint (points, color, shape, context, opts, option, seriesInd
} }
function drawRingTitle (opts, config, context, center) { function drawRingTitle (opts, config, context, center) {
let [series] = opts.series
var titlefontSize = opts.title.fontSize || config.titleFontSize; var titlefontSize = opts.title.fontSize || config.titleFontSize;
var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize; var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
var title = opts.title.name || ''; var title = opts.title.name || '';
...@@ -2234,6 +2235,7 @@ function drawRingTitle (opts, config, context, center) { ...@@ -2234,6 +2235,7 @@ function drawRingTitle (opts, config, context, center) {
var subtitleHeight = subtitle ? subtitlefontSize : 0; var subtitleHeight = subtitle ? subtitlefontSize : 0;
var margin = 5; var margin = 5;
if (subtitle) { if (subtitle) {
if(series.hideData) subtitle = '--'
var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context); var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix; var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix; var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
...@@ -2398,6 +2400,7 @@ function drawBarPointText (points, series, config, context, opts) { ...@@ -2398,6 +2400,7 @@ function drawBarPointText (points, series, config, context, opts) {
var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value; var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value;
if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}` if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}`
if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}` if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}`
if(series.hideData) formatVal = '--'
context.setTextAlign('left'); context.setTextAlign('left');
context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3); context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
context.closePath(); context.closePath();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!