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 9673f952
authored
Nov 09, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式修改
1 parent
3d9a0a35
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
174 additions
and
75 deletions
pages/tab/output/components/merchant/merchant.wxss
pages/tab/output/components/merchant/mrechant.js
pages/tab/output/components/merchant/mrechant.scss
pages/tab/output/components/merchant/mrechant.wxml
pages/tab/output/index.wxs
pages/tab/output/components/merchant/merchant.wxss
deleted
100644 → 0
View file @
3d9a0a3
.swiper {
/* test */
color: aquamarine;
}
\ No newline at end of file
\ No newline at end of file
pages/tab/output/components/merchant/mrechant.js
View file @
9673f95
// pages/tab/output/components/merchant/mrechant.js
// pages/tab/output/components/merchant/mrechant.js
import
outputApi
from
'~/api/outputApi/index'
import
outputApi
from
'~/api/outputApi/index'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
setPrice
}
from
'~/utils/format'
import
{
getNowMonth
}
from
'~/utils/format'
import
{
getNowMonth
}
from
'~/utils/format'
const
IMAGES
=
{
const
IMAGES
=
{
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
...
@@ -210,7 +211,7 @@ Component({
...
@@ -210,7 +211,7 @@ Component({
let
{
dataList
,
yqMerchantIds
}
=
data
let
{
dataList
,
yqMerchantIds
}
=
data
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
let
obj
=
{}
let
obj
=
{}
obj
.
totalMoney
=
dataList
[
index
]?.
totalMoney
||
0
obj
.
totalMoney
=
setPrice
(
dataList
[
index
]?.
totalMoney
||
0
)
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
merchantName
=
dataList
[
index
]?.
merchantName
obj
.
merchantName
=
dataList
[
index
]?.
merchantName
obj
.
merchantId
=
item
obj
.
merchantId
=
item
...
@@ -240,12 +241,12 @@ Component({
...
@@ -240,12 +241,12 @@ Component({
}
else
if
([
1
,
2
].
includes
(
index
))
{
}
else
if
([
1
,
2
].
includes
(
index
))
{
console
.
log
(
list
[
current
])
console
.
log
(
list
[
current
])
if
(
list
[
current
][
'showList'
][
index
][
'diagnoseList'
])
{
if
(
list
[
current
][
'showList'
][
index
][
'diagnoseList'
])
{
swiperHeight
=
735
swiperHeight
=
600
}
else
{
}
else
{
swiperHeight
=
686
swiperHeight
=
555
}
}
}
else
{
}
else
{
swiperHeight
=
590
swiperHeight
=
485
}
}
// console.log('swiperHeight', swiperHeight)
// console.log('swiperHeight', swiperHeight)
this
.
setData
({
this
.
setData
({
...
@@ -283,12 +284,12 @@ Component({
...
@@ -283,12 +284,12 @@ Component({
// console.log(item['diagnoseList'])
// console.log(item['diagnoseList'])
// item['showList'][index]['diagnoseList']
// item['showList'][index]['diagnoseList']
if
(
item
[
'showList'
][
sceneIdx
]?.
diagnoseList
)
{
if
(
item
[
'showList'
][
sceneIdx
]?.
diagnoseList
)
{
swiperHeight
=
735
swiperHeight
=
600
}
else
{
}
else
{
swiperHeight
=
686
swiperHeight
=
555
}
}
}
else
{
}
else
{
swiperHeight
=
590
swiperHeight
=
485
}
}
// let value = list[index][sceneIdx]
// let value = list[index][sceneIdx]
// console.log(list[index]['showList'][sceneIdx - 1])
// console.log(list[index]['showList'][sceneIdx - 1])
...
@@ -322,7 +323,7 @@ Component({
...
@@ -322,7 +323,7 @@ Component({
item
=
item
[
0
]
item
=
item
[
0
]
let
obj
=
{}
let
obj
=
{}
obj
.
selectName
=
selectName
||
oldItem
.
selectName
obj
.
selectName
=
selectName
||
oldItem
.
selectName
obj
.
totalMoney
=
item
?.
totalMoney
||
0
obj
.
totalMoney
=
setPrice
(
item
?.
totalMoney
||
0
)
obj
.
totalOrder
=
item
?.
totalOrder
||
0
obj
.
totalOrder
=
item
?.
totalOrder
||
0
obj
.
merchantName
=
item
?.
merchantName
obj
.
merchantName
=
item
?.
merchantName
// obj.merchantId = item
// obj.merchantId = item
...
@@ -360,12 +361,12 @@ Component({
...
@@ -360,12 +361,12 @@ Component({
let
subscript
=
list
[
current
][
'startInd'
]
let
subscript
=
list
[
current
][
'startInd'
]
let
item
=
list
[
current
][
'showList'
]
let
item
=
list
[
current
][
'showList'
]
if
(
item
[
subscript
]?.
diagnoseList
)
{
if
(
item
[
subscript
]?.
diagnoseList
)
{
swiperHeight
=
735
swiperHeight
=
600
}
else
{
}
else
{
swiperHeight
=
686
swiperHeight
=
555
}
}
}
else
{
}
else
{
swiperHeight
=
590
swiperHeight
=
485
}
}
// console.log(swiperHeight)
// console.log(swiperHeight)
this
.
setData
({
this
.
setData
({
...
...
pages/tab/output/components/merchant/mrechant.scss
View file @
9673f95
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
}
}
.longHeight
{
.longHeight
{
height
:
28
5
rpx
;
height
:
28
4
rpx
;
}
}
.shortHeight
{
.shortHeight
{
...
@@ -130,15 +130,26 @@
...
@@ -130,15 +130,26 @@
}
}
.funneItem
{
.funneItem
{
box-sizing
:
border-box
;
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-top
:
36rpx
;
z-index
:
999
;
z-index
:
999
;
width
:
100%
;
width
:
100%
;
height
:
40
0
rpx
;
height
:
40rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#323436
;
color
:
#323436
;
padding-left
:
20rpx
;
.label
{
background
:
#F0F7FF
;
border-radius
:
4rpx
;
width
:
112rpx
;
height
:
40rpx
;
text-align
:
center
;
line-height
:
40rpx
;
}
.num
{
.num
{
position
:
absolute
;
position
:
absolute
;
...
@@ -158,9 +169,13 @@
...
@@ -158,9 +169,13 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
100%
;
width
:
100%
;
padding
:
20rpx
;
padding
:
20rpx
;
border
:
2rpx
dashed
#CCCED1
;
//
border: 2rpx dashed #CCCED1;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
display
:
flex
;
display
:
flex
;
// width: 670rpx;
// height: 104rpx;
background
:
#F7F8FC
;
border-radius
:
8rpx
;
.tipsIcon
{
.tipsIcon
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -186,6 +201,12 @@
...
@@ -186,6 +201,12 @@
}
}
}
}
.statisticsCon
{
width
:
100%
;
}
.swiper-item
{
.swiper-item
{
padding
:
32rpx
20rpx
24rpx
;
padding
:
32rpx
20rpx
24rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -193,31 +214,36 @@
...
@@ -193,31 +214,36 @@
align-items
:
center
;
align-items
:
center
;
.merchantCount
{
.merchantCount
{
position
:
relative
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
margin
:
32rpx
0
;
margin-top
:
32rpx
;
// width: 670rpx;
width
:
100%
;
height
:
126rpx
;
padding
:
22rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
0
8rpx
0
rgba
(
180
,
186
,
204
,
0
.32
)
,
0
8rpx
32rpx
0
rgba
(
180
,
186
,
204
,
0
.40
);
border-radius
:
8rpx
;
z-index
:
2
;
.turnover
,
.turnover
,
.customerUnitPrice
{
.customerUnitPrice
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
position
:
relative
;
position
:
relative
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-wrap
:
wrap
;
align-items
:
start
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
width
:
328rpx
;
align-content
:
space-between
;
height
:
128rpx
;
width
:
50%
;
padding-left
:
110rpx
;
height
:
100%
;
background-image
:
linear-gradient
(
90deg
,
#FFFFFF
3%
,
#F7F8FC
100%
);
text-align-last
:
left
;
text-align-last
:
left
;
.img
{
.img
{
position
:
absolute
;
width
:
32rpx
;
top
:
24rpx
;
height
:
32rpx
;
left
:
36rpx
;
margin-right
:
5rpx
;
width
:
60rpx
;
height
:
60rpx
;
}
}
.num
{
.num
{
...
@@ -225,18 +251,35 @@
...
@@ -225,18 +251,35 @@
font-weight
:
600
;
font-weight
:
600
;
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#323436
;
color
:
#323436
;
margin-bottom
:
14rpx
;
// margin-bottom: 14rpx;
// text-align: right;
// text-align: center;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
100%
;
}
}
.label
{
.label
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#323436
;
color
:
#323436
;
height
:
34rpx
;
}
}
}
}
.customerUnitPrice
{
.customerUnitPrice
{
margin-left
:
6rpx
;
// margin-left: 6rpx;
border-left
:
1rpx
solid
#D8D8D8
;
}
}
.crowdFundingTotal
{
width
:
50%
;
margin
:
32rpx
auto
0
;
.turnover
{
width
:
100%
;
}
}
}
}
}
}
...
@@ -251,22 +294,25 @@
...
@@ -251,22 +294,25 @@
.funneItem
:nth-of-type
(
1
)
{
.funneItem
:nth-of-type
(
1
)
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding-top
:
30rpx
;
//
padding-top: 30rpx;
margin-top
:
25
rpx
;
margin-top
:
64
rpx
;
}
}
.funneItem
:nth-of-type
(
1
)
.num
{
transform
:
translate
(
-50%
,
calc
(
-50%
-
-15rpx
));
}
.navOhterApp
{
.navOhterApp
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-end
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#5C7097
;
color
:
#5C7097
;
margin-top
:
28rpx
;
width
:
100%
;
// margin-left: auto;
// text-align: right;
// margin: 50rpx 20rpx 0;
// margin: 50rpx 20rpx 0;
margin-bottom
:
100rpx
;
//
margin-bottom: 100rpx;
.linkImg
{
.linkImg
{
width
:
20rpx
;
width
:
20rpx
;
...
@@ -287,21 +333,4 @@
...
@@ -287,21 +333,4 @@
width
:
500rpx
;
width
:
500rpx
;
height
:
500rpx
;
height
:
500rpx
;
}
}
}
// .swiper .wx-swiper-dot {
// width: 40rpx !important;
// height: 10rpx !important;
// background-color: aqua;
// // margin-left: 0 10rpx;
// // display: inline-flex;
// // justify-content: space-between;
// }
// swiper .wx-swiper-dot {
// width: 35rpx;
// height: 7rpx;
// border-radius: 50%;
// display: inline-flex;
// margin-left: 19rpx;
// justify-content: space-between;
//
}
\ No newline at end of file
\ No newline at end of file
}
\ No newline at end of file
\ No newline at end of file
pages/tab/output/components/merchant/mrechant.wxml
View file @
9673f95
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- hidden="{{true}}" -->
<!-- hidden="{{true}}" -->
<wxs src="../../index.wxs" module="filter" />
<!-- <scroll-view
<!-- <scroll-view
scroll-y="true"
scroll-y="true"
class="list-wrap"
class="list-wrap"
...
@@ -64,8 +65,8 @@
...
@@ -64,8 +65,8 @@
<view class="title">产值图</view>
<view class="title">产值图</view>
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiper-item ">
<view class="swiper-item ">
<view class="fluuelCon">
<view class="fluuelCon
{{item.startInd!=3?'longHeight':'shortHeight'}}
">
<image class="bg-image
{{item.startInd!=3?'longHeight':'shortHeight'}}" src="{{item.startInd!=3?IMAGES.funnelNew :IMAGES.funnelNew
}}" />
<image class="bg-image
" src="{{item.startInd!=3?IMAGES.funnelNew :IMAGES.funnelNewSm
}}" />
<block
<block
wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}"
wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}"
wx:key="*this"
wx:key="*this"
...
@@ -78,18 +79,22 @@
...
@@ -78,18 +79,22 @@
</block>
</block>
</view>
</view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view hidden="{{item.startInd ==3}}">
<view
class="statisticsCon"
hidden="{{item.startInd ==3}}">
<!-- 统计 -->
<!-- 统计 -->
<view class="merchantCount">
<view class="merchantCount">
<view class="turnover">
<view class="turnover">
<view class="num">
¥ {{item.showList[item.startInd]['custUnitPrice']||0}}
</view>
<image class="img " webp src="{{IMAGES.money}}" />
<image class="img " webp src="{{IMAGES.money}}" />
<view class="num">{{item.showList[item.startInd]['totalMoney']||0}}</view>
<view class="label">客单价</view>
<view class="label">营业额/¥</view>
</view>
</view>
<view class="customerUnitPrice">
<view class="customerUnitPrice">
<view class="num">
¥ {{filter.money_three_for_two_thousands(item.showList[item.startInd]['totalMoney']||0)}}
</view>
<image class="img " webp src="{{IMAGES.paper}}" />
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="num">{{item.showList[item.startInd]['custUnitPrice']||0}}</view>
<view class="label">营业额</view>
<view class="label">客单价/¥</view>
</view>
</view>
</view>
</view>
<!-- 指标诊断 -->
<!-- 指标诊断 -->
...
@@ -113,6 +118,28 @@
...
@@ -113,6 +118,28 @@
<!-- 日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。 -->
<!-- 日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。 -->
</view>
</view>
</view>
</view>
<!-- wx:if="{{swiperHeight>590}}" -->
<navigator
class="navOhterApp"
target="miniProgram"
open-type="navigate"
app-id="wx570d9331f9ace0bd"
version="release">
<image src="{{IMAGES.link}}" webp class="linkImg" />
查看订单详情
</navigator>
</view>
<view class="statisticsCon" hidden="{{item.startInd !=3}}">
<!-- 统计 -->
<view class="merchantCount crowdFundingTotal">
<view class="turnover">
<view class="num">
¥ {{filter.money_three_for_two_thousands(item.showList[item.startInd]['totalMoney']||0)}}
</view>
<image class="img " webp src="{{IMAGES.money}}" />
<view class="label">营业额</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -125,16 +152,6 @@
...
@@ -125,16 +152,6 @@
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
<navigator
wx:if="{{swiperHeight>590}}"
class="navOhterApp"
target="miniProgram"
open-type="navigate"
app-id="wx570d9331f9ace0bd"
version="release">
<image src="{{IMAGES.link}}" webp class="linkImg" />
查看订单详情
</navigator>
</view>
</view>
<!-- </scroll-view> -->
<!-- </scroll-view> -->
<nothingTipsCon wx:if="{{!list.length }}" />
<nothingTipsCon wx:if="{{!list.length }}" />
...
...
pages/tab/output/index.wxs
0 → 100644
View file @
9673f95
/**设置千分位 */
var setPrice = function (n = 0.0) {
if ((typeof n == 'string' || typeof n == 'number') && !isNaN(n)) {
n = parseFloat(n).toFixed(2)
var r = getRegExp('(d{1,3})(?=(d{3})+(?:.))', 'g')
var p = n.replace(r, ',')
return p
// var r = getRegExp('/./', 'g')
// var p = n.replace(r, 'test')
// return n
} else {
console.log(n, '不是一个数字', !isNaN(n))
}
}
var threeNumForTwo = {
money_three_for_two_thousands: function (num) {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
}
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