Commit a6aae4b1 by 李伟康

commit 提交

1 parent b23bfd53
......@@ -91,6 +91,7 @@ export default {
}),
{ receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo,
{ deviceId: appCode } = uni.getDeviceInfo(),
receptionTrack = this.$store.state.user.receptionTrack,
params = {
staffUuid: uuid,
staffName: name,
......@@ -112,6 +113,7 @@ export default {
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType: channelType || 1 //1问界 2 比亚迪 3 其他
}
console.log(receptionTrack)
return params
},
/**
......
import loginMixin from './loginMixin'
import receptionTrackMixin from './receptionTrackMixin'
module.exports = {
loginMixin
loginMixin,
receptionTrackMixin
}
export default {
watch: {
id: {
immediate: true,
handler (key) {
if (!key) return
let item = this.media.find(e => e.id == key),
value = this.receptionTrack[key]
if (value) {
value.openCount += 1
value.entryTime = Date.now()
} else {
value = {
openCount: 1,
name: item.title,
id: item.id,
stayTime: 0,
entryTime: Date.now()
}
}
this.$store.dispatch("setReceptionTrack", { key, value })
}
}
},
computed:{
receptionTrack () {
return this.$store.state.user.receptionTrack
}
},
methods: {
receptionTrackLeave () {
let key = this.id,
value = this.receptionTrack[key]
value.stayTime += Number(((Date.now() - value.entryTime) / 1000).toFixed(2))
this.$store.dispatch("setReceptionTrack", { key, value })
}
}
}
\ No newline at end of file
......@@ -66,6 +66,8 @@
<coupon-pop
:carInfo="carInfo"
ref="couponPopup"
@reception="reception"
:customerType="customerType"
/>
<picture-box :imgUrl="currentImgUrl" />
<risk-informed-box
......@@ -135,7 +137,7 @@ export default {
}[newval]
if (this.show && newval && !this.isPreview && this.customerType == 1) this.$refs.carBrandRef.autoSelect(this.carList.findIndex(e => e == newval))
}
}
},
},
computed: {
......@@ -153,7 +155,8 @@ export default {
},
couponText () {
return this.customerType == 0 ? '查看客户券码' : '为客户发券'
}
},
},
methods: {
......@@ -171,8 +174,10 @@ export default {
this.carInfo = item
},
showPicture (e) {
this.currentImgUrl = e
},
reception (e) {
this.$emit('reception', e)
}
}
}
......
......@@ -71,6 +71,7 @@ import { mapMutations } from "vuex";
import invitation from "./invitation.vue";
import Case from "./case.vue";
import history from "./history.vue";
import {receptionTrackMixin} from '@/mixin/index.js'
export default {
components: {
ToolBox,
......@@ -93,10 +94,13 @@ export default {
tabId: Number,
currentCar: String
},
mixins: [receptionTrackMixin],
data () {
return {
};
},
watch: {
},
computed: {
title () {
let { id } = this,
......@@ -122,20 +126,22 @@ export default {
ref.closeAllPopup && ref.closeAllPopup()
}
})
this.receptionTrackLeave()
this.jumpPage({ id: e.id })
},
back () {
this.$refs?.toolRef?.hide();
// this.$emit("back");
if(this.id == 1) {
if (this.id == 1) {
let [reception] = this.$refs.media1
if(reception.currentImgUrl) reception.showPicture('')
if (reception.currentImgUrl) reception.showPicture('')
else this.$emit("back");
} else this.$emit("back");
},
done (e) {
this.$refs.toolRef.hide();
this.$refs.stepRef.close();
this.receptionTrackLeave()
this.$emit("done", e);
},
jumpPage ({ id }) {
......@@ -171,7 +177,7 @@ export default {
icon: 'none'
})
}, 1e3)
}
},
},
};
</script>
......
......@@ -309,6 +309,7 @@ export default {
clearHistory () {
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory");
this.$store.dispatch('clearReceptionTrack')
},
openStep () {
this.$refs.home.finishRef.close();
......@@ -332,8 +333,12 @@ export default {
setTimeout(() => {
this.id = "";
this.type = "";
this.currentCar = ''
this.bannerAutoplay = true
this.customerType = -1
this.setReceptionStatus(e);
this.$store.dispatch("clearHistory")
this.$store.dispatch('clearReceptionTrack')
}, 1500);
},
changeTab (index) {
......
......@@ -91,7 +91,7 @@ import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex";
import informationEntry from './components/informationEntry.vue'
import insurance from '@/components/Insurance/Insurance.vue'
import {receptionTrackMixin} from '@/mixin/index.js'
export default {
components: {
ToolBox,
......@@ -114,6 +114,7 @@ export default {
},
toolList: Array
},
mixins: [receptionTrackMixin],
data () {
return {
drawStatus: false,
......@@ -150,7 +151,8 @@ export default {
isByd () {
const { channelType } = uni.$storage.get("userInfo")
return channelType == 2
}
},
},
watch: {
watchStatus: {
......@@ -178,6 +180,7 @@ export default {
ref.closeAllPopup && ref.closeAllPopup()
}
})
this.receptionTrackLeave()
this.$emit('update:id', e.id)
},
back () {
......@@ -203,7 +206,7 @@ export default {
}
},
touchEnd (e) {
if(this.modeName) return
if (this.modeName) return
try {
let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return
......@@ -216,6 +219,7 @@ export default {
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const { nextId, modeName } = this.getNextId(index, toolList, startX, halfScreenWidth)
this.modeName = modeName
this.receptionTrackLeave()
this.$emit('update:id', nextId)
setTimeout(() => {
this.modeName = ''
......@@ -243,7 +247,8 @@ export default {
scale (e) {
let { id } = this
this.scaleValueObject[id] = e
}
},
},
};
......
......@@ -269,6 +269,7 @@ export default {
this.type = "";
this.setReceptionStatus(e);
this.$store.dispatch("clearHistory")
this.$store.dispatch('clearReceptionTrack')
}, 1500);
},
back () {
......@@ -296,6 +297,7 @@ export default {
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory");
this.$refs.home.setBooks([]);
this.$store.dispatch('clearReceptionTrack')
},
openStep () {
this.$refs.home.finishRef.close();
......
......@@ -28,7 +28,8 @@ export default {
M5: [],
M7: [],
M9: []
}
},
receptionTrack: {} //接待记录埋点
};
},
mutations: {
......@@ -77,5 +78,12 @@ export default {
setEmployeeList ({ state }, value) {
state.employeeList = value;
},
setReceptionTrack ({ state }, { key, value }) {
console.log(value)
state.receptionTrack[key] = value
},
clearReceptionTrack ({ state }) {
state.receptionTrack = {}
},
},
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!