Commit 214653f0 authored by wykolor's avatar wykolor

Merge branch 'release/2021_07_06_introduce_iteration' into 'master'

feat: 转介绍迭代 See merge request wykolor/mall-webview!3
parents 90d9ee87 45b8f372
...@@ -34,7 +34,8 @@ export enum ErrCode { ...@@ -34,7 +34,8 @@ export enum ErrCode {
USER_UP_LIMIT = "USER_UP_LIMIT", // 用户上限 USER_UP_LIMIT = "USER_UP_LIMIT", // 用户上限
SYSTEM_UP_LIMIT = "SYSTEM_UP_LIMIT", // 系统上限 SYSTEM_UP_LIMIT = "SYSTEM_UP_LIMIT", // 系统上限
STUDENT_WITHDRAWING = "STUDENT_WITHDRAWING", // 学生提现中 STUDENT_WITHDRAWING = "STUDENT_WITHDRAWING", // 学生提现中
BALANCE_NOT_ENOUGH = "BALANCE_NOT_ENOUGH" // 余额不足 BALANCE_NOT_ENOUGH = "BALANCE_NOT_ENOUGH", // 余额不足
STUDENT_NO_SIGN_UP = "STUDENT_NO_SIGN_UP" // 未入过常规/精品班级班
} }
// 提现记录状态 // 提现记录状态
......
...@@ -22,6 +22,9 @@ export function formatBonusTipTxt(errCode: string): string { ...@@ -22,6 +22,9 @@ export function formatBonusTipTxt(errCode: string): string {
case ErrCode.BALANCE_NOT_ENOUGH: case ErrCode.BALANCE_NOT_ENOUGH:
tip = "提现金额至少为:1.00元。当前可提现金额不足!如需帮助请联系:400-8777389!"; tip = "提现金额至少为:1.00元。当前可提现金额不足!如需帮助请联系:400-8777389!";
break; break;
case ErrCode.STUDENT_NO_SIGN_UP:
tip = '您当前未报常规/精品班,报班后才可进行提现操作!'
break;
default: default:
tip = ""; tip = "";
} }
......
...@@ -128,3 +128,11 @@ export function bindWeChat() { ...@@ -128,3 +128,11 @@ export function bindWeChat() {
export function makeCall(phone: string) { export function makeCall(phone: string) {
return invokeNativeMethod<null, string>({ type: "makecall", data: phone }); return invokeNativeMethod<null, string>({ type: "makecall", data: phone });
} }
/**
*
* 返回APP首页
*/
export function goHome() {
return invokeNativeMethod<null, null>({ type: 'goHome'});
}
...@@ -4,8 +4,17 @@ ...@@ -4,8 +4,17 @@
{{ formatBonusTipTxt(errCode) }} {{ formatBonusTipTxt(errCode) }}
</p> </p>
<div class="dialog-handle-btns"> <div class="dialog-handle-btns">
<van-button type="default" round @click="$emit('update:show', false)">确定</van-button <van-button type="default" round @click="$emit('update:show', false)">{{
><van-button type="primary" round @click="phoneCall">电话咨询</van-button> 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> </div>
</van-dialog> </van-dialog>
</template> </template>
...@@ -14,9 +23,11 @@ import { defineComponent, ref, watchEffect } from "vue"; ...@@ -14,9 +23,11 @@ import { defineComponent, ref, watchEffect } from "vue";
import { Dialog, Button } from "vant"; 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 { formatBonusTipTxt } from "@/util/formatBonusTipTxt";
import { ErrCode } from "@/model/bonus/constant";
export default defineComponent({ export default defineComponent({
components: { components: {
[Dialog.Component.name]: Dialog.Component, [Dialog.Component.name]: Dialog.Component,
...@@ -35,7 +46,7 @@ export default defineComponent({ ...@@ -35,7 +46,7 @@ export default defineComponent({
const phoneCall = () => { const phoneCall = () => {
makeCall("400—8777389"); makeCall("400—8777389");
}; };
return { showDialog, phoneCall, formatBonusTipTxt }; return { showDialog, phoneCall, goHome, formatBonusTipTxt, ErrCode };
} }
}); });
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment