Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e75df6cd
authored
Mar 13, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.50.0-0311' into 'develop'
上线合并 See merge request
!366
2 parents
8b0856fb
dd982b9d
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
319 additions
and
293 deletions
mixins/reportPageTrackMixin.js
packageEquity/pages/aiCheck/defense/defense.scss
packageEquity/pages/aiCheck/start/components/RecordList/RecordList.js
packageEquity/pages/aiCheck/start/components/introduction/introduction.js
packageEquity/pages/aiCheck/start/components/introduction/introduction.wxml
packageEquity/pages/aiCheck/start/start.js
packageEquity/pages/carEquity/components/EquityList/EquityList.wxml
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.wxml
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
packageEquity/pages/carQuotation/components/SecondStepSimple/index.wxs
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/index/index.js
packageEquity/pages/carQuotation/index/index.wxml
packageEquity/pages/index/index.js
packageEquity/pages/receptionDetail/receptionDetail.js
pages/loading/loading.js
pages/sceneIndex/sceneIndex.js
store/index.js
tabWorkOrder/pages/residentManage/components/accountAllocation/index.js
tabWorkOrder/pages/residentManage/components/timePicker/index.wxml
utils/track.js
mixins/reportPageTrackMixin.js
View file @
e75df6c
...
@@ -13,6 +13,7 @@ module.exports = Behavior({
...
@@ -13,6 +13,7 @@ module.exports = Behavior({
})
})
},
},
onPageShow
()
{
onPageShow
()
{
// debugger
if
(
this
.
data
.
track_page_view_flag
)
return
if
(
this
.
data
.
track_page_view_flag
)
return
if
(
!
this
.
data
.
track_batchId
)
this
.
setData
({
if
(
!
this
.
data
.
track_batchId
)
this
.
setData
({
track_batchId
:
wx
.
$track
.
setRandomId
(
'batch'
)
track_batchId
:
wx
.
$track
.
setRandomId
(
'batch'
)
...
@@ -24,7 +25,7 @@ module.exports = Behavior({
...
@@ -24,7 +25,7 @@ module.exports = Behavior({
this
.
setBrowseTrackData
()
this
.
setBrowseTrackData
()
},
},
onPageHide
()
{
onPageHide
()
{
wx
.
$track
.
setTrackData
(
2
,
this
.
data
.
track_event_code
,
this
.
track_businessParam
,
this
.
data
.
track_batchId
)
wx
.
$track
.
setTrackData
(
2
,
this
.
data
.
track_event_code
,
this
.
track_businessParam
,
this
.
data
.
track_batchId
,
this
.
data
.
scene
)
if
(
this
.
timer
)
clearTimeout
(
this
.
timer
)
if
(
this
.
timer
)
clearTimeout
(
this
.
timer
)
this
.
setData
({
this
.
setData
({
track_timerFlag
:
false
,
track_timerFlag
:
false
,
...
@@ -32,7 +33,6 @@ module.exports = Behavior({
...
@@ -32,7 +33,6 @@ module.exports = Behavior({
track_page_view_flag
:
false
track_page_view_flag
:
false
})
})
this
.
timer
=
null
this
.
timer
=
null
},
},
setBrowseTrackData
()
{
setBrowseTrackData
()
{
try
{
try
{
...
@@ -40,9 +40,9 @@ module.exports = Behavior({
...
@@ -40,9 +40,9 @@ module.exports = Behavior({
else
this
.
timer
=
setTimeout
(()
=>
{
else
this
.
timer
=
setTimeout
(()
=>
{
this
.
setBrowseTrackData
()
this
.
setBrowseTrackData
()
},
10
e3
)
},
10
e3
)
wx
.
$track
.
setTrackData
(
2
,
this
.
data
.
track_event_code
,
this
.
track_businessParam
,
this
.
data
.
track_batchId
)
wx
.
$track
.
setTrackData
(
2
,
this
.
data
.
track_event_code
,
this
.
track_businessParam
,
this
.
data
.
track_batchId
,
this
.
data
.
scene
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
,
'error'
)
}
}
},
},
}
}
...
...
packageEquity/pages/aiCheck/defense/defense.scss
deleted
100644 → 0
View file @
8b0856f
/* packageEquity/pages/aiCheck/defense/defense.wxss */
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/aiCheck/start/components/RecordList/RecordList.js
View file @
e75df6c
// packageEquity/pages/aiCheck/start/components/RecordList.js
// packageEquity/pages/aiCheck/start/components/RecordList.js
import
aiApi
from
'../../../../../aiApi'
import
aiApi
from
'../../../../../aiApi'
Component
({
Component
({
/**
/**
* 组件的属性列表
* 组件的属性列表
*/
*/
...
@@ -21,11 +20,11 @@ Component({
...
@@ -21,11 +20,11 @@ Component({
attached
()
{
attached
()
{
console
.
log
(
1111
)
console
.
log
(
1111
)
this
.
setData
({
this
.
setData
({
pageNum
:
1
pageNum
:
1
},
()
=>
{
},
()
=>
{
this
.
getSparringPage
()
this
.
getSparringPage
()
})
})
},
},
},
},
...
@@ -60,22 +59,22 @@ Component({
...
@@ -60,22 +59,22 @@ Component({
this
.
getSparringPage
()
this
.
getSparringPage
()
},
},
getSparringPage
()
{
getSparringPage
()
{
const
{
pageNum
}
=
this
.
data
const
{
pageNum
}
=
this
.
data
const
{
uuid
:
staffUuid
}
=
wx
.
$util
.
getUserInfo
();
const
{
uuid
:
staffUuid
}
=
wx
.
$util
.
getUserInfo
();
aiApi
.
getSparringPage
({
pageNum
,
pageSize
:
10
,
staffUuid
}).
then
(
res
=>
{
aiApi
.
getSparringPage
({
pageNum
,
pageSize
:
10
,
staffUuid
}).
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
data
.
list
.
forEach
(
i
=>
{
data
.
list
.
forEach
(
i
=>
{
i
.
createdDate
=
new
Date
(
i
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm'
);
i
.
createdDate
=
new
Date
(
i
.
createdDate
).
format
(
'yyyy-MM-dd hh:mm'
);
try
{
try
{
if
(
i
.
sparringDuration
)
if
(
i
.
sparringDuration
)
i
.
sparringDuration
=
this
.
formatTime
(
i
.
sparringDuration
)
i
.
sparringDuration
=
this
.
formatTime
(
i
.
sparringDuration
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
})
})
const
list
=
pageNum
==
1
?
data
.
list
:
[...
this
.
data
.
recordList
,
...
data
.
list
]
const
list
=
pageNum
==
1
?
data
.
list
:
[...
this
.
data
.
recordList
,
...
data
.
list
]
this
.
setData
({
recordList
:
list
,
total
:
data
.
total
,
triggered
:
false
})
this
.
setData
({
recordList
:
list
,
total
:
data
.
total
,
triggered
:
false
})
})
})
},
},
onBottomRefresh
()
{
onBottomRefresh
()
{
...
@@ -83,12 +82,12 @@ Component({
...
@@ -83,12 +82,12 @@ Component({
total
,
total
,
pageNum
pageNum
}
=
this
.
data
}
=
this
.
data
this
.
setData
({
pageNum
:
++
pageNum
})
this
.
setData
({
pageNum
:
++
pageNum
})
if
(
this
.
data
.
recordList
.
length
==
total
)
return
if
(
this
.
data
.
recordList
.
length
==
total
)
return
this
.
getSparringPage
()
this
.
getSparringPage
()
},
},
toReport
(
e
)
{
toReport
(
e
)
{
const
{
id
,
role
}
=
e
.
currentTarget
.
dataset
const
{
id
,
role
}
=
e
.
currentTarget
.
dataset
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`/packageEquity/pages/aiCheck/result/result?id=
${
id
}
&roleType=
${
role
}
`
url
:
`/packageEquity/pages/aiCheck/result/result?id=
${
id
}
&roleType=
${
role
}
`
})
})
...
...
packageEquity/pages/aiCheck/start/components/introduction/introduction.js
View file @
e75df6c
...
@@ -10,9 +10,9 @@ import aiApi from "../../../../../aiApi"
...
@@ -10,9 +10,9 @@ import aiApi from "../../../../../aiApi"
import
util
from
"../../../../../../utils/util"
import
util
from
"../../../../../../utils/util"
Component
({
Component
({
lifetimes
:
{
lifetimes
:
{
attached
:
function
()
{
attached
:
function
()
{
let
userInfo
=
util
.
getStorageSync
(
'dj_boutique_user_info'
)
let
userInfo
=
util
.
getStorageSync
(
'dj_boutique_user_info'
)
let
username
=
userInfo
.
name
.
length
<
5
?
userInfo
.
name
:
userInfo
.
name
.
slice
(
0
,
4
)
+
'...'
let
username
=
userInfo
.
name
.
length
<
5
?
userInfo
.
name
:
userInfo
.
name
.
slice
(
0
,
4
)
+
'...'
this
.
setData
({
this
.
setData
({
username
username
})
})
...
@@ -37,7 +37,8 @@ Component({
...
@@ -37,7 +37,8 @@ Component({
type
:
1
,
type
:
1
,
imgName
:
'product-1'
,
imgName
:
'product-1'
,
isAvailable
:
true
,
isAvailable
:
true
,
bg
:
'bg1'
bg
:
'bg1'
,
eventCode
:
'storeExtended_warranty'
},
},
{
{
id
:
2
,
id
:
2
,
...
@@ -46,7 +47,8 @@ Component({
...
@@ -46,7 +47,8 @@ Component({
type
:
2
,
type
:
2
,
imgName
:
'product-2'
,
imgName
:
'product-2'
,
isAvailable
:
true
,
isAvailable
:
true
,
bg
:
'bg2'
bg
:
'bg2'
,
eventCode
:
'extended_warranty'
},
},
{
{
id
:
3
,
id
:
3
,
...
@@ -55,7 +57,8 @@ Component({
...
@@ -55,7 +57,8 @@ Component({
type
:
2
,
type
:
2
,
imgName
:
'product-3'
,
imgName
:
'product-3'
,
isAvailable
:
true
,
isAvailable
:
true
,
bg
:
'bg2'
bg
:
'bg2'
,
eventCode
:
'peace_pack'
},
},
{
{
id
:
4
,
id
:
4
,
...
@@ -64,7 +67,8 @@ Component({
...
@@ -64,7 +67,8 @@ Component({
type
:
1
,
type
:
1
,
imgName
:
'product-4'
,
imgName
:
'product-4'
,
isAvailable
:
false
,
isAvailable
:
false
,
bg
:
'bg3'
bg
:
'bg3'
,
eventCode
:
'benefit_upgrades'
},
},
{
{
id
:
5
,
id
:
5
,
...
@@ -73,7 +77,9 @@ Component({
...
@@ -73,7 +77,9 @@ Component({
type
:
1
,
type
:
1
,
imgName
:
'product-5'
,
imgName
:
'product-5'
,
isAvailable
:
false
,
isAvailable
:
false
,
bg
:
'bg3'
bg
:
'bg3'
,
eventCode
:
'modification_upgrades'
}
}
],
],
popVisible
:
false
,
popVisible
:
false
,
...
@@ -87,11 +93,14 @@ Component({
...
@@ -87,11 +93,14 @@ Component({
confirm
()
{
confirm
()
{
this
.
setData
({
this
.
setData
({
popVisible
:
false
popVisible
:
false
})
})
},
},
toExperience
:
wx
.
$util
.
throttle
(
function
(
e
)
{
toExperience
:
wx
.
$util
.
throttle
(
function
(
e
)
{
console
.
log
(
11
,
e
)
console
.
log
(
11
,
e
)
const
{
id
,
available
,
type
}
=
e
.
currentTarget
.
dataset
const
{
id
,
available
,
type
,
eventcode
}
=
e
.
currentTarget
.
dataset
wx
.
$track
.
setTrackData
(
0
,
eventcode
,
{
id
},
''
,
0
)
if
(
type
==
1
)
{
if
(
type
==
1
)
{
if
(
available
)
{
if
(
available
)
{
// 调用接口
// 调用接口
...
@@ -111,7 +120,7 @@ Component({
...
@@ -111,7 +120,7 @@ Component({
url
:
`/packageEquity/pages/aiCheck/defense/defense?id=
${
id
}
`
url
:
`/packageEquity/pages/aiCheck/defense/defense?id=
${
id
}
`
})
})
}
}
},
1000
),
},
1000
),
setSparringVerify
(
id
)
{
setSparringVerify
(
id
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`/packageEquity/pages/aiCheck/scene/scene?id=
${
id
}
`
url
:
`/packageEquity/pages/aiCheck/scene/scene?id=
${
id
}
`
...
...
packageEquity/pages/aiCheck/start/components/introduction/introduction.wxml
View file @
e75df6c
<!--packageEquity/pages/aiCheck/start/components/introduction.wxml-->
<!--packageEquity/pages/aiCheck/start/components/introduction.wxml-->
<!-- 介绍 -->
<!-- 介绍 -->
<view class="introduction-section">
<view class="introduction-section">
<view class="profile-container">
<view class="profile-container">
<!-- <gl-image webp class="avatar" src="/aiCheck/user-avatar.png"></gl-image> -->
<!-- <gl-image webp class="avatar" src="/aiCheck/user-avatar.png"></gl-image> -->
<gl-image webp class="index-people" src="/aiCheck/index-people.webp"></gl-image>
<gl-image webp class="index-people" src="/aiCheck/index-people.webp"></gl-image>
<view class="title-text">
<view class="title-text">
Hi~ {{username}}
Hi~ {{username}}
</view>
</view>
<view class="title-text-2">
<view class="title-text-2">
欢迎来到AI趣练
欢迎来到AI趣练
</view>
</view>
<view class="description-text">
<view class="description-text">
基于AI模拟对练,助你成为营销大师
基于AI模拟对练,助你成为营销大师
</view>
</view>
</view>
</view>
<!-- 介绍列表 -->
<!-- 介绍列表 -->
<view class="introduction-list">
<view class="introduction-list">
<block wx:for="{{productList}}" wx:key="imgName">
<block wx:for="{{productList}}" wx:key="imgName">
<view class="list-item" bindtap="toExperience" data-type="{{item.type}}" data-id="{{item.id}}" data-available="{{item.isAvailabl
e}}">
<view class="list-item" bindtap="toExperience" data-type="{{item.type}}" data-id="{{item.id}}" data-available="{{item.isAvailable}}" data-eventCode="{{item.eventCod
e}}">
<view class="item-left">
<view class="item-left">
<view class="product-name {{item.isAvailable ? '':'gray'}}">{{item.name}}</view>
<view class="product-name {{item.isAvailable ? '':'gray'}}">{{item.name}}</view>
<view class="product-description">{{item.description}}</view>
<view class="product-description">{{item.description}}</view>
</view>
</view>
<gl-image webp class="product-icon" src="/aiCheck/home/{{item.imgName}}.webp"></gl-image>
<gl-image webp class="product-icon" src="/aiCheck/home/{{item.imgName}}.webp"></gl-image>
<gl-image webp class="bg-image" src="/aiCheck/home/{{item.bg}}.webp"></gl-image>
<gl-image webp class="bg-image" src="/aiCheck/home/{{item.bg}}.webp"></gl-image>
<view class="product-type">{{item.type == 1 ? '话术' : '攻防'}}</view>
<view class="product-type">{{item.type == 1 ? '话术' : '攻防'}}</view>
</view>
</view>
</block>
</block>
</view>
</view>
</view>
</view>
<tipsPop isVisible="{{popVisible}}" bindconfirm="confirm"></tipsPop>
<tipsPop isVisible="{{popVisible}}" bindconfirm="confirm"></tipsPop>
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/aiCheck/start/start.js
View file @
e75df6c
/*
/*
* @Description:
* @Description:
* @Author: huyue
* @Author: huyue
* @Date: 2024-05-06 09:46:38
* @Date: 2024-05-06 09:46:38
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-05-16 15:21:54
* @LastEditTime: 2024-05-16 15:21:54
*/
*/
// packageEquity/pages/aiCheck/start/start.js
// packageEquity/pages/aiCheck/start/start.js
import
reportPageTrackMixin
from
'~/mixins/reportPageTrackMixin'
Page
({
Page
({
behaviors
:
[
reportPageTrackMixin
],
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
tab
:
[{
tab
:
[
title
:
'首页'
,
{
icon
:
'/aiCheck/icon-home.png'
,
title
:
'首页'
,
icon_check
:
'/aiCheck/icon-home-b.png'
,
icon
:
'/aiCheck/icon-home.png'
,
type
:
1
,
icon_check
:
'/aiCheck/icon-home-b.png'
,
},{
type
:
1
title
:
'练习记录'
,
},
icon
:
'/aiCheck/icon-record.png'
,
{
icon_check
:
'/aiCheck/icon-record-b.png'
,
title
:
'练习记录'
,
type
:
2
,
icon
:
'/aiCheck/icon-record.png'
,
}],
icon_check
:
'/aiCheck/icon-record-b.png'
,
type
:
2
}
],
tabIndex
:
1
,
tabIndex
:
1
,
navBarHeight
:
0
,
navBarHeight
:
0
,
footerHeight
:
0
footerHeight
:
0
,
track_event_code
:
'aiCheck_detail'
,
//埋点动作类型
scene
:
0
},
},
// 头部返回上一级
// 头部返回上一级
back
()
{
back
()
{
wx
.
$router
.
back
()
wx
.
$router
.
back
()
},
},
selectTab
(
e
)
{
selectTab
(
e
)
{
const
{
type
}
=
e
.
currentTarget
.
dataset
;
const
{
type
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
this
.
setData
({
tabIndex
:
type
tabIndex
:
type
})
})
wx
.
$track
.
setTrackData
(
0
,
type
==
1
?
'aiCheck_indexTab'
:
'aiCheck_indexPractise'
,
{
tabIndex
:
type
},
''
,
0
)
},
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
this
.
setData
({
navBarHeight
navBarHeight
})
})
wx
.
createSelectorQuery
().
select
(
'#footer'
).
boundingClientRect
(
rect
=>
{
wx
.
createSelectorQuery
()
this
.
setData
({
.
select
(
'#footer'
)
footerHeight
:
rect
.
height
.
boundingClientRect
(
rect
=>
{
})
this
.
setData
({
}).
exec
()
footerHeight
:
rect
.
height
})
})
.
exec
()
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
},
// wx.getRecorderManager().start({
// duration: 600000,
// numberOfChannels: 1,
// sampleRate: 16000,
// format: "mp3",
// frameSize: 4
// })
// setTimeout(()=>{
// wx.getRecorderManager().stop();
// wx.getRecorderManager().onStop((res) => {
// console.log(res)
// if (res.tempFilePath) {
// console.log(res.tempFilePath)
// const innerAudioContext = wx.createInnerAudioContext()
// innerAudioContext.src = res.tempFilePath
// innerAudioContext.play() // 播放
// }
// })
// },10000)
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
this
.
onPageShow
()
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{
},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{
this
.
onHide
()
this
.
onPageHide
()
},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
onPullDownRefresh
()
{
},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
onReachBottom
()
{
},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
onShareAppMessage
()
{
}
})
packageEquity/pages/carEquity/components/EquityList/EquityList.wxml
View file @
e75df6c
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- <view class="headerBar">
<!-- 权益提单列表 -->
<view class="totalCount">
<view class="item">
<image src="/packageEquity/images/order-dbd.png" class="total-icon" />
<view>待补单</view>
<view class="num">{{statisticsObj.ladingOder || 0}}</view>
</view>
<view class="item">
<image src="/packageEquity/images/order-fail.png" class="total-icon" />
<view>失败提单</view>
<view class="num">{{statisticsObj.failed || 0}}</view>
</view>
<view class="item">
<image src="/packageEquity/images/order-success.png" class="total-icon" />
<view>成功提单</view>
<view class="num">{{statisticsObj.success || 0}}</view>
</view>
</view>
</view> -->
<!-- style="margin-top:{{navBarHeight}}px" -->
<view class="main">
<view class="main">
<view class="to-box">
<view class="to-box">
<view class="search-box">
<view class="search-box">
...
...
packageEquity/pages/carQuotation/components/GoodsPackage/Goods.wxml
View file @
e75df6c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<view class="value " catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<view class="value " catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.goods}}">
<block wx:if="{{i.goods}}">
<view class="name text-hide ">
<view class="name text-hide ">
<view class="text-hide">{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName +
i.goods.specificationData ) || filter.replaceItemText(i.goods.goodsInfo.goodsNamei.goods.specificationData
)}}</view>
<view class="text-hide">{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName +
(i.goods.specificationData? '/'+i.goods.specificationData:'')) || filter.replaceItemText(i.goods.goodsInfo.goodsName + (i.goods.specificationData? ('/'+i.goods.specificationData):'')
)}}</view>
<!-- <text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> -->
<!-- <text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> -->
<view class="serveName" wx:if="{{i.goods.serveName}}">(包含{{i.goods.serveName}})</view>
<view class="serveName" wx:if="{{i.goods.serveName}}">(包含{{i.goods.serveName}})</view>
<!-- <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> -->
<!-- <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> -->
...
@@ -37,12 +37,11 @@
...
@@ -37,12 +37,11 @@
<view class="goodsChild">
<view class="goodsChild">
<view class="goodsItem" wx:for="{{i.packageGoods.goodsList}}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="goodsItem" wx:for="{{i.packageGoods.goodsList}}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="goodsListName">{{filter.replaceItemText(child.goodsAlias) ||filter.replaceItemText(child.upgradeGoodsName +
child.specificationData) || filter.replaceItemText(child.goodsInfo.goodsName+ child.specificationData
)}}</view>
<view class="goodsListName">{{filter.replaceItemText(child.goodsAlias) ||filter.replaceItemText(child.upgradeGoodsName +
( child.specificationData ? ('/'+child.specificationData): '') ) || filter.replaceItemText(child.goodsInfo.goodsName+( child.specificationData? ('/'+child.specificationData): '')
)}}</view>
<view class="goodsListPrice">¥{{child.sellPrice}}</view>
<view class="goodsListPrice">¥{{child.sellPrice}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</block>
</block>
</view>
</view>
<view class="icon" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<view class="icon" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
View file @
e75df6c
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
<image src="./images/del.png" />
<image src="./images/del.png" />
</view>
</view>
<view class="name text-hide">
<view class="name text-hide">
{{item.goods.goodsAlias || item.goods.goodsNameAlias || filter.replaceItemText(item.goods.upgradeGoodsName + item.goods.specificationData) || filter.replaceItemText(item.goods.goodsName+ item.goods.specificationData)}}
<!-- -->
{{item.goods.goodsAlias || item.goods.goodsNameAlias|| filter.replaceItemText(item.goods.upgradeGoodsName ,( item.goods.specificationData? '/'+item.goods.specificationData:'')) || filter.replaceItemText(item.goods.goodsName, (item.goods.specificationData? '/'+item.goods.specificationData:''))}}
<!-- {{filter.replaceItemText(item.goods.goodsAlias) ||filter.replaceItemText(item.goods.upgradeGoodsName) || filter.replaceItemText(item.goods.goodsName)}} -->
<!-- {{filter.replaceItemText(item.goods.goodsAlias) ||filter.replaceItemText(item.goods.upgradeGoodsName) || filter.replaceItemText(item.goods.goodsName)}} -->
</view>
</view>
<view class="price-box">
<view class="price-box">
...
@@ -46,7 +47,7 @@
...
@@ -46,7 +47,7 @@
</view>
</view>
<view class="packageBox">
<view class="packageBox">
<view class="itemSty" wx:for="{{ item.packageGoods.goodsList }}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="itemSty" wx:for="{{ item.packageGoods.goodsList }}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="name text-hide">{{child.goodsAlias || child.goodsNameAlias || filter.replaceItemText(child.upgradeGoodsName
+ item.specificationData) ||filter.replaceItemText(child.goodsName+ item.specificationData
) }}</view>
<view class="name text-hide">{{child.goodsAlias || child.goodsNameAlias || filter.replaceItemText(child.upgradeGoodsName
, (item.specificationData? '/'+child.specificationData: '') ) ||filter.replaceItemText(child.goodsName ,( item.specificationData? '/'+child.specificationData: '')
) }}</view>
<view class="price-box">
<view class="price-box">
<text>¥</text>
<text>¥</text>
<view class="price">
<view class="price">
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/index.wxs
View file @
e75df6c
var replaceItemText = function (item) {
var replaceItemText = function (
name,
item) {
var reg = getRegExp(';~;', 'g')
var reg = getRegExp(';~;', 'g')
return item ? item.replace(reg, ' ') : ''
console.log(item);
if (item) {
item = item.replace(reg, ' ')
}
return name ? name + item : ''
}
}
/*
/*
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
e75df6c
...
@@ -848,7 +848,8 @@ Page({
...
@@ -848,7 +848,8 @@ Page({
goodsNameAlias
:
item
.
upgradeGoodsAlias
,
goodsNameAlias
:
item
.
upgradeGoodsAlias
,
appreciation
:
item
?.
appreciation
,
appreciation
:
item
?.
appreciation
,
goodsName
:
item
?.
upgradeGoodsName
,
goodsName
:
item
?.
upgradeGoodsName
,
specificationData
:
item
.
specificationData
?
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
:
''
,
specificationNameSequence
:
item
.
specificationTypeSequence
&&
item
.
specificationNameSequence
?
item
.
specificationNameSequence
.
replace
(
/;~;/g
,
'/'
)
:
''
,
specificationData
:
item
.
specificationTypeSequence
&&
item
.
specificationData
?
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
:
''
,
quotationGoodsServiceItemsRelationDTOList
:
quotationGoodsServiceItemsRelationDTOList
:
item
?.
upgradeGoodsServiceItemsList
,
item
?.
upgradeGoodsServiceItemsList
,
titlePictureUrl
:
item
.
goodsInfo
?.
thumbUrl
,
titlePictureUrl
:
item
.
goodsInfo
?.
thumbUrl
,
...
@@ -856,6 +857,11 @@ Page({
...
@@ -856,6 +857,11 @@ Page({
}
}
if
(
ele
.
packageGoods
)
{
if
(
ele
.
packageGoods
)
{
let
item
=
ele
.
packageGoods
;
let
item
=
ele
.
packageGoods
;
ele
.
packageGoods
.
goodsList
=
item
.
goodsList
.
map
(
item
=>
{
item
.
specificationNameSequence
=
item
.
specificationTypeSequence
&&
item
.
specificationNameSequence
?
item
.
specificationNameSequence
.
replace
(
/;~;/g
,
'/'
)
:
''
,
item
.
specificationData
=
item
.
specificationTypeSequence
&&
item
.
specificationData
?
item
.
specificationData
.
replace
(
/;~;/g
,
'/'
)
:
''
return
item
;
})
ele
.
packageGoods
.
sellPrice
=
item
.
goodsList
.
reduce
((
pre
,
item
)
=>
{
ele
.
packageGoods
.
sellPrice
=
item
.
goodsList
.
reduce
((
pre
,
item
)
=>
{
// pre = pre + item.sellPrice
// pre = pre + item.sellPrice
pre
=
NP
.
plus
(
pre
,
item
.
sellPrice
);
pre
=
NP
.
plus
(
pre
,
item
.
sellPrice
);
...
@@ -945,7 +951,7 @@ Page({
...
@@ -945,7 +951,7 @@ Page({
init
()
{
},
init
()
{
},
onRoute
(
options
)
{
onRoute
(
options
)
{
// console.log(options, "options");
// console.log(options, "options");
// options.id =
258
// options.id =
9047
let
{
firstEnter
}
=
this
.
data
let
{
firstEnter
}
=
this
.
data
// 判断是编辑还是新增
// 判断是编辑还是新增
let
{
let
{
...
...
packageEquity/pages/carQuotation/index/index.js
View file @
e75df6c
...
@@ -477,7 +477,7 @@ Component({
...
@@ -477,7 +477,7 @@ Component({
// 校验是否填写昨日日报
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
false
;
if
(
staffCheck
)
return
false
;
return
this
.
setData
({
showZyPayPopup
:
true
,
showZyTarget
:
target
})
return
this
.
setData
({
showZyPayPopup
:
true
,
showZyTarget
:
target
})
}
}
// wx.$router.go('createOrderCarQuotation', {
// wx.$router.go('createOrderCarQuotation', {
// id: target.id
// id: target.id
...
@@ -591,7 +591,7 @@ Component({
...
@@ -591,7 +591,7 @@ Component({
if
(
code
==
0
)
{
if
(
code
==
0
)
{
let
orderInfo
=
this
.
getInsurance
(
data
)
let
orderInfo
=
this
.
getInsurance
(
data
)
// 更新客户信息
// 更新客户信息
updateCustomerInfo
({
...
orderInfo
,
zyPayUrl
:
e
.
detail
?.
zyPayUrl
?.
join
(
','
)
}).
then
(
result
=>
{
updateCustomerInfo
({
...
orderInfo
,
zyPayUrl
:
e
.
detail
?.
zyPayUrl
?.
join
(
','
)
}).
then
(
result
=>
{
this
.
setData
({
this
.
setData
({
showZyPayPopup
:
false
showZyPayPopup
:
false
},
()
=>
{
},
()
=>
{
...
@@ -925,7 +925,7 @@ Component({
...
@@ -925,7 +925,7 @@ Component({
selectType
:
type
,
selectType
:
type
,
});
});
},
},
// 确定是否要显示
// 确定是否要显示
showErrorType
(
item
)
{
showErrorType
(
item
)
{
wx
.
$modal
(
wx
.
$modal
(
this
,
this
,
...
@@ -948,7 +948,7 @@ Component({
...
@@ -948,7 +948,7 @@ Component({
);
);
}
else
{
}
else
{
// 无需补录
// 无需补录
errorOrderById
({
oldQuotationId
:
item
.
id
,
needCreateNewOrder
:
false
}).
then
(
res
=>
{
errorOrderById
({
oldQuotationId
:
item
.
id
,
needCreateNewOrder
:
false
}).
then
(
res
=>
{
let
{
code
,
message
}
=
res
let
{
code
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
search
()
this
.
search
()
...
...
packageEquity/pages/carQuotation/index/index.wxml
View file @
e75df6c
<!-- packageEquity/pages/carQuotation/index/index.wxml -->
<!-- packageEquity/pages/carQuotation/index/index.wxml -->
<!-- <view class="headerBar">
<!-- 数字报价列表 -->
<view class="totalCount">
<view class="left box">
<view class="label">今日营业额</view>
<view class="num item">
<view class="labelStr">¥</view>
<view class="company">{{statisticsObj.todayTurnover || 0}}</view>
<view class="decimal">.{{statisticsObj.todayTurDecimal}}</view>
</view>
<view class="count num">
今日成交量
<view class="countNum">{{statisticsObj.todayOrderNumber || 0}}</view>
</view>
</view>
<view class="line" />
<view class="right left box">
<view class="label">本月营业额</view>
<view class="num item">
<view class="labelStr">¥</view>
<view class="company">{{statisticsObj.monthTurnover || 0}}</view>
</view>
<view class="count num">
本月成交量
<view class="countNum">{{statisticsObj.monthOrderNumber || 0}}</view>
</view>
</view>
<view class="line" />
<view class="right box">
<view class="label">累计营业额</view>
<view class="num item">
<view class="labelStr">¥</view>
<view class="company">{{statisticsObj.totalTurnover || 0}}</view>
</view>
<view class="count num">
累计成交量
<view class="countNum">{{statisticsObj.totalOrderNumber || 0}}</view>
</view>
</view>
</view>
</view> -->
<!-- style="margin-top:{{navBarHeight}}px" -->
<view class="main">
<view class="main">
<view class="to-box">
<view class="to-box">
<view class="search-box">
<view class="search-box">
...
...
packageEquity/pages/index/index.js
View file @
e75df6c
...
@@ -389,7 +389,7 @@ Component({
...
@@ -389,7 +389,7 @@ Component({
if
(
menuList
.
some
((
item
)
=>
item
.
menuText
==
"战败下单"
&&
mode
==
0
))
{
if
(
menuList
.
some
((
item
)
=>
item
.
menuText
==
"战败下单"
&&
mode
==
0
))
{
menuList
=
menuList
.
filter
((
item
)
=>
item
.
menuText
!=
"战败下单"
);
menuList
=
menuList
.
filter
((
item
)
=>
item
.
menuText
!=
"战败下单"
);
}
}
console
.
log
(
'menuList'
,
mode
,
menuList
,);
//
console.log('menuList', mode, menuList,);
// 将menuList排序
// 将menuList排序
menuList
.
sort
((
a
,
b
)
=>
a
.
sortVal
-
b
.
sortVal
)
menuList
.
sort
((
a
,
b
)
=>
a
.
sortVal
-
b
.
sortVal
)
this
.
setData
({
this
.
setData
({
...
@@ -435,7 +435,7 @@ Component({
...
@@ -435,7 +435,7 @@ Component({
wx
.
$router
.
go
(
'receptionDetail'
,
item
)
wx
.
$router
.
go
(
'receptionDetail'
,
item
)
wx
.
$track
.
setTrackData
(
0
,
'reception_detail'
,
{
wx
.
$track
.
setTrackData
(
0
,
'reception_detail'
,
{
batchId
:
item
.
batchId
batchId
:
item
.
batchId
})
}
,
''
,
0
)
},
},
onLoad
()
{
onLoad
()
{
this
.
onPageShow
()
this
.
onPageShow
()
...
@@ -1061,6 +1061,9 @@ Component({
...
@@ -1061,6 +1061,9 @@ Component({
let
staffCheck
=
await
checkDailyReport
(
true
);
let
staffCheck
=
await
checkDailyReport
(
true
);
if
(
staffCheck
)
return
false
;
if
(
staffCheck
)
return
false
;
}
}
if
(
item
.
path
==
'packageEquity.start'
){
wx
.
$track
.
setTrackData
(
0
,
'aiCheck_page'
,
{
},
''
,
0
)
}
return
wx
.
$router
.
go
(
item
.
path
,
{
return
wx
.
$router
.
go
(
item
.
path
,
{
scene
:
0
,
scene
:
0
,
params
:
item
.
params
||
{},
params
:
item
.
params
||
{},
...
...
packageEquity/pages/receptionDetail/receptionDetail.js
View file @
e75df6c
...
@@ -21,7 +21,7 @@ Page({
...
@@ -21,7 +21,7 @@ Page({
isOperate
:
true
,
isOperate
:
true
,
track_event_code
:
'reception_detail'
,
//埋点动作类型
track_event_code
:
'reception_detail'
,
//埋点动作类型
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
...
@@ -157,7 +157,7 @@ Page({
...
@@ -157,7 +157,7 @@ Page({
this
.
track_businessParam
=
{
this
.
track_businessParam
=
{
batchId
:
options
.
batchId
batchId
:
options
.
batchId
}
//埋点业务参数
}
//埋点业务参数
this
.
setData
({
this
.
setData
({
record
:
options
record
:
options
},
()
=>
{
},
()
=>
{
...
@@ -174,7 +174,7 @@ Page({
...
@@ -174,7 +174,7 @@ Page({
0
:
'dialogue'
,
0
:
'dialogue'
,
1
:
'quality_inspection'
,
1
:
'quality_inspection'
,
2
:
'offense_and_defense'
2
:
'offense_and_defense'
}
[
index
])
}[
index
])
this
.
setData
({
this
.
setData
({
activeIndex
:
index
activeIndex
:
index
})
})
...
@@ -212,7 +212,7 @@ Page({
...
@@ -212,7 +212,7 @@ Page({
1
:
'成交'
,
1
:
'成交'
,
2
:
'战败'
,
2
:
'战败'
,
3
:
'未知'
3
:
'未知'
}
[
record
.
orderStatus
],
{
}[
record
.
orderStatus
],
{
endTime
,
endTime
,
totalDuration
,
totalDuration
,
fileUrl
,
fileUrl
,
...
@@ -304,6 +304,6 @@ Page({
...
@@ -304,6 +304,6 @@ Page({
wx
.
$track
.
setTrackData
(
0
,
code
,
{
wx
.
$track
.
setTrackData
(
0
,
code
,
{
...
params
,
...
params
,
batchId
:
record
.
batchId
batchId
:
record
.
batchId
})
}
,
''
,
0
)
}
}
})
})
\ No newline at end of file
\ No newline at end of file
pages/loading/loading.js
View file @
e75df6c
...
@@ -2,7 +2,9 @@ import constantData from '../constant/data'
...
@@ -2,7 +2,9 @@ import constantData from '../constant/data'
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const
app
=
getApp
()
const
app
=
getApp
()
import
api
from
'~/api/api'
import
api
from
'~/api/api'
import
reportPageTrackMixin
from
'~/mixins/reportPageTrackMixin'
Page
({
Page
({
behaviors
:
[
reportPageTrackMixin
],
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
...
@@ -58,6 +60,11 @@ Page({
...
@@ -58,6 +60,11 @@ Page({
if
((
userInfo
?.
shopMerchantId
??
''
)
===
''
&&
!
userInfo
?.
isSuper
&&
userInfo
?.
loginRole
!=
3
)
return
wx
.
$router
.
reLaunch
(
'pages.accountItems'
)
if
((
userInfo
?.
shopMerchantId
??
''
)
===
''
&&
!
userInfo
?.
isSuper
&&
userInfo
?.
loginRole
!=
3
)
return
wx
.
$router
.
reLaunch
(
'pages.accountItems'
)
// 未选择场景
// 未选择场景
if
((
userInfo
?.
sceneType
??
''
)
===
''
)
return
wx
.
$router
.
reLaunch
(
'pages.sceneIndex'
)
if
((
userInfo
?.
sceneType
??
''
)
===
''
)
return
wx
.
$router
.
reLaunch
(
'pages.sceneIndex'
)
userInfo
?.
sceneType
==
0
&&
wx
.
$track
.
setTrackData
(
0
,
'user_login'
,
{
merchantId
:
userInfo
?.
shopMerchantId
,
merchantName
:
userInfo
?.
shopMerchantName
,
sceneType
:
userInfo
?.
sceneType
,
},
''
,
0
)
// 登录了更新用户权限
// 登录了更新用户权限
app
.
gobalCheckYqdSuper
(
userInfo
)
app
.
gobalCheckYqdSuper
(
userInfo
)
let
now
=
new
Date
()
let
now
=
new
Date
()
...
...
pages/sceneIndex/sceneIndex.js
View file @
e75df6c
...
@@ -3,8 +3,9 @@ import constantData from "../constant/data";
...
@@ -3,8 +3,9 @@ import constantData from "../constant/data";
import
api
from
"~/api/api"
;
import
api
from
"~/api/api"
;
import
{
getShopSceneConfig
,
getBusinessSchoolScene
}
from
"~/store/index"
;
import
{
getShopSceneConfig
,
getBusinessSchoolScene
}
from
"~/store/index"
;
import
{
ImgUrl
}
from
"~/config"
;
import
{
ImgUrl
}
from
"~/config"
;
// import
{ getBusinessSchoolScene } from '~/store/index
'
// import
reportPageTrackMixin from '~/mixins/reportPageTrackMixin
'
Page
({
Page
({
// behaviors: [reportPageTrackMixin],
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
...
@@ -69,9 +70,12 @@ Page({
...
@@ -69,9 +70,12 @@ Page({
merchantId
:
userInfo
?.
shopMerchantId
,
merchantId
:
userInfo
?.
shopMerchantId
,
merchantName
:
userInfo
?.
shopMerchantName
,
merchantName
:
userInfo
?.
shopMerchantName
,
});
});
// }
console
.
log
(
' wx.$track.setTrackData'
);
wx
.
$track
.
setTrackData
(
0
,
'user_login'
,
{
// }
merchantId
:
userInfo
?.
shopMerchantId
,
merchantName
:
userInfo
?.
shopMerchantName
,
sceneType
:
scene
,
},
''
,
0
)
this
.
setData
({
this
.
setData
({
sceneList
,
sceneList
,
});
});
...
...
store/index.js
View file @
e75df6c
...
@@ -326,11 +326,11 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
...
@@ -326,11 +326,11 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
// debugger
// debugger
console
.
log
(
data
);
//
console.log(data);
// getCurShopList 接口数据结构不一致,要修改
// getCurShopList 接口数据结构不一致,要修改
let
resolveData
=
(
event
==
'getCurShopList'
?
data
?.
list
:
data
)
||
[]
let
resolveData
=
(
event
==
'getCurShopList'
?
data
?.
list
:
data
)
||
[]
if
(
isSupervision
)
resolveData
=
[
all
,
...
resolveData
]
if
(
isSupervision
)
resolveData
=
[
all
,
...
resolveData
]
console
.
log
(
resolveData
,
'resolveData'
);
//
console.log(resolveData, 'resolveData');
resolve
(
resolveData
)
resolve
(
resolveData
)
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
...
...
tabWorkOrder/pages/residentManage/components/accountAllocation/index.js
View file @
e75df6c
...
@@ -285,7 +285,7 @@ Component({
...
@@ -285,7 +285,7 @@ Component({
item
.
staffAccountList
.
forEach
(
account
=>
{
item
.
staffAccountList
.
forEach
(
account
=>
{
account
.
checkList
=
[]
account
.
checkList
=
[]
account
.
deletedState
=
account
.
deletedFlag
==
'N'
?
true
:
false
account
.
deletedState
=
account
.
deletedFlag
==
'N'
?
true
:
false
account
.
staffConfigList
.
forEach
(
config
=>
{
account
.
staffConfigList
?
.
forEach
(
config
=>
{
if
(
config
.
deferredOpenFlag
===
'Y'
)
{
if
(
config
.
deferredOpenFlag
===
'Y'
)
{
account
.
checkList
.
push
(
config
)
account
.
checkList
.
push
(
config
)
}
}
...
...
tabWorkOrder/pages/residentManage/components/timePicker/index.wxml
View file @
e75df6c
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</van-dialog>
</van-dialog>
<!-- <van-popup show="{{ timeShow }}" position="bottom" custom-style="height: 20%;" bind:close="onClose"> -->
<!-- <van-popup show="{{ timeShow }}" position="bottom" custom-style="height: 20%;" bind:close="onClose"> -->
<view class="footer" wx:if="{{timeShow}}">
<view class="footer" wx:if="{{timeShow}}">
<van-datetime-picker type="date" value="{{ currentDate }}" bind:confirm="bindDateChange" bind:cancel="calcelDate"
min-date="{{ start }}"
/>
<van-datetime-picker type="date" value="{{ currentDate }}" bind:confirm="bindDateChange" bind:cancel="calcelDate" />
</view>
</view>
<!-- </van-popup> -->
<!-- </van-popup> -->
\ No newline at end of file
\ No newline at end of file
utils/track.js
View file @
e75df6c
/**
/**
*/
*/
import
api
from
"~/utils/request/request.js"
import
api
from
'~/utils/request/request.js'
// 实例化对象存储
// 实例化对象存储
import
{
import
{
Storage
}
from
'~/utils/cache/storage'
Storage
}
from
"~/utils/cache/storage"
;
const
$Storage
=
new
Storage
()
const
$Storage
=
new
Storage
()
let
TRACK_TIME
=
null
let
TRACK_TIME
=
null
const
track_interval_time
=
30
*
1
e3
,
const
track_interval_time
=
30
*
1
e3
,
filterFun
=
[
'data'
,
'onLoad'
,
'onShow'
,
'onReady'
,
'onHide'
,
'onUnload'
,
'onPullDownRefresh'
,
'onReachBottom'
,
'onShareAppMessage'
,
'onPageScroll'
,
'onResize'
,
'onTabItemTap'
]
filterFun
=
[
'data'
,
'onLoad'
,
'onShow'
,
'onReady'
,
'onHide'
,
'onUnload'
,
'onPullDownRefresh'
,
'onReachBottom'
,
'onShareAppMessage'
,
'onPageScroll'
,
'onResize'
,
'onTabItemTap'
]
class
TRACK
{
class
TRACK
{
constructor
()
{
constructor
()
{
...
@@ -34,58 +45,49 @@ class TRACK {
...
@@ -34,58 +45,49 @@ class TRACK {
fun
=
fun
.
filter
(
e
=>
filtered
.
includes
(
e
))
fun
=
fun
.
filter
(
e
=>
filtered
.
includes
(
e
))
keys
.
map
(
key
=>
{
keys
.
map
(
key
=>
{
if
(
typeof
thisPage
[
key
]
===
'function'
)
{
if
(
typeof
thisPage
[
key
]
===
'function'
)
{
const
FUN
=
thisPage
[
key
]
const
FUN
=
thisPage
[
key
]
thisPage
[
key
]
=
function
(
event
)
{
thisPage
[
key
]
=
function
(
event
)
{
if
(
event
&&
event
.
type
==
'tap'
)
{
if
(
event
&&
event
.
type
==
'tap'
)
{
let
{
let
{
eventCode
,
track
}
=
event
.
currentTarget
.
dataset
eventCode
,
if
(
eventCode
)
_this
.
setTrackData
(
0
,
eventCode
,
track
)
track
}
=
event
.
currentTarget
.
dataset
if
(
eventCode
)
_this
.
setTrackData
(
0
,
eventCode
,
track
)
}
return
FUN
.
apply
(
this
,
arguments
)
}
}
return
FUN
.
apply
(
this
,
arguments
)
}
}
})
}
.
}).
thisPage
.
onTabItemTap
=
function
(
options
)
{
thisPage
.
onTabItemTap
=
function
(
options
)
{
onTabItemTap
&&
onTabItemTap
.
apply
(
this
,
arguments
)
onTabItemTap
&&
onTabItemTap
.
apply
(
this
,
arguments
)
// , _this.setTrackData({}, 1)
// , _this.setTrackData({}, 1)
}
}
thisPage
.
onLoad
=
function
()
{
thisPage
.
onLoad
=
function
()
{
onLoad
&&
onLoad
.
apply
(
this
,
arguments
)
onLoad
&&
onLoad
.
apply
(
this
,
arguments
)
//
, _this.setTrackData({
,
_this
.
setTrackData
({
//
enterTime: new Date().format('yyyy-MM-dd hh:mm:ss')
enterTime
:
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
)
//
})
})
}
}
thisPage
.
onShow
=
function
()
{
thisPage
.
onShow
=
function
()
{
onShow
&&
onShow
.
apply
(
this
,
arguments
)
onShow
&&
onShow
.
apply
(
this
,
arguments
)
//
, (_this.getPageInstance().page_show_time = Date.now())
,
(
_this
.
getPageInstance
().
page_show_time
=
Date
.
now
())
}
}
thisPage
.
onHide
=
function
()
{
thisPage
.
onHide
=
function
()
{
let
{
let
{
page_show_time
}
=
_this
.
getPageInstance
()
page_show_time
}
=
_this
.
getPageInstance
()
onHide
&&
onHide
.
apply
(
this
,
arguments
)
onHide
&&
onHide
.
apply
(
this
,
arguments
)
// ,
_this.setTrackData(
,
_this
.
setTrackData
(
//
{
{
//
duration: getDuration(page_show_time)
duration
:
getDuration
(
page_show_time
)
//
},
},
//
2
2
//
)
)
}
}
thisPage
.
onUnload
=
function
()
{
thisPage
.
onUnload
=
function
()
{
let
{
let
{
page_show_time
}
=
_this
.
getPageInstance
()
page_show_time
}
=
_this
.
getPageInstance
()
onUnload
&&
onUnload
.
apply
(
this
,
arguments
)
onUnload
&&
onUnload
.
apply
(
this
,
arguments
)
// ,
_this.setTrackData(
,
_this
.
setTrackData
(
//
{
{
//
duration: getDuration(page_show_time)
duration
:
getDuration
(
page_show_time
)
//
},
},
//
2
2
//
)
)
}
}
const
getDuration
=
page_show_time
=>
(
Date
.
now
()
-
page_show_time
)
/
1
e3
const
getDuration
=
page_show_time
=>
(
Date
.
now
()
-
page_show_time
)
/
1
e3
}
}
...
@@ -95,7 +97,9 @@ class TRACK {
...
@@ -95,7 +97,9 @@ class TRACK {
let
_this
=
this
let
_this
=
this
Page
=
function
(
el
)
{
Page
=
function
(
el
)
{
try
{
try
{
el
||
(
el
=
{}),
_this
.
pageLeaveProxy
(
el
),
thisPage
.
apply
(
this
,
arguments
)
el
||
(
el
=
{}),
_this
.
pageLeaveProxy
(
el
),
thisPage
.
apply
(
this
,
arguments
)
}
catch
(
el
)
{
}
catch
(
el
)
{
thisPage
.
apply
(
this
,
arguments
)
thisPage
.
apply
(
this
,
arguments
)
}
}
...
@@ -124,17 +128,12 @@ class TRACK {
...
@@ -124,17 +128,12 @@ class TRACK {
* businessParam:业务参数
* businessParam:业务参数
* batchId 浏览批次id,当浏览-进入事件发生时,必填
* batchId 浏览批次id,当浏览-进入事件发生时,必填
*/
*/
setTrackData
(
eventType
,
eventCode
=
''
,
businessParam
=
''
,
batchId
)
{
setTrackData
(
eventType
,
eventCode
=
''
,
businessParam
=
''
,
batchId
,
scene
)
{
// console.log(eventCode, 'eventCode');
let
recordList
=
$Storage
.
get
(
'recordList'
),
let
recordList
=
$Storage
.
get
(
'recordList'
),
{
{
route
}
=
this
.
getPageInstance
(),
route
}
=
this
.
getPageInstance
(),
prePagePath
=
this
.
getPageInstance
(
2
),
prePagePath
=
this
.
getPageInstance
(
2
),
{
{
accountName
,
uuid
,
userType
}
=
wx
.
$util
.
getUserInfo
(),
accountName
,
uuid
,
userType
}
=
wx
.
$util
.
getUserInfo
(),
item
=
{
item
=
{
loginAccount
:
accountName
,
loginAccount
:
accountName
,
uuid
,
uuid
,
...
@@ -143,7 +142,8 @@ class TRACK {
...
@@ -143,7 +142,8 @@ class TRACK {
eventTime
:
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
),
eventTime
:
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
),
eventType
,
eventType
,
prePagePath
:
prePagePath
?
prePagePath
.
route
:
'/'
,
prePagePath
:
prePagePath
?
prePagePath
.
route
:
'/'
,
pagePath
:
route
pagePath
:
route
,
scene
}
}
// console.log(new Date().format('yyyy-MM-dd hh:mm:ss'),'当前页:',route,'=========')
// console.log(new Date().format('yyyy-MM-dd hh:mm:ss'),'当前页:',route,'=========')
if
(
batchId
)
item
.
batchId
=
batchId
if
(
batchId
)
item
.
batchId
=
batchId
...
@@ -172,24 +172,34 @@ class TRACK {
...
@@ -172,24 +172,34 @@ class TRACK {
sendData
()
{
sendData
()
{
let
recordList
=
$Storage
.
get
(
'recordList'
)
let
recordList
=
$Storage
.
get
(
'recordList'
)
if
(
recordList
&&
recordList
.
length
)
if
(
recordList
&&
recordList
.
length
)
api
.
post
(
api
'clue.api.burial.point.record.batch.insert'
,
{
.
post
(
recordList
'clue.api.burial.point.record.batch.insert'
,
},
{
[],
recordList
'/rop-scrm-clue/router'
,
},
"scrm"
,
[],
false
'/rop-scrm-clue/router'
,
).
then
(({
'scrm'
,
code
,
false
data
,
)
message
.
then
(({
code
,
data
,
message
})
=>
{
})
=>
{
if
(
code
==
0
&&
data
)
{
if
(
code
==
0
&&
data
)
{
$Storage
.
set
(
'recordList'
,
[])
$Storage
.
set
(
'recordList'
,
[])
console
.
log
(
console
.
log
(
'---------------- 埋点定时推送成功 ----------------'
,
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
),
':'
,
recordList
)
'---------------- 埋点定时推送成功 ----------------'
,
}
else
console
.
log
(
'---------------- 埋点定时推送失败 ----------------'
,
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
),
':'
,
message
)
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
),
})
':'
,
recordList
)
}
else
console
.
log
(
'---------------- 埋点定时推送失败 ----------------'
,
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
),
':'
,
message
)
})
}
}
/**获取页面对象实例 */
/**获取页面对象实例 */
getPageInstance
=
(
size
=
1
)
=>
{
getPageInstance
=
(
size
=
1
)
=>
{
...
@@ -198,30 +208,23 @@ class TRACK {
...
@@ -198,30 +208,23 @@ class TRACK {
}
}
/**获取页面标题 */
/**获取页面标题 */
getPageTitle
()
{
getPageTitle
()
{
let
{
let
{
route
,
navigationBarTitleText
}
=
this
.
getPageInstance
()
route
,
navigationBarTitleText
}
=
this
.
getPageInstance
()
if
(
'\u672a\u53d6\u5230'
===
route
||
!
route
)
return
''
if
(
'\u672a\u53d6\u5230'
===
route
||
!
route
)
return
''
let
title
=
''
let
title
=
''
if
(
__wxConfig
)
{
if
(
__wxConfig
)
{
let
{
let
{
window
}
=
__wxConfig
.
page
[
`
${
route
}
.html`
]
window
title
=
}
=
__wxConfig
.
page
[
`
${
route
}
.html`
]
window
.
navigationStyle
==
'custom'
title
=
window
.
navigationStyle
==
'custom'
?
navigationBarTitleText
:
window
.
navigationBarTitleText
?
navigationBarTitleText
:
window
.
navigationBarTitleText
}
}
if
(
!
title
)
title
=
'生意助手员工版'
if
(
!
title
)
title
=
'生意助手员工版'
return
title
return
title
}
}
/**获取设备信息 */
/**获取设备信息 */
getSystemInfo
()
{
getSystemInfo
()
{
let
{
let
{
SDKVersion
,
brand
,
model
,
system
,
version
}
=
SDKVersion
,
$Storage
.
get
(
'system_info'
)
brand
,
model
,
system
,
version
}
=
$Storage
.
get
(
'system_info'
)
return
{
return
{
SDK_version
:
SDKVersion
,
SDK_version
:
SDKVersion
,
brand
,
brand
,
...
@@ -232,9 +235,7 @@ class TRACK {
...
@@ -232,9 +235,7 @@ class TRACK {
}
}
/**获取门店信息 */
/**获取门店信息 */
getMerchantInfo
()
{
getMerchantInfo
()
{
let
{
let
{
merchantId
}
=
$Storage
.
get
(
'merchant_info'
)
merchantId
}
=
$Storage
.
get
(
'merchant_info'
)
return
{
return
{
merchant_id
:
merchantId
merchant_id
:
merchantId
}
}
...
@@ -242,7 +243,70 @@ class TRACK {
...
@@ -242,7 +243,70 @@ class TRACK {
/**设置随机ID */
/**设置随机ID */
setRandomId
(
prefix
=
'DJ'
,
length
=
30
)
{
setRandomId
(
prefix
=
'DJ'
,
length
=
30
)
{
let
name
=
''
,
let
name
=
''
,
n
=
[
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'q'
,
'r'
,
's'
,
't'
,
'u'
,
'v'
,
'w'
,
'x'
,
'y'
,
'z'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
]
n
=
[
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'q'
,
'r'
,
's'
,
't'
,
'u'
,
'v'
,
'w'
,
'x'
,
'y'
,
'z'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
]
for
(
let
i
=
0
;
i
<
Number
(
length
);
i
++
)
{
for
(
let
i
=
0
;
i
<
Number
(
length
);
i
++
)
{
name
+=
n
[
Math
.
round
(
Math
.
random
()
*
(
n
.
length
-
1
))]
name
+=
n
[
Math
.
round
(
Math
.
random
()
*
(
n
.
length
-
1
))]
}
}
...
@@ -250,4 +314,4 @@ class TRACK {
...
@@ -250,4 +314,4 @@ class TRACK {
}
}
}
}
export
default
TRACK
\ No newline at end of file
\ No newline at end of file
export
default
TRACK
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment