Commit 57008938 authored by 高铭波's avatar 高铭波

feat(*): 关键事件埋点,调整页面样式

parent 18060078
(function () { (function () {
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境 | prod:生产环境 let NODE_ENV = 'prod'; // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null; let ENV_VAR = null;
let VERSION_NUMBER = '1.3.13';//版本号 let VERSION_NUMBER = '1.3.15';//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频 //小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') { if (NODE_ENV === 'dev') {
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
if (this.operate) { if (this.operate) {
const latitude = this.order.contactAddressLatitud //res.latitude; const latitude = this.order.contactAddressLatitud //res.latitude;
const longitude = this.order.contactAddressLongitud //res.longitude; const longitude = this.order.contactAddressLongitud //res.longitude;
getApp().track("order_open_location", { address: address }); getApp().track("order_open_location", { address: address });
uni.openLocation({ uni.openLocation({
latitude: Number(latitude), latitude: Number(latitude),
longitude: Number(longitude), longitude: Number(longitude),
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
}, },
phoneToCustomer(phone) { // 联系客户 phoneToCustomer(phone) { // 联系客户
if (this.operate) { if (this.operate) {
getApp().track("order_make_phone_call", { phone: phone }); getApp().track("order_make_phone_call", { phone: phone });
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: phone, //仅为示例 phoneNumber: phone, //仅为示例
complete() {} complete() {}
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
<view class="right-view">{{ orderData.orderBusinessTypeText }}</view> <view class="right-view">{{ orderData.orderBusinessTypeText }}</view>
</view> </view>
<view class="content-view"> <view class="content-view">
<view class="info-view" v-for="(item, key) in infoTexts" :key="key"> <view class="info-view" v-for="(item, key) in infoTexts" :key="key">
<view class="info-title"> <view class="info-title">
<text>{{item.name + ':'}}</text> <text>{{item.name + ':'}}</text>
</view> </view>
<view class="info-content"> <view class="info-content">
<text @longpress="handleLongpress(key, orderData[key])">{{orderData[key]}}</text> <text @longpress="handleLongpress(key, orderData[key])">{{orderData[key]}}</text>
<text v-if="item.content">{{' / ' + orderData[item.content]}}</text> <text v-if="item.content">{{' / ' + orderData[item.content]}}</text>
</view> </view>
</view> </view>
<view class="address-view"> <view class="address-view">
<view class="address-left-view"> <view class="address-left-view">
...@@ -110,15 +110,15 @@ ...@@ -110,15 +110,15 @@
orderText() { // 按钮文字 orderText() { // 按钮文字
return this.typeTexts[this.orderType] return this.typeTexts[this.orderType]
}, },
buttonStyle() { // 按钮样式 buttonStyle() { // 按钮样式
/** orderType /** orderType
0 待接单、 0 待接单、
1 待预约、 1 待预约、
2 待签到、 2 待签到、
3 待完工、 3 待完工、
4 审核中、 4 审核中、
5 异常单、 5 异常单、
6 已完工 6 已完工
*/ */
switch (this.orderType) { switch (this.orderType) {
case 0: case 0:
...@@ -153,9 +153,9 @@ ...@@ -153,9 +153,9 @@
}, },
typeTexts() { typeTexts() {
return [this.type0Text, '去预约', '去签到', '去完工', '审核中', '去处理', '已完工'] return [this.type0Text, '去预约', '去签到', '去完工', '审核中', '去处理', '已完工']
}, },
isCompetition() { // 是:订单池,抢单; 否:指派单,接单 isCompetition() { // 是:订单池,抢单; 否:指派单,接单
return this.orderData.orderBusinessType == 'R' return this.orderData.orderBusinessType == 'R'
}, },
type0Text() { type0Text() {
return !this.isCompetition ? '接单' : '抢单' return !this.isCompetition ? '接单' : '抢单'
...@@ -205,25 +205,25 @@ ...@@ -205,25 +205,25 @@
}, },
showDistance() { showDistance() {
return this.orderType == 0 && this.location.length >= 2 && (this.orderData.contactAddressLatitud || this.orderData.contactAddressLongitud) return this.orderType == 0 && this.location.length >= 2 && (this.orderData.contactAddressLatitud || this.orderData.contactAddressLongitud)
}, },
isWaitFinish() { isWaitFinish() {
return this.orderType == 3 return this.orderType == 3
}, },
isException() { isException() {
return this.orderType == 5 return this.orderType == 5
}, },
types() { types() {
return { return {
'waitAccept': 0, // 待接单、 'waitAccept': 0, // 待接单、
'waitAppointment': 1, // 待预约、 'waitAppointment': 1, // 待预约、
'waitCheckIn': 2, // 待签到、 'waitCheckIn': 2, // 待签到、
'waitFinish': 3, // 待完工、 'waitFinish': 3, // 待完工、
'audit': 4, // 审核中、 'audit': 4, // 审核中、
'exception': 5, // 异常单、 'exception': 5, // 异常单、
'finish': 6, //已完工 'finish': 6, //已完工
} }
}, },
orderDistance() { orderDistance() {
return this.distance(this.orderData.contactAddressLatitud,this.orderData.contactAddressLongitud, this.location[0], this.location[1]) return this.distance(this.orderData.contactAddressLatitud,this.orderData.contactAddressLongitud, this.location[0], this.location[1])
}, },
/** orderType /** orderType
...@@ -281,18 +281,25 @@ ...@@ -281,18 +281,25 @@
} }
}, },
methods: { methods: {
handleExceptions() {
if(this.isException) {
getApp().track("order_handleExceptions", {})
}
},
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动 // title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
handleClick() { handleClick() {
var func = 'click' var func = 'click'
if (this.isWaitFinish || this.isException) { // 不是待完工、不是异常单点按钮算点cell this.handleExceptions()
func = 'action' if (this.isWaitFinish || this.isException) { // 不是待完工、不是异常单点按钮算点cell
func = 'action'
} }
this.$emit(func, this.orderData, this.type, this.showCountTime ? 'show' : '') this.$emit(func, this.orderData, this.type, this.showCountTime ? 'show' : '')
}, },
handleClickCell() { handleClickCell() {
var func = 'click' var func = 'click'
if (this.isException) { // 异常单点cell算点按钮 this.handleExceptions()
func = 'action' if (this.isException) { // 异常单点cell算点按钮
func = 'action'
} }
this.$emit(func, this.orderData, this.type, this.showCountTime ? 'show' : '') this.$emit(func, this.orderData, this.type, this.showCountTime ? 'show' : '')
}, },
...@@ -316,43 +323,43 @@ ...@@ -316,43 +323,43 @@
} }
return address return address
}, },
/** /**
* echo distance(116.3896,39.91917,116.3940,39.91726); * echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离 * 计算两点之间直线距离
* @param float $lon1 纬度 * @param float $lon1 纬度
* @param float $lat1 经度 * @param float $lat1 经度
* @param float $lon2 纬度 * @param float $lon2 纬度
* @param float $lat2 经度 * @param float $lat2 经度
* @return float 浮点数 * @return float 浮点数
*/ */
distance(lat1, lng1, lat2, lng2) { distance(lat1, lng1, lat2, lng2) {
var radLat1 = this.Rad(lat1); var radLat1 = this.Rad(lat1);
var radLat2 = this.Rad(lat2); var radLat2 = this.Rad(lat2);
var a = radLat1 - radLat2; var a = radLat1 - radLat2;
var b = this.Rad(lng1) - this.Rad(lng2); var b = this.Rad(lng1) - this.Rad(lng2);
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) + var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) +
Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2))); Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
s = s *6378.137 ;// EARTH_RADIUS; s = s *6378.137 ;// EARTH_RADIUS;
s = Math.round(s * 10000)/10000 //输出为米 s = Math.round(s * 10000)/10000 //输出为米
return Number(s?s.toFixed(2):0); return Number(s?s.toFixed(2):0);
}, },
Rad(d){ Rad(d){
return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。 return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。
}, },
updateTime() { updateTime() {
var time = new Date().getTime() var time = new Date().getTime()
this.timeout = this.orderData.currentOverTime < time this.timeout = this.orderData.currentOverTime < time
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - time) / 1000) this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - time) / 1000)
}, },
handleLongpress(key, text) { // 长按复制单号 handleLongpress(key, text) { // 长按复制单号
if (key == 'orderNumber') { if (key == 'orderNumber') {
uni.setClipboardData({ uni.setClipboardData({
data: text, data: text,
success: function () { success: function () {
console.log('success'); console.log('success');
} }
}); });
} }
} }
} }
} }
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<u-image :src="partsImage(info.images)" width="200rpx" height="200rpx" /> <u-image :src="partsImage(info.images)" width="200rpx" height="200rpx" />
</view> </view>
<view class="u-flex right-content"> <view class="u-flex right-content">
<view class="right-content-name">{{ info.name }}</view> <view class="right-content-name u-line-2">{{ info.name }}</view>
<view class="right-content-desc">{{ info.remark }}</view> <view class="right-content-desc u-line-2">{{ info.remark }}</view>
<view class="u-flex right-content-opera"> <view class="u-flex right-content-opera">
<view class="no" v-if="info.stock"> <view class="no" v-if="info.stock">
可用{{ info.stock }} 可用{{ info.stock }}
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
overflow: hidden; overflow: hidden;
.right-img { .right-img {
padding-right: 20rpx; padding-right: 20rpx;
align-self: baseline;
} }
.right-content { .right-content {
flex: 1; flex: 1;
...@@ -91,9 +92,6 @@ ...@@ -91,9 +92,6 @@
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
font-weight: bold; font-weight: bold;
height: 48rpx;
// overflow: hidden;
word-break: hyphenate;
} }
.right-content-desc { .right-content-desc {
font-size: 24rpx; font-size: 24rpx;
......
...@@ -749,6 +749,7 @@ export default { ...@@ -749,6 +749,7 @@ export default {
}, },
// 安装文件 // 安装文件
goToDocument() { goToDocument() {
getApp().track("learn_goToDocument", {})
this.$u.route({ this.$u.route({
url: 'pages/order/document', url: 'pages/order/document',
}) })
...@@ -826,6 +827,11 @@ export default { ...@@ -826,6 +827,11 @@ export default {
}, },
//跳转到播放 //跳转到播放
goPlay(info) { goPlay(info) {
viewcounts
getApp().track("learn_allPlayCounts", {courseId: info.id})
if(info.title === "小程序使用指南") {
getApp().track("learn_guidePlayCounts", {courseId: info.id})
}
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/learn/section?section_id=" + "/pages/learn/section?section_id=" +
...@@ -834,13 +840,14 @@ export default { ...@@ -834,13 +840,14 @@ export default {
info.id, info.id,
}); });
}, },
//跳转到 //跳转到消息详情页
bbb(e) { bbb(e) {
var news = { var news = {
body: e.body, body: e.body,
title: e.title, title: e.title,
create_at: e.create_at, create_at: e.create_at,
}; };
getApp().track("learn_goToMessage", {})
let that = this; let that = this;
wx.navigateTo({ wx.navigateTo({
url: "/pages/learn/news-details", url: "/pages/learn/news-details",
......
...@@ -77,6 +77,7 @@ export default { ...@@ -77,6 +77,7 @@ export default {
}); });
}, },
goBaidu(a) { goBaidu(a) {
getApp().track("mine_lookContract", {url: a})
getApp().globalData.contractUrl = a; getApp().globalData.contractUrl = a;
wx.navigateTo({ wx.navigateTo({
url: "./out", url: "./out",
......
...@@ -642,9 +642,11 @@ ...@@ -642,9 +642,11 @@
this.clickFeedback() this.clickFeedback()
break break
case 2: case 2:
getApp().track("order_errorSign", {orderId: this.orderId})
this.take() this.take()
break break
case 3: case 3:
getApp().track("order_scenePhotoClick", {orderId: this.orderId})
this.scenePhotoClick() this.scenePhotoClick()
break break
case 4: case 4:
...@@ -763,6 +765,10 @@ ...@@ -763,6 +765,10 @@
}, },
// 去业务材料页面 // 去业务材料页面
handleClickFile() { handleClickFile() {
getApp().track("order_click_view_files", {
brandId: this.order.lianbaoBrandId,
partnerCompanyId: this.order.partnerCompanyId
})
this.$u.route({url: 'pages/order/document' + '?partnerCompanyId=' + this.order.partnerCompanyId + '&brandId=' + this.order.lianbaoBrandId}) this.$u.route({url: 'pages/order/document' + '?partnerCompanyId=' + this.order.partnerCompanyId + '&brandId=' + this.order.lianbaoBrandId})
}, },
trackOrder() { trackOrder() {
...@@ -788,6 +794,10 @@ ...@@ -788,6 +794,10 @@
this.centerBtnDisabled = true this.centerBtnDisabled = true
}, },
clickFeedback(){ clickFeedback(){
getApp().track("order_clickFeedback", {
orderId: this.order.orderId,
categoryId: this.order.categoryId
})
// 过程反馈 // 过程反馈
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/feedback?orderId='+this.order.orderId+'&categoryId='+this.order.categoryId+'&showGY=' + (this.bottomButtonText != '预约' ? '1' : '0') url: 'pages/order/feedback?orderId='+this.order.orderId+'&categoryId='+this.order.categoryId+'&showGY=' + (this.bottomButtonText != '预约' ? '1' : '0')
......
...@@ -357,6 +357,10 @@ export default { ...@@ -357,6 +357,10 @@ export default {
} }
self.submiting = true; self.submiting = true;
getApp().track("order_feedback_submitForm", {
reasonType: self.trace.reasonType,
traceDate: self.traceDate
})
let params = this.$u.deepClone(self.trace); let params = this.$u.deepClone(self.trace);
if(self.trace.reasonType != '改约') { if(self.trace.reasonType != '改约') {
if(self.timeItem && self.timeItem.pkey && self.traceDate){ if(self.timeItem && self.timeItem.pkey && self.traceDate){
......
...@@ -224,6 +224,7 @@ export default { ...@@ -224,6 +224,7 @@ export default {
if(!this.validateForm()) { if(!this.validateForm()) {
return false return false
} }
getApp().track("parts_application_submitParts", {})
const address = this.addressInfo const address = this.addressInfo
let params = { let params = {
applyType: '1', applyType: '1',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment