Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-boss
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-boss
Commits
bf331da5
Commit
bf331da5
authored
Dec 30, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付
parent
6f537cca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
227 additions
and
19 deletions
+227
-19
PlatformFeeChart.js
...ram/pages/components/PlatformFeeChart/PlatformFeeChart.js
+0
-0
PlatformFeeChart.ts
...ram/pages/components/PlatformFeeChart/PlatformFeeChart.ts
+25
-0
PlatformFeeChart.wxml
...m/pages/components/PlatformFeeChart/PlatformFeeChart.wxml
+2
-2
PlatformFeeDialog.js
...m/pages/components/PlatformFeeDialog/PlatformFeeDialog.js
+0
-0
PlatformFeeDialog.ts
...m/pages/components/PlatformFeeDialog/PlatformFeeDialog.ts
+101
-1
home.js
miniprogram/pages/home/home.js
+0
-0
home.ts
miniprogram/pages/home/home.ts
+15
-0
home.wxml
miniprogram/pages/home/home.wxml
+1
-2
platformFee.js
miniprogram/pages/platformFee/platformFee.js
+33
-2
platformFee.ts
miniprogram/pages/platformFee/platformFee.ts
+30
-0
platformFee.wxml
miniprogram/pages/platformFee/platformFee.wxml
+11
-10
platformFeeRecord.wxml
miniprogram/pages/platformFeeRecord/platformFeeRecord.wxml
+2
-1
platformFeeRecord.wxss
miniprogram/pages/platformFeeRecord/platformFeeRecord.wxss
+5
-0
report.wxml
miniprogram/pages/report/report.wxml
+2
-1
No files found.
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.js
View file @
bf331da5
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.ts
View file @
bf331da5
...
@@ -50,6 +50,17 @@ function initChart(canvas, width, height, F2) {
...
@@ -50,6 +50,17 @@ function initChart(canvas, width, height, F2) {
return
platforFeeChart
;
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
({
Component
({
properties
:
{
properties
:
{
dataList
:
{
dataList
:
{
...
@@ -57,6 +68,12 @@ Component({
...
@@ -57,6 +68,12 @@ Component({
value
:
[],
value
:
[],
observer
(
newVal
)
{
observer
(
newVal
)
{
platforFeeChart
&&
platforFeeChart
.
changeData
(
newVal
);
platforFeeChart
&&
platforFeeChart
.
changeData
(
newVal
);
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
if
(
index
!==
-
1
)
{
let
item
=
newVal
[
index
];
const
point
=
platforFeeChart
.
getPosition
(
item
);
platforFeeChart
.
showTooltip
(
point
);
}
},
},
},
},
month
:
{
month
:
{
...
@@ -72,4 +89,12 @@ Component({
...
@@ -72,4 +89,12 @@ Component({
onInit
:
initChart
,
onInit
:
initChart
,
},
},
},
},
methods
:
{
clickHandle
(
e
)
{
console
.
log
(
e
);
// let
const
obj
=
platforFeeChart
.
getRecord
(
e
.
detail
);
this
.
triggerEvent
(
'selectedData'
,
obj
);
},
},
});
});
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.wxml
View file @
bf331da5
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" />
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bind:tap="clickHandle" />
\ No newline at end of file
\ No newline at end of file
miniprogram/pages/components/PlatformFeeDialog/PlatformFeeDialog.js
View file @
bf331da5
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PlatformFeeDialog/PlatformFeeDialog.ts
View file @
bf331da5
...
@@ -3,6 +3,7 @@ import { IMyApp } from '../../../app';
...
@@ -3,6 +3,7 @@ import { IMyApp } from '../../../app';
const
app
=
getApp
<
IMyApp
>
();
const
app
=
getApp
<
IMyApp
>
();
let
timer
=
null
;
let
timer
=
null
;
let
fetchedPlatform
=
false
;
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js
Component
({
Component
({
lifetimes
:
{
lifetimes
:
{
...
@@ -11,7 +12,9 @@ Component({
...
@@ -11,7 +12,9 @@ Component({
this
.
setData
!
({
this
.
setData
!
({
userInfo
:
app
.
globalData
.
userInfo
,
userInfo
:
app
.
globalData
.
userInfo
,
});
});
this
.
data
.
eventType
===
'slef'
&&
this
.
fetchPlatformFee
();
this
.
data
.
eventType
===
'slef'
&&
!
fetchedPlatform
&&
this
.
fetchPlatformFee
();
},
},
},
},
/**
/**
...
@@ -60,6 +63,7 @@ Component({
...
@@ -60,6 +63,7 @@ Component({
payTimeLimit
,
payTimeLimit
,
showDialog
:
rechargeBalance
>
0
?
true
:
false
,
showDialog
:
rechargeBalance
>
0
?
true
:
false
,
});
});
fetchedPlatform
=
true
;
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -72,6 +76,77 @@ Component({
...
@@ -72,6 +76,77 @@ Component({
},
},
fetchRechargeInfo
()
{
fetchRechargeInfo
()
{
console
.
log
(
'in 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
,
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
()
{
goRecordsPage
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
...
@@ -104,6 +179,9 @@ Component({
...
@@ -104,6 +179,9 @@ Component({
wx
.
showLoading
({
wx
.
showLoading
({
title
:
''
,
title
:
''
,
});
});
wx
.
login
({
success
:
res
=>
{
if
(
res
.
code
)
{
const
entity
=
{
const
entity
=
{
billType
:
this
.
data
.
billType
,
billType
:
this
.
data
.
billType
,
isAgree
:
1
,
isAgree
:
1
,
...
@@ -128,6 +206,11 @@ Component({
...
@@ -128,6 +206,11 @@ Component({
let
count
=
this
.
data
.
countDown
;
let
count
=
this
.
data
.
countDown
;
if
(
count
===
0
)
{
if
(
count
===
0
)
{
clearInterval
(
timer
);
clearInterval
(
timer
);
this
.
setData
({
payQrUrl
:
''
,
countDown
:
600
,
countDownString
:
'0秒'
,
});
}
else
{
}
else
{
let
newCount
=
count
-
1
;
let
newCount
=
count
-
1
;
let
countString
=
let
countString
=
...
@@ -147,6 +230,23 @@ Component({
...
@@ -147,6 +230,23 @@ Component({
});
});
console
.
log
(
err
);
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'
,
});
},
});
},
},
},
},
});
});
miniprogram/pages/home/home.js
View file @
bf331da5
This diff is collapsed.
Click to expand it.
miniprogram/pages/home/home.ts
View file @
bf331da5
...
@@ -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/home.wxml
View file @
bf331da5
<!-- 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,6 +35,5 @@
...
@@ -34,6 +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>
<view class="home-box">您有平台服务费需要结算,请到缴纳页面及时处理</view>
<platform-dialog />
<platform-dialog />
</view>
</view>
\ No newline at end of file
miniprogram/pages/platformFee/platformFee.js
View file @
bf331da5
"use strict"
;
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
fetch_1
=
require
(
"../../api/fetch"
);
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
({
Page
({
data
:
{
data
:
{
areaCount
:
0
,
areaCount
:
0
,
year
:
''
,
year
:
''
,
dataList
:
[],
dataList
:
[],
selected
:
{
areaId
:
undefined
,
areaName
:
''
,
month
:
''
,
totalMoney
:
0
,
},
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
var
year
=
new
Date
().
getFullYear
();
var
year
=
new
Date
().
getFullYear
();
...
@@ -29,6 +47,13 @@ Page({
...
@@ -29,6 +47,13 @@ Page({
areaCount
:
areaCount
,
areaCount
:
areaCount
,
dataList
:
platformFees
,
dataList
:
platformFees
,
});
});
if
(
platformFees
&&
platformFees
.
length
)
{
var
index
=
findMaxIndex
(
platformFees
,
'totalMoney'
);
var
item
=
platformFees
[
index
];
_this
.
setData
({
selected
:
item
,
});
}
})
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -46,5 +71,11 @@ Page({
...
@@ -46,5 +71,11 @@ Page({
url
:
'/pages/platformFeeRecord/platformFeeRecord'
,
url
:
'/pages/platformFeeRecord/platformFeeRecord'
,
});
});
},
},
selectedData
:
function
(
e
)
{
var
data
=
e
.
detail
;
this
.
setData
({
selected
:
data
,
});
},
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm1GZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybUZlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUFrRDtBQUdsRCxJQUFJLENBQUM7SUFJSCxJQUFJLEVBQUU7UUFDSixTQUFTLEVBQUUsQ0FBQztRQUNaLElBQUksRUFBRSxFQUFFO1FBQ1IsUUFBUSxFQUFFLEVBQUU7S0FDYjtJQUtELE1BQU0sRUFBRSxVQUFTLE9BQU87UUFDdEIsSUFBSSxJQUFJLEdBQUcsSUFBSSxJQUFJLEVBQUUsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNwQyxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2xCLElBQUksQ0FBQyxTQUFTLENBQUM7WUFDYixJQUFJLE1BQUE7U0FDTCxDQUFDLENBQUM7UUFDSCxJQUFJLENBQUMsT0FBUSxDQUFDO1lBQ1osSUFBSSxNQUFBO1NBQ0wsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUNELFNBQVMsWUFBQyxNQUFNO1FBQWhCLGlCQWVDO1FBZEMsTUFBTSxDQUFDLHVCQUFlLENBQUM7WUFDckIsR0FBRyxFQUFFLHlDQUF5QztZQUM5QyxJQUFJLEVBQUUsTUFBTTtTQUNiLENBQUM7YUFDQyxJQUFJLENBQUMsVUFBQSxHQUFHO1lBQ0MsSUFBQSx5QkFBUyxFQUFFLCtCQUFZLENBQVM7WUFDeEMsS0FBSSxDQUFDLE9BQVEsQ0FBQztnQkFDWixTQUFTLFdBQUE7Z0JBQ1QsUUFBU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yKTtcbiAgICB0aGlzLmZldGNoTGlzdCh7XG4gICAgICB5ZWFyLFxuICAgIH0pO1xuICAgIHRoaXMuc2V0RGF0YSEoe1xuICAgICAgeWVhcixcbiAgICB9KTtcbiAgfSxcbiAgZmV0Y2hMaXN0KGVudGl0eSkge1xuICAgIHJldHVybiBzdGF0aXN0aWNzRmV0Y2goe1xuICAgICAgdXJsOiAnL2RjeHkvcGxhdGZvcm1GZWUvb3BlcmF0ZS9hcmVhcy9tb250aGx5JyxcbiAgICAgIGRhdGE6IGVudGl0eSxcbiAgICB9KVxuICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgY29uc3QgeyBhcmVhQ291bnQsIHBsYXRmb3JtRmVlcyB9ID0gcmVzO1xuICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICBhcmVhQ291bnQsXG4gICAgICAgICAgZGF0YUxpc3Q6IHBsYXRmb3JtRmVlcyxcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICB9KTtcbiAgfSxcbiAgeWVhckNoYW5nZUhhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coZSk7XG4gICAgY29uc3QgeyB2YWx1ZSB9ID0gZS5kZXRhaWw7XG4gICAgdGhpcy5mZXRjaExpc3Qoe1xuICAgICAgeWVhcjogdmFsdWUsXG4gICAgfSk7XG4gIH0sXG4gIGdvUmVjb3JkUGFnZSgpIHtcbiAgICB3eC5uYXZpZ2F0ZVRvKHtcbiAgICAgIHVybDogJy9wYWdlcy9wbGF0Zm9ybUZlZVJlY29yZC9wbGF0Zm9ybUZlZVJlY29yZCcsXG4gICAgfSk7XG4gIH0sXG59KTtcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm1GZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF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AndG90YWxNb25leScpO1xuICAgICAgICAgIGxldCBpdGVtID0gcGxhdGZvcm1GZWVzW2luZGV4XTtcbiAgICAgICAgICB0aGlzLnNldERhdGEhKHtcbiAgICAgICAgICAgIHNlbGVjdGVkOiBpdGVtLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICB9KTtcbiAgfSxcbiAgeWVhckNoYW5nZUhhbmRsZShlKSB7XG4gICAgY29uc29sZS5sb2coZSk7XG4gICAgY29uc3QgeyB2YWx1ZSB9ID0gZS5kZXRhaWw7XG4gICAgdGhpcy5mZXRjaExpc3Qoe1xuICAgICAgeWVhcjogdmFsdWUsXG4gICAgfSk7XG4gIH0sXG4gIGdvUmVjb3JkUGFnZSgpIHtcbiAgICB3eC5uYXZpZ2F0ZVRvKHtcbiAgICAgIHVybDogJy9wYWdlcy9wbGF0Zm9ybUZlZVJlY29yZC9wbGF0Zm9ybUZlZVJlY29yZCcsXG4gICAgfSk7XG4gIH0sXG4gIHNlbGVjdGVkRGF0YShlKSB7XG4gICAgY29uc3QgZGF0YSA9IGUuZGV0YWlsO1xuICAgIHRoaXMuc2V0RGF0YSh7XG4gICAgICBzZWxlY3RlZDogZGF0YSxcbiAgICB9KTtcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
\ No newline at end of file
miniprogram/pages/platformFee/platformFee.ts
View file @
bf331da5
import
{
statisticsFetch
}
from
'../../api/fetch'
;
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
// miniprogram/pages/platformFee/platformFee.js
Page
({
Page
({
/**
/**
...
@@ -9,6 +20,12 @@ Page({
...
@@ -9,6 +20,12 @@ Page({
areaCount
:
0
,
areaCount
:
0
,
year
:
''
,
year
:
''
,
dataList
:
[],
dataList
:
[],
selected
:
{
areaId
:
undefined
,
areaName
:
''
,
month
:
''
,
totalMoney
:
0
,
},
},
},
/**
/**
...
@@ -35,6 +52,13 @@ Page({
...
@@ -35,6 +52,13 @@ Page({
areaCount
,
areaCount
,
dataList
:
platformFees
,
dataList
:
platformFees
,
});
});
if
(
platformFees
&&
platformFees
.
length
)
{
let
index
=
findMaxIndex
(
platformFees
,
'totalMoney'
);
let
item
=
platformFees
[
index
];
this
.
setData
!
({
selected
:
item
,
});
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -52,4 +76,10 @@ Page({
...
@@ -52,4 +76,10 @@ Page({
url
:
'/pages/platformFeeRecord/platformFeeRecord'
,
url
:
'/pages/platformFeeRecord/platformFeeRecord'
,
});
});
},
},
selectedData
(
e
)
{
const
data
=
e
.
detail
;
this
.
setData
({
selected
:
data
,
});
},
});
});
miniprogram/pages/platformFee/platformFee.wxml
View file @
bf331da5
...
@@ -12,26 +12,26 @@
...
@@ -12,26 +12,26 @@
<view class="platformFee-title-text">共计{{areaCount}}个校区</view>
<view class="platformFee-title-text">共计{{areaCount}}个校区</view>
</view>
</view>
<view class="platformFee-canvas">
<view class="platformFee-canvas">
<platform-fee-chart dataList="{{dataList}}" />
<platform-fee-chart dataList="{{dataList}}"
bind:selectedData="selectedData"
/>
</view>
</view>
</view>
</view>
<view class="platformFee-block">
<view class="platformFee-block"
wx:if="{{selected.areaId}}"
>
<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">各校区服务费(
9
月)</view>
<view class="platformFee-title-text">各校区服务费(
{{selected.month}}
月)</view>
<view class="platformFee-title-sum">合计:
1,800.00
</view>
<view class="platformFee-title-sum">合计:
{{selected.totalMoney}}
</view>
</view>
</view>
<view class="platformFee-areaList">
<view class="platformFee-areaList">
<view class="platformFee-areaItem">
<view class="platformFee-areaItem"
wx:for="{{selected.areaPlatformFees}}"
>
<view class="platformFee-areaItem-index">
1
</view>
<view class="platformFee-areaItem-index">
{{index}}
</view>
<view class="platformFee-areaItem-name">
多彩温江
</view>
<view class="platformFee-areaItem-name">
{{item.areaName}}
</view>
<view class="platformFee-areaItem-price">
1,000.00
</view>
<view class="platformFee-areaItem-price">
{{item.totalMoney}}
</view>
</view>
</view>
<view class="platformFee-areaItem">
<
!-- <
view class="platformFee-areaItem">
<view class="platformFee-areaItem-index">2</view>
<view class="platformFee-areaItem-index">2</view>
<view class="platformFee-areaItem-name">多彩温江</view>
<view class="platformFee-areaItem-name">多彩温江</view>
<view class="platformFee-areaItem-price">1,000.00</view>
<view class="platformFee-areaItem-price">1,000.00</view>
</view>
</view>
-->
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
miniprogram/pages/platformFeeRecord/platformFeeRecord.wxml
View file @
bf331da5
<!-- miniprogram/pages/platformFeeRecord/platformFeeRecord.wxml -->
<!-- miniprogram/pages/platformFeeRecord/platformFeeRecord.wxml -->
<view class="platformFeeRecord">
<view class="platformFeeRecord">
<scroll-view class="platformFeeRecord-list" scroll-y bindscrolltolower="getMoreListItem">
<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-item" wx:for="{{dataList}}" wx:key="{{item.id}}">
<view class="platformFeeRecord-itemTitle">
<view class="platformFeeRecord-itemTitle">
<view class="platformFeeRecord-itemTitle-text">
<view class="platformFeeRecord-itemTitle-text">
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
<view wx:else class="noData">暂无数据</view>
<!-- <view class="platformFeeRecord-item">
<!-- <view class="platformFeeRecord-item">
<view class="platformFeeRecord-itemTitle">
<view class="platformFeeRecord-itemTitle">
<view class="platformFeeRecord-itemTitle-text">微信缴费-专用发票</view>
<view class="platformFeeRecord-itemTitle-text">微信缴费-专用发票</view>
...
...
miniprogram/pages/platformFeeRecord/platformFeeRecord.wxss
View file @
bf331da5
...
@@ -33,3 +33,7 @@ page,
...
@@ -33,3 +33,7 @@ page,
.platformFeeRecord-col:last-child {
.platformFeeRecord-col:last-child {
margin-bottom: 0;
margin-bottom: 0;
}
}
.noData{
padding: 50rpx;
text-align: center;
}
\ No newline at end of file
miniprogram/pages/report/report.wxml
View file @
bf331da5
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<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" />
<platform-dialog id="platformDialog" eventType="parents" />
</view>
</view>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment