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
0a0ddfe4
Commit
0a0ddfe4
authored
Apr 08, 2021
by
wykolor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 提现优化
parent
710839cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
16 deletions
+33
-16
index.vue
src/views/bonus/index.vue
+18
-14
index.vue
src/views/bonus/withdraw/index.vue
+15
-2
No files found.
src/views/bonus/index.vue
View file @
0a0ddfe4
...
@@ -175,9 +175,14 @@
...
@@ -175,9 +175,14 @@
>
>
<div
class=
"dialog-handle-btns"
>
<div
class=
"dialog-handle-btns"
>
<van-button
type=
"default"
round
@
click=
"showBindWx = false"
>
取消
</van-button
<van-button
type=
"default"
round
@
click=
"showBindWx = false"
>
取消
</van-button
><van-button
type=
"primary"
round
@
click=
"bindWeiChatModal"
:disabled=
"binding"
><van-button
><van-loading
v-if=
"binding"
size=
"20px"
color=
"#ccc"
>
绑定中...
</van-loading
type=
"primary"
><span
v-else
>
绑定微信
</span></van-button
round
@
click=
"bindWeiChatModal"
:disabled=
"binding"
:loading=
"binding"
loading-text=
"绑定中..."
>
绑定微信
</van-button
>
>
</div>
</div>
</van-dialog>
</van-dialog>
...
@@ -309,17 +314,17 @@ const Bonus = defineComponent({
...
@@ -309,17 +314,17 @@ const Bonus = defineComponent({
const
bindWeiChatModal
=
async
()
=>
{
const
bindWeiChatModal
=
async
()
=>
{
state
.
binding
=
true
;
state
.
binding
=
true
;
try
{
const
params
=
await
bindWeChat
();
const
params
=
await
bindWeChat
();
bindWeiChat
(
params
)
await
bindWeiChat
(
params
);
.
then
(()
=>
{
Toast
(
"绑定成功"
);
Toast
(
"绑定成功"
);
state
.
showBindWx
=
false
;
state
.
showBindWx
=
false
;
state
.
binding
=
false
;
getBonusAccount
();
getBonusAccount
();
})
}
catch
(
err
)
{
.
catch
(()
=>
{
Toast
(
"绑定失败"
);
Toast
(
"绑定失败"
);
});
}
finally
{
state
.
binding
=
false
;
}
};
};
// 绑定或者换邦
// 绑定或者换邦
const
bindWeiChatOrUnbind
=
async
()
=>
{
const
bindWeiChatOrUnbind
=
async
()
=>
{
...
@@ -328,15 +333,14 @@ const Bonus = defineComponent({
...
@@ -328,15 +333,14 @@ const Bonus = defineComponent({
state
.
showBindWx
=
true
;
state
.
showBindWx
=
true
;
return
false
;
return
false
;
}
}
try
{
const
params
=
await
bindWeChat
();
const
params
=
await
bindWeChat
();
bindWeiChat
(
params
)
await
bindWeiChat
(
params
);
.
then
(()
=>
{
getBonusAccount
();
getBonusAccount
();
Toast
(
"绑定成功"
);
Toast
(
"绑定成功"
);
})
}
catch
{
.
catch
(()
=>
{
Toast
(
"绑定失败"
);
Toast
(
"绑定失败"
);
});
}
};
};
return
{
return
{
...
toRefs
(
state
),
...
toRefs
(
state
),
...
...
src/views/bonus/withdraw/index.vue
View file @
0a0ddfe4
...
@@ -79,7 +79,16 @@
...
@@ -79,7 +79,16 @@
</li>
</li>
</ul>
</ul>
<div
class=
"handle-btns"
>
<div
class=
"handle-btns"
>
<van-button
round
type=
"primary"
size=
"large"
block
color=
"#027AFF;"
@
click=
"withdrawReal"
<van-button
:loading=
"withdrawing"
:disabled=
"withdrawing"
loading-text=
"提现中..."
round
type=
"primary"
size=
"large"
block
color=
"#027AFF;"
@
click=
"withdrawReal"
>
确定
</van-button
>
确定
</van-button
>
>
<van-button
<van-button
...
@@ -176,7 +185,8 @@ const Withdraw = defineComponent({
...
@@ -176,7 +185,8 @@ const Withdraw = defineComponent({
mobileTip
:
""
,
mobileTip
:
""
,
withdrawAccount
:
""
,
withdrawAccount
:
""
,
withdrawResponse
:
{},
withdrawResponse
:
{},
studentDailyWithdrawLimit
:
0
// 学生单日提现上限
studentDailyWithdrawLimit
:
0
,
// 学生单日提现上限
withdrawing
:
false
});
});
const
{
withdrawableTotal
,
withdrawAccount
}
=
route
.
params
;
const
{
withdrawableTotal
,
withdrawAccount
}
=
route
.
params
;
state
.
withdrawableTotal
=
Number
(
withdrawableTotal
);
state
.
withdrawableTotal
=
Number
(
withdrawableTotal
);
...
@@ -229,6 +239,7 @@ const Withdraw = defineComponent({
...
@@ -229,6 +239,7 @@ const Withdraw = defineComponent({
Toast
(
"请输入验证码"
);
Toast
(
"请输入验证码"
);
return
;
return
;
}
}
state
.
withdrawing
=
true
;
try
{
try
{
const
params
=
{
const
params
=
{
studentId
:
bonusStoreState
.
value
.
studentId
,
studentId
:
bonusStoreState
.
value
.
studentId
,
...
@@ -240,6 +251,8 @@ const Withdraw = defineComponent({
...
@@ -240,6 +251,8 @@ const Withdraw = defineComponent({
state
.
showWithdrawSuccess
=
true
;
state
.
showWithdrawSuccess
=
true
;
}
catch
(
err
)
{
}
catch
(
err
)
{
Toast
(
err
);
Toast
(
err
);
}
finally
{
state
.
withdrawing
=
false
;
}
}
};
};
...
...
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