首页开发

This commit is contained in:
TLLJS
2023-06-12 13:32:48 +08:00
parent ec9786c910
commit 7e7246ed6b
37 changed files with 8169 additions and 197 deletions

32
miniProject/api/shop.js Normal file
View File

@@ -0,0 +1,32 @@
let http = require('../utils/request');
module.exports = {
// 获取卡片数据
getCardData(userId, params) {
return http.get(`/report/users/${userId}`, params);
},
// 获取业态客流趋势
getTrendData(userId, params) {
return http.get(`/report/users/${userId}`, params);
},
// 获取停留时长统计
getStopTimeData(userId, params) {
return http.get(`/report/users/${userId}`, params);
},
// 获取客群性别和年龄
getAgeSexData(userId, params) {
return http.get(`/report/users/${userId}`, params);
},
// 获取店铺位置,面积,天气
getShopDetailData(userId, params) {
return http.get(`/report/users/${userId}`, params);
},
getPermission(id){
return http.get(`/report/auth/api/v1/auth/users/${id}`);
},
editUserInfo(params){
return http.post(`/report/users/${params.userId}`, params);
},
editUserPwd(params){
return http.post(`/report/users/updateUser`, params);
}
}

View File

@@ -3,14 +3,16 @@
"pages/login/index",
"pages/tour/point/index",
"pages/tour/titem/index",
"pages/home/index",
"pages/homes/index",
"pages/tour/list/index",
"pages/tour/gate/index",
"pages/tour/webview/index",
"pages/tour/index/index",
"pages/index/index",
"pages/me/index",
"pages/editPwd/editPwd"
"pages/editPwd/editPwd",
"pages/shopSelect/index",
"pages/accountHome/index"
],
"subPackages": [
{
@@ -46,16 +48,16 @@
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"pagePath": "pages/accountHome/index",
"iconPath": "images/home.png",
"selectedIconPath": "images/home-b.png",
"text": "首页"
"text": "集团首页"
},
{
"pagePath": "pages/home/index",
"pagePath": "pages/homes/index",
"iconPath": "images/cong.png",
"selectedIconPath": "images/cong-b.png",
"text": "工作台"
"text": "店铺首页"
},
{
"pagePath": "pages/me/index",

View File

@@ -59,8 +59,8 @@ Component({
},
setOption:function(option = this.data.chartData){
if(chartInstance[this.data.chartId]&&option){
chartInstance[this.data.chartId].clear();
chartInstance[this.data.chartId].setOption(option);
chartInstance[this.data.chartId].clear();
chartInstance[this.data.chartId].setOption(option,true);
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,31 @@
<template name="wxSortPickerView">
<scroll-view class="wxSortPickerViewList" scroll-y="true" style="height: {{wxSortPickerData.view.scrollHeight}}px;" bindscrolltoupper="wxSortPickerViewUpper" bindscrolltolower="wxSortPickerViewLower" bindscroll="wxSortPickerViewScroll" scroll-with-animation="true" scroll-into-view="{{wxSortPickerData.wxSortPickerViewtoView}}" >
<!-- scroll-top="{{wxSortPickerData.wxSortPickerViewScrollTop}}" -->
<!--<view animation="{{wxSortPickerData.animationData}}" class="wxSortPickerViewList">-->
<!--<view class="wxSortPickerViewTag wxSortPickerViewFixedTag">{{wxSortPickerData.nowTag}}</view>-->
<block wx:for="{{wxSortPickerData.textData}}" wx:for-item="item" wx:for-index="idx" wx:key="idx">
<view id="{{item.tag}}" class="wxSortPickerViewTag">{{item.tag}}</view>
<template is="wxSortPickerViewItem" data="{{item}}"/>
</block>
<!--</view>-->
</scroll-view>
<template is="wxSortPickerViewTemTags"/>
</template>
<template name="wxSortPickerViewItem">
<block wx:for="{{item.textArray}}" wx:for-item="child" wx:key="child">
<view class="wxSortPickerViewItem" data-text="{{child}}" bindtap = "wxSortPickerViewItemTap">
<text>{{child}}</text>
</view>
</block>
</template>
<template name="wxSortPickerViewTemTags">
<scroll-view style="width:20px;height: {{wxSortPickerData.windowHeight}}px;" class="wxSortPickerViewTemTags">
<block wx:for="{{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#']}}" wx:for-item="item" wx:key="item">
<view bindtap="wxSortPickerViewTemTagTap" data-tag="{{item}}" class="wxSortPickerViewTemTag">{{item}}</view>
</block>
</scroll-view>
</template>

View File

@@ -0,0 +1,33 @@
.wxSortPickerViewTemTags{
position: fixed;
top: 100px;
right: 0;
background-color: #fff;
color: cornflowerblue;
}
.wxSortPickerViewTemTag{
text-align: center;
padding: 3rpx 5rpx;
font-size: 20rpx;
}
.wxSortPickerViewFixedTag{
position: fixed;
width: 100%;
}
.wxSortPickerViewTag{
background-color: #eee;
font-size: 16px;
font-weight: bold;
color: #000;
height: 30px;
line-height: 30px;
padding: 0 5px;
}
.wxSortPickerViewItem{
height: 40px;
line-height: 40px;
border-bottom: 1px solid #eee;
margin-left: 5px;
}

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="360px" height="84px" viewBox="0 0 360 84" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>底板</title>
<defs>
<linearGradient x1="123.754461%" y1="43.7931052%" x2="0%" y2="52.9300135%" id="linearGradient-1">
<stop stop-color="#78B3FB" offset="0%"></stop>
<stop stop-color="#487EF7" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="360" height="84" rx="8"></rect>
</defs>
<g id="store" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2店铺首页" >
<g id="底板" >
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="Mask" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
<g id="shequdianpu" opacity="0.815276023" mask="url(#mask-3)" fill="#FFFFFF" fill-rule="nonzero">
<g transform="translate(255.000000, 5.000000)" id="形状" opacity="0.162566062">
<path d="M81.9459128,29.7716173 C82.7479636,31.9681491 82.7046095,34.4320219 81.6496598,36.5201722 C79.9443987,39.9016751 76.4182656,42.2716173 72.4296888,42.2716173 C66.800882,42.2716173 62.1186396,37.582311 62.1186396,31.9609237 C62.1186396,37.582311 57.4291716,42.2716173 51.8075905,42.2716173 C46.1860094,42.2716173 41.4965414,37.582311 41.4965414,31.9609237 C41.4965414,37.582311 36.8070733,42.2716173 31.1854922,42.2716173 C25.5566854,42.2716173 20.8744431,37.582311 20.8744431,31.9609237 C20.8744431,37.582311 16.184975,42.2716173 10.5633939,42.2716173 C6.58204281,42.2716173 3.06313536,39.916126 1.35064858,36.549074 C0.281247545,34.4392474 0.252344814,31.9464728 1.08329832,29.7282647 L6.79881329,14.4898254 C7.26108253,13.2660408 8.4314473,12.4551526 9.73966613,12.4522532 L73.4412843,12.4522532 C74.7563586,12.4522532 75.9341448,13.2759526 76.3893629,14.5115017 L81.9459128,29.7716173 L81.9459128,29.7716173 Z M69.806766,8.51439188 L13.1790911,8.51439188 C11.1197715,8.51439188 9.24109403,6.82364044 9.24109403,4.57653061 C9.24109403,2.51728206 10.9319038,0.826530612 13.1790911,0.826530612 L69.806766,0.826530612 C71.8660855,0.826530612 73.744763,2.51728206 73.744763,4.76439188 C73.744763,6.82364044 72.0611789,8.51439188 69.806766,8.51439188 L69.806766,8.51439188 Z M11.8640168,46.0143919 C12.2397523,46.0143919 12.6154878,46.0143919 12.9912233,45.8265306 L13.1790911,45.8265306 C13.3669588,45.8265306 13.5548266,45.8265306 13.7426943,45.6386693 C14.4941653,45.4508081 15.0577686,45.2629468 15.8020139,45.0750855 L15.8020139,64.2008081 L67.3717109,64.2008081 L67.3717109,45.0750855 C68.1231819,45.2629468 68.6867852,45.4508081 69.4310305,45.6386693 C69.6188982,45.6386693 69.806766,45.6386693 69.9946337,45.8265306 L70.1825015,45.8265306 C70.558237,45.8265306 70.9339725,46.0143919 71.309708,46.0143919 L72.6247822,46.0143919 C73.5641209,46.0143919 74.3155919,46.0143919 75.247705,45.8265306 L75.247705,71.8886693 C75.247705,73.9479179 73.5568953,75.8265306 71.309708,75.8265306 L11.8640168,75.8265306 C9.80469727,75.8265306 7.92601978,74.1357792 7.92601978,71.8886693 L7.92601978,45.8265306 C8.67749078,46.0143919 9.61682952,46.0143919 10.5489426,46.0143919 L11.8640168,46.0143919 Z"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
miniProject/images/rili.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

View File

@@ -1,121 +1 @@
@import '../common/index.wxss';
.van-cell {
background-color: var(--cell-background-color, #fff);
box-sizing: border-box;
color: var(--cell-text-color, #323233);
display: flex;
font-size: var(--cell-font-size, 14px);
line-height: var(--cell-line-height, 24px);
padding: var(--cell-vertical-padding, 10px) var(--cell-horizontal-padding, 16px);
position: relative;
width: 100%
}
.van-cell:after {
border-bottom: 1px solid #ebedf0;
bottom: 0;
box-sizing: border-box;
content: " ";
left: 16px;
pointer-events: none;
position: absolute;
right: 16px;
transform: scaleY(.5);
transform-origin: center
}
.van-cell--borderless:after {
display: none
}
.van-cell-group {
background-color: var(--cell-background-color, #fff)
}
.van-cell__label {
color: var(--cell-label-color, #969799);
font-size: var(--cell-label-font-size, 12px);
line-height: var(--cell-label-line-height, 18px);
margin-top: var(--cell-label-margin-top, 3px)
}
.van-cell__value {
color: var(--cell-value-color, #969799);
overflow: hidden;
text-align: right;
vertical-align: middle
}
.van-cell__title,
.van-cell__value {
flex: 1
}
.van-cell__title:empty,
.van-cell__value:empty {
display: none
}
.van-cell__left-icon-wrap,
.van-cell__right-icon-wrap {
align-items: center;
display: flex;
font-size: var(--cell-icon-size, 16px);
height: var(--cell-line-height, 24px)
}
.van-cell__left-icon-wrap {
margin-right: var(--padding-base, 4px)
}
.van-cell__right-icon-wrap {
color: var(--cell-right-icon-color, #969799);
margin-left: var(--padding-base, 4px)
}
.van-cell__left-icon {
vertical-align: middle
}
.van-cell__left-icon,
.van-cell__right-icon {
line-height: var(--cell-line-height, 24px)
}
.van-cell--clickable.van-cell--hover {
background-color: var(--cell-active-color, #f2f3f5)
}
.van-cell--required {
overflow: visible
}
.van-cell--required:before {
color: var(--cell-required-color, #ee0a24);
content: "*";
font-size: var(--cell-font-size, 14px);
left: var(--padding-xs, 8px);
position: absolute
}
.van-cell--center {
align-items: center
}
.van-cell--large {
padding-bottom: var(--cell-large-vertical-padding, 12px);
padding-top: var(--cell-large-vertical-padding, 12px)
}
.van-cell--large .van-cell__title {
font-size: var(--cell-large-title-font-size, 16px)
}
.van-cell--large .van-cell__value {
font-size: var(--cell-large-value-font-size, 16px)
}
.van-cell--large .van-cell__label {
font-size: var(--cell-large-label-font-size, 14px)
}
@import '../common/index.wxss';.van-cell{background-color:var(--cell-background-color,#fff);box-sizing:border-box;color:var(--cell-text-color,#323233);display:flex;font-size:var(--cell-font-size,14px);line-height:var(--cell-line-height,24px);padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);position:relative;width:100%}.van-cell:after{border-bottom:1px solid #ebedf0;bottom:0;box-sizing:border-box;content:" ";left:16px;pointer-events:none;position:absolute;right:16px;transform:scaleY(.5);transform-origin:center}.van-cell--borderless:after{display:none}.van-cell-group{background-color:var(--cell-background-color,#fff)}.van-cell__label{color:var(--cell-label-color,#969799);font-size:var(--cell-label-font-size,12px);line-height:var(--cell-label-line-height,18px);margin-top:var(--cell-label-margin-top,3px)}.van-cell__value{color:var(--cell-value-color,#969799);overflow:hidden;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{align-items:center;display:flex;font-size:var(--cell-icon-size,16px);height:var(--cell-line-height,24px)}.van-cell__left-icon-wrap{margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{color:var(--cell-right-icon-color,#969799);margin-left:var(--padding-base,4px)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{color:var(--cell-required-color,#ee0a24);content:"*";font-size:var(--cell-font-size,14px);left:var(--padding-xs,8px);position:absolute}.van-cell--center{align-items:center}.van-cell--large{padding-bottom:var(--cell-large-vertical-padding,12px);padding-top:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:var(--cell-large-label-font-size,14px)}

View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1646270540526, function(require, module, exports) {
__DEFINE__(1686272756595, function(require, module, exports) {
var isArray = Array.isArray;
@@ -62,7 +62,6 @@ module.exports = function equal(a, b) {
};
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1646270540526);
return __REQUIRE__(1686272756595);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1646270540527, function(require, module, exports) {
__DEFINE__(1686272756597, function(require, module, exports) {
module.exports = rfdc
@@ -198,7 +198,6 @@ function rfdcCircles (opts) {
}
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1646270540527);
return __REQUIRE__(1686272756597);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

View File

@@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1646270540528, function(require, module, exports) {
__DEFINE__(1686272756598, function(require, module, exports) {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define('underscore', factory) :
@@ -2049,7 +2049,6 @@ __DEFINE__(1646270540528, function(require, module, exports) {
//# sourceMappingURL=underscore-umd.js.map
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1646270540528);
return __REQUIRE__(1686272756598);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

View File

@@ -1,8 +1,62 @@
{
"name": "vion",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "vion",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@vant/weapp": "^1.10.2",
"miniprogram-computed": "^4.3.6",
"moment": "^2.29.1",
"underscore": "^1.9.2"
},
"devDependencies": {
"underscore": "^1.13.2"
}
},
"node_modules/@vant/weapp": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.10.2.tgz",
"integrity": "sha512-caqA0xQxM4lMRncFsRPPVMDdEzUBCJ4xdFXuKReXpEU3qwnVIP/WIjVDIi7mWyS7xqz8C9WfSW5JL4PrlSq31w=="
},
"node_modules/fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
},
"node_modules/miniprogram-computed": {
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/miniprogram-computed/-/miniprogram-computed-4.3.6.tgz",
"integrity": "sha512-X157D3YuX4yaC/yW6qn1zsCtLZuoaQPSj+cT9HZDiDOtrKuv51MyIHlWpnN1jihZ2N2cM7a1V6Oo7g3UJB3Fnw==",
"dependencies": {
"fast-deep-equal": "^2.0.1",
"rfdc": "^1.1.4"
}
},
"node_modules/moment": {
"version": "2.29.4",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
"engines": {
"node": "*"
}
},
"node_modules/rfdc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA=="
},
"node_modules/underscore": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz",
"integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==",
"dev": true
}
},
"dependencies": {
"@vant/weapp": {
"version": "1.10.2",
@@ -23,6 +77,11 @@
"rfdc": "^1.1.4"
}
},
"moment": {
"version": "2.29.4",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
"rfdc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",
@@ -31,7 +90,8 @@
"underscore": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz",
"integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g=="
"integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==",
"dev": true
}
}
}

View File

@@ -0,0 +1,446 @@
// pages/homes/index.js
import moment from 'moment'
import {
getMalls,
} from "../../api/login";
import {
getCardData,
getTrendData,
getStopTimeData,
getAgeSexData,
getShopDetailData
} from '../../api/shop'
Page({
/**
* 页面的初始数据
*/
data: {
currentTime: moment().format("YYYY-MM-DD"),
types: 1, //选中的时间类型
trendtypes: 1, //选中的业态趋势类型
chartData: {}, //客流趋势分析数据
chartDatastop: {}, //停留时长统计
show: false, //显示日期自定义选择
minDate: new Date(2022, 0, 1).getTime(), //自定义时间的开始日期
maxDate: new Date(2022, 11, 31).getTime(), //自定义时间的结束日期
// maxDate: new Date(2025, 11, 31).getTime(), //自定义时间的结束日期
rankData: [{name:'我婆婆呃呃呃',value:2000,percentage:80},{name:'我婆婆呃呃呃',value:2000,percentage:80},{name:'我婆婆呃呃呃',value:2000,percentage:80}],
indexVal:'PassengerFlow',
indexList: [{
name: '客流量',
val: 'PassengerFlow'
}, {
name: '过店人次',
val: 'Exposure'
}, {
name: '进店率',
val: 'IntoStoreRate'
}, {
name: '顾客人数',
val: 'CustomerNum'
},{
name: '平均停留时间',
val: 'AvgResidenceTime'
}, {
name: '深逛人数',
val: 'DeepShoppingNum'
}, {
name: '深逛率',
val: 'DeepShoppingRate'
}, {
name: '集客力',
val: 'PerAreaValue'
}],
},
// 关闭自定义日期选择
onClose() {
this.setData({
show: false
});
},
// 点击指标
clickIndex(event){
this.setData({
indexVal:event.target.dataset.val
});
},
// 点击自定义日期选择器的确定
onConfirm(event) {
const [start, end] = event.detail;
let startDate = moment(start).format("YYYY-MM-DD")
let endDate = moment(end).format("YYYY-MM-DD")
this.setData({
show: false,
currentTime: startDate + '至' + endDate
},()=>{
this.loadData()
});
},
// 点击时间选择类型触发
ClickTab(e) {
let dateType = e.target.dataset.type,
time
switch (dateType) {
case '1':
time = moment().format("YYYY-MM-DD")
break;
case '2':
time = moment().subtract(1, "days").format("YYYY-MM-DD")
break;
case '3':
time = moment().subtract(6, "days").format("YYYY-MM-DD") + '至' + moment().format("YYYY-MM-DD")
break;
case '4':
time = moment().subtract(29, "days").format("YYYY-MM-DD") + '至' + moment().format("YYYY-MM-DD")
break;
default:
this.setData({
show: true,
types: e.target.dataset.type,
})
break;
}
if (dateType != 5) {
this.setData({
types: e.target.dataset.type,
currentTime: time
},()=>{
this.loadData()
})
}
},
// 获取卡片数据
getCardList() {
// console.log(this.data.currentTime,this.data.selectId,this.data.selectName)
let startTime=this.data.currentTime,endTime=this.data.currentTime
if (this.data.currentTime.includes('至')) {
let timeArr=this.data.currentTime.split('至')
startTime=timeArr[0]
endTime=timeArr[1]
}
console.log(startTime,endTime)
getCardData().then(res => {})
},
// 获取业态客流趋势
getTrendList() {
getTrendData().then(res => {})
},
// 获取停留时长统计
getStopTimeList() {
getStopTimeData().then(res => {})
},
// 获取所有数据
loadData() {
this.getCardList()
this.getTrendList()
this.getStopTimeList()
},
//点击业态客流趋势top5中的tab触发
ClickPassageFlow(e) {
this.setData({
trendtypes: e.target.dataset.type
},()=>{
this.getTrendList()
})
},
// 返回趋势图配置项
getLineConfig(res) {
// let xasix = res.xaxis.data
// let legendList = res.series.map(item => item.name)
// let seriesList = res.series
// if (seriesList.length < 1) {
// return {
// title: {
// text: '暂无数据',
// x: 'center',
// y: 'center',
// textStyle: {
// fontSize: 16,
// fontWeight: 'normal',
// }
// }
// }
// }
return {
grid: {
top: 30,
right: 20,
bottom: 20,
left: 5,
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: "line",
lineStyle: {
color: "#444",
},
},
formatter: function (params) {
let html = ''
params.forEach(item => {
html += item.axisValue + '\n' + item.seriesName + ': ' + item.value
})
return html
}
},
xAxis: {
axisLabel: {
color: '#8C8D95'
},
boundaryGap: false,
axisTick: {
show: true
},
axisLine: {
lineStyle: {
color: 'rgba(140,141,149,0.35)',
width: 1
}
},
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
},
yAxis: {
type: 'value',
axisLabel: {
color: '#8C8D95',
formatter: function (value, index) {
if (value >= 10000 && value < 1000000) {
value = value / 10000 + "万";
} else if (value >= 1000000) {
value = value / 1000000 + "百万";
}
return value;
},
},
axisTick: {
show: true,
},
axisLine: {
show: false,
},
splitLine: {
show: false
}
},
color: ['#FD8C5E', '#6FD3FF', '#BC7FF8', '#4F75FF', '#FF9AC1'],
// series:seriesList.map(item=>({...item,symbol: 'none',smooth: true,}))
series: [{
name: '客流量',
smooth: true,
lineStyle: {
color: '#34BFFF'
},
areaStyle: {
// 区域颜色
color: {
type: 'linear',
x: 0, //右
y: 0, //下
x2: 0, //左
y2: 1, //上
colorStops: [{
offset: 0.1,
color: '#EAF3FF' // 0% 处的颜色
},
{
offset: 1,
color: '#FFFFFF' // 100% 处的颜色
}
]
},
},
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: "line",
symbol: "none",
showSymbol: false,
symbolSize: 20,
}]
}
},
// 返回停留时长配置
getStopTimeConfig(confingData) {
let data_sample = [
["type", "停留时长", ''],
["进样", 50, 200],
["离心", 10, 200],
["去盖", 30, 200],
["侧轨", 15, 200],
["侧轨1", 15, 200],
["侧轨2", 15, 200],
["侧轨3", 15, 200],
["出样", 18, 200]
];
// let data_sample = [];
// confingData.xaxis.data.forEach((item, i) => {
// let arr = [];
// arr[0] = item;
// arr[1] = confingData.series[0].data[i];
// arr[2] = 100;
// data_sample.push(arr);
// });
// data_sample.unshift(["type", confingData.title, ""]);
return {
color: ["#33CCFF", "#CCEEFF"],
legend: {
show: false
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
top: "10px",
containLabel: true
},
xAxis: {
type: "value",
// boundaryGap: [0, 0.01],
axisLine: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: false
}
},
yAxis: {
type: "category",
inverse: true,
axisLine: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
}
},
dataset: {
source: data_sample
},
series: [{
name: "停留时长",
type: "bar",
barWidth: "40%",
label: {
show: true,
formatter: function (params) {
return params.data[1] + "%";
},
position: ["102%", "0%"]
},
itemStyle: {
color: "#679BFF"
},
z: 3 //让实时在总计上面
},
{
name: "",
type: "bar",
barWidth: "40%",
itemStyle: {
color: "#F5F7F9"
},
barGap: "-100%"
}
]
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
// getMalls({
// url: '/report/malls',
// accountId: wx.getStorageSync('accountId')
// }).then((res) => {
// this.setData({
// shopList: res.data,
// selectName: res.data[0] && res.data[0].name,
// selectId: res.data[0] && res.data[0].id,
// columnsListName: res.data && res.data.map(item => item.name)
// }, () => {
// wx.setStorageSync('shopName', res.data[0] && res.data[0].name)
// this.loadData()
// })
// })
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
setTimeout(() => {
// console.log(8888)
this.setData({
chartData:this.getLineConfig() , //客流趋势分析数据
chartDatastop: this.getStopTimeConfig(),
selectName:wx.getStorageSync('accountName')
})
}, 2000)
// if (wx.getStorageSync('shopName')&&this.data.shopList.length>0) {
// let selectId = this.data.shopList.find(item => item.name == wx.getStorageSync('shopName')).id
// this.setData({
// selectName: wx.getStorageSync('shopName'),
// selectId
// }, () => {
// this.loadData()
// })
// }
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,10 @@
{
"usingComponents": {
"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"
}
}

View File

@@ -0,0 +1,92 @@
<!--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">{{selectName}}</view>
<view class="shop_time">
<text>开业门店总数254个</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">客流趋势分析</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>
<basic chartId='chartDatastop' chartData="{{chartDatastop}}" height="500rpx"></basic>
</view>
<!-- 门店排行 -->
<view class="keliuliang" style="margin-top:30rpx;">
<text class="title_chart">门店排行</text>
<view style="margin-top:20rpx"></view>
<van-grid class="indexList" column-num="4" gutter='{{5}}'>
<van-grid-item bindtap="clickIndex" data-val="{{item.val}}" custom-class="desc_info" content-class="{{indexVal==item.val?'desc_content_active':'desc_content'}}" text-class="{{indexVal==item.val?'desc_text_active':'desc_text'}}" text="{{item.name}}" wx:for="{{ indexList }}" wx:for-item="item" wx:key="{{item.val}}" />
</van-grid>
<view class="list">
<view class="item" wx:for="{{rankData}}" wx:for-item="item" wx:key="index">
<view class="info">
<view class="shopName ~ellipsis">
<text class="idx color">{{index*1+1+''+item.name}}</text>
</view>
<view class="num color">
{{item.value}}
</view>
</view>
<view class="progress progressCustom">
<view class="bar">
<van-progress show-pivot="{{false}}" percentage="{{item.percentage}}" stroke-width="10" />
</view>
</view>
</view>
</view>
</view>
<!-- 自定义时间选择器 -->
<van-calendar show="{{ show }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" bind:close="onClose" color="#447bff" bind:confirm="onConfirm" type='range' />
</view>

View File

@@ -0,0 +1,281 @@
/* 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;
}
.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;
}
.indexList {
/* margin-bottom: 20rpx;
margin-top: 20rpx; */
}
.indexList .desc_content {
padding: 0 !important;
border: 2rpx solid #DCDFE6;
border-radius: 100rpx;
}
.indexList .desc_info {
height: 50rpx;
margin-bottom: 10rpx;
border-radius: 100rpx;
}
.indexList .desc_info:nth-child(4) {
margin-right: 0 !important;
}
.indexList .desc_text {
margin-bottom: 8px;
font-size: 24rpx;
}
.indexList .desc_content_active {
padding: 0 !important;
/* border: 2rpx solid#447BFF; */
background-color: #447BFF;
border-radius: 100rpx;
}
.indexList .desc_text_active {
margin-bottom: 8px;
font-size: 25rpx;
color: #fff;
}
.van-hairline--surround::after {
border: none
}
.van-hairline--bottom::after,
.van-hairline--left::after,
.van-hairline--right::after,
.van-hairline--surround::after,
.van-hairline--top-bottom::after,
.van-hairline--top::after,
.van-hairline::after {
border: none !important
}
.list {
position: relative;
padding-top: 20rpx;
}
.list .item {
position: relative;
padding: 10rpx 0;
border-bottom: 1rpx solid #fafafa;
}
.list .item .info {
display: flex;
justify-content: space-between;
font-size: 24rpx;
}
.list .item .shopName {
color: rgba(0, 0, 0, 0.85);
}
.list .item .shopName .idx {
margin-right: 5rpx;
}
.list .item .progress {
padding: 10rpx 0rpx;
display: flex;
align-items: center;
}
.list .item .progress .bar {
width: 100%;
position: relative;
}
.list .item .num {
color: #4C83FF;
/* width:100rpx; */
text-align: right;
font-size: 28rpx;
font-weight: 900;
}

View File

@@ -0,0 +1,693 @@
// pages/homes/index.js
import moment from 'moment'
import {
getMalls,
} from "../../api/login";
import {
getCardData,
getTrendData,
getStopTimeData,
getAgeSexData,
getShopDetailData
} from '../../api/shop'
Page({
/**
* 页面的初始数据
*/
data: {
currentTime: moment().format("YYYY-MM-DD"),
types: 1, //选中的时间类型
trendtypes: 1, //选中的业态趋势类型
chartData: {}, //客流趋势分析数据
chartDatastop: {}, //停留时长统计
chartDataSex: {}, //客群性别占比
chartDataAge: {}, //客群年龄占比
show: false, //显示日期自定义选择
minDate: new Date(2022, 0, 1).getTime(), //自定义时间的开始日期
maxDate: new Date(2022, 11, 31).getTime(), //自定义时间的结束日期
// maxDate: new Date(2025, 11, 31).getTime(), //自定义时间的结束日期
shopList: [
// {
// id: 1,
// name: '小米'
// }, {
// id: 2,
// name: '华为'
// }
], //店铺列表数据
selectId: '', //选中的店铺id
selectName: '', //选中店铺名字
columnsListName: [], //店铺的名字下拉列表
},
// 关闭自定义日期选择
onClose() {
this.setData({
show: false
});
},
// 跳转到店铺选择
selectContent() {
wx.navigateTo({
url: '/pages/shopSelect/index?current=' + JSON.stringify(this.data.columnsListName),
})
},
// 点击自定义日期选择器的确定
onConfirm(event) {
const [start, end] = event.detail;
let startDate = moment(start).format("YYYY-MM-DD")
let endDate = moment(end).format("YYYY-MM-DD")
this.setData({
show: false,
currentTime: startDate + '至' + endDate
},()=>{
this.loadData()
});
},
// 点击时间选择类型触发
ClickTab(e) {
let dateType = e.target.dataset.type,
time
switch (dateType) {
case '1':
time = moment().format("YYYY-MM-DD")
break;
case '2':
time = moment().subtract(1, "days").format("YYYY-MM-DD")
break;
case '3':
time = moment().subtract(6, "days").format("YYYY-MM-DD") + '至' + moment().format("YYYY-MM-DD")
break;
case '4':
time = moment().subtract(29, "days").format("YYYY-MM-DD") + '至' + moment().format("YYYY-MM-DD")
break;
default:
this.setData({
show: true,
types: e.target.dataset.type,
})
break;
}
if (dateType != 5) {
this.setData({
types: e.target.dataset.type,
currentTime: time
},()=>{
this.loadData()
})
}
},
// 获取卡片数据
getCardList() {
// console.log(this.data.currentTime,this.data.selectId,this.data.selectName)
let startTime=this.data.currentTime,endTime=this.data.currentTime
if (this.data.currentTime.includes('至')) {
let timeArr=this.data.currentTime.split('至')
startTime=timeArr[0]
endTime=timeArr[1]
}
console.log(startTime,endTime)
getCardData().then(res => {})
},
// 获取业态客流趋势
getTrendList() {
getTrendData().then(res => {})
},
// 获取停留时长统计
getStopTimeList() {
getStopTimeData().then(res => {})
},
// 获取性别和年龄
getAgeSexList() {
getAgeSexData().then(res => {})
},
// 获取性别和年龄
getShopDetailList() {
getShopDetailData().then(res => {})
},
// 获取所有数据
loadData() {
this.getCardList()
this.getTrendList()
this.getStopTimeList()
this.getAgeSexList()
this.getShopDetailList()
},
//点击业态客流趋势top5中的tab触发
ClickPassageFlow(e) {
this.setData({
trendtypes: e.target.dataset.type
},()=>{
this.getTrendList()
})
},
// 返回趋势图配置项
getLineConfig(res) {
// let xasix = res.xaxis.data
// let legendList = res.series.map(item => item.name)
// let seriesList = res.series
// if (seriesList.length < 1) {
// return {
// title: {
// text: '暂无数据',
// x: 'center',
// y: 'center',
// textStyle: {
// fontSize: 16,
// fontWeight: 'normal',
// }
// }
// }
// }
return {
grid: {
top: 30,
right: 20,
bottom: 20,
left: 5,
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: "line",
lineStyle: {
color: "#444",
},
},
formatter: function (params) {
let html = ''
params.forEach(item => {
html += item.axisValue + '\n' + item.seriesName + ': ' + item.value
})
return html
}
},
xAxis: {
axisLabel: {
color: '#8C8D95'
},
boundaryGap: false,
axisTick: {
show: true
},
axisLine: {
lineStyle: {
color: 'rgba(140,141,149,0.35)',
width: 1
}
},
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
},
yAxis: {
type: 'value',
axisLabel: {
color: '#8C8D95',
formatter: function (value, index) {
if (value >= 10000 && value < 1000000) {
value = value / 10000 + "万";
} else if (value >= 1000000) {
value = value / 1000000 + "百万";
}
return value;
},
},
axisTick: {
show: true,
},
axisLine: {
show: false,
},
splitLine: {
show: false
}
},
color: ['#FD8C5E', '#6FD3FF', '#BC7FF8', '#4F75FF', '#FF9AC1'],
// series:seriesList.map(item=>({...item,symbol: 'none',smooth: true,}))
series: [{
name: '客流量',
smooth: true,
lineStyle: {
color: '#34BFFF'
},
areaStyle: {
// 区域颜色
color: {
type: 'linear',
x: 0, //右
y: 0, //下
x2: 0, //左
y2: 1, //上
colorStops: [{
offset: 0.1,
color: '#EAF3FF' // 0% 处的颜色
},
{
offset: 1,
color: '#FFFFFF' // 100% 处的颜色
}
]
},
},
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: "line",
symbol: "none",
showSymbol: false,
symbolSize: 20,
}]
}
},
// 返回停留时长配置
getStopTimeConfig(confingData) {
let data_sample = [
["type", "停留时长", ''],
["进样", 50, 200],
["离心", 10, 200],
["去盖", 30, 200],
["侧轨", 15, 200],
["侧轨1", 15, 200],
["侧轨2", 15, 200],
["侧轨3", 15, 200],
["出样", 18, 200]
];
// let data_sample = [];
// confingData.xaxis.data.forEach((item, i) => {
// let arr = [];
// arr[0] = item;
// arr[1] = confingData.series[0].data[i];
// arr[2] = 100;
// data_sample.push(arr);
// });
// data_sample.unshift(["type", confingData.title, ""]);
return {
color: ["#33CCFF", "#CCEEFF"],
legend: {
show: false
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
top: "10px",
containLabel: true
},
xAxis: {
type: "value",
// boundaryGap: [0, 0.01],
axisLine: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: false
}
},
yAxis: {
type: "category",
inverse: true,
axisLine: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
}
},
dataset: {
source: data_sample
},
series: [{
name: "停留时长",
type: "bar",
barWidth: "40%",
label: {
show: true,
formatter: function (params) {
return params.data[1] + "%";
},
position: ["102%", "0%"]
},
itemStyle: {
color: "#679BFF"
},
z: 3 //让实时在总计上面
},
{
name: "",
type: "bar",
barWidth: "40%",
itemStyle: {
color: "#F5F7F9"
},
barGap: "-100%"
}
]
};
},
// 返回客群性别占比配置
getGroupSexConfig(confingData) {
let faceGender = {
"title": "人脸性别统计",
"series": [{
"name": "人脸性别统计",
"data": [{
"name": "男",
"value": 85
},
{
"name": "女",
"value": 262
}
],
"type": "pie"
}]
}
let seriesData = faceGender.series[0].data;
let sexLabel = faceGender.series[0].data.map(item => item.name);
let number = faceGender.series[0].data.map(item => item.value);
let sum = number[0] * 1 + number[1] * 1;
let rate = faceGender.series[0].data.map(item =>
((item.value / sum) * 100).toFixed(2)
);
if (rate[0] == "NaN" || rate[1] == "NaN") {
rate = [0, 0];
}
return {
color: ["#FF8383", "#70AAFB"],
grid: {
top: "15%",
left: 20,
right: "1%",
bottom: 5
},
legend: [{
orient: "vertical",
top: "center",
icon: "circle",
right: 10,
textStyle: {
color: "#000",
fontSize: 14
},
data: sexLabel,
formatter: function (name) {
for (var i = 0; i < sexLabel.length; i++) {
if (sexLabel[i] == name) {
return name + " " + " " + rate[i] + "%";
}
}
}
}],
series: [{
name: "需求类型占比",
type: "pie",
center: ["30%", "50%"],
radius: ["36%", "70%"],
showEmptyCircle: true,
itemStyle: {
// normal: {
// borderColor: "#050e31",
// borderWidth: 2
// }
},
label: {
normal: {
show: false,
position: "inside",
// color: "rgba(255, 255, 255, 0.8)",
color: "#000",
// formatter: "{value|{c}}",
formatter: function (params) {
return params.name + "\n" + params.percent + "%";
}
// rich: {
// value: {
// fontSize: 20,
// color: "#000",
// },
// },
}
},
labelLine: {
show: false,
length: 0,
length2: 0
},
data: seriesData
}]
};
},
// 返回客群年龄占比
getAgeConfig(configData) {
let faceAge = {
"title": "人脸年龄统计",
"series": [{
"name": "少年(18岁以内)",
"data": [
7,
21
],
"type": "bar"
},
{
"name": "青年(19-35岁)",
"data": [
54,
193
],
"type": "bar"
},
{
"name": "中年(36-55岁)",
"data": [
20,
45
],
"type": "bar"
},
{
"name": "老年(55岁以上)",
"data": [
4,
3
],
"type": "bar"
}
],
"xaxis": {
"data": [
"男",
"女"
]
}
}
let xdata = faceAge.series.map(item => item.name);
let ydatas = faceAge.series.map(item => {
return item.data[0] * 1 + item.data[1] * 1;
});
let sums = ydatas.reduce((pre, item) => pre + item, 0);
let ydata = ydatas.map(item => ((item / sums) * 100).toFixed(2));
return {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
},
formatter: function (params) {
let html = ''
params.forEach(item => {
html += item.axisValue + '\n' + ' ' + item.value
})
return html
},
transitionDuration: 0
},
grid: {
top: "10%",
right: "5%",
left: "10%",
bottom: "15%"
},
xAxis: [{
type: "category",
axisLabel: {
color: "#8C8D95",
},
axisLine: {
show: true,
lineStyle: {
color: "#0a3e98"
}
},
axisTick: {
show: true
},
splitLine: {
show: false,
lineStyle: {
color: "#195384",
type: "dotted"
}
},
// data: ["小西关村", "谢家井社区", "石家庄村", "大东关社区"],
data: xdata
}],
yAxis: [{
type: "value",
name: "",
min: 0,
position: "left",
nameTextStyle: {
color: "#fff",
fontSize: 11
},
axisLine: {
show: false,
lineStyle: {
color: "#0a3e98"
}
},
axisTick: {
show: true
},
splitLine: {
show: false,
lineStyle: {
color: "#0a3e98",
type: "dotted"
}
},
axisLabel: {
formatter: "{value}",
textStyle: {
color: "#8C8D95"
}
}
}],
series: [{
name: "",
type: "bar",
barWidth: 25, //柱子宽度
barGap: 0.3, //柱子之间间距
itemStyle: {
normal: {
color: '#70AAFB',
opacity: 1,
},
},
label: {
normal: {
show: true,
position: "top",
formatter: "{c}%",
color: "#8C8D95"
}
},
// data: ["104", "60", "145", "328"],
data: ydata
// animationDuration: function (idx) {
// return idx * 1500 + 1000;
// }
}]
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
getMalls({
url: '/report/malls',
accountId: wx.getStorageSync('accountId')
}).then((res) => {
this.setData({
shopList: res.data,
selectName: res.data[0] && res.data[0].name,
selectId: res.data[0] && res.data[0].id,
columnsListName: res.data && res.data.map(item => item.name)
}, () => {
wx.setStorageSync('shopName', res.data[0] && res.data[0].name)
this.loadData()
})
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
setTimeout(() => {
// console.log(8888)
this.setData({
chartData:this.getLineConfig() , //客流趋势分析数据
chartDatastop: this.getStopTimeConfig(),
chartDataSex: this.getGroupSexConfig(),
chartDataAge: this.getAgeConfig()
})
}, 2000)
if (wx.getStorageSync('shopName')&&this.data.shopList.length>0) {
let selectId = this.data.shopList.find(item => item.name == wx.getStorageSync('shopName')).id
this.setData({
selectName: wx.getStorageSync('shopName'),
selectId
}, () => {
this.loadData()
})
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {
"basic":"/components/echart/basic/index",
"van-calendar": "@vant/weapp/calendar/index"
}
}

View File

@@ -0,0 +1,81 @@
<!--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>

View File

@@ -0,0 +1,192 @@
/* 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;
}

View File

@@ -131,7 +131,8 @@ Page({
wx.setStorageSync({ data: datas[0].id, key: 'accountId' })
//wx.setStorage({ data: datas, key: 'accountList' })
wx.setStorage({ data: datas[0].name, key: 'accountName' })
wx.reLaunch({ url: '/pages/index/index' })
// wx.reLaunch({ url: '/pages/index/index' })
wx.reLaunch({ url: '/pages/homes/index' })
}
})

View File

@@ -0,0 +1,89 @@
// pages/sameProportion/sameProportion.js
import {
init,
query
} from '../../components/wxSortPickerView/wxSortPickerView'
const App = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
navHeight: App.globalData.navHeight,
value: '', //当前输入框的值
rest: [] //列表数据
},
// 搜索框的值变化时触发
onChange(event) {
// event.detail 为当前输入的值
init(this.data.rest.filter(item => item.includes(event.detail)), this)
},
// 选中店铺,出入口触发
wxSortPickerViewItemTap(e) {
wx.setStorageSync('shopName', e.currentTarget.dataset.text)
this.goBacks()
},
// 返回上一页
goBacks() {
wx.navigateBack({
delta: 1
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
rest: JSON.parse(options.current)
})
init(JSON.parse(options.current),this)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {
"van-field": "@vant/weapp/field/index"
}
}

View File

@@ -0,0 +1,17 @@
<!--pages/sameProportion/sameProportion.wxml-->
<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">请选择
<view class="befores" bindtap='goBacks'></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 File

@@ -0,0 +1,41 @@
/* 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;
}
.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;
}
.tesl{
height: calc(100% - 240rpx);
overflow: auto;
padding: 0 20rpx;
}

View File

@@ -1,58 +1,94 @@
{
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": true,
"autoAudits": true,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false,
"useStaticServer": true,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.14.4",
"appid": "wx220b5d2dbb82ce64",
"projectname": "miniProject",
"cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
}
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": true,
"autoAudits": true,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": false,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false,
"useStaticServer": true,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.14.4",
"appid": "wx220b5d2dbb82ce64",
"projectname": "miniProject",
"cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
},
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/accountHome/index",
"pathName": "pages/accountHome/index",
"scene": null
}
]
}
}
}