Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
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
frontend
mall-webview
Commits
3a75e8e1
Commit
3a75e8e1
authored
Apr 08, 2021
by
wykolor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 收支明细调节
parent
88b4c613
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
26 deletions
+35
-26
index.ts
src/model/bonus/index.ts
+10
-1
index.ts
src/server/api/bonus/index.ts
+7
-1
index.vue
src/views/bonus/bonus-detail/index.vue
+2
-20
index.vue
src/views/bonus/withdraw/index.vue
+16
-4
No files found.
src/model/bonus/index.ts
View file @
3a75e8e1
...
...
@@ -2,7 +2,7 @@
* @Author: wykolor
* @Date: 2021-03-23 11:44:35
* @Last Modified by: mikey.zhaopeng
* @Last Modified time: 2021-04-0
6 19:01:39
* @Last Modified time: 2021-04-0
7 17:24:47
*/
export
interface
PageParams
{
...
...
@@ -86,3 +86,12 @@ export interface WithdrawResponse {
withdrawApplyTime
:
string
;
expectedPayTime
:
string
;
}
export
interface
WithdrawRiskResponse
{
withdrawable
:
boolean
;
systemDailyWithdrawLimit
:
number
;
studentDailyWithdrawLimit
:
number
;
studentWithdrawLimit
:
number
;
userDailyWithdrawLimit
:
number
;
userWithdrawLimit
:
number
;
}
src/server/api/bonus/index.ts
View file @
3a75e8e1
...
...
@@ -7,7 +7,8 @@ import {
WithdrawListParams
,
WithdrawListResponse
,
WithdrawParams
,
WithdrawResponse
WithdrawResponse
,
WithdrawRiskResponse
}
from
"@/model/bonus"
;
import
{
get
,
post
}
from
"../../request"
;
...
...
@@ -43,3 +44,8 @@ export const withdraw = (params: WithdrawParams) => {
export
const
bindWeiChat
=
(
params
:
{
code
:
string
})
=>
{
return
post
(
"/api-jksxb-app/v1/withdraw/bind/wx/parent"
,
params
)
}
// 获取用户风控值
export
const
getWithdrawRisk
=
(
studentId
:
string
)
=>
{
return
get
<
WithdrawRiskResponse
>
(
"/api-jksxb-app/v1/risk/getWithdrawRisk"
,
{
studentId
})
}
src/views/bonus/bonus-detail/index.vue
View file @
3a75e8e1
...
...
@@ -15,6 +15,7 @@
v-model:error=
"error"
:finished=
"finished"
finished-text=
"~暂无更多数据~"
:immediate-check=
"false"
@
load=
"onLoad"
>
<van-tab
name=
"REDUCE"
title=
"支出"
class=
"bonus-detail-pay-list"
>
...
...
@@ -168,29 +169,9 @@ const BonusDetail = defineComponent({
state
.
finished
=
pageAdd
.
finished
;
pageAdd
.
pageNum
++
;
}
console
.
log
(
bonusList
.
reduceList
,
bonusList
.
addList
);
}
catch
{
state
.
finished
=
true
;
}
// bonusModel.getBonusList(params).then(res => {
// const { list, total } = res.data;
// if (total === 0) {
// state.finished = true;
// return;
// }
// state.loading = false;
// if (state.active === FlowType.REDUCE) {
// bonusList.reduceList = bonusList.reduceList.concat(list);
// pageReduce.finished = bonusList.reduceList.length === total;
// state.finished = pageReduce.finished;
// pageReduce.pageNum++;
// } else {
// bonusList.addList = bonusList.addList.concat(list);
// pageAdd.finished = bonusList.addList.length === total;
// state.finished = pageAdd.finished;
// pageAdd.pageNum++;
// }
// });
};
const
onRefresh
=
()
=>
{
// 清空列表数据
...
...
@@ -214,6 +195,7 @@ const BonusDetail = defineComponent({
type
:
"title"
,
data
:
"奖励金明细"
});
onLoad
();
});
return
{
...
toRefs
(
state
),
...
...
src/views/bonus/withdraw/index.vue
View file @
3a75e8e1
...
...
@@ -29,7 +29,7 @@
<p
class=
"bonus-withdraw-input-valid"
>
今日可提现金额¥{{ withdrawableTotal }}元
</p>
<p
class=
"bonus-withdraw-input-tip"
>
<i
class=
"iconfont icon-wenhao"
></i>
<span>
单日累计提现不超过
500
元!
</span>
<span>
单日累计提现不超过
{{ studentDailyWithdrawLimit }}
元!
</span>
</p>
</div>
<van-cell
class=
"van-cell-tip"
title=
"提现至"
size=
"large"
:border=
"false"
>
...
...
@@ -131,13 +131,13 @@
<
script
lang=
"ts"
>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
declare
const
TencentCaptcha
:
any
;
import
{
computed
,
defineComponent
,
onMounted
,
reactive
,
ref
,
toRefs
}
from
"vue"
;
import
{
computed
,
defineComponent
,
onMounted
,
reactive
,
toRefs
}
from
"vue"
;
import
{
Button
,
Cell
,
Dialog
,
Field
,
Toast
}
from
"vant"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useStore
}
from
"vuex"
;
import
{
useNativeBridge
}
from
"@/util/use-native-bridge"
;
import
{
countDown
}
from
"../../../util/timer"
;
import
{
checkCaptcha
,
withdraw
}
from
"@/server/api/bonus"
;
import
{
checkCaptcha
,
withdraw
,
getWithdrawRisk
}
from
"@/server/api/bonus"
;
import
{
WithdrawResponse
}
from
"@/model/bonus"
;
interface
TencentCaptchaResponse
{
ret
:
number
;
...
...
@@ -174,7 +174,8 @@ const Withdraw = defineComponent({
showWithdrawSuccess
:
false
,
mobileTip
:
""
,
withdrawAccount
:
""
,
withdrawResponse
:
{}
withdrawResponse
:
{},
studentDailyWithdrawLimit
:
0
// 学生单日提现上限
});
const
{
withdrawableTotal
,
withdrawAccount
}
=
route
.
params
;
state
.
withdrawableTotal
=
Number
(
withdrawableTotal
);
...
...
@@ -199,6 +200,7 @@ const Withdraw = defineComponent({
state
.
showWithdraw
=
true
;
};
// 获取验证码
const
getSmsVerifyCode
=
()
=>
{
const
captcha1
=
new
TencentCaptcha
(
"2087826974"
,
...
...
@@ -219,6 +221,7 @@ const Withdraw = defineComponent({
captcha1
.
show
();
};
// 提现
const
withdrawReal
=
async
()
=>
{
if
(
!
state
.
smsVerifyCode
)
{
Toast
(
"请输入验证码"
);
...
...
@@ -239,12 +242,21 @@ const Withdraw = defineComponent({
// state.showWithdrawSuccess = true;
};
// 获取风控值
const
getWithdrawRiskReq
=
async
()
=>
{
const
{
data
:
{
studentDailyWithdrawLimit
}
}
=
await
getWithdrawRisk
(
bonusStoreState
.
value
.
studentId
);
state
.
studentDailyWithdrawLimit
=
studentDailyWithdrawLimit
;
};
onMounted
(()
=>
{
const
message
=
{
type
:
"title"
,
data
:
"提现"
};
sendNativeMessage
(
message
);
getWithdrawRiskReq
();
});
return
{
...
toRefs
(
state
),
...
...
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