|
@@ -174,17 +174,18 @@
|
|
<div class="text" v-html="lang[langType].organizationSub4"></div>
|
|
<div class="text" v-html="lang[langType].organizationSub4"></div>
|
|
</van-col>
|
|
</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
- <van-button class="btn_bottom" block type="primary" @click="showCheck = true, code = 'fore25'">
|
|
|
|
|
|
+ <van-button class="btn_bottom" block type="primary" @click="showCheck = true, code='fore25'">
|
|
{{ lang[langType].signUp }}
|
|
{{ lang[langType].signUp }}
|
|
</van-button>
|
|
</van-button>
|
|
- <van-button class="btn_bottom" block type="primary" @click="showCheck = true, code = 'chin25'">
|
|
|
|
|
|
+ <van-button class="btn_bottom" block type="primary" @click="showCheck = true, code='chin25'">
|
|
{{ lang[langType].signUpZH }}
|
|
{{ lang[langType].signUpZH }}
|
|
</van-button>
|
|
</van-button>
|
|
- <van-button class="btn_bottom" block type="primary" @click="showCheck = true, code = 'work25'">
|
|
|
|
|
|
+ <van-button class="btn_bottom" block type="primary" @click="showCheck = true, code='work25'">
|
|
{{ lang[langType].signUpWK }}
|
|
{{ lang[langType].signUpWK }}
|
|
</van-button>
|
|
</van-button>
|
|
|
|
|
|
- <van-dialog :confirmButtonText="lang[langType].confirm" :cancelButtonText="lang[langType].cancel" @confirm="checkVerificationCode" v-model:show="showCheck" :title="lang[langType].verificationCode"
|
|
|
|
|
|
+ <van-dialog :confirmButtonText="lang[langType].confirm" :cancelButtonText="lang[langType].cancel"
|
|
|
|
+ @confirm="checkVerificationCode" v-model:show="showCheck" :title="lang[langType].verificationCode"
|
|
show-cancel-button>
|
|
show-cancel-button>
|
|
<van-field v-model="verificationCode" :placeholder="lang[langType].verificationCodeContent" />
|
|
<van-field v-model="verificationCode" :placeholder="lang[langType].verificationCodeContent" />
|
|
</van-dialog>
|
|
</van-dialog>
|
|
@@ -192,22 +193,34 @@
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
import { defineProps, ref, defineEmits } from 'vue';
|
|
import { defineProps, ref, defineEmits } from 'vue';
|
|
|
|
+import { checkCode } from '@/api/2025.js';
|
|
import { showToast } from 'vant';
|
|
import { showToast } from 'vant';
|
|
import lang from './lang.js';
|
|
import lang from './lang.js';
|
|
const showCheck = ref(false);
|
|
const showCheck = ref(false);
|
|
const verificationCode = ref('');
|
|
const verificationCode = ref('');
|
|
const prprs = defineProps(['langType']);
|
|
const prprs = defineProps(['langType']);
|
|
const emits = defineEmits(['checkVerificationCode']);
|
|
const emits = defineEmits(['checkVerificationCode']);
|
|
-let code = ''
|
|
|
|
|
|
+let code = '';
|
|
|
|
|
|
const checkVerificationCode = () => {
|
|
const checkVerificationCode = () => {
|
|
- if (code !== verificationCode.value.toLowerCase()) {
|
|
|
|
- showToast({
|
|
|
|
- message: lang[prprs.langType].verificationCodeError,
|
|
|
|
- type: 'fail',
|
|
|
|
- });
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ let userType = lang[prprs.langType].distinguishedGuest[code];
|
|
|
|
+ checkCode({
|
|
|
|
+ code: verificationCode.value.toLowerCase(),
|
|
|
|
+ userType
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (!isNaN(res.code) && res.code !== 0) {
|
|
|
|
+ const messages = res.data
|
|
|
|
+ let message = lang[props.langType].upFileError;
|
|
|
|
+ if (messages.cnMessage && props.langType === 'zh') {
|
|
|
|
+ message = messages.cnMessage;
|
|
|
|
+ } else if (messages.enMessage && props.langType === 'en') {
|
|
|
|
+ message = messages.enMessage;
|
|
|
|
+ }
|
|
|
|
+ showToast(message);
|
|
|
|
+ showToast(lang[prprs.langType].verificationCodeError);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
emits('checkVerificationCode', code);
|
|
emits('checkVerificationCode', code);
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|