Commit d3a8c550 authored by wykolor's avatar wykolor

feat: appId

parent 8ca9a996
let appId = "2095826303"; // 腾讯验证码appid
if (process.env.VUE_APP_DEPLOY_MODE === "test") {
appId = "2087826974";
}
export default appId
\ No newline at end of file
...@@ -38,6 +38,7 @@ export default defineComponent({ ...@@ -38,6 +38,7 @@ export default defineComponent({
props: { props: {
show: Boolean show: Boolean
}, },
emits: ["update:show"],
setup(props) { setup(props) {
const store = useStore(); const store = useStore();
const bonusStoreState = computed(() => store.state.bonus); const bonusStoreState = computed(() => store.state.bonus);
......
...@@ -70,6 +70,7 @@ import { Dialog, Button, Field, Toast, Cell } from "vant"; ...@@ -70,6 +70,7 @@ import { Dialog, Button, Field, Toast, Cell } from "vant";
import { checkCaptcha, withdraw } from "@/server/api/bonus"; import { checkCaptcha, withdraw } from "@/server/api/bonus";
import { countDown } from "@/util/timer"; import { countDown } from "@/util/timer";
import appId from "@/util/index";
interface TencentCaptchaResponse { interface TencentCaptchaResponse {
ret: number; ret: number;
...@@ -121,7 +122,7 @@ export default defineComponent({ ...@@ -121,7 +122,7 @@ export default defineComponent({
// 获取验证码 // 获取验证码
const getSmsVerifyCode = () => { const getSmsVerifyCode = () => {
const captcha = new TencentCaptcha( const captcha = new TencentCaptcha(
"2087826974", appId,
async (res: TencentCaptchaResponse) => { async (res: TencentCaptchaResponse) => {
const { ret, randstr, ticket } = res; const { ret, randstr, ticket } = res;
if (ret === 0) { if (ret === 0) {
......
...@@ -26,6 +26,7 @@ export default defineComponent({ ...@@ -26,6 +26,7 @@ export default defineComponent({
show: Boolean, show: Boolean,
errCode: String errCode: String
}, },
emits: ["update:show"],
setup(props) { setup(props) {
const showDialog = ref(false); const showDialog = ref(false);
watchEffect(() => { watchEffect(() => {
......
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