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