Commit 021c1dfa by 李伟康

commit 提交

1 parent f7c84de1
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
.icon-clone { width: 24rpx; height: 24rpx; background-position: -781rpx -509rpx;} .icon-clone { width: 24rpx; height: 24rpx; background-position: -781rpx -509rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;} .icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;} .icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;}
.icon-customer-add { width: 80rpx; height: 80rpx; background-position: -1216rpx -382rpx;}
.icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -830rpx -668rpx;} .icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -830rpx -668rpx;}
.icon-customer-file-active { width: 112rpx; height: 112rpx; background-position: -638rpx -558rpx;} .icon-customer-file-active { width: 112rpx; height: 112rpx; background-position: -638rpx -558rpx;}
.icon-customer-file { width: 112rpx; height: 112rpx; background-position: 0rpx -726rpx;} .icon-customer-file { width: 112rpx; height: 112rpx; background-position: 0rpx -726rpx;}
.icon-detail-start { width: 80rpx; height: 80rpx; background-position: 0rpx -964rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -746rpx -726rpx;} .icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -746rpx -726rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: -857rpx -726rpx;} .icon-face-error { width: 96rpx; height: 96rpx; background-position: -857rpx -726rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -968rpx -726rpx;} .icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -968rpx -726rpx;}
...@@ -37,9 +39,13 @@ ...@@ -37,9 +39,13 @@
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -688rpx -853rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -688rpx -853rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -735rpx -853rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -735rpx -853rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;}
.icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -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;}
...@@ -47,19 +53,13 @@ ...@@ -47,19 +53,13 @@
.icon-scan { width: 32rpx; height: 32rpx; background-position: -782rpx -853rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -782rpx -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;}
.icon-tag-checked { width: 60rpx; height: 32rpx; background-position: -1240rpx -557rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;}
.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: -829rpx -853rpx;} .icon-total { width: 32rpx; height: 32rpx; background-position: -829rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-customer-add { width: 80rpx; height: 80rpx; background-position: -1216rpx -382rpx;}
.icon-detail-start { width: 80rpx; height: 80rpx; background-position: 0rpx -964rpx;}
.icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;}
.icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;}
.icon-pause { width: 40rpx; height: 40rpx; background-position: -1050rpx -668rpx;}
.icon-play { width: 40rpx; height: 40rpx; background-position: -1105rpx -668rpx;}
.icon-tag-checked { width: 60rpx; height: 32rpx; background-position: -1240rpx -557rpx;}
\ 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

1.2 MB | W: | H:

1.2 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>
<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>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
dateKey: null,
}
},
computed:{
randomize () {
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};`;
},
},
mounted () {
setInterval(() => {
this.dateKey = Date.now();
}, 5e3);
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.bg {
position: absolute;
z-index: -2;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-image: linear-gradient(180deg, #f2f6ff 0%, #f7f9ff 100%);
overflow: hidden;
.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;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view <view
class="container" class="container"
@click="handleTouchStart" @click="handleTouchStart"
> >
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<home-animation></home-animation>
<left-side <left-side
:userInfo="userInfo" :userInfo="userInfo"
:tabIndex.sync="tabIndex" :tabIndex.sync="tabIndex"
...@@ -109,12 +105,11 @@ ...@@ -109,12 +105,11 @@
import RecordList from "./components/RecordList.vue"; 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";
import HomeAnimation from './components/HomeAnimation.vue';
import CustomerFile from './components/CustomerFile.vue'; import CustomerFile from './components/CustomerFile.vue';
import LeftSide from './components/LeftSide.vue'; import LeftSide from './components/LeftSide.vue';
export default { export default {
mixins: [myClick, uploader], mixins: [myClick, uploader],
components: { RecordList, HomeAnimation, CustomerFile, LeftSide }, components: { RecordList, CustomerFile, LeftSide },
props: { props: {
id: [String, Number], id: [String, Number],
finishDoneText: String, finishDoneText: String,
...@@ -153,6 +148,16 @@ export default { ...@@ -153,6 +148,16 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
position: relative; position: relative;
&::after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/home-bg.webp');
background-size: 100% 100%;
}
.home, .home,
.detail { .detail {
position: fixed; position: fixed;
......
<template> <template>
<view class="tool-box"> <view class="tool-box" :style="toolStyle">
<view <view
:class="['btn', {hideIcon:!show}]" :class="['btn', {hideIcon:!show}]"
@click="show = false" @click="show = false"
...@@ -64,7 +64,8 @@ export default { ...@@ -64,7 +64,8 @@ export default {
idKey: { idKey: {
type: String, type: String,
default: 'id' default: 'id'
} },
toolStyle:String
}, },
data () { data () {
return { return {
......
...@@ -11,14 +11,15 @@ ...@@ -11,14 +11,15 @@
@blur="input($event)" @blur="input($event)"
@focus="focus" @focus="focus"
/> />
<view class="input-tips" v-if="!isSearch" <view
class="input-tips"
v-if="!isSearch"
>搜索图片/视频名称<uni-icons >搜索图片/视频名称<uni-icons
type="search" type="search"
class="icon" class="icon"
color="#999" color="#999"
size="20" size="20"
></uni-icons ></uni-icons></view>
></view>
<uni-icons <uni-icons
v-if="isSearch" v-if="isSearch"
type="closeempty" type="closeempty"
...@@ -29,13 +30,25 @@ ...@@ -29,13 +30,25 @@
></uni-icons> ></uni-icons>
</view> </view>
<scroll-view class="record-box" scroll-y> <scroll-view
class="record-box"
scroll-y
>
<view class="list"> <view class="list">
<template v-if="list.length"> <template v-if="list.length">
<template v-for="item in list"> <template v-for="item in list">
<view class="item" :key="item.id"> <view
<view class="item-autio" @click="playVideo(item)"> class="item"
<image :src="item.coverUrl" class="cover-box"></image> :key="item.id"
>
<view
class="item-autio"
@click="playVideo(item)"
>
<image
:src="item.coverUrl"
class="cover-box"
></image>
<image <image
v-if="item.sourceType == 2" v-if="item.sourceType == 2"
src="../../assets/images/boutique/play.png" src="../../assets/images/boutique/play.png"
...@@ -48,37 +61,61 @@ ...@@ -48,37 +61,61 @@
</template> </template>
<template v-else> <template v-else>
<view class="nothing flex"> <view class="nothing flex">
<image class="icon" src="../../assets/images/home/nothing.webp" /> <image
class="icon"
src="../../assets/images/home/nothing.webp"
/>
暂无数据 暂无数据
</view> </view>
</template> </template>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="popup-box" v-if="popupShow"> <view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
<uni-icons type="left" :size="24" color="#fff"></uni-icons> class="back"
@click="back"
>
<uni-icons
type="left"
:size="24"
color="#fff"
></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<video ref="videoPlayer" :src="videoSrc" controls></video> <video
ref="videoPlayer"
:src="videoSrc"
controls
></video>
</view> </view>
</view> </view>
<preview
ref="preview"
isComponents
:show="showPreview"
/>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import utils from "@/utils/utils"; import preview from './preview.vue'
export default { export default {
name: '', components: { preview },
name: 'case',
data () { data () {
return { return {
name:'', name: '',
list: [], list: [],
popupShow:false, popupShow: false,
isSearch:false, isSearch: false,
videoSrc: '', videoSrc: '',
showPreview: false
} }
}, },
props: { props: {
...@@ -93,41 +130,44 @@ export default { ...@@ -93,41 +130,44 @@ export default {
}, },
}, },
watch: { watch: {
watchStatus:{ watchStatus: {
handler() { handler () {
this.name = ''; this.name = '';
this.isSearch = false this.isSearch = false
this.list = this.views this.list = this.views
this.showPreview = false
}, },
immediate:true immediate: true
} }
}, },
methods: { methods: {
playVideo(item) { playVideo (item) {
const {tabName,sourceType,detailUrl} = item const { tabName, sourceType, detailUrl } = item
uni.navigateTo({ console.log(this.$refs.preview)
url: `/pages/boutique/preview?tabName=${tabName}&sourceType=${sourceType}&detailUrl=${detailUrl}` // this.showPreview = true
}) // uni.navigateTo({
// url: `/pages/boutique/preview?tabName=${tabName}&sourceType=${sourceType}&detailUrl=${detailUrl}`
// })
}, },
focus() { focus () {
this.isSearch = true this.isSearch = true
}, },
init() { init () {
this.name = ''; this.name = '';
setTimeout(() => { setTimeout(() => {
this.isSearch = false this.isSearch = false
this.list = this.views this.list = this.views
}, 300); }, 300);
}, },
handleClear() { handleClear () {
this.init() this.init()
}, },
input(e) { input (e) {
this.name = e.detail.value this.name = e.detail.value
if(this.name == '') if (this.name == '')
this.isSearch = false this.isSearch = false
this.list = this.views.filter(i=>i.tabName.includes(this.name)) this.list = this.views.filter(i => i.tabName.includes(this.name))
}, },
}, },
} }
...@@ -146,7 +186,7 @@ export default { ...@@ -146,7 +186,7 @@ export default {
height: 800rpx; height: 800rpx;
position: absolute; position: absolute;
left: 0; left: 0;
background-image: url("../../assets/images/boutique/record-bg.png"); background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
top: 0; top: 0;
} }
......
<template>
<view class="sku-content">
<view class="first-type-box flex">
<view :class="['block',blockClass]"></view>
<template v-for="(i,index) in boutiqueMediaConfig[currentCar]">
<view
class="first-type-item flex"
:key="index"
@click="changeTabId(i.tabId,index)"
>
<view :class="['sprite-icon',`icon-${i.icon}`]"></view>
{{i.tabName}}
</view>
</template>
</view>
<scroll-view
class="second-type-scroll"
scroll-x
enable-flex
>
<view class="second-type-box flex">
<template v-for="(i,index) in 20">
<view
:class="['second-type-item flex',secondIndex == index ? 'active' : '']"
:key="index"
@click="secondIndex = index"
>{{i}}一二三四五一二三四</view>
</template>
<view class="padding-right"></view>
</view>
</scroll-view>
<template v-if="tabId == 2 && secondIndex == 0">
<view class="sub-title">品牌</view>
<scroll-view
class="thirdly-type-scroll"
scroll-x
enable-flex
>
<view class="thirdly-type-box flex">
<template v-for="(i,index) in 20">
<view
:class="['thirdly-type-item flex',thirdlyIndex == index ? 'active' : '']"
:key="index"
@click="thirdlyIndex = index"
>{{i}}一二三四五一二三四</view>
</template>
<view class="padding-right"></view>
</view>
</scroll-view>
<view class="sub-title">部位</view>
</template>
<scroll-view
scroll-y
class="content-scroll-box"
id="content-scroll"
:style="{height:contentHeight}"
>
<template v-for="(i,index) in 20">
<view
:class="['goods-item',goodsId == index ? 'active' : '']"
:key="index"
@click="goodsId = index"
>
<view class="goods-title">一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五</view>
<view class="goods-description">
<rich-text :nodes="test"></rich-text>
</view>
</view>
</template>
</scroll-view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'SkuBox',
props: {
defaultTabId: Number,
currentCar: String,
show: Boolean
},
data () {
return {
tabId: 1,
blockIndex: 0,
secondIndex: 0,
thirdlyIndex: 0,
goodsId: '',
contentHeight: '0',
requested: false,
test: '段落内容\n段落内容\n段落内容\n段\n#段落内容\n#段落内容\n#\n#段落内容\n#段落内容\n#段落内容\n#'
}
},
watch: {
defaultTabId: {
immediate: true,
handler (newval) {
if (this.show) this.tabId = newval
}
},
/**切换车型 */
currentCar: {
immediate: true,
handler (newval) {
if (this.show && this.requested) {
let [item] = this.boutiqueMediaConfig[newval]
this.changeTabId(item.tabId, 0)
}
}
},
show: {
immediate: true,
handler (newval) {
if (newval && !this.requested) {
this.changeTabId(this.tabId, this.boutiqueMediaConfig[this.currentCar].findIndex(e => e.tabId == this.tabId))
this.requested = true
}
}
},
watchStatus: {
immediate: true,
handler (newval) {
this.requested = false
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus;
},
blockClass () {
return ['block-0', 'block-1', 'block-2'][this.blockIndex]
},
boutiqueMediaConfig () {
return this.$store.state.user.boutiqueMediaConfig
}
},
mounted () {
},
methods: {
changeTabId (tabId, index) {
this.tabId = tabId
this.blockIndex = index
this.getSkuConfig()
this.setScrollHeight()
},
async getSkuConfig () {
this.test = this.test.replace(/<\/?br\s*\/?>|\n/g, '<br>')
// this.$forceUpdate()
},
setScrollHeight () {
this.$nextTick(() => {
let query = uni.createSelectorQuery()
query.select(`#content-scroll`).boundingClientRect(data => {
this.contentHeight = `calc(100% - ${data.top - 72}px)`
}).exec()
})
}
}
}
</script>
<style scoped lang='scss'>
.sku-content {
width: 100%;
height: 100%;
.padding-right {
height: 80rpx;
width: 40rpx;
flex-shrink: 0;
}
.first-type-box {
width: calc(100% - 64rpx);
height: 176rpx;
background: #f2f2f2;
border-radius: 24rpx;
box-sizing: border-box;
border: 8rpx solid #f2f2f2;
position: relative;
.first-type-item {
width: 280rpx;
height: 160rpx;
border-radius: 24rpx;
flex-direction: column;
justify-content: center;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 44rpx;
position: relative;
z-index: 2;
.sprite-icon {
margin-bottom: 12rpx;
transform: scale(1.45);
}
}
.block {
width: 280rpx;
height: 160rpx;
border-radius: 24rpx;
background: #ffffff;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
transition: all 0.15s;
}
.block-0 {
left: 0;
}
.block-1 {
left: 280rpx;
}
.block-2 {
left: 560rpx;
}
}
.second-type-scroll {
width: 100%;
.second-type-box {
width: 100%;
gap: 24rpx;
flex-wrap: nowrap;
padding: 32rpx 0 24rpx;
.second-type-item {
width: fit-content;
flex-shrink: 0;
height: 80rpx;
background: #f2f2f2;
border-radius: 16rpx;
font-size: 28rpx;
color: #666666;
line-height: 44rpx;
padding: 0 32rpx;
justify-content: center;
transition: all 0.15s;
}
.active {
background: #2d66f71a;
font-weight: 500;
color: #2d66f7;
}
}
}
.thirdly-type-scroll {
width: 100%;
.thirdly-type-box {
width: 100%;
gap: 24rpx;
flex-wrap: nowrap;
padding-bottom: 24rpx;
.thirdly-type-item {
flex-shrink: 0;
height: 80rpx;
border: 2rpx solid #33333333;
border-radius: 16rpx;
font-size: 28rpx;
color: #666666;
line-height: 36rpx;
padding: 0 32rpx;
justify-content: center;
transition: all 0.15s;
}
.active {
font-weight: 500;
color: #333333;
border-color: #333333;
}
}
}
.sub-title {
font-size: 24rpx;
color: #999999;
line-height: 36rpx;
padding-bottom: 16rpx;
}
.content-scroll-box {
.goods-item {
width: calc(100% - 64rpx);
min-height: 244rpx;
border: 2rpx solid #33333333;
border-radius: 16rpx;
padding: 24rpx 32rpx;
margin-bottom: 24rpx;
transition: all 0.15s;
.goods-title {
font-weight: 500;
font-size: 28rpx;
color: #333333;
line-height: 44rpx;
margin-bottom: 8rpx;
}
.goods-description {
font-size: 24rpx;
color: #666666;
line-height: 36rpx;
max-height: 144rpx;
overflow: hidden;
}
}
.active {
border-color: #333;
.goods-description {
max-height: none;
overflow: auto;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
@reception="reception" @reception="reception"
:tabId="tabId" :tabId="tabId"
:currentCar="currentCar" :currentCar="currentCar"
:type="type"
/> />
</view> </view>
</template> </template>
...@@ -48,6 +49,7 @@ ...@@ -48,6 +49,7 @@
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id" :id="id"
toolStyle="top:48rpx;"
/> />
</template> </template>
<finish-step <finish-step
...@@ -178,12 +180,14 @@ export default { ...@@ -178,12 +180,14 @@ export default {
left: 0; left: 0;
top: 48rpx; top: 48rpx;
z-index: 9; z-index: 9;
pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
pointer-events: auto;
} }
.title { .title {
position: absolute; position: absolute;
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<swiper-item <swiper-item
:key="index" :key="index"
:class="['swiper-item flex',carClass(index)]" :class="['swiper-item flex',carClass(index)]"
@click.prevent="toDetail({id:1,tabId:1})" @click.prevent="toDetail({id:1,tabId:item.configList[0].tabId})"
> >
<image <image
:src="item.url" :src="item.url"
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
/> />
<template v-if="currentIndex == index"> <template v-if="currentIndex == index">
<view class="config-box"> <view class="config-box">
<template v-for="(i,ind) in carConfigList"> <template v-for="(i,ind) in item.configList">
<view <view
:class="['config-item',i.class]" :class="['config-item',i.class]"
:key="ind" :key="ind"
...@@ -119,6 +119,29 @@ import { mapMutations } from "vuex"; ...@@ -119,6 +119,29 @@ import { mapMutations } from "vuex";
const m5 = require("@/assets/images/boutique/index/m5.webp") const m5 = require("@/assets/images/boutique/index/m5.webp")
const m7 = require("@/assets/images/boutique/index/m7.webp") const m7 = require("@/assets/images/boutique/index/m7.webp")
const m9 = require("@/assets/images/boutique/index/m9.webp") const m9 = require("@/assets/images/boutique/index/m9.webp")
const defaultConfig = [
{
name: '套餐火爆热卖',
tabName: '套餐包',
icon: 'boutique-config-0',
class: 'config-0',
tabId: 1
},
{
name: '膜类专区',
tabName: '膜类专区',
icon: 'boutique-config-1',
class: 'config-1',
tabId: 2
},
{
name: '精品系列',
tabName: '精品专区',
icon: 'boutique-config-2',
class: 'config-2',
tabId: 3
}
]
export default { export default {
components: { HomeFrame, detail, CustomerType }, components: { HomeFrame, detail, CustomerType },
name: 'boutique', name: 'boutique',
...@@ -134,37 +157,21 @@ export default { ...@@ -134,37 +157,21 @@ export default {
recording: false, recording: false,
carBannerList: [{ carBannerList: [{
title: 'M5', title: 'M5',
url: m5 url: m5,
configList: []
}, { }, {
title: 'M7', title: 'M7',
url: m7 url: m7,
configList: []
}, { }, {
title: 'M9', title: 'M9',
url: m9 url: m9,
configList: []
}], }],
currentCar: 'M7', currentCar: 'M7',
currentIndex: 0, currentIndex: 0,
bannerAutoplay: true, bannerAutoplay: true,
carConfigList: [ mediaConfigList: []
{
name: '套餐火爆热卖',
icon: 'boutique-config-0',
class: 'config-0',
tabId: 1
},
{
name: '膜类专区',
icon: 'boutique-config-1',
class: 'config-1',
tabId: 2
},
{
name: '精品系列',
icon: 'boutique-config-2',
class: 'config-2',
tabId: 3
}
]
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -226,13 +233,22 @@ export default { ...@@ -226,13 +233,22 @@ export default {
.then((res) => { .then((res) => {
this.$store.dispatch("setEmployeeList", res); this.$store.dispatch("setEmployeeList", res);
}); });
/**获取车型素材配置 */
let boutiqueMediaConfig = {
M5: [defaultConfig[0], defaultConfig[1], defaultConfig[2]],
M7: [defaultConfig[0], defaultConfig[1]],
M9: [defaultConfig[1], defaultConfig[2]]
}
this.carBannerList.map(e => {
e.configList = boutiqueMediaConfig[e.title]
})
this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig
}, },
// 查询素材 // 查询素材
async getSoure () { async getSoure () {
let { moduleList, toolList } = await uni.$api.systemApi.getBoutiqueMockData(true) let { moduleList, toolList } = await uni.$api.systemApi.getBoutiqueMockData(true)
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
console.log(moduleList)
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item this.chooseItem = item
...@@ -249,7 +265,6 @@ export default { ...@@ -249,7 +265,6 @@ export default {
this.id = id; this.id = id;
this.tabId = tabId this.tabId = tabId
this.currentCar = this.carBannerList[this.currentIndex].title this.currentCar = this.carBannerList[this.currentIndex].title
this.cancel()
}, },
back () { back () {
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
...@@ -331,7 +346,6 @@ export default { ...@@ -331,7 +346,6 @@ export default {
this.jumpPage() this.jumpPage()
}, },
swiperChange (e) { swiperChange (e) {
console.log(e)
this.currentIndex = e.detail.current this.currentIndex = e.detail.current
}, },
carClass (index) { carClass (index) {
......
<template> <template>
<view class="popup-box"> <view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
<uni-icons type="left" :size="20" color="#fff"></uni-icons> class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#fff"
></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<video ref="videoPlayer" :src="detailUrl" controls v-if="sourceType == 2"></video> <video
<view class="img-detail" v-else><image @click="back" :src="detailUrl" :style="{ width: width + 'px' }" /></view> ref="videoPlayer"
:src="detailUrl"
controls
v-if="sourceType == 2"
></video>
<view
class="img-detail"
v-else
>
<image
@click="back"
:src="detailUrl"
:style="{ width: width + 'px' }"
/>
</view>
</view> </view>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import report from "@/mixin/report.js"; import report from "@/mixin/report.js";
export default { export default {
props: {
isComponents: Boolean,
show: Boolean
},
data () { data () {
return { return {
width:0, width: 0,
title: '11', title: '',
sourceType: '', sourceType: '',
detailUrl: '' detailUrl: ''
} }
}, },
mixins:[report], computed: {
popupShow () {
let status = true
if (this.isComponents) status = this.show
return status
}
},
mixins: [report],
onLoad (options) { onLoad (options) {
const {tabName,sourceType,detailUrl} = options this.init(options)
},
methods: {
init (options) {
const { tabName, sourceType, detailUrl } = options
this.title = tabName this.title = tabName
this.sourceType = sourceType this.sourceType = sourceType
this.detailUrl = detailUrl this.detailUrl = detailUrl
...@@ -33,8 +72,8 @@ export default { ...@@ -33,8 +72,8 @@ export default {
uni.getImageInfo({ uni.getImageInfo({
src: detailUrl, // 替换为你的图片路径 src: detailUrl, // 替换为你的图片路径
success (img) { success (img) {
uni.createSelectorQuery().select('.img-detail').boundingClientRect(function(rect) { uni.createSelectorQuery().select('.img-detail').boundingClientRect(function (rect) {
_this.width = rect.height*img.height/img.width _this.width = rect.height * img.height / img.width
}).exec(); }).exec();
}, },
...@@ -43,9 +82,9 @@ export default { ...@@ -43,9 +82,9 @@ export default {
} }
}); });
}, },
methods: { back () {
back() { if (this.isComponents) this.$emit('update:show', false)
uni.navigateBack() else uni.navigateBack()
} }
} }
} }
......
...@@ -24,6 +24,11 @@ export default { ...@@ -24,6 +24,11 @@ export default {
employeeList: [], employeeList: [],
paymentType: [], paymentType: [],
haveCustomerAccess: false, haveCustomerAccess: false,
boutiqueMediaConfig: {
M5:[],
M7:[],
M9:[]
}
}; };
}, },
mutations: { mutations: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!