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

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

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