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 b6f8318d
authored
Nov 08, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式,活动置顶
1 parent
50c68fe4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
40 deletions
components/SceneBox/SceneBox.wxml
components/SceneBox/SceneBox.wxss
packagesList/packageOutput/pages/summary.js
packagesList/packageOutput/pages/summary.scss
components/SceneBox/SceneBox.wxml
View file @
b6f8318
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<view class="flex scene">
<view
class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
wx:for="{{custSceneList}}"
wx:key="index"
bindtap="handleClick"
data-idx="{{index + 1}}">
<!-- && sceneActive != (index + 1) -->
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" ></image>
<view wx:else class="no-open-img">
<image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" ></image>
<image webp wx:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" ></image>
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}}
</view>
</view>
</view>
<view class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" wx:for="{{custSceneList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}"></image>
<view wx:else class="no-open-img">
<image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}"></image>
<image webp wx:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}"></image>
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}}
</view>
</view>
</view>
\ No newline at end of file
components/SceneBox/SceneBox.wxss
View file @
b6f8318
...
...
@@ -16,11 +16,11 @@
background: #F7F8FC;
margin-right: 4rpx;
font-size: 18rpx;
/* color: #8A8C90; */
color: #323436;
color: #8A8C90;
padding: 32rpx 0 28rpx;
border-radius: 12rpx;
font-weight: 500;
border: 2rpx solid #F7F8FC;
/* margin-bottom: 20rpx; */
}
...
...
@@ -33,6 +33,7 @@
height: 44rpx;
line-height: 44rpx;
margin: 10rpx 0 4rpx;
font-weight: 600;
}
/* 已开通 - start */
...
...
@@ -90,9 +91,9 @@
color: #323436;
}
/*
.scene-title.on-open {
.scene-title.on-open {
color: #8A8C90;
}
*/
}
.no-open-img {
position: relative;
...
...
@@ -117,6 +118,6 @@
font-weight: 600;
}
.notOpened {
/*
.notOpened {
color: #8A8C90;
}
\ No newline at end of file
} */
\ No newline at end of file
packagesList/packageOutput/pages/summary.js
View file @
b6f8318
...
...
@@ -113,6 +113,20 @@ Page({
wx
.
$router
.
go
(
'packagesList.openBusiness'
,
params
)
},
// 将已开通的活动提前
// productStatus:0未申请;1申请中;2已开通
dealOpenActivity
(
list
)
{
list
.
forEach
(
item
=>
{
let
tempList
=
[]
let
idx
=
0
item
.
productList
.
forEach
(
k
=>
{
k
.
productStatus
==
2
?
tempList
.
splice
(
idx
++
,
0
,
k
)
:
tempList
.
push
(
k
)
})
item
.
productList
=
tempList
})
return
list
},
getSceneProStatus
(
sceneCode
,
isFirst
=
false
)
{
var
params
=
{
serviceMerchantId
:
this
.
data
.
merchantInfo
.
pMerchantId
,
...
...
@@ -120,11 +134,12 @@ Page({
sceneCode
:
sceneCode
}
outputApi
.
getSceneProStatus
(
params
).
then
(
res
=>
{
var
data
=
this
.
dealOpenActivity
(
res
)
this
.
setData
({
[
'sceneActivityObj.scene1'
]:
res
[
0
].
productList
,
[
'sceneActivityObj.scene2'
]:
res
[
1
].
productList
,
[
'sceneActivityObj.scene3'
]:
res
[
2
].
productList
,
[
'sceneActivityObj.scene4'
]:
res
[
3
].
productList
[
'sceneActivityObj.scene1'
]:
data
[
0
].
productList
,
[
'sceneActivityObj.scene2'
]:
data
[
1
].
productList
,
[
'sceneActivityObj.scene3'
]:
data
[
2
].
productList
,
[
'sceneActivityObj.scene4'
]:
data
[
3
].
productList
})
if
(
isFirst
)
{
this
.
getCustomerDetail
(
isFirst
)
...
...
@@ -253,7 +268,7 @@ Page({
wx
.
showLoading
()
var
params
=
this
.
dealSearchStatus
()
outputApi
.
getActivityRevenue
({
merchantId
:
this
.
data
.
merchantInfo
.
merchantId
,
...
params
}).
then
(
res
=>
{
// console.log(res)
// console.log(res
, '0000000000'
)
// console.log(this.data.sceneActivityObj, '++++++')
var
actList
=
this
.
data
.
sceneActivityObj
[
'scene'
+
(
isFirst
?
4
:
this
.
data
.
sceneActive
)]
var
total
=
0
...
...
@@ -267,7 +282,7 @@ Page({
curItem
.
activityList
.
forEach
(
k
=>
{
// 时间
k
.
time
=
k
.
startTime
.
slice
(
5
).
replace
(
/-/g
,
'/'
)
+
'~'
+
k
.
endTime
.
slice
(
5
).
replace
(
/-/g
,
'/'
)
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'
// activityStatus 1:未开始 2:进行中 3:已结束
// 0-未开始;1-活动中;2-已结束
...
...
@@ -276,7 +291,7 @@ Page({
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
break
case
2
:
let
endTimeFormat
=
k
.
endTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
let
endTimeFormat
=
k
.
endTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
startTimeFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
endTimeFormat
).
getTime
()
-
new
Date
(
nowDateFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
break
...
...
packagesList/packageOutput/pages/summary.scss
View file @
b6f8318
...
...
@@ -92,11 +92,21 @@
}
.activity-item.active
{
background
:
#3666FE
;
//
background: #3666FE;
box-shadow
:
0
8rpx
20rpx
0
rgba
(
180
,
186
,
204
,
0
.40
)
,
0
4rpx
8rpx
0
rgba
(
180
,
186
,
204
,
0
.32
);
color
:
#FFFFFF
;
//
color: #FFFFFF;
border-width
:
0
;
}
.activity-item.open.active
{
background
:
#3666FE
;
color
:
#FFFFFF
;
}
.activity-item.no-open.active
{
background
:
#CCCED1
;
color
:
#323436
;
}
}
.activity-content
{
...
...
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