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
876a0654
Commit
876a0654
authored
Jan 02, 2020
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
faaae9a4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
27 deletions
+68
-27
PlatformFeeChart.js
...ram/pages/components/PlatformFeeChart/PlatformFeeChart.js
+0
-0
PlatformFeeChart.ts
...ram/pages/components/PlatformFeeChart/PlatformFeeChart.ts
+32
-22
PlatformFeeChart.wxml
...m/pages/components/PlatformFeeChart/PlatformFeeChart.wxml
+2
-2
PlatformFeeChart.wxss
...m/pages/components/PlatformFeeChart/PlatformFeeChart.wxss
+5
-2
PlatformFeeDialog.js
...m/pages/components/PlatformFeeDialog/PlatformFeeDialog.js
+0
-0
PlatformFeeDialog.ts
...m/pages/components/PlatformFeeDialog/PlatformFeeDialog.ts
+28
-1
platformFee.wxml
miniprogram/pages/platformFee/platformFee.wxml
+1
-0
No files found.
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.js
View file @
876a0654
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.ts
View file @
876a0654
...
...
@@ -62,29 +62,35 @@ 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
();
},
},
//
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
);
if
(
platforFeeChart
)
{
platforFeeChart
.
changeData
(
newVal
);
}
else
{
setTimeout
(()
=>
{
platforFeeChart
.
changeData
(
newVal
);
},
1000
);
}
if
(
platforFeeChart
)
{
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
if
(
index
!==
-
1
)
{
...
...
@@ -107,14 +113,18 @@ Component({
opts
:
{
onInit
:
initChart
,
},
x
:
0
,
y
:
0
,
},
methods
:
{
clickHandle
(
e
)
{
console
.
log
(
e
.
detail
);
let
x
=
e
.
detail
.
x
-
this
.
data
.
x
;
let
y
=
e
.
detail
.
y
-
this
.
data
.
y
;
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
);
},
...
...
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.wxml
View file @
876a0654
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bind:tap="clickHandle" />
\ No newline at end of file
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bindcanvastouch="clickHandle" />
\ No newline at end of file
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.wxss
View file @
876a0654
/* pages/components/PlatformFeeChart/PlatformFeeChart.wxss */
\ No newline at end of file
/* pages/components/PlatformFeeChart/PlatformFeeChart.wxss */
.PlatformFeeChart {
width: 660rpx;
height: 350rpx;
}
miniprogram/pages/components/PlatformFeeDialog/PlatformFeeDialog.js
View file @
876a0654
This diff is collapsed.
Click to expand it.
miniprogram/pages/components/PlatformFeeDialog/PlatformFeeDialog.ts
View file @
876a0654
...
...
@@ -3,6 +3,7 @@ import { IMyApp } from '../../../app';
const
app
=
getApp
<
IMyApp
>
();
let
timer
=
null
;
let
payTimer
=
null
;
let
fetchedPlatform
=
false
;
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js
Component
({
...
...
@@ -177,6 +178,8 @@ Component({
});
if
(
this
.
data
.
type
===
2
)
{
this
.
fetchRechargeOrderQRcode
();
}
else
{
payTimer
&&
clearInterval
(
payTimer
);
}
},
fetchRechargeOrderQRcode
()
{
...
...
@@ -210,7 +213,7 @@ Component({
})
.
then
(
res
=>
{
wx
.
hideLoading
();
const
{
payQrUrl
}
=
res
;
const
{
payQrUrl
,
orderNum
}
=
res
;
this
.
setData
({
payQrUrl
,
});
...
...
@@ -233,6 +236,30 @@ Component({
});
}
},
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
();
...
...
miniprogram/pages/platformFee/platformFee.wxml
View file @
876a0654
...
...
@@ -12,6 +12,7 @@
<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>
...
...
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