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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
25 deletions
+67
-25
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
+4
-0
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) {
...
@@ -62,29 +62,35 @@ function findMaxIndex(list, key) {
}
}
Component
({
Component
({
lifetimes
:
{
//
lifetimes: {
attached
()
{
//
attached() {
const
query
=
wx
.
createSelectorQuery
().
in
(
this
);
//
const query = wx.createSelectorQuery().in(this);
query
//
query
.
select
(
'#PlatformFeeChart'
)
//
.select('#PlatformFeeChart')
.
boundingClientRect
(
res
=>
{
//
.boundingClientRect(res => {
// res.top; // 这个组件内 #the-id 节点的上边界坐标
//
// res.top; // 这个组件内 #the-id 节点的上边界坐标
console
.
log
(
res
);
//
console.log(res);
this
.
setData
({
//
this.setData({
x
:
res
.
left
,
//
x: res.left,
y
:
res
.
top
,
//
y: res.top,
});
//
});
})
//
})
.
exec
();
//
.exec();
},
//
},
},
//
},
properties
:
{
properties
:
{
dataList
:
{
dataList
:
{
type
:
Array
,
type
:
Array
,
value
:
[],
value
:
[],
observer
(
newVal
)
{
observer
(
newVal
)
{
platforFeeChart
&&
platforFeeChart
.
changeData
(
newVal
);
if
(
platforFeeChart
)
{
platforFeeChart
.
changeData
(
newVal
);
}
else
{
setTimeout
(()
=>
{
platforFeeChart
.
changeData
(
newVal
);
},
1000
);
}
if
(
platforFeeChart
)
{
if
(
platforFeeChart
)
{
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
let
index
=
findMaxIndex
(
newVal
,
'totalMoney'
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
...
@@ -107,14 +113,18 @@ Component({
...
@@ -107,14 +113,18 @@ Component({
opts
:
{
opts
:
{
onInit
:
initChart
,
onInit
:
initChart
,
},
},
x
:
0
,
y
:
0
,
},
},
methods
:
{
methods
:
{
clickHandle
(
e
)
{
clickHandle
(
e
)
{
console
.
log
(
e
.
detail
);
console
.
log
(
e
);
let
x
=
e
.
detail
.
x
-
this
.
data
.
x
;
const
{
touches
}
=
e
.
detail
;
let
y
=
e
.
detail
.
y
-
this
.
data
.
y
;
let
x
=
0
;
let
y
=
0
;
if
(
touches
&&
touches
.
length
)
{
x
=
touches
[
0
].
x
;
y
=
touches
[
0
].
y
;
}
const
objArr
=
platforFeeChart
.
getSnapRecords
({
x
,
y
});
const
objArr
=
platforFeeChart
.
getSnapRecords
({
x
,
y
});
if
(
objArr
.
length
)
this
.
triggerEvent
(
'selectedData'
,
objArr
[
0
].
_origin
);
if
(
objArr
.
length
)
this
.
triggerEvent
(
'selectedData'
,
objArr
[
0
].
_origin
);
},
},
...
...
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.wxml
View file @
876a0654
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bind:tap="clickHandle" />
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bindcanvastouch="clickHandle" />
\ No newline at end of file
\ No newline at end of file
miniprogram/pages/components/PlatformFeeChart/PlatformFeeChart.wxss
View file @
876a0654
/* pages/components/PlatformFeeChart/PlatformFeeChart.wxss */
/* 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';
...
@@ -3,6 +3,7 @@ import { IMyApp } from '../../../app';
const
app
=
getApp
<
IMyApp
>
();
const
app
=
getApp
<
IMyApp
>
();
let
timer
=
null
;
let
timer
=
null
;
let
payTimer
=
null
;
let
fetchedPlatform
=
false
;
let
fetchedPlatform
=
false
;
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js
// pages/components/PlatformFeeDialog/PlatformFeeDialog.js
Component
({
Component
({
...
@@ -177,6 +178,8 @@ Component({
...
@@ -177,6 +178,8 @@ Component({
});
});
if
(
this
.
data
.
type
===
2
)
{
if
(
this
.
data
.
type
===
2
)
{
this
.
fetchRechargeOrderQRcode
();
this
.
fetchRechargeOrderQRcode
();
}
else
{
payTimer
&&
clearInterval
(
payTimer
);
}
}
},
},
fetchRechargeOrderQRcode
()
{
fetchRechargeOrderQRcode
()
{
...
@@ -210,7 +213,7 @@ Component({
...
@@ -210,7 +213,7 @@ Component({
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
const
{
payQrUrl
}
=
res
;
const
{
payQrUrl
,
orderNum
}
=
res
;
this
.
setData
({
this
.
setData
({
payQrUrl
,
payQrUrl
,
});
});
...
@@ -233,6 +236,30 @@ Component({
...
@@ -233,6 +236,30 @@ Component({
});
});
}
}
},
1000
);
},
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
=>
{
.
catch
(
err
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
...
...
miniprogram/pages/platformFee/platformFee.wxml
View file @
876a0654
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<view class="platformFee-title-text">共计{{areaCount}}个校区</view>
<view class="platformFee-title-text">共计{{areaCount}}个校区</view>
</view>
</view>
<view class="platformFee-canvas">
<view class="platformFee-canvas">
<!-- <canvas class="platformFee-canvas" canvas-id="platformFee-canvas" bindtouchstart="selectedData" /> -->
<platform-fee-chart dataList="{{dataList}}" bind:selectedData="selectedData" />
<platform-fee-chart dataList="{{dataList}}" bind:selectedData="selectedData" />
</view>
</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