mirror of
http://git.keliuyun.com:55676/jiaxiuc123/miniProject.git
synced 2025-12-24 12:38:07 +08:00
自定义tabbar
This commit is contained in:
@@ -1,93 +1,68 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/login/index",
|
||||
"pages/tour/point/index",
|
||||
"pages/tour/titem/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/shopSelect/index",
|
||||
"pages/accountHome/index"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pages/zong",
|
||||
"name": "zong",
|
||||
"pages": [
|
||||
"basic/index",
|
||||
"condition/index",
|
||||
"contrast/index",
|
||||
"entry-rate/index",
|
||||
"holiday-comparison/index",
|
||||
"ranking/index",
|
||||
"selectFollr/index",
|
||||
"selectGate/index",
|
||||
"selectMall/index",
|
||||
"selectZone/index",
|
||||
"sequential/index",
|
||||
"timeTravel/index"
|
||||
]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "Weixin",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#8181A5",
|
||||
"selectedColor": "#0069FF",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"custom": true,
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/accountHome/index",
|
||||
"iconPath": "images/home.png",
|
||||
"selectedIconPath": "images/home-b.png",
|
||||
"text": "集团首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/homes/index",
|
||||
"iconPath": "images/cong.png",
|
||||
"selectedIconPath": "images/cong-b.png",
|
||||
"text": "店铺首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/me/index",
|
||||
"iconPath": "images/me.png",
|
||||
"selectedIconPath": "images/me-b.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"useExtendedLib": {
|
||||
"weui": true
|
||||
},
|
||||
"usingComponents": {
|
||||
"navbar2": "/components/navbar2/index",
|
||||
"malllist": "/components/mallList/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"arrow": "/components/arrow/index",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-row": "@vant/weapp/row/index",
|
||||
"van-col": "@vant/weapp/col/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-collapse": "@vant/weapp/collapse/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item/index",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-field": "@vant/weapp/field/index"
|
||||
},
|
||||
"lazyCodeLoading": "requiredComponents",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
"pages": [
|
||||
"index/index",
|
||||
"index/index2",
|
||||
"index/me",
|
||||
"pages/login/index",
|
||||
"pages/homes/index",
|
||||
"pages/editPwd/editPwd",
|
||||
"pages/shopSelect/index"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "Weixin",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#8181A5",
|
||||
"selectedColor": "#0069FF",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"custom": true,
|
||||
"list": [{
|
||||
"pagePath": "index/index",
|
||||
"iconPath": "images/home.png",
|
||||
"selectedIconPath": "images/home-b.png",
|
||||
"text": "集团首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "index/index2",
|
||||
"iconPath": "images/cong.png",
|
||||
"selectedIconPath": "images/cong-b.png",
|
||||
"text": "店铺首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "index/me",
|
||||
"iconPath": "images/me.png",
|
||||
"selectedIconPath": "images/me-b.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"useExtendedLib": {
|
||||
"weui": true
|
||||
},
|
||||
"usingComponents": {
|
||||
"basic":"/components/echart/basic/index",
|
||||
"navbar": "/components/navbar/index",
|
||||
"navbar2": "/components/navbar2/index",
|
||||
"malllist": "/components/mallList/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"arrow": "/components/arrow/index",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-row": "@vant/weapp/row/index",
|
||||
"van-col": "@vant/weapp/col/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-collapse": "@vant/weapp/collapse/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item/index",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-field": "@vant/weapp/field/index"
|
||||
},
|
||||
"lazyCodeLoading": "requiredComponents",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
||||
@@ -4,13 +4,14 @@ view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
page{
|
||||
background: linear-gradient(154deg, #C7D3FF 0%, #E9F9FF 48%, #FFFFFF 100%) !important;
|
||||
/* background: linear-gradient(154deg, #C7D3FF 0%, #E9F9FF 48%, #FFFFFF 100%) !important; */
|
||||
--tabs-bottom-bar-color:#1972F5;
|
||||
}
|
||||
.backgroundColor{
|
||||
padding: 0 28rpx;
|
||||
width: 100%;
|
||||
/* background: linear-gradient(154deg, #C7D3FF 0%, #E9F9FF 48%, #FFFFFF 100%); */
|
||||
background: linear-gradient(154deg, #C7D3FF 0%, #E9F9FF 48%, #FFFFFF 100%);
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
.van-picker__confirm{
|
||||
color: #000!important;
|
||||
@@ -22,7 +23,7 @@ page{
|
||||
.ellipsis{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
|
||||
.container {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,48 +1,43 @@
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
curClick: 1, // 判断当前点击的索引下标
|
||||
curClick: 1,
|
||||
color: "#7A7E83",
|
||||
selectedColor: "#3cc51f",
|
||||
list: [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"iconPath": "../images/home.png",
|
||||
"selectedIconPath": "../images/home-b.png",
|
||||
"text": "首页",
|
||||
"curr": 1
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/home/index",
|
||||
"iconPath": "../images/cong.png",
|
||||
"selectedIconPath": "../images/cong-b.png",
|
||||
"text": "工作台",
|
||||
"curr": 2
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/me/index",
|
||||
"iconPath": "../images/me.png",
|
||||
"selectedIconPath": "../images/me-b.png",
|
||||
"text": "我的",
|
||||
"curr": 3
|
||||
}
|
||||
]
|
||||
"pagePath": "/index/index",
|
||||
"iconPath": "../images/home.png",
|
||||
"selectedIconPath": "../images/home-b.png",
|
||||
"text": "集团首页",
|
||||
"curr": 1
|
||||
}, {
|
||||
"pagePath": "/index/index2",
|
||||
"iconPath": "../images/cong.png",
|
||||
"selectedIconPath": "../images/cong-b.png",
|
||||
"text": "店铺首页",
|
||||
"curr": 2
|
||||
}, {
|
||||
"pagePath": "/index/me",
|
||||
"iconPath": "../images/me.png",
|
||||
"selectedIconPath": "../images/me-b.png",
|
||||
"text": "我的",
|
||||
"curr": 3
|
||||
}]
|
||||
},
|
||||
attached:function(){
|
||||
attached() {
|
||||
let userType = wx.getStorageSync('userrole_type');
|
||||
if(userType==3){
|
||||
this.setData({
|
||||
curClick:2,
|
||||
list:[
|
||||
{
|
||||
"pagePath": "/pages/home/index",
|
||||
"pagePath": "/index/index2",
|
||||
"iconPath": "../images/cong.png",
|
||||
"selectedIconPath": "../images/cong-b.png",
|
||||
"text": "工作台",
|
||||
"curr": 2
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/me/index",
|
||||
"pagePath": "/index/me",
|
||||
"iconPath": "../images/me.png",
|
||||
"selectedIconPath": "../images/me-b.png",
|
||||
"text": "我的",
|
||||
@@ -52,18 +47,15 @@ Component({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
NavChange(e) {
|
||||
// 获取穿过来的参数
|
||||
// let curIndex = e.currentTarget.dataset.cur;
|
||||
// 获取穿过来的参数
|
||||
let path = e.currentTarget.dataset.path;
|
||||
// 更新data中值
|
||||
switchTab(e) {
|
||||
const data = e.currentTarget.dataset
|
||||
const url = data.path
|
||||
wx.switchTab({
|
||||
url: path,
|
||||
url
|
||||
})
|
||||
|
||||
},
|
||||
this.setData({
|
||||
selected: data.index
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
@@ -1,10 +1,8 @@
|
||||
<view class="tabbar_wrap">
|
||||
<block>
|
||||
<cover-view wx:for="{{list}}" wx:key="index" class="tabbar_item" bindtap="NavChange" data-cur="{{item.curr}}" data-path="{{item.pagePath}}">
|
||||
<cover-image class="img" src="{{curClick==item.curr?item.selectedIconPath:item.iconPath}}"></cover-image>
|
||||
<cover-view class="{{curClick==item.curr?'active text':'text'}}">
|
||||
{{item.text}}
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</block>
|
||||
</view>
|
||||
<!--miniprogram/custom-tab-bar/index.wxml-->
|
||||
<view class="tab-bar">
|
||||
<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>
|
||||
<view class="{{curClick === item.curr ? 'active text' : 'text'}}">{{item.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,50 +1,47 @@
|
||||
.tabbar_wrap {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
height: 110rpx;
|
||||
border-top: 1px solid #CCc;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
.tab-bar {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 110rpx;
|
||||
background: white;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.tabbar_wrap .tabbar_item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.tab-bar-border {
|
||||
background-color: rgba(0, 0, 0, 0.33);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
.tabbar_wrap .tabbar_item .img {
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
.tab-bar-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tabbar_wrap .tabbar_item .text {
|
||||
.tab-bar-item image {
|
||||
width: 27px;
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.tab-bar-item view {
|
||||
font-size: 10px;
|
||||
}
|
||||
.active.text {
|
||||
color: #597BFF;
|
||||
}
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.tabbar_wrap .tabbar_item .active {
|
||||
color: #597BFF;
|
||||
}
|
||||
|
||||
.tabbar_wrap .tabbar_item .addBtn {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
padding: 10rpx;
|
||||
background-color: #Ffffff;
|
||||
border-radius: 100rpx;
|
||||
position: absolute;
|
||||
top: -40rpx;
|
||||
}
|
||||
|
||||
.tabbar_wrap .tabbar_item .subMsg {
|
||||
font-size: 28rpx;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
BIN
miniProject/images/banner.png
Normal file
BIN
miniProject/images/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
387
miniProject/index/index.js
Normal file
387
miniProject/index/index.js
Normal file
@@ -0,0 +1,387 @@
|
||||
import {
|
||||
getCardData,
|
||||
getTrendData,
|
||||
getStopTimeData,
|
||||
getAgeSexData,
|
||||
getShopDetailData
|
||||
} from '../api/shop'
|
||||
import moment from 'moment'
|
||||
Component({
|
||||
pageLifetimes: {
|
||||
show() {
|
||||
setTimeout(() => {
|
||||
// console.log(8888)
|
||||
this.setData({
|
||||
chartData: this.getLineConfig(), //客流趋势分析数据
|
||||
chartDatastop: this.getStopTimeConfig(),
|
||||
selectName: wx.getStorageSync('accountName')
|
||||
})
|
||||
}, 1000)
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
// 当前页面的 tabBar 索引
|
||||
curClick:1
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
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'
|
||||
}],
|
||||
},
|
||||
methods: {
|
||||
// 关闭自定义日期选择
|
||||
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%"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
},
|
||||
}
|
||||
})
|
||||
14
miniProject/index/index.json
Normal file
14
miniProject/index/index.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"navbar": "/components/navbar/index",
|
||||
"basic":"/components/echart/basic/index",
|
||||
"van-calendar": "@vant/weapp/calendar/index",
|
||||
"van-progress": "@vant/weapp/progress/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-grid": "@vant/weapp/grid/index",
|
||||
"van-grid-item": "@vant/weapp/grid-item/index"
|
||||
},
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#0268FF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="~backgroundColor">
|
||||
<!-- 名称 -->
|
||||
<view class="contianer_shop">
|
||||
<image src="../../images/banner.png" class='images'></image>
|
||||
<image src="../images/banner.png" class='images'></image>
|
||||
<view class="shop_name">{{selectName}}</view>
|
||||
<view class="shop_time">
|
||||
<text>开业门店总数:254个</text>
|
||||
@@ -19,28 +19,28 @@
|
||||
<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>
|
||||
<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>
|
||||
<image src="../images/keliulaing.png" class="card_image"></image>
|
||||
<view class="cardName"> 路过客流量</view>
|
||||
<view class="cardNum"> 35480</view>
|
||||
</view>
|
||||
<view class="card_passage">
|
||||
<image src="../../images/keliuliangyellow.png" class="card_image"></image>
|
||||
<image src="../images/keliuliangyellow.png" class="card_image"></image>
|
||||
<view class="cardName"> 客流量</view>
|
||||
<view class="cardNum"> 35480</view>
|
||||
</view>
|
||||
<view class="card_passage">
|
||||
<image src="../../images/customer.png" class="card_image"></image>
|
||||
<image src="../images/customer.png" class="card_image"></image>
|
||||
<view class="cardName"> 顾客人数</view>
|
||||
<view class="cardNum"> 35480</view>
|
||||
</view>
|
||||
<view class="card_passage">
|
||||
<image src="../../images/jindianlv.png" class="card_image"></image>
|
||||
<image src="../images/jindianlv.png" class="card_image"></image>
|
||||
<view class="cardName"> 进店率</view>
|
||||
<view class="cardNum"> 35480</view>
|
||||
</view>
|
||||
@@ -1,245 +1,245 @@
|
||||
/* pages/homes/index.wxss */
|
||||
.container{
|
||||
height: 100%;
|
||||
}
|
||||
.contianer_shop {
|
||||
width: 100%;
|
||||
height: 168rpx;
|
||||
position: relative;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.images {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.shop_name {
|
||||
padding: 30rpx 0 10rpx 28rpx;
|
||||
font-size: 40rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
line-height: 56rpx;
|
||||
position: absolute;
|
||||
}
|
||||
.shop_time {
|
||||
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;
|
||||
}
|
||||
|
||||
.tab_tll .text_tltle {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.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: rgba(131, 164, 255, 0.39);
|
||||
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_passage {
|
||||
width: 48%;
|
||||
height: 148rpx;
|
||||
position: relative;
|
||||
padding: 20rpx 20rpx 0;
|
||||
font-size: 40rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.cardName{
|
||||
position: absolute;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.cardNum{
|
||||
position: absolute;
|
||||
top: 65rpx;
|
||||
}
|
||||
.card>view:nth-child(n+3) {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.card_image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 148rpx;
|
||||
}
|
||||
.keliuliang {
|
||||
width: 100%;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.keliuliang>text {
|
||||
height: 44rpx;
|
||||
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 .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;
|
||||
/* pages/homes/index.wxss */
|
||||
.container{
|
||||
height: 100%;
|
||||
}
|
||||
.contianer_shop {
|
||||
width: 100%;
|
||||
height: 168rpx;
|
||||
position: relative;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.images {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.shop_name {
|
||||
padding: 30rpx 0 10rpx 28rpx;
|
||||
font-size: 40rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
line-height: 56rpx;
|
||||
position: absolute;
|
||||
}
|
||||
.shop_time {
|
||||
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;
|
||||
}
|
||||
|
||||
.tab_tll .text_tltle {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.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: rgba(131, 164, 255, 0.39);
|
||||
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_passage {
|
||||
width: 48%;
|
||||
height: 148rpx;
|
||||
position: relative;
|
||||
padding: 20rpx 20rpx 0;
|
||||
font-size: 40rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.cardName{
|
||||
position: absolute;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.cardNum{
|
||||
position: absolute;
|
||||
top: 65rpx;
|
||||
}
|
||||
.card>view:nth-child(n+3) {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.card_image {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 148rpx;
|
||||
}
|
||||
.keliuliang {
|
||||
width: 100%;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.keliuliang>text {
|
||||
height: 44rpx;
|
||||
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 .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;
|
||||
}
|
||||
12
miniProject/index/index2.js
Normal file
12
miniProject/index/index2.js
Normal file
@@ -0,0 +1,12 @@
|
||||
Component({
|
||||
pageLifetimes: {
|
||||
show() {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
// 当前页面的 tabBar 索引
|
||||
curClick: 2
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
3
miniProject/index/index2.json
Normal file
3
miniProject/index/index2.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
miniProject/index/index2.wxml
Normal file
1
miniProject/index/index2.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<view class="intro">接口</view>
|
||||
5
miniProject/index/index2.wxss
Normal file
5
miniProject/index/index2.wxss
Normal file
@@ -0,0 +1,5 @@
|
||||
.intro {
|
||||
margin: 30px;
|
||||
text-align: center;
|
||||
padding-top: 60px
|
||||
}
|
||||
145
miniProject/index/me.js
Normal file
145
miniProject/index/me.js
Normal file
@@ -0,0 +1,145 @@
|
||||
// index/me.js
|
||||
const App = getApp();
|
||||
import basicApi from '../api/basic.js'
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
navHeight: App.globalData.navHeight,
|
||||
windowHeight: App.globalData.windowHeight,
|
||||
accountName: '',
|
||||
name: '',
|
||||
menuItems: [{
|
||||
name: '切换服务器地址',
|
||||
icon: 'position',
|
||||
}],
|
||||
userForm: {},
|
||||
rolesList: []
|
||||
},
|
||||
pageLifetimes: {
|
||||
show() {
|
||||
const name = wx.getStorageSync('name');
|
||||
const accountName = wx.getStorageSync('accountName');
|
||||
this.setData({
|
||||
name: name,
|
||||
accountName: accountName
|
||||
})
|
||||
this.getUserInfo()
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
// 当前页面的 tabBar 索引
|
||||
curClick: 3
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
All(e) {
|
||||
console.log(e)
|
||||
},
|
||||
inputBlur(e) {
|
||||
this.data.userForm.realName = e.detail
|
||||
},
|
||||
inputBlur2(e) {
|
||||
this.data.userForm.tel = e.detail
|
||||
},
|
||||
inputBlur3(e) {
|
||||
this.data.userForm.email = e.detail
|
||||
},
|
||||
getUserInfo() {
|
||||
basicApi.singleUser(wx.getStorageSync('uid')).then(res => {
|
||||
this.getRolePermission(res.data)
|
||||
})
|
||||
},
|
||||
getRolePermission(resData) {
|
||||
basicApi.getPermission(resData.unid).then(res => {
|
||||
let roles = []
|
||||
res.roles.forEach(item => {
|
||||
roles.push(item.name)
|
||||
})
|
||||
resData.roles = roles.toString()
|
||||
this.setData({
|
||||
userForm: resData
|
||||
})
|
||||
})
|
||||
},
|
||||
onSubmit(e) {
|
||||
basicApi.editUserInfo({
|
||||
userId: this.data.userForm.id,
|
||||
email: this.data.userForm.email,
|
||||
loginName: this.data.userForm.loginName,
|
||||
realName: this.data.userForm.realName,
|
||||
tel: this.data.userForm.tel,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
wx.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'success'
|
||||
})
|
||||
this.getUserInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
undatePwd() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/editPwd/editPwd'
|
||||
})
|
||||
},
|
||||
logout: () => {
|
||||
wx.getStorageInfo({
|
||||
success: (res) => {
|
||||
res.keys.forEach(item => {
|
||||
if (item !== 'name' && item !== 'password' && item !== 'requestUrl' && item !== 'baseUrl' && item !== 'deploymentType') {
|
||||
wx.removeStorage({
|
||||
key: item,
|
||||
success: function (res) {}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
},
|
||||
|
||||
goOtherPage: async function (e) {
|
||||
const {
|
||||
value
|
||||
} = e.target.dataset
|
||||
if (value.name === '切换服务器地址') {
|
||||
await wx.setStorage({
|
||||
data: 'success',
|
||||
key: 'modalShow',
|
||||
})
|
||||
wx.getStorageInfo({
|
||||
success: (res) => {
|
||||
res.keys.forEach(item => {
|
||||
if (item !== 'name' && item !== 'password' && item !== 'requestUrl' && item !== 'baseUrl' && item !== 'deploymentType' && item !== 'modalShow') {
|
||||
wx.removeStorage({
|
||||
key: item,
|
||||
success: function (res) {}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
8
miniProject/index/me.json
Normal file
8
miniProject/index/me.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"navbar": "/components/navbar/index"
|
||||
},
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#0268FF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
38
miniProject/index/me.wxml
Normal file
38
miniProject/index/me.wxml
Normal file
@@ -0,0 +1,38 @@
|
||||
<view class="container" style="height:{{windowHeight}}px">
|
||||
<navbar page-name="我的" bg-color="RGBA(213, 227, 255, 1)" navbar-color="#000">
|
||||
</navbar>
|
||||
<view class="~backgroundColor">
|
||||
<view class="header">
|
||||
<image src="../images/me/avatar.png" class="avatar" />
|
||||
<view class="name">
|
||||
<view class="username">{{name}}</view>
|
||||
<view class="company">{{accountName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zong-content">
|
||||
<van-form>
|
||||
<van-cell-group>
|
||||
<van-field value="{{userForm.realName}}" class="vanField" name="姓名" label="姓名" label-class='label' input-class='input' placeholder="姓名" bind:change='inputBlur' right-icon="edit" right-icon-class='editClass' />
|
||||
<van-field class="vanField" value="{{userForm.tel}}" name="电话号码" label-class='label' input-class='input' label="电话号码" placeholder="电话号码" bind:change='inputBlur2' right-icon="edit" right-icon-class='editClass' />
|
||||
<van-field border="{{ false }}" class="vanField" value="{{userForm.email}}" name="邮箱" label-class='label' input-class='input' label="邮箱" placeholder="邮箱" bind:change='inputBlur3' right-icon="edit" right-icon-class='editClass' />
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
</view>
|
||||
<view class="items">
|
||||
<view class="item" bindtap="undatePwd">
|
||||
<text>修改密码</text>
|
||||
<image src="../images/arrow-r.png" class="arrow" />
|
||||
</view>
|
||||
<view class="item logout" bindtap="logout">
|
||||
<text>退出登录</text>
|
||||
<image src="../images/arrow-r.png" class="arrow" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btn">
|
||||
<van-button color="#597BFF" round block type="primary" bindtap="onSubmit">提交</van-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
104
miniProject/index/me.wxss
Normal file
104
miniProject/index/me.wxss
Normal file
@@ -0,0 +1,104 @@
|
||||
/* pages/me/index.wxss */
|
||||
.header {
|
||||
width: 100%;
|
||||
height: 224rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 30rpx;
|
||||
padding: 12rpx 0rpx 0 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header .avatar {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
|
||||
.header .name {
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.header .username {
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
line-height: 40rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.header .company {
|
||||
box-sizing: border-box;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.zong-content {
|
||||
padding: 10rpx 0;
|
||||
width: 100%;
|
||||
height: 324rpx;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: rgba(0, 0, 0, 0.9) !important;
|
||||
font-size: 28rpx;
|
||||
height: 66rpx;
|
||||
line-height: 66rpx;
|
||||
/* padding: 5px; */
|
||||
}
|
||||
|
||||
.input {
|
||||
color: rgba(0, 0, 0, 0.7) !important;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.editClass{
|
||||
color: #597BFF;
|
||||
font-size: 32rpx !important;
|
||||
font-weight: 600 !important;
|
||||
right: 25rpx;
|
||||
}
|
||||
.vanField .van-field__body{
|
||||
height: 66rpx;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.items{
|
||||
margin-top: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #fff;
|
||||
padding: 5px 10rpx 5rpx 23rpx;
|
||||
}
|
||||
.items .item {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: rgba(0,0,0,0.9);
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 23rpx 0 17rpx;
|
||||
position: relative;
|
||||
border-bottom: 1rpx solid #E1E1E1;
|
||||
}
|
||||
.items .logout{
|
||||
border-width: 0;
|
||||
}
|
||||
.items .item .arrow {
|
||||
position: absolute;
|
||||
right: 38rpx;
|
||||
color: rgba(0, 0, 0, .2);
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
@@ -1,460 +0,0 @@
|
||||
// pages/homes/index.js
|
||||
const App = getApp();
|
||||
import moment from 'moment'
|
||||
import {
|
||||
getMalls,
|
||||
} from "../../api/login";
|
||||
import {
|
||||
getCardData,
|
||||
getTrendData,
|
||||
getStopTimeData,
|
||||
getAgeSexData,
|
||||
getShopDetailData
|
||||
} from '../../api/shop'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navHeight: App.globalData.navHeight,
|
||||
windowHeight: App.globalData.windowHeight,
|
||||
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'
|
||||
}],
|
||||
},
|
||||
onShow:function(){
|
||||
this.activeTabBar(1)
|
||||
},
|
||||
activeTabBar(currentMenu) {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
// 当前页面的 tabBar 索引
|
||||
curClick: currentMenu
|
||||
})
|
||||
}
|
||||
},
|
||||
// 关闭自定义日期选择
|
||||
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 () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"navbar": "/components/navbar/index",
|
||||
"basic":"/components/echart/basic/index",
|
||||
"van-calendar": "@vant/weapp/calendar/index",
|
||||
"van-progress": "@vant/weapp/progress/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-grid": "@vant/weapp/grid/index",
|
||||
"van-grid-item": "@vant/weapp/grid-item/index"
|
||||
},
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#0268FF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
@@ -44,9 +44,11 @@ Page({
|
||||
}
|
||||
const modalShow = wx.getStorageSync('modalShow');
|
||||
if (atoken) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
if(wx.getStorageSync('userrole_type')==3){
|
||||
wx.reLaunch({ url: '/index/index2' })
|
||||
}else{
|
||||
wx.reLaunch({ url: '/index/index' })
|
||||
}
|
||||
} else {
|
||||
if (!deploymentType || deploymentType === '') {
|
||||
this.setData({ modalShow: true })
|
||||
@@ -132,9 +134,9 @@ Page({
|
||||
//wx.setStorage({ data: datas, key: 'accountList' })
|
||||
wx.setStorage({ data: datas[0].name, key: 'accountName' })
|
||||
if(res.data.user.type==3){
|
||||
wx.reLaunch({ url: '/pages/home/index' })
|
||||
wx.reLaunch({ url: '/index/index2' })
|
||||
}else{
|
||||
wx.reLaunch({ url: '/pages/index/index' })
|
||||
wx.reLaunch({ url: '/index/index' })
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,11 +11,7 @@ Page({
|
||||
{
|
||||
name: '切换服务器地址',
|
||||
icon: 'position',
|
||||
},
|
||||
// {
|
||||
// name: '修改密码',
|
||||
// icon: 'password'
|
||||
// }
|
||||
}
|
||||
],
|
||||
userForm:{},
|
||||
rolesList:[]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<view class="container" style="padding-top: {{navHeight}}px;height:{{windowHeight}}px">
|
||||
<navbar page-name="我的" bg-color="" navbar-color="#000">
|
||||
<view class="container" style="height:{{windowHeight}}px">
|
||||
<navbar page-name="我的" bg-color="RGBA(213, 227, 255, 1)" navbar-color="#000">
|
||||
</navbar>
|
||||
<view class="~backgroundColor">
|
||||
<view class="header">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 40rpx;
|
||||
margin-top: 30rpx;
|
||||
padding: 12rpx 0rpx 0 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,94 +1,73 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"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": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pages/accountHome/index",
|
||||
"pathName": "pages/accountHome/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user