Commit dde65788 by 胡悦

feat(接待系统): 实现业务类型切换功能并优化素材展示

重构接待系统核心功能,新增业务类型切换模块,支持动态加载不同业务类型的素材数据。优化素材展示组件,包括:
1. 在首页添加类型切换入口
2. 改造ToolBox组件支持多文件夹展示
3. 完善MaterialIndex组件空状态处理
4. 统一使用materialName替换detailTitle字段
5. 新增业务类型API接口和缓存配置

同时修复了素材切换时的数据同步问题,提升了用户体验和系统稳定性
1 parent cd014bf1
...@@ -463,4 +463,8 @@ module.exports = { ...@@ -463,4 +463,8 @@ module.exports = {
getPadMaterialList(data) { getPadMaterialList(data) {
return http.shukeRequest('linkwe-gateway/reception/pad/materials/materials/list', data, 'POST', true) return http.shukeRequest('linkwe-gateway/reception/pad/materials/materials/list', data, 'POST', true)
}, },
// Pad业务类型列表
getPadBusinessTypeList(data = {}) {
return http.shukeRequest('linkwe-gateway/reception/pad/materials/biz-types/list', data, 'POST', true)
}
} }
...@@ -11,7 +11,7 @@ const serverConfig = { ...@@ -11,7 +11,7 @@ const serverConfig = {
mockTimer: {}, mockTimer: {},
mockCache: null mockCache: null
}, },
configModule = 'app-tape', configModule = 'simgel_app',
boutiqueConfigModule = 'boutique-pad-config', boutiqueConfigModule = 'boutique-pad-config',
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`, configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`,
boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}` boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}`
...@@ -163,7 +163,7 @@ const getSoureData = async (shopMerchantId, sceneType, params = {}) => { ...@@ -163,7 +163,7 @@ const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
componentName: 'CaseCenter', componentName: 'CaseCenter',
receptionpriproCusCaseList: i.receptionpriproCusCaseList, receptionpriproCusCaseList: i.receptionpriproCusCaseList,
hide: true, hide: true,
detailTitle: i.productName, materialName: i.productName,
thumbnail: 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/qsyw.webp' thumbnail: 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/qsyw.webp'
} }
}) })
......
...@@ -12,34 +12,16 @@ ...@@ -12,34 +12,16 @@
<view class="right-content-box flex"> <view class="right-content-box flex">
<view class="content-left"> <view class="content-left">
<view class="module-box box-class"> <view class="module-box box-class">
<view class="common-title">产品介绍</view> <view class="common-title"> {{ currentType.typeName }}产品介绍
<view class="select-type" @click="changeType">切换接待类型</view>
</view>
<view class="content-box"> <view class="content-box">
<template> <template>
<Material ref="materialRef" :moduleList="moduleList"></Material> <Material ref="materialRef" :moduleList="moduleList"></Material>
<!-- <swiper-component
:moduleList="moduleList"
@click="swiperClick"
:stopAutoPlay="previewOff"
:imgKey="bannerKey"
:loadComplete="loadComplete"
:noDataObject="swiperNoDataObject"
>
</swiper-component> -->
</template> </template>
</view> </view>
</view> </view>
<!-- <view class="tool-box box-class">
<view class="common-title">展业工具</view>
<view class="content-box">
<Entrance @entranceClick="entranceClick"></Entrance>
</view>
</view> -->
</view> </view>
<!-- <view class="content-right box-class">
<view class="common-title">服务中心</view>
<view class="content-box">
</view>
</view> -->
</view> </view>
</view> </view>
<template v-if="tabIndex != 0 && tabIndex != 99"> <template v-if="tabIndex != 0 && tabIndex != 99">
...@@ -49,7 +31,7 @@ ...@@ -49,7 +31,7 @@
</view> </view>
<view class="store-addr" v-if="footerBox"> <view class="store-addr" v-if="footerBox">
<view class="icon-addr sprite-icon icon-addr"></view> <view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view> <view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view> </view>
</view> </view>
<view :class="['detail', { show: id }]"> <view :class="['detail', { show: id }]">
...@@ -79,6 +61,15 @@ ...@@ -79,6 +61,15 @@
</view> </view>
</view> </view>
</MessageBox> </MessageBox>
<MessageBox :popupW="704" ref="bizTypeBox" :isFooter="false" title="请选择类型">
<view class="footer">
<template v-for="(i, index) in businessTypeList">
<view class="footer-btn confirm flex" :key="index" @click="chooseBusinessType(i)">
{{ i.typeName }}
</view>
</template>
</view>
</MessageBox>
<!-- 升级弹框 --> <!-- 升级弹框 -->
<update-box /> <update-box />
<slot name="content" /> <slot name="content" />
...@@ -137,12 +128,15 @@ export default { ...@@ -137,12 +128,15 @@ export default {
showBeisen: false, showBeisen: false,
tipsObject: {}, tipsObject: {},
autoplay: true, autoplay: true,
previewOff: false previewOff: false,
businessTypeList: [],
currentType: {}
} }
}, },
mounted() { mounted() {
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo this.userInfo = userInfo
this.currentType = uni.$storage.get('typeItem')
// if (this.checkRecordAudio) permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限 // if (this.checkRecordAudio) permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限
}, },
provide() { provide() {
...@@ -188,14 +182,22 @@ export default { ...@@ -188,14 +182,22 @@ export default {
this.previewOff = off this.previewOff = off
this.$emit(name) this.$emit(name)
}, },
start() { async start() {
// const { sceneType } = this
// if (sceneType == 7) return //二手车无接待功能
// uni.$track.add({
// eventCode: 'app_reception_begins'
// })
this.$emit('start') this.$emit('start')
}, },
async changeType() {
const res = await uni.$api.commonApi.getPadBusinessTypeList()
console.log(res, 'res')
const list = Array.isArray(res?.data) ? res.data : (Array.isArray(res) ? res : [])
this.businessTypeList = list
this.$refs.bizTypeBox.open()
},
chooseBusinessType(item) {
this.$refs.bizTypeBox.close()
this.currentType = item
uni.$storage.set('typeItem', item)
this.$emit('changeType')
},
} }
} }
</script> </script>
...@@ -397,6 +399,15 @@ export default { ...@@ -397,6 +399,15 @@ export default {
height: calc(100% - #{toRpx(235)}); height: calc(100% - #{toRpx(235)});
margin-bottom: toRpx(48); margin-bottom: toRpx(48);
} }
.select-type {
padding: toRpx(20) toRpx(40);
font-size: toRpx(32);
color: #fff;
background-color: #6187e7;
border-radius: toRpx(20);
margin-left: auto;
margin-right: toRpx(48);
}
.tool-box { .tool-box {
height: calc(100% - #{toRpx(712)}); height: calc(100% - #{toRpx(712)});
......
<template> <template>
<view class="material-box"> <view class="material-box">
<!-- 轮播容器:使用 movable-area 实现自定义滑动与自动播放 --> <template v-if="(moduleList && moduleList.length) || (imagelist && imagelist.length)">
<movable-area class="swiper-carousel" @touchstart="starts" @touchend="ends"> <!-- 轮播容器:使用 movable-area 实现自定义滑动与自动播放 -->
<!-- 展示位:根据 item.class 切换左/中/右位置,只有中间可拖拽/点击 --> <movable-area class="swiper-carousel" @touchstart="starts" @touchend="ends">
<movable-view v-for="(item, index) in imagelist" :key="index" :class="['carousel-block', item.class]" <!-- 展示位:根据 item.class 切换左/中/右位置,只有中间可拖拽/点击 -->
direction="horizontal" :disabled="item.class != 'block-center' || moduleList.length == 1" <movable-view v-for="(item, index) in imagelist" :key="index" :class="['carousel-block', item.class]"
:x="item.class != 'block-center' ? 0 : viewX" @change="change" @click.stop="handleClick(item)"> direction="horizontal" :disabled="item.class != 'block-center' || moduleList.length == 1"
<image class="image-block" :src="item.imgUrl" /> :x="item.class != 'block-center' ? 0 : viewX" @change="change" @click.stop="handleClick(item)">
</movable-view> <image class="image-block" :src="item.imgUrl" />
</movable-area> </movable-view>
<!-- 标题:与当前中心卡片 materialName 联动 --> </movable-area>
<view class="module-title flex"> <!-- 标题:与当前中心卡片 materialName 联动 -->
{{ moduleTitle }} <view class="module-title flex">
</view> {{ moduleTitle }}
<!-- 指示点:与 currentIndex 同步高亮 -->
<view class="module-dots flex">
<view v-for="(i, index) in moduleList" :key="index" :class="['dot', { 'active': index == currentIndex }]">
</view> </view>
</view> <!-- 指示点:与 currentIndex 同步高亮 -->
<view class="module-dots flex">
<view v-for="(i, index) in moduleList" :key="index" :class="['dot', { 'active': index == currentIndex }]">
</view>
</view>
</template>
<template v-else>
<view class="empty-box">
<image
class="empty-img"
src="@/assets/images/common/nothing.webp"
mode="aspectFit"
/>
<view class="empty-text">暂无数据</view>
</view>
</template>
</view> </view>
</template> </template>
...@@ -33,34 +45,6 @@ export default { ...@@ -33,34 +45,6 @@ export default {
}, },
data() { data() {
return { return {
// 素材数据源(示例数据,可替换为真实接口)
// moduleList: [
// {
// id: 1,
// materialName: '素材1',
// materialUrl: 'https://img.pconline.com.cn/images/upload/upc/tx/wallpaper/1305/16/c4/20990657_1368686545122.jpg'
// },
// {
// id: 2,
// materialName: '素材2',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// },
// {
// id: 3,
// materialName: '素材3',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// },
// {
// id: 4,
// materialName: '素材4',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// },
// {
// id: 5,
// materialName: '素材5',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// }
// ],
// 轮播数据快照(与 moduleList 同步) // 轮播数据快照(与 moduleList 同步)
datalist: [], datalist: [],
// 渲染用的三卡片列表(左/中/右) // 渲染用的三卡片列表(左/中/右)
...@@ -93,9 +77,7 @@ export default { ...@@ -93,9 +77,7 @@ export default {
watch: { watch: {
moduleList: { moduleList: {
handler(val) { handler(val) {
if (val && val.length) { this.getDatalist()
this.getDatalist()
}
}, },
deep: true deep: true
} }
...@@ -122,6 +104,15 @@ export default { ...@@ -122,6 +104,15 @@ export default {
] ]
return return
} }
if (len === 2) {
// 两张素材:居中 + 右侧
this.imagelist = [
{ isToor: 1, class: 'block-center', imgUrl: this.datalist[0].materialUrl, isIndex: 0, index: 1 },
{ isToor: 2, class: 'block-right', imgUrl: this.datalist[1].materialUrl, isIndex: 1, index: 2 }
]
this.currentIndex = 0
return
}
const count = Math.min(3, len) const count = Math.min(3, len)
this.imagelist = Array.from({ length: count }).map((_, i) => { this.imagelist = Array.from({ length: count }).map((_, i) => {
const cfg = list[i] const cfg = list[i]
...@@ -156,19 +147,24 @@ export default { ...@@ -156,19 +147,24 @@ export default {
const len = datalist.length - 1 const len = datalist.length - 1
const list = JSON.parse(JSON.stringify(this.style_object)) const list = JSON.parse(JSON.stringify(this.style_object))
if (datalist.length === 2) { if (datalist.length === 2) {
this.imagelist.forEach((item, index) => { // 仅两张素材:在中心与右侧之间互换
if (index !== 0) { const a = this.imagelist[0]
const toor = item.isToor === 1 ? 2 : 1 const b = this.imagelist[1]
item.isToor = toor const aWasCenter = a.class === 'block-center'
item.imgUrl = '' a.class = aWasCenter ? 'block-right' : 'block-center'
item.class = list[toor].class a.isToor = a.class === 'block-center' ? 1 : 2
item.x = 0 a.index = a.isToor
const isIndex = item.isIndex a.x = 0
item.isIndex = isIndex a.imgUrl = datalist[a.isIndex]?.materialUrl || ''
item.imgUrl = datalist[isIndex].materialUrl || ''
item.index = list[toor].index b.class = aWasCenter ? 'block-center' : 'block-right'
} b.isToor = b.class === 'block-center' ? 1 : 2
}) b.index = b.isToor
b.x = 0
b.imgUrl = datalist[b.isIndex]?.materialUrl || ''
const ci2 = this.imagelist.findIndex(item => item.class === 'block-center')
if (ci2 !== -1) this.currentIndex = this.imagelist[ci2].isIndex
} else { } else {
this.imagelist.forEach(item => { this.imagelist.forEach(item => {
const toor = direction === 'left' const toor = direction === 'left'
...@@ -252,6 +248,27 @@ export default { ...@@ -252,6 +248,27 @@ export default {
text-align: center; text-align: center;
} }
.empty-box {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: #999999;
font-size: toRpx(28);
}
.empty-box .empty-img {
width: toRpx(160);
height: toRpx(160);
margin-bottom: toRpx(16);
}
.empty-box .empty-text {
line-height: toRpx(40);
}
/* 轮播外层:宽度 90%,上下留边距 */ /* 轮播外层:宽度 90%,上下留边距 */
.swiper-carousel { .swiper-carousel {
width: 90%; width: 90%;
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
}, },
computed: { computed: {
moduleTitle () { moduleTitle () {
return this.moduleList[this.currentIndex]?.detailTitle || '' return this.moduleList[this.currentIndex]?.materialName || ''
} }
}, },
created () { created () {
......
<template> <template>
<view class="tool-box" :style="toolStyle"> <view class="tool-box" :style="toolStyle">
<view :class="['btn', { hideIcon: !show }]" @click="show = false"> <view :class="['btn', { hideIcon: !show }]" @click="open">
<view class="icon sprite-icon icon-tool-file"></view> <view class="icon sprite-icon icon-tool-file"></view>
文件夹 {{ folderName }}
</view> </view>
<view :class="['list', { showList: !show }]"> <view :class="['list', { showList: !show }]">
<view class="title" @click="show = true">文件夹</view> <view class="title" @click="close">{{ folderName }}</view>
<view class="list-body"> <view class="list-body">
<template v-for="(i, index) in data"> <template v-for="(i, index) in data">
<view :class="['item', { active: i[idKey] == id }]" :key="index" @click="jump(i)"> <view :class="['item', { active: i[idKey] == id }]" :key="index" @click="jump(i)">
<image class="icon" :src="i.shortTitleUrl" mode="scaleToFill" /> <template v-if="i.shortTitleUrl">
<image class="icon" :src="i.shortTitleUrl" mode="scaleToFill" />
</template>
<template v-else>
<view class="icon">
<view class="sprite-icon icon-tool-file"></view>
</view>
</template>
{{ i.shortTitle }} {{ i.shortTitle }}
</view> </view>
</template> </template>
...@@ -46,7 +53,11 @@ export default { ...@@ -46,7 +53,11 @@ export default {
type: String, type: String,
default: 'id' default: 'id'
}, },
toolStyle:String toolStyle:String,
folderName: {
type: String,
default: '文件夹'
}
}, },
data () { data () {
return { return {
...@@ -70,6 +81,14 @@ export default { ...@@ -70,6 +81,14 @@ export default {
hide () { hide () {
this.show = true this.show = true
}, },
open () {
this.show = false
this.$emit('open')
},
close () {
this.show = true
this.$emit('close')
},
jump (item) { jump (item) {
this.show = true this.show = true
this.$emit('choose', item) this.$emit('choose', item)
......
...@@ -5,8 +5,9 @@ export default { ...@@ -5,8 +5,9 @@ export default {
handler (key) { handler (key) {
try { try {
if (!key || this.type == 'preview') return if (!key || this.type == 'preview') return
let { useCarConfig, moduleList, media } = this, let { moduleList } = this,
array = useCarConfig ? moduleList : media array = moduleList
if (!Array.isArray(array) || array.length === 0) return
let item = array.find(e => e.id == key), let item = array.find(e => e.id == key),
value = this.receptionTrack[key] value = this.receptionTrack[key]
if (value) { if (value) {
...@@ -15,7 +16,7 @@ export default { ...@@ -15,7 +16,7 @@ export default {
} else { } else {
value = { value = {
openCount: 1, openCount: 1,
materialName: item.detailTitle || '', materialName: item.materialName || '',
materialId: item.id, materialId: item.id,
stayDuration: 0, stayDuration: 0,
entryTime: Date.now() entryTime: Date.now()
...@@ -26,6 +27,30 @@ export default { ...@@ -26,6 +27,30 @@ export default {
console.log(error) console.log(error)
} }
} }
},
moduleList: {
immediate: true,
handler (list) {
try {
const key = this.id
if (!key || this.type == 'preview') return
if (!Array.isArray(list) || list.length === 0) return
let value = this.receptionTrack[key]
if (value) return
const item = list.find(e => e.id == key)
if (!item) return
value = {
openCount: 1,
materialName: item.materialName || '',
materialId: item.id,
stayDuration: 0,
entryTime: Date.now()
}
this.$store.dispatch("setReceptionTrack", { key, value })
} catch (error) {
console.log(error)
}
}
} }
}, },
computed: { computed: {
...@@ -46,4 +71,4 @@ export default { ...@@ -46,4 +71,4 @@ export default {
} }
} }
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<home-frame <home-frame
@preview="preview" @preview="preview"
@start="start" @start="start"
@changeType="changeType"
ref="home" ref="home"
:id="id" :id="id"
@openStep="openStep" @openStep="openStep"
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
<detail <detail
:id.sync="id" :id.sync="id"
:media="moduleList" :media="moduleList"
:folders="folderList"
:type.sync="type" :type.sync="type"
:toolList="toolList" :toolList="toolList"
:aitoCarModelIds="aitoCarModelIds" :aitoCarModelIds="aitoCarModelIds"
...@@ -41,49 +43,8 @@ export default { ...@@ -41,49 +43,8 @@ export default {
data () { data () {
return { return {
moduleList: [], moduleList: [],
// moduleList:[ folderList: [],
// { toolList: [],
// id: 6,
// thumbnail: 'https://img02.glsx.com.cn/weapp/resource/app-tape/media/benz/6.webp',
// title: '保修升级产品保障范围',
// class: 'landscape',
// style: 'width: calc(100vw * (1282 / 2346));height: calc(100vmin * (1173 / 768) * (304 / 2346));',
// showAlt: false,
// componentName: 'media-component',
// detailTitle: '保修升级产品保障范围',
// receptionSourceDetailList: {
// detailUrl: 'https://img02.glsx.com.cn/weapp/resource/app-tape/media/benz/page/6-1.webp'
// }
// },
// {
// id: 2,
// materialName: '素材2',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// },
// {
// id: 3,
// materialName: '素材3',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// },
// {
// id: 4,
// materialName: '素材4',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// },
// {
// id: 5,
// materialName: '素材5',
// materialUrl: 'https://seopic.699pic.com/photo/50073/0161.jpg_wh1200.jpg'
// }
// ],
toolList: [
// {
// id: 6,
// shortTitle: '保障范围',
// title: '保修升级产品保障范围',
// shortTitleUrl: 'https://img02.glsx.com.cn/weapp/resource/app-tape/tool/6.png'
// }
],
id: '', id: '',
type: '', type: '',
chooseItem: {}, chooseItem: {},
...@@ -108,7 +69,12 @@ export default { ...@@ -108,7 +69,12 @@ export default {
}, },
async onLoad () { async onLoad () {
// uni.hideLoading() // uni.hideLoading()
// const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息 const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息
console.log(mockdata,'mockdata')
uni.$storage.set('typeItem', {
typeCode: mockdata?.typeCode || '',
typeName: mockdata?.typeName || ''
})
// if (this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) { // if (this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) {
// this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌 // this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌
// if (mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系 // if (mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系
...@@ -116,7 +82,7 @@ export default { ...@@ -116,7 +82,7 @@ export default {
// this.get_Vehicle_Sales_Data() // this.get_Vehicle_Sales_Data()
// this.requested = true // this.requested = true
// this.$refs.home.updateApp(true) // this.$refs.home.updateApp(true)
this.getSoure() this.getSoure(mockdata?.typeCode)
}, },
async onShow () { async onShow () {
// this.init() // this.init()
...@@ -128,48 +94,68 @@ export default { ...@@ -128,48 +94,68 @@ export default {
// if (this.requested && !this.id) this.$refs.home.updateApp() // if (this.requested && !this.id) this.$refs.home.updateApp()
// }, // },
// 查询素材 // 查询素材
async getSoure () { async getSoure (typeCode) {
const first_res = await uni.$api.commonApi.getPadFolderList({ const first_res = await uni.$api.commonApi.getPadFolderList({
typeCode: '17324738e3e28597d671f23002e796eb', typeCode,
status: 0 status: 0
}) })
console.log(first_res) this.folderList = Array.isArray(first_res?.data) ? first_res.data : []
if (first_res?.data?.length) { if (!this.folderList.length) {
const second_res = await uni.$api.commonApi.getPadMaterialList({ this.moduleList = []
folderCode: first_res?.data[0]?.folderCode, this.toolList = []
typeCode: first_res?.data[0]?.typeCode, return
}
let materials = []
for (let i = 0; i < this.folderList.length; i++) {
const folder = this.folderList[i]
const res = await uni.$api.commonApi.getPadMaterialList({
folderCode: folder.folderCode,
typeCode: folder.typeCode,
status: 0 status: 0
}) })
console.log(second_res, 'second_res') const list = Array.isArray(res?.data) ? res.data : []
if (second_res?.data?.length) { if (list.length) {
this.moduleList = second_res?.data?.map(item => ({ materials = list
...item, break
thumbnail: item.materialUrl,
title: item.materialName,
class: 'landscape',
style: 'width: calc(100vw * (1282 / 2346));height: calc(100vmin * (1173 / 768) * (304 / 2346));',
showAlt: false,
componentName: 'media-component',
detailTitle: item.materialName,
receptionSourceDetailList: {
detailUrl: item.materialUrl
}
}))
this.toolList = second_res?.data?.map(item => ({
...item,
shortTitle: item.materialName,
title: item.materialName,
shortTitleUrl: item.materialUrl
}))
} }
} }
},
async start () { if (!materials.length) {
// if (!this.moduleList.length) return uni.showToast({ this.moduleList = []
// title: '该场景尚未配置素材,请联系总部人员', this.toolList = []
// icon: 'none' return
// }) }
this.moduleList = materials.map(item => ({
...item,
thumbnail: item.materialUrl,
title: item.materialName,
class: 'landscape',
style: 'width: calc(100vw * (1282 / 2346));height: calc(100vmin * (1173 / 768) * (304 / 2346));',
showAlt: false,
componentName: 'media-component',
materialName: item.materialName,
receptionSourceDetailList: {
detailUrl: item.materialUrl
}
}))
this.toolList = materials.map(item => ({
...item,
shortTitle: item.materialName,
title: item.materialName,
shortTitleUrl: item.materialUrl
}))
},
changeType () {
const typeItem = uni.$storage.get('typeItem')
this.getSoure(typeItem?.typeCode)
},
async start (item) {
if (!this.moduleList.length) return uni.showToast({
title: '该场景尚未配置素材,请联系总部人员',
icon: 'none'
})
// const isPermision = await this.$refs.home.isPermission() // const isPermision = await this.$refs.home.isPermission()
// if (this.recording || !isPermision) return // if (this.recording || !isPermision) return
// uni.showLoading({ // uni.showLoading({
...@@ -177,8 +163,10 @@ export default { ...@@ -177,8 +163,10 @@ export default {
// }) // })
// this.$refs.home.startAudio() // this.$refs.home.startAudio()
// this.clearHistory() // this.clearHistory()
// this.id = this.moduleList[0].id
this.id = 6 this.id = +this.moduleList[0].id
console.log(this.id)
// this.id = 6
this.type = 'edit' this.type = 'edit'
this.recording = true this.recording = true
// setTimeout(() => { // setTimeout(() => {
......
...@@ -44,5 +44,6 @@ export const STORAGE_OBJECTKEY = { ...@@ -44,5 +44,6 @@ export const STORAGE_OBJECTKEY = {
studyCenterPermission: 'studyCenterPermission', studyCenterPermission: 'studyCenterPermission',
caseInfo: 'caseInfo', caseInfo: 'caseInfo',
boutique_YQorderSetting: 'boutique_YQorderSetting', boutique_YQorderSetting: 'boutique_YQorderSetting',
sessionId:'sessionId' sessionId:'sessionId',
typeItem: 'typeItem',
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!