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) {
...
@@ -11,7 +11,7 @@ function initChart(canvas, width, height, F2) {
});
});
platforFeeChart
.
source
(
data
,
{
platforFeeChart
.
source
(
data
,
{
days
:
{
month
:
{
min
:
1
,
min
:
1
,
max
:
12
,
max
:
12
,
},
},
...
@@ -26,7 +26,7 @@ function initChart(canvas, width, height, F2) {
...
@@ -26,7 +26,7 @@ function initChart(canvas, width, height, F2) {
onShow
(
ev
)
{
onShow
(
ev
)
{
const
{
items
}
=
ev
;
const
{
items
}
=
ev
;
items
[
0
].
name
=
''
;
items
[
0
].
name
=
''
;
items
[
0
].
value
=
month
+
'-'
+
items
[
0
].
title
;
items
[
0
].
value
=
items
[
0
].
title
+
'月'
;
items
[
1
].
name
=
''
;
items
[
1
].
name
=
''
;
items
[
1
].
value
=
items
[
1
].
value
+
'元'
;
items
[
1
].
value
=
items
[
1
].
value
+
'元'
;
},
},
...
@@ -62,17 +62,36 @@ function findMaxIndex(list, key) {
...
@@ -62,17 +62,36 @@ function findMaxIndex(list, key) {
}
}
Component
({
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
:
{
properties
:
{
dataList
:
{
dataList
:
{
type
:
Array
,
type
:
Array
,
value
:
[],
value
:
[],
observer
(
newVal
)
{
observer
(
newVal
)
{
platforFeeChart
&&
platforFeeChart
.
changeData
(
newVal
);
platforFeeChart
&&
platforFeeChart
.
changeData
(
newVal
);
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
if
(
platforFeeChart
)
{
if
(
index
!==
-
1
)
{
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
let
item
=
newVal
[
index
];
if
(
index
!==
-
1
)
{
const
point
=
platforFeeChart
.
getPosition
(
item
);
let
item
=
newVal
[
index
];
platforFeeChart
.
showTooltip
(
point
);
const
point
=
platforFeeChart
.
getPosition
(
item
);
platforFeeChart
.
showTooltip
(
point
);
}
}
}
},
},
},
},
...
@@ -88,13 +107,16 @@ Component({
...
@@ -88,13 +107,16 @@ Component({
opts
:
{
opts
:
{
onInit
:
initChart
,
onInit
:
initChart
,
},
},
x
:
0
,
y
:
0
,
},
},
methods
:
{
methods
:
{
clickHandle
(
e
)
{
clickHandle
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
.
detail
);
// let
let
x
=
e
.
detail
.
x
-
this
.
data
.
x
;
const
obj
=
platforFeeChart
.
getRecord
(
e
.
detail
);
let
y
=
e
.
detail
.
y
-
this
.
data
.
y
;
this
.
triggerEvent
(
'selectedData'
,
obj
);
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({
...
@@ -204,7 +204,7 @@ Component({
type
:
2
,
type
:
2
,
};
};
operatorFetch
({
operatorFetch
({
url
:
'/operateBalance/rechage/order'
,
url
:
'/operateBalance/rechage/order
/forcodeimg
'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
entity
,
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({
...
@@ -48,13 +48,27 @@ Page({
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
areaCount
,
platformFees
}
=
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
!
({
this
.
setData
!
({
areaCount
,
areaCount
,
dataList
:
platformFees
,
dataList
:
datalist
,
});
});
if
(
platformFees
&&
platformFees
.
length
)
{
if
(
datalist
&&
datalist
.
length
)
{
let
index
=
findMaxIndex
(
platformFees
,
'totalMoney'
);
let
index
=
findMaxIndex
(
datalist
,
'totalMoney'
);
let
item
=
platformFees
[
index
];
let
item
=
datalist
[
index
];
this
.
setData
!
({
this
.
setData
!
({
selected
:
item
,
selected
:
item
,
});
});
...
@@ -77,8 +91,9 @@ Page({
...
@@ -77,8 +91,9 @@ Page({
});
});
},
},
selectedData
(
e
)
{
selectedData
(
e
)
{
console
.
log
(
e
)
const
data
=
e
.
detail
;
const
data
=
e
.
detail
;
this
.
setData
({
this
.
setData
!
({
selected
:
data
,
selected
:
data
,
});
});
},
},
...
...
miniprogram/pages/platformFee/platformFee.wxml
View file @
8296f540
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<platform-fee-chart dataList="{{dataList}}" bind:selectedData="selectedData" />
<platform-fee-chart dataList="{{dataList}}" bind:selectedData="selectedData" />
</view>
</view>
</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">
<view class="platformFee-title-color user"></view>
<view class="platformFee-title-color user"></view>
<view class="platformFee-title-text">各校区服务费({{selected.month}}月)</view>
<view class="platformFee-title-text">各校区服务费({{selected.month}}月)</view>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</view>
</view>
<view class="platformFee-areaList">
<view class="platformFee-areaList">
<view class="platformFee-areaItem" wx:for="{{selected.areaPlatformFees}}">
<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-name">{{item.areaName}}</view>
<view class="platformFee-areaItem-price">{{item.totalMoney}}</view>
<view class="platformFee-areaItem-price">{{item.totalMoney}}</view>
</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