Commit 542dc46f by 李伟康

commit 提交

1 parent b04dc71a
...@@ -90,4 +90,12 @@ module.exports = { ...@@ -90,4 +90,12 @@ module.exports = {
...data, ...data,
}); });
}, },
/**素材详情 查询素材详情 */
getMaterialDetail (data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialById',
projectName: "boutique",
...data,
});
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -39,8 +39,10 @@ ...@@ -39,8 +39,10 @@
.icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;} .icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;}
.icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;} .icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;}
.icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;} .icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;}
.icon-pause { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;}
.icon-play { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -1190rpx -726rpx;} .icon-qr-success { width: 96rpx; height: 96rpx; background-position: -1190rpx -726rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;}
.icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;} .icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;}
...@@ -48,7 +50,7 @@ ...@@ -48,7 +50,7 @@
.icon-scan { width: 32rpx; height: 32rpx; background-position: -617rpx -853rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -617rpx -853rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;} .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -1050rpx -668rpx;}
.icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;} .icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;}
.icon-setting { width: 64rpx; height: 64rpx; background-position: -372rpx -964rpx;} .icon-setting { width: 64rpx; height: 64rpx; background-position: -372rpx -964rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -222rpx -853rpx;} .icon-store { width: 96rpx; height: 96rpx; background-position: -222rpx -853rpx;}
...@@ -57,6 +59,4 @@ ...@@ -57,6 +59,4 @@
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;} .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;} .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -664rpx -853rpx;} .icon-total { width: 32rpx; height: 32rpx; background-position: -664rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-play { width: 40rpx; height: 40rpx; background-position: -1050rpx -668rpx;}
.icon-pause { width: 40rpx; height: 40rpx; background-position: -1105rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1105rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
No preview for this file type

1.19 MB | W: | H:

1.19 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="loading flex"> <view class="nothing flex">
暂无 <view class="icon"></view>
未匹配到客户信息
</view> </view>
</template> </template>
</template> </template>
...@@ -98,13 +99,13 @@ export default { ...@@ -98,13 +99,13 @@ export default {
left: 0; left: 0;
top: 88rpx; top: 88rpx;
width: 100%; width: 100%;
height: 236rpx; height: 352rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
opacity: 0;
z-index: -1; z-index: -1;
opacity: 0;
.customer-title { .customer-title {
font-size: 28rpx; font-size: 24rpx;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
padding: 16rpx 24rpx 8rpx; padding: 16rpx 24rpx 8rpx;
...@@ -115,11 +116,25 @@ export default { ...@@ -115,11 +116,25 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
color: #999999;
.icon { .icon {
animation: rotate-loading 1s linear infinite; animation: rotate-loading 1s linear infinite;
} }
} }
.nothing {
width: 100%;
height: 100%;
font-size: 24rpx;
color: #c7ccd7;
flex-direction: column;
.icon {
margin-top: 52rpx;
width: 96rpx;
height: 96rpx;
background-image: url('@/assets/images/common/nothing.webp');
background-size: 100%;
}
}
.item { .item {
width: 100%; width: 100%;
height: 48rpx; height: 48rpx;
...@@ -143,7 +158,7 @@ export default { ...@@ -143,7 +158,7 @@ export default {
} }
} }
.is-show { .is-show {
z-index: 1;
opacity: 1; opacity: 1;
z-index: 2;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
e.error = false e.error = false
}) })
let { customerInfo, customerForm, customerTag } = this, let { customerInfo, customerForm, customerTag } = this,
{ shopMerchantId,sceneType } = uni.$storage.get("userInfo"), { shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
targetApi = customerInfo.id ? 'updateVisitsInfo' : 'saveVisitsInfo', targetApi = customerInfo.id ? 'updateVisitsInfo' : 'saveVisitsInfo',
params = { params = {
customerTag, customerTag,
...@@ -303,14 +303,29 @@ export default { ...@@ -303,14 +303,29 @@ export default {
}) })
if (customerInfo.id) params.id = customerInfo.id if (customerInfo.id) params.id = customerInfo.id
params.customerTagName = params.customerTagName.replace(/|/g, ',') params.customerTagName = params.customerTagName.replace(/|/g, ',')
const res = await uni.$api.customerApi[targetApi](params) const res = await uni.$api.customerApi[targetApi](params),
_this = this
if (res) { if (res) {
if (res == '1') {
this.$refs.successRef.open() this.$refs.successRef.open()
setTimeout(() => { setTimeout(() => {
this.back() this.back()
this.$emit('refresh') this.$emit('refresh')
}, 1e3) }, 1e3)
} else uni.showModal({
content: '存在与该手机号相同的接待记录,系统将自动归类到已接待',
showCancel: false,
confirmText: '确认',
confirmColor: '#347BFF',
success (res) {
if (res.confirm) {
_this.back()
_this.$emit('refresh')
} }
}
})
}
} catch (error) { } catch (error) {
let index = this.customerForm.findIndex(e => e.key == error) let index = this.customerForm.findIndex(e => e.key == error)
this.customerForm[index].error = true this.customerForm[index].error = true
......
...@@ -35,6 +35,12 @@ ...@@ -35,6 +35,12 @@
@blur="resetFocusIndex" @blur="resetFocusIndex"
:data-key="i.key" :data-key="i.key"
/> />
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
/>
<template v-if="i.unit"> <template v-if="i.unit">
<view class="unit">{{i.unit}}</view> <view class="unit">{{i.unit}}</view>
</template> </template>
...@@ -75,8 +81,9 @@ ...@@ -75,8 +81,9 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import InsuranceTable from './components/InsuranceTable.vue' import InsuranceTable from './components/InsuranceTable.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
export default { export default {
components: { CarBrands, InsuranceTable }, components: { CarBrands, InsuranceTable, CustomerAutocomplete },
props: { props: {
penSwitch: Boolean, penSwitch: Boolean,
show: Boolean, show: Boolean,
...@@ -178,6 +185,15 @@ export default { ...@@ -178,6 +185,15 @@ export default {
} }
} }
}, },
chooseCustomer (e) {
this.customerInfo = {
...this.customerInfo,
phoneNumber: e.ownerPhone,
customerName: e.ownerName,
carModel: e.brandModel
}
this.inputCustomer()
}
} }
} }
</script> </script>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
color="#000" color="#000"
></uni-icons> ></uni-icons>
</view> </view>
家庭车主的延保套餐营销案 {{caseObject.title}}
</view> </view>
<view class="case-content"> <view class="case-content">
<view class="left-menu"> <view class="left-menu">
...@@ -87,7 +87,11 @@ ...@@ -87,7 +87,11 @@
:id="`case-${item.id}`" :id="`case-${item.id}`"
>{{item.headings}}</view> >{{item.headings}}</view>
<template v-if="item.audio"> <template v-if="item.audio">
<audio-component :src="item.audio" /> <audio-component
:src="item.audio"
@onPlay="onPlay(item.id)"
:ref="`audio-${item.id}`"
/>
</template> </template>
<view class="item-content"> <view class="item-content">
<rich-text :nodes="item.content"></rich-text> <rich-text :nodes="item.content"></rich-text>
...@@ -97,7 +101,8 @@ ...@@ -97,7 +101,8 @@
:key="`img-${index}-${ind}`" :key="`img-${index}-${ind}`"
:src="i" :src="i"
class="item-img" class="item-img"
mode="aspectFit" mode="widthFix"
@load="imgLoad"
></image> ></image>
</template> </template>
<template v-if="item.children && item.children.length"> <template v-if="item.children && item.children.length">
...@@ -111,7 +116,11 @@ ...@@ -111,7 +116,11 @@
:id="`case-${i.id}`" :id="`case-${i.id}`"
>{{i.headings}}</view> >{{i.headings}}</view>
<template v-if="i.audio"> <template v-if="i.audio">
<audio-component :src="i.audio" /> <audio-component
:src="i.audio"
@onPlay="onPlay(i.id)"
:ref="`audio-${i.id}`"
/>
</template> </template>
<view class="item-content"> <view class="item-content">
<rich-text :nodes="i.content"></rich-text> <rich-text :nodes="i.content"></rich-text>
...@@ -121,7 +130,8 @@ ...@@ -121,7 +130,8 @@
:key="k" :key="k"
:src="c" :src="c"
class="item-img" class="item-img"
mode="aspectFit" mode="widthFix"
@load="imgLoad"
></image> ></image>
</template> </template>
</view> </view>
...@@ -154,31 +164,34 @@ export default { ...@@ -154,31 +164,34 @@ export default {
audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_17248148280491724813557101.mp3', audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_17248148280491724813557101.mp3',
pictureList: [ pictureList: [
'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg', 'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg' 'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg',
'https://img01.glsx.com.cn/group1/M00/3B/E6/wKgFDWbDXvWARW83AAB7oRJhZUc138.jpg'
], ],
content: '在佳士得纽约拍场,今年81岁的<span style="color:#2C66F7;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。', content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
children: [{ children: [{
headings: '子方案一', headings: '子方案一',
id: '1-1', id: '1-1',
content: '在佳士得纽约拍场,今年81岁的<span style="color:#2C66F7;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。', content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
}, { }, {
headings: '子方案二', headings: '子方案二',
id: '1-2', id: '1-2',
content: '在佳士得纽约拍场,今年81岁的<span style="color:#2C66F7;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。', content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
}, { }, {
headings: '子方案三', headings: '子方案三',
id: '1-3', id: '1-3',
content: '在佳士得纽约拍场,今年81岁的<span style="color:#2C66F7;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。', content: '在佳士得纽约拍场,今年81岁的<span style="color:#FF8D1A;font-weight:500;">英国艺术家大卫·霍克尼</span>作品《艺术家肖像(泳池及两个人像)》以9031万美元成交,大卫·霍克尼也摘取“最贵在世艺术家”桂冠,刷新此前由美国人杰夫·昆斯于2013年创造的5840.5万美元最高纪录。',
audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_17248124922141724811525712.mp3', audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_17248124922141724811525712.mp3',
pictureList: [ pictureList: [
'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg', 'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg' 'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg',
'https://pic4.zhimg.com/80/v2-2a6bb9b3a75656ff434088c068dabd7d_720w.webp'
], ],
}] }]
}, { }, {
headings: '方案二', headings: '方案二',
id: '2', id: '2',
pictureList: [ pictureList: [
'//scpic.chinaz.net/files/pic/pic9/201812/zzpic15923.jpg',
'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png', 'https://img01.glsx.com.cn/group1/M00/06/EC/wKgFDWSIBjOASwLVAABQyCJjFQk535.png',
'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg' 'https://img01.glsx.com.cn/group1/M00/38/47/wKgFDWaNTJuATZlWAABQMoxXsQU219.jpg'
], ],
...@@ -188,7 +201,8 @@ export default { ...@@ -188,7 +201,8 @@ export default {
audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_172474678798417247418500824.mp3', audio: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/merged_172474678798417247418500824.mp3',
pictureList: [ pictureList: [
'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg', 'https://img01.glsx.com.cn/group1/M00/3C/3A/wKgFDWbNdg6AEPfBAAYdDoM6Ysw343.jpg',
'https://img01.glsx.com.cn/group1/M00/3B/E6/wKgFDWbDXomAadw2AAB-pGTMW-A904.jpg' 'https://img01.glsx.com.cn/group1/M00/3B/E6/wKgFDWbDXomAadw2AAB-pGTMW-A904.jpg',
'https://pic4.zhimg.com/80/v2-2ea62b9f9a222efac64e71514da7c395_720w.webp'
], ],
}, { }, {
headings: '方案四', headings: '方案四',
...@@ -259,15 +273,14 @@ export default { ...@@ -259,15 +273,14 @@ export default {
menuScrollTop: 0, menuScrollTop: 0,
topList: [], topList: [],
itemList: [], itemList: [],
contentId: '' contentId: '',
caseObject:{
}
} }
}, },
onLoad (options) { onLoad (options) {
const query = uni.createSelectorQuery() this.getMaterialDetail(options.id)
console.log(options)
setTimeout(() => {
this.initScrollListTop()
}, 1e3)
}, },
watch: { watch: {
currentId (n) { currentId (n) {
...@@ -284,6 +297,20 @@ export default { ...@@ -284,6 +297,20 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
async getMaterialDetail (id) {
const res = await uni.$api.customerApi.getMaterialDetail({
id
})
this.caseObject = res
console.log(res)
},
back () {
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100
})
},
initScrollListTop () { initScrollListTop () {
let { detailInfo } = this, let { detailInfo } = this,
topList = [], topList = [],
...@@ -308,7 +335,7 @@ export default { ...@@ -308,7 +335,7 @@ export default {
}) })
this.topList = topList this.topList = topList
this.itemList = itemList this.itemList = itemList
this.currentId = detailInfo[0].id if (!this.currentId) this.currentId = detailInfo[0].id
}, },
isLast (index, ind, children) { isLast (index, ind, children) {
let result = false let result = false
...@@ -339,6 +366,16 @@ export default { ...@@ -339,6 +366,16 @@ export default {
menuClick (item) { menuClick (item) {
this.currentId = item.id this.currentId = item.id
this.contentId = item.id this.contentId = item.id
},
onPlay (id) {
console.log(id)
Object.keys(this.$refs).map(key => {
this.$refs[key][0]?.innerAudioContext?.pause()
})
this.$refs[`audio-${id}`][0]?.innerAudioContext?.play()
},
imgLoad () {
this.initScrollListTop()
} }
} }
} }
...@@ -496,6 +533,7 @@ export default { ...@@ -496,6 +533,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
line-height: 44rpx; line-height: 44rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
word-wrap: break-word;
} }
.item-img { .item-img {
display: block; display: block;
......
...@@ -4,7 +4,28 @@ ...@@ -4,7 +4,28 @@
:class="['sprite-icon',`${paused? 'icon-play' : 'icon-pause'}`]" :class="['sprite-icon',`${paused? 'icon-play' : 'icon-pause'}`]"
@click="play" @click="play"
></view> ></view>
<view class="line"></view> <slider
@change="sliderChange"
backgroundColor="#D8D8D8"
block-color="#2C66F7"
block-size="5"
class="progress-box"
:max="innerAudioContext.duration||10"
:value="innerAudioContext.currentTime||0"
/>
<!-- <view
class="progress-box"
@click="seek"
>
<view
class="progress-line"
:style="`width:${progress}%`"
></view>
<view
class="progress-btn"
:style="`left:${progress}%`"
></view>
</view> -->
<view class="duration">{{currentTime}}/{{duration}}</view> <view class="duration">{{currentTime}}/{{duration}}</view>
</view> </view>
</template> </template>
...@@ -13,13 +34,16 @@ ...@@ -13,13 +34,16 @@
export default { export default {
name: 'AudioComponent', name: 'AudioComponent',
props: { props: {
src: String src: String,
auto: Boolean
}, },
data () { data () {
return { return {
innerAudioContext: null, innerAudioContext: null,
currentTime: '00:00', currentTime: '00:00',
duration: '00:00' duration: '00:00',
paused: true,
progress: ''
} }
}, },
watch: { watch: {
...@@ -31,9 +55,6 @@ export default { ...@@ -31,9 +55,6 @@ export default {
}, },
}, },
computed: { computed: {
paused () {
return this.innerAudioContext?.paused // 当前是是否暂停或停止状态,true 表示暂停或停止,false 表示正在播放
}
}, },
mounted () { mounted () {
}, },
...@@ -41,13 +62,26 @@ export default { ...@@ -41,13 +62,26 @@ export default {
init (src) { init (src) {
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.src = src innerAudioContext.src = src
innerAudioContext.sessionCategory = 'soloAmbient'
innerAudioContext.onCanplay(this.onCanplay) innerAudioContext.onCanplay(this.onCanplay)
innerAudioContext.onPlay(() => this.paused = false)
innerAudioContext.onPause(() => this.paused = true)
innerAudioContext.onTimeUpdate(this.onTimeUpdate)
this.innerAudioContext = innerAudioContext this.innerAudioContext = innerAudioContext
}, },
onCanplay () { onCanplay () {
this.duration = this.formatTime(this.innerAudioContext.duration) this.duration = this.formatTime(this.innerAudioContext.duration)
}, },
onTimeUpdate () {
const {
duration,
currentTime
} = this.innerAudioContext,
mergedOffset = Math.ceil(currentTime)
this.progress = mergedOffset / duration * 100
this.currentTime = this.formatTime(currentTime)
},
formatTime (num) { formatTime (num) {
num = Math.floor(num); num = Math.floor(num);
let minutes = Math.floor(num / 60) || '0', let minutes = Math.floor(num / 60) || '0',
...@@ -56,10 +90,22 @@ export default { ...@@ -56,10 +90,22 @@ export default {
return `${minutes}:${seconds}` return `${minutes}:${seconds}`
}, },
play () { play () {
const { if (this.paused) {
paused if (this.auto) this.innerAudioContext.play()
} = this this.$emit('onPlay')
if (paused) this.innerAudioContext.play() }
else this.innerAudioContext.pause()
},
seek (e) {
let query = uni.createSelectorQuery()
query.select('.progress-box').boundingClientRect(data => {
const seconds = (e.changedTouches[0].clientX - data.left) / data.width * this.innerAudioContext.duration
this.innerAudioContext.seek(seconds)
}).exec()
},
sliderChange (e) {
this.innerAudioContext.seek(e.detail.value)
} }
} }
} }
...@@ -79,12 +125,50 @@ export default { ...@@ -79,12 +125,50 @@ export default {
.sprite-icon { .sprite-icon {
margin-right: 16rpx; margin-right: 16rpx;
} }
.line { .progress-box {
width: 796rpx; width: 796rpx;
height: 6rpx; margin: 0 !important;
background: #d8d8d8; // height: 6rpx;
border-radius: 4rpx; // background: #d8d8d8;
position: relative; // border-radius: 4rpx;
// position: relative;
// .progress-line {
// position: absolute;
// top: 0;
// left: 0;
// height: 100%;
// background-image: linear-gradient(90deg, #2c66f7 0%, #75bcff 100%);
// border-radius: 4rpx;
// }
// .progress-btn {
// position: absolute;
// top: 50%;
// left: 0;
// width: 14rpx;
// height: 14rpx;
// background: #2c66f7;
// border: 2rpx solid #f4f4f4;
// transform: translateY(-50%);
// border-radius: 100%;
// }
/deep/.uni-slider-track {
background-image: linear-gradient(90deg, #2c66f7 0%, #75bcff 100%);
}
/deep/.uni-slider-thumb {
&::after {
width: 14rpx;
height: 14rpx;
border: 2rpx solid #f4f4f4;
content: '';
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 100%;
box-sizing: border-box;
}
// border: 2rpx solid #fff;
}
} }
.duration { .duration {
margin-left: auto; margin-left: auto;
......
...@@ -30,31 +30,43 @@ ...@@ -30,31 +30,43 @@
</view> </view>
<view class="case-box box"> <view class="case-box box">
<view class="title flex"> <view class="title flex">
营销话术方案 推荐套餐
</view> </view>
<scroll-view
class="case-scroll-box"
scroll-y
@scrolltolower="pageonReachBottom"
>
<view class="case-list"> <view class="case-list">
<template v-if="flag"> <template v-if="flag">
<template v-if="list.length && list[0] && list[0].length"> <template v-if="list.length && list[0] && list[0].length">
<template v-for="i in list"> <template v-for="i in list">
<template v-for="(item,cindex) in i"> <template v-for="item in i">
<view <view
class="case-item" class="case-item"
:key="cindex" :key="item.id"
@click="jumpDetail(item)" @click="jumpDetail(item)"
> >
<image <image
class="img" class="img"
src="http://192.168.3.233:8090/uploads/user/avatar/25/avatar.png" :src="item.cover || ''"
></image> ></image>
<view class="case-info"> <view class="case-info">
<view class="case-name text-hide">家庭车主的延保套餐营销案</view> <view class="case-name text-hide">{{item.title}}</view>
<template v-for="(j,ind) in caseInfo"> <template v-for="(j,ind) in caseInfo">
<view <view
class="case-text flex" class="case-text flex"
:key="ind" :key="ind"
> >
<view class="case-label">{{j.label}}:</view> <view class="case-label">{{j.label}}:</view>
<view :class="['case-value',j.class]">M5原厂延保MAX套餐(4年)、M7原厂延保MAX套餐(4年)</view> <view :class="['case-value',j.class]">
<template v-if="j.format">
{{j.format(item)}}
</template>
<template v-else>
{{item[j.key] || '--'}}
</template>
</view>
</view> </view>
</template> </template>
</view> </view>
...@@ -68,7 +80,7 @@ ...@@ -68,7 +80,7 @@
class="icon" class="icon"
src="@/assets/images/home/nothing.webp" src="@/assets/images/home/nothing.webp"
/> />
暂无营销话术方案 暂无推荐套餐
</view> </view>
</template> </template>
</template> </template>
...@@ -76,6 +88,7 @@ ...@@ -76,6 +88,7 @@
<view class="end-text">到底了!</view> <view class="end-text">到底了!</view>
</template> </template>
</view> </view>
</scroll-view>
</view> </view>
<!-- <package-popup <!-- <package-popup
...@@ -122,17 +135,26 @@ export default { ...@@ -122,17 +135,26 @@ export default {
caseInfo: [ caseInfo: [
{ {
label: '业务场景', label: '业务场景',
key: 'ownerPhone', class: 'text-hide',
class: 'text-hide' format: (val) => {
// 业务场景:0-会员权益/升级;1-精品升级;2-次新车转化;3-售后众筹;4-积分商城
return val ? {
0: '会员权益/升级',
1: '精品升级',
2: '次新车转化',
3: '售后众筹',
4: '积分商城'
}[val.scene] : '--'
}
}, },
{ {
label: '客户类型', label: '客户标签',
key: 'brandModel', key: 'tags',
class: 'text-hide' class: 'text-hide'
}, },
{ {
label: '适用套餐', label: '适用套餐',
key: 'receptionSceneName', key: 'goods',
class: 'text-two-line' class: 'text-two-line'
}, },
], ],
...@@ -206,9 +228,22 @@ export default { ...@@ -206,9 +228,22 @@ export default {
console.log(params) console.log(params)
const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params) const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params)
uni.hideLoading() uni.hideLoading()
list.map(e => {
let tags = [],
goods = []
e.customerLabelInfoList?.map(item => {
tags.push(item.labelName)
})
e.productPackageInfoList?.map(item => {
goods.push(item.upgradeGoodsName)
})
e.tags = tags.join('、')
e.goods = goods.join('、')
})
this.list[currentPage - 1] = list this.list[currentPage - 1] = list
this.flag = true this.flag = true
this.total = total this.total = total
this.$forceUpdate()
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
console.log(error) console.log(error)
...@@ -223,8 +258,16 @@ export default { ...@@ -223,8 +258,16 @@ export default {
}) })
}, },
jumpDetail (item) { jumpDetail (item) {
console.log(item.type)
// 类型:0-图片;1-视频;2-pdf;3-富文本
let url = `/pages/common/caseDetail?id=${item.id}`
if (item.type != 3) {
let fileUrl = item?.detailInfos[0]?.image
if (item.type == 2) url = `/pages/common/webview?url=${fileUrl}&title=${item.title}`
if (item.type == 1 || item.type == 0) url = `/pages/boutique/preview?tabName=${item.title}&sourceType=${item.type == 1 ? 2 : 1}&detailUrl=${fileUrl}`
}
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/caseDetail?` url: `${url}`
}) })
}, },
pageonReachBottom () { pageonReachBottom () {
...@@ -337,12 +380,13 @@ export default { ...@@ -337,12 +380,13 @@ export default {
.case-box { .case-box {
height: 1004rpx; height: 1004rpx;
padding: 0 !important; padding: 0 !important;
.case-scroll-box {
height: calc(100% - 104rpx);
}
.case-list { .case-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 32rpx 46rpx; gap: 32rpx 46rpx;
height: calc(100% - 104rpx);
overflow-y: auto;
padding: 0 48rpx; padding: 0 48rpx;
.case-item { .case-item {
width: 496rpx; width: 496rpx;
......
...@@ -3,23 +3,25 @@ ...@@ -3,23 +3,25 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: '',
data () { data () {
return { return {
url:'' url: ''
} }
}, },
onLoad(options){ onLoad (options) {
this.url = options.url this.url = options.url
if (options.title) uni.setNavigationBarTitle({
title: options.title
})
}, },
mounted () { mounted () {
}, },
methods: { methods: {
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
</style> </style>
\ No newline at end of file \ 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!