Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant-assemble
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 82113ebb
authored
Apr 25, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
99b23238
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
153 additions
and
186 deletions
api/activityApi/ActivityApi.js
packageOutput/components/staff/staff.wxml
packagesList/outDetail/components/WorktableEntrance/index.wxml
packagesList/outDetail/components/activityOverview/activityOverview.js
packagesList/outDetail/components/activityTab/activityTab.scss
packagesList/outDetail/index.js
packagesList/packageDiscovery/pages/activityDetail/activityDetail.js
packagesList/packageOutput/pages/crowdDetail/crowdDetail.js
packagesList/packageOutput/pages/monthReport/monthReport.js
packagesList/packageOutput/pages/visitor/visitor.js
packagesList/packageOutput/pages/visitor/visitor.scss
packagesList/packageOutput/pages/visitor/visitor.wxml
pages/tab/output/components/BusiCard/BusiCard.js
utils/format.js
utils/request/environment.js
api/activityApi/ActivityApi.js
View file @
82113eb
...
...
@@ -68,7 +68,7 @@ class ActivityApi {
// 获取我的访客数据
getActivityVisitorList
(
data
)
{
return
api
.
post
({
method
:
`
${
path
}
.user.activity.visitor.list
`
,
method
:
`
scrm.api.shopmall.customer.visitor.records
`
,
...
data
,
});
}
...
...
packageOutput/components/staff/staff.wxml
View file @
82113eb
...
...
@@ -29,7 +29,7 @@
<view class="flex_direction_column_item" wx:for="{{sfaff}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list[item.val]}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<image wx:if="{{item.name == '员工'}}" src="{{item.list['avatarUrl'
||
'shareImageUrl'][lindex]}}"></image>
<image wx:if="{{item.name == '员工'}}" src="{{item.list['avatarUrl'
][lindex] || item.list[
'shareImageUrl'][lindex]}}"></image>
<block wx:if="{{item.name == '转化率'}}">{{litem?(downType == 'equity'?litem*100:litem)+'%': '--'}}</block>
<block wx:else>{{litem||'--'}}</block>
</view>
...
...
packagesList/outDetail/components/WorktableEntrance/index.wxml
View file @
82113eb
...
...
@@ -5,7 +5,7 @@
</view>
<view class="main-box">
<activity-tab class="activityItem" bind:activityTab="activityTab" tabList="{{tabList}}"></activity-tab>
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% -
4
0rpx);'}}">
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% -
5
0rpx);'}}">
<block wx:if="{{!noResult}}">
<view class="content-box">
<block wx:for="{{listData}}" wx:key="index">
...
...
packagesList/outDetail/components/activityOverview/activityOverview.js
View file @
82113eb
...
...
@@ -14,15 +14,16 @@ Component({
let
s
=
v
v
.
overviewData
=
{
// 活动中
browseData
:
{
all
:
{
title
:
'总浏览'
,
num
:
s
.
brows
e
Count
}
all
:
{
title
:
'总浏览'
,
num
:
s
.
browsCount
}
},
shareData
:
{
all
:
{
title
:
'产值(总)/元'
,
num
:
this
.
priceFormat
(
s
.
realAmount
||
0
),
unit
:
'¥'
}
},
visitorData
:
{
all
:
{
title
:
'总访客'
,
num
:
s
.
visit
c
ount
},
all
:
{
title
:
'总访客'
,
num
:
s
.
visit
C
ount
},
},
}
console
.
log
(
v
)
this
.
setData
({
data
:
v
})
}
}
...
...
packagesList/outDetail/components/activityTab/activityTab.scss
View file @
82113eb
...
...
@@ -7,6 +7,7 @@
justify-content
:
space-around
;
.tab-item
{
color
:
#666666
;
padding
:
0rpx
20rpx
;
&
.checked
{
color
:
#708CFF
;
}
...
...
packagesList/outDetail/index.js
View file @
82113eb
...
...
@@ -64,7 +64,7 @@ Component({
onLoad
(
options
)
{
const
{
merchantId
,
merchantName
}
=
options
;
this
.
setData
({
merchantId
:
44211227
,
merchantName
})
this
.
setData
({
merchantId
,
merchantName
})
this
.
getSubscribeConfig
(
options
)
this
.
addEvent
()
},
...
...
packagesList/packageDiscovery/pages/activityDetail/activityDetail.js
View file @
82113eb
...
...
@@ -13,21 +13,21 @@ Page({
toActivity
(){
const
activityInfo
=
this
.
data
.
activityInfo
// wx.navigateToMiniProgram({
// appId: 'wxe10067a63c1856ac',
// path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo,
// envVersion: 'trial',
// success(res) {
// // 打开成功
// }
// })
wx
.
$router
.
go
(
"/pages/crowdfunding/index/index"
,
{
id
:
activityInfo
.
crowdFundActivityId
,
merchantId
:
activityInfo
.
merchantNo
wx
.
navigateToMiniProgram
({
appId
:
'wxe10067a63c1856ac'
,
path
:
'pages/crowdfunding/index/index?id='
+
activityInfo
.
crowdFundActivityId
+
'&merchantId='
+
activityInfo
.
merchantNo
,
envVersion
:
'trial'
,
success
(
res
)
{
// 打开成功
}
);
})
// wx.$router.go(
// "/pages/crowdfunding/index/index",
// {
// id: activityInfo.crowdFundActivityId,
// merchantId: activityInfo.merchantNo
// }
// );
},
handleplay
()
{
this
.
setData
({
...
...
packagesList/packageOutput/pages/crowdDetail/crowdDetail.js
View file @
82113eb
...
...
@@ -53,7 +53,7 @@ Page({
getDetail
(
activityId
)
{
let
tabelTh
=
{
shareName
:
'员工'
,
totalOrderAmount
:
'产值
(营业额)
'
,
totalOrderAmount
:
'产值'
,
totalShareCount
:
'转发次数'
,
totalVisitorRank
:
'访客总数'
,
totalBrowseCount
:
'浏览总数'
,
...
...
packagesList/packageOutput/pages/monthReport/monthReport.js
View file @
82113eb
...
...
@@ -46,20 +46,7 @@ Page({
name
:
'upgradeRatio'
,
unit_
:
'%'
}],
},
billboard
:
[{
sort
:
1
,
name
:
11
,
value
:
625000
},
{
sort
:
2
,
name
:
11
,
value
:
625000
},
{
sort
:
3
,
name
:
11
,
value
:
625000
}]
}
},
/**
...
...
packagesList/packageOutput/pages/visitor/visitor.js
View file @
82113eb
import
{
IMG_URL
}
from
"~/utils/constantData"
;
import
{
IMG_URL
_STORE
}
from
"~/utils/constantData"
;
import
ActivityApi
from
'~/api/activityApi/index'
import
index_const
from
"~/packagesList/outDetail/index_const"
import
{
commentTime
}
from
'~/utils/format'
Page
({
/**
* 页面的初始数据
*/
data
:
{
list
:
[],
allNum
:
0
,
todayNum
:
0
,
activityTypList
:
index_const
.
data
.
activityTypList
,
IMG_URL
:
IMG_URL
,
isPravite
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onRoute
(
options
)
{
if
(
options
.
isPravite
)
return
this
.
getVistiors
(
options
)
let
activityId
=
options
.
id
ActivityApi
.
getActivityVisitorList
({
activityId
}).
then
(
res
=>
{
res
.
visitorList
&&
res
.
visitorList
.
forEach
(
val
=>
{
val
.
lastVisitFormatTime
=
commentTime
(
val
.
lastVisitDate
)
if
(
!
val
.
customerPhone
&&
val
.
guestId
){
val
.
gId
=
(
val
.
guestId
.
split
(
'_'
)).
pop
()
||
''
/**
* 页面的初始数据
*/
data
:
{
list
:
[],
allNum
:
0
,
todayNum
:
0
,
activityTypList
:
index_const
.
data
.
activityTypList
,
IMG_URL
:
IMG_URL_STORE
,
isPravite
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onRoute
(
options
)
{
let
{
activityId
,
visitCount
,
visitCountToday
}
=
options
ActivityApi
.
getActivityVisitorList
({
activityId
}).
then
(
res
=>
{
console
.
log
(
res
)
res
.
list
&&
res
.
list
.
forEach
(
val
=>
{
val
.
lastVisitFormatTime
=
commentTime
(
new
Date
(
val
.
lastBrowseDate
).
getTime
())
// if (!val.customerPhone && val.guestId) {
// val.gId = (val.guestId.split('_')).pop() || ''
// }
})
this
.
setData
({
allNum
:
visitCount
,
todayNum
:
visitCountToday
,
list
:
res
.
list
})
})
},
toCopyName
(
e
)
{
const
{
name
}
=
e
.
currentTarget
.
dataset
if
(
name
)
{
wx
.
setClipboardData
({
data
:
name
})
}
})
this
.
setData
({
allNum
:
res
.
visitorTotal
,
todayNum
:
res
.
todayTotal
,
list
:
res
.
visitorList
})
})
},
toCopyName
(
e
){
const
{
name
}
=
e
.
currentTarget
.
dataset
if
(
name
){
wx
.
setClipboardData
({
data
:
name
})
}
},
// 私域待运营客户
getVistiors
(
options
){
const
userStorage
=
wx
.
$storage
.
get
(
"userInfo"
);
let
para
=
{
merchantId
:
userStorage
.
merchantId
}
ActivityApi
.
praviteVistitor
(
para
).
then
(
res
=>
{
res
&&
res
.
forEach
(
val
=>
{
val
.
lastVisitFormatTime
=
commentTime
(
val
.
lastVisitDate
)
// console.log(val.lastVisitFormatTime);
// if(!val.customerPhone&&val.guestId){
// val.gId = (val.guestId.split('_')).pop() || ''
// }
})
let
temp
=
JSON
.
parse
(
options
.
content
)
this
.
setData
({
isPravite
:
true
,
list
:
res
,
todayNum
:
temp
[
1
].
openNum
,
allNum
:
temp
[
0
].
openNum
,
})
})
},
// 打电话
callPhone
(
e
)
{
let
{
mobile
}
=
e
.
currentTarget
.
dataset
wx
.
makePhoneCall
({
phoneNumber
:
mobile
.
toString
()
})
},
// 复制微信号
copyWechart
(
e
)
{
let
{
wechartno
}
=
e
.
currentTarget
.
dataset
wx
.
setClipboardData
({
data
:
wechartno
.
toString
(),
success
(
res
)
{
wx
.
showToast
({
title
:
'微信号已复制'
,
icon
:
"none"
},
// 打电话
callPhone
(
e
)
{
let
{
mobile
}
=
e
.
currentTarget
.
dataset
wx
.
makePhoneCall
({
phoneNumber
:
mobile
.
toString
()
})
},
// 复制微信号
copyWechart
(
e
)
{
let
{
wechartno
}
=
e
.
currentTarget
.
dataset
wx
.
setClipboardData
({
data
:
wechartno
.
toString
(),
success
(
res
)
{
wx
.
showToast
({
title
:
'微信号已复制'
,
icon
:
"none"
})
}
})
}
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
}
})
\ No newline at end of file
packagesList/packageOutput/pages/visitor/visitor.scss
View file @
82113eb
...
...
@@ -55,6 +55,7 @@
color
:
#1B233D
;
display
:
flex
;
align-items
:
center
;
max-width
:
160rpx
;
.copy
{
width
:
28rpx
;
height
:
28rpx
;
...
...
packagesList/packageOutput/pages/visitor/visitor.wxml
View file @
82113eb
...
...
@@ -5,8 +5,8 @@
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view>
<view>总访客<text> · {{allNum
||0
}}</text></view>
<view>今日访客<text> · {{todayNum
||0
}}</text></view>
</view>
<view class="list-box">
<block wx:if="{{!isPravite}}">
...
...
@@ -14,15 +14,15 @@
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<view class="top-left">
<
glsx-image webp src="{{item.customerImageUrl ? item.customerImageUrl : 'store-assistant/default_avatar.png'}}"></glsx-
image>
<
image webp src="{{item.customerAvatar ? item.customerAvatar : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></
image>
<view class="name-mobile">
<view class="name">
{{item.customerN
ickN
ame || ""}}
<glsx-image wx:if="{{item.customerN
ickName&&item.customerNickName!='未知访客'}}" data-name="{{item.customerNick
Name}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
{{item.customerName || ""}}
<glsx-image wx:if="{{item.customerN
ame&&item.customerName!='未知访客'}}" data-name="{{item.customer
Name}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> -->
</view>
<view class="mobile" wx:if="{{item.
customerPhon
e}}">
{{item.
customerPhon
e}}
<view class="mobile" wx:if="{{item.
mobil
e}}">
{{item.
mobil
e}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile" wx:else>
...
...
@@ -32,7 +32,7 @@
</view>
</view>
<view class="top-right">
<glsx-image class="btn_icon" wx:if="{{item.
customerPhone}}" webp src="store-assistant/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhon
e}}"></glsx-image>
<glsx-image class="btn_icon" wx:if="{{item.
mobile}}" webp src="store-assistant/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.mobil
e}}"></glsx-image>
<glsx-image class="btn_icon" wx:if="{{item.userWechartNo}}" webp src="store-assistant/activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></glsx-image>
</view>
</view>
...
...
@@ -42,7 +42,7 @@
<!-- <text>{{activityTypList[0]}}</text> -->
</view>
<view class="footprint">
<text>浏览 {{item.
visit
Count}} 次</text>
<text>浏览 {{item.
browse
Count}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
...
...
@@ -54,11 +54,11 @@
<view class="list-item {{item.visitStatus==1?'orderde':''}}">
<view class="top">
<view class="top-left">
<
glsx-image webp src="{{item.customerImageUrl ? item.customerImageUrl : 'store-assistant/default_avatar.png'}}"></glsx-
image>
<
image webp src="{{item.customerAvatar ? item.customerAvatar : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></
image>
<view class="name-mobile">
<view style="padding-top:8rpx" class="name">
{{item.customerN
ickN
ame || "未知访客"}}
<glsx-image wx:if="{{item.customerN
ickName&&item.customerNick
Name!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
{{item.customerName || "未知访客"}}
<glsx-image wx:if="{{item.customerN
ame&&item.customer
Name!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
</view>
</view>
</view>
...
...
@@ -69,7 +69,7 @@
{{item.taskName || ''}}
</view>
<view class="footprint">
<text>浏览 {{item.
visit
Count}}次</text>
<text>浏览 {{item.
browse
Count}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
...
...
pages/tab/output/components/BusiCard/BusiCard.js
View file @
82113eb
...
...
@@ -57,7 +57,7 @@ Component({
methods
:
{
jumpDetail
(
e
)
{
const
{
item
:{
type
,
name
},
info
}
=
e
.
currentTarget
.
dataset
//
if(info[name] == '未开通')return
if
(
info
[
name
]
==
'未开通'
)
return
wx
.
navigateTo
({
url
:
`/packagesList/outDetail/index?merchantId=
${
info
.
merchantId4s
}
&type=
${
type
}
&merchantName=
${
info
.
merchantName4s
}
`
,
})
...
...
utils/format.js
View file @
82113eb
...
...
@@ -56,19 +56,19 @@ export function commentTime(dateTimeStamp) {
let
monthTime
=
dayTime
*
30
let
yearTime
=
dayTime
*
365
if
(
m
ath
.
floor
(
timeDifference
/
yearTime
)
>=
1
)
{
result
=
m
ath
.
floor
(
timeDifference
/
yearTime
)
+
'年前'
}
else
if
(
m
ath
.
floor
(
timeDifference
/
monthTime
)
>=
1
)
{
result
=
m
ath
.
floor
(
timeDifference
/
monthTime
)
+
'月前'
}
else
if
(
m
ath
.
floor
(
timeDifference
/
weektTime
)
>=
1
)
{
result
=
m
ath
.
floor
(
timeDifference
/
weektTime
)
+
'周前'
}
else
if
(
m
ath
.
floor
(
timeDifference
/
dayTime
)
>=
1
)
{
result
=
m
ath
.
floor
(
timeDifference
/
dayTime
)
+
'天前'
}
else
if
(
m
ath
.
floor
(
timeDifference
/
hourTime
)
>=
1
)
{
result
=
m
ath
.
floor
(
timeDifference
/
hourTime
)
+
'小时前'
}
else
if
(
m
ath
.
floor
(
timeDifference
/
minTime
)
>=
1
)
{
result
=
m
ath
.
floor
(
timeDifference
/
minTime
)
+
'分钟前'
if
(
m
ath
.
floor
(
timeDifference
/
minTime
)
<=
5
)
{
if
(
M
ath
.
floor
(
timeDifference
/
yearTime
)
>=
1
)
{
result
=
M
ath
.
floor
(
timeDifference
/
yearTime
)
+
'年前'
}
else
if
(
M
ath
.
floor
(
timeDifference
/
monthTime
)
>=
1
)
{
result
=
M
ath
.
floor
(
timeDifference
/
monthTime
)
+
'月前'
}
else
if
(
M
ath
.
floor
(
timeDifference
/
weektTime
)
>=
1
)
{
result
=
M
ath
.
floor
(
timeDifference
/
weektTime
)
+
'周前'
}
else
if
(
M
ath
.
floor
(
timeDifference
/
dayTime
)
>=
1
)
{
result
=
M
ath
.
floor
(
timeDifference
/
dayTime
)
+
'天前'
}
else
if
(
M
ath
.
floor
(
timeDifference
/
hourTime
)
>=
1
)
{
result
=
M
ath
.
floor
(
timeDifference
/
hourTime
)
+
'小时前'
}
else
if
(
M
ath
.
floor
(
timeDifference
/
minTime
)
>=
1
)
{
result
=
M
ath
.
floor
(
timeDifference
/
minTime
)
+
'分钟前'
if
(
M
ath
.
floor
(
timeDifference
/
minTime
)
<=
5
)
{
//五分钟内就是刚刚
result
=
'刚刚'
}
...
...
utils/request/environment.js
View file @
82113eb
...
...
@@ -40,7 +40,7 @@ if (systemInfo.platform != 'devtools') {
case
'develop'
:
break
case
'trial'
:
index
=
manual
?
index
:
1
index
=
manual
?
index
:
2
break
case
'release'
:
index
=
release
?
index
:
3
...
...
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