Commit c0d74c52 by 李伟康

commit 提交首页

1 parent b4786eb1
...@@ -11,10 +11,17 @@ const serverConfig = { ...@@ -11,10 +11,17 @@ const serverConfig = {
mockTimer: {}, mockTimer: {},
mockCache: null, mockCache: null,
}, },
boutiqueServerConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null,
},
configModule = 'app-tape', configModule = 'app-tape',
bydConfigModule = 'byd-pad-config', bydConfigModule = 'byd-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}`,
bydConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${bydConfigModule}&env=${env}` bydConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${bydConfigModule}&env=${env}`,
boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}`
/**获取mock数据 */ /**获取mock数据 */
const getMockData = async (immediate = false) => { const getMockData = async (immediate = false) => {
...@@ -124,7 +131,44 @@ const getBydMockData = async (immediate = false) => { ...@@ -124,7 +131,44 @@ const getBydMockData = async (immediate = false) => {
bydServerConfig.mockRequestCount = null; bydServerConfig.mockRequestCount = null;
return Promise.reject(error); return Promise.reject(error);
} }
}; }
/**
*获取轻改配置
*/
const getBoutiqueMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('boutique_mock_data')
try {
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) {
return Promise.resolve(MOCKDATA);
} else {
if (!boutiqueServerConfig.mockRequestCount || immediate) {
boutiqueServerConfig.mockCache = null;
boutiqueServerConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url: boutiqueConfigUrl });
data.createTime = Date.now();
boutiqueServerConfig.mockCache = data;
uni.$storage.set('byd_mock_data', data);
return Promise.resolve(data);
} else {
const key = Date.now();
return new Promise((resolve) => {
boutiqueServerConfig.mockTimer[key] = setInterval(() => {
if (boutiqueServerConfig.mockCache) {
clearInterval(boutiqueServerConfig.mockTimer[key]);
boutiqueServerConfig.mockRequestCount = null;
resolve(boutiqueServerConfig.mockCache);
}
}, 1e3);
});
}
}
} catch (error) {
console.log(error)
if (boutiqueServerConfig.mockTimer[key]) clearInterval(boutiqueServerConfig.mockTimer[key]);
boutiqueServerConfig.mockRequestCount = null;
return Promise.reject(error);
}
}
// 图片版本号 // 图片版本号
const getImageVersion = async () => { const getImageVersion = async () => {
const accountInfo = await getMockData() const accountInfo = await getMockData()
...@@ -136,5 +180,6 @@ module.exports = { ...@@ -136,5 +180,6 @@ module.exports = {
getMockData, getMockData,
imgToBase64, imgToBase64,
updateMockData, updateMockData,
getBydMockData getBydMockData,
getBoutiqueMockData
} }
\ No newline at end of file \ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1238rpx -668rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1238rpx -668rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -765rpx -621rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -594rpx -853rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;}
.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-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;}
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
.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;}
.icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;} .icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -476rpx -853rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -641rpx -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: -940rpx -668rpx;}
...@@ -51,5 +51,8 @@ ...@@ -51,5 +51,8 @@
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -79rpx -964rpx;} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -79rpx -964rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -154rpx -964rpx;} .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -154rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -229rpx -964rpx;} .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -229rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -523rpx -853rpx;} .icon-total { width: 32rpx; height: 32rpx; background-position: -688rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;} .icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-boutique-config-0 { width: 44rpx; height: 44rpx; background-position: -765rpx -621rpx;}
.icon-boutique-config-1 { width: 44rpx; height: 44rpx; background-position: -476rpx -853rpx;}
.icon-boutique-config-2 { width: 44rpx; height: 44rpx; background-position: -535rpx -853rpx;}
\ No newline at end of file \ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type

1.13 MB | W: | H:

1.14 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<view class="container" @click="handleTouchStart"> <view
class="container"
@click="handleTouchStart"
>
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<view class="bg">
<view class="top">
<view class="top-one" :style="randomize"></view>
</view>
<view class="bottom">
<view class="bottom-one" :style="randomize"></view>
<view class="bottom-two" :style="randomize"></view>
<view class="bottom-three" :style="randomize"></view>
</view>
</view>
<view class="left-side"> <view class="left-side">
<view class="user-info flex"> <view class="user-info flex">
<view class="user-avatar sprite-icon icon-avatar"></view> <view class="user-avatar sprite-icon icon-avatar"></view>
...@@ -24,22 +17,26 @@ ...@@ -24,22 +17,26 @@
@click="changeIndex(index)" @click="changeIndex(index)"
> >
<view class="icon-box"> <view class="icon-box">
<view <view :class="[
:class="[
'sprite-icon', 'sprite-icon',
`icon-${i.icon}${tabIndex == index ? '-active' : ''}`, `icon-${i.icon}${tabIndex == index ? '-active' : ''}`,
]" ]"></view>
></view>
</view> </view>
{{ i.label }} {{ i.label }}
</view> </view>
</template> </template>
</view> </view>
<view class="left-footer"> <view class="left-footer">
<view class="btn" @click="$refs.kfRef.open()"> <view
class="btn"
@click="$refs.kfRef.open()"
>
<view class="sprite-icon icon-feedback"></view> <view class="sprite-icon icon-feedback"></view>
</view> </view>
<view class="btn" @click="$refs.settingRef.open()"> <view
class="btn"
@click="$refs.settingRef.open()"
>
<view class="sprite-icon icon-setting"></view> <view class="sprite-icon icon-setting"></view>
</view> </view>
</view> </view>
...@@ -47,7 +44,10 @@ ...@@ -47,7 +44,10 @@
<view class="right-side"> <view class="right-side">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<view class="right-content"> <view class="right-content">
<view class="start" @click="$emit('start')"> <view
class="start"
@click="$emit('start')"
>
<image <image
class="start-btn" class="start-btn"
src="../../assets/images/home/start.gif" src="../../assets/images/home/start.gif"
...@@ -99,13 +99,19 @@ ...@@ -99,13 +99,19 @@
:isFooter="false" :isFooter="false"
> >
<view class="footer"> <view class="footer">
<view class="footer-btn confirm flex" @click="$emit('openStep')"> <view
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<template v-if="finishDoneText"> <template v-if="finishDoneText">
{{ finishDoneText }} {{ finishDoneText }}
</template> </template>
<template v-else> 完成接待<text>(推荐)</text> </template> <template v-else> 完成接待<text>(推荐)</text> </template>
</view> </view>
<view class="footer-btn cancel flex" @click="$emit('backHome')"> <view
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
仍要退出<text>(不推荐)</text> 仍要退出<text>(不推荐)</text>
</view> </view>
</view> </view>
...@@ -115,7 +121,10 @@ ...@@ -115,7 +121,10 @@
<!-- 客服弹框 --> <!-- 客服弹框 -->
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box ref="settingRef" @stopAudio="stopAudio" /> <setting-box
ref="settingRef"
@stopAudio="stopAudio"
/>
<slot name="content" /> <slot name="content" />
<web-view <web-view
@message="handlerMessage" @message="handlerMessage"
...@@ -131,7 +140,7 @@ import RecordList from "./components/RecordList.vue"; ...@@ -131,7 +140,7 @@ import RecordList from "./components/RecordList.vue";
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
import uploader from "@/mixin/uploader.js"; import uploader from "@/mixin/uploader.js";
export default { export default {
mixins: [myClick,uploader], mixins: [myClick, uploader],
components: { KfBox, SettingBox, RecordList }, components: { KfBox, SettingBox, RecordList },
props: { props: {
id: [String, Number], id: [String, Number],
...@@ -141,7 +150,7 @@ export default { ...@@ -141,7 +150,7 @@ export default {
default: "当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”", default: "当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”",
}, },
}, },
data() { data () {
return { return {
userInfo: {}, userInfo: {},
tabs: [ tabs: [
...@@ -155,34 +164,22 @@ export default { ...@@ -155,34 +164,22 @@ export default {
}, },
], ],
tabIndex: 0, tabIndex: 0,
dateKey: null,
}; };
}, },
mounted() { mounted () {
const userInfo = uni.$storage.get("userInfo") || {}; const userInfo = uni.$storage.get("userInfo") || {};
this.userInfo = userInfo; this.userInfo = userInfo;
setInterval(() => {
this.dateKey = Date.now();
}, 5e3);
}, },
computed: { computed: {
randomize() { previewRef () {
let { dateKey } = this;
const maxX = uni.getSystemInfoSync().windowWidth - 300,
maxY = uni.getSystemInfoSync().windowHeight - 100,
x = Math.floor(Math.random() * maxX),
y = Math.floor(Math.random() * maxY);
return `transform:translate(${x}px,${y}px);${dateKey};`;
},
previewRef() {
return this.$refs.previewRef; return this.$refs.previewRef;
}, },
finishRef() { finishRef () {
return this.$refs.finish; return this.$refs.finish;
}, },
}, },
methods: { methods: {
changeIndex(index) { changeIndex (index) {
if (this.tabIndex == index) return; if (this.tabIndex == index) return;
this.tabIndex = index; this.tabIndex = index;
this.$emit("changeTab", index); this.$emit("changeTab", index);
...@@ -193,142 +190,15 @@ export default { ...@@ -193,142 +190,15 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
position: relative; position: relative;
.bg { &::after {
content: '';
position: absolute; position: absolute;
z-index: -2;
left: 0; left: 0;
top: 0; top: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-image: linear-gradient(180deg, #f2f6ff 0%, #f7f9ff 100%); background-image: url('@/assets/images/common/home-bg.webp');
overflow: hidden; background-size: 100vw 100vh;
.top {
position: absolute;
top: 0;
left: 0;
width: 100%;
&-one {
position: absolute;
top: -1600rpx;
right: 128rpx;
width: 2012rpx;
height: 2012rpx;
opacity: 0.3;
background: #fff;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
border-radius: 50% / 25%;
transition: all 2s;
z-index: 2;
&::before {
position: absolute;
width: 856.56rpx;
height: 153.54rpx;
right: 150rpx;
top: 0;
opacity: 0.6;
background: #ebfdff;
filter: blur(36rpx);
content: "";
}
}
&::before {
position: absolute;
content: "";
right: 0;
top: 0;
width: 890.36rpx;
height: 174.84rpx;
opacity: 0.2;
background: #3582ee;
filter: blur(100rpx);
}
&::after {
width: 274.32rpx;
height: 410.02rpx;
opacity: 0.16;
background-image: linear-gradient(125deg, #65b8f7 36%, #3582ee 79%);
filter: blur(74rpx);
position: absolute;
content: "";
right: 0;
top: 24rpx;
}
}
.bottom {
position: absolute;
width: 1291.3rpx;
height: 316rpx;
left: 0;
bottom: 0;
z-index: 2;
&::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0.11;
background: #3582ee;
filter: blur(100rpx);
}
&::after {
width: 1484.32rpx;
height: 160.02rpx;
opacity: 0.12;
background-image: linear-gradient(125deg, #65b8f8 36%, #3582ee 79%);
filter: blur(74rpx);
position: absolute;
left: 480rpx;
bottom: 0;
content: "";
}
&-one {
position: absolute;
left: 0;
bottom: 44rpx;
width: 643.02rpx;
height: 258.78rpx;
opacity: 0.4;
background: #ebfffd;
filter: blur(36rpx);
transition: all 2s;
}
&-two {
position: absolute;
width: 450rpx;
height: 450rpx;
opacity: 0.24;
background: #ffffff;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
border: 100%;
left: -225rpx;
bottom: -225rpx;
border-radius: 100%;
transition: all 2s;
}
&-three {
width: 762.7rpx;
height: 210.92rpx;
opacity: 0.16;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
background-color: fff;
position: fixed;
left: 0;
top: 0;
border-radius: 50%;
transition: all 2s;
z-index: 2;
}
}
}
@keyframes bottom-move {
0% {
transform: translate(0);
}
100% {
transform: translate(300%, -50%);
}
} }
.home, .home,
.detail { .detail {
...@@ -385,9 +255,9 @@ export default { ...@@ -385,9 +255,9 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url("@/assets/images/home/left.webp"); background-image: url('@/assets/images/home/left.webp');
background-size: 100% 100%; background-size: 100% 100%;
content: ""; content: '';
z-index: -1; z-index: -1;
} }
.tab-item { .tab-item {
...@@ -572,7 +442,7 @@ export default { ...@@ -572,7 +442,7 @@ export default {
} }
&::before, &::before,
&::after { &::after {
content: ""; content: '';
width: 600rpx; width: 600rpx;
height: 2rpx; height: 2rpx;
...@@ -613,12 +483,4 @@ export default { ...@@ -613,12 +483,4 @@ export default {
font-size: 24rpx; font-size: 24rpx;
} }
} }
@keyframes shine {
0% {
background-position-x: 100%;
}
100% {
background-position-x: -100%;
}
}
</style> </style>
...@@ -22,18 +22,18 @@ ...@@ -22,18 +22,18 @@
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
:class="['view', { showView: id == item.sort }]" :class="['view', { showView: id == item.id }]"
:key="index" :key="index"
> >
<component <component
:is="componentName(item.sort)" :is="item.componentName"
:views="item.receptionSourceDetailList || []" :views="item.receptionSourceDetailList || []"
:ref="'media' + item.sort" :ref="'media' + item.id"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:madiaId="item.sort" :madiaId="item.id"
:customerType="customerType" :customerType="customerType"
@jumpPage="jumpPage" @jumpPage="jumpPage"
:show="id == item.sort" :show="id == item.id"
@reception="reception" @reception="reception"
/> />
</view> </view>
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id" :id="id"
idKey="sort"
/> />
</template> </template>
<finish-step <finish-step
...@@ -85,7 +84,7 @@ export default { ...@@ -85,7 +84,7 @@ export default {
default: "preview", default: "preview",
}, },
customerType: Number, customerType: Number,
historyId: [Number, String] toolList: Array
}, },
data () { data () {
return { return {
...@@ -94,47 +93,31 @@ export default { ...@@ -94,47 +93,31 @@ export default {
computed: { computed: {
title () { title () {
let { id } = this, let { id } = this,
name = this.media.find((e) => e.sort == id)?.detailTitle || ""; name = this.media.find((e) => e.id == id)?.detailTitle || "";
return name; return name;
}, },
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus; return this.$store.state.user.historyStatus;
}, },
toolList () {
return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) {
return a.shortSort - b.shortSort
})
}
}, },
mounted () { }, mounted () { },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
componentName (id) {
let name = "";
if ([2, 4, 5].includes(id)) name = "membranes";
else
name = {
1: "reception",
7: "invitation",
3: "Case",
6: 'history'
}[id];
return name;
},
open () { open () {
this.$refs.stepRef.open(); this.$refs.stepRef.open();
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose (e) {
if (this.id == 1) this.$refs.media1[0].closeAllPopup(); Object.keys(this.$refs).map(refKey => {
this.jumpPage({ id: e.sort }) let ref = this.$refs[refKey];
if (ref) {
if (Array.isArray(ref)) ref = ref[0]
ref.closeAllPopup && ref.closeAllPopup()
}
})
this.jumpPage({ id: e.id })
}, },
back () { back () {
if (this.historyId) {
this.jumpPage({ id: this.historyId })
this.$emit('update:historyId', '')
return
}
this.$refs?.toolRef?.hide(); this.$refs?.toolRef?.hide();
this.$emit("back"); this.$emit("back");
}, },
...@@ -143,8 +126,7 @@ export default { ...@@ -143,8 +126,7 @@ export default {
this.$refs.stepRef.close(); this.$refs.stepRef.close();
this.$emit("done", e); this.$emit("done", e);
}, },
jumpPage ({ id, historyId }) { jumpPage ({ id }) {
this.$emit('update:historyId', historyId || '')
this.$emit("update:id", Number(id)); this.$emit("update:id", Number(id));
}, },
/**回店客户 */ /**回店客户 */
...@@ -170,7 +152,7 @@ export default { ...@@ -170,7 +152,7 @@ export default {
this.$emit('reception') this.$emit('reception')
}, },
backInvitation () { backInvitation () {
this.jumpPage({ id: 7 }) this.jumpPage({ id: 3 })
setTimeout(() => { setTimeout(() => {
uni.showToast({ uni.showToast({
title: '请选择回店客户', title: '请选择回店客户',
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</view> </view>
<view class="tabel-container"> <view class="tabel-container">
<table class="tabel-box" cellspacing="0" border="0" cellpadding="0"> <table class="tabel-box" cellspacing="0" border="0" cellpadding="0">
<tr v-for="i in goodsList"> <tr v-for="i in goodsList" :key="i.id">
<td>{{ i.goodsName }}</td> <td>{{ i.goodsName }}</td>
<td>{{ i.goodsPositionName || "-" }}</td> <td>{{ i.goodsPositionName || "-" }}</td>
<td>{{ i.number }}</td> <td>{{ i.number }}</td>
......
...@@ -10,37 +10,91 @@ ...@@ -10,37 +10,91 @@
finishDoneText="下一步" finishDoneText="下一步"
finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。" finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。"
> >
<template slot="module">
<view class="module-box">
<view class="module-flex flex">
<template v-for="(i,index) in moduleList">
<view <view
class="module-box" class="item flex"
slot="module"
:key="moduleKey"
>
<template v-for="(i, index) in moduleList">
<view
:key="index" :key="index"
:class="['item', i.class]" v-if="!i.hide"
:style="i.style"
@click="toDetail(i)" @click="toDetail(i)"
> >
<image <image
class="item-img"
:src="i.thumbnail" :src="i.thumbnail"
mode="scaleToFill" class="icon"
/> />
{{i.title}}
</view> </view>
</template> </template>
</view> </view>
<view class="center-bg"></view>
<view class="banner-tab-box flex">
<template v-for="(item, index) in carBannerList">
<view
:key="index"
:class="['banner-tab',`${currentIndex == index ? 'active' : ''}`]"
@click="changeIndex(index)"
>
{{item.title}}
</view>
</template>
</view>
<swiper
class="swiper"
circular
:autoplay="bannerAutoplay"
interval="3000"
previous-margin="380rpx"
next-margin="448rpx"
@change="swiperChange"
:current="currentIndex"
>
<template v-for="(item, index) in carBannerList">
<swiper-item
:key="index"
:class="['swiper-item flex',carClass(index)]"
>
<image
:src="item.url"
class="car-item"
/>
<template v-if="currentIndex == index">
<view class="config-box">
<template v-for="(i,ind) in carConfigList">
<view
:class="['config-item',i.class]"
:key="ind"
>
<view class="config-dots"></view>
<view class="config-name flex">
<view :class="['sprite-icon',`icon-${i.icon}`]"></view>
{{i.name}}
</view>
</view>
</template>
</view>
</template>
</swiper-item>
</template>
</swiper>
<view class="tips">
* 窗膜精品,更有整车搭配套餐火爆售卖。
<view>点击了解更多&gt;</view>
</view>
</view>
</template>
<template slot="detail"> <template slot="detail">
<detail <detail
:id.sync="id" :id.sync="id"
:media="moduleList" :media="moduleList"
:type.sync="type" :type.sync="type"
:toolList="toolList"
@back="back" @back="back"
@done="done" @done="done"
ref="detail" ref="detail"
:customerType.sync="customerType" :customerType.sync="customerType"
@reception="reception" @reception="reception"
:historyId.sync="historyId"
/> />
</template> </template>
<template slot="content"> <template slot="content">
...@@ -57,19 +111,50 @@ import HomeFrame from '@/components/HomeFrame/index.vue' ...@@ -57,19 +111,50 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
import detail from './detail.vue' import detail from './detail.vue'
import CustomerType from './components/CustomerType.vue'; import CustomerType from './components/CustomerType.vue';
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
const m5 = require("@/assets/images/boutique/index/m5.webp")
const m7 = require("@/assets/images/boutique/index/m7.webp")
const m9 = require("@/assets/images/boutique/index/m9.webp")
export default { export default {
components: { HomeFrame, detail, CustomerType }, components: { HomeFrame, detail, CustomerType },
name: 'boutique', name: 'boutique',
data () { data () {
return { return {
moduleList: [], moduleList: [],
moduleKey: Date.now(), toolList:[],
chooseItem: {}, chooseItem: {},
id: '', id: '',
type: '', type: '',
customerType: -1, customerType: -1,
recording: false, recording: false,
historyId: '' carBannerList: [{
title: 'M5',
url: m5
}, {
title: 'M7',
url: m7
}, {
title: 'M9',
url: m9
}],
currentIndex: 0,
bannerAutoplay: false,
carConfigList: [
{
name: '套餐火爆热卖',
icon: 'boutique-config-0',
class: 'config-0'
},
{
name: '膜类专区',
icon: 'boutique-config-1',
class: 'config-1'
},
{
name: '精品系列',
icon: 'boutique-config-2',
class: 'config-2'
}
]
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -96,6 +181,8 @@ export default { ...@@ -96,6 +181,8 @@ export default {
return; return;
} }
}, },
computed: {
},
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
init () { init () {
...@@ -131,22 +218,10 @@ export default { ...@@ -131,22 +218,10 @@ export default {
}); });
}, },
// 查询素材 // 查询素材
async getSoure (merchantNo) { async getSoure () {
const moduleList = await uni.$api.commonApi.findSoureList({ let { moduleList, toolList } = await uni.$api.systemApi.getBoutiqueMockData(true)
bussinessType: 2,
merchantNo
});
moduleList.map((e, index) => {
if (index < 2) {
e.class = 'landscape'
e.style = {
0: 'width:936rpx;',
1: 'width:690rpx;'
}[index]
} else if (index == 2) e.class = 'square'
else e.class = 'vertical'
})
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList
console.log(moduleList) console.log(moduleList)
}, },
toDetail (item) { toDetail (item) {
...@@ -157,17 +232,12 @@ export default { ...@@ -157,17 +232,12 @@ export default {
this.$refs.home.previewRef.close(); this.$refs.home.previewRef.close();
}, },
preview () { preview () {
let { sort } = this.chooseItem; let { id } = this.chooseItem;
this.type = "preview"; this.type = "preview";
this.id = sort; this.id = id;
this.cancel() this.cancel()
}, },
back () { back () {
if (this.historyId) {
this.id = this.historyId
this.historyId = ''
return
}
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.home.finishRef.open(); if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome(); this.backHome();
...@@ -178,7 +248,6 @@ export default { ...@@ -178,7 +248,6 @@ export default {
this.id = ""; this.id = "";
this.type = ""; this.type = "";
this.customerType = -1 this.customerType = -1
this.historyId = ''
this.clearHistory(); this.clearHistory();
this.init(); this.init();
this.recording = false this.recording = false
...@@ -200,7 +269,7 @@ export default { ...@@ -200,7 +269,7 @@ export default {
return true return true
}, },
jumpPage (id) { jumpPage (id) {
this.id = id ? id : this.moduleList[0].sort this.id = id ? id : this.moduleList[0].id
this.type = "edit" this.type = "edit"
}, },
clearHistory () { clearHistory () {
...@@ -217,8 +286,8 @@ export default { ...@@ -217,8 +286,8 @@ export default {
if (!flag) return if (!flag) return
this.customerType = index this.customerType = index
if (index == 0) { if (index == 0) {
const { sort } = moduleList[moduleList.length - 1] const { id } = moduleList[2]
this.jumpPage(sort) this.jumpPage(id)
} }
else this.jumpPage() else this.jumpPage()
}, },
...@@ -242,40 +311,262 @@ export default { ...@@ -242,40 +311,262 @@ export default {
if (customerType == -1) this.start(false) //开始接待 if (customerType == -1) this.start(false) //开始接待
this.customerType = 0 this.customerType = 0
this.jumpPage() this.jumpPage()
},
swiperChange (e) {
console.log(e)
this.currentIndex = e.detail.current
},
carClass (index) {
let className = this.currentIndex == index ? 'current-item' : ''
if (this.currentIndex == 1) {
if (index == 0) className += ' current-item-left'
else className += ' current-item-right'
}
if ((this.currentIndex == 2 && index == 1) || (this.currentIndex == 0 && index == 2)) className += ' current-item-left'
return className
},
changeIndex (index) {
this.currentIndex = index
this.bannerAutoplay = false
setTimeout(() => {
this.bannerAutoplay = true
}, 3e3)
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.module-box { .module-box {
display: flex; position: relative;
flex-wrap: wrap; width: 100%;
gap: 48rpx; height: 100%;
padding-top: 44rpx; .module-flex {
position: absolute;
top: 0;
right: 0;
padding: 46rpx 80rpx 0 0;
gap: 0 32rpx;
z-index: 2;
.item { .item {
display: flex; height: 56rpx;
flex-direction: column; background: #ffffff66;
border-radius: 48rpx; border: 2rpx solid #ffffff;
border-radius: 8rpx;
backdrop-filter: blur(4rpx);
padding: 0 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 40rpx;
.icon {
margin-right: 8rpx;
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
}
}
}
.banner-tab-box {
padding-top: 50rpx;
.banner-tab {
padding: 0 32rpx;
font-weight: 500;
font-size: 36rpx;
color: #333333b3;
line-height: 44rpx;
width: 130rpx;
text-align: center;
position: relative;
}
.active {
font-weight: 700;
color: #333333;
transition: all 1s;
&::after {
content: '';
position: absolute;
left: 50%;
width: 8rpx;
height: 8rpx;
background: #333333;
border-radius: 100%;
transform: translateX(-50%);
animation: show-dot 0.15s forwards;
}
@keyframes show-dot {
0% {
bottom: 16rpx;
}
100% {
bottom: -16rpx;
}
}
}
}
&::before,
&::after {
content: '';
position: absolute;
top: 282rpx;
width: 380rpx;
height: 640rpx;
background-size: 100% 100%;
z-index: 2;
pointer-events: none;
}
&::before {
left: 0;
background-image: url('@/assets/images/boutique/index/left.webp');
}
&::after {
right: -4rpx;
background-image: url('@/assets/images/boutique/index/right.webp');
}
.swiper {
position: absolute;
left: 0;
top: 230rpx;
width: 100%;
height: 698rpx;
z-index: 1;
&-item {
position: relative;
padding-top: 58rpx;
.config-box {
animation: show-config-box 0.5s forwards;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
@keyframes show-config-box {
0% {
transform: scale(10);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.config-item {
position: absolute;
width: auto;
height: auto;
.config-dots {
width: 80rpx;
height: 80rpx;
background: #ffffff1a;
box-shadow: inset 0 0 8rpx 0 #ffffffe0;
border-radius: 100%;
position: relative; position: relative;
box-sizing: border-box; &::after {
&-img { position: absolute;
content: '';
width: 40rpx;
height: 40rpx;
background: #ffffff;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 100%;
}
animation: config-dots-breathe 3s infinite;
}
.config-name {
position: relative;
width: fit-content;
height: 56rpx;
background: #ffffff66;
border: 2rpx solid #ffffff;
border-radius: 8rpx;
backdrop-filter: blur(4rpx);
padding: 0 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 40rpx;
.sprite-icon {
margin-right: 8rpx;
flex-shrink: 0;
}
}
@keyframes config-dots-breathe {
0%,
100% {
transform: scale(0.9);
opacity: 0.85;
}
50% {
transform: scale(1.2);
opacity: 1;
}
}
}
.config-0 {
top: 108rpx;
left: 962rpx;
.config-name {
left: 20rpx;
top: -188rpx;
}
}
.config-1 {
top: 240rpx;
left: 262rpx;
.config-name {
left: -206rpx;
top: -186rpx;
}
}
.config-2 {
top: 352rpx;
left: 788rpx;
.config-name {
left: 22rpx;
top: 158rpx;
}
}
.car-item {
width: 639rpx;
height: 320rpx;
transition: all 0.5s;
transform-origin: left center;
}
}
.current-item {
.car-item {
width: 100%; width: 100%;
height: 100%; height: 100%;
vertical-align: top;
} }
} }
.landscape { .current-item-left {
height: 312rpx; justify-content: flex-end;
}
.current-item-right {
justify-content: flex-start;
}
} }
.square { .center-bg {
width: 318rpx; position: absolute;
height: 312rpx; left: 0;
top: 0;
width: 2036rpx;
height: 1026rpx;
background-image: url('@/assets/images/boutique/index/module-bg.webp');
background-size: 100% 100%;
pointer-events: none;
} }
.vertical { .tips {
width: 474rpx; position: absolute;
height: 624rpx; left: 32rpx;
bottom: 144rpx;
font-size: 24rpx;
color: #999999;
line-height: 36rpx;
z-index: 2;
} }
} }
</style> </style>
...@@ -21,5 +21,6 @@ export const STORAGE_OBJECTkEY = { ...@@ -21,5 +21,6 @@ export const STORAGE_OBJECTkEY = {
recordSuccessList: "recordSuccessList", recordSuccessList: "recordSuccessList",
historyList: "historyList", historyList: "historyList",
storageVersion: "storageVersion", storageVersion: "storageVersion",
byd_mock_data:'byd_mock_data' byd_mock_data:'byd_mock_data',
boutique_mock_data:'boutique_mock_data'
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!