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>
......
...@@ -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!