Commit 71155f2c by 姜雷

Merge branch 'test'

parents d4e9115f 9da4c0dc
......@@ -29,7 +29,7 @@ App({
},
globalData: {
userInfo: initUserinfo(),
token: '',
token: 'system:login:token:a1d0c6e83f027327d8461063f4ac58a61572833345204',
userRoles: [],
},
getToken: function () {
......@@ -39,6 +39,10 @@ App({
this.globalData.token = '';
this.globalData.userInfo = initUserinfo();
this.globalData.userRoles = [];
try {
wx.setStorageSync('token', '');
}
catch (error) { }
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBYUEsSUFBTSxZQUFZLEdBQUcsY0FBTSxPQUFBLENBQUM7SUFDMUIsU0FBUyxFQUFFLEVBQUU7SUFDYixPQUFPLEVBQUUsRUFBRTtJQUNYLFFBQVEsRUFBRSxFQUFFO0lBQ1osRUFBRSxFQUFFLENBQUM7SUFDTCxhQUFhLEVBQUUsQ0FBQztJQUNoQixhQUFhLEVBQUUsQ0FBQztJQUNoQixhQUFhLEVBQUUsRUFBRTtJQUNqQixZQUFZLEVBQUUsRUFBRTtJQUNoQixVQUFVLEVBQUUsQ0FBQztJQUNiLElBQUksRUFBRSxFQUFFO0lBQ1IsU0FBUyxFQUFFLENBQUM7SUFDWixXQUFXLEVBQUUsRUFBRTtJQUNmLEtBQUssRUFBRSxFQUFFO0lBQ1QsUUFBUSxFQUFFLEVBQUU7Q0FDYixDQUFDLEVBZnlCLENBZXpCLENBQUM7QUFDSCxHQUFHLENBQVM7SUFDVixRQUFRO1FBQ04sT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUMzQixJQUFJLENBQUM7WUFDSCxJQUFJLEtBQUssR0FBRyxFQUFFLENBQUMsY0FBYyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1lBQ3ZDLEVBQUUsQ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9uZTogJycsXG4gIGNvbW1lbnQ6ICcnLFxuICBjcmVhdGVBdDogJycsXG4gIGlkOiAwLFxuICBpc09wZW5PcGVyTG9nOiAwLFxuICBpc1NldFBhc3N3b3JkOiAwLFxuICBsYXN0TG9naW5EYXRlOiAnJyxcbiAgbG9naW5BY2NvdW50OiAnJyxcbiAgbG9naW5Db3VudDogMCxcbiAgbmFtZTogJycsXG4gIG9wZXJhdGVJZDogMCxcbiAgb3BlcmF0ZU5hbWU6ICcnLFxuICBzdGF0ZTogJycsXG4gIHVwZGF0ZUF0OiAnJyxcbn0pO1xuQXBwPElNeUFwcD4oe1xuICBvbkxhdW5jaCgpIHtcbiAgICBjb25zb2xlLmxvZygnaW4gb25MYXVuY2gnKTtcbiAgICB0cnkge1xuICAgICAgbGV0IHRva2VuID0gd3guZ2V0U3RvcmFnZVN5bmMoJ3Rva2VuJyk7XG4gICAgICBpZiAodG9rZW4pIHtcbiAgICAgICAgdGhpcy5nbG9iYWxEYXRhLnRva2VuID0gdG9rZW47XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyb3IpIHt9XG4gIH0sXG4gIGdsb2JhbERhdGE6IHtcbiAgICB1c2VySW5mbzogaW5pdFVzZXJpbmZvKCksXG4gICAgdG9rZW46ICcnLFxuICAgIHVzZXJSb2xlczogW10sXG4gIH0sXG4gIGdldFRva2VuKCkge1xuICAgIHJldHVybiB0aGlzLmdsb2JhbERhdGEudG9rZW47XG4gIH0sXG4gIHJlc2V0VXNlcmluZm8oKSB7XG4gICAgdGhpcy5nbG9iYWxEYXRhLnRva2VuID0gJyc7XG4gICAgdGhpcy5nbG9iYWxEYXRhLnVzZXJJbmZvID0gaW5pdFVzZXJpbmZvKCk7XG4gICAgdGhpcy5nbG9iYWxEYXRhLnVzZXJSb2xlcyA9IFtdO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cm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p>({
},
globalData: {
userInfo: initUserinfo(),
token: '',
token: 'system:login:token:a1d0c6e83f027327d8461063f4ac58a61572833345204',
userRoles: [],
},
getToken() {
......@@ -49,5 +49,8 @@ App<IMyApp>({
this.globalData.token = '';
this.globalData.userInfo = initUserinfo();
this.globalData.userRoles = [];
try {
wx.setStorageSync('token', '');
} catch (error) {}
},
});
<!--custom-tab-bar/index.wxml-->
<!-- custom-tab-bar/index.wxml -->
<cover-view class="custom-tab-bar">
<cover-view wx:for="{{listData}}" wx:key="index" class="custom-tab-bar-item {{checked === index?'checked':''}}" data-index="{{index}}" data-path="{{item.pagePath}}" bindtap="clickHandle">
<cover-image class="custom-tab-bar-icon" src="{{checked === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
{{item.text}}
<cover-view>{{item.text}}</cover-view>
</cover-view>
</cover-view>
\ No newline at end of file
......@@ -2,6 +2,8 @@
.custom-tab-bar {
position: fixed;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
bottom: 0;
width: 100%;
height: 96rpx;
......
"use strict";
Component({
properties: {
placeholder: {
type: String,
value: '请选择',
},
range: {
type: Array,
value: [],
observer: function (newVal) {
this.setData({ filterList: newVal });
},
},
rangeKey: {
type: String,
value: 'key',
},
value: {
type: String,
value: '',
observer: function (newVal) {
this.setData({ selected: newVal });
},
},
},
data: {
showPickerView: false,
selected: '',
selectedIndex: '',
filterList: [],
},
methods: {
inputClickHandle: function () {
this.setData({
showPickerView: !this.data.showPickerView,
});
},
innerClickHandle: function (e) {
return false;
},
maskClickHandle: function (e) {
this.setData({
showPickerView: false,
});
return false;
},
inputHandle: function (e) {
var _this = this;
var value = e.detail.value;
console.log(e, value);
var filterList = [];
if (value) {
filterList = this.data.range.filter(function (item) {
return item[_this.data.rangeKey].includes(value);
});
}
else {
filterList = this.data.range;
}
this.setData({
filterList: filterList,
});
},
bindPickerChange: function () {
var value = this.data.selected;
this.setData({
showPickerView: false,
});
this.triggerEvent('change', { value: value }, {});
},
selectedHandle: function (e) {
var value = e.currentTarget.dataset.value;
console.log(e, value);
if (this.data.selectedIndex === value) {
this.setData({
selected: '',
selectedIndex: '',
});
}
else {
this.setData({
selected: this.data.range[value].id,
selectedIndex: value,
});
}
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXJlYVNlbGVjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIkFyZWFTZWxlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLFNBQVMsQ0FBQztJQUNSLFVBQVUsRUFBRTtRQUNWLFdBQVcsRUFBRTtZQUNYLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFLEtBQUs7U0FDYjtRQUNELEtBQUssRUFBRTtZQUNMLElBQUksRUFBRSxLQUFLO1lBQ1gsS0FBSyxFQUFFLEVBQUU7WUFDVCxRQUFRLFlBQUMsTUFBTTtnQkFDYixJQUFJLENBQUMsT0FBTyxDQUFDLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUM7WUFDdkMsQ0FBQztTQUNGO1FBQ0QsUUFBUSxFQUFFO1lBQ1IsSUFBSSxFQUFFLE1BQU07WUFDWixLQUFLLEVBQUUsS0FBSztTQUNiO1FBQ0QsS0FBSyxFQUFFO1lBQ0wsSUFBSSxFQUFFLE1BQU07WUFDWixLQUFLLEVBQUUsRUFBRTtZQUNULFFBQVEsWUFBQyxNQUFNO2dCQUNiLElBQUksQ0FBQyxPQUFPLENBQUMsRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FBQztZQUNyQyxDQUFDO1NBQ0Y7S0FDRjtJQUNELElBQUksRUFBRTtRQUNKLGNBQWMsRUFBRSxLQUFLO1FBQ3JCLFFBQVEsRUFBRSxFQUFFO1FBQ1osYUFBYSxFQUFFLEVBQUU7UUFDakIsVUFBVSxFQUFFLEVBQUU7S0FDZjtJQUN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RoaXMuc2V0RGF0YSh7XG4gICAgICAgICAgc2VsZWN0ZWQ6IHRoaXMuZGF0YS5yYW5nZVt2YWx1ZV0uaWQsXG4gICAgICAgICAgc2VsZWN0ZWRJbmRleDogdmFsdWUsXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
// pages/components/AreaSelect/AreaSelect.js
Component({
properties: {
placeholder: {
type: String,
value: '请选择',
},
range: {
type: Array,
value: [],
observer(newVal) {
this.setData({ filterList: newVal });
},
},
rangeKey: {
type: String,
value: 'key',
},
value: {
type: String,
value: '',
observer(newVal) {
this.setData({ selected: newVal });
},
},
},
data: {
showPickerView: false,
selected: '',
selectedIndex: '',
filterList: [],
},
methods: {
inputClickHandle() {
this.setData!({
showPickerView: !this.data.showPickerView,
});
},
innerClickHandle(e) {
return false;
},
maskClickHandle(e) {
this.setData({
showPickerView: false,
});
return false;
},
inputHandle(e) {
const { value } = e.detail;
console.log(e, value);
let filterList = [];
if (value) {
filterList = this.data.range.filter(item =>
item[this.data.rangeKey].includes(value),
);
} else {
filterList = this.data.range;
}
this.setData({
filterList,
});
},
bindPickerChange() {
let value = this.data.selected;
this.setData!({
showPickerView: false,
});
this.triggerEvent('change', { value }, {});
},
selectedHandle(e) {
const { value } = e.currentTarget.dataset;
console.log(e, value);
if (this.data.selectedIndex === value) {
this.setData({
selected: '',
selectedIndex: '',
});
} else {
this.setData({
selected: this.data.range[value].id,
selectedIndex: value,
});
}
},
},
});
<!-- pages/components/AreaSelect/AreaSelect.wxml -->
<!-- pages/components/Select/Select.wxml -->
<view class="areaselect-input">
<!-- <picker class="areaselect-picker" mode="{{mode}}" bindchange="bindPickerChange" value="{{selected}}" range="{{range}}" range-key="{{rangeKey}}" fields="{{fields}}"> -->
<!-- </picker> -->
<view class="areaselect-picker" bindtap="inputClickHandle">
<view wx:if="{{selected}}" class="select-value">{{range[selectedIndex][rangeKey]}}</view>
<view wx:else class="select-placeholder">{{placeholder}}</view>
<image class="select-icon" src="../../../images/btn_xiala@2x.png" mode="aspectFill" />
</view>
<view class="areaselect-pickView {{showPickerView?'show':''}}" bindtap="maskClickHandle">
<view class="areaselect-pickBox {{showPickerView?'show':''}}" catchtap="innerClickHandle">
<view wx:if="{{showPickerView}}" class="areaselect-pickFilter">
<input class="areaselect-pickInput" type="text" bindconfirm="inputHandle" />
<view class="areaselect-pickBtn" bindtap="bindPickerChange">确认</view>
</view>
<view class="areaselect-list">
<view wx:for="{{filterList}}" class="areaselect-listItem {{selectedIndex === index?'selected':''}}" wx:key="{{item.id}}" data-value="{{index}}" bindtap="selectedHandle">
{{item[rangeKey]}}
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/components/AreaSelect/AreaSelect.wxss */
.areaselect-input {
box-sizing: border-box;
width: 100%;
position: relative;
border: 1rpx solid #f8f8f8;
background-color: #f8f8f8;
padding: 0 40rpx;
border-radius: 96rpx;
height: 96rpx;
line-height: 96rpx;
font-size: 28rpx;
}
.areaselect-input:hover,
.areaselect-input:focus {
border-color: #6895fe;
}
.select-placeholder {
color: #999;
}
.select-value {
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 85%;
}
.select-icon {
position: absolute;
width: 44rpx;
height: 44rpx;
right: 40rpx;
top: 26rpx;
}
.areaselect-pickView {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 0;
height: 0;
background-color: rgba(0, 0, 0, 0.41);
z-index: 100;
}
.areaselect-pickView.show {
width: 100%;
height: 100%;
}
.areaselect-pickBox {
position: absolute;
box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
bottom: 0;
background-color: #fff;
width: 100%;
height: 0;
transition: height 0.28s;
border-radius: 40rpx 40rpx 0 0;
display: flex;
flex-direction: column;
}
.areaselect-pickBox.show {
height: 70%;
}
.areaselect-pickFilter {
display: flex;
padding: 40rpx 40rpx 0;
}
.areaselect-pickInput {
flex: 1;
}
.areaselect-pickBtn {
color: #6895fe;
margin-left: 20rpx;
}
.areaselect-list {
flex: 1;
padding: 40rpx 0;
overflow-y: auto;
}
.areaselect-listItem {
line-height: 100rpx;
font-size: 28rpx;
color: #333;
padding: 0 80rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.areaselect-listItem.selected {
background-color: #f0f5ff;
}
/* pages/components/Select/Select.wxss */
.select-input {
box-sizing: border-box;
width: 100%;
position: relative;
border: 1rpx solid #f8f8f8;
background-color: #f8f8f8;
......@@ -18,6 +20,10 @@
}
.select-value {
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 85%;
}
.select-icon {
position: absolute;
......
{
"navigationBarTitleText": "反馈处理",
"usingComponents": {
"c-select": "../components/Select/Select",
"area-select": "../components/AreaSelect/AreaSelect",
"feedback-item": "../components/FeedbackItem/FeedbackItem"
}
}
......@@ -61,7 +61,7 @@ Page({
const { value } = e.detail;
this.setData!(
{
areaId: this.data.areaList[value].id,
areaId: value,
},
() => {
this.initData();
......
<!-- miniprogram/pages/feedback/feedback.wxml -->
<view class="container feedback">
<view class="feedback-area">
<c-select mode="selector" range="{{areaList}}" range-key="{{'areaName'}}" bindchange="bindPickerChange" placeholder="所属区域选择" />
<area-select range="{{areaList}}" range-key="{{'areaName'}}" bindchange="bindPickerChange" placeholder="所属区域选择" />
</view>
<view class="feedback-tabbar">
<view bind:tap="toggleList" data-tabIndex="{{1}}" class="feedback-tabItem {{tabIndex===1?'checked':''}}">
......
......@@ -7,11 +7,6 @@ Component({
attached() {
console.log('in show ', this.data.fetched);
!this.data.fetched && this.fetchRechargeData();
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 0,
});
}
},
},
/**
......
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "月度运营分析",
"usingComponents": {
"c-select": "../components/Select/Select",
"area-select": "../components/AreaSelect/AreaSelect",
"recharge-chart": "../components/RechargeChart/RechargeChart",
"refund-chart": "../components/RefundChart/RefundChart",
"consume-chart": "../components/ConsumeChart/ConsumeChart",
......
......@@ -64,9 +64,33 @@ Page({
areaChangeHandle(val) {
console.log('areaChangeHandle', val);
const { value } = val.detail;
this.fetchList({ areaId: [value] });
this.setData!(
{
areaId: value,
},
() => {
if (value) {
this.fetchList({ areaId: [value] });
} else {
this.fetchList();
}
},
);
},
monthChangeHandle(val) {
console.log('monthChangeHandle', val);
const { value } = val.detail;
this.fetchList({ month: value });
this.setData!({
month: value,
});
},
fetchList(entity?: { areaId?: number; month?: string }) {
if (this.data.areaId) {
if (entity && entity.areaId) {
} else entity = { ...entity, areaId: [this.data.areaId] };
}
console.log(this.data.areaId, entity);
this.fetchRechargeData(entity);
this.fetchConsumeData(entity);
this.fetchServiceTypeList(entity);
......@@ -77,7 +101,6 @@ Page({
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/dailyConsumeCount',
method: 'POST',
......@@ -122,7 +145,6 @@ Page({
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/queryRechargeListDaily',
method: 'POST',
......@@ -170,7 +192,6 @@ Page({
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/serviceConsume',
method: 'POST',
......@@ -191,7 +212,6 @@ Page({
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/payTypeConsume',
method: 'POST',
......
......@@ -2,10 +2,10 @@
<view class="monthOperator">
<view class="monthOperator-filter">
<view class="monthOperator-area">
<c-select mode="selector" range="{{areaList}}" range-key="{{'areaName'}}" bindchange="areaChangeHandle" placeholder="所属区域选择" />
<area-select range="{{areaList}}" range-key="{{'areaName'}}" bindchange="areaChangeHandle" placeholder="所属区域选择" />
</view>
<view class="monthOperator-time">
<c-select mode="date" fields="month" value="{{month}}" bindchange="bindPickerChange" />
<c-select mode="date" fields="month" value="{{month}}" bindchange="monthChangeHandle" />
</view>
</view>
<view class="monthOperator-block">
......
......@@ -5,10 +5,11 @@
justify-content: space-between;
}
.monthOperator-area {
flex: 1;
width: 400rpx;
}
.monthOperator-time {
width: 250rpx;
min-width: 250rpx;
margin-left: 20rpx;
}
.monthOperator-block {
......@@ -55,6 +56,6 @@
width: 660rpx;
height: 350rpx;
}
.monthOperator-canvas.autoheight{
.monthOperator-canvas.autoheight {
height: auto;
}
\ No newline at end of file
}
......@@ -2,15 +2,6 @@
Object.defineProperty(exports, "__esModule", { value: true });
var app = getApp();
Component({
pageLifetimes: {
show: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 1,
});
}
},
},
lifetimes: {
attached: function () {
console.log(app.globalData.userInfo);
......@@ -31,7 +22,7 @@ Component({
{
name: '用户增长分析',
icon: '../../../images/btn_yonghu@2x.png',
url: '/pages/monthOperator/monthOperator',
url: '/pages/userGrowth/userGrowth',
reLaunch: false,
},
{
......@@ -41,25 +32,15 @@ Component({
reLaunch: false,
},
{
name: '服务费缴纳',
icon: '../../../images/btn_jiaona@2x.png',
url: '',
reLaunch: false,
},
{
name: '账户提现',
icon: '../../../images/btn_tixian@2x.png',
url: '',
reLaunch: false,
},
{
name: '退出登录',
icon: '../../../images/btn_Sign out@2x.png',
url: '/pages/index/index',
reLaunch: true,
},
{},
{},
],
account: 0,
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBR0EsSUFBTSxHQUFHLEdBQUcsTUFBTSxFQUFVLENBQUM7QUFDN0IsU0FBUyxDQUFDO0lB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cbiAgICAgIC8vICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5fdGl4aWFuQDJ4LnBuZycsXG4gICAgICAvLyAgIHVybDogJycsXG4gICAgICAvLyAgIHJlTGF1bmNoOiBmYWxzZSxcbiAgICAgIC8vIH0sXG4gICAgICB7XG4gICAgICAgIG5hbWU6ICfpgIDlh7rnmbvlvZUnLFxuICAgICAgICBpY29uOiAnLi4vLi4vLi4vaW1hZ2VzL2J0bl9TaWduIG91dEAyeC5wbmcnLFxuICAgICAgICB1cmw6ICcvcGFnZXMvaW5kZXgvaW5kZXgnLFxuICAgICAgICByZUxhdW5jaDogdHJ1ZSxcbiAgICAgIH0sXG4gICAgICB7fSxcbiAgICAgIHt9LFxuICAgIF0sXG4gICAgYWNjb3VudDogMCxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
......@@ -3,15 +3,6 @@ import { IMyApp } from '../../app';
// miniprogram/pages/report/report.js
const app = getApp<IMyApp>();
Component({
pageLifetimes: {
show() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 1,
});
}
},
},
lifetimes: {
attached() {
console.log(app.globalData.userInfo);
......@@ -35,7 +26,7 @@ Component({
{
name: '用户增长分析',
icon: '../../../images/btn_yonghu@2x.png',
url: '/pages/monthOperator/monthOperator',
url: '/pages/userGrowth/userGrowth',
reLaunch: false,
},
{
......@@ -44,24 +35,26 @@ Component({
url: '/pages/feedback/feedback',
reLaunch: false,
},
{
name: '服务费缴纳',
icon: '../../../images/btn_jiaona@2x.png',
url: '',
reLaunch: false,
},
{
name: '账户提现',
icon: '../../../images/btn_tixian@2x.png',
url: '',
reLaunch: false,
},
// {
// name: '服务费缴纳',
// icon: '../../../images/btn_jiaona@2x.png',
// url: '',
// reLaunch: false,
// },
// {
// name: '账户提现',
// icon: '../../../images/btn_tixian@2x.png',
// url: '',
// reLaunch: false,
// },
{
name: '退出登录',
icon: '../../../images/btn_Sign out@2x.png',
url: '/pages/index/index',
reLaunch: true,
},
{},
{},
],
account: 0,
},
......
......@@ -13,7 +13,7 @@
<view class="report-header-userImg">
</view>
</view>
<view class="report-header-account">
<!-- <view class="report-header-account">
<view class="report-header-accountItem">
<view class="report-header-accountItemTitle">账户余额</view>
<view class="report-header-accountItemValue">10000</view>
......@@ -26,7 +26,7 @@
<view class="report-header-accountItemTitle">代缴服务费</view>
<view class="report-header-accountItemValue">10000</view>
</view>
</view>
</view> -->
<view class="report-header-bottom"></view>
</view>
<view class="report-nav">
......
......@@ -3,6 +3,7 @@
"usingComponents": {
"user-grouth-chart": "../components/UserGrouthChart/UserGrouthChart",
"user-activity-chart": "../components/UserActivityChart/UserActivityChart",
"area-select": "../components/AreaSelect/AreaSelect",
"c-select": "../components/Select/Select"
}
}
......@@ -44,16 +44,23 @@ Page({
console.log(err);
});
},
fetchList(entity?: { areaId?: number; month?: string }) {
fetchList(entity?: { areaId?: number; monthString?: string }) {
if (this.data.areaId) {
if (entity && entity.areaId) {
} else entity = { ...entity, areaId: this.data.areaId };
}
this.fetchUserData(entity);
},
fetchUserData(entity) {
let monthString =
entity && entity.monthString ? entity.monthString : this.data.month;
const [year, month] = monthString.split('-');
let reqBody = {
year: this.data.month.slice(0, 4),
year,
month,
isAdmin: 1,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/queryReportList',
data: reqBody,
......@@ -71,7 +78,7 @@ Page({
let oList = dayVos;
for (let index = 0; index < oList.length; index++) {
const element = oList[index];
let daysIndex = element.completeAt.slice(-2);
let daysIndex = element.days.slice(-2);
dayList[daysIndex] = {
...dayList[daysIndex],
count: element.count,
......@@ -89,5 +96,28 @@ Page({
console.log(err);
});
},
areaChangeHandle() {},
areaChangeHandle(val) {
console.log('areaChangeHandle', val);
const { value } = val.detail;
this.setData!(
{
areaId: value,
},
() => {
if (value) {
this.fetchList({ areaId: value });
} else {
this.fetchList();
}
},
);
},
monthChangeHandle(val) {
console.log('monthChangeHandle', val);
const { value } = val.detail;
this.fetchList({ monthString: value });
this.setData!({
month: value,
});
},
});
......@@ -16,10 +16,10 @@
</view>
<view class="userGrowth-filter">
<view class="userGrowth-area">
<c-select mode="selector" range="{{areaList}}" range-key="{{'areaName'}}" bindchange="areaChangeHandle" placeholder="所属区域选择" />
<area-select range="{{areaList}}" range-key="{{'areaName'}}" bindchange="areaChangeHandle" placeholder="所属区域选择" />
</view>
<view class="userGrowth-time">
<c-select mode="date" fields="month" value="{{month}}" bindchange="bindPickerChange" />
<c-select mode="date" fields="month" value="{{month}}" bindchange="monthChangeHandle" />
</view>
</view>
<view class="userGrowth-block">
......
......@@ -20,7 +20,7 @@
justify-content: space-between;
}
.userGrowth-area {
flex: 1;
width: 400rpx;
}
.userGrowth-time {
width: 250rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment