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
8296f540
Commit
8296f540
authored
Dec 31, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
a186d644
8a6b4fdb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
19 deletions
+56
-19
PlatformFeeChart.js
...ram/pages/components/PlatformFeeChart/PlatformFeeChart.js
+0
-0
PlatformFeeChart.ts
...ram/pages/components/PlatformFeeChart/PlatformFeeChart.ts
+33
-11
PlatformFeeDialog.js
...m/pages/components/PlatformFeeDialog/PlatformFeeDialog.js
+0
-0
PlatformFeeDialog.ts
...m/pages/components/PlatformFeeDialog/PlatformFeeDialog.ts
+1
-1
platformFee.js
miniprogram/pages/platformFee/platformFee.js
+0
-0
platformFee.ts
miniprogram/pages/platformFee/platformFee.ts
+20
-5
platformFee.wxml
miniprogram/pages/platformFee/platformFee.wxml
+2
-2
No files found.
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.js
View file @
8296f540
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.ts
View file @
8296f540
...
...
@@ -11,7 +11,7 @@ function initChart(canvas, width, height, F2) {
});
platforFeeChart
.
source
(
data
,
{
days
:
{
month
:
{
min
:
1
,
max
:
12
,
},
...
...
@@ -26,7 +26,7 @@ function initChart(canvas, width, height, F2) {
onShow
(
ev
)
{
const
{
items
}
=
ev
;
items
[
0
].
name
=
''
;
items
[
0
].
value
=
month
+
'-'
+
items
[
0
].
title
;
items
[
0
].
value
=
items
[
0
].
title
+
'月'
;
items
[
1
].
name
=
''
;
items
[
1
].
value
=
items
[
1
].
value
+
'元'
;
},
...
...
@@ -62,17 +62,36 @@ function findMaxIndex(list, key) {
}
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
)
{
platforFeeChart
&&
platforFeeChart
.
changeData
(
newVal
);
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
if
(
index
!==
-
1
)
{
let
item
=
newVal
[
index
];
const
point
=
platforFeeChart
.
getPosition
(
item
);
platforFeeChart
.
showTooltip
(
point
);
if
(
platforFeeChart
)
{
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
if
(
index
!==
-
1
)
{
let
item
=
newVal
[
index
];
const
point
=
platforFeeChart
.
getPosition
(
item
);
platforFeeChart
.
showTooltip
(
point
);
}
}
},
},
...
...
@@ -88,13 +107,16 @@ Component({
opts
:
{
onInit
:
initChart
,
},
x
:
0
,
y
:
0
,
},
methods
:
{
clickHandle
(
e
)
{
console
.
log
(
e
);
// let
const
obj
=
platforFeeChart
.
getRecord
(
e
.
detail
);
this
.
triggerEvent
(
'selectedData'
,
obj
);
console
.
log
(
e
.
detail
);
let
x
=
e
.
detail
.
x
-
this
.
data
.
x
;
let
y
=
e
.
detail
.
y
-
this
.
data
.
y
;
const
objArr
=
platforFeeChart
.
getSnapRecords
({
x
,
y
});
if
(
objArr
.
length
)
this
.
triggerEvent
(
'selectedData'
,
objArr
[
0
].
_origin
);
},
},
});
miniprogram/pages/components/PlatformFeeDialog/PlatformFeeDialog.js
View file @
8296f540
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PlatformFeeDialog/PlatformFeeDialog.ts
View file @
8296f540
...
...
@@ -204,7 +204,7 @@ Component({
type
:
2
,
};
operatorFetch
({
url
:
'/operateBalance/rechage/order'
,
url
:
'/operateBalance/rechage/order
/forcodeimg
'
,
method
:
'POST'
,
data
:
entity
,
})
...
...
miniprogram/pages/platformFee/platformFee.js
View file @
8296f540
This diff is collapsed.
Click to expand it.
miniprogram/pages/platformFee/platformFee.ts
View file @
8296f540
...
...
@@ -48,13 +48,27 @@ Page({
})
.
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
:
platformFees
,
dataList
:
datalist
,
});
if
(
platformFees
&&
platformFees
.
length
)
{
let
index
=
findMaxIndex
(
platformFees
,
'totalMoney'
);
let
item
=
platformFees
[
index
];
if
(
datalist
&&
datalist
.
length
)
{
let
index
=
findMaxIndex
(
datalist
,
'totalMoney'
);
let
item
=
datalist
[
index
];
this
.
setData
!
({
selected
:
item
,
});
...
...
@@ -77,8 +91,9 @@ Page({
});
},
selectedData
(
e
)
{
console
.
log
(
e
)
const
data
=
e
.
detail
;
this
.
setData
({
this
.
setData
!
({
selected
:
data
,
});
},
...
...
miniprogram/pages/platformFee/platformFee.wxml
View file @
8296f540
...
...
@@ -15,7 +15,7 @@
<platform-fee-chart dataList="{{dataList}}" bind:selectedData="selectedData" />
</view>
</view>
<view class="platformFee-block" wx:if="{{selected.
areaId
}}">
<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>
...
...
@@ -23,7 +23,7 @@
</view>
<view class="platformFee-areaList">
<view class="platformFee-areaItem" wx:for="{{selected.areaPlatformFees}}">
<view class="platformFee-areaItem-index">{{index}}</view>
<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>
...
...
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