Commit 8c6da1a4 by 姜雷

提交页面

parent f4a8de1b
......@@ -27,8 +27,23 @@ var fetch = function (req) {
}).then(function (res) {
var _a = res.data, code = _a.code, otherkeys = __rest(_a, ["code"]);
if (code === constants_1.successCode) {
console.log(res);
if (res.header['Set-Cookie'])
return {
header: res.header,
data: otherkeys,
};
return otherkeys;
}
else if (code === constants_1.logoutode) {
app.resetUserinfo();
wx.reLaunch({
url: '/pages/index/index',
});
throw {
errMsg: res.data.msg || '网络异常',
};
}
else {
throw {
errMsg: res.data.msg || '网络异常',
......@@ -42,5 +57,11 @@ exports.systemFetch = function (req) {
exports.statisticsFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.devUrl.STATISTICS_SERVER_URL + req.url }));
};
exports.customerFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.devUrl.CUSTOMER_SERVER_URL + req.url }));
};
exports.baseFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.devUrl.BASE_SERVER_URL + req.url }));
};
exports.default = fetch;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaURBQTBEO0FBRTFELElBQU0sR0FBRyxHQUFHLE1BQU0sRUFBVSxDQUFDO0FBRTdCLElBQU0sS0FBSyxHQUFHLFVBQUMsR0FBcUI7SUFDbEMsT0FBQSxJQUFJLE9BQU8sQ0FBQyxVQUFDLE9BQU8sRUFBRSxNQUFNO1FBQzFCLElBQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDO1FBQ25DLEVBQUUsQ0FBQyxPQUFPLGNBQ0wsR0FBRyxJQUNOLE1BQU0sRUFBRSxLQUFLO2dCQUNYLENBQUMsWUFDRyxLQUFLLE9BQUEsSUFDRix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tZXJGZXRjaCA9IChyZXE6IHd4LlJlcXVlc3RPcHRpb24pID0+XG4gIGZldGNoKHsgLi4ucmVxLCB1cmw6IGRldlVybC5DVVNUT01FUl9TRVJWRVJfVVJMICsgcmVxLnVybCB9KTtcbmV4cG9ydCBjb25zdCBiYXNlRmV0Y2ggPSAocmVxOiB3eC5SZXF1ZXN0T3B0aW9uKSA9PlxuICBmZXRjaCh7IC4uLnJlcSwgdXJsOiBkZXZVcmwuQkFTRV9TRVJWRVJfVVJMICsgcmVxLnVybCB9KTtcbmV4cG9ydCBkZWZhdWx0IGZldGNoO1xuIl19
\ No newline at end of file
import { devUrl, successCode } from '../config/constants';
import { devUrl, successCode, logoutode } from '../config/constants';
import { IMyApp } from '../app';
const app = getApp<IMyApp>();
......@@ -20,7 +20,21 @@ const fetch = (req: wx.RequestOption) =>
}).then((res: wx.RequestSuccessCallbackResult) => {
const { code, ...otherkeys } = res.data;
if (code === successCode) {
console.log(res);
if (res.header['Set-Cookie'])
return {
header: res.header,
data: otherkeys,
};
return otherkeys;
} else if (code === logoutode) {
app.resetUserinfo();
wx.reLaunch({
url: '/pages/index/index',
});
throw {
errMsg: res.data.msg || '网络异常',
};
} else {
throw {
errMsg: res.data.msg || '网络异常',
......@@ -32,5 +46,8 @@ export const systemFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: devUrl.SYSTEM_SERVER_URL + req.url });
export const statisticsFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: devUrl.STATISTICS_SERVER_URL + req.url });
export const customerFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: devUrl.CUSTOMER_SERVER_URL + req.url });
export const baseFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: devUrl.BASE_SERVER_URL + req.url });
export default fetch;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var initUserinfo = function () { return ({
cellphone: '',
comment: '',
createAt: '',
id: 0,
isOpenOperLog: 0,
isSetPassword: 0,
lastLoginDate: '',
loginAccount: '',
loginCount: 0,
name: '',
operateId: 0,
operateName: '',
state: '',
updateAt: '',
}); };
App({
onLaunch: function () {
console.log('in onLaunch');
try {
var token = wx.getStorageSync('token');
if (token) {
this.globalData.token = token;
}
}
catch (error) { }
},
globalData: {
token: 'system:login:token:a1d0c6e83f027327d8461063f4ac58a61572317597980',
userInfo: initUserinfo(),
token: '',
userRoles: [],
},
getToken: function () {
return this.globalData.token;
},
resetUserinfo: function () {
this.globalData.token = '';
this.globalData.userInfo = initUserinfo();
this.globalData.userRoles = [];
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBU0EsR0FBRyxDQUFTO0lBSVYsVUFBVSxFQUFFO1FBQ1YsS0FBSyxFQUFFLGtFQUFrRTtLQUMxRTtDQUNGLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vYXBwLnRzXG5leHBvcnQgaW50ZXJmYWNlIElNeUFwcCB7XG4gIHVzZXJJbmZvUmVhZHlDYWxsYmFjaz8ocmVzOiB3eC5Vc2VySW5mbyk6IHZvaWQ7XG4gIGdsb2JhbERhdGE6IHtcbiAgICB1c2VySW5mbz86IHd4LlVzZXJJbmZvO1xuICAgIHRva2VuOiBzdHJpbmc7XG4gIH07XG59XG5cbkFwcDxJTXlBcHA+KHtcbiAgLy8gb25MYXVuY2goKSB7XG4gIC8vICAgY29uc29sZS5sb2coJ2luIG9uTGF1bmNoJyk7XG4gIC8vIH0sXG4gIGdsb2JhbERhdGE6IHtcbiAgICB0b2tlbjogJ3N5c3RlbTpsb2dpbjp0b2tlbjphMWQwYzZlODNmMDI3MzI3ZDg0NjEwNjNmNGFjNThhNjE1NzIzMTc1OTc5ODAnLFxuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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VwZGF0ZUF0OiAnJyxcbn0pO1xuQXBwPElNeUFwcD4oe1xuICBvbkxhdW5jaCgpIHtcbiAgICBjb25zb2xlLmxvZygnaW4gb25MYXVuY2gnKTtcbiAgICB0cnkge1xuICAgICAgbGV0IHRva2VuID0gd3guZ2V0U3RvcmFnZVN5bmMoJ3Rva2VuJyk7XG4gICAgICBpZiAodG9rZW4pIHtcbiAgICAgICAgdGhpcy5nbG9iYWxEYXRhLnRva2VuID0gdG9rZW47XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyb3IpIHt9XG4gIH0sXG4gIGdsb2JhbERhdGE6IHtcbiAgICB1c2VySW5mbzogaW5pdFVzZXJpbmZvKCksXG4gICAgdG9rZW46ICcnLFxuICAgIHVzZXJSb2xlczogW10sXG4gIH0sXG4gIGdldFRva2VuKCkge1xuICAgIHJldHVybiB0aGlzLmdsb2JhbERhdGEudG9rZW47XG4gIH0sXG4gIHJlc2V0VXNlcmluZm8oKSB7XG4gICAgdGhpcy5nbG9iYWxEYXRhLnRva2VuID0gJyc7XG4gICAgdGhpcy5nbG9iYWxEYXRhLnVzZXJJbmZvID0gaW5pdFVzZXJpbmZvKCk7XG4gICAgdGhpcy5nbG9iYWxEYXRhLnVzZXJSb2xlcyA9IFtdO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
......@@ -5,7 +5,8 @@
"pages/report/report",
"pages/feedback/feedback",
"pages/monthOperator/monthOperator",
"pages/homeAndReport/homeAndReport"
"pages/homeAndReport/homeAndReport",
"pages/userGrowth/userGrowth"
],
"window": {
"backgroundTextStyle": "light",
......
import { Userinfo, UserRole } from './store/user';
//app.ts
export interface IMyApp {
userInfoReadyCallback?(res: wx.UserInfo): void;
resetUserinfo: () => void;
getToken: () => string;
globalData: {
userInfo?: wx.UserInfo;
userInfo: Userinfo;
token: string;
userRoles: UserRole[];
};
}
const initUserinfo = () => ({
cellphone: '',
comment: '',
createAt: '',
id: 0,
isOpenOperLog: 0,
isSetPassword: 0,
lastLoginDate: '',
loginAccount: '',
loginCount: 0,
name: '',
operateId: 0,
operateName: '',
state: '',
updateAt: '',
});
App<IMyApp>({
// onLaunch() {
// console.log('in onLaunch');
// },
onLaunch() {
console.log('in onLaunch');
try {
let token = wx.getStorageSync('token');
if (token) {
this.globalData.token = token;
}
} catch (error) {}
},
globalData: {
token: 'system:login:token:a1d0c6e83f027327d8461063f4ac58a61572317597980',
userInfo: initUserinfo(),
token: '',
userRoles: [],
},
getToken() {
return this.globalData.token;
},
resetUserinfo() {
this.globalData.token = '';
this.globalData.userInfo = initUserinfo();
this.globalData.userRoles = [];
},
});
......@@ -9,7 +9,7 @@
box-sizing: border-box;
}
input, .input {
input {
border: 1rpx solid #f8f8f8;
background-color: #f8f8f8;
padding: 0 40rpx;
......@@ -23,7 +23,8 @@ input, .input {
color: #a9a9ad;
}
input:hover, input:focus {
input:hover,
input:focus {
border-color: #6895fe;
}
......
......@@ -3,14 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.devUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'http://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'http://ex-dev-dcxy-base-manage.168cad.top',
};
exports.testUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'http://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'http://ex-dev-dcxy-base-manage.168cad.top',
};
exports.masterUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'http://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'http://ex-dev-dcx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lzdGljcy1tYW5hZ2UuMTY4Y2FkLnRvcCcsXG4gIENVU1RPTUVSX1NFUlZFUl9VUkw6ICdodHRwOi8vZXgtZGV2LWN1c3RvbWVyLW1hbmFnZS4xNjhjYWQudG9wJyxcbiAgQkFTRV9TRVJWRVJfVVJMOiAnaHR0cDovL2V4LWRldi1kY3h5LWJhc2UtbWFuYWdlLjE2OGNhZC50b3AnLFxufTtcblxuZXhwb3J0IGNvbnN0IHN1Y2Nlc3NDb2RlID0gMTAwMDtcbmV4cG9ydCBjb25zdCBsb2dvdXRvZGUgPSAtMjtcbiJdfQ==
\ No newline at end of file
export const devUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'http://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'http://ex-dev-dcxy-base-manage.168cad.top',
};
export const testUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'http://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'http://ex-dev-dcxy-base-manage.168cad.top',
};
export const masterUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'http://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'http://ex-dev-dcxy-base-manage.168cad.top',
};
export const successCode = 1000;
export const logoutode = -2;
"use strict";
var consumeChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
consumeChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
consumeChart.source(data, {
days: {
min: 1,
max: 31,
},
});
consumeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6edb8f',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
consumeChart
.line()
.position('days*payableMoney')
.color('#6edb8f')
.shape('smooth')
.size(4);
consumeChart
.area()
.position('days*payableMoney')
.color('l(90) 0:#6edb8f 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
consumeChart.axis('payableMoney', false);
consumeChart.render();
return consumeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
consumeChart && consumeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uc3VtZUNoYXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiQ29uc3VtZUNoYXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxJQUFJLFlBQVksR0FBRyxJQUFJLENBQUM7QUFDeEIsSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFDO0FBRWYsbUJBQW1CLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUU7SUFDMUMsSUFBTSxJQUFJLEdBQUcsRUFBRSxDQUFDO0lBQ2hCLFlBQVksR0FBRyxJQUFJLEVBQUUsQ0FBQyxLQUFLLENBQUM7UUFDMUIsRUFBRSxFQUFFLE1BQU07UUFDVixLQUFLLE9BQUE7UUFDTCxNQUFNLFFBQUE7S0FDUCxDQUFDLENBQUM7SUFFSCxZQUFZLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRTtRQUN4QixJQUFJLEVBQUU7WUFDSixHQUFHLEVBQUUsQ0FBQztZQUNOLEdBQUcsRUFBRSxFQUFFO1NBQ1I7S0FDRixDQUFDLENBQUM7SUFDSCxZQUFZLENBQUMsT0FBTyx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ICB2YWx1ZTogW10sXG4gICAgICBvYnNlcnZlcihuZXdWYWwpIHtcbiAgICAgICAgY29uc3VtZUNoYXJ0ICYmIGNvbnN1bWVDaGFydC5jaGFuZ2VEYXRhKG5ld1ZhbCk7XG4gICAgICB9LFxuICAgIH0sXG4gICAgbW9udGg6IHtcbiAgICAgIHR5cGU6IFN0cmluZyxcbiAgICAgIHZhbHVlOiAnJyxcbiAgICAgIG9ic2VydmVyKG5ld1ZhbCkge1xuICAgICAgICBtb250aCA9IG5ld1ZhbDtcbiAgICAgIH0sXG4gICAgfSxcbiAgfSxcbiAgZGF0YToge1xuICAgIG9wdHM6IHtcbiAgICAgIG9uSW5pdDogaW5pdENoYXJ0LFxuICAgIH0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
\ No newline at end of file
let consumeChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
consumeChart = new F2.Chart({
el: canvas,
width,
height,
});
consumeChart.source(data, {
days: {
min: 1,
max: 31,
},
});
consumeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6edb8f',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
consumeChart
.line()
.position('days*payableMoney')
.color('#6edb8f')
.shape('smooth')
.size(4);
consumeChart
.area()
.position('days*payableMoney')
.color('l(90) 0:#6edb8f 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
consumeChart.axis('payableMoney', false);
consumeChart.render();
return consumeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
consumeChart && consumeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!--pages/components/ConsumeChart/ConsumeChart.wxml-->
<ff-canvas id="ConsumeChart" canvas-id="ConsumeChart" opts="{{ opts }}" />
/* pages/components/ConsumeChart/ConsumeChart.wxss */
\ No newline at end of file
"use strict";
var consumeCountChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
consumeCountChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
consumeCountChart.source(data, {
days: {
min: 1,
max: 31,
},
});
consumeCountChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#68d0fe',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '笔';
},
});
consumeCountChart
.line()
.position('days*payMen')
.color('#68d0fe')
.shape('smooth')
.size(4);
consumeCountChart
.area()
.position('days*payMen')
.color('l(90) 0:#68d0fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
consumeCountChart.axis('payMen', false);
consumeCountChart.render();
return consumeCountChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
consumeCountChart && consumeCountChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uc3VtZUNvdW50Q2hhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJDb25zdW1lQ291bnRDaGFydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsSUFBSSxpQkFBaUIsR0FBRyxJQUFJLENBQUM7QUFDN0IsSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFDO0FBRWYsbUJBQW1CLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUU7SUFDMUMsSUFBTSxJQUFJLEdBQUcsRUFBRSxDQUFDO0lBQ2hCLGlCQUFpQixHQUFHLElBQUksRUFBRSxDQUFDLEtBQUssQ0FBQztRQUMvQixFQ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VuJylcbiAgICAuY29sb3IoJ2woOTApIDA6IzY4ZDBmZSAxOiNmZmYnKVxuICAgIC5zaGFwZSgnc21vb3RoJylcbiAgICAuc3R5bGUoe1xuICAgICAgZmlsbE9wYWNpdHk6IDAuNixcbiAgICB9KTtcbiAgY29uc3VtZUNvdW50Q2hhcnQuYXhpcygncGF5TWVuJywgZmFsc2UpO1xuICBjb25zdW1lQ291bnRDaGFydC5yZW5kZXIoKTtcbiAgcmV0dXJuIGNvbnN1bWVDb3VudENoYXJ0O1xufVxuXG5Db21wb25lbnQoe1xuICBwcm9wZXJ0aWVzOiB7XG4gICAgZGF0YUxpc3Q6IHtcbiAgICAgIHR5cGU6IEFycmF5LFxuICAgICAgdmFsdWU6IFtdLFxuICAgICAgb2JzZXJ2ZXIobmV3VmFsKSB7XG4gICAgICAgIGNvbnN1bWVDb3VudENoYXJ0ICYmIGNvbnN1bWVDb3VudENoYXJ0LmNoYW5nZURhdGEobmV3VmFsKTtcbiAgICAgIH0sXG4gICAgfSxcbiAgICBtb250aDoge1xuICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgdmFsdWU6ICcnLFxuICAgICAgb2JzZXJ2ZXIobmV3VmFsKSB7XG4gICAgICAgIG1vbnRoID0gbmV3VmFsO1xuICAgICAgfSxcbiAgICB9LFxuICB9LFxuICBkYXRhOiB7XG4gICAgb3B0czoge1xuICAgICAgb25Jbml0OiBpbml0Q2hhcnQsXG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
// pages/components/ConsumeCountChart/ConsumeCountChart.js
let consumeCountChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
consumeCountChart = new F2.Chart({
el: canvas,
width,
height,
});
consumeCountChart.source(data, {
days: {
min: 1,
max: 31,
},
});
consumeCountChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#68d0fe',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '笔';
},
});
consumeCountChart
.line()
.position('days*payMen')
.color('#68d0fe')
.shape('smooth')
.size(4);
consumeCountChart
.area()
.position('days*payMen')
.color('l(90) 0:#68d0fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
consumeCountChart.axis('payMen', false);
consumeCountChart.render();
return consumeCountChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
consumeCountChart && consumeCountChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!--pages/components/ConsumeCountChart/ConsumeCountChart.wxml-->
<ff-canvas id="ConsumeCountChart" canvas-id="ConsumeCountChart" opts="{{ opts }}" />
/* pages/components/ConsumeCountChart/ConsumeCountChart.wxss */
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../../api/fetch");
Component({
properties: {
feedbackData: {
type: Object,
value: {
phonecall: ''
}
areaId: 0,
areaName: '',
customerId: 0,
customerName: '',
customerPhone: '',
customerSex: '',
feedbackContent: '',
id: 0,
state: '',
},
},
},
data: {},
data: {
inputValue: '',
},
methods: {
makePhoneCallHandle: function () {
console.log('in makePhoneCallHandle');
wx.makePhoneCall({
phoneNumber: this.data.feedbackData.phonecall,
phoneNumber: this.data.feedbackData.customerPhone,
success: function () {
console.log('success');
},
fail: function () {
console.log('fail');
}
},
});
}
}
},
inputHandle: function (e) {
var val = e.detail.value;
this.setData({
inputValue: val,
});
},
sendFeedback: function () {
var _this = this;
var val = this.data.inputValue;
fetch_1.customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: this.data.feedbackData.id,
replayContent: val,
state: '2',
},
})
.then(function (res) {
wx.showToast({
title: res.msg,
});
_this.triggerEvent('refresh', {});
})
.catch(function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},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blxuICAvKipcbiAgICog57uE5Lu255qE5Yid5aeL5pWw5o2uXG4gICAqL1xuICBkYXRhOiB7XG5cbiAgfSxcblxuICAvKipcbiAgICog57uE5Lu255qE5pa55rOV5YiX6KGoXG4gICAqL1xuICBtZXRob2RzOiB7XG4gICAgbWFrZVBob25lQ2FsbEhhbmRsZSgpIHtcbiAgICAgIHd4Lm1ha2VQaG9uZUNhbGwoe1xuICAgICAgICBwaG9uZU51bWJlcjogdGhpcy5kYXRhLmZlZWRiYWNrRGF0YS5waG9uZWNhbGwsXG4gICAgICAgIHN1Y2Nlc3M6ICgpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZygnc3VjY2VzcycpXG4gICAgICAgIH0sXG4gICAgICAgIGZhaWw6ICgpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZygnZmFpbCcpXG5cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gIH1cbn0pXG4iXX0=
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmVlZGJhY2tJdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiRmVlZGJhY2tJdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQW1EO0FBR25ELFNBQVMsQ0FBQztJQUlSLFVBQVUsRUFBRTtRQUNWLFlBQVksRUFBRTtZQUNaLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFO2dCQUNMLE1BQU0sRUFBRSxDQUFDO2dCQUNULFFBQVEsRUFBRSxFQUFFO2dCQUNaLFVBQVUsRUFBRSxDQUFDO2dCQUNiLFlBQVksRUFBRSxFQUFFO2dCQUNoQixhQUFhLEVBQUUsRUFBRTtnQkFDakIsV0FBVyxFQUFFLEVBQUU7Z0JBQ2YsZUFBZSxFQUFFLEVBQUU7Z0JBQ25CLEVBQUUsRUFBRSxDQUFDO2dCQUNMLEtBQUssRUFBRS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CxcbiAgICAgICAgICBzdGF0ZTogJzInLFxuICAgICAgICB9LFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2csXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoJ3JlZnJlc2gnLCB7fSk7XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaCgoZXJyOiB3eC5HZW5lcmFsQ2FsbGJhY2tSZXN1bHQpID0+IHtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IGVyci5lcnJNc2csXG4gICAgICAgICAgICBpY29uOiAnbm9uZScsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
import { customerFetch } from '../../../api/fetch';
// pages/components/FeedbackItem/FeedbackItem.ts
Component({
/**
......@@ -7,8 +9,16 @@ Component({
feedbackData: {
type: Object,
value: {
phonecall: ''
}
areaId: 0,
areaName: '',
customerId: 0,
customerName: '',
customerPhone: '',
customerSex: '',
feedbackContent: '',
id: 0,
state: '',
},
},
},
......@@ -16,7 +26,7 @@ Component({
* 组件的初始数据
*/
data: {
inputValue: '',
},
/**
......@@ -24,16 +34,48 @@ Component({
*/
methods: {
makePhoneCallHandle() {
console.log('in makePhoneCallHandle');
wx.makePhoneCall({
phoneNumber: this.data.feedbackData.phonecall,
phoneNumber: this.data.feedbackData.customerPhone,
success: () => {
console.log('success')
console.log('success');
},
fail: () => {
console.log('fail')
console.log('fail');
},
});
},
inputHandle(e) {
const val = e.detail.value;
this.setData({
inputValue: val,
});
},
}
sendFeedback() {
const val = this.data.inputValue;
customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: this.data.feedbackData.id,
replayContent: val,
state: '2',
},
})
}
}
})
.then(res => {
wx.showToast({
title: res.msg,
});
this.triggerEvent('refresh', {});
})
.catch((err: wx.GeneralCallbackResult) => {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
},
});
<!--pages/components/FeedbackItem/FeedbackItem.wxml-->
<!-- pages/components/FeedbackItem/FeedbackItem.wxml -->
<view class="FeedbackItem">
<view class="FeedbackItem-time">2019-09-28 8:46:32</view>
<view class="FeedbackItem-userinfo">
<view class="FeedbackItem-name">彰显则 男</view>
<view class="FeedbackItem-areaname">成都师范学院温江校区</view>
</view>
<view class="FeedbackItem-content">
佛 i 后 i 个问看见我发今晚看见短时间内夸父不期望你客气的接口就不算大看巴萨的咖色看巴萨的卡点半
<view class="FeedbackItem-name">
{{feedbackData.customerName}} {{feedbackData.customerSex==='1'?'男':'女'}}
</view>
<view class="FeedbackItem-areaname">{{feedbackData.areaName}}</view>
</view>
<input class="FeedbackItem-input"></input>
<view class="FeedbackItem-content">{{feedbackData.feedbackContent}}</view>
<input class="FeedbackItem-input" bindinput="inputHandle"></input>
<view class="FeedbackItem-option">
<view class="FeedbackItem-phone">
<view class="FeedbackItem-phone" bind:tap="makePhoneCallHandle">
<image class="FeedbackItem-phoneIcon" src="../../../images/ic_phone@2x.png"></image>
{{feedbackData.phonecall}}
{{feedbackData.customerPhone}}
</view>
<view class="FeedbackItem-send" bindtap="makePhoneCallHandle">发送</view>
<view class="FeedbackItem-send" bind:tap="sendFeedback">发送</view>
</view>
</view>
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("../../../utils/util");
var paytypeChart = null;
var month = '';
var colorMap = {
aimi: '#EB7E59',
bean: '#13C2C2',
discount: '#FACC14',
online: '#1890FF',
};
function initChart(canvas, width, height, F2) {
var data = [];
paytypeChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
paytypeChart.source(data, {
days: {
min: 1,
max: 31,
},
});
paytypeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#f166fd',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
paytypeChart.coord('polar', {
transposed: true,
innerRadius: 0.7,
});
paytypeChart.legend({
position: 'right',
marker: 'square',
});
paytypeChart.tooltip(false);
paytypeChart
.interval()
.position('a*count')
.color('key', function (val) {
return colorMap[val];
})
.adjust('stack');
paytypeChart.axis(false);
paytypeChart.render();
return paytypeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
paytypeChart &&
paytypeChart.legend({
position: 'right',
marker: 'square',
custom: true,
items: newVal.map(function (item) { return ({
name: item.name,
value: ' ' + util_1.formatPrice(item.count),
marker: {
symbol: 'square',
fill: colorMap[item.key],
radius: 4,
},
}); }),
});
paytypeChart && paytypeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGF5VHlwZUNoYXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiUGF5VHlwZUNoYXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQWtEO0FBR2xELElBQUksWUFBWSxHQUFHLElBQUksQ0FBQztBQUN4QixJQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7QUFDZixJQUFNLFFBQVEsR0FBRztJQUNmLElBQUksRUFBRSxTQUFTO0lBQ2YsSUFBSSxFQUFFLFNBQVM7SUFDZixRQUFRLEVBQUUsU0FBUztJQUNuQixNQUFNLEVBQUUsU0FBUztDQUNsQixDQUFDO0FBRUYsbUJBQW1CLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUU7SUFDMUMsSUFBTSxJQUFJLEdBQUcsRUFBRSxDQUFDO0lBQ2hCLFlBQVksR0FBRyxJQUFJLEVBQUUsQ0F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ICAgICAgICBtb250aCA9IG5ld1ZhbDtcbiAgICAgIH0sXG4gICAgfSxcbiAgfSxcbiAgZGF0YToge1xuICAgIG9wdHM6IHtcbiAgICAgIG9uSW5pdDogaW5pdENoYXJ0LFxuICAgIH0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
import { formatPrice } from '../../../utils/util';
// pages/components/PayTypeChart/PayTypeChart.js
let paytypeChart = null;
let month = '';
const colorMap = {
aimi: '#EB7E59',
bean: '#13C2C2',
discount: '#FACC14',
online: '#1890FF',
};
function initChart(canvas, width, height, F2) {
const data = [];
paytypeChart = new F2.Chart({
el: canvas,
width,
height,
});
paytypeChart.source(data, {
days: {
min: 1,
max: 31,
},
});
paytypeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#f166fd',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
paytypeChart.coord('polar', {
transposed: true,
innerRadius: 0.7,
});
paytypeChart.legend({
position: 'right',
marker: 'square',
});
paytypeChart.tooltip(false);
paytypeChart
.interval()
.position('a*count')
.color('key', val => {
return colorMap[val];
})
.adjust('stack');
paytypeChart.axis(false);
paytypeChart.render();
return paytypeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
paytypeChart &&
paytypeChart.legend({
position: 'right',
marker: 'square',
custom: true,
items: newVal.map(item => ({
name: item.name,
value: ' ' + formatPrice(item.count),
marker: {
symbol: 'square',
fill: colorMap[item.key],
radius: 4,
},
})),
});
paytypeChart && paytypeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!--pages/components/PayTypeChart/PayTypeChart.wxml-->
<ff-canvas id="PayTypeChart" canvas-id="PayTypeChart" opts="{{ opts }}" />
/* pages/components/PayTypeChart/PayTypeChart.wxss */
\ No newline at end of file
"use strict";
var rechargeChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
rechargeChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
rechargeChart.source(data, {
days: {
min: 1,
max: 31,
},
});
rechargeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
rechargeChart
.line()
.position('days*rechargeMoney')
.color('#6895fe')
.shape('smooth')
.size(4);
rechargeChart
.area()
.position('days*rechargeMoney')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
rechargeChart.axis('rechargeMoney', false);
rechargeChart.render();
return rechargeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
rechargeChart && rechargeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjaGFyZ2VDaGFydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlJlY2hhcmdlQ2hhcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQUksYUFBYSxHQUFHLElBQUksQ0FBQztBQUN6QixJQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7QUFFZixtQkFBbUIsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsRUFBRTtJQUMxQyxJQUFNLElBQUksR0FBRyxFQUFFLENBQUM7SUFDaEIsYUFBYSxHQUFHLElBQUksRUFBRSxDQUFDLEtBQUssQ0FBQztRQUMzQixFQUFFLEVBQUUsTUFBTTtRQUNWLEtBQUssT0FBQTtRQUNMLE1BQU0s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dyZWNoYXJnZU1vbmV5JywgZmFsc2UpO1xuICByZWNoYXJnZUNoYXJ0LnJlbmRlcigpO1xuICByZXR1cm4gcmVjaGFyZ2VDaGFydDtcbn1cblxuQ29tcG9uZW50KHtcbiAgcHJvcGVydGllczoge1xuICAgIGRhdGFMaXN0OiB7XG4gICAgICB0eXBlOiBBcnJheSxcbiAgICAgIHZhbHVlOiBbXSxcbiAgICAgIG9ic2VydmVyKG5ld1ZhbCkge1xuICAgICAgICByZWNoYXJnZUNoYXJ0ICYmIHJlY2hhcmdlQ2hhcnQuY2hhbmdlRGF0YShuZXdWYWwpO1xuICAgICAgfSxcbiAgICB9LFxuICAgIG1vbnRoOiB7XG4gICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICB2YWx1ZTogJycsXG4gICAgICBvYnNlcnZlcihuZXdWYWwpIHtcbiAgICAgICAgbW9udGggPSBuZXdWYWw7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIGRhdGE6IHtcbiAgICBvcHRzOiB7XG4gICAgICBvbkluaXQ6IGluaXRDaGFydCxcbiAgICB9LFxuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
\ No newline at end of file
let rechargeChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
rechargeChart = new F2.Chart({
el: canvas,
width,
height,
});
rechargeChart.source(data, {
days: {
min: 1,
max: 31,
},
});
rechargeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
rechargeChart
.line()
.position('days*rechargeMoney')
.color('#6895fe')
.shape('smooth')
.size(4);
rechargeChart
.area()
.position('days*rechargeMoney')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
rechargeChart.axis('rechargeMoney', false);
rechargeChart.render();
return rechargeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
rechargeChart && rechargeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!--pages/components/RechargeChart/RechargeChart.wxml-->
<ff-canvas id="RechargeChart" canvas-id="RechargeChart" opts="{{ opts }}" />
\ No newline at end of file
/* pages/components/RechargeChart/RechargeChart.wxss */
\ No newline at end of file
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
var refundChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
refundChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
refundChart.source(data, {
days: {
min: 1,
max: 31,
},
});
refundChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#f166fd',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
refundChart
.line()
.position('days*refundMoney')
.color('#f166fd')
.shape('smooth')
.size(4);
refundChart
.area()
.position('days*refundMoney')
.color('l(90) 0:#f166fd 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
refundChart.axis('refundMoney', false);
refundChart.render();
return refundChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
var list = newVal.map(function (item) { return (__assign({}, item, { refundMoney: Math.abs(item.refundMoney) })); });
refundChart && refundChart.changeData(list);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVmdW5kQ2hhcnQuanMiLCJzb3VyY2VSb290Ij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7XG4gICAgICAgIHJlZnVuZENoYXJ0ICYmIHJlZnVuZENoYXJ0LmNoYW5nZURhdGEobGlzdCk7XG4gICAgICB9LFxuICAgIH0sXG4gICAgbW9udGg6IHtcbiAgICAgIHR5cGU6IFN0cmluZyxcbiAgICAgIHZhbHVlOiAnJyxcbiAgICAgIG9ic2VydmVyKG5ld1ZhbCkge1xuICAgICAgICBtb250aCA9IG5ld1ZhbDtcbiAgICAgIH0sXG4gICAgfSxcbiAgfSxcbiAgZGF0YToge1xuICAgIG9wdHM6IHtcbiAgICAgIG9uSW5pdDogaW5pdENoYXJ0LFxuICAgIH0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
// pages/components/RefundChart/RefundChart.js
let refundChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
refundChart = new F2.Chart({
el: canvas,
width,
height,
});
refundChart.source(data, {
days: {
min: 1,
max: 31,
},
});
refundChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#f166fd',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
refundChart
.line()
.position('days*refundMoney')
.color('#f166fd')
.shape('smooth')
.size(4);
refundChart
.area()
.position('days*refundMoney')
.color('l(90) 0:#f166fd 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
refundChart.axis('refundMoney', false);
refundChart.render();
return refundChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
let list = newVal.map(item => ({
...item,
refundMoney: Math.abs(item.refundMoney),
}));
refundChart && refundChart.changeData(list);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!-- pages/components/RefundChart/RefundChart.wxml -->
<ff-canvas id="RefundChart" canvas-id="RefundChart" opts="{{ opts }}" />
\ No newline at end of file
/* pages/components/RefundChart/RefundChart.wxss */
\ No newline at end of file
"use strict";
Component({});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VsZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiU2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxTQUFTLENBQUMsRUFBRSxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJDb21wb25lbnQoe30pO1xuIl19
\ No newline at end of file
Component({
properties: {
placeholder: {
type: String,
value: '请选择',
},
range: {
type: Array,
value: [],
},
rangeKey: {
type: String,
value: 'key',
},
mode: {
type: String,
value: 'selector',
},
fields: {
type: String,
value: 'day',
},
value: {
type: String,
value: '',
observer: function (newVal) {
console.log('in select ob', newVal);
this.setData({ selected: newVal });
},
},
},
data: {
selected: '',
},
methods: {
bindPickerChange: function (e) {
var value = e.detail.value;
console.log(value);
this.setData({
selected: value,
});
this.triggerEvent('change', { value: value });
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VsZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiU2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxTQUFTLENBQUM7SUFDUixVQUFVLEVBQUU7UUFDVixXQUFXLEVBQUU7WUFDWCxJQUFJLEVBQUUsTUFBTTtZQUNaLEtBQUssRUFBRSxLQUFLO1NBQ2I7UUFDRCxLQUFLLEVBQUU7WUFDTCxJQUFJLEVBQUUsS0FBSztZQUNYLEtBQUssRUFBRSxFQUFFO1NBQ1Y7UUFDRCxRQUFRLEVBQUU7WUFDUixJQUFJLEVBQUUsTUFBTTtZQUNaLEtBQUssRUFBRSxLQUFLO1NBQ2I7UUFDRCxJQUFJLEVBQUU7WUFDSixJQUFJLEVBQUUsTUFBTTtZQUNaLEtBQUssR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ogU3RyaW5nLFxuICAgICAgdmFsdWU6ICdrZXknLFxuICAgIH0sXG4gICAgbW9kZToge1xuICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgdmFsdWU6ICdzZWxlY3RvcicsXG4gICAgfSxcbiAgICBmaWVsZHM6IHtcbiAgICAgIHR5cGU6IFN0cmluZyxcbiAgICAgIHZhbHVlOiAnZGF5JyxcbiAgICB9LFxuICAgIHZhbHVlOiB7XG4gICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICB2YWx1ZTogJycsXG4gICAgICBvYnNlcnZlcihuZXdWYWwpIHtcbiAgICAgICAgY29uc29sZS5sb2coJ2luIHNlbGVjdCBvYicsIG5ld1ZhbCk7XG4gICAgICAgIHRoaXMuc2V0RGF0YSh7IHNlbGVjdGVkOiBuZXdWYWwgfSk7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIGRhdGE6IHtcbiAgICBzZWxlY3RlZDogJycsXG4gIH0sXG4gIG1ldGhvZHM6IHtcbiAgICBiaW5kUGlja2VyQ2hhbmdlKGUpIHtcbiAgICAgIGNvbnN0IHsgdmFsdWUgfSA9IGUuZGV0YWlsO1xuICAgICAgY29uc29sZS5sb2codmFsdWUpO1xuICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgIHNlbGVjdGVkOiB2YWx1ZSxcbiAgICAgIH0pO1xuICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoJ2NoYW5nZScsIHsgdmFsdWUgfSk7XG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
Component({});
Component({
properties: {
placeholder: {
type: String,
value: '请选择',
},
range: {
type: Array,
value: [],
},
rangeKey: {
type: String,
value: 'key',
},
mode: {
type: String,
value: 'selector',
},
fields: {
type: String,
value: 'day',
},
value: {
type: String,
value: '',
observer(newVal) {
console.log('in select ob', newVal);
this.setData({ selected: newVal });
},
},
},
data: {
selected: '',
},
methods: {
bindPickerChange(e) {
const { value } = e.detail;
console.log(value);
this.setData!({
selected: value,
});
this.triggerEvent('change', { value });
},
},
});
<!--pages/components/Select/Select.wxml-->
<view class="input">
<text>pages/components/Select/Select.wxml</text>
<!-- pages/components/Select/Select.wxml -->
<view class="select-input">
<picker class="select-picker" mode="{{mode}}" bindchange="bindPickerChange" value="{{selected}}" range="{{range}}" range-key="{{rangeKey}}" fields="{{fields}}">
<view wx:if="{{selected && mode === 'date'}}" class="select-value">{{selected}}</view>
<view wx:elif="{{selected}}" class="select-value">{{range[selected][rangeKey]}}</view>
<view wx:else class="select-placeholder">{{placeholder}}</view>
<image class="select-icon" src="../../../images/btn_xiala@2x.png" mode="aspectFill" />
</picker>
</view>
\ No newline at end of file
/* pages/components/Select/Select.wxss */
\ No newline at end of file
/* pages/components/Select/Select.wxss */
.select-input {
position: relative;
border: 1rpx solid #f8f8f8;
background-color: #f8f8f8;
padding: 0 40rpx;
border-radius: 96rpx;
height: 96rpx;
line-height: 96rpx;
font-size: 28rpx;
}
.select-input:hover,
.select-input:focus {
border-color: #6895fe;
}
.select-placeholder {
color: #999;
}
.select-value {
color: #333;
}
.select-icon {
position: absolute;
width: 44rpx;
height: 44rpx;
right: 40rpx;
top: 26rpx;
}
/* pages/components/ServiceCount/ServiceCount.wxss */
.ServiceCount {
position: relative;
width: 296rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 22rpx 0 26rpx;
}
.ServiceCount:nth-child(odd)::after {
content: ' ';
position: absolute;
right: 0;
top: 30rpx;
width: 1rpx;
height: 40rpx;
}
.ServiceCount-color {
......@@ -18,7 +28,9 @@
background-color: #6a92ff;
}
.ServiceCount-tag, .ServiceCount-title, .ServiceCount-price {
.ServiceCount-tag,
.ServiceCount-title,
.ServiceCount-price {
font-size: 26rpx;
color: #666;
}
......@@ -35,6 +47,7 @@
}
.ServiceCount-price {
margin-top: 8rpx;
box-sizing: border-box;
width: 100%;
padding-left: 30rpx;
......
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("../../../utils/util");
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
var maxnum = Math.ceil(Math.max.apply(Math, newVal.map(function (item) { return item.payableMoney; })) / 0.9);
var list = newVal.map(function (item) { return (__assign({}, item, { payableMoney: util_1.formatPrice(item.payableMoney), precent: Math.ceil((item.payableMoney / maxnum) * 100) })); });
this.setData({
list: list,
});
},
},
},
data: {
list: [],
},
methods: {},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VydmljZVR5cGVDaGFydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlNlcnZpY2VUeXBlQ2hhcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRDQUFrRDtBQUdsRCxTQUFTLENBQUM7SUFJUixVQUFVLEVBQUU7UUFDVixRQUFRLEVBQUU7WUFDUixJQUFJLEVBQUUsS0FBSztZQUNYLEtBQUssRUFBRSxFQUFFO1lBQ1QsUUFBUSxZQUFDLE1BQU07Z0JBQ2IsSUFBSSxNQUFNLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FDcEIsSUFBSSxDQUFDLEdBQUcsT0FBUixJQUFJLEVBQVEsTUFBTSxDQUFDLEdBQUcsQ0FBQyxVQUFBLElBQUksSUFBSSxPQUFBLElBQUksQ0FBQyxZQUFZLEVBQWpCLENBQWlCLENBQUMsSUFBSSxHQUFHLENBQ3pELENBQUM7Z0JBQ0YsSUFBSSxJQUFJLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxVQUFBLElBQUksSUFBSSxPQUFBLGNBQ3pCLElBQUksSUFDUCxZQUFZLEVBQUUsa0JBQVcsQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLEVBQzVD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YXlhYmxlTW9uZXkgLyBtYXhudW0pICogMTAwKSxcbiAgICAgICAgfSkpO1xuICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgIGxpc3QsXG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9LFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTliJ3lp4vmlbDmja5cbiAgICovXG4gIGRhdGE6IHtcbiAgICBsaXN0OiBbXSxcbiAgfSxcblxuICAvKipcbiAgICog57uE5Lu255qE5pa55rOV5YiX6KGoXG4gICAqL1xuICBtZXRob2RzOiB7fSxcbn0pO1xuIl19
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
import { formatPrice } from '../../../utils/util';
// pages/components/ServiceTypeChart/ServiceTypeChart.js
Component({
/**
* 组件的属性列表
*/
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
let maxnum = Math.ceil(
Math.max(...newVal.map(item => item.payableMoney)) / 0.9,
);
let list = newVal.map(item => ({
...item,
payableMoney: formatPrice(item.payableMoney),
precent: Math.ceil((item.payableMoney / maxnum) * 100),
}));
this.setData({
list,
});
},
},
},
/**
* 组件的初始数据
*/
data: {
list: [],
},
/**
* 组件的方法列表
*/
methods: {},
});
<!-- pages/components/ServiceTypeChart/ServiceTypeChart.wxml -->
<view class="ServiceTypeChart">
<view wx:for="{{list}}" wx:key="{{item.serviceId}}" class="ServiceTypeChart-item">
<view class="ServiceTypeChart-title">
<view class="ServiceTypeChart-name">{{item.serviceName}}</view>
<view class="ServiceTypeChart-count">{{item.payableMoney}}</view>
</view>
<view class="ServiceTypeChart-precent">
<view class="ServiceTypeChart-innerprecent" style="width: {{item.precent}}%"></view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/components/ServiceTypeChart/ServiceTypeChart.wxss */
.ServiceTypeChart {
padding-bottom: 20rpx;
}
.ServiceTypeChart-title {
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #6895fe;
margin-bottom: 20rpx;
}
.ServiceTypeChart-precent,
.ServiceTypeChart-innerprecent {
height: 12rpx;
border-radius: 12rpx;
}
.ServiceTypeChart-precent {
margin-bottom: 40rpx;
background-color: #f2f2f2;
}
.ServiceTypeChart-innerprecent {
width: 0;
background-color: #6F96F6;
}
"use strict";
var userActivityChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
userActivityChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
userActivityChart.source(data, {
days: {
min: 1,
max: 31,
},
});
userActivityChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '人';
},
});
userActivityChart
.line()
.position('days*count')
.color('#6895fe')
.shape('smooth')
.size(4);
userActivityChart
.area()
.position('days*count')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
userActivityChart.axis('count', false);
userActivityChart.render();
return userActivityChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
userActivityChart && userActivityChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXNlckFjdGl2aXR5Q2hhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJVc2VyQWN0aXZpdHlDaGFydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsSUFBSSxpQkFBaUIsR0FBRyxJQUFJLENBQUM7QUFDN0IsSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFDO0FBRWYsbUJBQW1CLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUU7SUFDMUMsSUFBTSxJQUFJLEdBQUcsRUFBRSxDQUFDO0lBQ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XG4gIHVzZXJBY3Rpdml0eUNoYXJ0XG4gICAgLmFyZWEoKVxuICAgIC5wb3NpdGlvbignZGF5cypjb3VudCcpXG4gICAgLmNvbG9yKCdsKDkwKSAwOiM2ODk1ZmUgMTojZmZmJylcbiAgICAuc2hhcGUoJ3Ntb290aCcpXG4gICAgLnN0eWxlKHtcbiAgICAgIGZpbGxPcGFjaXR5OiAwLjYsXG4gICAgfSk7XG4gIHVzZXJBY3Rpdml0eUNoYXJ0LmF4aXMoJ2NvdW50JywgZmFsc2UpO1xuICB1c2VyQWN0aXZpdHlDaGFydC5yZW5kZXIoKTtcbiAgcmV0dXJuIHVzZXJBY3Rpdml0eUNoYXJ0O1xufVxuXG5Db21wb25lbnQoe1xuICBwcm9wZXJ0aWVzOiB7XG4gICAgZGF0YUxpc3Q6IHtcbiAgICAgIHR5cGU6IEFycmF5LFxuICAgICAgdmFsdWU6IFtdLFxuICAgICAgb2JzZXJ2ZXIobmV3VmFsKSB7XG4gICAgICAgIHVzZXJBY3Rpdml0eUNoYXJ0ICYmIHVzZXJBY3Rpdml0eUNoYXJ0LmNoYW5nZURhdGEobmV3VmFsKTtcbiAgICAgIH0sXG4gICAgfSxcbiAgICBtb250aDoge1xuICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgdmFsdWU6ICcnLFxuICAgICAgb2JzZXJ2ZXIobmV3VmFsKSB7XG4gICAgICAgIG1vbnRoID0gbmV3VmFsO1xuICAgICAgfSxcbiAgICB9LFxuICB9LFxuICBkYXRhOiB7XG4gICAgb3B0czoge1xuICAgICAgb25Jbml0OiBpbml0Q2hhcnQsXG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
\ No newline at end of file
// pages/components/UserActivityChart/UserActivityChart.js
let userActivityChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
userActivityChart = new F2.Chart({
el: canvas,
width,
height,
});
userActivityChart.source(data, {
days: {
min: 1,
max: 31,
},
});
userActivityChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '人';
},
});
userActivityChart
.line()
.position('days*count')
.color('#6895fe')
.shape('smooth')
.size(4);
userActivityChart
.area()
.position('days*count')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
userActivityChart.axis('count', false);
userActivityChart.render();
return userActivityChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
userActivityChart && userActivityChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!--pages/components/UserActivityChart/UserActivityChart.wxml-->
<ff-canvas id="UserActivityChart" canvas-id="UserActivityChart" opts="{{ opts }}" />
/* pages/components/UserActivityChart/UserActivityChart.wxss */
\ No newline at end of file
"use strict";
var userGrouthChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
userGrouthChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
userGrouthChart.source(data, {
days: {
min: 1,
max: 31,
},
});
userGrouthChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow: function (ev) {
var items = ev.items;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '人';
},
});
userGrouthChart
.line()
.position('days*count')
.color('#6895fe')
.shape('smooth')
.size(4);
userGrouthChart
.area()
.position('days*count')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
userGrouthChart.axis('count', false);
userGrouthChart.render();
return userGrouthChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
userGrouthChart && userGrouthChart.changeData(newVal);
},
},
month: {
type: String,
value: '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uZXdWYWwpIHtcbiAgICAgICAgbW9udGggPSBuZXdWYWw7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIGRhdGE6IHtcbiAgICBvcHRzOiB7XG4gICAgICBvbkluaXQ6IGluaXRDaGFydCxcbiAgICB9LFxuICB9LFxufSk7XG5cbiJdfQ==
\ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
// pages/components/UserGrouthChart/UserGrouthChart.js
let userGrouthChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
userGrouthChart = new F2.Chart({
el: canvas,
width,
height,
});
userGrouthChart.source(data, {
days: {
min: 1,
max: 31,
},
});
userGrouthChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = month + '-' + items[0].title;
items[1].name = '';
items[1].value = items[1].value + '人';
},
});
userGrouthChart
.line()
.position('days*count')
.color('#6895fe')
.shape('smooth')
.size(4);
userGrouthChart
.area()
.position('days*count')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
userGrouthChart.axis('count', false);
userGrouthChart.render();
return userGrouthChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
userGrouthChart && userGrouthChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!--pages/components/UserGrouthChart/UserGrouthChart.wxml-->
<ff-canvas id="UserGrouthChart" canvas-id="UserGrouthChart" opts="{{ opts }}" />
/* pages/components/UserGrouthChart/UserGrouthChart.wxss */
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
Page({
onLoad: function () {
this.initData();
this.fetchAreaList();
},
data: {
userdata: {
phonecall: '18108096099'
},
areaId: 0,
array: [
{ value: 1, name: 'asdd' },
{ value: 2, name: 'bjgd' },
{ value: 3, name: 'gksf' },
]
},
bindPickerChange: function (val) {
console.log(val);
tabIndex: 1,
areaId: '',
list1: [],
list2: [],
areaList: [],
},
initData: function () {
this.fetchList(1);
this.fetchList(2);
},
toggleList: function (e) {
var tabindex = e.currentTarget.dataset.tabindex;
if (tabindex !== this.data.tabIndex) {
this.setData({
tabIndex: tabindex,
});
this.fetchList(tabindex);
}
},
fetchList: function (state) {
var _this = this;
if (!state)
state = this.data.tabIndex;
wx.showLoading({ title: '' });
fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/queryFeedbackListV2',
data: this.data.areaId
? {
state: state,
areaId: this.data.areaId,
}
: { state: state },
})
.then(function (res) {
wx.hideLoading();
var list = res.data;
_this.setData((_a = {},
_a['list' + state] = list,
_a));
var _a;
})
.catch(function (err) {
console.log(err);
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
bindPickerChange: function (e) {
var _this = this;
console.log(e);
var value = e.detail.value;
this.setData({
areaId: this.data.areaList[value].id,
}, function () {
_this.initData();
});
},
refreshHandle: function (e) {
this.fetchList();
},
fetchAreaList: function () {
var _this = this;
fetch_1.baseFetch({
url: '/dcxy/baseArea/queryAll',
})
.then(function (res) {
if (res.data) {
_this.setData({
areaList: res.data,
});
}
else {
_this.setData({
areaList: [],
});
}
})
.catch(function (err) {
console.log(err);
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZWVkYmFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsSUFBSSxDQUFDO0lBSUgsSUFBSSxFQUFFO1FBQ0osUUFBUSxFQUFFO1lBQ1IsU0FBUyxFQUFFLGFBQWE7U0FDekI7UUFDRCxNQUFNLEVBQUUsQ0FBQztRQUNULEtBQUssRUFBRTtZQUNMLEVBQUUsS0FBSyxFQUFFLENBQUMsRUFBRSxJQ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yciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgICAgdGl0bGU6IGVyci5lcnJNc2csXG4gICAgICAgICAgaWNvbjogJ25vbmUnLFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICB9LFxuICBiaW5kUGlja2VyQ2hhbmdlKGUpIHtcbiAgICBjb25zb2xlLmxvZyhlKTtcbiAgICBjb25zdCB7IHZhbHVlIH0gPSBlLmRldGFpbDtcbiAgICB0aGlzLnNldERhdGEhKFxuICAgICAge1xuICAgICAgICBhcmVhSWQ6IHRoaXMuZGF0YS5hcmVhTGlzdFt2YWx1ZV0uaWQsXG4gICAgICB9LFxuICAgICAgKCkgPT4ge1xuICAgICAgICB0aGlzLmluaXREYXRhKCk7XG4gICAgICB9LFxuICAgICk7XG4gIH0sXG4gIHJlZnJlc2hIYW5kbGUoZSkge1xuICAgIHRoaXMuZmV0Y2hMaXN0KCk7XG4gIH0sXG4gIGZldGNoQXJlYUxpc3QoKSB7XG4gICAgYmFzZUZldGNoKHtcbiAgICAgIHVybDogJy9kY3h5L2Jhc2VBcmVhL3F1ZXJ5QWxsJyxcbiAgICB9KVxuICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgaWYgKHJlcy5kYXRhKSB7XG4gICAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgICBhcmVhTGlzdDogcmVzLmRhdGEsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgICBhcmVhTGlzdDogW10sXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"navigationBarTitleText": "反馈处理",
"usingComponents": {
"c-select": "../components/Select/Select",
"feedback-item": "../components/FeedbackItem/FeedbackItem"
}
}
\ No newline at end of file
}
import { statisticsFetch, baseFetch } from '../../api/fetch';
// miniprogram/pages/feedback/feedback.js
Page({
onLoad() {
this.initData();
this.fetchAreaList();
},
/**
* 页面的初始数据
*/
data: {
userdata: {
phonecall: '18108096099'
},
areaId: 0,
array: [
{ value: 1, name: 'asdd' },
{ value: 2, name: 'bjgd' },
{ value: 3, name: 'gksf' },
]
},
bindPickerChange(val) {
console.log(val)
tabIndex: 1,
areaId: '',
list1: [],
list2: [],
areaList: [],
},
})
\ No newline at end of file
initData() {
this.fetchList(1);
this.fetchList(2);
},
toggleList(e) {
const { tabindex } = e.currentTarget.dataset;
if (tabindex !== this.data.tabIndex) {
this.setData!({
tabIndex: tabindex,
});
this.fetchList(tabindex);
}
},
fetchList(state?: number) {
if (!state) state = this.data.tabIndex;
wx.showLoading({ title: '' });
statisticsFetch({
url: '/dcxy/reportInfo/queryFeedbackListV2',
data: this.data.areaId
? {
state,
areaId: this.data.areaId,
}
: { state },
})
.then(res => {
wx.hideLoading();
const list = res.data;
this.setData!({
['list' + state]: list,
});
})
.catch(err => {
console.log(err);
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
bindPickerChange(e) {
console.log(e);
const { value } = e.detail;
this.setData!(
{
areaId: this.data.areaList[value].id,
},
() => {
this.initData();
},
);
},
refreshHandle(e) {
this.fetchList();
},
fetchAreaList() {
baseFetch({
url: '/dcxy/baseArea/queryAll',
})
.then(res => {
if (res.data) {
this.setData!({
areaList: res.data,
});
} else {
this.setData!({
areaList: [],
});
}
})
.catch(err => {
console.log(err);
});
},
});
<!--miniprogram/pages/feedback/feedback.wxml-->
<!-- miniprogram/pages/feedback/feedback.wxml -->
<view class="container feedback">
<view class="feedback-area">
<picker class="feedback-areaSelect" mode="selector" bindchange="bindPickerChange" value="{{areaIndex}}" range="{{areaList}}" range-key="{{'name'}}">
<view class="picker">
当前选择:{{areaList[index].name}}
</view>
</picker>
<c-select mode="selector" range="{{areaList}}" range-key="{{'areaName'}}" bindchange="bindPickerChange" placeholder="所属区域选择" />
</view>
<view class="feedback-tabbar">
<view class="feedback-tabItem checked">
<view bind:tap="toggleList" data-tabIndex="{{1}}" class="feedback-tabItem {{tabIndex===1?'checked':''}}">
<text class="feedback-tabName">未处理</text>
<text class="feedback-tabCount">16</text>
<text class="feedback-tabCount">{{list1.length}}</text>
</view>
<view class="feedback-tabItem">
<view bind:tap="toggleList" data-tabIndex="{{2}}" class="feedback-tabItem {{tabIndex===2?'checked':''}}">
<text class="feedback-tabName">进行中</text>
<text class="feedback-tabCount">5</text>
<text class="feedback-tabCount">{{list2.length}}</text>
</view>
</view>
<view class="feedback-list">
<feedback-item feedback-data="{{userdata}}" />
<view wx:if="{{tabIndex===1}}" class="feedback-list">
<feedback-item wx:for="{{list1}}" wx:key="{{item.id}}" feedback-data="{{item}}" bind:refresh="refreshHandle" />
</view>
<view wx:elif="{{tabIndex===2}}" class="feedback-list">
<feedback-item wx:for="{{list2}}" wx:key="{{item.id}}" feedback-data="{{item}}" bind:refresh="refreshHandle" />
</view>
</view>
\ No newline at end of file
......@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
var util_1 = require("../../utils/util");
Component({
pageLifetimes: {
show: function () {
lifetimes: {
attached: function () {
console.log('in show ', this.data.fetched);
!this.data.fetched && this.fetchRechargeData();
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
......@@ -16,6 +17,7 @@ Component({
data: {
timeType: 0,
fetched: false,
serviceList: [],
rechargeData: {
title: '充值总额',
numberType: 'price',
......@@ -87,7 +89,9 @@ Component({
timeType = this.data.timeType;
var today = util_1.formatTime(new Date());
var date = today.split(' ')[0];
var entity = {};
var entity = {
timeType: timeType,
};
if (timeType === 0) {
entity.date = date;
}
......@@ -98,13 +102,11 @@ Component({
entity.year = date.slice(0, 4);
}
wx.showLoading({ title: '' });
fetch_1.statisticsFetch({
var rechargeDataFetch = fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/queryRechargeOrderListV2',
method: 'POST',
data: entity,
})
.then(function (res) {
wx.hideLoading();
}).then(function (res) {
var data = res.rechargeOrderCountVo;
if (data) {
var rechargeMen = data.rechargeMen, rechargeMoney = data.rechargeMoney, refundCount = data.refundCount, refundMoney = data.refundMoney, offlineRechargeMen = data.offlineRechargeMen, offlineRechargeMoney = data.offlineRechargeMoney, onlineRechargeMen = data.onlineRechargeMen, onlineRechargeMoney = data.onlineRechargeMoney;
......@@ -119,6 +121,43 @@ Component({
'offlineRechargeData.count': offlineRechargeMen,
});
}
else {
_this.setData({
'rechargeData.count': 0,
'rechargeCount.count': 0,
'refundData.count': 0,
'refundCount.count': 0,
'onlineRechargeData.price': 0,
'onlineRechargeData.count': 0,
'offlineRechargeData.price': 0,
'offlineRechargeData.count': 0,
});
}
});
var consumeDataFetch = fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/queryConsumeOrderList',
method: 'POST',
data: entity,
}).then(function (res) {
var consumeCountVo = res.consumeCountVo, data = res.data;
console.log(res);
_this.setData({
serviceList: data.map(function (item) { return ({
serviceId: item.serviceId,
title: item.serviceName,
numberType: '1',
count: item.payMen,
price: item.payableMoney,
}); }),
'comsumerData.count': consumeCountVo && consumeCountVo.payableMoney
? consumeCountVo.payableMoney
: 0,
'comsumerCount.count': consumeCountVo && consumeCountVo.payMen ? consumeCountVo.payMen : 0,
});
});
Promise.all([consumeDataFetch, rechargeDataFetch])
.then(function () {
wx.hideLoading();
})
.catch(function (err) {
wx.hideLoading();
......@@ -130,4 +169,4 @@ Component({
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBa0Q7QUFDbEQseU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gICAgICAgICAgY29uc3QgZGF0YSA9IHJlcy5yZWNoYXJnZU9yZGVyQ291bnRWbztcbiAgICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICByZWNoYXJnZU1lbixcbiAgICAgICAgICAgICAgcmVjaGFyZ2VNb25leSxcbiAgICAgICAgICAgICAgcmVmdW5kQ291bnQsXG4gICAgICAgICAgICAgIHJlZnVuZE1vbmV5LFxuICAgICAgICAgICAgICBvZmZsaW5lUmVjaGFyZ2VNZW4sXG4gICAgICAgICAgICAgIG9mZmxpbmVSZWNoYXJnZU1vbmV5LFxuICAgICAgICAgICAgICBvbmxpbmVSZWNoYXJnZU1lbixcbiAgICAgICAgICAgICAgb25saW5lUmVjaGFyZ2VNb25leSxcbiAgICAgICAgICAgIH0gPSBkYXRhO1xuICAgICAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICAgICAgJ3JlY2hhcmdlRGF0YS5jb3VudCc6IHJlY2hhcmdlTW9uZXksXG4gICAgICAgICAgICAgICdyZWNoYXJnZUNvdW50LmNvdW50JzogcmVjaGFyZ2VNZW4sXG4gICAgICAgICAgICAgICdyZWZ1bmREYXRhLmNvdW50JzogcmVmdW5kTW9uZXksXG4gICAgICAgICAgICAgICdyZWZ1bmRDb3VudC5jb3VudCc6IHJlZnVuZENvdW50LFxuICAgICAgICAgICAgICAnb25saW5lUmVjaGFyZ2VEYXRhLnByaWNlJzogb25saW5lUmVjaGFyZ2VNb25leSxcbiAgICAgICAgICAgICAgJ29ubGluZVJlY2hhcmdlRGF0YS5jb3VudCc6IG9ubGluZVJlY2hhcmdlTWVuLFxuICAgICAgICAgICAgICAnb2ZmbGluZVJlY2hhcmdlRGF0YS5wcmljZSc6IG9mZmxpbmVSZWNoYXJnZU1vbmV5LFxuICAgICAgICAgICAgICAnb2ZmbGluZVJlY2hhcmdlRGF0YS5jb3VudCc6IG9mZmxpbmVSZWNoYXJnZU1lbixcbiAgICAg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BwcmljZTogMCxcbiAgICB9LFxuICAgIG9mZmxpbmVSZWNoYXJnZURhdGE6IHtcbiAgICAgIHRpdGxlOiAn57q/5LiL5YWF5YC8JyxcbiAgICAgIG51bWJlclR5cGU6ICcxJyxcbiAgICAgIGNvdW50OiAwLFxuICAgICAgcHJpY2U6IDAsXG4gICAgfSxcbiAgICBjb21zdW1lckRhdGE6IHtcbiAgICAgIHRpdGxlOiAn5raI6LS55oC76aKdJyxcbiAgICAgIG51bWJlclR5cGU6ICdwcmljZScsXG4gICAgICBjb3VudDogMCxcbiAgICB9LFxuICAgIGNvbXN1bWVyQ291bnQ6IHtcbiAgICAgIHRpdGxlOiAn5raI6LS55oC756yU5pWwJyxcbiAgICAgIG51bWJlclR5cGU6ICcnLFxuICAgICAgY291bnQ6IDAsXG4gICAgfSxcbiAgICByZWZ1bmREYXRhOiB7XG4gICAgICB0aXRsZTogJ+mAgOasvuaAu+minScsXG4gICAgICBudW1iZXJUeXBlOiAncHJpY2UnLFxuICAgICAgY291bnQ6IDAsXG4gICAgfSxcbiAgICByZWZ1bmRDb3VudDoge1xuICAgICAgdGl0bGU6ICfpgIDmrL7mgLvnrJTmlbAnLFxuICAgICAgbnVtYmVyVHlwZTogJycsXG4gICAgICBjb3VudDogMCxcbiAgICB9LFxuICAgIHRlc3REYXRhOiB7XG4gICAgICB0aXRsZTogJ+WFheWAvOaAu+minScsXG4gICAgICBudW1iZXJUeXBlOiAncHJpY2UnLFxuICAgICAgY291bnQ6IDAsXG4gICAgfSxcbiAgICB0ZXN0RGF0YTI6IHtcbiAgICAgIHRpdGxlOiAn57q/5LiK5YWF5YC8JyxcbiAgICAgIG51bWJlclR5cGU6ICcxJyxcbiAgICAgIGNvdW50OiAwLFxuICAgICAgcHJpY2U6IDAsXG4gICAgfSxcbiAgfSxcbiAgbWV0aG9kczoge1xuICAgIGNoYW5nZVRpbWVUeXBlKGUpIHtcbiAgICAgIGNvbnN0IHsgdGltZXR5cGUgfSA9IGUuY3VycmVudF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ogZW50aXR5LFxuICAgICAgfSkudGhlbihyZXMgPT4ge1xuICAgICAgICBjb25zdCBkYXRhID0gcmVzLnJlY2hhcmdlT3JkZXJDb3VudFZvO1xuICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgIHJlY2hhcmdlTWVuLFxuICAgICAgICAgICAgcmVjaGFyZ2VNb25leSxcbiAgICAgICAgICAgIHJlZnVuZENvdW50LFxuICAgICAgICAgICAgcmVmdW5kTW9uZXksXG4gICAgICAgICAgICBvZmZsaW5lUmVjaGFyZ2VNZW4sXG4gICAgICAgICAgICBvZmZsaW5lUmVjaGFyZ2VNb25leSxcbiAgICAgICAgICAgIG9ubGluZVJlY2hhcmdlTWVuLFxuICAgICAgICAgICAgb25saW5lUmVjaGFyZ2VNb25leSxcbiAgICAgICAgICB9ID0gZGF0YTtcbiAgICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgICAgJ3JlY2hhcmdlRGF0YS5jb3VudCc6IHJlY2hhcmdlTW9uZXksXG4gICAgICAgICAgICAncmVjaGFyZ2VDb3VudC5jb3VudCc6IHJlY2hhcmdlTWVuLFxuICAgICAgICAgICAgJ3JlZnVuZERhdGEuY291bnQnOiByZWZ1bmRNb25leSxcbiAgICAgICAgICAgICdyZWZ1bmRDb3VudC5jb3VudCc6IHJlZnVuZENvdW50LFxuICAgICAgICAgICAgJ29ubGluZVJlY2hhcmdlRGF0YS5wcmljZSc6IG9ubGluZVJlY2hhcmdlTW9uZXksXG4gICAgICAgICAgICAnb25saW5lUmVjaGFyZ2VEYXRhLmNvdW50Jzogb25saW5lUmVjaGFyZ2VNZW4sXG4gICAgICAgICAgICAnb2ZmbGluZVJlY2hhcmdlRGF0YS5wcmljZSc6IG9mZmxpbmVSZWNoYXJnZU1vbmV5LFxuICAgICAgICAgICAgJ29mZmxpbmVSZWNoYXJnZURhdGEuY291bnQnOiBvZmZsaW5lUmVjaGFyZ2VNZW4sXG4gICAgICAg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AgICAgICAgICAgY291bnQ6IGl0ZW0ucGF5TWVuLFxuICAgICAgICAgICAgcHJpY2U6IGl0ZW0ucGF5YWJsZU1vbmV5LFxuICAgICAgICAgIH0pKSxcbiAgICAgICAgICAnY29tc3VtZXJEYXRhLmNvdW50JzpcbiAgICAgICAgICAgIGNvbnN1bWVDb3VudFZvICYmIGNvbnN1bWVDb3VudFZvLnBheWFibGVNb25leVxuICAgICAgICAgICAgICA/IGNvbnN1bWVDb3VudFZvLnBheWFibGVNb25leVxuICAgICAgICAgICAgICA6IDAsXG4gICAgICAgICAgJ2NvbXN1bWVyQ291bnQuY291bnQnOlxuICAgICAgICAgICAgY29uc3VtZUNvdW50Vm8gJiYgY29uc3VtZUNvdW50Vm8ucGF5TWVuID8gY29uc3VtZUNvdW50Vm8ucGF5TWVuIDogMCxcbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIFByb21pc2UuYWxsKFtjb25zdW1lRGF0YUZldGNoLCByZWNoYXJnZURhdGFGZXRjaF0pXG4gICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycjogd3guR2VuZXJhbENhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IGVyci5lcnJNc2csXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
......@@ -3,8 +3,9 @@ import { formatTime } from '../../utils/util';
// miniprogram/pages/home/home.js
Component({
pageLifetimes: {
show() {
lifetimes: {
attached() {
console.log('in show ', this.data.fetched);
!this.data.fetched && this.fetchRechargeData();
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
......@@ -19,6 +20,7 @@ Component({
data: {
timeType: 0,
fetched: false,
serviceList: [],
rechargeData: {
title: '充值总额',
numberType: 'price',
......@@ -87,7 +89,9 @@ Component({
if (!timeType) timeType = this.data.timeType;
const today = formatTime(new Date());
let date = today.split(' ')[0];
let entity = {};
let entity = {
timeType,
};
if (timeType === 0) {
entity.date = date;
} else if (timeType === 1) {
......@@ -96,36 +100,73 @@ Component({
entity.year = date.slice(0, 4);
}
wx.showLoading({ title: '' });
statisticsFetch({
let rechargeDataFetch = statisticsFetch({
url: '/dcxy/reportInfo/queryRechargeOrderListV2',
method: 'POST',
data: entity,
})
.then(res => {
}).then(res => {
const data = res.rechargeOrderCountVo;
if (data) {
const {
rechargeMen,
rechargeMoney,
refundCount,
refundMoney,
offlineRechargeMen,
offlineRechargeMoney,
onlineRechargeMen,
onlineRechargeMoney,
} = data;
this.setData({
'rechargeData.count': rechargeMoney,
'rechargeCount.count': rechargeMen,
'refundData.count': refundMoney,
'refundCount.count': refundCount,
'onlineRechargeData.price': onlineRechargeMoney,
'onlineRechargeData.count': onlineRechargeMen,
'offlineRechargeData.price': offlineRechargeMoney,
'offlineRechargeData.count': offlineRechargeMen,
});
} else {
this.setData({
'rechargeData.count': 0,
'rechargeCount.count': 0,
'refundData.count': 0,
'refundCount.count': 0,
'onlineRechargeData.price': 0,
'onlineRechargeData.count': 0,
'offlineRechargeData.price': 0,
'offlineRechargeData.count': 0,
});
}
});
let consumeDataFetch = statisticsFetch({
url: '/dcxy/reportInfo/queryConsumeOrderList',
method: 'POST',
data: entity,
}).then(res => {
const { consumeCountVo, data } = res;
console.log(res);
this.setData({
serviceList: data.map(item => ({
serviceId: item.serviceId,
title: item.serviceName,
numberType: '1',
count: item.payMen,
price: item.payableMoney,
})),
'comsumerData.count':
consumeCountVo && consumeCountVo.payableMoney
? consumeCountVo.payableMoney
: 0,
'comsumerCount.count':
consumeCountVo && consumeCountVo.payMen ? consumeCountVo.payMen : 0,
});
});
Promise.all([consumeDataFetch, rechargeDataFetch])
.then(() => {
wx.hideLoading();
const data = res.rechargeOrderCountVo;
if (data) {
const {
rechargeMen,
rechargeMoney,
refundCount,
refundMoney,
offlineRechargeMen,
offlineRechargeMoney,
onlineRechargeMen,
onlineRechargeMoney,
} = data;
this.setData({
'rechargeData.count': rechargeMoney,
'rechargeCount.count': rechargeMen,
'refundData.count': refundMoney,
'refundCount.count': refundCount,
'onlineRechargeData.price': onlineRechargeMoney,
'onlineRechargeData.count': onlineRechargeMen,
'offlineRechargeData.price': offlineRechargeMoney,
'offlineRechargeData.count': offlineRechargeMen,
});
}
})
.catch((err: wx.GeneralCallbackResult) => {
wx.hideLoading();
......
......@@ -28,12 +28,7 @@
<price-and-count tag-data="{{comsumerData}}" />
<price-and-count tag-data="{{comsumerCount}}" />
<view class="padding"></view>
<service-count tag-data="{{testData2}}" />
<service-count tag-data="{{testData2}}" />
</view>
<view class="home-box">
<service-count tag-data="{{testData2}}" />
<service-count tag-data="{{testData2}}" />
<service-count wx:for="{{serviceList}}" wx:key="{{item.serviceId}}" tag-data="{{item}}" />
</view>
<view class="home-box">
<price-and-count tag-data="{{refundData}}" />
......
/* miniprogram/pages/home.wxss */
.home {
padding: 20rpx 0 96rpx;
}
.home-title {
display: flex;
justify-content: space-between;
......@@ -7,9 +9,11 @@
width: 100%;
padding: 0 40rpx 30rpx;
line-height: 40rpx;
border-bottom: 1px solid #efeff4;
}
.home-title-type, .title-type-item {
.home-title-type,
.title-type-item {
display: flex;
align-items: center;
}
......@@ -41,10 +45,10 @@
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
border-top: 1px solid #efeff4;
justify-content: space-between;
/* border-top: 1px solid #efeff4; */
width: 100%;
padding: 40rpx 48rpx;
padding: 40rpx 48rpx 20rpx;
}
.home-box:last-child {
......
"use strict";
Page({
data: {
userInfo: {},
selected: 0,
list: [
{
......@@ -25,4 +26,4 @@ Page({
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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ltYWdlcy90YWJfc2h1anVfcHJlQDJ4LnBuZycsXG4gICAgICAgIHRleHQ6ICfmlbDmja7pppbpobUnLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcGFnZVBhdGg6ICcvcGFnZXMvcmVwb3J0L3JlcG9ydCcsXG4gICAgICAgIGljb25QYXRoOiAnL2ltYWdlcy90YWJfYmFvYmlhb19ub3JAMngucG5nJyxcbiAgICAgICAgc2VsZWN0ZWRJY29uUGF0aDogJy9pbWFnZXMvdGFiX2Jhb2JpYW9fcHJlQDJ4LnBuZycsXG4gICAgICAgIHRleHQ6ICfmiqXooajliIbmnpAnLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuICBjbGlja0hhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coJ2luIGNsaWNrJywgZSlcbiAgICBsZXQgeyBwYXRoLCBpbmRleCB9ID0gZS5kZXRhaWw7XG4gICAgLy8gY29uc29sZS5sb2cocGF0aCwgaW5kZXgpO1xuICAgIC8vIHd4LnN3aXRjaFRhYih7IHVybDogcGF0aCB9KTtcbiAgICB0aGlzLnNldERhdGEoe1xuICAgICAgc2VsZWN0ZWQ6IGluZGV4LFxuICAgIH0pO1xuICB9LFxufSkiXX0=
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZUFuZFJlcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWVBbmRSZXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQUksQ0FBQztJQUNILElBQUksRUFBRTtRQUNKLFFBQVEsRUFBRSxFQUFFO1FBQ1osUUFBUSxFQUFFLENBQUM7UUFDWCxJQUFJLEVBQUU7WUFDSjtnQkFDRSxRQUFRLEVBQUUsa0JBQWtCO2dCQUM1QixRQUFRLEVBQUUsOEJBQThCO2dCQUN4QyxnQkFBZ0IsRUFBRSw4QkFBOEI7Z0JBQ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ooajliIbmnpAnLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuICBjbGlja0hhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coJ2luIGNsaWNrJywgZSk7XG4gICAgbGV0IHsgcGF0aCwgaW5kZXggfSA9IGUuZGV0YWlsO1xuICAgIC8vIGNvbnNvbGUubG9nKHBhdGgsIGluZGV4KTtcbiAgICAvLyB3eC5zd2l0Y2hUYWIoeyB1cmw6IHBhdGggfSk7XG4gICAgdGhpcy5zZXREYXRhKHtcbiAgICAgIHNlbGVjdGVkOiBpbmRleCxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
Page({
data: {
userInfo: {},
selected: 0,
list: [
{
......@@ -17,7 +18,7 @@ Page({
],
},
clickHandle(e) {
console.log('in click', e)
console.log('in click', e);
let { path, index } = e.detail;
// console.log(path, index);
// wx.switchTab({ url: path });
......@@ -25,4 +26,4 @@ Page({
selected: index,
});
},
})
\ No newline at end of file
});
<!--miniprogram/pages/homeAndReport/homeAndReport.wxml-->
<!-- miniprogram/pages/homeAndReport/homeAndReport.wxml -->
<view class="container">
<home wx:if="{{selected === 0}}" />
<report wx:elif="{{selected === 1}}" />
<report wx:elif="{{selected === 1}}" userInfo="{{userInfo}}" />
<tab-bar checked="{{selected}}" listData="{{list}}" bindcustomevent="clickHandle"></tab-bar>
</view>
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
var blueimp_md5_1 = require("blueimp-md5");
var md5 = require('blueimp-md5');
var app = getApp();
Page({
onLoad: function () {
if (app.globalData.token) {
this.tokenLoagin();
}
},
data: {
account: '',
pwd: '',
......@@ -30,10 +35,56 @@ Page({
}
return true;
},
tokenLoagin: function () {
wx.showLoading({ title: '登陆中' });
fetch_1.systemFetch({
url: '/login/verifyCode',
})
.then(function (res) {
console.log(res);
return {
code: res.data.verifyCode,
cookie: res.header['Set-Cookie'],
};
})
.then(function (_a) {
var cookie = _a.cookie;
return fetch_1.systemFetch({
url: '/login',
method: 'POST',
header: {
cookie: cookie,
},
data: {
token: app.globalData.token,
},
});
})
.then(function (res) {
console.log(res);
var _a = res.data, userInfo = _a.userInfo, userRoles = _a.userRoles;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
wx.hideLoading();
wx.redirectTo({
url: '/pages/homeAndReport/homeAndReport',
});
})
.catch(function (err) {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
loginHandle: function () {
console.log(app.globalData);
if (this.validateLoginData()) {
var _a = this.data, account_1 = _a.account, pwd_1 = _a.pwd;
console.log(account_1, pwd_1);
wx.showLoading({ title: '' });
fetch_1.systemFetch({
url: '/login/verifyCode',
})
......@@ -46,6 +97,7 @@ Page({
})
.then(function (_a) {
var code = _a.code, cookie = _a.cookie;
var mixpwd = md5(pwd_1);
return fetch_1.systemFetch({
url: '/login',
method: 'POST',
......@@ -54,16 +106,33 @@ Page({
},
data: {
account: account_1,
pwd: blueimp_md5_1.default(pwd_1),
pwd: mixpwd,
varifyCode: code,
},
});
})
.then(function (res) {
console.log(res);
var token = res.token, _a = res.data, userInfo = _a.userInfo, userRoles = _a.userRoles;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
try {
wx.setStorageSync('token', token);
}
catch (error) { }
wx.hideLoading();
wx.redirectTo({
url: '/pages/homeAndReport/homeAndReport',
});
})
.catch(function (err) {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
}
},
......@@ -81,6 +150,5 @@ Page({
_a));
var _a;
},
onLoad: function () { },
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLHlDQUE4QztBQUM5QywyQ0FBOEI7QUFHOUIs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Y2NvdW50KSB7XG4gICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICB0aXRsZTogJ+ivt+i+k+WFpei0puaItycsXG4gICAgICB9KTtcbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKCFwd2QpIHtcbiAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgIHRpdGxlOiAn6K+36L6T5YWl5a+G56CBJyxcbiAgICAgIH0pO1xuICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSxcbiAgbG9naW5IYW5kbGUoKSB7XG4gICAgaWYgKHRoaXMudmFsaWRhdGVMb2dpbkRhdGEoKSkge1xuICAgICAgY29uc3QgeyBhY2NvdW50LCBwd2QgfSA9IHRoaXMuZGF0YTtcbiAgICAgIGNvbnNvbGUubG9nKGFjY291bnQsIHB3ZCk7XG4gICAgICBzeXN0ZW1GZXRjaCh7XG4gICAgICAgIHVybDogJy9sb2dpbi92ZXJpZnlDb2RlJyxcbiAgICAgIH0pXG4gICAgICAgIC50aGVuKChyZXM6IHd4LlJlcXVlc3RTdWNjZXNzQ2FsbGJhY2tSZXN1bHQpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb2RlOiByZXMuZGF0YS52ZXJpZnlDb2RlLFxuICAgICAgICAgICAgY29va2llOiByZXMuaGVhZGVyWydTZXQtQ29va2llJ10sXG4gICAgICAgICAgfTtcbiAgICAgICAgfSlcbiAgICAgICAgLnRoZW4oKHsgY29kZSwgY29va2llIH06IHsgY29kZTogc3RyaW5nOyBjb29raWU6IHN0cmluZyB9KSA9PlxuICAgICAgICAgIHN5c3RlbUZldGNoKHtcbiAgICAgICAgICAgIHVybDogJy9sb2dpbicsXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgIGhlYWRlcjoge1xuICAgICAgICAgICAgICBjb29raWU6IGNvb2tpZSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgIGFjY291bnQsXG4gICAgICAgICAgICAgIHB3ZDogbWQ1KHB3ZCksXG4gICAgICAgICAgICAgIHZhcmlmeUNvZGU6IGNvZGUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pLFxuICAgICAgICApXG4gICAgICAgIC50aGVuKHJlcyA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIC8vIGZldGNoKClcbiAgICAvLyB3eC5yZWRpcmVjdFRvKHtcbiAgICAvLyAgIHVybDogJy9wYWdlcy9ob21lL2hvbWUnXG4gICAgLy8gfSlcbiAgfSxcbiAgbmFtZUlucHV0SGFuZGxlKGUpIHtcbiAgICBjb25zdCB2YWx1ZSA9IGUuZGV0YWlsLnZhbHVlO1xuICAgIHRoaXMudXBkYXRlSW5wdXRWYWx1ZSgnYWNjb3VudCcsIHZhbHVlKTtcbiAgfSxcbiAgcGFzc3dhcmRJbm91dEhhbmRsZShlKSB7XG4gICAgY29uc3QgdmFsdWUgPSBlLmRldGFpbC52YWx1ZTtcbiAgICB0aGlzLnVwZGF0ZUlucHV0VmFsdWUoJ3B3ZCcsIHZhbHVlKTtcbiAgfSxcbiAgdXBkYXRlSW5wdXRWYWx1ZShrZXk6IHN0cmluZywgdmFsdWU6IHN0cmluZykge1xuICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgW2tleV06IHZhbHVlLFxuICAgIH0pO1xuICB9LFxuICBvbkxvYWQoKSB7fSxcbn0pO1xuIl19
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ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ICAgc3lzdGVtRmV0Y2goe1xuICAgICAgdXJsOiAnL2xvZ2luL3ZlcmlmeUNvZGUnLFxuICAgIH0pXG4gICAgICAudGhlbigocmVzOiB3eC5SZXF1ZXN0U3VjY2Vzc0NhbGxiYWNrUmVzdWx0KSA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgY29kZTogcmVzLmRhdGEudmVyaWZ5Q29kZSxcbiAgICAgICAgICBjb29raWU6IHJlcy5oZWFkZXJbJ1NldC1Db29raWUnXSxcbiAgICAgICAgfTtcbiAgICAgIH0pXG4gICAgICAudGhlbigoeyBjb29raWUgfTogeyBjb2RlOiBzdHJpbmc7IGNvb2tpZTogc3RyaW5nIH0pID0+XG4gICAgICAgIHN5c3RlbUZldGNoKHtcbiAgICAgICAgICB1cmw6ICcvbG9naW4nLFxuICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgIGhlYWRlcjoge1xuICAgICAgICAgICAgY29va2llOiBjb29raWUsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICB0b2tlbjogYXBwLmdsb2JhbERhdGEudG9rZW4sXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApXG4gICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAgICAgICBjb25zdCB7XG4gICAgICAgICAgZGF0YTogeyB1c2VySW5mbywgdXNlclJvbGVzIH0sXG4gICAgICAgIH0gPSByZXM7XG4gICAgICAgIGFwcC5nbG9iYWxEYXRhLnVzZXJJbmZvID0gdXNlckluZm87XG4gICAgICAgIGFwcC5nbG9iYWxEYXRhLnVzZXJSb2xlcyA9IHVzZXJSb2xlcztcbiAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgd3gucmVkaXJlY3RUbyh7XG4gICAgICAgICAgdXJsOiAnL3BhZ2VzL2hvbWVBbmRSZXBvcnQvaG9tZUFuZFJlcG9ydCcsXG4gICAgICAgIH0pO1xuICAgICAgfSlcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgIHRpdGxlOiBlcnIuZXJyTXNnLFxuICAgICAgICAgIGljb246ICdub25lJyxcbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgfSxcbiAgbG9naW5IYW5kbGUoKSB7XG4gICAgY29uc29sZS5sb2coYXBwLmdsb2JhbERhdGEpO1xuICAgIGlmICh0aGlzLnZhbGlkYXRlTG9naW5EYXRhKCkpIHtcbiAgICAgIGNvbnN0IHsgYWNjb3VudCwgcHdkIH0gPSB0aGlzLmRhdGE7XG4gICAgICBjb25zb2xlLmxvZyhhY2NvdW50LCBwd2QpO1xuICAgICAgd3guc2hvd0xvYWRpbmcoeyB0aXRsZTogJycgfSk7XG4gICAgICBzeXN0ZW1GZXRjaCh7XG4gICAgICAgIHVybDogJy9sb2dpbi92ZXJpZnlDb2RlJyxcbiAgICAgIH0pXG4gICAgICAgIC50aGVuKChyZXM6IHd4LlJlcXVlc3RTdWNjZXNzQ2FsbGJhY2tSZXN1bHQpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZyhyZXMpO1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb2RlOiByZXMuZGF0YS52ZXJpZnlDb2RlLFxuICAgICAgICAgICAgY29va2llOiByZXMuaGVhZGVyWydTZXQtQ29va2llJ10sXG4gICAgICAgICAgfTtcbiAgICAgICAgfSlcbiAgICAgICAgLnRoZW4oKHsgY29kZSwgY29va2llIH06IHsgY29kZTogc3RyaW5nOyBjb29raWU6IHN0cmluZyB9KSA9PiB7XG4gICAgICAgICAgbGV0IG1peHB3ZCA9IG1kNShwd2QpO1xuICAgICAgICAgIHJldHVybiBzeXN0ZW1GZXRjaCh7XG4gICAgICAgICAgICB1cmw6ICcvbG9naW4nLFxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICBoZWFkZXI6IHtcbiAgICAgICAgICAgICAgY29va2llOiBjb29raWUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICBhY2NvdW50LFxuICAgICAgICAgICAgICBwd2Q6IG1peHB3ZCxcbiAgICAgICAgICAgICAgdmFyaWZ5Q29kZTogY29kZSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlcyA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICB0b2tlbixcbiAgICAgICAgICAgIGRhdGE6IHsgdXNlckluZm8sIHVzZXJSb2xlcyB9LFxuICAgICAgICAgIH0gPSByZXM7XG4gICAgICAgICAgYXBwLmdsb2JhbERhdGEudG9rZW4gPSB0b2tlbjtcbiAgICAgICAgICBhcHAuZ2xvYmFsRGF0YS51c2VySW5mbyA9IHVzZXJJbmZvO1xuICAgICAgICAgIGFwcC5nbG9iYWxEYXRhLnVzZXJSb2xlcyA9IHVzZXJSb2xlcztcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgd3guc2V0U3RvcmFnZVN5bmMoJ3Rva2VuJywgdG9rZW4pO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7fVxuICAgICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gICAgICAgICAgd3gucmVkaXJlY3RUbyh7XG4gICAgICAgICAgICB1cmw6ICcvcGFnZXMvaG9tZUFuZFJlcG9ydC9ob21lQW5kUmVwb3J0JyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgICAgICB0aXRsZTogZXJyLmVyck1zZyxcbiAgICAgICAgICAgIGljb246ICdub25lJyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIC8vIGZldGNoKClcbiAgICAvLyB3eC5yZWRpcmVjdFRvKHtcbiAgICAvLyAgIHVybDogJy9wYWdlcy9ob21lL2hvbWUnXG4gICAgLy8gfSlcbiAgfSxcbiAgbmFtZUlucHV0SGFuZGxlKGUpIHtcbiAgICBjb25zdCB2YWx1ZSA9IGUuZGV0YWlsLnZhbHVlO1xuICAgIHRoaXMudXBkYXRlSW5wdXRWYWx1ZSgnYWNjb3VudCcsIHZhbHVlKTtcbiAgfSxcbiAgcGFzc3dhcmRJbm91dEhhbmRsZShlKSB7XG4gICAgY29uc3QgdmFsdWUgPSBlLmRldGFpbC52YWx1ZTtcbiAgICB0aGlzLnVwZGF0ZUlucHV0VmFsdWUoJ3B3ZCcsIHZhbHVlKTtcbiAgfSxcbiAgdXBkYXRlSW5wdXRWYWx1ZShrZXk6IHN0cmluZywgdmFsdWU6IHN0cmluZykge1xuICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgW2tleV06IHZhbHVlLFxuICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
//index.js
import { systemFetch } from '../../api/fetch';
import md5 from 'blueimp-md5';
const md5 = require('blueimp-md5');
//获取应用实例
import { IMyApp } from '../../app';
const app = getApp<IMyApp>();
Page({
onLoad() {
if (app.globalData.token) {
this.tokenLoagin();
}
},
data: {
account: '',
pwd: '',
......@@ -32,10 +37,57 @@ Page({
}
return true;
},
tokenLoagin() {
wx.showLoading({ title: '登陆中' });
systemFetch({
url: '/login/verifyCode',
})
.then((res: wx.RequestSuccessCallbackResult) => {
console.log(res);
return {
code: res.data.verifyCode,
cookie: res.header['Set-Cookie'],
};
})
.then(({ cookie }: { code: string; cookie: string }) =>
systemFetch({
url: '/login',
method: 'POST',
header: {
cookie: cookie,
},
data: {
token: app.globalData.token,
},
}),
)
.then(res => {
console.log(res);
const {
data: { userInfo, userRoles },
} = res;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
wx.hideLoading();
wx.redirectTo({
url: '/pages/homeAndReport/homeAndReport',
});
})
.catch(err => {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
loginHandle() {
console.log(app.globalData);
if (this.validateLoginData()) {
const { account, pwd } = this.data;
console.log(account, pwd);
wx.showLoading({ title: '' });
systemFetch({
url: '/login/verifyCode',
})
......@@ -46,8 +98,9 @@ Page({
cookie: res.header['Set-Cookie'],
};
})
.then(({ code, cookie }: { code: string; cookie: string }) =>
systemFetch({
.then(({ code, cookie }: { code: string; cookie: string }) => {
let mixpwd = md5(pwd);
return systemFetch({
url: '/login',
method: 'POST',
header: {
......@@ -55,16 +108,35 @@ Page({
},
data: {
account,
pwd: md5(pwd),
pwd: mixpwd,
varifyCode: code,
},
}),
)
});
})
.then(res => {
console.log(res);
const {
token,
data: { userInfo, userRoles },
} = res;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
try {
wx.setStorageSync('token', token);
} catch (error) {}
wx.hideLoading();
wx.redirectTo({
url: '/pages/homeAndReport/homeAndReport',
});
})
.catch(err => {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
}
// fetch()
......@@ -85,5 +157,4 @@ Page({
[key]: value,
});
},
onLoad() {},
});
"use strict";
var chart = null;
function initChart(canvas, width, height, F2) {
var data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
{ year: '1956 年', sales: 61 },
{ year: '1957 年', sales: 145 },
{ year: '1958 年', sales: 48 },
{ year: '1959 年', sales: 38 },
{ year: '1960 年', sales: 38 },
{ year: '1962 年', sales: 38 },
];
chart = new F2.Chart({
el: canvas,
width: width,
height: height
});
chart.source(data, {
sales: {
tickCount: 5
}
});
chart.tooltip({
showItemMarker: false,
onShow: function (ev) {
var items = ev.items;
items[0].name = null;
items[0].name = items[0].title;
items[0].value = '¥ ' + items[0].value;
}
});
chart.interval().position('year*sales');
chart.axis('sales', false);
chart.render();
return chart;
}
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
var util_1 = require("../../utils/util");
Page({
onLoad: function () {
this.initData();
this.fetchAreaList();
},
data: {
opts: {
onInit: initChart
},
areaList: [],
month: '',
areaId: 0,
rechargeData: {
title: '充值总额',
numberType: 'price',
count: 12000,
count: 0,
},
rechargeCount: {
title: '充值笔数',
numberType: '',
count: 12000,
count: 0,
},
}
rechargeAndRefundList: [],
consumeData: {
title: '消费总额',
numberType: 'price',
count: 0,
},
consumeCount: {
title: '消费笔数',
numberType: '',
count: 0,
},
consumeList: [],
serviceTypeList: [],
payTypeList: [],
},
initData: function () {
var _this = this;
var time = util_1.formatTime(new Date());
console.log(time);
this.setData({ month: time.slice(0, 7) }, function () {
_this.fetchList();
});
},
fetchAreaList: function () {
var _this = this;
fetch_1.baseFetch({
url: '/dcxy/baseArea/queryAll',
})
.then(function (res) {
if (res.data) {
_this.setData({
areaList: res.data,
});
}
else {
_this.setData({
areaList: [],
});
}
})
.catch(function (err) {
console.log(err);
});
},
areaChangeHandle: function (val) {
console.log('areaChangeHandle', val);
var value = val.detail.value;
this.fetchList({ areaId: [value] });
},
fetchList: function (entity) {
this.fetchRechargeData(entity);
this.fetchConsumeData(entity);
this.fetchServiceTypeList(entity);
this.fetchPayTypeList(entity);
},
fetchConsumeData: function (entity) {
var _this = this;
var reqBody = __assign({ month: this.data.month }, entity);
if (this.data.areaId)
reqBody.areaId = this.data.areaId;
fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/dailyConsumeCount',
method: 'POST',
data: reqBody,
})
.then(function (res) {
var dayList = new Array(31)
.fill({
payMen: 0,
payableMoney: 0,
})
.map(function (v, idx) { return (__assign({}, v, { days: idx + 1 })); });
var consumePrice = 0;
var consumeCount = 0;
if (res.data && res.data.length) {
var oList = res.data;
for (var index = 0; index < oList.length; index++) {
var element = oList[index];
consumePrice += element.payableMoney;
consumeCount += element.payMen;
var daysIndex = element.createDate.slice(-2);
dayList[daysIndex] = __assign({}, dayList[daysIndex], { payMen: element.payMen, payableMoney: element.payableMoney });
}
}
_this.setData({
consumeList: dayList,
'consumeData.count': consumePrice,
'consumeCount.count': consumeCount,
});
})
.catch(function (err) {
console.log(err);
});
},
fetchRechargeData: function (entity) {
var _this = this;
var reqBody = __assign({ month: this.data.month }, entity);
if (this.data.areaId)
reqBody.areaId = this.data.areaId;
fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/queryRechargeListDaily',
method: 'POST',
data: reqBody,
})
.then(function (res) {
var dayList = new Array(31)
.fill({
rechargeMoney: 0,
rechargeMen: 0,
refundCount: 0,
refundMoney: 0,
})
.map(function (v, idx) { return (__assign({}, v, { days: idx + 1 })); });
var rechargePrice = 0;
var rechargeCount = 0;
if (res.data && res.data.length) {
var oList = res.data;
for (var index = 0; index < oList.length; index++) {
var element = oList[index];
rechargePrice += element.rechargeMoney;
rechargeCount += element.rechargeMen;
var daysIndex = element.completeAt.slice(-2);
dayList[daysIndex] = __assign({}, dayList[daysIndex], { rechargeMoney: element.rechargeMoney, rechargeMen: element.rechargeMen, refundCount: element.refundCount, refundMoney: element.refundMoney });
}
}
_this.setData({
rechargeAndRefundList: dayList,
'rechargeData.count': rechargePrice,
'rechargeCount.count': rechargeCount,
});
})
.catch(function (err) {
console.log(err);
});
},
fetchServiceTypeList: function (entity) {
var _this = this;
var reqBody = __assign({ month: this.data.month }, entity);
if (this.data.areaId)
reqBody.areaId = this.data.areaId;
fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/serviceConsume',
method: 'POST',
data: reqBody,
})
.then(function (res) {
console.log(res);
_this.setData({
serviceTypeList: res.data,
});
})
.catch(function (err) {
console.log(err);
});
},
fetchPayTypeList: function (entity) {
var _this = this;
var reqBody = __assign({ month: this.data.month }, entity);
if (this.data.areaId)
reqBody.areaId = this.data.areaId;
fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/payTypeConsume',
method: 'POST',
data: reqBody,
})
.then(function (res) {
console.log(res);
if (res.data) {
var keyMap_1 = {
aimi: '艾米豆',
bean: '消费豆',
discount: '优惠金额',
online: '线上支付',
};
var dataList = Object.keys(res.data).map(function (key) { return ({
key: key,
a: '1',
name: keyMap_1[key],
count: res.data[key],
}); });
_this.setData({
payTypeList: dataList,
});
}
})
.catch(function (err) {
console.log(err);
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9udGhPcGVyYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm1vbnRoT3BlcmF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQUksS0FBSyxHQUFHLElBQUksQ0FBQztBQUVqQixtQkFBbUIsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsRUFBRTtJQUMxQyxJQUFNLElBQUksR0FBRztRQUNYLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFO1FBQzdCLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFO1FBQzdCLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFO1FBQzdCLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsR0FBRyxFQUFFO1FBQzlCLEVBQUUsSUFBSSxF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uQ2hhcnQoe1xuICAgIGVsOiBjYW52YXMsXG4gICAgd2lkdGgsXG4gICAgaGVpZ2h0XG4gIH0pO1xuXG4gIGNoYXJ0LnNvdXJjZShkYXRhLCB7XG4gICAgc2FsZXM6IHtcbiAgICAgIHRpY2tDb3VudDogNVxuICAgIH1cbiAgfSk7XG4gIGNoYXJ0LnRvb2x0aXAoe1xuICAgIHNob3dJdGVtTWFya2VyOiBmYWxzZSxcbiAgICBvblNob3coZXYpIHtcbiAgICAgIGNvbnN0IHsgaXRlbXMgfSA9IGV2O1xuICAgICAgaXRlbXNbMF0ubmFtZSA9IG51bGw7XG4gICAgICBpdGVtc1swXS5uYW1lID0gaXRlbXNbMF0udGl0bGU7XG4gICAgICBpdGVtc1swXS52YWx1ZSA9ICfCpSAnICsgaXRlbXNbMF0udmFsdWU7XG4gICAgfVxuICB9KTtcbiAgY2hhcnQuaW50ZXJ2YWwoKS5wb3NpdGlvbigneWVhcipzYWxlcycpO1xuICBjaGFydC5heGlzKCdzYWxlcycsZmFsc2UpXG4gIGNoYXJ0LnJlbmRlcigpO1xuICByZXR1cm4gY2hhcnQ7XG59XG5cblBhZ2Uoe1xuICBkYXRhOiB7XG4gICAgb3B0czoge1xuICAgICAgb25Jbml0OiBpbml0Q2hhcnRcbiAgICB9LFxuICAgIHJlY2hhcmdlRGF0YToge1xuICAgICAgdGl0bGU6ICflhYXlgLzmgLvpop0nLFxuICAgICAgbnVtYmVyVHlwZTogJ3ByaWNlJyxcbiAgICAgIGNvdW50OiAxMjAwMCxcbiAgICB9LFxuICAgIHJlY2hhcmdlQ291bnQ6IHtcbiAgICAgIHRpdGxlOiAn5YWF5YC856yU5pWwJyxcbiAgICAgIG51bWJlclR5cGU6ICcnLFxuICAgICAgY291bnQ6IDEyMDAwLFxuICAgIH0sXG4gIH1cbn0pO1xuIl19
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9udGhPcGVyYXRvci5qcyI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gICAgICAgICAgIGNvbnN1bWVQcmljZSArPSBlbGVtZW50LnBheWFibGVNb25leTtcbiAgICAgICAgICAgIGNvbnN1bWVDb3VudCArPSBlbGVtZW50LnBheU1lbjtcbiAgICAgICAgICAgIGxldCBkYXlzSW5kZXggPSBlbGVtZW50LmNyZWF0ZURhdGUuc2xpY2UoLTIpO1xuICAgICAgICAgICAgZGF5TGlzdFtkYXlzSW5kZXhdID0ge1xuICAgICAgICAgICAgICAuLi5kYXlMaXN0W2RheXNJbmRleF0sXG4gICAgICAgICAgICAgIHBheU1lbjogZWxlbWVudC5wYXlNZW4sXG4gICAgICAgICAgICAgIHBheWFibGVNb25leTogZWxlbWVudC5wYXlhYmxlTW9uZXksXG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICBjb25zdW1lTGlzdDogZGF5TGlzdCxcbiAgICAgICAgICAnY29uc3VtZURhdGEuY291bnQnOiBjb25zdW1lUHJpY2UsXG4gICAgICAgICAgJ2NvbnN1bWVDb3VudC5jb3VudCc6IGNvbnN1bWVDb3VudCxcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICB9KTtcbiAgfSxcbiAgZmV0Y2hSZWNoYXJnZURhdGEoZW50aXR5PzogeyBhcmVhSWQ/OiBudW1iZXI7IG1vbnRoPzogc3RyaW5nIH0pIHtcbiAgICBsZXQgcmVxQm9keSA9IHtcbiAgICAgIG1vbnRoOiB0aGlzLmRhdGEubW9udGgsXG4gICAgICAuLi5lbnRpdHksXG4gICAgfTtcbiAgICBpZiAodGhpcy5kYXRhLmFyZWFJZCkgcmVxQm9keS5hcmVhSWQgPSB0aGlzLmRhdGEuYXJlYUlkO1xuICAgIHN0YXRpc3RpY3NGZXRjaCh7XG4gICAgICB1cmw6ICcvZGN4eS9yZXBvcnRJ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cy5zZXREYXRhISh7XG4gICAgICAgICAgc2VydmljZVR5cGVMaXN0OiByZXMuZGF0YSxcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICB9KTtcbiAgfSxcbiAgZmV0Y2hQYXlUeXBlTGlzdChlbnRpdHkpIHtcbiAgICBsZXQgcmVxQm9keSA9IHtcbiAgICAgIG1vbnRoOiB0aGlzLmRhdGEubW9udGgsXG4gICAgICAuLi5lbnRpdHksXG4gICAgfTtcbiAgICBpZiAodGhpcy5kYXRhLmFyZWFJZCkgcmVxQm9keS5hcmVhSWQgPSB0aGlzLmRhdGEuYXJlYUlkO1xuICAgIHN0YXRpc3RpY3NGZXRjaCh7XG4gICAgICB1cmw6ICcvZGN4eS9yZXBvcnRJbmZvL3BheVR5cGVDb25zdW1lJyxcbiAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgZGF0YTogcmVxQm9keSxcbiAgICB9KVxuICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgaWYgKHJlcy5kYXRhKSB7XG4gICAgICAgICAgY29uc3Qga2V5TWFwID0ge1xuICAgICAgICAgICAgYWltaTogJ+iJvuexs+ixhicsXG4gICAgICAgICAgICBiZWFuOiAn5raI6LS56LGGJyxcbiAgICAgICAgICAgIGRpc2NvdW50OiAn5LyY5oOg6YeR6aKdJyxcbiAgICAgICAgICAgIG9ubGluZTogJ+e6v+S4iuaUr+S7mCcsXG4gICAgICAgICAgfTtcbiAgICAgICAgICBsZXQgZGF0YUxpc3QgPSBPYmplY3Qua2V5cyhyZXMuZGF0YSkubWFwKGtleSA9PiAoe1xuICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgYTogJzEnLFxuICAgICAgICAgICAgbmFtZToga2V5TWFwW2tleV0sXG4gICAgICAgICAgICBjb3VudDogcmVzLmRhdGFba2V5XSxcbiAgICAgICAgICB9KSk7XG4gICAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgICBwYXlUeXBlTGlzdDogZGF0YUxpc3QsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"navigationBarTitleText": "月度运营分析",
"usingComponents": {
"ff-canvas": "@antv/f2-canvas",
"c-select": "../components/Select/Select",
"recharge-chart": "../components/RechargeChart/RechargeChart",
"refund-chart": "../components/RefundChart/RefundChart",
"consume-chart": "../components/ConsumeChart/ConsumeChart",
"consume-count-chart": "../components/ConsumeCountChart/ConsumeCountChart",
"service-type-chart": "../components/ServiceTypeChart/ServiceTypeChart",
"pay-type-chart": "../components/PayTypeChart/PayTypeChart",
"price-and-count": "../components/PriceAndCount/PriceAndCount"
}
}
\ No newline at end of file
}
let chart = null;
function initChart(canvas, width, height, F2) {
const data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
{ year: '1956 年', sales: 61 },
{ year: '1957 年', sales: 145 },
{ year: '1958 年', sales: 48 },
{ year: '1959 年', sales: 38 },
{ year: '1960 年', sales: 38 },
{ year: '1962 年', sales: 38 },
];
chart = new F2.Chart({
el: canvas,
width,
height
});
chart.source(data, {
sales: {
tickCount: 5
}
});
chart.tooltip({
showItemMarker: false,
onShow(ev) {
const { items } = ev;
items[0].name = null;
items[0].name = items[0].title;
items[0].value = '¥ ' + items[0].value;
}
});
chart.interval().position('year*sales');
chart.axis('sales',false)
chart.render();
return chart;
}
import { baseFetch, statisticsFetch } from '../../api/fetch';
import { formatTime } from '../../utils/util';
Page({
onLoad() {
this.initData();
this.fetchAreaList();
},
data: {
opts: {
onInit: initChart
},
areaList: [],
month: '',
areaId: 0,
rechargeData: {
title: '充值总额',
numberType: 'price',
count: 12000,
count: 0,
},
rechargeCount: {
title: '充值笔数',
numberType: '',
count: 12000,
count: 0,
},
rechargeAndRefundList: [],
consumeData: {
title: '消费总额',
numberType: 'price',
count: 0,
},
consumeCount: {
title: '消费笔数',
numberType: '',
count: 0,
},
}
consumeList: [],
serviceTypeList: [],
payTypeList: [],
},
initData() {
let time = formatTime(new Date());
console.log(time);
this.setData!({ month: time.slice(0, 7) }, () => {
this.fetchList();
});
},
fetchAreaList() {
baseFetch({
url: '/dcxy/baseArea/queryAll',
})
.then(res => {
if (res.data) {
this.setData!({
areaList: res.data,
});
} else {
this.setData!({
areaList: [],
});
}
})
.catch(err => {
console.log(err);
});
},
areaChangeHandle(val) {
console.log('areaChangeHandle', val);
const { value } = val.detail;
this.fetchList({ areaId: [value] });
},
fetchList(entity?: { areaId?: number; month?: string }) {
this.fetchRechargeData(entity);
this.fetchConsumeData(entity);
this.fetchServiceTypeList(entity);
this.fetchPayTypeList(entity);
},
fetchConsumeData(entity?: { areaId?: number; month?: string }) {
let reqBody = {
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/dailyConsumeCount',
method: 'POST',
data: reqBody,
})
.then(res => {
let dayList = new Array(31)
.fill({
payMen: 0,
payableMoney: 0,
})
.map((v, idx) => ({ ...v, days: idx + 1 }));
let consumePrice = 0;
let consumeCount = 0;
if (res.data && res.data.length) {
let oList = res.data;
for (let index = 0; index < oList.length; index++) {
const element = oList[index];
consumePrice += element.payableMoney;
consumeCount += element.payMen;
let daysIndex = element.createDate.slice(-2);
dayList[daysIndex] = {
...dayList[daysIndex],
payMen: element.payMen,
payableMoney: element.payableMoney,
};
}
}
this.setData!({
consumeList: dayList,
'consumeData.count': consumePrice,
'consumeCount.count': consumeCount,
});
})
.catch(err => {
console.log(err);
});
},
fetchRechargeData(entity?: { areaId?: number; month?: string }) {
let reqBody = {
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/queryRechargeListDaily',
method: 'POST',
data: reqBody,
})
.then(res => {
let dayList = new Array(31)
.fill({
rechargeMoney: 0,
rechargeMen: 0,
refundCount: 0,
refundMoney: 0,
})
.map((v, idx) => ({ ...v, days: idx + 1 }));
let rechargePrice = 0;
let rechargeCount = 0;
if (res.data && res.data.length) {
let oList = res.data;
for (let index = 0; index < oList.length; index++) {
const element = oList[index];
rechargePrice += element.rechargeMoney;
rechargeCount += element.rechargeMen;
let daysIndex = element.completeAt.slice(-2);
dayList[daysIndex] = {
...dayList[daysIndex],
rechargeMoney: element.rechargeMoney,
rechargeMen: element.rechargeMen,
refundCount: element.refundCount,
refundMoney: element.refundMoney,
};
}
}
this.setData!({
rechargeAndRefundList: dayList,
'rechargeData.count': rechargePrice,
'rechargeCount.count': rechargeCount,
});
})
.catch(err => {
console.log(err);
});
},
fetchServiceTypeList(entity) {
let reqBody = {
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/serviceConsume',
method: 'POST',
data: reqBody,
})
.then(res => {
console.log(res);
this.setData!({
serviceTypeList: res.data,
});
})
.catch(err => {
console.log(err);
});
},
fetchPayTypeList(entity) {
let reqBody = {
month: this.data.month,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/payTypeConsume',
method: 'POST',
data: reqBody,
})
.then(res => {
console.log(res);
if (res.data) {
const keyMap = {
aimi: '艾米豆',
bean: '消费豆',
discount: '优惠金额',
online: '线上支付',
};
let dataList = Object.keys(res.data).map(key => ({
key,
a: '1',
name: keyMap[key],
count: res.data[key],
}));
this.setData!({
payTypeList: dataList,
});
}
})
.catch(err => {
console.log(err);
});
},
});
<!--miniprogram/pages/monthOperator/monthOperator.wxml-->
<!-- miniprogram/pages/monthOperator/monthOperator.wxml -->
<view class="monthOperator">
<view class="monthOperator-filter">
<view class="monthOperator-area">
<c-select mode="selector" range="{{areaList}}" range-key="{{'areaName'}}" bindchange="areaChangeHandle" placeholder="所属区域选择" />
</view>
<view class="monthOperator-time">
<c-select mode="date" fields="month" value="{{month}}" bindchange="bindPickerChange" />
</view>
</view>
<view class="monthOperator-block">
<view class="monthOperator-title">
<view class="monthOperator-title-color recharge"></view>
......@@ -10,7 +18,7 @@
<price-and-count tag-data="{{rechargeCount}}" />
</view>
<view class="monthOperator-canvas">
<ff-canvas id="column-dom" canvas-id="column" opts="{{ opts }}" />
<recharge-chart dataList="{{rechargeAndRefundList}}" month="{{month}}" />
</view>
</view>
<view class="monthOperator-block">
......@@ -19,27 +27,27 @@
<view class="monthOperator-title-text">消费趋势</view>
</view>
<view class="monthOperator-data">
<price-and-count tag-data="{{rechargeData}}" />
<price-and-count tag-data="{{rechargeCount}}" />
<price-and-count tag-data="{{consumeData}}" />
<price-and-count tag-data="{{consumeCount}}" />
</view>
<view class="monthOperator-canvas">
<consume-chart dataList="{{consumeList}}" month="{{month}}" />
</view>
</view>
<view class="monthOperator-block">
<view class="monthOperator-title">
<view class="monthOperator-title-text">消费服务分类</view>
</view>
<view class="monthOperator-canvas">
<view class="monthOperator-canvas autoheight">
<service-type-chart dataList="{{serviceTypeList}}" />
</view>
</view>
<view class="monthOperator-block">
<view class="monthOperator-title">
<view class="monthOperator-title-text">消费服务分类</view>
<view class="monthOperator-title-text">消费方式分类</view>
</view>
<view class="monthOperator-canvas">
<pay-type-chart dataList="{{payTypeList}}" />
</view>
</view>
<view class="monthOperator-block">
......@@ -47,7 +55,7 @@
<view class="monthOperator-title-text">消费时间分布</view>
</view>
<view class="monthOperator-canvas">
<consume-count-chart dataList="{{consumeList}}" month="{{month}}" />
</view>
</view>
<view class="monthOperator-block">
......@@ -56,7 +64,7 @@
<view class="monthOperator-title-text">退款趋势</view>
</view>
<view class="monthOperator-canvas">
<refund-chart dataList="{{rechargeAndRefundList}}" month="{{month}}" />
</view>
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/monthOperator/monthOperator.wxss */
.monthOperator-filter {
padding: 20rpx 40rpx 0;
display: flex;
justify-content: space-between;
}
.monthOperator-area {
flex: 1;
}
.monthOperator-time {
width: 250rpx;
margin-left: 20rpx;
}
.monthOperator-block {
padding: 0 40rpx;
border-bottom: 8rpx solid #eef3fc;
......@@ -44,3 +55,6 @@
width: 660rpx;
height: 350rpx;
}
.monthOperator-canvas.autoheight{
height: auto;
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var app = getApp();
Component({
pageLifetimes: {
show: function () {
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 1
selected: 1,
});
}
}
},
},
lifetimes: {
attached: function () {
console.log(app.globalData.userInfo);
this.setData({
userInfo: app.globalData.userInfo,
});
},
},
data: {
userInfo: app.globalData.userInfo,
itemList: [
{
name: '月度运营分析',
......@@ -51,4 +61,4 @@ Component({
],
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxTQUFTLENBQUM7SUFDUixhQUFhLEVBQUU7UUFDYixJQUFJO1lBQ0YsRUFBRSxDQUFDLENBQUMsT0FBTyxJQUFJLENBQUMsU0FBUyxLQUFLLFVBQVU7Z0JBQ3RDLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQ25CLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQyxPQUFPLENBQUM7b0JBQ3ZCLFFBQVEsRUFBRSxDQUFDO2lCQUNaLENBQUMsQ0FBQTtZQUNKLENBQUM7UUFDSCxDQUFDO0tBQ0Y7SUFJRCxJQUFJLEVBQUU7UUFDSixRQUFRLEVBQUU7WUFDUjtnQkFDRSxJ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ICAgdGhpcy5nZXRUYWJCYXIoKSkge1xuICAgICAgICB0aGlzLmdldFRhYkJhcigpLnNldERhdGEoe1xuICAgICAgICAgIHNlbGVjdGVkOiAxXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfVxuICB9LFxuICAvKipcbiAgICog6aG16Z2i55qE5Yid5aeL5pWw5o2uXG4gICAqL1xuICBkYXRhOiB7XG4gICAgaXRlbUxpc3Q6IFtcbiAgICAgIHtcbiAgICAgICAgbmFtZTogJ+aciOW6pui/kOiQpeWIhuaekCcsXG4gICAgICAgIGljb246ICcuLi8uLi8uLi9pbWFnZXMvYnRuX3l1ZWR1QDJ4LnBuZycsXG4gICAgICAgIHVybDogJy9wYWdlcy9tb250aE9wZXJhdG9yL21vbnRoT3BlcmF0b3InLFxuICAgICAgICByZUxhdW5jaDogZmFsc2UsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBuYW1lOiAn55So5oi35aKe6ZW/5YiG5p6QJyxcbiAgICAgICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5feW9uZ2h1QDJ4LnBuZycsXG4gICAgICAgIHVybDogJy9wYWdlcy9tb250aE9wZXJhdG9yL21vbnRoT3BlcmF0b3InLFxuICAgICAgICByZUxhdW5jaDogZmFsc2UsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBuYW1lOiAn5Lya5ZGY5Y+N6aaIJyxcbiAgICAgICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5fZnNua3VpQDJ4LnBuZycsXG4gICAgICAgIHVybDogJy9wYWdlcy9mZWVkYmFjay9mZWVkYmFjaycsXG4gICAgICAgIHJlTGF1bmNoOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIG5hbWU6ICfmnI3liqHotLnnvLTnurMnLFxuICAgICAgICBpY29uOiAnLi4vLi4vLi4vaW1hZ2VzL2J0bl9qaWFvbmFAMngucG5nJyxcbiAgICAgICAgdXJsOiAnJyxcbiAgICAgICAgcmVMYXVuY2g6IGZhbHNlLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgbmFtZTogJ+i0puaIt+aPkOeOsCcsXG4gICAgICAgIGljb246ICcuLi8uLi8uLi9pbWFnZXMvYnRuX3RpeGlhbkAyeC5wbmcnLFxuICAgICAgICB1cmw6ICcnLFxuICAgICAgICByZUxhdW5jaDogZmFsc2UsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBuYW1lOiAn6YCA5Ye655m75b2VJyxcbiAgICAgICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5fU2lnbiBvdXRAMngucG5nJyxcbiAgICAgICAgdXJsOiAnL3BhZ2VzL2luZGV4L2luZGV4JyxcbiAgICAgICAgcmVMYXVuY2g6IHRydWUsXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBR0EsSUFBTSxHQUFHLEdBQUcsTUFBTSxFQUFVLENBQUM7QUFDN0IsU0FBUyxDQUFDO0lBQ1IsYUFBYSxFQUFFO1FBQ2IsSUFBSTtZQUNGLEVBQUUsQ0FBQyxDQUFDLE9BQU8sSUFBSSxDQUFDLFNBQVMsS0FBSyxVQUFVLElBQUksSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQztnQkFDN0QsSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDLE9BQU8sQ0FBQztvQkFDdkIsUUFBUSxFQUFFLENBQUM7aUJBQ1osQ0FBQyxDQUFDO1lBQ0wsQ0FBQztRQUNILENBQUM7S0FDRjtJQUNELFNBQVMsRUFBRTtRQUNULFFBQVE7WUFDTixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FB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gICAgICByZUxhdW5jaDogZmFsc2UsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBuYW1lOiAn55So5oi35aKe6ZW/5YiG5p6QJyxcbiAgICAgICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5feW9uZ2h1QDJ4LnBuZycsXG4gICAgICAgIHVybDogJy9wYWdlcy9tb250aE9wZXJhdG9yL21vbnRoT3BlcmF0b3InLFxuICAgICAgICByZUxhdW5jaDogZmFsc2UsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBuYW1lOiAn5Lya5ZGY5Y+N6aaIJyxcbiAgICAgICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5fZnNua3VpQDJ4LnBuZycsXG4gICAgICAgIHVybDogJy9wYWdlcy9mZWVkYmFjay9mZWVkYmFjaycsXG4gICAgICAgIHJlTGF1bmNoOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICB7XG4gICAgICAgIG5hbWU6ICfmnI3liqHotLnnvLTnurMnLFxuICAgICAgICBpY29uOiAnLi4vLi4vLi4vaW1hZ2VzL2J0bl9qaWFvbmFAMngucG5nJyxcbiAgICAgICAgdXJsOiAnJyxcbiAgICAgICAgcmVMYXVuY2g6IGZhbHNlLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgbmFtZTogJ+i0puaIt+aPkOeOsCcsXG4gICAgICAgIGljb246ICcuLi8uLi8uLi9pbWFnZXMvYnRuX3RpeGlhbkAyeC5wbmcnLFxuICAgICAgICB1cmw6ICcnLFxuICAgICAgICByZUxhdW5jaDogZmFsc2UsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBuYW1lOiAn6YCA5Ye655m75b2VJyxcbiAgICAgICAgaWNvbjogJy4uLy4uLy4uL2ltYWdlcy9idG5fU2lnbiBvdXRAMngucG5nJyxcbiAgICAgICAgdXJsOiAnL3BhZ2VzL2luZGV4L2luZGV4JyxcbiAgICAgICAgcmVMYXVuY2g6IHRydWUsXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
import { IMyApp } from '../../app';
// miniprogram/pages/report/report.js
const app = getApp<IMyApp>();
Component({
pageLifetimes: {
show() {
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 1
})
selected: 1,
});
}
}
},
},
lifetimes: {
attached() {
console.log(app.globalData.userInfo);
this.setData!({
userInfo: app.globalData.userInfo,
});
},
},
/**
* 页面的初始数据
*/
data: {
userInfo: app.globalData.userInfo,
itemList: [
{
name: '月度运营分析',
......
......@@ -4,10 +4,10 @@
<view class="report-header-user">
<view class="report-header-userInfo">
<view class="report-header-userName">
saddas
{{userInfo.name}}
</view>
<view class="report-header-userAccount">
124235345
{{userInfo.cellphone}}
</view>
</view>
<view class="report-header-userImg">
......
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
var util_1 = require("../../utils/util");
Page({
onLoad: function () {
this.initData();
this.fetchAreaList();
},
data: {
month: '',
areaId: 0,
areaList: [],
growthList: [],
customerCount: 0,
activeCount: 0,
},
initData: function () {
var _this = this;
var time = util_1.formatTime(new Date());
console.log(time);
this.setData({ month: time.slice(0, 7) }, function () {
_this.fetchList();
});
},
fetchAreaList: function () {
var _this = this;
fetch_1.baseFetch({
url: '/dcxy/baseArea/queryAll',
})
.then(function (res) {
if (res.data) {
_this.setData({
areaList: res.data,
});
}
else {
_this.setData({
areaList: [],
});
}
})
.catch(function (err) {
console.log(err);
});
},
fetchList: function (entity) {
this.fetchUserData(entity);
},
fetchUserData: function (entity) {
var _this = this;
var reqBody = __assign({ year: this.data.month.slice(0, 4), isAdmin: 1 }, entity);
if (this.data.areaId)
reqBody.areaId = this.data.areaId;
fetch_1.statisticsFetch({
url: '/dcxy/reportInfo/queryReportList',
data: reqBody,
})
.then(function (res) {
console.log(res);
var _a = res.data, customerCount = _a.customerCount, dayVos = _a.dayVos, activeCount = _a.activeCount;
var dayList = new Array(31)
.fill({
count: 0,
})
.map(function (v, idx) { return (__assign({}, v, { days: idx + 1 })); });
if (dayVos && dayVos.length) {
var oList = dayVos;
for (var index = 0; index < oList.length; index++) {
var element = oList[index];
var daysIndex = element.completeAt.slice(-2);
dayList[daysIndex] = __assign({}, dayList[daysIndex], { count: element.count });
}
}
console.log('dayList:', dayList);
_this.setData({
growthList: dayList,
customerCount: customerCount ? customerCount : 0,
activeCount: activeCount ? activeCount : 0,
});
})
.catch(function (err) {
console.log(err);
});
},
areaChangeHandle: function () { },
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlckdyb3d0aC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInVzZXJHcm93dGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLHlDQUE2RDtBQUM3RCx5Q0FBOEM7QUFHOUMsSUFBSSxDQUFDO0lBQ0gsTUFBTTtRQUNKLElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQztRQUNoQixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7SUFDdkIsQ0FBQztJQUlELElBQUksRUFBRTtRQUNKLEtBQUssRUFBRSxFQUFFO1FBQ1QsTUFBTSxFQUFFLENBQUM7UUFDVCxRQUFRLEVBQUUsRUFBRTtRQUNaLFVBQVUsRUFBRSxFQUFFO1FBQ2QsYUFBYSxFQUFFLENBQUM7UUFDaEIsV0FBVyxFQUFFLENBQUM7S0FDZjtJQUNELFFBQVE7UUFBUixpQkFNQztRQUxDLElBQUksSUFBSSxHQUFHLGlCQUFVLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDO1FBQ2xD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heXNJbmRleCA9IGVsZW1lbnQuY29tcGxldGVBdC5zbGljZSgtMik7XG4gICAgICAgICAgICBkYXlMaXN0W2RheXNJbmRleF0gPSB7XG4gICAgICAgICAgICAgIC4uLmRheUxpc3RbZGF5c0luZGV4XSxcbiAgICAgICAgICAgICAgY291bnQ6IGVsZW1lbnQuY291bnQsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25zb2xlLmxvZygnZGF5TGlzdDonLCBkYXlMaXN0KTtcbiAgICAgICAgdGhpcy5zZXREYXRhISh7XG4gICAgICAgICAgZ3Jvd3RoTGlzdDogZGF5TGlzdCxcbiAgICAgICAgICBjdXN0b21lckNvdW50OiBjdXN0b21lckNvdW50ID8gY3VzdG9tZXJDb3VudCA6IDAsXG4gICAgICAgICAgYWN0aXZlQ291bnQ6IGFjdGl2ZUNvdW50ID8gYWN0aXZlQ291bnQgOiAwLFxuICAgICAgICB9KTtcbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgIH0pO1xuICB9LFxuICBhcmVhQ2hhbmdlSGFuZGxlKCkge30sXG59KTtcbiJdfQ==
\ No newline at end of file
{
"navigationBarTitleText": "用户增长报表",
"usingComponents": {
"user-grouth-chart": "../components/UserGrouthChart/UserGrouthChart",
"user-activity-chart": "../components/UserActivityChart/UserActivityChart",
"c-select": "../components/Select/Select"
}
}
import { baseFetch, statisticsFetch } from '../../api/fetch';
import { formatTime } from '../../utils/util';
// miniprogram/pages/userGrowth/userGrowth.js
Page({
onLoad() {
this.initData();
this.fetchAreaList();
},
/**
* 页面的初始数据
*/
data: {
month: '',
areaId: 0,
areaList: [],
growthList: [],
customerCount: 0,
activeCount: 0,
},
initData() {
let time = formatTime(new Date());
console.log(time);
this.setData!({ month: time.slice(0, 7) }, () => {
this.fetchList();
});
},
fetchAreaList() {
baseFetch({
url: '/dcxy/baseArea/queryAll',
})
.then(res => {
if (res.data) {
this.setData!({
areaList: res.data,
});
} else {
this.setData!({
areaList: [],
});
}
})
.catch(err => {
console.log(err);
});
},
fetchList(entity?: { areaId?: number; month?: string }) {
this.fetchUserData(entity);
},
fetchUserData(entity) {
let reqBody = {
year: this.data.month.slice(0, 4),
isAdmin: 1,
...entity,
};
if (this.data.areaId) reqBody.areaId = this.data.areaId;
statisticsFetch({
url: '/dcxy/reportInfo/queryReportList',
data: reqBody,
})
.then(res => {
console.log(res);
const { customerCount, dayVos, activeCount } = res.data;
let dayList = new Array(31)
.fill({
count: 0,
})
.map((v, idx) => ({ ...v, days: idx + 1 }));
if (dayVos && dayVos.length) {
let oList = dayVos;
for (let index = 0; index < oList.length; index++) {
const element = oList[index];
let daysIndex = element.completeAt.slice(-2);
dayList[daysIndex] = {
...dayList[daysIndex],
count: element.count,
};
}
}
console.log('dayList:', dayList);
this.setData!({
growthList: dayList,
customerCount: customerCount ? customerCount : 0,
activeCount: activeCount ? activeCount : 0,
});
})
.catch(err => {
console.log(err);
});
},
areaChangeHandle() {},
});
<!-- miniprogram/pages/userGrowth/userGrowth.wxml -->
<view class="container userGrowth">
<view class="userGrowth-topBox">
<view class="userGrowth-titleItem">
<view class="userGrowth-titleName">注册人数</view>
<view class="userGrowth-titleValue">123412</view>
</view>
<view class="userGrowth-titleItem">
<view class="userGrowth-titleName">活跃人数</view>
<view class="userGrowth-titleValue">{{activeCount}}</view>
</view>
<view class="userGrowth-titleItem">
<view class="userGrowth-titleName">总用户数</view>
<view class="userGrowth-titleValue">{{customerCount}}</view>
</view>
</view>
<view class="userGrowth-filter">
<view class="userGrowth-area">
<c-select mode="selector" range="{{areaList}}" range-key="{{'areaName'}}" bindchange="areaChangeHandle" placeholder="所属区域选择" />
</view>
<view class="userGrowth-time">
<c-select mode="date" fields="month" value="{{month}}" bindchange="bindPickerChange" />
</view>
</view>
<view class="userGrowth-block">
<view class="userGrowth-title">
<view class="userGrowth-title-color user"></view>
<view class="userGrowth-title-text">新增用户</view>
</view>
<view class="userGrowth-canvas">
<user-grouth-chart dataList="{{growthList}}" month="{{month}}" />
</view>
</view>
<view class="userGrowth-block">
<view class="userGrowth-title">
<view class="userGrowth-title-color user"></view>
<view class="userGrowth-title-text">用户活跃</view>
</view>
<view class="userGrowth-canvas">
<user-activity-chart dataList="{{growthList}}" month="{{month}}" />
</view>
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/userGrowth/userGrowth.wxss */
.userGrowth-topBox {
padding: 20rpx 0 0;
width: 100%;
display: flex;
justify-content: space-around;
}
.userGrowth-titleItem {
text-align: center;
font-size: 24rpx;
}
.userGrowth-titleValue {
font-size: 40rpx;
}
.userGrowth-filter {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 50rpx 40rpx 0;
justify-content: space-between;
}
.userGrowth-area {
flex: 1;
}
.userGrowth-time {
width: 250rpx;
margin-left: 20rpx;
}
.userGrowth-block {
box-sizing: border-box;
width: 100%;
padding: 0 40rpx;
}
.userGrowth-title {
width: 100%;
display: flex;
align-items: center;
padding: 50rpx 0 20rpx;
}
.userGrowth-title-color {
width: 12rpx;
height: 12rpx;
margin-right: 12rpx;
border-radius: 50%;
}
.userGrowth-title-color.user {
background-color: #6895ef;
}
.userGrowth-canvas {
width: 660rpx;
height: 350rpx;
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var minii_1 = require("minii");
var UserStore = (function () {
function UserStore() {
this.token = '123';
}
UserStore.prototype.getUserInfo = function (data) {
this.token = data.token;
};
return UserStore;
}());
exports.default = minii_1.observe(new UserStore(), 'user');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInVzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQSwrQkFBK0I7QUFFL0I7SUFDRTtRQUNFLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyx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xuICBjZWxscGhvbmU6IHN0cmluZztcbiAgY29tbWVudDogc3RyaW5nO1xuICBjcmVhdGVBdDogc3RyaW5nO1xuICBpZDogbnVtYmVyO1xuICBpc09wZW5PcGVyTG9nOiBudW1iZXI7XG4gIGlzU2V0UGFzc3dvcmQ6IG51bWJlcjtcbiAgbGFzdExvZ2luRGF0ZTogc3RyaW5nO1xuICBsb2dpbkFjY291bnQ6IHN0cmluZztcbiAgbG9naW5Db3VudDogbnVtYmVyO1xuICBuYW1lOiBzdHJpbmc7XG4gIG9wZXJhdGVJZDogbnVtYmVyO1xuICBvcGVyYXRlTmFtZTogc3RyaW5nO1xuICBzdGF0ZTogc3RyaW5nO1xuICB1cGRhdGVBdDogc3RyaW5nO1xufTtcblxuZXhwb3J0IHR5cGUgVXNlclJvbGUgPSB7XG4gIGNoaWxkczogVXNlclJvbGVbXTtcbiAgaWQ6IG51bWJlcjtcbiAgbGlzdE1lbnVCdXR0b25WbzogW107XG4gIG1lbnVDb2RlOiBzdHJpbmc7XG4gIG1lbnVMaW5rOiBzdHJpbmc7XG4gIG1lbnVOYW1lOiBzdHJpbmc7XG4gIG1lbnVQaWNTbWFsbDogc3RyaW5nO1xuICBwYXJlbnRJZDogbnVsbCB8IG51bWJlcjtcbiAgcGFyZW50TmFtZTogbnVsbCB8IHN0cmluZztcbiAgc29ydElkOiBudW1iZXI7XG59O1xuIl19
\ No newline at end of file
// stores/user.js
import { observe } from 'minii'
export type Userinfo = {
cellphone: string;
comment: string;
createAt: string;
id: number;
isOpenOperLog: number;
isSetPassword: number;
lastLoginDate: string;
loginAccount: string;
loginCount: number;
name: string;
operateId: number;
operateName: string;
state: string;
updateAt: string;
};
class UserStore {
constructor() {
this.token = '123'
}
getUserInfo(data) {
this.token = data.token
}
}
// 第二个参数'user'会将当前store的所有内部变量绑定在全局变量的user属性上
// 如果第二个参数没有写,会默认使用该class名字的全小写
export default observe(new UserStore(), 'user')
\ No newline at end of file
export type UserRole = {
childs: UserRole[];
id: number;
listMenuButtonVo: [];
menuCode: string;
menuLink: string;
menuName: string;
menuPicSmall: string;
parentId: null | number;
parentName: null | string;
sortId: number;
};
......@@ -84,6 +84,12 @@
"pathName": "pages/monthOperator/monthOperator",
"query": "",
"scene": null
},
{
"id": -1,
"name": "userGrowth",
"pathName": "pages/userGrowth/userGrowth",
"scene": null
}
]
}
......
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