Commit 54a2adcf by 李君

优化

1 parent 40d0d38f
......@@ -4,6 +4,7 @@
"index/index2",
"index/me",
"pages/login/index",
"pages/homes/index",
"pages/editPwd/editPwd",
"pages/shopSelect/index"
],
......
......@@ -34,7 +34,7 @@ Component({
"pagePath": "/index/index2",
"iconPath": "../images/cong.png",
"selectedIconPath": "../images/cong-b.png",
"text": "工作台",
"text": "店铺首页",
"curr": 2
},
{
......
......@@ -7,7 +7,6 @@ import moment from 'moment'
Component({
pageLifetimes: {
show() {
this.loadData()
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
// 当前页面的 tabBar 索引
......@@ -16,6 +15,9 @@ Component({
}
}
},
ready(){
this.loadData()
},
data: {
selectName: '',//集团名称
openMllNum:0,//开业门店数
......@@ -176,7 +178,7 @@ Component({
},()=>{
// wx.hideLoading();
})
},1000)
},500)
})
},
// 获取门店排行
......
<!--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>营业时间:{{info.startTime}}-{{info.endTime}}</text>
<text style="margin:0 10rpx"> 面积:{{info.area}}㎡ </text>
<text> {{info.weather}}</text>
</view>
<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>
<view class="shop_name" bindtap="selectContent">{{selectName}}</view>
<view class="shop_time">
<text>营业时间:{{info.startTime}}-{{info.endTime}}</text>
<text style="margin:0 10rpx"> 面积:{{info.area}}㎡ </text>
<text> {{info.weather}}</text>
</view>
</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 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" style="font-size:48rpx"> {{traffic}}</view>
</view>
<view class="card_passage">
<image src="../images/keliuliangyellow.png" class="card_image"></image>
<view class="er"> 曝光量</view>
<view class="er" style="font-size:48rpx"> {{exposure}}</view>
</view>
<view class="card_passage">
<image src="../images/customer.png" class="card_image"></image>
<view class="er"> 顾客人数</view>
<view class="er" style="font-size:48rpx"> {{customer}}</view>
</view>
<view class="card_passage">
<image src="../images/jindianlv.png" class="card_image"></image>
<view class="er"> 进店率</view>
<view class="er" style="font-size:48rpx"> {{entryRate}}%</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">
<!-- 选择时间 -->
<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 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 cardNum"> {{traffic}}</view>
</view>
<view class="card_passage">
<image src="../images/keliuliangyellow.png" class="card_image"></image>
<view class="er"> 曝光量</view>
<view class="er cardNum"> {{exposure}}</view>
</view>
<view class="card_passage">
<image src="../images/customer.png" class="card_image"></image>
<view class="er"> 顾客人数</view>
<view class="er cardNum"> {{customer}}</view>
</view>
<view class="card_passage">
<image src="../images/jindianlv.png" class="card_image"></image>
<view class="er"> 进店率</view>
<view class="er cardNum"> {{entryRate}}%</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 }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
<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>
</view>
<!-- 自定义时间选择器 -->
<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/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: 140rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
padding-top: 40rpx;
color: #000000;
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: 140rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
padding-top: 40rpx;
color: #000000;
}
.container {
margin-top: 140rpx;
padding: 10rpx 20rpx 60px;
background: linear-gradient(154deg, #C7D3FF 0%, #E9F9FF 48%, #FFFFFF 100%);
height: 100%;
}
.contianer_shop {
width: 100%;
height: 168rpx;
position: relative;
width: 100%;
height: 168rpx;
position: relative;
margin-top: 20rpx;
}
.images {
position: absolute;
left: 0;
top: 0;
z-index: 0;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
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;
position: relative;
z-index: 1;
}
.fonts{
font-size: 48rpx;
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_name::after {
content: '';
width: 0;
height: 0;
margin-left: 10rpx;
border: 20rpx solid #fff;
border-color: transparent;
border-top-color: #fff;
content: '';
display: inline-block;
width: 0;
height: 0;
margin-left: 20rpx;
border: 20rpx solid #fff;
border-color: transparent;
border-top-color: #fff;
position: absolute;
bottom: 0;
}
.shop_time {
margin-left: 20rpx;
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
position: relative;
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);
}
.tab_tll {
padding: 0 10rpx;
width: 100%;
margin-top: 30rpx;
position: relative;
display: flex;
/* justify-content: space-between; */
padding: 0 10rpx;
width: 100%;
margin-top: 30rpx;
position: relative;
}
.tab_tll .text_tltle {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
margin-right: 30rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
margin-right: 30rpx;
}
.actives {
font-weight: 500;
color: #000000;
border-bottom: 4px solid #447BFF;
font-weight: 500;
color: #000000;
border-bottom: 4px solid #447BFF;
}
.defaults {
color: rgba(0, 0, 0, 0.6);
color: rgba(0, 0, 0, 0.6);
}
.time_input {
margin-top: 30rpx;
width: 100%;
height: 80rpx;
background-color: rgba(131, 164, 255, 0.39);
border-radius: 40rpx;
display: flex;
align-items: center;
padding: 0 0 0 50rpx;
margin-top: 30rpx;
width: 100%;
height: 80rpx;
background-color: rgba(131, 164, 255, 0.39);
border-radius: 40rpx;
display: flex;
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);
.text_input {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.9);
}
.card {
width: 100%;
margin-top: 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
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: 20rpx 20rpx;
width: 48%;
height: 148rpx;
/* background-color: red; */
position: relative;
padding: 20rpx 20rpx;
}
.card>view:nth-child(n+3) {
margin-top: 30rpx;
margin-top: 30rpx;
}
.card_image {
position: absolute;
left: 0;
top: 0;
z-index: 0;
width: 100%;
height: 148rpx;
}
.er{
position: relative;
z-index: 1;
font-size: 28rpx;
position: absolute;
left: 0;
top: 0;
z-index: 0;
width: 100%;
height: 148rpx;
}
.er {
position: relative;
z-index: 1;
font-size: 28rpx;
}
.er.cardNum {
font-size: 40rpx;
}
.card_passage {
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 24rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 24rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
.keliuliang {
width: 100%;
padding: 20rpx;
border-radius: 20rpx;
background-color: #fff;
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;
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;
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);
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);
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;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #5A95EC;
}
\ No newline at end of file
// pages/homes/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
<!--pages/homes/index.wxml-->
<text>pages/homes/index.wxml</text>
......@@ -29,7 +29,7 @@
<input class="userInput" placeholder="请输入密码" password bindinput="changePassword" value="{{ password }}" cursor-spacing="{{40}}" />
</view>
<view class="login-btn">
<view style="opacity:0;pointer-events: none;" class="login-btn-text" bindtap="changeBaseUrl">切换地址</view>
<!-- <view style="opacity:0;pointer-events: none;" class="login-btn-text" bindtap="changeBaseUrl">切换地址</view> -->
<button class="btn" bindtap="login">登录</button>
</view>
</view>
......
......@@ -110,7 +110,7 @@
}
.login-btn .btn {
width: 316rpx;
width: 100%;
height: 84rpx;
background:rgba(0,105,255,1);
border-radius: 16rpx;
......
<!--pages/sameProportion/sameProportion.wxml-->
<import src="../../components/wxSortPickerView/wxSortPickerView.wxml" />
<view class="">
<import src="../../components/wxSortPickerView/wxSortPickerView.wxml" />
<!-- <view class="containers">
<navbar page-name="店铺选择" bg-color="#3A63FF" navbar-color="#fff" nav='back' bindonGoBack='goBacks' />
<view class="part-list">
<view>搜索</view> -->
<view class="titles">请选择
<navbar page-name="请选择" bindonGoBack='goBacks' nav='back' bg-color="RGBA(213, 227, 255, 1)" navbar-color="#000"></navbar>
<!-- <view class="titles">请选择
<view class="befores" bindtap='goBacks'></view>
</view>
</view> -->
<view class="search">
<van-field value="{{ value }}" placeholder="请输入要搜索的内容" border="{{ true }}" bind:change="onChange" />
</view>
<!-- 模板 -->
<view class="tesl">
<template is="wxSortPickerView" data="{{wxSortPickerData}}"></template>
</view>
</view>
\ No newline at end of file
/* pages/sameProportion/sameProportion.wxss */
@import '../../components/wxSortPickerView/wxSortPickerView.wxss';
.titles {
height: 160rpx;
width: 100%;
box-sizing: border-box;
text-align: center;
padding-top: 90rpx;
background-color: #3A63FF;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
position: relative;
height: 160rpx;
width: 100%;
box-sizing: border-box;
text-align: center;
padding-top: 90rpx;
background-color: #3A63FF;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
position: relative;
}
.befores{
position: absolute;
width: 30rpx;
height: 30rpx;
border: 1px solid #fff;
border-bottom-color: transparent;
border-right-color: transparent;
transform: rotate(315deg);
left: 40rpx;
top: 100rpx;
.befores {
position: absolute;
width: 30rpx;
height: 30rpx;
border: 1px solid #fff;
border-bottom-color: transparent;
border-right-color: transparent;
transform: rotate(315deg);
left: 40rpx;
top: 100rpx;
}
.search{
height: 80rpx;
box-sizing: border-box;
background: red;
.search {
height: 80rpx;
box-sizing: border-box;
/* background: red; */
margin-top: 110rpx;
}
.tesl{
height: calc(100% - 240rpx);
overflow: auto;
padding: 0 20rpx;
.tesl {
height: auto;
overflow: auto;
padding: 0 20rpx;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!