Commit 81e10957 by 李君

优化

1 parent 170141d4
// pages/homes/index.js
const App = getApp();
import moment from 'moment'
import {
getMalls,
......@@ -16,6 +17,8 @@ Page({
* 页面的初始数据
*/
data: {
navHeight: App.globalData.navHeight,
windowHeight: App.globalData.windowHeight,
currentTime: moment().format("YYYY-MM-DD"),
types: 1, //选中的时间类型
trendtypes: 1, //选中的业态趋势类型
......@@ -53,6 +56,17 @@ Page({
val: 'PerAreaValue'
}],
},
onShow:function(){
this.activeTabBar(1)
},
activeTabBar(currentMenu) {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
// 当前页面的 tabBar 索引
curClick: currentMenu
})
}
},
// 关闭自定义日期选择
onClose() {
this.setData({
......
{
"usingComponents": {
"navbar": "/components/navbar/index",
"basic":"/components/echart/basic/index",
"van-calendar": "@vant/weapp/calendar/index",
"van-progress": "@vant/weapp/progress/index",
"van-button": "@vant/weapp/button/index",
"van-grid": "@vant/weapp/grid/index",
"van-grid-item": "@vant/weapp/grid-item/index"
}
},
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0268FF",
"navigationBarTextStyle": "white"
}
\ No newline at end of file
<!--pages/homes/index.wxml-->
<view class="title">集团首页</view>
<view class="container">
<view class="container" style="padding-bottom: 80px;">
<navbar page-name="集团首页" bg-color="RGBA(213, 227, 255, 1)" navbar-color="#000"></navbar>
<view class="~backgroundColor">
<!-- 名称 -->
<view class="contianer_shop">
<image src="../../images/back.svg" class='images'></image>
<image src="../../images/banner.png" class='images'></image>
<view class="shop_name">{{selectName}}</view>
<view class="shop_time">
<text>开业门店总数:254个</text>
</view>
</view>
<!-- 选择时间 -->
<view class="tab_tll">
......@@ -26,27 +26,27 @@
<view class="card">
<view class="card_passage">
<image src="../../images/keliulaing.png" class="card_image"></image>
<view> 路过客流量</view>
<view> 35480</view>
<view class="cardName"> 路过客流量</view>
<view class="cardNum"> 35480</view>
</view>
<view class="card_passage">
<image src="../../images/keliuliangyellow.png" class="card_image"></image>
<view> 客流量</view>
<view> 35480</view>
<view class="cardName"> 客流量</view>
<view class="cardNum"> 35480</view>
</view>
<view class="card_passage">
<image src="../../images/customer.png" class="card_image"></image>
<view> 顾客人数</view>
<view> 35480</view>
<view class="cardName"> 顾客人数</view>
<view class="cardNum"> 35480</view>
</view>
<view class="card_passage">
<image src="../../images/jindianlv.png" class="card_image"></image>
<view> 进店率</view>
<view> 35480</view>
<view class="cardName"> 进店率</view>
<view class="cardNum"> 35480</view>
</view>
</view>
<!-- 客流趋势分析 -->
<view class="keliuliang" style="margin-top:30rpx">
<view class="keliuliang">
<text class="title_chart">客流趋势分析</text>
<view class="tab_tll">
<text class="text_tltle {{trendtypes==1?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='1'>过店客流</text>
......@@ -57,12 +57,12 @@
<basic chartId='chartDatatrend' chartData="{{chartData}}" height="500rpx"></basic>
</view>
<!-- 停留时长统计 -->
<view class="keliuliang" style="margin-top:30rpx">
<view class="keliuliang">
<text class="title_chart">停留时长统计</text>
<basic chartId='chartDatastop' chartData="{{chartDatastop}}" height="500rpx"></basic>
</view>
<!-- 门店排行 -->
<view class="keliuliang" style="margin-top:30rpx;">
<view class="keliuliang">
<text class="title_chart">门店排行</text>
<view style="margin-top:20rpx"></view>
<van-grid class="indexList" column-num="4" gutter='{{5}}'>
......@@ -89,4 +89,5 @@
<!-- 自定义时间选择器 -->
<van-calendar show="{{ show }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
</view>
</view>
\ No newline at end of file
/* pages/homes/index.wxss */
.title {
box-sizing: border-box;
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 99;
display: flex;
align-items: center;
justify-content: center;
background-color: #D5E2FF;
height: 160rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
padding-top: 40rpx;
color: #000000;
}
.container {
margin-top: 160rpx;
padding: 10rpx 20rpx;
.container{
height: 100%;
}
.contianer_shop {
width: 100%;
height: 168rpx;
position: relative;
margin-top: 20rpx;
}
.images {
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.shop_name {
margin: 20rpx 0 10rpx 20rpx;
font-size: 34rpx;
padding: 30rpx 0 10rpx 28rpx;
font-size: 40rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 56rpx;
position: absolute;
}
.shop_time {
margin-left: 20rpx;
font-size: 26rpx;
position: absolute;
top: 90rpx;
margin-left: 28rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
......@@ -62,15 +40,13 @@
padding: 0 10rpx;
width: 100%;
margin-top: 30rpx;
position: relative;
display: flex;
justify-content: space-between;
}
.tab_tll .text_tltle {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
margin-right: 30rpx;
}
.actives {
......@@ -86,7 +62,7 @@
margin-top: 30rpx;
width: 100%;
height: 80rpx;
background-color: #D0E0FF;
background-color: rgba(131, 164, 255, 0.39);
border-radius: 40rpx;
display: flex;
align-items: center;
......@@ -100,51 +76,44 @@
flex-wrap: wrap;
justify-content: space-between;
}
.card>view {
.card_passage {
width: 48%;
height: 148rpx;
/* background-color: red; */
position: relative;
padding: 10rpx 20rpx;
padding: 20rpx 20rpx 0;
font-size: 40rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
.cardName{
position: absolute;
font-size: 28rpx;
}
.cardNum{
position: absolute;
top: 65rpx;
}
.card>view:nth-child(n+3) {
margin-top: 30rpx;
}
.card_image {
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: 148rpx;
}
.card_passage {
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 40rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
.keliuliang {
width: 100%;
padding: 20rpx;
border-radius: 20rpx;
background-color: #fff;
margin-top: 30rpx;
}
.keliuliang>text {
height: 44rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 44rpx;
display: flex;
align-items: center;
......@@ -182,11 +151,6 @@
color: #5A95EC;
}
.indexList {
/* margin-bottom: 20rpx;
margin-top: 20rpx; */
}
.indexList .desc_content {
padding: 0 !important;
border: 2rpx solid #DCDFE6;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!