Commit e21e8dac by 胡悦

Merge branch 'SAAS+V4.45' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.45

2 parents 90e1ba35 6525f669
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1044rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1044rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;} .icon-addr { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;} .icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;}
.icon-arrow-bottom { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;} .icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;}
.icon-avatar { width: 96rpx; height: 96rpx; background-position: -635rpx -726rpx;} .icon-avatar { width: 96rpx; height: 96rpx; background-position: -635rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -333rpx -853rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -333rpx -853rpx;}
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
.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: -1050rpx -668rpx;} .icon-play { width: 40rpx; height: 40rpx; background-position: -1050rpx -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 -621rpx;}
.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: -888rpx -853rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -888rpx -853rpx;}
...@@ -64,4 +65,3 @@ ...@@ -64,4 +65,3 @@
.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: -935rpx -853rpx;} .icon-total { width: 32rpx; height: 32rpx; background-position: -935rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1160rpx -668rpx;} .icon-visible { width: 40rpx; height: 40rpx; background-position: -1160rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
.icon-arrow-bottom { width: 48rpx; height: 48rpx; background-position: -765rpx -621rpx;}
\ 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
...@@ -3,7 +3,7 @@ export default { ...@@ -3,7 +3,7 @@ export default {
id: { id: {
immediate: true, immediate: true,
handler (key) { handler (key) {
if (!key) return if (!key || this.type == 'preview') return
let item = this.media.find(e => e.id == key), let item = this.media.find(e => e.id == key),
value = this.receptionTrack[key] value = this.receptionTrack[key]
if (value) { if (value) {
...@@ -22,13 +22,14 @@ export default { ...@@ -22,13 +22,14 @@ export default {
} }
} }
}, },
computed:{ computed: {
receptionTrack () { receptionTrack () {
return this.$store.state.user.receptionTrack return this.$store.state.user.receptionTrack
} }
}, },
methods: { methods: {
receptionTrackLeave () { receptionTrackLeave () {
if (this.type == 'preview') return
let key = this.id, let key = this.id,
value = this.receptionTrack[key] value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime) value.stayDuration += Number(Date.now() - value.entryTime)
......
...@@ -229,7 +229,6 @@ export default { ...@@ -229,7 +229,6 @@ export default {
watchCustomerInfo: { watchCustomerInfo: {
immediate: true, immediate: true,
handler(newval) { handler(newval) {
console.log(newval, 'carModel')
this.customerInfo = Object.assign(this.customerInfo, newval) this.customerInfo = Object.assign(this.customerInfo, newval)
try { try {
// 监听完成接待修改数据,同步修改生成优惠券按钮状态 // 监听完成接待修改数据,同步修改生成优惠券按钮状态
...@@ -245,7 +244,6 @@ export default { ...@@ -245,7 +244,6 @@ export default {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler(newval) { handler(newval) {
console.log('重新进入', this.pageParams)
this.pageParams.QRURL = '' this.pageParams.QRURL = ''
if (this.couponList.length) { if (this.couponList.length) {
let item = this.couponList.find(e => e.couponType == 1), let item = this.couponList.find(e => e.couponType == 1),
...@@ -310,7 +308,6 @@ export default { ...@@ -310,7 +308,6 @@ export default {
return b.createdDate - a.createdDate return b.createdDate - a.createdDate
})[0]) })[0])
}) })
console.log(arr)
let item = arr.find(e => e.couponType == 1), let item = arr.find(e => e.couponType == 1),
item2 = arr.find(e => e.couponType == 18) item2 = arr.find(e => e.couponType == 18)
if (!this.pageParams.couponId) { if (!this.pageParams.couponId) {
...@@ -322,14 +319,11 @@ export default { ...@@ -322,14 +319,11 @@ export default {
this.couponList = arr this.couponList = arr
}, },
inputCustomer () { inputCustomer () {
console.log(22)
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
console.log(this.$store.state.user.customerInfo)
const { customerName, phoneNumber, staffName } = this.customerInfo const { customerName, phoneNumber, staffName } = this.customerInfo
this.isCheck = customerName && phoneNumber && staffName this.isCheck = customerName && phoneNumber && staffName
}, },
chooseCoupon(item) { chooseCoupon(item) {
console.log(item, '----------')
this.pageParams.couponId = item.id this.pageParams.couponId = item.id
this.customerInfo.couponTypeName = item.couponTypeName this.customerInfo.couponTypeName = item.couponTypeName
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
...@@ -398,14 +392,12 @@ export default { ...@@ -398,14 +392,12 @@ export default {
}) })
flag = false flag = false
} }
console.log(flag, this.customerInfo, this.pageParams)
return flag return flag
}, },
async createCoupon() { async createCoupon() {
if (this.pageParams.received) return if (this.pageParams.received) return
if (!this.isCheck) return // 按钮置灰的情况 if (!this.isCheck) return // 按钮置灰的情况
try { try {
console.log(this.pageParams)
const { pageParams: { clickFlag, couponId }, carInfo, customerInfo } = this, { const { pageParams: { clickFlag, couponId }, carInfo, customerInfo } = this, {
shopMerchantId } = uni.$storage.get("userInfo"), shopMerchantId } = uni.$storage.get("userInfo"),
validateStatus = await this.validate(), validateStatus = await this.validate(),
...@@ -471,7 +463,6 @@ export default { ...@@ -471,7 +463,6 @@ export default {
}) })
if (res && res.total) { if (res && res.total) {
this.pageParams.received = true this.pageParams.received = true
console.log(this.pageParams, '=======')
this.isCheck = false this.isCheck = false
this.$emit('reception', { this.$emit('reception', {
item: { item: {
......
<template> <template>
<view class="picture" v-show="!!detailUrl"> <view
class="picture"
v-show="!!detailUrl"
>
<image <image
class="detail-img" class="detail-img"
:src="detailUrl" :src="detailUrl"
...@@ -17,13 +20,13 @@ export default { ...@@ -17,13 +20,13 @@ export default {
default: '', default: '',
} }
}, },
data() { data () {
return { return {
detailUrl: '' detailUrl: ''
} }
}, },
watch: { watch: {
imgUrl(val) { imgUrl (val) {
this.detailUrl = val this.detailUrl = val
} }
}, },
...@@ -38,6 +41,8 @@ export default { ...@@ -38,6 +41,8 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
z-index: 99; z-index: 99;
min-height: 100vh;
background-color: #fff;
} }
.nav-bar { .nav-bar {
position: fixed; position: fixed;
......
...@@ -23,13 +23,16 @@ ...@@ -23,13 +23,16 @@
<view <view
class="left-content" class="left-content"
:key="updateViewKey" :key="updateViewKey"
@click="showPicture(currentItem.detailPicurl)" @click="showPicture(currentItem)"
> >
<image <image
:src="currentItem.modelDisplayPicurl" :src="currentItem.modelDisplayPicurl"
class="poster" class="poster"
/> />
<view class="tips">* 点击图片查看详情 &gt;</view> <view
class="tips"
v-if="currentItem.detailPicurl"
>* 点击图片查看详情 &gt;</view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
...@@ -92,7 +95,7 @@ export default { ...@@ -92,7 +95,7 @@ export default {
tabId: Number, tabId: Number,
currentCar: String, currentCar: String,
type: String, type: String,
popupImg: String popupImg: String,
}, },
data () { data () {
return { return {
...@@ -112,12 +115,6 @@ export default { ...@@ -112,12 +115,6 @@ export default {
this.customerInfo = newval this.customerInfo = newval
} }
}, },
watchStatus: {
immediate: true,
handler (newval) {
}
},
currentCar: { currentCar: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
...@@ -141,9 +138,6 @@ export default { ...@@ -141,9 +138,6 @@ export default {
watchCustomerInfo () { watchCustomerInfo () {
return this.$store.state.user.customerInfo return this.$store.state.user.customerInfo
}, },
watchStatus () {
return this.$store.state.user.historyStatus
},
currentIndex () { currentIndex () {
return this.carList.findIndex(e => e == this.currentCarString) return this.carList.findIndex(e => e == this.currentCarString)
}, },
...@@ -158,6 +152,9 @@ export default { ...@@ -158,6 +152,9 @@ export default {
}, },
couponPopupRef () { couponPopupRef () {
return this.$refs.couponPopup return this.$refs.couponPopup
},
receptionTrack () {
return this.$store.state.user.receptionTrack
} }
}, },
...@@ -177,8 +174,27 @@ export default { ...@@ -177,8 +174,27 @@ export default {
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
this.carInfo = item this.carInfo = item
}, },
showPicture (e) { showPicture (off = true) {
this.currentImgUrl = e let { detailPicurl, id, carModelName, name } = this.currentItem,
key = `${carModelName}_${id}`,
value = this.receptionTrack[key]
this.currentImgUrl = off ? detailPicurl : ''
if (!detailPicurl || this.isPreview) return
if (off) {
if (value) {
value.openCount += 1
value.entryTime = Date.now()
} else {
value = {
openCount: 1,
materialName: name,
materialId: id,
stayDuration: 0,
entryTime: Date.now()
}
}
} else value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
}, },
reception (e) { reception (e) {
this.clearCustomerReceivedTimer() this.clearCustomerReceivedTimer()
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
class="content-scroll-box" class="content-scroll-box"
id="content-scroll" id="content-scroll"
:style="{height:contentHeight}" :style="{height:contentHeight}"
:scroll-top="flagObject.scrollTop"
> >
<template v-for="(i,index) in goodsList"> <template v-for="(i,index) in goodsList">
<view <view
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
:key="index" :key="index"
@click="changeGoods(i,index)" @click="changeGoods(i,index)"
> >
<view class="goods-title">{{i.goodsName}}</view> <view class="goods-title">{{i.name}}</view>
<view class="goods-description"> <view class="goods-description">
<rich-text :nodes="i.descriptionText"></rich-text> <rich-text :nodes="i.descriptionText"></rich-text>
</view> </view>
...@@ -95,17 +96,18 @@ export default { ...@@ -95,17 +96,18 @@ export default {
data () { data () {
return { return {
tabId: 1, tabId: '1',
blockIndex: 0, blockIndex: 0,
secondIndex: 0, secondIndex: 0,
thirdlyIndex: 0, thirdlyIndex: 0,
goodsIndex: 0, goodsIndex: 0,
contentHeight: '0', contentHeight: '0',
requested: false,
currentItem: {}, currentItem: {},
goodsList: [], goodsList: [],
requested: false,
flagObject: { flagObject: {
goodsFlag: false goodsFlag: false,
scrollTop: 0
}, },
secondList: [], secondList: [],
} }
...@@ -114,6 +116,7 @@ export default { ...@@ -114,6 +116,7 @@ export default {
defaultTabId: { defaultTabId: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
console.log(newval)
if (this.show) this.tabId = newval if (this.show) this.tabId = newval
} }
}, },
...@@ -122,9 +125,7 @@ export default { ...@@ -122,9 +125,7 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (this.show && this.requested) { if (this.show && this.requested) {
console.log(newval)
let [item] = this.boutiqueMediaConfig[newval] let [item] = this.boutiqueMediaConfig[newval]
console.log(item)
this.changeTabId(item.tabId, 0, false) this.changeTabId(item.tabId, 0, false)
} }
} }
...@@ -133,9 +134,9 @@ export default { ...@@ -133,9 +134,9 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (newval && !this.requested) { if (newval && !this.requested) {
this.requested = true
let index = this.boutiqueMediaConfig[this.currentCar].findIndex(e => e.tabId == this.tabId) let index = this.boutiqueMediaConfig[this.currentCar].findIndex(e => e.tabId == this.tabId)
this.changeTabId(this.tabId, index, false) this.changeTabId(this.tabId, index, false)
this.requested = true
} }
} }
}, },
...@@ -143,6 +144,7 @@ export default { ...@@ -143,6 +144,7 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.requested = false this.requested = false
this.tabId = '1'
} }
}, },
}, },
...@@ -176,32 +178,29 @@ export default { ...@@ -176,32 +178,29 @@ export default {
let query = uni.createSelectorQuery() let query = uni.createSelectorQuery()
query.select(`#content-scroll`).boundingClientRect(data => { query.select(`#content-scroll`).boundingClientRect(data => {
this.contentHeight = `calc(100% - ${data.top - 72}px)` this.contentHeight = `calc(100% - ${data.top - 72}px)`
this.flagObject.scrollTop = 0
}).exec() }).exec()
}) })
}, },
secondClick (index, filter = true) { secondClick (index, filter = true) {
if (filter && this.secondIndex == index) return if (filter && this.secondIndex == index) return
this.secondIndex = index this.secondIndex = index
if (this.tabId == 2) { if (this.tabId == 2 && index == 0) {
/**获取品牌 */ let { infoList } = this.secondList[0],
if (index == 0) { arr = Array.from(new Set([...infoList.map((e) => e.brand)])),
let { filmInfoList } = this.secondList[0],
arr = Array.from(new Set([...filmInfoList.map((e) => e.brand)])),
brandList = [] brandList = []
arr.map(e => { arr.map(e => {
let obj = { let obj = {
brandName: e, brandName: e,
list: [] list: []
} }
filmInfoList.map(i => { infoList.map(i => {
if (i.brand == e) obj.list.push(i) if (i.brand == e) obj.list.push(i)
}) })
brandList.push(obj) brandList.push(obj)
}) })
this.brandList = brandList this.brandList = brandList
this.thirdlyClick(0, false) this.thirdlyClick(0, false)
}
else this.getGoodsList()
} else this.getGoodsList() } else this.getGoodsList()
}, },
thirdlyClick (index, filter = true) { thirdlyClick (index, filter = true) {
...@@ -220,42 +219,28 @@ export default { ...@@ -220,42 +219,28 @@ export default {
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
let { secondIndex, secondList, tabId, brandList, thirdlyIndex } = this, let { secondIndex, secondList, tabId, brandList, thirdlyIndex } = this
target = {
1: 'packageInfoList',
2: 'filmInfoList',
3: 'productInfoList'
}[tabId],
goodsNameKey = {
1: 'packageName',
2: 'filmName',
3: 'productName'
}[tabId]
uni.hideLoading() uni.hideLoading()
let goodsList = [] let goodsList = goodsList = this.setGoodsData(tabId == 2 && secondIndex == 0 ? brandList[thirdlyIndex].list : secondList[secondIndex].infoList)
if (tabId == 2 && secondIndex == 0) {
brandList[thirdlyIndex].list.map(e => {
e.goodsName = e[goodsNameKey]
if (e.description) e.descriptionText = e.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>')
goodsList.push(e)
})
} else {
secondList[secondIndex][target].map(e => {
e.goodsName = e[goodsNameKey]
if (e.description) e.descriptionText = e.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>')
goodsList.push(e)
})
}
this.goodsList = goodsList this.goodsList = goodsList
this.$nextTick(() => {
this.flagObject.goodsFlag = true this.flagObject.goodsFlag = true
this.flagObject.scrollTop = 1
this.setScrollHeight() this.setScrollHeight()
this.changeGoods(goodsList[0], 0) this.changeGoods(goodsList[0], 0)
})
}, },
changePreView () { changePreView () {
this.$emit('changePreView', this.currentItem) this.$emit('changePreView', this.currentItem)
},
setGoodsData (data, key) {
let goodsList = []
data.map(e => {
if (e.description) e.descriptionText = e.description.replace(/<\/?br\s*\/?>|\\n|\n/g, '<br>')
goodsList.push(e)
})
return goodsList
} }
} }
} }
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
// this.$emit("back"); // this.$emit("back");
if (this.id == 1) { if (this.id == 1) {
let [reception] = this.$refs.media1 let [reception] = this.$refs.media1
if (reception.detailPicurl) reception.showPicture('') if (reception.currentImgUrl) reception.showPicture(false)
else this.$emit("back"); else this.$emit("back");
} else this.$emit("back"); } else this.$emit("back");
}, },
......
...@@ -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:item.configList[0].tabId})" @click.prevent="clickCar(item, index)"
> >
<image <image
:src="item.url" :src="item.url"
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
{ key: 'films', configIndex: 1 }, { key: 'films', configIndex: 1 },
{ key: 'products', configIndex: 2 } { key: 'products', configIndex: 2 }
]; ];
configItems.map(item =>{ configItems.map(item => {
if (e[item.key]?.length) { if (e[item.key]?.length) {
boutiqueMediaConfig[e.carModelName].push({ boutiqueMediaConfig[e.carModelName].push({
...defaultConfig[item.configIndex], ...defaultConfig[item.configIndex],
...@@ -299,6 +299,7 @@ export default { ...@@ -299,6 +299,7 @@ export default {
this.type = ""; this.type = "";
this.currentCar = '' this.currentCar = ''
this.bannerAutoplay = true this.bannerAutoplay = true
this.previewOff = false
this.customerType = -1 this.customerType = -1
this.clearHistory(); this.clearHistory();
this.init(); this.init();
...@@ -396,6 +397,10 @@ export default { ...@@ -396,6 +397,10 @@ export default {
setTimeout(() => { setTimeout(() => {
this.bannerAutoplay = true this.bannerAutoplay = true
}, 3e3) }, 3e3)
},
clickCar (item, index) {
this.changeIndex(index)
this.toDetail({ id: 1, tabId: item.configList[0].tabId })
} }
} }
} }
......
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
state.employeeList = value; state.employeeList = value;
}, },
setReceptionTrack ({ state }, { key, value }) { setReceptionTrack ({ state }, { key, value }) {
console.log(value) console.log(value,'触发埋点')
state.receptionTrack[key] = value state.receptionTrack[key] = value
}, },
clearReceptionTrack ({ state }) { clearReceptionTrack ({ state }) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!