Commit 6f537cca by 姜雷

添加修改

parent 4b5ff119
"use strict";
var platforFeeChart = null;
var month = '';
function initChart(canvas, width, height, F2) {
var data = [];
platforFeeChart = new F2.Chart({
el: canvas,
width: width,
height: height,
});
platforFeeChart.source(data, {
days: {
min: 1,
max: 12,
},
});
platforFeeChart.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 + '元';
},
});
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.render();
return platforFeeChart;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer: function (newVal) {
platforFeeChart && platforFeeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer: function (newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGxhdGZvcm1GZWVDaGFydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlBsYXRmb3JtRmVlQ2hhcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLElBQUksZUFBZSxHQUFHLElBQUksQ0FBQztBQUMzQixJQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7QUFFZixtQkFBbUIsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsRUFBRTtJQUMxQyxJQUFNLElBQUksR0FBRyxFQUFFLENBQUM7SUFDaEIsZUFBZSxHQUFHLElBQUksRUFBRSxDQUFDLEtBQUssQ0FBQztRQUM3QixFQUFFLEVBQUUsTUFBTTtRQUNWLEtBQUssT0FBQTtRQUNMLE1BQU0sUUFBQTtLQ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lZUNoYXJ0LmF4aXMoJ3JlY2hhcmdlTW9uZXknLCBmYWxzZSk7XG4gIHBsYXRmb3JGZWVDaGFydC5yZW5kZXIoKTtcbiAgcmV0dXJuIHBsYXRmb3JGZWVDaGFydDtcbn1cblxuQ29tcG9uZW50KHtcbiAgcHJvcGVydGllczoge1xuICAgIGRhdGFMaXN0OiB7XG4gICAgICB0eXBlOiBBcnJheSxcbiAgICAgIHZhbHVlOiBbXSxcbiAgICAgIG9ic2VydmVyKG5ld1ZhbCkge1xuICAgICAgICBwbGF0Zm9yRmVlQ2hhcnQgJiYgcGxhdGZvckZlZUNoYXJ0LmNoYW5nZURhdGEobmV3VmFsKTtcbiAgICAgIH0sXG4gICAgfSxcbiAgICBtb250aDoge1xuICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgdmFsdWU6ICcnLFxuICAgICAgb2JzZXJ2ZXIobmV3VmFsKSB7XG4gICAgICAgIG1vbnRoID0gbmV3VmFsO1xuICAgICAgfSxcbiAgICB9LFxuICB9LFxuICBkYXRhOiB7XG4gICAgb3B0czoge1xuICAgICAgb25Jbml0OiBpbml0Q2hhcnQsXG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ 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, {
days: {
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 = month + '-' + 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;
}
Component({
properties: {
dataList: {
type: Array,
value: [],
observer(newVal) {
platforFeeChart && platforFeeChart.changeData(newVal);
},
},
month: {
type: String,
value: '',
observer(newVal) {
month = newVal;
},
},
},
data: {
opts: {
onInit: initChart,
},
},
});
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" />
\ No newline at end of file
/* pages/components/PlatformFeeChart/PlatformFeeChart.wxss */
\ No newline at end of file
import { operatorFetch } from "../../../api/fetch"; import { operatorFetch } from '../../../api/fetch';
import { IMyApp } from '../../../app';
const app = getApp<IMyApp>();
let timer = null;
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js // pages/components/PlatformFeeDialog/PlatformFeeDialog.js
Component({ Component({
lifetimes: {
attached() {
console.log(app.globalData.userInfo);
this.setData!({
userInfo: app.globalData.userInfo,
});
this.data.eventType === 'slef' && this.fetchPlatformFee();
},
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: {}, properties: {
eventType: { type: String, value: 'slef' },
},
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
userInfo: app.globalData.userInfo,
showDialog: false, showDialog: false,
type: 1, // 1 支付 2 扫码
isSkip: 0,
rechargeBalance: 0,
payTimeLimit: 0,
billType: '0',
payQrUrl: '',
countDown: 600,
countDownString: '10分00秒',
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
fetchPlatformFee(){ 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,
});
})
.catch(err => {
console.log(err);
});
},
cancelShow() {
this.setData({
showDialog: false,
});
},
fetchRechargeInfo() {
console.log('in fetchRechargeInfo');
},
goRecordsPage() {
wx.navigateTo({
url: '/pages/platformFeeRecord/platformFeeRecord',
});
},
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;
this.setData({
billType: value,
});
},
fetchRechargeOrderQRcode() {
wx.showLoading({
title: '',
});
const entity = {
billType: this.data.billType,
isAgree: 1,
jsCode: 'string',
operateId: this.data.userInfo.operateId,
operateName: this.data.userInfo.operateName,
rechargeType: '2',
type: 2,
};
operatorFetch({ operatorFetch({
url:'' url: '/operateBalance/rechage/order/formini',
method: 'POST',
data: entity,
}) })
.then(res => {
wx.hideLoading();
const { payQrUrl } = res;
this.setData({
payQrUrl,
});
timer = setInterval(() => {
let count = this.data.countDown;
if (count === 0) {
clearInterval(timer);
} else {
let newCount = count - 1;
let countString =
Math.floor(newCount / 60) + '分' + (newCount % 60) + '秒';
this.setData({
countDown: newCount,
countDownString: countString,
});
}
}, 1000);
})
.catch(err => {
wx.hideLoading();
wx.showToast({
title: err.msg || '请求失败',
icon: 'none',
});
console.log(err);
});
}, },
}, },
}); });
<!-- pages/components/PlatformFeeDialog/PlatformFeeDialog.wxml --> <!-- pages/components/PlatformFeeDialog/PlatformFeeDialog.wxml -->
<view class="PlatformFeeDialog"> <view class="PlatformFeeDialog" wx:if="{{showDialog}}">
<view class="mask"></view> <view class="mask"></view>
<view class="PlatformFeeDialog-body"> <view class="PlatformFeeDialog-body">
<view class="PlatformFeeDialog-content"> <view class="PlatformFeeDialog-content {{type===1?'show':''}}">
<view class="PlatformFeeDialog-header"> <view class="PlatformFeeDialog-header">
<view>尊敬的用户:</view> <view>尊敬的用户:</view>
<view class="PlatformFeeDialog-headerName">您好!您的平台服务费已生成,为不影响设备正常使用,请在5个工作日内及时缴费,谢谢</view> <view class="PlatformFeeDialog-headerName">
您好!您的平台服务费已生成,为不影响设备正常使用,请在{{payTimeLimit}}个工作日内及时缴费,谢谢
</view>
</view> </view>
<view class="PlatformFeeDialog-priceInfo"> <view class="PlatformFeeDialog-priceInfo">
<view class="PlatformFeeDialog-priceItem"> <view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">服务费</view> <view class="PlatformFeeDialog-priceItemLabel">服务费</view>
<view class="PlatformFeeDialog-priceItemPrice">265.23元</view> <view class="PlatformFeeDialog-priceItemPrice">{{rechargeBalance}}元</view>
</view> </view>
<view class="PlatformFeeDialog-priceItem"> <view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">开票选择</view> <view class="PlatformFeeDialog-priceItemLabel">开票选择</view>
</view> </view>
<view class="PlatformFeeDialog-radiofroup"> <view class="PlatformFeeDialog-radiofroup">
<view class="PlatformFeeDialog-radio"> <view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="0">
<view class="PlatformFeeDialog-radioinput"></view> <view class="PlatformFeeDialog-radioinput {{billType==='0'?'check':''}}"></view>
<view>无需发票</view> <view>无需发票</view>
</view> </view>
<view class="PlatformFeeDialog-radio"> <view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="1">
<view class="PlatformFeeDialog-radioinput"></view> <view class="PlatformFeeDialog-radioinput {{billType==='1'?'check':''}}"></view>
<view>普通发票</view> <view>普通发票</view>
</view> </view>
<view class="PlatformFeeDialog-radio"> <view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="2">
<view class="PlatformFeeDialog-radioinput"></view> <view class="PlatformFeeDialog-radioinput {{billType==='2'?'check':''}}"></view>
<view>专用发票</view> <view>专用发票</view>
</view> </view>
</view> </view>
<view class="PlatformFeeDialog-btnbox"> <view class="PlatformFeeDialog-btnbox">
<button class="PlatformFeeDialog-btn">取消</button> <button class="PlatformFeeDialog-btn cancel" wx:if="{{isSkip}}" bind:tap="cancelShow">取消</button>
<button class="PlatformFeeDialog-btn">确认支付</button> <button class="PlatformFeeDialog-btn {{isSkip?'':'big'}}" bind:tap="fetchRechargeInfo">确认支付</button>
</view> </view>
<view class="PlatformFeeDialog-links"> <view class="PlatformFeeDialog-links">
<view>查看服务费明细</view> <view bind:tap="goRecordsPage">查看服务费明细</view>
<view>扫码支付 ></view> <view bind:tap="toggleType">扫码支付 ></view>
</view> </view>
</view> </view>
</view> </view>
<view class="PlatformFeeDialog-content scanPay show"> <view class="PlatformFeeDialog-content scanPay {{type===2?'show':''}}">
<view class="PlatformFeeDialog-header"> <view class="PlatformFeeDialog-header">
<view class="PlatformFeeDialog-back">&tl;</view> <view class="PlatformFeeDialog-back" bind:tap="toggleType">{{'<'}}</view>
<view class="PlatformFeeDialog-countdown"> <view class="PlatformFeeDialog-countdown">
剩余 剩余
<text class="" selectable="false" space="false" decode="false">9分59秒</text> <text class="" selectable="false" space="false" decode="false">{{countDownString}}</text>
</view> </view>
</view> </view>
<view class="PlatformFeeDialog-priceInfo"> <view class="PlatformFeeDialog-priceInfo">
<view class="PlatformFeeDialog-priceItem"> <view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">服务费</view> <view class="PlatformFeeDialog-priceItemLabel">服务费</view>
<view class="PlatformFeeDialog-priceItemPrice">265.23元</view> <view class="PlatformFeeDialog-priceItemPrice">{{rechargeBalance}}元</view>
</view> </view>
<view class="PlatformFeeDialog-priceItem"> <view class="PlatformFeeDialog-priceItem">
<view class="PlatformFeeDialog-priceItemLabel">开票选择</view> <view class="PlatformFeeDialog-priceItemLabel">开票选择</view>
</view> </view>
<view class="PlatformFeeDialog-radiofroup"> <view class="PlatformFeeDialog-radiofroup">
<view class="PlatformFeeDialog-radio"> <view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="0">
<view class="PlatformFeeDialog-radioinput"></view> <view class="PlatformFeeDialog-radioinput {{billType==='0'?'check':''}}"></view>
<view>无需发票</view> <view>无需发票</view>
</view> </view>
<view class="PlatformFeeDialog-radio"> <view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="1">
<view class="PlatformFeeDialog-radioinput"></view> <view class="PlatformFeeDialog-radioinput {{billType==='1'?'check':''}}"></view>
<view>普通发票</view> <view>普通发票</view>
</view> </view>
<view class="PlatformFeeDialog-radio"> <view class="PlatformFeeDialog-radio" bind:tap="checkBillType" data-value="2">
<view class="PlatformFeeDialog-radioinput"></view> <view class="PlatformFeeDialog-radioinput {{billType==='2'?'check':''}}"></view>
<view>专用发票</view> <view>专用发票</view>
</view> </view>
</view> </view>
<view class="PlatformFeeDialog-payQRcode"> <view class="PlatformFeeDialog-payQRcode">
<image class="PlatformFeeDialog-payQRcodeImg" src="" mode="aspectFill" lazy-load="false" binderror="" bindload="" /> <image class="PlatformFeeDialog-payQRcodeImg" src="{{payQrUrl}}" mode="aspectFill" lazy-load="false" binderror="" bindload="" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -84,11 +84,19 @@ ...@@ -84,11 +84,19 @@
} }
.PlatformFeeDialog-btn { .PlatformFeeDialog-btn {
margin: 0; margin: 0;
width: 224rpx;
height: 98rpx; height: 98rpx;
line-height: 98rpx; line-height: 98rpx;
border-radius: 20rpx; border-radius: 20rpx;
font-size: 32rpx; font-size: 32rpx;
} }
.PlatformFeeDialog-btn.cancel {
background-color: #e6e6e6;
color: #919191;
}
.PlatformFeeDialog-btn.big {
width: 100%;
}
.PlatformFeeDialog-links { .PlatformFeeDialog-links {
margin-top: 40rpx; margin-top: 40rpx;
display: flex; display: flex;
......
...@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); ...@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var fetch_1 = require("../../api/fetch"); var fetch_1 = require("../../api/fetch");
Page({ Page({
data: { data: {
areaCount: 0,
year: '', year: '',
dataList: [], dataList: [],
}, },
...@@ -23,8 +24,10 @@ Page({ ...@@ -23,8 +24,10 @@ Page({
data: entity, data: entity,
}) })
.then(function (res) { .then(function (res) {
var areaCount = res.areaCount, platformFees = res.platformFees;
_this.setData({ _this.setData({
dataList: res.data, areaCount: areaCount,
dataList: platformFees,
}); });
}) })
.catch(function (err) { .catch(function (err) {
...@@ -38,6 +41,10 @@ Page({ ...@@ -38,6 +41,10 @@ Page({
year: value, year: value,
}); });
}, },
goRecordPage: function () { }, goRecordPage: function () {
wx.navigateTo({
url: '/pages/platformFeeRecord/platformFeeRecord',
});
},
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm1GZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybUZlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUFrRDtBQUdsRCxJQUFJLENBQUM7SUFJSCxJQUFJLEVBQUU7UUFDSixJQUFJLEVBQUUsRUFBRTtRQUNSLFFBQVEsRUFBRSxFQUFFO0tBQ2I7SUFLRCxNQUFNLEVBQUUsVUFBUyxPQUFPO1FBQ3RCLElBQUksSUFBSSxHQUFHLElBQUksSUFBSSxFQUFFLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDcEMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNsQixJQUFJLENBQUMsU0FBUyxDQUFDO1lBQ2IsSUFBSSxNQUFBO1NBQ0wsQ0FBQyxDQUFDO1FBQ0gsSUFBSSxDQUFDLE9BQVEsQ0FBQztZQUNaLElBQUksTUFBQTtTQUNMLENBQUMsQ0FBQztJQUNMLENBQUM7SUFDRCxTQUFTLFlBQUMsTUFBTTtRQUFoQixpQkFhQztRQVpDLE1BQU0sQ0FBQyx1QkFBZSxDQUFDO1lBQ3JCLEdBQUcsRUFBRSx5Q0FBeUM7WUFDOUMsSUFBSSxFQUF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Uxpc3Q6IHBsYXRmb3JtRmVlcyxcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICB9KTtcbiAgfSxcbiAgeWVhckNoYW5nZUhhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coZSk7XG4gICAgY29uc3QgeyB2YWx1ZSB9ID0gZS5kZXRhaWw7XG4gICAgdGhpcy5mZXRjaExpc3Qoe1xuICAgICAgeWVhcjogdmFsdWUsXG4gICAgfSk7XG4gIH0sXG4gIGdvUmVjb3JkUGFnZSgpIHtcbiAgICB3eC5uYXZpZ2F0ZVRvKHtcbiAgICAgIHVybDogJy9wYWdlcy9wbGF0Zm9ybUZlZVJlY29yZC9wbGF0Zm9ybUZlZVJlY29yZCcsXG4gICAgfSk7XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file \ No newline at end of file
{ {
"navigationBarTitleText": "服务费明细", "navigationBarTitleText": "服务费明细",
"usingComponents": { "usingComponents": {
"c-select": "../components/Select/Select" "c-select": "../components/Select/Select",
"platform-fee-chart": "../components/PlatformFeeChart/PlatformFeeChart"
} }
} }
...@@ -6,6 +6,7 @@ Page({ ...@@ -6,6 +6,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
areaCount: 0,
year: '', year: '',
dataList: [], dataList: [],
}, },
...@@ -29,8 +30,10 @@ Page({ ...@@ -29,8 +30,10 @@ Page({
data: entity, data: entity,
}) })
.then(res => { .then(res => {
const { areaCount, platformFees } = res;
this.setData!({ this.setData!({
dataList: res.data, areaCount,
dataList: platformFees,
}); });
}) })
.catch(err => { .catch(err => {
...@@ -44,5 +47,9 @@ Page({ ...@@ -44,5 +47,9 @@ Page({
year: value, year: value,
}); });
}, },
goRecordPage() {}, goRecordPage() {
wx.navigateTo({
url: '/pages/platformFeeRecord/platformFeeRecord',
});
},
}); });
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
<view class="platformFee-area"> <view class="platformFee-area">
<c-select mode="date" fields="year" value="{{year}}" bindchange="yearChangeHandle" /> <c-select mode="date" fields="year" value="{{year}}" bindchange="yearChangeHandle" />
</view> </view>
<view class="platformFee-time">缴费记录</view> <view class="platformFee-time" bind:tap="goRecordPage">缴费记录</view>
</view> </view>
<view class="platformFee-block"> <view class="platformFee-block">
<view class="platformFee-title"> <view class="platformFee-title">
<view class="platformFee-title-color user"></view> <view class="platformFee-title-color user"></view>
<view class="platformFee-title-text">共计2个校区</view> <view class="platformFee-title-text">共计{{areaCount}}个校区</view>
</view> </view>
<view class="platformFee-canvas"> <view class="platformFee-canvas">
<user-grouth-chart dataList="{{growthList}}" month="{{month}}" /> <platform-fee-chart dataList="{{dataList}}" />
</view> </view>
</view> </view>
<view class="platformFee-block"> <view class="platformFee-block">
......
...@@ -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
...@@ -37,12 +37,12 @@ Component({ ...@@ -37,12 +37,12 @@ Component({
url: '/pages/feedback/feedback', url: '/pages/feedback/feedback',
reLaunch: false, reLaunch: false,
}, },
// { {
// name: '服务费缴纳', name: '服务费明细',
// icon: '../../../images/btn_jiaona@2x.png', icon: '../../../images/btn_jiaona@2x.png',
// url: '', url: '/pages/platformFee/platformFee',
// reLaunch: false, reLaunch: false,
// }, },
// { // {
// name: '账户提现', // name: '账户提现',
// icon: '../../../images/btn_tixian@2x.png', // icon: '../../../images/btn_tixian@2x.png',
...@@ -55,8 +55,8 @@ Component({ ...@@ -55,8 +55,8 @@ Component({
url: '/pages/index/index', url: '/pages/index/index',
reLaunch: true, reLaunch: true,
}, },
// {}, {},
// {}, {},
], ],
account: 0, account: 0,
platformFee: '0.00', platformFee: '0.00',
...@@ -68,10 +68,17 @@ Component({ ...@@ -68,10 +68,17 @@ Component({
}) })
.then(res => { .then(res => {
console.log(res); console.log(res);
this.setData({
platformFee: res.data ? res.data.toFixed(2) : '0.00',
});
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
}); });
}, },
showRechargeDialog() {
let dialog = this.selectComponent('#platformDialog');
dialog.fetchPlatformFee();
},
}, },
}); });
...@@ -27,13 +27,18 @@ ...@@ -27,13 +27,18 @@
<view class="report-header-platform"> <view class="report-header-platform">
<view class="report-header-platform-info"> <view class="report-header-platform-info">
待缴纳服务费 待缴纳服务费
<text class="report-header-platform-fee" selectable="false" space="false" decode="false">{{platformFee}}</text> <text class="report-header-platform-fee" selectable="false" space="false" decode="false">
{{platformFee}}
</text>
</view> </view>
<button class="report-header-platform-btn" wx:if="{{platformFee>0}}">缴费</button> <button class="report-header-platform-btn" wx:if="{{platformFee>0}}" bind:tap="showRechargeDialog">
缴费
</button>
</view> </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
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