Commit ee489088 by tianlonglong

样式修改

2 parents 00072c7c 2edcfb76
......@@ -4,7 +4,6 @@
"index/index2",
"index/me",
"pages/login/index",
"pages/homes/index",
"pages/editPwd/editPwd",
"pages/shopSelect/index"
],
......
Component({
data: {
show:true,
curClick: 1,
color: "#7A7E83",
selectedColor: "#3cc51f",
......
<!--miniprogram/custom-tab-bar/index.wxml-->
<view class="tab-bar">
<view class="tab-bar" wx:if="{{show}}">
<view class="tab-bar-border"></view>
<view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<image src="{{curClick === item.curr ? item.selectedIconPath : item.iconPath}}"></image>
......
module.exports = {
"title": "集团近期趋势",
"series": [{
"name": "Passenger flow",
"data": [
1748,
1715,
2563,
2305,
1848,
1783,
1454
],
"type": "line"
}],
"xaxis": {
"data": [
"02-24(Thu)",
"02-25(Fri)",
"02-26(Sat)",
"02-27(Sun)",
"02-28(Mon)",
"03-01(Tue)",
"03-02(Wed)"
]
}
}
\ No newline at end of file

954 Bytes | W: | H:

1.55 KB | W: | H:

miniProject/images/cong-b.png
miniProject/images/cong-b.png
miniProject/images/cong-b.png
miniProject/images/cong-b.png
  • 2-up
  • Swipe
  • Onion skin

549 Bytes | W: | H:

1.12 KB | W: | H:

miniProject/images/cong.png
miniProject/images/cong.png
miniProject/images/cong.png
miniProject/images/cong.png
  • 2-up
  • Swipe
  • Onion skin
{"_id":"17e3426e621d96b01143206170173ff0","region":"华东","city":"上海","sales":11}
{"_id":"bf4a0bf2621d96b01210a164583fc1ae","region":"华东","city":"南京","sales":11}
{"_id":"17e3426e621d96b0114320640f4572a9","region":"华南","city":"广州","sales":22}
{"_id":"bf4a0bf2621d96b01210a1664cd6018a","region":"华南","city":"深圳","sales":22}

1.63 KB | W: | H:

1.24 KB | W: | H:

miniProject/images/home-b.png
miniProject/images/home-b.png
miniProject/images/home-b.png
miniProject/images/home-b.png
  • 2-up
  • Swipe
  • Onion skin

1.1 KB | W: | H:

897 Bytes | W: | H:

miniProject/images/home.png
miniProject/images/home.png
miniProject/images/home.png
miniProject/images/home.png
  • 2-up
  • Swipe
  • Onion skin

1.87 KB | W: | H:

1.94 KB | W: | H:

miniProject/images/me-b.png
miniProject/images/me-b.png
miniProject/images/me-b.png
miniProject/images/me-b.png
  • 2-up
  • Swipe
  • Onion skin

1.36 KB | W: | H:

1.42 KB | W: | H:

miniProject/images/me.png
miniProject/images/me.png
miniProject/images/me.png
miniProject/images/me.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -28,8 +28,8 @@ Component({
trendtypes: 'PassengerFlow', //选中的客流趋势类型
chartData: {}, //客流趋势分析数据
show: false, //显示日期自定义选择
minDate: new Date(2022, 0, 1).getTime(), //自定义时间的开始日期
maxDate: new Date(2022, 11, 31).getTime(), //自定义时间的结束日期
minDate: new Date(2020, 0, 1).getTime(), //自定义时间的开始日期
// maxDate: new Date(2222, 0, 31).getTime(), //自定义时间的结束日期
rankData: [],
indexVal: 'PassengerFlow',
indexList: [{
......@@ -61,6 +61,9 @@ Component({
methods: {
// 关闭自定义日期选择
onClose() {
this.getTabBar().setData({
show: true
});
this.setData({
show: false
});
......@@ -75,6 +78,9 @@ Component({
},
// 点击自定义日期选择器的确定
onConfirm(event) {
this.getTabBar().setData({
show: true
});
const [start, end] = event.detail;
let startDate = moment(start).format("YYYY-MM-DD")
let endDate = moment(end).format("YYYY-MM-DD")
......@@ -108,6 +114,9 @@ Component({
show: true,
types: e.target.dataset.type,
})
this.getTabBar().setData({
show: false,
});
break;
}
if (dateType != 5) {
......@@ -214,8 +223,15 @@ Component({
// 返回趋势图配置项
getLineConfig(res) {
let xasix = res.xaxis.data || []
let seriesList = res.series || []
if (seriesList.length < 1) {
let seriesList = res.series || [];
let data = seriesList[0].data;
let isData = false;
for (let index = 0; index < data.length; index++) {
if(data[index] != null){
isData = true;
}
}
if (!isData) {
return {
title: {
text: '暂无数据',
......
......@@ -88,6 +88,6 @@
</view>
<!-- 自定义时间选择器 -->
<van-calendar show="{{ show }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
<van-calendar show="{{ show }}" min-date="{{ minDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
</view>
</view>
\ No newline at end of file
......@@ -78,5 +78,5 @@
<basic chartId='chartDataAge' chartData="{{chartDataAge}}" height="500rpx"></basic>
</view>
<!-- 自定义时间选择器 -->
<van-calendar show="{{ show }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
<van-calendar show="{{ show }}" min-date="{{ minDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
</view>
\ No newline at end of file
// pages/zong/index.js
import {
getPatrolRecordList
} from "../../api/tour.js";
const App = getApp();
import _ from 'underscore';
Page({
/**
* 页面的初始数据
*/
data: {
navHeight: App.globalData.navHeight,
windowHeight: App.globalData.windowHeight,
windowWidth: App.globalData.windowWidth,
menuItems: [{
name: '基础客流',
icon: '1',
path: '/pages/zong/basic/index'
},
{
name: '进出客流',
icon: '2',
path: '/pages/zong/contrast/index'
},
// {
// name: '排行榜',
// icon: '3',
// path: '/pages/zong/ranking/index'
// },
// {
// name: '同环比',
// icon: '4',
// path: '/pages/zong/sequential/index'
// },
// {
// name: '时段客流',
// icon: '5',
// path: '/pages/zong/timeTravel/index'
// },
{
name: '节假日客流',
icon: '6',
path: '/pages/zong/holiday-comparison/index'
},
{
name: '进店率',
icon: '7',
path: '/pages/zong/entry-rate/index'
}
],
tourItems:[{
id:1,
name: '实时监控',
icon: '8',
path: '/pages/tour/gate/index?type=view'
},{
id:2,
name: '远程巡店',
icon: '9',
path: '/pages/tour/gate/index?type=tour'
},{
id:3,
name: '点检巡店',
icon: '10',
path: '/pages/tour/point/index'
},{
id:4,
name: '我发起的',
icon: '11',
path: '/pages/tour/list/index?type=create'
},{
id:5,
name: '待我处理',
icon: '12',
path: '/pages/tour/list/index?type=handle'
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
const deploymentType = wx.getStorageSync('deploymentType');
const { menuItems } = this.data
if (deploymentType === 'store') {
// this.setData({ menuItems })
}
},
onShow:function(){
let name = wx.getStorageSync('name');
Promise.all([getPatrolRecordList({status:2,createBy:name}),getPatrolRecordList({status:1,handler:name})]).then(res=>{
let total1 = res[0].data.total;
let total2 = res[1].data.total;
let tourItems = this.data.tourItems;
let titem1 = _.findWhere(tourItems,{id:4});
titem1.dot = total1;
let titem2 = _.findWhere(tourItems,{id:5});
titem2.dot = total2;
this.setData({
tourItems
})
})
this.activeTabBar(2)
},
activeTabBar(currentMenu) {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
// 当前页面的 tabBar 索引
curClick: currentMenu
})
}
},
goOtherPage: function(e) {
const { path } = e.currentTarget.dataset.value
wx.navigateTo({ url: path })
}
})
\ No newline at end of file
{
"usingComponents": {
"navbar": "/components/navbar/index"
}
}
\ No newline at end of file
<view class="container" style="padding-top: {{navHeight}}px;height:{{windowHeight-navHeight}}px;">
<navbar page-name="综合分析" bg-color="#fff" navbar-color="rgba(0, 0, 0, .85)" />
<view class="part-list" scroll-y>
<!-- 我的 S -->
<!-- <view class="my part">
</view> -->
<!-- 我的 E -->
<!-- 客流统计 S -->
<view class="static part">
<view class="title">客流统计</view>
<view class="list">
<view wx:for="{{menuItems}}" wx:for-index="index" wx:for-item="n" wx:key="index" class="item" bindtap="goOtherPage" data-value="{{n}}">
<image src="{{ '../../images/icon/' + n.icon + '.png' }}" class="img" />
<view class="tit">{{n.name}}</view>
</view>
</view>
</view>
<!-- 客流统计 E -->
<!-- 店内分析 S -->
<!-- <view class="analysis part">
</view> -->
<!-- 店内分析 E -->
<!-- 巡店管理 S -->
<!-- <view class="watch part">
<view class="title">巡店管理</view>
<view class="list">
<view wx:for="{{tourItems}}" wx:for-index="index" wx:for-item="n" wx:key="index" class="item" bindtap="goOtherPage" data-value="{{n}}">
<image src="{{ '../../images/icon/' + n.icon + '.png' }}" class="img" />
<view class="tit">{{n.name}}</view>
<view class="dot" wx:if="{{n.dot}}"></view>
</view>
</view>
</view> -->
<!-- 巡店管理 E
<!-- 员工管理 S -->
<!-- <view class="worker part">
</view> -->
<!-- 员工管理 E -->
</view>
<!-- <view class="zong-content">
<view wx:for="{{menuItems}}" wx:for-index="index" wx:for-item="n" wx:key="index" class="item" bindtap="goOtherPage" data-value="{{n}}">
<image src="{{ '../../images/icon/' + n.icon + '.png' }}" class="img" />
<view class="line"></view>
<view>{{n.name}}</view>
<image src="../../images/arrow-r.png" class="arrow" />
</view>
</view> -->
</view>
\ No newline at end of file
/* pages/zong/index.wxss */
.part-list{
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0rpx 0rpx;
}
.part-list .part{
position: relative;
width: 710rpx;
background-color: #fff;
border-radius: 10rpx;
padding:25rpx;
margin:25rpx auto 0;
}
.scroll-view .part .title{
color:#525252;
font-size:36rpx;
}
.part-list .part .list{
position: relative;
display: flex;
flex-wrap: wrap;
justify-content:start;
margin-top:30rpx;
}
.part-list .part .list .item{
position: relative;
width:165rpx;
padding:12rpx 0;
}
.part-list .part .list .item .img{
height: 100rpx;
width:100rpx;
display: block;
margin: 0 auto 0;
}
.part-list .part .list .item .tit{
font-size: 24rpx;
text-align: center;
margin-top: 10rpx;
}
.part-list .part .list .item .dot{
position: absolute;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background-color: #f00;
top:2px;
right: 24rpx;
}
.zong-content {
width: 100%;
height: 100%;
overflow-y: scroll;
box-sizing: border-box;
padding: 18rpx 28rpx;
}
.zong-content .item {
width: 100%;
height: 118rpx;
background-color: #fff;
border-radius: 18rpx;
display: flex;
align-items: center;
margin-bottom: 16rpx;
color: rgba(0, 0, 0, .85);
font-size: 28rpx;
box-sizing: border-box;
padding: 0 38rpx 0 32rpx;
position: relative;
}
.zong-content .item .img {
width: 57rpx;
height: 57rpx;
border-radius: 10rpx;
}
.zong-content .item .line {
width: 3.5rpx;
height: 68rpx;
background-color: rgba(0, 0, 0, .1);
margin: 0 34rpx 0 24rpx;
}
.zong-content .item .arrow {
position: absolute;
right: 38rpx;
top: 50rpx;
color: rgba(0, 0, 0, .1);
width: 24rpx;
height: 24rpx;
}
\ No newline at end of file
{
"usingComponents": {
"basic":"/components/echart/basic/index",
"van-calendar": "@vant/weapp/calendar/index"
}
}
\ No newline at end of file
<!--pages/homes/index.wxml-->
<view class="title">店铺首页</view>
<view class="container">
<!-- 名称 -->
<view class="contianer_shop">
<image src="../../images/back.svg" class='images'></image>
<view class="shop_name" bindtap="selectContent">{{selectName}}</view>
<view class="shop_time">
<text>营业时间:09:00-23:00</text>
<text style="margin:0 10rpx"> 面积:2000㎡ </text>
<text> 晴 10℃-17℃</text>
</view>
</view>
<!-- 选择时间 -->
<view class="tab_tll">
<text class="text_tltle {{types==1?'actives':'defaults'}}" bindtap="ClickTab" data-type='1'>当日</text>
<text class="text_tltle {{types==2?'actives':'defaults'}}" bindtap="ClickTab" data-type='2'>昨日</text>
<text class="text_tltle {{types==3?'actives':'defaults'}}" bindtap="ClickTab" data-type='3'>近7日</text>
<text class="text_tltle {{types==4?'actives':'defaults'}}" bindtap="ClickTab" data-type='4'>近30日</text>
<text class="text_tltle {{types==5?'actives':'defaults'}}" bindtap="ClickTab" data-type='5'>自定义</text>
</view>
<view class="time_input">
<image src="../../images/rili.png" style="width:20px;height:20px;margin-right:20rpx"></image>
<text>{{currentTime}}</text>
</view>
<!-- 卡片 -->
<view class="card">
<view class="card_passage">
<image src="../../images/keliulaing.png" class="card_image"></image>
<view> 路过客流量</view>
<view> 35480</view>
</view>
<view class="card_passage">
<image src="../../images/keliuliangyellow.png" class="card_image"></image>
<view> 客流量</view>
<view> 35480</view>
</view>
<view class="card_passage">
<image src="../../images/customer.png" class="card_image"></image>
<view> 顾客人数</view>
<view> 35480</view>
</view>
<view class="card_passage">
<image src="../../images/jindianlv.png" class="card_image"></image>
<view> 进店率</view>
<view> 35480</view>
</view>
</view>
<!-- 客流趋势分析 -->
<view class="keliuliang" style="margin-top:30rpx">
<text class="title_chart">业态客流TOP5走势</text>
<view class="tab_tll">
<text class="text_tltle {{trendtypes==1?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='1'>过店客流</text>
<text class="text_tltle {{trendtypes==2?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='2'>进店客流</text>
<text class="text_tltle {{trendtypes==3?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='3'>顾客人数</text>
<text class="text_tltle {{trendtypes==4?'actives':'defaults'}}" bindtap="ClickPassageFlow" data-type='4'>进店率</text>
</view>
<basic chartId='chartDatatrend' chartData="{{chartData}}" height="500rpx"></basic>
</view>
<!-- 停留时长统计 -->
<view class="keliuliang" style="margin-top:30rpx">
<text class="title_chart">停留时长统计</text>
<view class="stome_time">
人均停留时长 <text>31</text> 分
</view>
<basic chartId='chartDatastop' chartData="{{chartDatastop}}" height="500rpx"></basic>
</view>
<!-- 客群性别占比 -->
<view class="keliuliang" style="margin-top:30rpx">
<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>
</view>
<!-- 自定义时间选择器 -->
<van-calendar show="{{ show }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
</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;
}
.contianer_shop {
width: 100%;
height: 168rpx;
position: relative;
}
.images {
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.shop_name {
margin: 20rpx 0 10rpx 20rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: flex-end;
}
.shop_name::after {
content: '';
width: 0;
height: 0;
margin-left: 10rpx;
border: 20rpx solid #fff;
border-color: transparent;
border-top-color: #fff;
}
.shop_time {
margin-left: 20rpx;
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
}
.tab_tll {
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;
}
.actives {
color: #000000;
border-bottom: 4px solid #447BFF;
}
.defaults {
color: rgba(0, 0, 0, 0.65);
}
.time_input {
margin-top: 30rpx;
width: 100%;
height: 80rpx;
background-color: #D0E0FF;
border-radius: 40rpx;
display: flex;
align-items: center;
padding: 0 0 0 50rpx;
}
.card {
width: 100%;
margin-top: 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card>view {
width: 48%;
height: 148rpx;
/* background-color: red; */
position: relative;
padding: 10rpx 20rpx;
}
.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;
}
.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;
}
.keliuliang>text::before {
content: '';
width: 6rpx;
height: 30rpx;
margin-right: 10rpx;
background: #5889FF;
border-radius: 3rpx;
}
.title_chart {
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
}
.stome_time {
margin-top: 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
}
.stome_time text {
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #5A95EC;
}
\ No newline at end of file
......@@ -2,18 +2,6 @@
const App = getApp();
const customBehavior = require('../../../extends/custom.behavior.js');
import _ from 'underscore';
import * as echarts from '../../../ec-canvas/echarts';
import {
echartInfo
} from '../../../utils/common';
import chartData from '../../../data';
import {
getReportCharts,
getIndexInfo
} from "../../../api/index.js";
import {
getCharts
} from "../../../api/report.js";
Component({
......
......@@ -2,18 +2,6 @@
const App = getApp();
const customBehavior = require('../../../extends/custom.behavior.js');
import _ from 'underscore';
import * as echarts from '../../../ec-canvas/echarts';
import {
echartInfo
} from '../../../utils/common';
import chartData from '../../../data';
import {
getReportCharts,
getIndexInfo
} from "../../../api/index.js";
import {
getCharts
} from "../../../api/report.js";
import cardConfig from '../../../utils/card'
Component({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!