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