Commit 1eda0ae7 by 李伟康

feat(boutique): 新增商户套餐推荐配置列表查询功能

新增 `getBoutiquePackageList` 方法用于查询商户套餐推荐配置列表,支持通过商户 ID 获取套餐信息,并对返回数据进行格式化处理,包括价格千分位分隔、换行符统一为 `<br>` 标签等。

fix(swiper): 优化轮播组件兼容性与自定义能力

1. 支持双图展示模式(moduleList.length == 2)时的轮播逻辑处理。
2. 增加 noDataObject 属性,支持自定义空状态图标和文案。
3. 添加 custom 插槽支持 swiper 内容自定义。
4. 增加 swiperType 属性用于控制不同展示样式。
5. 修复单张图片时不执行轮播动画的问题。
6. 优化 autoplay 判断逻辑,防止未启用自动播放时仍执行动画。
7. 修复 moduleList 为空时未重置 imagelist 和 datalist 的问题。

feat(home-frame): 支持首页框架中自定义轮播内容

在 HomeFrame 组件中增加 swiperCustom 属性,允许通过插槽传入自定义轮播组件。同时调整埋点逻辑,在 sceneType 不为 0 时不触发产品介绍点击事件。

chore(api): 更新本地开发环境 IP 地址

将 http.js 中的本地开发服务器地址从 `http://192.168.1.169:8292` 更改为 `http://192.168.1.67:8392`。

feat(boutique): 实现套餐详情弹窗组件及展示逻辑

1. 新增 PackageDetailPopup 弹窗组件,用于展示套餐详情内容。
2. 在 boutique 页面中集成套餐详情弹窗,展示富文本格式的套餐内容和介绍。
3. 新增套餐列表获取方法 `getBoutiquePackageList`,并替换原有 moduleList 使用 packageList。
4. 调整轮播组件使用方式,使用自定义插槽实现套餐信息展示。
5. 引入套餐默认图片资源 package-1.webp 和 package-2.webp。

feat(invitation): 增加流量有效性字段展示

在邀请记录列表中新增“流量有效性”字段,并根据值显示“有效客户”或“无效客户”,默认显示“-”。

style(component): 优化样式命名与结构

统一组件中的 class 命名规范,调整部分样式缩进,优化 SwiperComponent 中 type-2 类型的样式布局,提升视觉效果。
1 parent 6e85274c
...@@ -345,5 +345,15 @@ module.exports = { ...@@ -345,5 +345,15 @@ module.exports = {
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
},
/**
* 查询商户套餐推荐配置列表
*/
getBoutiquePackageList(data){
return http.post({
method: 'dj.api.smartcarlife.receptionMaterialRecommendPackageConfig.getByMerchantId',
projectName: 'boutique',
...data
})
} }
} }
...@@ -11,7 +11,7 @@ const HOST = { ...@@ -11,7 +11,7 @@ const HOST = {
scrm: domain, scrm: domain,
dj: djDomain, dj: djDomain,
merchant: merchantDomain, merchant: merchantDomain,
ip: "http://192.168.1.169:8292", ip: "http://192.168.1.67:8392",
}; };
class Request { class Request {
get (params, returnAll = false, hostType) { get (params, returnAll = false, hostType) {
......
No preview for this file type
No preview for this file type
...@@ -31,13 +31,19 @@ ...@@ -31,13 +31,19 @@
<view class="module-box box-class"> <view class="module-box box-class">
<view class="common-title">产品介绍</view> <view class="common-title">产品介绍</view>
<view class="content-box"> <view class="content-box">
<template v-if="swiperCustom">
<slot name="swiperCustom" />
</template>
<template v-else>
<swiper-component <swiper-component
:moduleList="moduleList" :moduleList="moduleList"
@click="swiperClick" @click="swiperClick"
:stopAutoPlay="previewOff" :stopAutoPlay="previewOff"
:imgKey="bannerKey" :imgKey="bannerKey"
:loadComplete="loadComplete" :loadComplete="loadComplete"
></swiper-component> >
</swiper-component>
</template>
</view> </view>
</view> </view>
<view class="tool-box box-class"> <view class="tool-box box-class">
...@@ -209,6 +215,7 @@ export default { ...@@ -209,6 +215,7 @@ export default {
}, },
bannerKey: String, bannerKey: String,
loadComplete: Boolean, loadComplete: Boolean,
swiperCustom: Boolean,
}, },
data () { data () {
return { return {
...@@ -380,9 +387,9 @@ export default { ...@@ -380,9 +387,9 @@ export default {
} }
}, },
swiperClick (e) { swiperClick (e) {
uni.$track.add({ if (this.sceneType == 0) uni.$track.add({
eventCode: 'app_product_Introduction' eventCode: 'app_product_Introduction'
}) }) //轻改场景不埋点
this.previewOff = true this.previewOff = true
this.$emit('swiperClick', e) this.$emit('swiperClick', e)
}, },
......
<template> <template>
<view class="swiper-box"> <view :class="['swiper-box',{'type-2':swiperType == 2}]">
<template v-if="loadComplete"> <template v-if="loadComplete">
<template v-if="moduleList.length"> <template v-if="moduleList.length">
<movable-area <movable-area
class="swiper-carousel" class="swiper-carousel"
...@@ -15,10 +14,18 @@ ...@@ -15,10 +14,18 @@
@click.stop="changeBlock(item)" @click.stop="changeBlock(item)"
direction="horizontal" direction="horizontal"
@change="change" @change="change"
:disabled="item.class != 'block-center'" :disabled="item.class != 'block-center' || moduleList.length == 1"
:x="item.class != 'block-center' ? 0 : viewX" :x="item.class != 'block-center' ? 0 : viewX"
:data-index="item.isIndex" :data-index="item.isIndex"
v-if="item.imgUrl"
> >
<template v-if="custom">
<slot
:content="item"
name="swiper"
></slot>
</template>
<template v-else>
<image <image
class="image-block" class="image-block"
:src="item.imgUrl" :src="item.imgUrl"
...@@ -28,6 +35,7 @@ ...@@ -28,6 +35,7 @@
class="bg" class="bg"
v-if="item.hide" v-if="item.hide"
></view> ></view>
</template>
<!-- <view :class="['error-block',{hide:item.hide}]"> <!-- <view :class="['error-block',{hide:item.hide}]">
<uni-icons <uni-icons
:type="icon" :type="icon"
...@@ -53,7 +61,14 @@ ...@@ -53,7 +61,14 @@
</template> </template>
<template v-else> <template v-else>
<view class="nothing flex"> <view class="nothing flex">
该场景尚未配置素材,请联系总部人员 <template v-if="noDataObject.icon">
<image
:src="noDataObject.icon"
class="icon"
:style="noDataObject.style"
/>
</template>
{{noDataObject.text || '该场景尚未配置素材,请联系总部人员'}}
</view> </view>
</template> </template>
</template> </template>
...@@ -75,7 +90,6 @@ ...@@ -75,7 +90,6 @@
</template> </template>
<script> <script>
import utils from "@/utils/utils.js"; import utils from "@/utils/utils.js";
export default { export default {
name: 'SwiperComponent', name: 'SwiperComponent',
props: { props: {
...@@ -107,11 +121,21 @@ export default { ...@@ -107,11 +121,21 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
loadComplete: Boolean loadComplete: Boolean,
noDataObject: {
type: Object,
default: () => ({})
},
custom: Boolean,
swiperType: [Number, String]
}, },
watch: { watch: {
moduleList: { moduleList: {
handler (val) { handler (val) {
if (!val.length) {
this.datalist = []
this.imagelist = []
}
if (val.length && !this.imagelist.length) this.getDatalist() if (val.length && !this.imagelist.length) this.getDatalist()
}, },
deep: true deep: true
...@@ -125,7 +149,7 @@ export default { ...@@ -125,7 +149,7 @@ export default {
}, },
computed: { computed: {
moduleTitle () { moduleTitle () {
return this.moduleList[this.currentIndex]?.detailTitle return this.moduleList[this.currentIndex]?.detailTitle || ''
} }
}, },
created () { created () {
...@@ -159,6 +183,7 @@ export default { ...@@ -159,6 +183,7 @@ export default {
methods: { methods: {
getDatalist () { getDatalist () {
if (this.moduleList) { if (this.moduleList) {
this.currentIndex = 0
this.datalist = JSON.parse(JSON.stringify(this.moduleList)) this.datalist = JSON.parse(JSON.stringify(this.moduleList))
let num = 3 let num = 3
let diff = num - this.moduleList.length let diff = num - this.moduleList.length
...@@ -173,18 +198,20 @@ export default { ...@@ -173,18 +198,20 @@ export default {
} }
}, },
getImagelist () { getImagelist () {
let { datalist, autoplay } = this let { datalist, autoplay, style_object } = this
this.imagelist = JSON.parse(JSON.stringify(this.style_object)) this.imagelist = JSON.parse(JSON.stringify(style_object))
this.imagelist.forEach((item, index) => { this.imagelist.forEach((item, index) => {
const dataIndex = index - 1 < 0 ? datalist.length - 1 : index - 1 const dataIndex = index - 1 < 0 ? datalist.length - 1 : index - 1
item.isIndex = dataIndex item.isIndex = dataIndex
item.isToor = index item.isToor = index
item.imgUrl = datalist[dataIndex]?.[this.imgKey] || '' item.imgUrl = datalist[dataIndex]?.[this.imgKey] || ''
item.originalData = datalist[dataIndex]
item.x = 0 item.x = 0
}) })
if (autoplay) this.autoPlayFunction() if (autoplay) this.autoPlayFunction()
}, },
autoPlayFunction () { autoPlayFunction () {
if (!this.autoplay) return
if (this.stopAutoPlay || !this.playStatus) { if (this.stopAutoPlay || !this.playStatus) {
if (this.autoPlayTimer) { if (this.autoPlayTimer) {
clearTimeout(this.autoPlayTimer); clearTimeout(this.autoPlayTimer);
...@@ -200,16 +227,30 @@ export default { ...@@ -200,16 +227,30 @@ export default {
this.autoPlayTimer = null; this.autoPlayTimer = null;
return; return;
} }
// 执行轮播动画并递归调用自身 // 执行轮播动画并递归调用自身
this.updateCarouselPositions(); this.updateCarouselPositions();
this.autoPlayFunction(); this.autoPlayFunction();
}, this.interval); }, this.interval);
}, },
updateCarouselPositions (direction = 'left') { updateCarouselPositions (direction = 'left') {
let { imagelist, datalist } = this, let { imagelist, datalist, moduleList } = this,
len = datalist.length - 1, len = datalist.length - 1,
list = JSON.parse(JSON.stringify(this.style_object)) list = JSON.parse(JSON.stringify(this.style_object))
if (moduleList.length == 2) {
this.imagelist.forEach((item, index) => {
if (index != 0) {
let toor = item.isToor == 1 ? 2 : 1
item.isToor = toor
item.imgUrl = ''
item.class = list[toor].class
item.x = 0
let isIndex = item.isIndex
item.isIndex = isIndex
item.imgUrl = datalist[isIndex][this.imgKey] || ''
item.index = list[toor].index
}
})
} else {
this.imagelist.forEach(item => { this.imagelist.forEach(item => {
let toor = direction == 'left' ? let toor = direction == 'left' ?
(item.isToor - 1) < 0 ? imagelist.length - 1 : item.isToor - 1 (item.isToor - 1) < 0 ? imagelist.length - 1 : item.isToor - 1
...@@ -219,7 +260,6 @@ export default { ...@@ -219,7 +260,6 @@ export default {
item.class = list[toor].class item.class = list[toor].class
item.x = 0 item.x = 0
let isIndex = item.isIndex let isIndex = item.isIndex
if (direction == 'left' && item.class == 'block-right') { if (direction == 'left' && item.class == 'block-right') {
if (isIndex == len) isIndex = 2 if (isIndex == len) isIndex = 2
else if (isIndex == len - 1) isIndex = 1 else if (isIndex == len - 1) isIndex = 1
...@@ -236,6 +276,7 @@ export default { ...@@ -236,6 +276,7 @@ export default {
item.imgUrl = datalist[isIndex][this.imgKey] || '' item.imgUrl = datalist[isIndex][this.imgKey] || ''
item.index = list[toor].index item.index = list[toor].index
}) })
}
let currentIndex = this.imagelist.findIndex(item => item.index == 1) let currentIndex = this.imagelist.findIndex(item => item.index == 1)
this.currentIndex = this.imagelist[currentIndex].isIndex this.currentIndex = this.imagelist[currentIndex].isIndex
}, },
...@@ -255,10 +296,12 @@ export default { ...@@ -255,10 +296,12 @@ export default {
} }
}, },
ends (e) { ends (e) {
let { moduleList } = this
if (moduleList.length == 1) return
let { blockX, ismove } = this let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX let pageX = e.changedTouches[0].pageX
let nums = ismove - pageX let nums = ismove - pageX
if(nums == 0) return if (nums == 0) return
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) { if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10 this.viewX = -10
setTimeout(() => { setTimeout(() => {
...@@ -267,8 +310,6 @@ export default { ...@@ -267,8 +310,6 @@ export default {
} }
if (nums > 50 || blockX < -30) this.updateCarouselPositions() if (nums > 50 || blockX < -30) this.updateCarouselPositions()
if (nums < -50 || blockX > 30) this.updateCarouselPositions('right') if (nums < -50 || blockX > 30) this.updateCarouselPositions('right')
this.endTimer = setTimeout(() => { this.endTimer = setTimeout(() => {
if (!this.playStatus) { if (!this.playStatus) {
this.playStatus = true this.playStatus = true
...@@ -290,7 +331,7 @@ export default { ...@@ -290,7 +331,7 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
.gif{ .gif {
width: toRpx(64); width: toRpx(64);
height: toRpx(64); height: toRpx(64);
} }
...@@ -351,7 +392,6 @@ export default { ...@@ -351,7 +392,6 @@ export default {
justify-content: center; justify-content: center;
z-index: 1; z-index: 1;
} }
.hide { .hide {
opacity: 0; opacity: 0;
} }
...@@ -361,7 +401,6 @@ export default { ...@@ -361,7 +401,6 @@ export default {
top: toRpx(68); top: toRpx(68);
height: toRpx(306); height: toRpx(306);
width: toRpx(468); width: toRpx(468);
transition: all 0.1s; transition: all 0.1s;
} }
.block-left { .block-left {
...@@ -410,5 +449,36 @@ export default { ...@@ -410,5 +449,36 @@ export default {
justify-content: center; justify-content: center;
color: #999; color: #999;
font-size: toRpx(20); font-size: toRpx(20);
flex-direction: column;
.icon {
width: toRpx(344);
height: toRpx(236);
}
}
.type-2 {
.swiper-carousel {
height: toRpx(460);
.block-left,
.block-right {
top: toRpx(68);
height: toRpx(306);
width: toRpx(604);
transition: all 0.1s;
}
.block-left {
left: toRpx(88);
z-index: 10;
}
.block-right {
left: toRpx(508);
z-index: 15;
}
.block-center {
left: toRpx(180);
top: toRpx(10);
width: toRpx(848);
height: toRpx(428);
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<uni-popup
ref="packageDetailPopupRef"
type="center"
:is-mask-click="false"
animation
class="center-popup"
>
<view class="box">
<view class="title flex">
<view class="text">套餐详情</view>
<view
class="icon-close-box flex"
@click="close"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="20"
color="#1A1A1A"
></uni-icons>
</view>
</view>
<view class="content">
<slot />
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'PackageDetailPopup',
props: {
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.packageDetailPopupRef.open();
},
close () {
this.$refs.packageDetailPopupRef.close();
this.$emit('cancel')
},
}
}
</script>
<style scoped lang='scss'>
.center-popup {
z-index: 99 !important;
}
.box {
width: toRpx(1400);
max-height: 80vh;
min-height: 32vh;
background: #ffffff;
border-radius: toRpx(48);
overflow: auto;
.title {
width: 100%;
height: toRpx(160);
background-color: #fff;
background-image: url('@/assets/images/boutique/customer-type-bg.webp');
background-repeat: no-repeat;
background-size: 100% 100%;
position: sticky;
top: 0;
z-index: 2;
.text {
font-weight: 500;
font-size: toRpx(40);
color: #1a1a1a;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.icon-close-box {
height: 100%;
margin-left: auto;
padding: 0 toRpx(48);
font-weight: 700;
}
}
.content {
width: 100%;
// height: toRpx(768);
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
> >
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
<view class="value">{{ <view class="value">{{
k.formatter ? k.formatter(item[k.key]):
k.format k.format
? formatTime(item[k.key], k.key) ? formatTime(item[k.key], k.key)
: item[k.key] || "-" : item[k.key] || "-"
...@@ -140,6 +141,14 @@ export default { ...@@ -140,6 +141,14 @@ export default {
{ label: '礼券名称', key: 'couponName' }, { label: '礼券名称', key: 'couponName' },
{ label: '领券时间', key: 'receiveCouponDate', format: true }, { label: '领券时间', key: 'receiveCouponDate', format: true },
{ label: '销售顾问', key: 'employeeName' }, { label: '销售顾问', key: 'employeeName' },
{
label: '流量有效性', key: 'trafficEffectiveness', formatter: (val) => {
return {
1: '有效客户',
2: '无效客户'
}[val] || '-'
}
},
], ],
chooseItem: {} chooseItem: {}
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!