Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 70daa92d
authored
Nov 08, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
活动定位
1 parent
5abfcd7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
packagesList/packageOutput/pages/summary.js
packagesList/packageOutput/pages/summary.js
View file @
70daa92
...
@@ -127,6 +127,21 @@ Page({
...
@@ -127,6 +127,21 @@ Page({
return
list
return
list
},
},
// 定位已开通的场景,默认定位至场景4
findOpenScene
()
{
let
sceneActive
=
4
const
list
=
Object
.
values
(
this
.
data
.
sceneObj
)
// 全场景都没开通或场景4开通,则默认定位至场景4
if
(
list
[
3
]
||
!
list
.
some
(
item
=>
item
==
true
))
{
return
true
}
// 开通1.1和1.2场景:默认定位至1.1场景,否则定位至已开通的场景
sceneActive
=
list
[
1
]
?
2
:
3
this
.
setData
({
sceneActive
:
sceneActive
})
},
getSceneProStatus
(
sceneCode
,
isFirst
=
false
)
{
getSceneProStatus
(
sceneCode
,
isFirst
=
false
)
{
var
params
=
{
var
params
=
{
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
...
@@ -142,7 +157,10 @@ Page({
...
@@ -142,7 +157,10 @@ Page({
[
'sceneActivityObj.scene4'
]:
data
[
3
].
productList
[
'sceneActivityObj.scene4'
]:
data
[
3
].
productList
})
})
if
(
isFirst
)
{
if
(
isFirst
)
{
this
.
getCustomerDetail
(
isFirst
)
this
.
findOpenScene
()
if
(
!
[
2
,
3
].
includes
(
+
this
.
data
.
sceneActive
))
{
this
.
getCustomerDetail
(
isFirst
)
}
}
}
if
([
2
,
3
].
includes
(
+
this
.
data
.
sceneActive
))
{
if
([
2
,
3
].
includes
(
+
this
.
data
.
sceneActive
))
{
this
.
getCustomerDetail
()
this
.
getCustomerDetail
()
...
@@ -268,7 +286,6 @@ Page({
...
@@ -268,7 +286,6 @@ Page({
wx
.
showLoading
()
wx
.
showLoading
()
var
params
=
this
.
dealSearchStatus
()
var
params
=
this
.
dealSearchStatus
()
outputApi
.
getActivityRevenue
({
merchantId
:
this
.
data
.
merchantInfo
.
merchantId
,
...
params
}).
then
(
res
=>
{
outputApi
.
getActivityRevenue
({
merchantId
:
this
.
data
.
merchantInfo
.
merchantId
,
...
params
}).
then
(
res
=>
{
// console.log(res, '0000000000')
// console.log(this.data.sceneActivityObj, '++++++')
// console.log(this.data.sceneActivityObj, '++++++')
var
actList
=
this
.
data
.
sceneActivityObj
[
'scene'
+
(
isFirst
?
4
:
this
.
data
.
sceneActive
)]
var
actList
=
this
.
data
.
sceneActivityObj
[
'scene'
+
(
isFirst
?
4
:
this
.
data
.
sceneActive
)]
var
total
=
0
var
total
=
0
...
@@ -285,7 +302,6 @@ Page({
...
@@ -285,7 +302,6 @@ Page({
let
startTimeFormat
=
k
.
startTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 00:00:00'
let
startTimeFormat
=
k
.
startTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 00:00:00'
let
nowDateFormat
=
new
Date
().
toLocaleDateString
().
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
let
nowDateFormat
=
new
Date
().
toLocaleDateString
().
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
// activityStatus 1:未开始 2:进行中 3:已结束
// activityStatus 1:未开始 2:进行中 3:已结束
// 0-未开始;1-活动中;2-已结束
switch
(
k
.
activityStatus
)
{
switch
(
k
.
activityStatus
)
{
case
1
:
case
1
:
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
...
...
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