Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
X
XiTianSenMall
Project
Project
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
leiqingsong
XiTianSenMall
Commits
4c95f6a7
Commit
4c95f6a7
authored
Mar 08, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱包接口
parent
0599f4cb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
7 deletions
+102
-7
wallet.js
H5/src/api/wallet.js
+1
-1
request.js
H5/src/utils/request.js
+3
-1
canCashOut.vue
H5/src/views/canCashOut.vue
+19
-1
income-detail.vue
H5/src/views/income/income-detail.vue
+77
-4
wallet.vue
H5/src/views/income/wallet.vue
+2
-0
No files found.
H5/src/api/wallet.js
View file @
4c95f6a7
...
...
@@ -18,7 +18,7 @@ export function getMoneyPackage(params) {
*/
export
function
getWithdrawalAmount
(
params
)
{
return
request
({
url
:
"getWithdrawalAmount"
,
url
:
"
/wallet/
getWithdrawalAmount"
,
method
:
"get"
,
params
});
...
...
H5/src/utils/request.js
View file @
4c95f6a7
...
...
@@ -22,6 +22,8 @@ service.interceptors.request.use(
error
=>
{
if
(
loading
)
Toast
.
clear
();
console
.
log
(
"rqquest====错误"
,
error
);
console
.
log
(
error
);
this
.
$toast
.
fail
(
error
.
response
.
data
.
error
);
}
);
...
...
@@ -33,7 +35,7 @@ service.interceptors.response.use(
},
error
=>
{
if
(
loading
)
Toast
.
clear
();
console
.
log
(
"response===错误"
,
error
);
return
Promise
.
reject
(
error
);
}
);
...
...
H5/src/views/canCashOut.vue
View file @
4c95f6a7
...
...
@@ -30,6 +30,8 @@
</
template
>
<
script
>
import
{
getWithdrawalAmount
}
from
"@/api/wallet"
;
export
default
{
name
:
"leagueNums"
,
data
()
{
...
...
@@ -40,7 +42,23 @@ export default {
"提现规则:这是一条规则,这是一条规则,这是一条规则,这是一条规则这是一条规则这是一条规则这是一条规则。"
};
},
methods
:
{}
mounted
()
{
this
.
getWithdrawal
();
},
methods
:
{
getWithdrawal
()
{
const
params
=
{
userId
:
"13100911369"
}
getWithdrawalAmount
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
preNum
=
res
.
data
.
lastMoneyNot
;
this
.
currentNum
=
res
.
data
.
currentMoneyCan
this
.
rules
=
res
.
data
.
withdrawRule
;
}
})
}
}
};
</
script
>
...
...
H5/src/views/income/income-detail.vue
View file @
4c95f6a7
...
...
@@ -9,12 +9,12 @@
<base-refresh-scroll
@
downLoad=
"onDownLoad"
@
upRefresh=
"onUpRefresh"
>
<div
slot=
"content"
>
<div
v-for=
"(item, index) in
10
"
v-for=
"(item, index) in
detailList
"
:key=
"`income-detail-$
{index}`"
class="detail-list-item"
>
<span>
工资收益
</span>
<span>
¥
55
</span>
<span>
{{
item
.
name
}}
</span>
<span>
¥
{{
item
.
money
}}
</span>
<span
class=
"time"
>
2021.02.26 10:02
</span>
</div>
</div>
...
...
@@ -25,12 +25,52 @@
</
template
>
<
script
>
import
{
queryIncomeDetail
}
from
"@/api/wallet"
;
import
BaseRefreshScroll
from
"../../components/BaseRefreshScroll.vue"
;
export
default
{
components
:
{
BaseRefreshScroll
},
name
:
"IncomeDetail"
,
data
()
{
return
{
detailList
:
[],
legendPos
:
[
{
x
:
"1%"
,
y
:
"65%"
},
{
x
:
"28%"
,
y
:
"65%"
},
{
x
:
"65%"
,
y
:
"65%"
},
{
x
:
"1%"
,
y
:
"75%"
},
{
x
:
"28%"
,
y
:
"75%"
},
{
x
:
"65%"
,
y
:
"75%"
},
{
x
:
"1%"
,
y
:
"85%"
},
{
x
:
"28%"
,
y
:
"85%"
},
{
x
:
"65%"
,
y
:
"85%"
}
],
pieOption
:
{
legend
:
[
{
...
...
@@ -179,7 +219,8 @@ export default {
};
},
mounted
()
{
this
.
pieOption
.
graphic
.
children
[
0
].
style
.
text
=
"123456"
;
// this.pieOption.graphic.children[0].style.text = "123456";
this
.
getDetail
();
},
methods
:
{
onDownLoad
(
val
)
{
...
...
@@ -187,6 +228,38 @@ export default {
},
onUpRefresh
(
val
)
{
console
.
log
(
"上拉加载"
,
val
);
},
getDetail
()
{
const
params
=
{
userId
:
"13100911369"
}
queryIncomeDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
pieOption
.
graphic
.
children
[
0
].
style
.
text
=
res
.
data
.
totalIncome
this
.
detailList
=
res
.
data
.
list
.
map
(
item
=>
{
return
{
name
:
item
.
typeName
,
money
:
item
.
money
,
incomeTime
:
item
.
incomeTime
.
substr
(
0
,
16
).
replaceAll
(
'-'
,
'.'
),
}
});
this
.
pieOption
.
series
[
0
].
data
=
this
.
detailList
.
map
(
item
=>
{
return
{
value
:
item
.
money
,
name
:
item
.
name
};
})
const
legend
=
this
.
detailList
.
map
((
item
,
index
)
=>
{
return
{
selectedMode
:
false
,
...
this
.
legendPos
[
index
],
itemWidth
:
12
,
data
:
[
item
.
name
]
}
});
this
.
pieOption
.
legend
=
legend
;
}
})
}
}
};
...
...
H5/src/views/income/wallet.vue
View file @
4c95f6a7
...
...
@@ -99,6 +99,8 @@ export default {
}
else
{
this
.
$toast
.
fail
(
res
.
message
);
}
}).
catch
(
error
=>
{
console
.
log
(
error
);
});
}
}
...
...
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