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 d02e6d9c
authored
Jun 14, 2023
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
11
1 parent
5b854a8f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
17 deletions
miniProject/custom-tab-bar/index.js
miniProject/index/index.js
miniProject/index/index.wxml
miniProject/index/index.wxss
miniProject/index/index2.js
miniProject/index/index2.wxml
miniProject/index/index2.wxss
miniProject/custom-tab-bar/index.js
View file @
d02e6d9
...
...
@@ -51,7 +51,7 @@ Component({
switchTab
(
e
)
{
const
data
=
e
.
currentTarget
.
dataset
const
url
=
data
.
path
wx
.
reLaunch
({
wx
.
switchTab
({
url
})
// this.setData({
...
...
miniProject/index/index.js
View file @
d02e6d9
...
...
@@ -12,11 +12,15 @@ Component({
this
.
getTabBar
().
setData
({
// 当前页面的 tabBar 索引
curClick
:
1
},()
=>
{
setTimeout
(()
=>
{
this
.
loadData
()
},
1000
)
})
}
}
},
ready
(){
attached
(){
this
.
loadData
()
},
data
:
{
...
...
@@ -41,7 +45,7 @@ Component({
name
:
'进店客流'
,
val
:
'PassengerFlow'
},
{
name
:
'过店
人次
'
,
name
:
'过店
客流
'
,
val
:
'Exposure'
},
{
name
:
'进店率'
,
...
...
@@ -64,8 +68,15 @@ Component({
}],
},
methods
:
{
switchTab
(){
this
.
loadData
()
toThousands
(
num
)
{
var
result
=
[
],
counter
=
0
;
num
=
(
num
||
0
).
toString
().
split
(
''
);
for
(
var
i
=
num
.
length
-
1
;
i
>=
0
;
i
--
)
{
counter
++
;
result
.
unshift
(
num
[
i
]);
if
(
!
(
counter
%
3
)
&&
i
!=
0
)
{
result
.
unshift
(
','
);
}
}
return
result
.
join
(
''
);
},
// 关闭自定义日期选择
onClose
()
{
...
...
@@ -154,9 +165,9 @@ Component({
this
.
setData
({
selectName
:
res
.
data
.
name
,
openMllNum
:
res
.
data
.
openMllNum
,
exposure
:
res
.
data
.
exposure
,
traffic
:
res
.
data
.
traffic
,
customer
:
res
.
data
.
customer
,
exposure
:
this
.
toThousands
(
res
.
data
.
exposure
)
,
traffic
:
this
.
toThousands
(
res
.
data
.
traffic
)
,
customer
:
this
.
toThousands
(
res
.
data
.
customer
)
,
entryRate
:
res
.
data
.
entryRate
,
})
})
...
...
@@ -207,6 +218,7 @@ Component({
return
o
.
value
}))
rankData
.
forEach
(
item
=>
{
item
.
value
=
this
.
toThousands
(
item
.
value
)
item
.
percentage
=
parseInt
(
item
.
value
*
100
/
maxVal
);
})
this
.
setData
({
...
...
miniProject/index/index.wxml
View file @
d02e6d9
...
...
@@ -54,7 +54,7 @@
<text class="text_tltle {{trendtypes=='CustomerNum'?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='CustomerNum'>顾客人数</text>
<text class="text_tltle {{trendtypes=='IntoStoreRate'?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='IntoStoreRate'>进店率</text>
</view>
<basic chartId='chart
Datat
rend' chartData="{{chartData}}" height="500rpx"></basic>
<basic chartId='chart
T
rend' chartData="{{chartData}}" height="500rpx"></basic>
</view>
<!-- 停留时长统计 -->
<!-- <view class="keliuliang">
...
...
miniProject/index/index.wxss
View file @
d02e6d9
...
...
@@ -25,6 +25,10 @@
color: #FFFFFF;
line-height: 56rpx;
position: absolute;
max-width: 90%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.shop_time {
position: absolute;
...
...
miniProject/index/index2.js
View file @
d02e6d9
...
...
@@ -74,7 +74,7 @@ Component({
entryRate
:
0
,
info
:
{}
},
ready
(){
attached
(){
getMalls
({
url
:
'/report/malls'
,
accountId
:
wx
.
getStorageSync
(
'accountId'
)
...
...
@@ -175,6 +175,16 @@ Component({
}
},
toThousands
(
num
)
{
var
result
=
[
],
counter
=
0
;
num
=
(
num
||
0
).
toString
().
split
(
''
);
for
(
var
i
=
num
.
length
-
1
;
i
>=
0
;
i
--
)
{
counter
++
;
result
.
unshift
(
num
[
i
]);
if
(
!
(
counter
%
3
)
&&
i
!=
0
)
{
result
.
unshift
(
','
);
}
}
return
result
.
join
(
''
);
},
// 获取卡片数据
getCardList
()
{
// console.log(this.data.currentTime,this.data.selectId,this.data.selectName)
...
...
@@ -194,9 +204,9 @@ Component({
if
(
res
.
code
==
200
)
{
let
data
=
res
.
data
this
.
setData
({
exposure
:
data
.
exposure
,
traffic
:
data
.
traffic
,
customer
:
data
.
customer
,
exposure
:
this
.
toThousands
(
data
.
exposure
)
,
traffic
:
this
.
toThousands
(
data
.
traffic
)
,
customer
:
this
.
toThousands
(
data
.
customer
)
,
entryRate
:
data
.
entryRate
&&
data
.
entryRate
.
toFixed
(
2
)
})
}
...
...
miniProject/index/index2.wxml
View file @
d02e6d9
...
...
@@ -5,7 +5,9 @@
<!-- 名称 -->
<view class="contianer_shop">
<image src="../images/back.svg" class='images'></image>
<view class="shop_name" bindtap="selectContent">{{selectName}}</view>
<view class="shop_name" bindtap="selectContent">
<text class="nameContent">{{selectName}}</text>
</view>
<view class="shop_time">
<text>营业时间:{{info.startTime}}-{{info.endTime}}</text>
<text style="margin:0 10rpx"> 面积:{{info.area}}㎡ </text>
...
...
miniProject/index/index2.wxss
View file @
d02e6d9
...
...
@@ -46,8 +46,17 @@
color: #FFFFFF;
line-height: 56rpx;
position: absolute;
width: auto;
max-width: 90%;
}
.nameContent{
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: auto;
max-width: 90%;
}
.shop_name::after {
content: '';
display: inline-block;
...
...
@@ -57,8 +66,7 @@
border: 20rpx solid #fff;
border-color: transparent;
border-top-color: #fff;
position: absolute;
bottom: 0;
vertical-align: middle;
}
.shop_time {
...
...
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