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
45b8f372
Commit
45b8f372
authored
Jul 14, 2021
by
wykolor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 转介绍迭代
parent
90d9ee87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
5 deletions
+28
-5
constant.ts
src/model/bonus/constant.ts
+2
-1
formatBonusTipTxt.ts
src/util/formatBonusTipTxt.ts
+3
-0
use-native-bridge.ts
src/util/use-native-bridge.ts
+8
-0
withdrawable-dialog.vue
src/views/bonus/withdrawable-dialog.vue
+15
-4
No files found.
src/model/bonus/constant.ts
View file @
45b8f372
...
...
@@ -34,7 +34,8 @@ export enum ErrCode {
USER_UP_LIMIT
=
"USER_UP_LIMIT"
,
// 用户上限
SYSTEM_UP_LIMIT
=
"SYSTEM_UP_LIMIT"
,
// 系统上限
STUDENT_WITHDRAWING
=
"STUDENT_WITHDRAWING"
,
// 学生提现中
BALANCE_NOT_ENOUGH
=
"BALANCE_NOT_ENOUGH"
// 余额不足
BALANCE_NOT_ENOUGH
=
"BALANCE_NOT_ENOUGH"
,
// 余额不足
STUDENT_NO_SIGN_UP
=
"STUDENT_NO_SIGN_UP"
// 未入过常规/精品班级班
}
// 提现记录状态
...
...
src/util/formatBonusTipTxt.ts
View file @
45b8f372
...
...
@@ -22,6 +22,9 @@ export function formatBonusTipTxt(errCode: string): string {
case
ErrCode
.
BALANCE_NOT_ENOUGH
:
tip
=
"提现金额至少为:1.00元。当前可提现金额不足!如需帮助请联系:400-8777389!"
;
break
;
case
ErrCode
.
STUDENT_NO_SIGN_UP
:
tip
=
'您当前未报常规/精品班,报班后才可进行提现操作!'
break
;
default
:
tip
=
""
;
}
...
...
src/util/use-native-bridge.ts
View file @
45b8f372
...
...
@@ -128,3 +128,11 @@ export function bindWeChat() {
export
function
makeCall
(
phone
:
string
)
{
return
invokeNativeMethod
<
null
,
string
>
({
type
:
"makecall"
,
data
:
phone
});
}
/**
*
* 返回APP首页
*/
export
function
goHome
()
{
return
invokeNativeMethod
<
null
,
null
>
({
type
:
'goHome'
});
}
src/views/bonus/withdrawable-dialog.vue
View file @
45b8f372
...
...
@@ -4,8 +4,17 @@
{{
formatBonusTipTxt
(
errCode
)
}}
</p>
<div
class=
"dialog-handle-btns"
>
<van-button
type=
"default"
round
@
click=
"$emit('update:show', false)"
>
确定
</van-button
><van-button
type=
"primary"
round
@
click=
"phoneCall"
>
电话咨询
</van-button>
<van-button
type=
"default"
round
@
click=
"$emit('update:show', false)"
>
{{
errCode
!==
ErrCode
.
STUDENT_NO_SIGN_UP
?
"确定"
:
"取消"
}}
</van-button>
<van-button
type=
"primary"
round
@
click=
"phoneCall"
v-if=
"errCode !== ErrCode.STUDENT_NO_SIGN_UP"
>
电话咨询
</van-button
>
<van-button
type=
"primary"
round
@
click=
"goHome"
v-else
>
去报班
</van-button>
</div>
</van-dialog>
</
template
>
...
...
@@ -14,9 +23,11 @@ import { defineComponent, ref, watchEffect } from "vue";
import
{
Dialog
,
Button
}
from
"vant"
;
import
{
makeCall
}
from
"@/util/use-native-bridge"
;
import
{
makeCall
,
goHome
}
from
"@/util/use-native-bridge"
;
import
{
formatBonusTipTxt
}
from
"@/util/formatBonusTipTxt"
;
import
{
ErrCode
}
from
"@/model/bonus/constant"
;
export
default
defineComponent
({
components
:
{
[
Dialog
.
Component
.
name
]:
Dialog
.
Component
,
...
...
@@ -35,7 +46,7 @@ export default defineComponent({
const
phoneCall
=
()
=>
{
makeCall
(
"400—8777389"
);
};
return
{
showDialog
,
phoneCall
,
formatBonusTipTxt
};
return
{
showDialog
,
phoneCall
,
goHome
,
formatBonusTipTxt
,
ErrCode
};
}
});
</
script
>
...
...
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