Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
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 00072c7c
authored
Jun 14, 2023
by
tianlonglong
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
小程序样式
1 parent
beb0c7ea
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
23 deletions
miniProject/index/index2.js
miniProject/index/index2.wxml
miniProject/index/index2.wxss
miniProject/index/index2.js
View file @
00072c7
...
...
@@ -30,8 +30,14 @@ Component({
id
:
this
.
data
.
selectId
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
startTime
=
res
.
data
.
startTime
.
split
(
' '
)[
1
].
slice
(
0
,
5
)
let
endTime
=
res
.
data
.
endTime
.
split
(
' '
)[
1
].
slice
(
0
,
5
)
this
.
setData
({
info
:
res
.
data
info
:
{
...
res
.
data
,
startTime
,
endTime
}
})
}
})
...
...
@@ -55,8 +61,14 @@ Component({
id
:
this
.
data
.
selectId
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
startTime
=
res
.
data
.
startTime
.
split
(
' '
)[
1
].
slice
(
0
,
5
)
let
endTime
=
res
.
data
.
endTime
.
split
(
' '
)[
1
].
slice
(
0
,
5
)
this
.
setData
({
info
:
res
.
data
info
:
{
...
res
.
data
,
startTime
,
endTime
}
})
}
})
...
...
@@ -170,7 +182,7 @@ Component({
endTime
=
timeArr
[
1
]
}
getCardData
({
mallId
:
this
.
data
.
selectId
,
mallId
:
this
.
data
.
selectId
,
// mallId: 9300,
startDate
:
startTime
,
endDate
:
endTime
...
...
@@ -210,7 +222,7 @@ Component({
}
getTrendData
({
// mallId: 9300,
mallId
:
this
.
data
.
selectId
,
mallId
:
this
.
data
.
selectId
,
startDate
:
startTime
,
endDate
:
endTime
,
dataIndex
,
...
...
@@ -233,7 +245,7 @@ Component({
endTime
=
timeArr
[
1
]
}
getStopTimeData
({
mallId
:
this
.
data
.
selectId
,
mallId
:
this
.
data
.
selectId
,
// mallId: 9300,
startDate
:
startTime
,
endDate
:
endTime
...
...
@@ -255,7 +267,7 @@ Component({
endTime
=
timeArr
[
1
]
}
getAgeSexData
({
mallId
:
this
.
data
.
selectId
,
mallId
:
this
.
data
.
selectId
,
// mallId: 9300,
startDate
:
startTime
,
endDate
:
endTime
...
...
@@ -267,12 +279,11 @@ Component({
}
})
getAgeData
({
mallId
:
this
.
data
.
selectId
,
mallId
:
this
.
data
.
selectId
,
// mallId: 9300,
startDate
:
startTime
,
endDate
:
endTime
}).
then
(
res
=>
{
console
.
log
(
res
,
'7777'
)
if
(
res
.
code
==
200
)
{
this
.
setData
({
chartDataAge
:
this
.
getAgeConfig
(
res
.
data
)
...
...
@@ -304,7 +315,20 @@ Component({
getLineConfig
(
res
)
{
let
xasix
=
res
.
xaxis
.
data
// let legendList = res.series.map(item => item.name)
let
seriesList
=
res
.
series
let
seriesList
=
res
.
series
||
[]
if
(
seriesList
[
0
].
data
.
every
(
item
=>!
item
))
{
return
{
title
:
{
text
:
'暂无数据'
,
x
:
'center'
,
y
:
'center'
,
textStyle
:
{
fontSize
:
16
,
fontWeight
:
'normal'
,
}
}
}
}
return
{
grid
:
{
top
:
30
,
...
...
@@ -418,6 +442,19 @@ Component({
// ["侧轨3", 15, 200],
// ["出样", 18, 200]
// ];
if
(
confingData
.
series
.
length
<=
0
)
{
return
{
title
:
{
text
:
'暂无数据'
,
x
:
'center'
,
y
:
'center'
,
textStyle
:
{
fontSize
:
16
,
fontWeight
:
'normal'
,
}
}
}
}
let
data_sample
=
[];
confingData
.
xaxis
.
data
.
forEach
((
item
,
i
)
=>
{
let
arr
=
[];
...
...
@@ -426,6 +463,7 @@ Component({
arr
[
2
]
=
100
;
data_sample
.
push
(
arr
);
});
data_sample
.
reverse
()
data_sample
.
unshift
([
"type"
,
confingData
.
title
,
""
]);
return
{
color
:
[
"#33CCFF"
,
"#CCEEFF"
],
...
...
@@ -433,8 +471,8 @@ Component({
show
:
false
},
grid
:
{
left
:
"
3%
"
,
right
:
"
4
%"
,
left
:
"
0
"
,
right
:
"
2
%"
,
bottom
:
"3%"
,
top
:
"10px"
,
containLabel
:
true
...
...
@@ -518,6 +556,19 @@ Component({
// "type": "pie"
// }]
// }
if
(
faceGender
.
series
[
0
]
&&
faceGender
.
series
[
0
].
data
.
every
(
item
=>
item
))
{
return
{
title
:
{
text
:
'暂无数据'
,
x
:
'center'
,
y
:
'center'
,
textStyle
:
{
fontSize
:
16
,
fontWeight
:
'normal'
,
}
}
}
}
let
seriesData
=
faceGender
.
series
[
0
].
data
;
let
sexLabel
=
faceGender
.
series
[
0
].
data
.
map
(
item
=>
item
.
name
);
let
number
=
faceGender
.
series
[
0
].
data
.
map
(
item
=>
item
.
value
);
...
...
@@ -637,6 +688,19 @@ Component({
// ]
// }
// }
if
(
faceAge
.
series
.
length
<=
0
)
{
return
{
title
:
{
text
:
'暂无数据'
,
x
:
'center'
,
y
:
'center'
,
textStyle
:
{
fontSize
:
16
,
fontWeight
:
'normal'
,
}
}
}
}
let
xdata
=
faceAge
.
series
.
map
(
item
=>
item
.
name
);
let
ydatas
=
faceAge
.
series
.
map
(
item
=>
{
return
item
.
data
[
0
]
*
1
+
item
.
data
[
1
]
*
1
;
...
...
@@ -659,7 +723,7 @@ Component({
transitionDuration
:
0
},
grid
:
{
top
:
"
10
%"
,
top
:
"
5
%"
,
right
:
"5%"
,
left
:
"10%"
,
bottom
:
"15%"
...
...
miniProject/index/index2.wxml
View file @
00072c7
...
...
@@ -6,7 +6,7 @@
<image src="../images/back.svg" class='images'></image>
<view class="shop_name" bindtap="selectContent">{{selectName}}</view>
<view class="shop_time">
<text>营业时间:{{info.startTime}}
至
{{info.endTime}}</text>
<text>营业时间:{{info.startTime}}
-
{{info.endTime}}</text>
<text style="margin:0 10rpx"> 面积:{{info.area}}㎡ </text>
<text> {{info.weather}}</text>
</view>
...
...
@@ -23,29 +23,29 @@
</view>
<view class="time_input">
<image src="../images/rili.png" style="width:20px;height:20px;margin-right:20rpx"></image>
<text>{{currentTime}}</text>
<text
class="text_input"
>{{currentTime}}</text>
</view>
<!-- 卡片 -->
<view class="card">
<view class="card_passage">
<image src="../images/keliulaing.png" class="card_image"></image>
<view class="er"> 客流量</view>
<view class="er"> {{traffic}}</view>
<view class="er
fonts
"> {{traffic}}</view>
</view>
<view class="card_passage">
<image src="../images/keliuliangyellow.png" class="card_image"></image>
<view class="er"> 曝光量</view>
<view class="er"> {{exposure}}</view>
<view class="er
fonts
"> {{exposure}}</view>
</view>
<view class="card_passage">
<image src="../images/customer.png" class="card_image"></image>
<view class="er"> 顾客人数</view>
<view class="er"> {{customer}}</view>
<view class="er
fonts
"> {{customer}}</view>
</view>
<view class="card_passage">
<image src="../images/jindianlv.png" class="card_image"></image>
<view class="er"> 进店率</view>
<view class="er"> {{entryRate}}%</view>
<view class="er
fonts
"> {{entryRate}}%</view>
</view>
</view>
<!-- 客流趋势分析 -->
...
...
@@ -72,7 +72,7 @@
<text class="title_chart">客群性别占比</text>
<basic chartId='chartDataSex' chartData="{{chartDataSex}}" height="500rpx"></basic>
</view>
<!--客群年龄占比 -->
<!--客群年龄占比 -->
<view class="keliuliang" style="margin-top:30rpx">
<text class="title_chart">客群年龄占比</text>
<basic chartId='chartDataAge' chartData="{{chartDataAge}}" height="500rpx"></basic>
...
...
miniProject/index/index2.wxss
View file @
00072c7
...
...
@@ -21,7 +21,7 @@
.container {
margin-top: 160rpx;
padding: 10rpx 20rpx;
padding: 10rpx 20rpx
60px
;
background: linear-gradient(154deg, #C7D3FF 0%, #E9F9FF 48%, #FFFFFF 100%);
}
...
...
@@ -87,12 +87,13 @@
}
.actives {
font-weight: 500;
color: #000000;
border-bottom: 4px solid #447BFF;
}
.defaults {
color: rgba(0, 0, 0, 0.6
5
);
color: rgba(0, 0, 0, 0.6);
}
.time_input {
...
...
@@ -105,7 +106,14 @@
align-items: center;
padding: 0 0 0 50rpx;
}
.text_input{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0,0,0,0.9);
}
.card {
width: 100%;
margin-top: 30rpx;
...
...
@@ -119,7 +127,7 @@
height: 148rpx;
/* background-color: red; */
position: relative;
padding:
1
0rpx 20rpx;
padding:
2
0rpx 20rpx;
}
.card>view:nth-child(n+3) {
...
...
@@ -137,12 +145,13 @@
.er{
position: relative;
z-index: 1;
font-size: 28rpx;
}
.card_passage {
display: flex;
flex-direction: column;
justify-content: space-between;
font-size:
40
rpx;
font-size:
24
rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
...
...
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