Commit d124803f by 姜雷

Merge branch 'test'

parents f19b77d1 996fe370
...@@ -63,5 +63,8 @@ exports.customerFetch = function (req) { ...@@ -63,5 +63,8 @@ exports.customerFetch = function (req) {
exports.baseFetch = function (req) { exports.baseFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.masterUrl.BASE_SERVER_URL + req.url })); return fetch(__assign({}, req, { url: constants_1.masterUrl.BASE_SERVER_URL + req.url }));
}; };
exports.operatorFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.masterUrl.OPERATOR_SERVER_URL + req.url }));
};
exports.default = fetch; exports.default = fetch;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaURBQXdFO0FBRXhFLElBQU0sR0FBRyxHQUFHLE1BQU0sRUFBVSxDQUFDO0FBRTdCLElBQU0sS0FBSyxHQUFHLFVBQUMsR0FBcUI7SUFDbEMsT0FBQSxJQUFJLE9BQU8sQ0FBQyxVQUFDLE9BQU8sRUFBRSxNQUFNO1FBQzFCLElBQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDO1FBQ25DLEVBQUUsQ0FBQyxPQUFPLGNBQ0wsR0FBRyxJQUNOLE1BQU0sRUFBRSxLQUFLO2dCQUNYLENBQUMsWUFDRyxLQUFLLE9BQUEsSUFDRixHQUFHLENBQUMsTUFBTSxFQUVqQixDQUFDLENBQUMsR0FBRyxDQUFDLE1BQU0sRUFFZCxPQUFPLEVBQUUsT0FBTyxFQUNoQixJQUFJLEVBQUUsTUFBTSxJQUNaLENBQUM7SUFDTCxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsVUFBQyxHQUFvQztRQUMzQyxJQUFNLGFBQWlDLEVBQS9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VSQVRPUl9TRVJWRVJfVVJMICsgcmVxLnVybCB9KTtcblxuZXhwb3J0IGRlZmF1bHQgZmV0Y2g7XG4iXX0=
\ No newline at end of file \ No newline at end of file
...@@ -50,4 +50,7 @@ export const customerFetch = (req: wx.RequestOption) => ...@@ -50,4 +50,7 @@ export const customerFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: masterUrl.CUSTOMER_SERVER_URL + req.url }); fetch({ ...req, url: masterUrl.CUSTOMER_SERVER_URL + req.url });
export const baseFetch = (req: wx.RequestOption) => export const baseFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: masterUrl.BASE_SERVER_URL + req.url }); fetch({ ...req, url: masterUrl.BASE_SERVER_URL + req.url });
export const operatorFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: masterUrl.OPERATOR_SERVER_URL + req.url });
export default fetch; export default fetch;
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
"pages/monthOperator/monthOperator", "pages/monthOperator/monthOperator",
"pages/homeAndReport/homeAndReport", "pages/homeAndReport/homeAndReport",
"pages/userGrowth/userGrowth", "pages/userGrowth/userGrowth",
"pages/areaSelect/areaSelect" "pages/areaSelect/areaSelect",
"pages/platformFee/platformFee",
"pages/platformFeeRecord/platformFeeRecord"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
...@@ -5,19 +5,22 @@ exports.devUrl = { ...@@ -5,19 +5,22 @@ exports.devUrl = {
STATISTICS_SERVER_URL: 'https://ex-dev-dcxy-statistics-manage.168cad.top', STATISTICS_SERVER_URL: 'https://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top',
}; };
exports.testUrl = { exports.testUrl = {
SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top', SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'https://ex-test-dcxy-statistics-manage.168cad.top', STATISTICS_SERVER_URL: 'https://ex-test-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top',
}; };
exports.masterUrl = { exports.masterUrl = {
SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com', SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com',
STATISTICS_SERVER_URL: 'https://dcxy-statistics-manage.dcrym.com', STATISTICS_SERVER_URL: 'https://dcxy-statistics-manage.dcrym.com',
CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com', CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com',
BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com', BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com',
OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com',
}; };
exports.successCode = 1000; exports.successCode = 1000;
exports.logoutode = -2; exports.logoutode = -2;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQWEsUUFBQSxNQUFNLEdBQUc7SUFDcEIsaUJBQWlCLEVBQUUsOENBQThDO0lBQ2pFLHFCQUFxQixFQUFFLGtEQUFrRDtJQU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ZXhwb3J0IGNvbnN0IHN1Y2Nlc3NDb2RlID0gMTAwMDtcbmV4cG9ydCBjb25zdCBsb2dvdXRvZGUgPSAtMjtcbiJdfQ==
\ No newline at end of file \ No newline at end of file
...@@ -3,18 +3,21 @@ export const devUrl = { ...@@ -3,18 +3,21 @@ export const devUrl = {
STATISTICS_SERVER_URL: 'https://ex-dev-dcxy-statistics-manage.168cad.top', STATISTICS_SERVER_URL: 'https://ex-dev-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top',
}; };
export const testUrl = { export const testUrl = {
SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top', SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'https://ex-test-dcxy-statistics-manage.168cad.top', STATISTICS_SERVER_URL: 'https://ex-test-dcxy-statistics-manage.168cad.top',
CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top', CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top', BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top',
}; };
export const masterUrl = { export const masterUrl = {
SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com', SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com',
STATISTICS_SERVER_URL: 'https://dcxy-statistics-manage.dcrym.com', STATISTICS_SERVER_URL: 'https://dcxy-statistics-manage.dcrym.com',
CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com', CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com',
BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com', BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com',
OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com',
}; };
export const successCode = 1000; export const successCode = 1000;
......
"use strict"; "use strict";
Component({ Component({
properties: { properties: {
checked: { type: Number, value: 0 }, checked: { type: String, value: '' },
listData: { type: Array, value: [] }, listData: { type: Array, value: [] },
}, },
lifetimes: { lifetimes: {
...@@ -31,4 +31,4 @@ Component({ ...@@ -31,4 +31,4 @@ Component({
} }
}, },
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsU0FBUyxDQUFDO0lBSVIsVUFBVSxFQUFFO1FBQ1YsT0FBTyxFQUFFLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFO1FBQ25DLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtLQUNyQztJQUNELFNBQVMsRUFBRTtRQUNULFFBQVEsRUFBRTtZQUVSLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxLQUFLLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ2xDLElBQUksQ0FBQyxPQUFPLENBQUM7b0JBQ1gsS0FBSyxFQUFFLENBQUM7aUJBQ1QsQ0FBQyxDQUFDO1lBQ0wsQ0FBQztZQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFFBQVEsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO2dCQUMzQyxJQU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gICB9XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ Component({ ...@@ -4,7 +4,7 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
checked: { type: Number, value: 0 }, checked: { type: String, value: '' },
listData: { type: Array, value: [] }, listData: { type: Array, value: [] },
}, },
lifetimes: { lifetimes: {
......
<!-- custom-tab-bar/index.wxml --> <!-- custom-tab-bar/index.wxml -->
<cover-view class="custom-tab-bar"> <view class="custom-tab-bar">
<cover-view wx:for="{{listData}}" wx:key="index" class="custom-tab-bar-item {{checked === index?'checked':''}}" data-index="{{index}}" data-path="{{item.pagePath}}" bindtap="clickHandle"> <view wx:for="{{listData}}" wx:key="index" class="custom-tab-bar-item {{checked === item.code?'checked':''}}" data-index="{{item.code}}" data-path="{{item.pagePath}}" bindtap="clickHandle">
<cover-image class="custom-tab-bar-icon" src="{{checked === index ? item.selectedIconPath : item.iconPath}}"></cover-image> <image class="custom-tab-bar-icon" src="{{checked === item.code ? item.selectedIconPath : item.iconPath}}"></image>
<cover-view>{{item.text}}</cover-view> <view>{{item.text}}</view>
</cover-view> </view>
</cover-view> </view>
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
// pages/components/PlatformFeeChart/PlatformFeeChart.js
let platforFeeChart = null;
let month = '';
function initChart(canvas, width, height, F2) {
const data = [];
platforFeeChart = new F2.Chart({
el: canvas,
width,
height,
});
platforFeeChart.source(data, {
month: {
min: 1,
max: 12,
},
});
platforFeeChart.tooltip({
showItemMarker: false,
background: {
radius: 2,
fill: '#6895fe',
padding: [6, 10],
},
onShow(ev) {
const { items } = ev;
items[0].name = '';
items[0].value = items[0].title + '月';
items[1].name = '';
items[1].value = items[1].value + '元';
},
});
platforFeeChart
.line()
.position('month*totalMoney')
.color('#6895fe')
.shape('smooth')
.size(4);
platforFeeChart
.area()
.position('month*totalMoney')
.color('l(90) 0:#6895fe 1:#fff')
.shape('smooth')
.style({
fillOpacity: 0.6,
});
// platforFeeChart.axis('rechargeMoney', false);
platforFeeChart.render();
return platforFeeChart;
}
function findMaxIndex(list, key) {
if (!list.length) return -1;
let max = list[0][key];
let maxIndex = 0;
for (let index = 0; index < list.length; index++) {
const element = list[index];
if (element >= max) maxIndex = index;
}
return maxIndex;
}
Component({
// lifetimes: {
// attached() {
// const query = wx.createSelectorQuery().in(this);
// query
// .select('#PlatformFeeChart')
// .boundingClientRect(res => {
// // res.top; // 这个组件内 #the-id 节点的上边界坐标
// console.log(res);
// this.setData({
// x: res.left,
// y: res.top,
// });
// })
// .exec();
// },
// },
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
if (platforFeeChart) {
platforFeeChart.changeData(newVal);
} else {
setTimeout(() => {
platforFeeChart.changeData(newVal);
}, 1000);
}
if (platforFeeChart) {
let index = findMaxIndex(newVal, 'totalMoney');
if (index !== -1) {
let item = newVal[index];
const point = platforFeeChart.getPosition(item);
platforFeeChart.showTooltip(point);
}
}
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
methods: {
clickHandle(e) {
console.log(e);
const { touches } = e.detail;
let x = 0;
let y = 0;
if (touches && touches.length) {
x = touches[0].x;
y = touches[0].y;
}
const objArr = platforFeeChart.getSnapRecords({ x, y });
if (objArr.length) this.triggerEvent('selectedData', objArr[0]._origin);
},
},
});
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bindcanvastouch="clickHandle" />
\ No newline at end of file
/* pages/components/PlatformFeeChart/PlatformFeeChart.wxss */
.PlatformFeeChart {
width: 660rpx;
height: 350rpx;
}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
import { operatorFetch } from '../../../api/fetch';
import { IMyApp } from '../../../app';
const app = getApp<IMyApp>();
let timer = null;
let payTimer = null;
let fetchedPlatform = false;
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js
Component({
lifetimes: {
attached() {
console.log(app.globalData.userInfo);
this.setData!({
userInfo: app.globalData.userInfo,
});
this.data.eventType === 'slef' &&
!fetchedPlatform &&
this.fetchPlatformFee();
},
},
/**
* 组件的属性列表
*/
properties: {
eventType: { type: String, value: 'slef' },
},
/**
* 组件的初始数据
*/
data: {
userInfo: app.globalData.userInfo,
showDialog: false,
type: 1, // 1 支付 2 扫码
isSkip: 0,
rechargeBalance: 0,
payTimeLimit: 0,
billType: '0',
payQrUrl: '',
countDown: 600,
countDownString: '10分00秒',
},
/**
* 组件的方法列表
*/
methods: {
fetchPlatformFee() {
operatorFetch({
url: '/operateBalance/rechage/initdata',
method: 'POST',
data: {
operateId: this.data.userInfo.operateId,
operateName: this.data.userInfo.operateName,
position: 3,
type: 2,
},
})
.then(res => {
const { isSkip, rechargeBalance, payTimeLimit } = res;
this.setData({
isSkip,
rechargeBalance,
payTimeLimit,
showDialog: rechargeBalance > 0 ? true : false,
});
fetchedPlatform = true;
})
.catch(err => {
console.log(err);
});
},
cancelShow() {
this.setData({
showDialog: false,
});
},
fetchRechargeInfo() {
console.log('in fetchRechargeInfo');
wx.showLoading({
title: '',
});
wx.login({
success: res => {
if (res.code) {
const entity = {
billType: this.data.billType,
isAgree: 1,
jsCode: res.code,
operateId: this.data.userInfo.operateId,
operateName: this.data.userInfo.operateName,
rechargeType: '2',
type: 2,
};
operatorFetch({
url: '/operateBalance/rechage/order/formini',
method: 'POST',
data: entity,
})
.then(res => {
console.log(res);
const { payInfo } = res;
wx.requestPayment({
timeStamp: payInfo.timeStamp.toString(),
nonceStr: payInfo.nonceStr,
package: payInfo.package,
signType: payInfo.signType,
paySign: payInfo.paySign,
success: res => {
console.log(res);
wx.showToast({
title: '支付成功!',
});
this.setData({
showDialog: false,
});
},
fail(res) {
console.log(res);
wx.showToast({
title: '支付失败!',
icon: 'none',
});
},
});
})
.catch(err => {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.msg || '请求失败',
icon: 'none',
});
});
} else {
wx.hideLoading();
wx.showToast({
title: res.errMsg || '请求失败',
icon: 'none',
});
}
},
fail(res) {
wx.hideLoading();
wx.showToast({
title: res.errMsg || '请求失败',
icon: 'none',
});
},
});
},
goRecordsPage() {
wx.navigateTo({
url: '/pages/platformFee/platformFee',
});
},
toggleType() {
let type = this.data.type;
this.setData({
type: type === 1 ? 2 : 1,
});
if (type === 1) {
this.fetchRechargeOrderQRcode();
} else {
timer && clearInterval(timer);
this.setData({
countDown: 600,
countDownString: '',
});
}
},
checkBillType(e) {
console.log(e);
const { value } = e.currentTarget.dataset;
if (value === this.data.billType) return;
this.setData({
billType: value,
});
if (this.data.type === 2) {
this.fetchRechargeOrderQRcode();
} else {
payTimer && clearInterval(payTimer);
}
},
fetchRechargeOrderQRcode() {
wx.showLoading({
title: '',
});
if (timer) {
clearInterval(timer);
this.setData({
payQrUrl: '',
countDown: 600,
countDownString: '0秒',
});
}
wx.login({
success: res => {
if (res.code) {
const entity = {
billType: this.data.billType,
isAgree: 1,
jsCode: res.code,
operateId: this.data.userInfo.operateId,
operateName: this.data.userInfo.operateName,
rechargeType: '2',
type: 2,
};
operatorFetch({
url: '/operateBalance/rechage/order/forcodeimg',
method: 'POST',
data: entity,
})
.then(res => {
wx.hideLoading();
const { payQrUrl, orderNum } = res;
this.setData({
payQrUrl,
});
timer = setInterval(() => {
let count = this.data.countDown;
if (count === 0) {
clearInterval(timer);
this.setData({
payQrUrl: '',
countDown: 600,
countDownString: '0秒',
});
} else {
let newCount = count - 1;
let countString =
Math.floor(newCount / 60) + '分' + (newCount % 60) + '秒';
this.setData({
countDown: newCount,
countDownString: countString,
});
}
}, 1000);
payTimer = setInterval(() => {
console.log('in setInterval');
operatorFetch({
url: '/operateBalance/rechage/sure',
method: 'POST',
data: { orderNum: orderNum },
})
.then(res => {
const { rechargeState } = res;
if (rechargeState === '1') {
wx.showToast({
title: res.msg || '',
icon: 'success',
});
clearInterval(payTimer);
this.setData({
showDialog: false,
});
}
})
.catch(err => {
console.log(err);
});
}, 3000);
})
.catch(err => {
wx.hideLoading();
wx.showToast({
title: err.msg || '请求失败',
icon: 'none',
});
console.log(err);
});
} else {
wx.hideLoading();
wx.showToast({
title: res.errMsg || '请求失败',
icon: 'none',
});
}
},
fail(res) {
console.log(res);
wx.hideLoading();
wx.showToast({
title: res.errMsg || '请求失败',
icon: 'none',
});
},
});
},
},
});
<!-- pages/components/PlatformFeeDialog/PlatformFeeDialog.wxml -->
<view class="PlatformFeeDialog" wx:if="{{showDialog}}">
<view class="mask"></view>
<view class="PlatformFeeDialog-body">
<view class="PlatformFeeDialog-content {{type===1?'show':''}}">
<view class="PlatformFeeDialog-header">
<view>尊敬的用户:</view>
<view class="PlatformFeeDialog-headerName">
您好!您的平台服务费已生成,为不影响设备正常使用,请在{{payTimeLimit}}个工作日内及时缴费,谢谢
</view>
</view>
<view class="PlatformFeeDialog-priceInfo">
<view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">服务费</view>
<view class="PlatformFeeDialog-priceItemPrice">{{rechargeBalance}}元</view>
</view>
<view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">开票选择</view>
</view>
<view class="PlatformFeeDialog-radiofroup">
<view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="0">
<view class="PlatformFeeDialog-radioinput {{billType==='0'?'check':''}}"></view>
<view>无需发票</view>
</view>
<view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="1">
<view class="PlatformFeeDialog-radioinput {{billType==='1'?'check':''}}"></view>
<view>普通发票</view>
</view>
<view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="2">
<view class="PlatformFeeDialog-radioinput {{billType==='2'?'check':''}}"></view>
<view>专用发票</view>
</view>
</view>
<view class="PlatformFeeDialog-btnbox">
<button class="PlatformFeeDialog-btn cancel" wx:if="{{isSkip}}" bind:tap="cancelShow">取消</button>
<button class="PlatformFeeDialog-btn {{isSkip?'':'big'}}" bind:tap="fetchRechargeInfo">确认支付</button>
</view>
<view class="PlatformFeeDialog-links">
<view bind:tap="goRecordsPage">查看服务费明细</view>
<view bind:tap="toggleType">扫码支付 ></view>
</view>
</view>
</view>
<view class="PlatformFeeDialog-content scanPay {{type===2?'show':''}}">
<view class="PlatformFeeDialog-header">
<view class="PlatformFeeDialog-back" bind:tap="toggleType">{{'<'}}</view>
<view class="PlatformFeeDialog-countdown">
剩余
<text class="" selectable="false" space="false" decode="false">{{countDownString}}</text>
</view>
</view>
<view class="PlatformFeeDialog-priceInfo">
<view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">服务费</view>
<view class="PlatformFeeDialog-priceItemPrice">{{rechargeBalance}}元</view>
</view>
<view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">开票选择</view>
</view>
<view class="PlatformFeeDialog-radiofroup">
<view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="0">
<view class="PlatformFeeDialog-radioinput {{billType==='0'?'check':''}}"></view>
<view>无需发票</view>
</view>
<view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="1">
<view class="PlatformFeeDialog-radioinput {{billType==='1'?'check':''}}"></view>
<view>普通发票</view>
</view>
<view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="2">
<view class="PlatformFeeDialog-radioinput {{billType==='2'?'check':''}}"></view>
<view>专用发票</view>
</view>
</view>
<view class="PlatformFeeDialog-payQRcode">
<image class="PlatformFeeDialog-payQRcodeImg" src="{{payQrUrl}}" mode="aspectFill" lazy-load="false" binderror="" bindload="" />
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/components/PlatformFeeDialog/PlatformFeeDialog.wxss */
.PlatformFeeDialog-body {
display: flex;
}
.PlatformFeeDialog-content {
overflow: hidden;
width: 0;
height: 0;
transition: all 0.48s;
}
.PlatformFeeDialog-content.show {
width: 100%;
height: auto;
}
.PlatformFeeDialog .mask {
position: fixed;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(000, 000, 000, 0.3);
z-index: 5;
}
.PlatformFeeDialog-body {
position: fixed;
top: 200rpx;
left: 56rpx;
width: 638rpx;
background-color: #fff;
border-radius: 40rpx;
z-index: 6;
color: #333;
}
.PlatformFeeDialog-header {
margin: 0 30rpx;
padding: 44rpx 30rpx 32rpx;
font-size: 28rpx;
border-bottom: 1rpx solid #e5e5e5;
}
.PlatformFeeDialog-headerName {
margin-top: 22rpx;
text-indent: 48rpx;
}
.PlatformFeeDialog-priceInfo {
padding: 40rpx 60rpx 60rpx;
}
.PlatformFeeDialog-priceItem {
display: flex;
font-size: 28rpx;
}
.PlatformFeeDialog-priceItem:first-child {
margin-bottom: 24rpx;
}
.PlatformFeeDialog-priceItemLabel {
flex: 1;
}
.PlatformFeeDialog-priceItemPrice {
color: #e24a4a;
}
.PlatformFeeDialog-radiofroup {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
}
.PlatformFeeDialog-radio {
display: flex;
align-items: center;
}
.PlatformFeeDialog-radioinput {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 1rpx solid #eee;
margin-right: 10rpx;
}
.PlatformFeeDialog-radioinput.check {
border-color: #6895fe;
background-color: #6895fe;
}
.PlatformFeeDialog-btnbox {
margin-top: 60rpx;
display: flex;
justify-content: space-around;
}
.PlatformFeeDialog-btn {
margin: 0;
width: 224rpx;
height: 98rpx;
line-height: 98rpx;
border-radius: 20rpx;
font-size: 32rpx;
}
.PlatformFeeDialog-btn.cancel {
background-color: #e6e6e6;
color: #919191;
}
.PlatformFeeDialog-btn.big {
width: 100%;
}
.PlatformFeeDialog-links {
margin-top: 40rpx;
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #6a92ff;
}
.PlatformFeeDialog-content.scanPay .PlatformFeeDialog-header {
display: flex;
justify-content: space-between;
}
.PlatformFeeDialog-payQRcode,
.PlatformFeeDialog-payQRcodeImg {
width: 300rpx;
height: 300rpx;
}
.PlatformFeeDialog-payQRcode {
margin: 40rpx auto;
}
{ {
"usingComponents": { "usingComponents": {
"platform-dialog":"../components/PlatformFeeDialog/PlatformFeeDialog",
"price-and-count": "../components/PriceAndCount/PriceAndCount", "price-and-count": "../components/PriceAndCount/PriceAndCount",
"service-count": "../components/ServiceCount/ServiceCount" "service-count": "../components/ServiceCount/ServiceCount"
} }
......
...@@ -172,5 +172,20 @@ Component({ ...@@ -172,5 +172,20 @@ Component({
console.log(err); console.log(err);
}); });
}, },
requestSubMsg() {
console.log('in requestSubMsg');
wx.requestSubscribeMessage({
tmplIds: ['WU2yMHKM_yNPLGHRsstggsDYnZhKoHIg4heM2fZkD5I'],
success(res) {
console.log('in success', res);
},
fail(res) {
console.log('in fail', res);
},
complete(res) {
console.log('in complete', res);
},
});
},
}, },
}); });
<!-- miniprogram/pages/home.wxml --> <!-- miniprogram/pages/home.wxml -->
<view class="container home"> <view class="container home">
<!-- <button bind:tap="requestSubMsg">订阅</button> -->
<view class="home-title"> <view class="home-title">
<view class="home-title-text">盈收数据</view> <view class="home-title-text">盈收数据</view>
<view class="home-title-type"> <view class="home-title-type">
...@@ -34,4 +35,5 @@ ...@@ -34,4 +35,5 @@
<price-and-count tag-data="{{refundData}}" /> <price-and-count tag-data="{{refundData}}" />
<price-and-count tag-data="{{refundCount}}" /> <price-and-count tag-data="{{refundCount}}" />
</view> </view>
<platform-dialog />
</view> </view>
\ No newline at end of file
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var app = getApp();
var tabList = [
{
pagePath: '/pages/home/home',
iconPath: '/images/tab_shuju_nor@2x.png',
selectedIconPath: '/images/tab_shuju_pre@2x.png',
text: '数据首页',
code: '9001',
},
{
pagePath: '/pages/report/report',
iconPath: '/images/tab_baobiao_nor@2x.png',
selectedIconPath: '/images/tab_baobiao_pre@2x.png',
text: '运营管理',
code: '9002',
},
];
Page({ Page({
onLoad: function () {
var userRoles = app.globalData.userRoles;
var list = userRoles
.map(function (item) { return tabList.find(function (menu) { return menu.code === item.menuCode; }); })
.filter(function (menu) { return (menu ? true : false); });
if (!list.find(function (item) { return item.code === '9002'; }))
list.push(tabList[tabList.length - 1]);
this.setData({
selected: list.length ? list[0].code : '',
list: list,
});
},
onShow: function () { onShow: function () {
if (wx.hideHomeButton) { if (wx.hideHomeButton) {
wx.hideHomeButton(); wx.hideHomeButton();
} }
}, },
data: { data: {
selected: 0, selected: '',
list: [ list: [],
{
pagePath: '/pages/home/home',
iconPath: '/images/tab_shuju_nor@2x.png',
selectedIconPath: '/images/tab_shuju_pre@2x.png',
text: '数据首页',
},
{
pagePath: '/pages/report/report',
iconPath: '/images/tab_baobiao_nor@2x.png',
selectedIconPath: '/images/tab_baobiao_pre@2x.png',
text: '运营管理',
},
],
}, },
clickHandle: function (e) { clickHandle: function (e) {
console.log('in click', e); console.log('in click', e);
...@@ -30,4 +47,4 @@ Page({ ...@@ -30,4 +47,4 @@ Page({
}); });
}, },
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZUFuZFJlcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWVBbmRSZXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQUksQ0FBQztJQUNILE1BQU07UUFDSixFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsY0FBYyxDQUFDLENBQUMsQ0FBQztZQUN0QixFQUFFLENBQUMsY0FBYyxFQUFFLENBQUM7UUFDdEIsQ0FBQztJQUNILENBQUM7SUFDRCxJQUFJLEVBQUU7UUFDSixRQUFRLEVBQUUsQ0FBQztRQUNYLElBQUksRUFBRTtZQUNKO2dCQUNFLFFBQVEsRUFBRSxrQkFBa0I7Z0JBQzVCLFFBQVEsRUFBRSw4QkFBOEI7Z0JBQ3hDLGdCQUFnQixFQUFFLDhCQUE4QjtnQkFDaEQsSUFBSSxFQUFFLE1BQU07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XREYXRhISh7XG4gICAgICBzZWxlY3RlZDogaW5kZXgsXG4gICAgfSk7XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file \ No newline at end of file
import { IMyApp } from '../../app';
type Menu = {
pagePath: string;
iconPath: string;
selectedIconPath: string;
text: string;
code: string;
};
const app = getApp<IMyApp>();
const tabList: Menu[] = [
{
pagePath: '/pages/home/home',
iconPath: '/images/tab_shuju_nor@2x.png',
selectedIconPath: '/images/tab_shuju_pre@2x.png',
text: '数据首页',
code: '9001',
},
{
pagePath: '/pages/report/report',
iconPath: '/images/tab_baobiao_nor@2x.png',
selectedIconPath: '/images/tab_baobiao_pre@2x.png',
text: '运营管理',
code: '9002',
},
];
Page({ Page({
onLoad() {
let userRoles = app.globalData.userRoles;
let list = userRoles
.map(item => tabList.find(menu => menu.code === item.menuCode))
.filter(menu => (menu ? true : false));
if (!list.find(item => item.code === '9002'))
list.push(tabList[tabList.length - 1]);
this.setData!({
selected: list.length ? list[0].code : '',
list,
});
},
onShow() { onShow() {
if (wx.hideHomeButton) { if (wx.hideHomeButton) {
wx.hideHomeButton(); wx.hideHomeButton();
} }
}, },
data: { data: {
selected: 0, selected: '',
list: [ list: [],
{
pagePath: '/pages/home/home',
iconPath: '/images/tab_shuju_nor@2x.png',
selectedIconPath: '/images/tab_shuju_pre@2x.png',
text: '数据首页',
},
{
pagePath: '/pages/report/report',
iconPath: '/images/tab_baobiao_nor@2x.png',
selectedIconPath: '/images/tab_baobiao_pre@2x.png',
text: '运营管理',
},
],
}, },
clickHandle(e) { clickHandle(e) {
console.log('in click', e); console.log('in click', e);
let { path, index } = e.detail; let { path, index } = e.detail;
// console.log(path, index); // console.log(path, index);
// wx.switchTab({ url: path }); // wx.switchTab({ url: path });
this.setData({ this.setData!({
selected: index, selected: index,
}); });
}, },
......
<!-- miniprogram/pages/homeAndReport/homeAndReport.wxml --> <!-- miniprogram/pages/homeAndReport/homeAndReport.wxml -->
<view class="container"> <view class="container">
<home wx:if="{{selected === 0}}" /> <home wx:if="{{selected === '9001'}}" />
<report wx:elif="{{selected === 1}}" class="report-wrap" /> <report wx:elif="{{selected === '9002'}}" class="report-wrap" />
<tab-bar checked="{{selected}}" listData="{{list}}" bindcustomevent="clickHandle"></tab-bar> <tab-bar checked="{{selected}}" listData="{{list}}" bindcustomevent="clickHandle"></tab-bar>
</view> </view>
\ No newline at end of file
...@@ -6,9 +6,14 @@ import { IMyApp } from '../../app'; ...@@ -6,9 +6,14 @@ import { IMyApp } from '../../app';
const app = getApp<IMyApp>(); const app = getApp<IMyApp>();
Page({ Page({
onLoad() { onLoad(option) {
console.log(option);
if (app.globalData.token) { if (app.globalData.token) {
this.tokenLoagin(); this.tokenLoagin();
} else if (option.logout) {
// this.codeLogin();
} else {
this.codeLogin();
} }
}, },
data: { data: {
...@@ -40,105 +45,171 @@ Page({ ...@@ -40,105 +45,171 @@ Page({
return true; return true;
}, },
tokenLoagin() { tokenLoagin() {
wx.showLoading({ title: '登陆中' }); wx.login({
systemFetch({ success: res => {
url: '/login/verifyCode', if (res.code) {
}) const code = res.code;
.then((res: wx.RequestSuccessCallbackResult) => {
console.log(res); wx.showLoading({ title: '登陆中' });
return { systemFetch({
code: res.data.verifyCode, url: '/login/verifyCode',
cookie: res.header['Set-Cookie'], })
}; .then((res: wx.RequestSuccessCallbackResult) => {
}) console.log(res);
.then(({ cookie }: { code: string; cookie: string }) => return {
systemFetch({ code: res.data.verifyCode,
url: '/boss/login', cookie: res.header['Set-Cookie'],
method: 'POST', };
header: { })
cookie: cookie, .then(({ cookie }: { code: string; cookie: string }) =>
}, systemFetch({
data: { url: '/boss/login',
token: app.globalData.token, method: 'POST',
}, header: {
}), cookie: cookie,
) },
.then(res => { data: {
console.log(res); code,
const { token: app.globalData.token,
data: { userInfo, userRoles }, },
} = res; }),
app.globalData.userInfo = userInfo; )
app.globalData.userRoles = userRoles; .then(res => {
wx.hideLoading(); console.log(res);
wx.redirectTo({ const {
url: '/pages/homeAndReport/homeAndReport', token,
}); data: { userInfo, userRoles },
}) } = res;
.catch(err => { app.globalData.token = token;
console.log(err); app.globalData.userInfo = userInfo;
wx.hideLoading(); app.globalData.userRoles = userRoles.length
wx.showToast({ ? userRoles[0].childs
title: err.errMsg, : [];
icon: 'none', wx.hideLoading();
}); wx.redirectTo({
}); url: '/pages/homeAndReport/homeAndReport',
});
})
.catch(err => {
console.log(err);
wx.hideLoading();
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
}
},
});
}, },
loginHandle() { loginHandle() {
console.log(app.globalData); console.log(app.globalData);
if (this.validateLoginData()) { if (this.validateLoginData()) {
const { account, pwd } = this.data; const { account, pwd } = this.data;
console.log(account, pwd); console.log(account, pwd);
wx.showLoading({ title: '' });
systemFetch({ systemFetch({
url: '/login/verifyCode', url: '/boss/login/init/data',
method: 'GET',
}) })
.then((res: wx.RequestSuccessCallbackResult) => { .then(res => {
console.log(res); console.log(res);
return { return res.templates;
code: res.data.verifyCode,
cookie: res.header['Set-Cookie'],
};
}) })
.then(({ code, cookie }: { code: string; cookie: string }) => { .catch(err => {
let mixpwd = md5(pwd); return;
return systemFetch({ })
url: '/boss/login', .then(ids => {
method: 'POST', let tmplIds =
header: { ids && ids.length ? ids.map(item => item.templateId) : [];
cookie: cookie, wx.requestSubscribeMessage({
tmplIds: tmplIds,
success(res) {
console.log('in success', res);
}, },
data: { fail(res) {
account, console.log('in fail', res);
pwd: mixpwd, },
varifyCode: code, complete(res) {
console.log('in complete', res);
wx.login({
success: res => {
if (res.code) {
const code = res.code;
wx.showLoading({ title: '' });
systemFetch({
url: '/login/verifyCode',
})
.then((res: wx.RequestSuccessCallbackResult) => {
console.log(res);
return {
verifyCode: res.data.verifyCode,
cookie: res.header['Set-Cookie'],
};
})
.then(
({
verifyCode,
cookie,
}: {
verifyCode: string;
cookie: string;
}) => {
let mixpwd = md5(pwd);
return systemFetch({
url: '/boss/login',
method: 'POST',
header: {
cookie: cookie,
},
data: {
code,
account,
pwd: mixpwd,
varifyCode: verifyCode,
},
});
},
)
.then(res => {
console.log(res);
const {
token,
data: { userInfo, userRoles },
} = res;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
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',
});
});
} else {
wx.showToast({
title: '登录获取code失败',
icon: 'none',
});
}
},
});
}, },
});
})
.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 => { .catch(err => {
console.log(err); console.log(err);
wx.hideLoading();
wx.showToast({
title: err.errMsg,
icon: 'none',
});
}); });
} }
// fetch() // fetch()
...@@ -146,6 +217,54 @@ Page({ ...@@ -146,6 +217,54 @@ Page({
// url: '/pages/home/home' // url: '/pages/home/home'
// }) // })
}, },
codeLogin() {
wx.login({
success: res => {
if (res.code) {
const code = res.code;
systemFetch({
url: '/boss/login',
method: 'POST',
data: {
code,
},
})
.then(res => {
console.log(res);
const {
token,
data: { userInfo, userRoles },
} = res;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
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',
});
});
} else {
wx.showToast({
title: '登录获取code失败',
icon: 'none',
});
}
},
});
},
nameInputHandle(e) { nameInputHandle(e) {
const value = e.detail.value; const value = e.detail.value;
this.updateInputValue('account', value); this.updateInputValue('account', value);
......
...@@ -11,5 +11,8 @@ ...@@ -11,5 +11,8 @@
</div> </div>
</view> </view>
<button class="login-btn" bindtap="loginHandle">登录</button> <button class="login-btn" bindtap="loginHandle">登录</button>
<!-- <view class="wx-login" bind:tap="codeLogin">
<image class="wx-login-icon" src="../../images/ic_wechat@2x.png"></image>
</view> -->
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -39,3 +39,12 @@ ...@@ -39,3 +39,12 @@
.login-btn { .login-btn {
margin-top: 40rpx; margin-top: 40rpx;
} }
.wx-login {
width: 72rpx;
height: 72rpx;
margin: 80rpx auto 0;
}
.wx-login-icon {
width: 72rpx;
height: 72rpx;
}
"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");
function findMaxIndex(list, key) {
if (!list.length)
return -1;
var max = list[0][key];
var maxIndex = 0;
for (var index = 0; index < list.length; index++) {
var element = list[index];
if (element >= max)
maxIndex = index;
}
return maxIndex;
}
Page({
data: {
areaCount: 0,
year: '',
dataList: [],
selected: {
areaId: undefined,
areaName: '',
month: '',
totalMoney: 0,
},
},
onLoad: function (options) {
var year = new Date().getFullYear();
console.log(year);
this.fetchList({
year: year,
});
this.setData({
year: year,
});
},
fetchList: function (entity) {
var _this = this;
return fetch_1.statisticsFetch({
url: '/dcxy/platformFee/operate/areas/monthly',
data: entity,
})
.then(function (res) {
var areaCount = res.areaCount, platformFees = res.platformFees;
var datalist = new Array(12)
.fill({
totalMoney: 0,
})
.map(function (v, idx) { return (__assign({}, v, { month: idx + 1 })); });
for (var index = 0; index < platformFees.length; index++) {
var element = platformFees[index];
var dataIndex = element.month - 1;
datalist[dataIndex] = __assign({}, datalist[dataIndex], element);
}
_this.setData({
areaCount: areaCount,
dataList: datalist,
});
if (datalist && datalist.length) {
var index = findMaxIndex(datalist, 'totalMoney');
var item = datalist[index];
_this.setData({
selected: item,
});
}
})
.catch(function (err) {
console.log(err);
});
},
yearChangeHandle: function (e) {
console.log(e);
var value = e.detail.value;
this.fetchList({
year: value,
});
},
goRecordPage: function () {
wx.navigateTo({
url: '/pages/platformFeeRecord/platformFeeRecord',
});
},
selectedData: function (e) {
console.log(e);
var data = e.detail;
this.setData({
selected: data,
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm1GZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybUZlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEseUNBQWtEO0FBRWxELHNCQUFzQixJQUFJLEVBQUUsR0FBRztJQUM3QixFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7UUFBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDNUIsSUFBSSxHQUFHLEdBQUcsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBQ3ZCLElBQUksUUFBUSxHQUFHLENBQUMsQ0FBQztJQUNqQixHQUFHLENBQUMsQ0FBQyxJQUFJLEtBQUssR0FBRyxDQUFDLEVBQUUsS0FBSyxHQUFHLElBQUksQ0FBQyxNQUFNLEVBQUUsS0FBSyxFQUFFLEVBQUUsQ0FBQztRQUNqRCxJQUFNLE9BQU8sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDNUIsRUFBRSxDQUFDLENBQUMsT0FBTyxJQUFJLEdBQUcsQ0FBQztZQUFDLFFBQVEsR0FBRyxLQUFLLENBQUM7SUFDdkMsQ0FBQztJQUNELE1BQU0sQ0FBQyxRQUFRLENBQUM7QUFDbEIsQ0FBQztBQUdELElBQUksQ0FBQztJQUlILElBQUksRUFBRTtRQUNK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dXJsOiAnL3BhZ2VzL3BsYXRmb3JtRmVlUmVjb3JkL3BsYXRmb3JtRmVlUmVjb3JkJyxcbiAgICB9KTtcbiAgfSxcbiAgc2VsZWN0ZWREYXRhKGUpIHtcbiAgICBjb25zb2xlLmxvZyhlKVxuICAgIGNvbnN0IGRhdGEgPSBlLmRldGFpbDtcbiAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgIHNlbGVjdGVkOiBkYXRhLFxuICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"navigationBarTitleText": "服务费明细",
"usingComponents": {
"c-select": "../components/Select/Select",
"platform-fee-chart": "../components/PlatformFeeChart/PlatformFeeChart"
}
}
import { statisticsFetch } from '../../api/fetch';
function findMaxIndex(list, key) {
if (!list.length) return -1;
let max = list[0][key];
let maxIndex = 0;
for (let index = 0; index < list.length; index++) {
const element = list[index];
if (element >= max) maxIndex = index;
}
return maxIndex;
}
// miniprogram/pages/platformFee/platformFee.js
Page({
/**
* 页面的初始数据
*/
data: {
areaCount: 0,
year: '',
dataList: [],
selected: {
areaId: undefined,
areaName: '',
month: '',
totalMoney: 0,
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let year = new Date().getFullYear();
console.log(year);
this.fetchList({
year,
});
this.setData!({
year,
});
},
fetchList(entity) {
return statisticsFetch({
url: '/dcxy/platformFee/operate/areas/monthly',
data: entity,
})
.then(res => {
const { areaCount, platformFees } = res;
let datalist = new Array(12)
.fill({
totalMoney: 0,
})
.map((v, idx) => ({ ...v, month: idx + 1 }));
for (let index = 0; index < platformFees.length; index++) {
const element = platformFees[index];
let dataIndex = element.month - 1;
datalist[dataIndex] = {
...datalist[dataIndex],
...element,
};
}
this.setData!({
areaCount,
dataList: datalist,
});
if (datalist && datalist.length) {
let index = findMaxIndex(datalist, 'totalMoney');
let item = datalist[index];
this.setData!({
selected: item,
});
}
})
.catch(err => {
console.log(err);
});
},
yearChangeHandle(e) {
console.log(e);
const { value } = e.detail;
this.fetchList({
year: value,
});
},
goRecordPage() {
wx.navigateTo({
url: '/pages/platformFeeRecord/platformFeeRecord',
});
},
selectedData(e) {
console.log(e)
const data = e.detail;
this.setData!({
selected: data,
});
},
});
<!-- miniprogram/pages/platformFee/platformFee.wxml -->
<view class="platformFee">
<view class="platformFee-filter">
<view class="platformFee-area">
<c-select mode="date" fields="year" value="{{year}}" bindchange="yearChangeHandle" />
</view>
<view class="platformFee-time" bind:tap="goRecordPage">缴费记录</view>
</view>
<view class="platformFee-block">
<view class="platformFee-title">
<view class="platformFee-title-color user"></view>
<view class="platformFee-title-text">共计{{areaCount}}个校区</view>
</view>
<view class="platformFee-canvas">
<!-- <canvas class="platformFee-canvas" canvas-id="platformFee-canvas" bindtouchstart="selectedData" /> -->
<platform-fee-chart dataList="{{dataList}}" bind:selectedData="selectedData" />
</view>
</view>
<view class="platformFee-block" wx:if="{{selected.month}}">
<view class="platformFee-title">
<view class="platformFee-title-color user"></view>
<view class="platformFee-title-text">各校区服务费({{selected.month}}月)</view>
<view class="platformFee-title-sum">合计:{{selected.totalMoney}}元</view>
</view>
<view class="platformFee-areaList">
<view class="platformFee-areaItem" wx:for="{{selected.areaPlatformFees}}">
<view class="platformFee-areaItem-index">{{index + 1}}</view>
<view class="platformFee-areaItem-name">{{item.areaName}}</view>
<view class="platformFee-areaItem-price">{{item.totalMoney}}元</view>
</view>
<!-- <view class="platformFee-areaItem">
<view class="platformFee-areaItem-index">2</view>
<view class="platformFee-areaItem-name">多彩温江</view>
<view class="platformFee-areaItem-price">1,000.00</view>
</view> -->
</view>
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/platformFee/platformFee.wxss */
.platformFee-block {
box-sizing: border-box;
width: 100%;
padding: 0 40rpx;
}
.platformFee-title {
width: 100%;
display: flex;
align-items: center;
padding: 50rpx 0 20rpx;
}
.platformFee-filter {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 50rpx 40rpx 0;
justify-content: space-between;
align-items: center;
}
.platformFee-area {
width: 250rpx;
}
.platformFee-time {
color: #6a92ff;
font-size: 28rpx;
}
.platformFee-title-color {
width: 12rpx;
height: 12rpx;
margin-right: 12rpx;
border-radius: 50%;
}
.platformFee-title-text {
flex: 1;
}
.platformFee-title-sum {
font-size: 28rpx;
color: #fe6868;
}
.platformFee-title-color.user {
background-color: #6895ef;
}
.platformFee-canvas {
width: 660rpx;
height: 350rpx;
}
.platformFee-areaList {
padding-left: 22rpx;
}
.platformFee-areaItem {
display: flex;
align-items: center;
padding: 28rpx 0;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #333;
}
.platformFee-areaItem:last-child {
border-width: 0;
}
.platformFee-areaItem-index {
background-color: #dedede;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
border-radius: 50%;
margin-right: 24rpx;
font-size: 22rpx;
text-align: center;
}
.platformFee-areaItem-name {
flex: 1;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch");
Page({
data: {
pageNum: 1,
pageSize: 10,
dataList: [],
},
onLoad: function (options) {
var _this = this;
this.fetchList({
pageNum: this.data.pageNum,
pageSize: this.data.pageSize,
}).then(function (res) {
if (res.data && res.data.length) {
_this.setData({
dataList: res.data,
});
}
});
},
fetchList: function (entity) {
return fetch_1.operatorFetch({
url: '/operateBalance/rechages',
data: entity,
});
},
getMoreListItem: function () {
var _this = this;
this.fetchList({
pageNum: this.data.pageNum + 1,
pageSize: this.data.pageSize,
})
.then(function (res) {
if (res.data && res.data.length) {
_this.setData({
dataList: _this.data.dataList.concat(res.data),
pageNum: _this.data.pageNum + 1,
});
}
})
.catch(function (err) {
console.log(err);
});
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm1GZWVSZWNvcmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybUZlZVJlY29yZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLH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VNpemUsXG4gICAgfSkudGhlbihyZXMgPT4ge1xuICAgICAgaWYgKHJlcy5kYXRhICYmIHJlcy5kYXRhLmxlbmd0aCkge1xuICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICBkYXRhTGlzdDogcmVzLmRhdGEsXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH0pO1xuICB9LFxuICBmZXRjaExpc3QoZW50aXR5KSB7XG4gICAgcmV0dXJuIG9wZXJhdG9yRmV0Y2goe1xuICAgICAgdXJsOiAnL29wZXJhdGVCYWxhbmNlL3JlY2hhZ2VzJyxcbiAgICAgIGRhdGE6IGVudGl0eSxcbiAgICB9KTtcbiAgfSxcbiAgZ2V0TW9yZUxpc3RJdGVtKCkge1xuICAgIHRoaXMuZmV0Y2hMaXN0KHtcbiAgICAgIHBhZ2VOdW06IHRoaXMuZGF0YS5wYWdlTnVtICsgMSxcbiAgICAgIHBhZ2VTaXplOiB0aGlzLmRhdGEucGFnZVNpemUsXG4gICAgfSlcbiAgICAgIC50aGVuKHJlcyA9PiB7XG4gICAgICAgIGlmIChyZXMuZGF0YSAmJiByZXMuZGF0YS5sZW5ndGgpIHtcbiAgICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICAgIGRhdGFMaXN0OiBbLi4udGhpcy5kYXRhLmRhdGFMaXN0LCAuLi5yZXMuZGF0YV0sXG4gICAgICAgICAgICBwYWdlTnVtOiB0aGlzLmRhdGEucGFnZU51bSArIDEsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgIH0pO1xuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"navigationBarTitleText": "缴费记录",
"usingComponents": {}
}
\ No newline at end of file
import { operatorFetch } from '../../api/fetch';
// miniprogram/pages/platformFeeRecord/platformFeeRecord.js
Page({
/**
* 页面的初始数据
*/
data: {
pageNum: 1,
pageSize: 10,
dataList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.fetchList({
pageNum: this.data.pageNum,
pageSize: this.data.pageSize,
}).then(res => {
if (res.data && res.data.length) {
this.setData!({
dataList: res.data,
});
}
});
},
fetchList(entity) {
return operatorFetch({
url: '/operateBalance/rechages',
data: entity,
});
},
getMoreListItem() {
this.fetchList({
pageNum: this.data.pageNum + 1,
pageSize: this.data.pageSize,
})
.then(res => {
if (res.data && res.data.length) {
this.setData!({
dataList: [...this.data.dataList, ...res.data],
pageNum: this.data.pageNum + 1,
});
}
})
.catch(err => {
console.log(err);
});
},
});
<!-- miniprogram/pages/platformFeeRecord/platformFeeRecord.wxml -->
<view class="platformFeeRecord">
<scroll-view wx:if="{{dataList.length}}" class="platformFeeRecord-list" scroll-y bindscrolltolower="getMoreListItem">
<view class="platformFeeRecord-item" wx:for="{{dataList}}" wx:key="{{item.id}}">
<view class="platformFeeRecord-itemTitle">
<view class="platformFeeRecord-itemTitle-text">
{{item.rechargeType==='2'?'微信缴费':item.rechargeType==='3'?'支付宝缴费':item.rechargeType==='4'?'服务费退回':''}}-{{item.billType==='0'?'不要发票':item.billType==='1'?'普通发票':item.billType==='3'?'专用发票':''}}
</view>
<view class="platformFeeRecord-itemTitle-price">{{item.rechargeMoney}}元</view>
</view>
<view class="platformFeeRecord-col">
<view class="platformFeeRecord-label">支付时间</view>
<view class="platformFeeRecord-value">{{item.updateAt}}</view>
</view>
<view class="platformFeeRecord-col">
<view class="platformFeeRecord-label">交易单号</view>
<view class="platformFeeRecord-value">{{item.orderNum}}</view>
</view>
</view>
</scroll-view>
<view wx:else class="noData">暂无数据</view>
<!-- <view class="platformFeeRecord-item">
<view class="platformFeeRecord-itemTitle">
<view class="platformFeeRecord-itemTitle-text">微信缴费-专用发票</view>
<view class="platformFeeRecord-itemTitle-price">1,000.00</view>
</view>
<view class="platformFeeRecord-col">
<view class="platformFeeRecord-label">支付时间</view>
<view class="platformFeeRecord-value">2019-12-30 14:23:23</view>
</view>
<view class="platformFeeRecord-col">
<view class="platformFeeRecord-label">交易单号</view>
<view class="platformFeeRecord-value">kjbfsaisd</view>
</view>
</view> -->
</view>
\ No newline at end of file
/* miniprogram/pages/platformFeeRecord/platformFeeRecord.wxss */
page,
.platformFeeRecord {
width: 100%;
height: 100%;
}
.platformFeeRecord-list {
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 0 40rpx;
}
.platformFeeRecord-item {
border-bottom: 1rpx solid #e5e5e5;
padding: 44rpx 0;
}
.platformFeeRecord-itemTitle {
display: flex;
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
}
.platformFeeRecord-itemTitle-text {
flex: 1;
}
.platformFeeRecord-col {
display: flex;
font-size: 28rpx;
color: #666;
margin-bottom: 16rpx;
justify-content: space-between;
}
.platformFeeRecord-col:last-child {
margin-bottom: 0;
}
.noData{
padding: 50rpx;
text-align: center;
}
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "运营管理系统", "navigationBarTitleText": "运营管理系统",
"navigationBarBackgroundColor": "#f0f5ff", "navigationBarBackgroundColor": "#f0f5ff",
"usingComponents": { "usingComponents": {
"platform-dialog":"../components/PlatformFeeDialog/PlatformFeeDialog",
"nav-item": "../components/NavItem/NavItem" "nav-item": "../components/NavItem/NavItem"
} }
} }
\ No newline at end of file
import { IMyApp } from '../../app'; import { IMyApp } from '../../app';
import { operatorFetch } from '../../api/fetch';
const navList = [
{
name: '月度运营分析',
icon: '../../../images/btn_yuedu@2x.png',
url: '/pages/monthOperator/monthOperator',
code: '9102',
reLaunch: false,
},
// {
// name: '用户增长分析',
// icon: '../../../images/btn_yonghu@2x.png',
// url: '/pages/userGrowth/userGrowth',
// code:'9103',
// reLaunch: false,
// },
{
name: '会员反馈',
icon: '../../../images/btn_fsnkui@2x.png',
url: '/pages/feedback/feedback',
code: '9104',
reLaunch: false,
},
{
name: '服务费明细',
icon: '../../../images/btn_jiaona@2x.png',
url: '/pages/platformFee/platformFee',
code: '9105',
reLaunch: false,
},
// {
// name: '账户提现',
// icon: '../../../images/btn_tixian@2x.png',
// url: '',
// reLaunch: false,
// },
{
name: '退出登录',
icon: '../../../images/btn_Sign_out@2x.png',
url: '/pages/index/index?logout=true',
reLaunch: true,
},
];
// miniprogram/pages/report/report.js // miniprogram/pages/report/report.js
const app = getApp<IMyApp>(); const app = getApp<IMyApp>();
...@@ -6,9 +50,28 @@ Component({ ...@@ -6,9 +50,28 @@ Component({
lifetimes: { lifetimes: {
attached() { attached() {
console.log(app.globalData.userInfo); console.log(app.globalData.userInfo);
let itemList = [];
let showBalance = false;
let pageItem = app.globalData.userRoles.find(
menu => menu.menuCode === '9002',
);
if (pageItem) {
itemList = pageItem.childs
.map(item => navList.find(menu => menu.code === item.menuCode))
.filter(menu => (menu ? true : false));
if (pageItem.childs.find(item => item.menuCode === '9101'))
showBalance = true;
}
itemList.push(navList[navList.length - 1]);
while (itemList.length % 3) {
itemList.push({});
}
this.setData!({ this.setData!({
userInfo: app.globalData.userInfo, userInfo: app.globalData.userInfo,
itemList,
showBalance,
}); });
this.fetchPlatformFee();
}, },
}, },
/** /**
...@@ -16,46 +79,29 @@ Component({ ...@@ -16,46 +79,29 @@ Component({
*/ */
data: { data: {
userInfo: app.globalData.userInfo, userInfo: app.globalData.userInfo,
itemList: [ itemList: [],
{ showBalance: false,
name: '月度运营分析',
icon: '../../../images/btn_yuedu@2x.png',
url: '/pages/monthOperator/monthOperator',
reLaunch: false,
},
// {
// name: '用户增长分析',
// icon: '../../../images/btn_yonghu@2x.png',
// url: '/pages/userGrowth/userGrowth',
// reLaunch: false,
// },
{
name: '会员反馈',
icon: '../../../images/btn_fsnkui@2x.png',
url: '/pages/feedback/feedback',
reLaunch: false,
},
// {
// name: '服务费缴纳',
// icon: '../../../images/btn_jiaona@2x.png',
// url: '',
// reLaunch: false,
// },
// {
// name: '账户提现',
// icon: '../../../images/btn_tixian@2x.png',
// url: '',
// reLaunch: false,
// },
{
name: '退出登录',
icon: '../../../images/btn_Sign_out@2x.png',
url: '/pages/index/index',
reLaunch: true,
},
// {},
// {},
],
account: 0, account: 0,
platformFee: '0.00',
},
methods: {
fetchPlatformFee() {
operatorFetch({
url: '/operateBalance/unpaidMoney',
})
.then(res => {
console.log(res);
this.setData({
platformFee: res.data ? res.data.toFixed(2) : '0.00',
});
})
.catch(err => {
console.log(err);
});
},
showRechargeDialog() {
let dialog = this.selectComponent('#platformDialog');
dialog.fetchPlatformFee();
},
}, },
}); });
...@@ -24,9 +24,21 @@ ...@@ -24,9 +24,21 @@
<view class="report-header-accountItemValue">10000</view> <view class="report-header-accountItemValue">10000</view>
</view> </view>
</view> --> </view> -->
<view class="report-header-platform" wx:if="{{showBalance}}">
<view class="report-header-platform-info">
待缴纳服务费
<text class="report-header-platform-fee" selectable="false" space="false" decode="false">
{{platformFee}}
</text>
</view>
<button class="report-header-platform-btn" wx:if="{{platformFee>0}}" bind:tap="showRechargeDialog">
缴费
</button>
</view>
<view class="report-header-bottom"></view> <view class="report-header-bottom"></view>
</view> </view>
<view class="report-nav"> <view class="report-nav">
<nav-item wx:for="{{itemList}}" wx:key="{{index}}" nav-data="{{item}}"></nav-item> <nav-item wx:for="{{itemList}}" wx:key="index" nav-data="{{item}}"></nav-item>
</view> </view>
<platform-dialog id="platformDialog" eventType="parents" />
</view> </view>
\ No newline at end of file
...@@ -6,7 +6,37 @@ ...@@ -6,7 +6,37 @@
background-color: #f0f5ff; background-color: #f0f5ff;
padding: 20rpx 0 40rpx; padding: 20rpx 0 40rpx;
} }
.report-header-platform {
margin: 0 auto;
display: flex;
width: 674rpx;
height: 144rpx;
background-color: #6e8aff;
border-radius: 20px 20px 0 0;
color: #fff;
align-items: center;
}
.report-header-platform-info {
padding-left: 50rpx;
font-size: 28rpx;
flex: 1;
}
.report-header-platform-fee {
font-size: 36rpx;
margin-left: 20rpx;
}
.report-header-platform-btn {
margin-right: 50rpx;
font-size: 28rpx;
padding: 0 50rpx;
background-color: #fff;
color: #7086ff;
border-radius: 20rpx;
}
.report-header-platform-btn:active {
background-color: #eee;
color: #666;
}
.report-header-bottom { .report-header-bottom {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
......
{ {
"name": "demo", "name": "wx-manage-shell",
"version": "1.0.1", "version": "1.0.2",
"scripts": { "scripts": {
"compile": "./node_modules/typescript/bin/tsc", "compile": "./node_modules/typescript/bin/tsc",
"tsc": "node ./node_modules/typescript/lib/tsc.js" "tsc": "node ./node_modules/typescript/lib/tsc.js"
......
...@@ -89,6 +89,20 @@ ...@@ -89,6 +89,20 @@
"id": -1, "id": -1,
"name": "userGrowth", "name": "userGrowth",
"pathName": "pages/userGrowth/userGrowth", "pathName": "pages/userGrowth/userGrowth",
"query": "",
"scene": null
},
{
"id": -1,
"name": "platformFee",
"pathName": "pages/platformFee/platformFee",
"query": "",
"scene": null
},
{
"id": -1,
"name": "platformFeeRecord",
"pathName": "pages/platformFeeRecord/platformFeeRecord",
"scene": null "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