lingdu 1 týždeň pred
rodič
commit
6f5acd4c0d

+ 27 - 0
src/api/2025.js

@@ -3,6 +3,9 @@ import ajax from '@/utils/request.js';
 export function getJoinType(data) {
     return ajax({
         url: 'biz/signup/joinType',
+        header: {
+            'page-language': localStorage.getItem('langSelect') || 'zh'
+        },
         method: 'GET',
         urlType: 'Url2025',
         errorToast: '当前访问人数过多,请重试。',
@@ -14,6 +17,9 @@ export function saveData(data) {
     return ajax({
         url: 'biz/signup/add',
         method: 'POST',
+        header: {
+            'page-language': localStorage.getItem('langSelect') || 'zh'
+        },
         urlType: 'Url2025',
         errorToast: '当前访问人数过多,请重试。',
         data
@@ -29,6 +35,27 @@ export function checkCode(data) {
     return ajax({
         url: 'biz/signup/verifyCode',
         method: 'POST',
+        header: {
+            'page-language': localStorage.getItem('langSelect') || 'zh'
+        },
+        urlType: 'Url2025',
+        errorToast: '当前访问人数过多,请重试。',
+        data
+    }); 
+}
+
+/**
+ * 获取用户信息
+ * @param {code} string
+ * @param {idCard} string
+ */
+export function getUserInfo(data) {
+    return ajax({
+        url: 'biz/signup/getInfo',
+        method: 'POST',
+        header: {
+            'page-language': localStorage.getItem('langSelect') || 'zh'
+        },
         urlType: 'Url2025',
         errorToast: '当前访问人数过多,请重试。',
         data

+ 13 - 11
src/utils/request.js

@@ -36,17 +36,19 @@ export default function (ori) {
     let method = ori.method.toUpperCase();
     if (method === "GET") url += getdata(ori.data || {});
     xhttp.open(method, url, true);
-    xhttp.setRequestHeader(
-      "Content-type",
-      ori.header
-        ? ori.header.contentType || "application/json"
-        : "application/json"
-    );
-    xhttp.setRequestHeader(
-      "Authorization",
-      ori.header && ori.header.Authorization
-    );
-    method === "GET" ? xhttp.send() : xhttp.send(JSON.stringify(ori.data));
+    const headers = Object.keys(ori.header);
+    for (let i = 0; i < headers.length; i++) {
+      const key = headers[i];
+      if (key === 'contentType') continue;
+      console.log(key, ori.header[key]); // 输出每个键名和对应的值
+      xhttp.setRequestHeader(key, ori.header[key]);
+    }
+    if (ori.header.contentType === 'multipart/form-data') {
+      xhttp.send(ori.data);
+    } else {
+      xhttp.setRequestHeader("Content-type", 'application/json');
+      method === "GET" ? xhttp.send() : xhttp.send(JSON.stringify(ori.data));
+    }
     xhttp.onreadystatechange = function () {
       if (this.readyState != 4) return;
       isEnd = true;

+ 52 - 36
src/view/fenghui/form.vue

@@ -52,8 +52,10 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showBirthday" destroy-on-close round position="bottom">
-                <van-date-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" @confirm="packerConfirm" :title="lang[langType].birthday"
-                    @cancel="showBirthday = false" :min-date="new Date(1970, 0, 1)" :max-date="new Date()" />
+                <van-date-picker :confirm-button-text="lang[langType].confirm"
+                    :cancel-button-text="lang[langType].cancel" @confirm="packerConfirm"
+                    :title="lang[langType].birthday" @cancel="showBirthday = false" :min-date="new Date(1970, 0, 1)"
+                    :max-date="new Date()" />
             </van-popup>
 
             <!-- 照片 -->
@@ -104,7 +106,8 @@
                 :rules="[{ required: true, trigger: 'onBlur', message: lang[langType].emergencyContactPhoneContent }]"
                 :placeholder="lang[langType].emergencyContactPhoneContent">
                 <template #label>
-                    <span :class="langType === 'zh' ? 'label' : ''" v-html="lang[langType].emergencyContactPhone"></span>
+                    <span :class="langType === 'zh' ? 'label' : ''"
+                        v-html="lang[langType].emergencyContactPhone"></span>
                 </template>
             </van-field>
 
@@ -118,7 +121,8 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showCardType" destroy-on-close round position="bottom">
-                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" :model-value="formData.cardType" :columns="cardTypeList" @cancel="showCardType = false"
+                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
+                    :model-value="formData.cardType" :columns="cardTypeList" @cancel="showCardType = false"
                     @confirm="onConfirm" />
             </van-popup>
 
@@ -170,7 +174,8 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
-                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
+                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
+                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
                     @confirm="onUnitTypeConfirm" />
             </van-popup>
 
@@ -236,7 +241,8 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showReachTime" destroy-on-close round position="bottom">
-                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" :title="lang[langType].reachTime" :columns="dateTimeColumns" @confirm="reachTimeConfirm"
+                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
+                    :title="lang[langType].reachTime" :columns="dateTimeColumns" @confirm="reachTimeConfirm"
                     @cancel="showReachTime = false" />
             </van-popup>
 
@@ -256,7 +262,8 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showLeavingTime" destroy-on-close round position="bottom">
-                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" :title="lang[langType].leavingTime" :columns="dateTimeColumns" @confirm="leavingTimeConfirm"
+                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
+                    :title="lang[langType].leavingTime" :columns="dateTimeColumns" @confirm="leavingTimeConfirm"
                     @cancel="showLeavingTime = false" />
             </van-popup>
 
@@ -268,8 +275,9 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showCheckOutTime" destroy-on-close round position="bottom">
-                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" :title="lang[langType].checkOutTime" :columns="dateTimeColumns"
-                    @confirm="checkOutTimeConfirm" @cancel="showCheckOutTime = false" />
+                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
+                    :title="lang[langType].checkOutTime" :columns="dateTimeColumns" @confirm="checkOutTimeConfirm"
+                    @cancel="showCheckOutTime = false" />
             </van-popup>
 
             <van-field input-align="right" v-model="formData.message" rows="3" autosize type="textarea"
@@ -282,7 +290,7 @@
             <van-button
                 style="background: linear-gradient(270deg, #1D19BC 0%, #1C4CD5 100%);margin: 0 auto;width: calc(100% - 40px);"
                 block type="primary" native-type="submit">
-                {{lang[langType].submit}}
+                {{ lang[langType].submit }}
             </van-button>
         </van-form>
     </div>
@@ -290,11 +298,11 @@
 <script setup>
 import { defineEmits, defineProps, reactive, ref, computed, defineExpose } from 'vue';
 import { showLoadingToast, showToast, showDialog } from 'vant';
-import { saveData } from '@/api/2025.js';
+import { saveData, uploadImage } from '@/api/2025.js';
 import config from '@/config/index.js';
 import axios from 'axios';
 import lang from './lang.js';
-const props = defineProps(['langType']);
+const props = defineProps(['langType','verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -315,7 +323,7 @@ const onClickLeft = () => {
 };
 
 const reset = () => {
-   form.value.resetValidation(); 
+    form.value.resetValidation();
 }
 const createTextDate = values => values.slice(0, 3).join('-') + ' ' + values.slice(3).join(':');
 const packerConfirm = (values) => {
@@ -336,12 +344,12 @@ const checkOutTimeConfirm = ({ selectedValues }) => {
 }
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedValues;
+    formData.unitType = values.selectedOptions[0].text;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 const onConfirm = (values) => {
     showCardType.value = false;
-    formData.cardType = values.selectedValues;
+    formData.cardType = values.selectedOptions[0].text;
     formData.cardTypeName = values.selectedOptions[0].text;
 }
 
@@ -354,10 +362,31 @@ const beforeDelete = (index) => {
 const filesize = () => showToast(lang[props.langType].fileSize);
 const beforeRead = (file) => {
     if (!file) showToast(lang[props.langType].photoContent);
-    console.log(file);
     const oriData = new FormData();
     oriData.append('file', file.file);
 
+    uploadImage({
+        file: file.file, // 图片文件对象,必填
+    }).then(res => {
+        loading.close();
+        if (res.status !== 200 || res.data.code !== 0) {
+            showToast(res.msg || lang[props.langType].upFileError);
+            formData.photoUrl = ''
+            return
+        }
+        showToast(lang[props.langType].upFileSusscess);
+        formData.photoUrl = res.data.data
+        photo.value = [
+            {
+                url: res.data.data,
+                file: file.file,
+            }
+        ]
+    }).catch((res) => {
+        loading.close();
+        showToast(res.msg || lang[props.langType].upFileError);
+    })
+
     const loading = showLoadingToast({
         message: lang[props.langType].upFile,
         forbidClick: true,
@@ -374,14 +403,7 @@ const beforeRead = (file) => {
     }).then(res => {
         loading.close();
         if (res.status !== 200 || res.data.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(res.msg || lang[props.langType].upFileError);
             formData.photoUrl = ''
             return
         }
@@ -393,9 +415,9 @@ const beforeRead = (file) => {
                 file: file.file,
             }
         ]
-    }).catch(() => {
+    }).catch((res) => {
         loading.close();
-        showToast(lang[props.langType].upFileError);
+        showToast(res.msg || lang[props.langType].upFileError);
     })
     return false;
 };
@@ -456,6 +478,7 @@ const onSubmit = () => {
     if (loading) return
     loading = true
     saveData({
+        code: props.verificationCode, // 邀请码
         lastName: formData.lastName, // 姓
         firstName: formData.firstName, // 名
         gender: formData.gender, // 性别
@@ -485,14 +508,7 @@ const onSubmit = () => {
         userType: '国外嘉宾'
     }).then((res) => {
         if (!isNaN(res.code) && res.code !== 0) {
-            const messages = res.data
-            let message = lang[props.langType].registrationError;
-            if (messages.cnMessage && props.langType === 'zh') {
-               message = messages.cnMessage;
-            } else if (messages.enMessage && props.langType === 'en') {
-                message = messages.enMessage; 
-            }
-            showToast(message);
+            showToast(res.msg || lang[props.langType].networkError);
             return;
         }
         // 清空表单内容 from
@@ -503,9 +519,9 @@ const onSubmit = () => {
         showDialog({
             message: lang[props.langType].registration,
         })
-    }).catch(() => {
+    }).catch((res) => {
         loading = false
-        showToast(lang[props.langType].registrationError);
+        showToast(res.msg || lang[props.langType].networkError);
     });
 }
 defineExpose({ reset })

+ 10 - 24
src/view/fenghui/form1.vue

@@ -284,7 +284,7 @@ import { saveData } from '@/api/2025.js';
 import config from '@/config/index.js';
 import axios from 'axios';
 import lang from './lang.js';
-const props = defineProps(['langType']);
+const props = defineProps(['langType','verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -301,7 +301,7 @@ const form = ref(null);
 const photo = ref([]);
 
 const reset = () => {
-   form.value.resetFields(); 
+    form.value.resetFields();
 }
 
 const onClickLeft = () => {
@@ -345,7 +345,6 @@ const beforeDelete = (index) => {
 const filesize = () => showToast(lang[props.langType].fileSize);
 const beforeRead = (file) => {
     if (!file) showToast(lang[props.langType].photoContent);
-    console.log(file);
     const oriData = new FormData();
     oriData.append('file', file.file);
     const loading = showLoadingToast({
@@ -364,14 +363,7 @@ const beforeRead = (file) => {
     }).then(res => {
         loading.close();
         if (res.status !== 200 || res.data.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(res.msg || lang[props.langType].upFileError);
             formData.photoUrl = ''
             return
         }
@@ -383,9 +375,9 @@ const beforeRead = (file) => {
                 file: file.file,
             }
         ]
-    }).catch(() => {
+    }).catch((res) => {
         loading.close();
-        showToast(lang[props.langType].upFileError);
+        showToast(res.msg || lang[props.langType].upFileError);
     })
     return false;
 };
@@ -447,6 +439,7 @@ const onSubmit = () => {
     if (loading) return
     loading = true
     saveData({
+        code: props.verificationCode, // 邀请码
         name: formData.name, // 姓名
         provinceCity: formData.provinceCity, // 省市区
         gender: formData.gender, // 性别
@@ -460,7 +453,7 @@ const onSubmit = () => {
         idCard: formData.passport, // 证件号
         dietaryRequirements: formData.catering, // 饮食要求
         workUnit: formData.workUnit, // 工作单位
-        unitType: formData.unitType[0], // 单位类型
+        unitType: formData.unitTypeName, // 单位类型
         position: formData.career, // 职务
         fax: formData.fax, // fax
         interviewIntention: formData.interview, // 接受采访意向
@@ -474,14 +467,7 @@ const onSubmit = () => {
         userType: '国内嘉宾'
     }).then((res) => {
         if (!isNaN(res.code) && res.code !== 0) {
-            const messages = res.data
-            let message = lang[props.langType].registrationError;
-            if (messages.cnMessage && props.langType === 'zh') {
-               message = messages.cnMessage;
-            } else if (messages.enMessage && props.langType === 'en') {
-                message = messages.enMessage; 
-            }
-            showToast(message);
+            showToast(res.msg || lang[props.langType].networkError);
             return;
         }
         // 清空表单内容 from
@@ -492,9 +478,9 @@ const onSubmit = () => {
         showDialog({
             message: lang[props.langType].registration,
         })
-    }).catch(() => {
+    }).catch((res) => {
         loading = false
-        showToast(lang[props.langType].registrationError);
+        showToast(res.msg || lang[props.langType].networkError);
     });
 }
 

+ 13 - 19
src/view/fenghui/form2.vue

@@ -1,7 +1,6 @@
 <!-- 工作人员 -->
 <template>
-    <van-nav-bar :title="lang[langType].signUpWK" left-arrow
-        @click-left="onClickLeft" />
+    <van-nav-bar :title="lang[langType].signUpWK" left-arrow @click-left="onClickLeft" />
     <div class="form">
         <div>
             <span style="font-size: 16px;margin-left: 10px;" v-text="lang[langType].signUpWK"></span>
@@ -60,7 +59,8 @@
                 </template>
             </van-field>
             <van-popup v-model:show="showUnitType" destroy-on-close round position="bottom">
-                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel" :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
+                <van-picker :confirm-button-text="lang[langType].confirm" :cancel-button-text="lang[langType].cancel"
+                    :model-value="formData.unitType" :columns="unitTypeList" @cancel="showUnitType = false"
                     @confirm="onUnitTypeConfirm" />
             </van-popup>
 
@@ -76,7 +76,7 @@
             <van-button
                 style="background: linear-gradient(270deg, #1D19BC 0%, #1C4CD5 100%);margin: 0 auto;width: calc(100% - 40px);"
                 block type="primary" native-type="submit">
-                {{lang[langType].submit}}
+                {{ lang[langType].submit }}
             </van-button>
         </van-form>
     </div>
@@ -88,7 +88,7 @@ import { saveData } from '@/api/2025.js';
 import config from '@/config/index.js';
 import axios from 'axios';
 import lang from './lang.js';
-const props = defineProps(['langType']);
+const props = defineProps(['langType','verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
@@ -99,7 +99,7 @@ const form = ref(null); // 引入子组件的实例,用于调用子组件的
 const photo = ref([]);
 
 const reset = () => {
-   form.value.resetFields(); 
+    form.value.resetFields();
 }
 
 const onClickLeft = () => {
@@ -108,7 +108,7 @@ const onClickLeft = () => {
 
 const onUnitTypeConfirm = (values) => {
     showUnitType.value = false;
-    formData.unitType = values.selectedValues;
+    formData.unitType = values.selectedOptions[0].text;
     formData.unitTypeName = values.selectedOptions[0].text;
 }
 
@@ -143,9 +143,9 @@ const beforeRead = (file) => {
             const messages = res.data
             let message = lang[props.langType].upFileError;
             if (messages.cnMessage && props.langType === 'zh') {
-               message = messages.cnMessage;
+                message = messages.cnMessage;
             } else if (messages.enMessage && props.langType === 'en') {
-                message = messages.enMessage; 
+                message = messages.enMessage;
             }
             showToast(message);
             formData.photoUrl = ''
@@ -172,6 +172,7 @@ const onSubmit = () => {
     loading = true
     saveData({
         name: formData.name, // 姓名
+        code: props.verificationCode, // 邀请码
         photo: formData.photoUrl, // 照片
         phone: formData.contact, // 手机号
         idCard: formData.passport, // 证件号
@@ -180,14 +181,7 @@ const onSubmit = () => {
         userType: '工作人员'
     }).then((res) => {
         if (!isNaN(res.code) && res.code !== 0) {
-            const messages = res.data
-            let message = lang[props.langType].registrationError;
-            if (messages.cnMessage && props.langType === 'zh') {
-               message = messages.cnMessage;
-            } else if (messages.enMessage && props.langType === 'en') {
-                message = messages.enMessage; 
-            }
-            showToast(message);
+            showToast(res.message || lang[props.langType].networkError);
             return;
         }
         // 清空表单内容 from
@@ -198,9 +192,9 @@ const onSubmit = () => {
         showDialog({
             message: lang[props.langType].registration,
         })
-    }).catch(() => {
+    }).catch((res) => {
         loading = false
-        showToast(lang[props.langType].registrationError);
+        showToast(res.message || lang[props.langType].networkError);
     });
 }
 defineExpose({ reset })

+ 23 - 6
src/view/fenghui/index.vue

@@ -10,11 +10,14 @@
                     @confirm="langChange" />
             </van-popup>
         </div>
-        <Introduction v-if="!componentId" :langType="langSelect" @checkVerificationCode="checkVerificationCode" />
+        <Introduction v-if="!componentId" :langType="langSelect" @saveData="saveData" />
         <!-- 动态组件 -->
-        <Fore25 ref="fore25" v-if="componentId === 'fore25'" :langType="langSelect" @closeComponent="closeComponent" />
-        <Chin25 ref="chin25" v-if="componentId === 'chin25'" :langType="langSelect" @closeComponent="closeComponent" />
-        <Work25 ref="work25" v-if="componentId === 'work25'" :langType="langSelect" @closeComponent="closeComponent" />
+        <Fore25 ref="fore25" v-if="componentId === 'fore25'" :subData="subData" :verificationCode="verificationCode" :langType="langSelect"
+            @closeComponent="closeComponent" />
+        <Chin25 ref="chin25" v-if="componentId === 'chin25'" :subData="subData" :verificationCode="verificationCode" :langType="langSelect"
+            @closeComponent="closeComponent" />
+        <Work25 ref="work25" v-if="componentId === 'work25'" :subData="subData" :verificationCode="verificationCode" :langType="langSelect"
+            @closeComponent="closeComponent" />
     </div>
 </template>
 <script setup>
@@ -24,13 +27,17 @@ import Introduction from './introduction.vue';
 import Fore25 from './form.vue';
 import Chin25 from './form1.vue';
 import Work25 from './form2.vue';
+import lang from './lang';
 const langSelect = ref(localStorage.getItem('langSelect') || 'zh');
 const componentId = ref('');
+const verificationCode = ref('');
 const showLange = ref(false);
 const fore25 = ref(null); // 引入子组件的实例,用于调用子组件的方法
 const chin25 = ref(null); // 引入子组件的实例,用于调用子组件的方法
 const work25 = ref(null); // 引入子组件的实例,用于调用子组件的方法
 
+const subData = ref({})
+
 const langObj = [
     { text: '中文', value: 'zh' },
     { text: 'English', value: 'en' },
@@ -39,8 +46,18 @@ const langObjT = {
     zh: 'English',
     en: '中文',
 }
-const checkVerificationCode = (code) => {
-    componentId.value = code;
+const saveData = (code, verification, data) => {
+    if (code !== undefined) componentId.value = code;
+    if (verification !== undefined) verificationCode.value = verification;
+    if (data !== undefined) {
+        subData.value = data;
+        const userType = data.userType;
+        const keysList = Object.keys(lang[langSelect.value].distinguishedGuest); // 获取对象的所有键名组成的数组
+        for (let ii = 0; ii < keysList.length; ii++) {
+            const keysList = keysList[ii];
+            lang[langSelect.value].distinguishedGuest === userType ? componentId.value = keysList : '';
+        }
+    }
 }
 
 const closeComponent = () => {

+ 54 - 10
src/view/fenghui/introduction.vue

@@ -174,32 +174,57 @@
                 <div class="text" v-html="lang[langType].organizationSub4"></div>
             </van-col>
         </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 }}
         </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 }}
         </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 }}
         </van-button>
 
-        <van-dialog :confirmButtonText="lang[langType].confirm" :cancelButtonText="lang[langType].cancel"
-            @confirm="checkVerificationCode" v-model:show="showCheck" :title="lang[langType].verificationCode"
-            show-cancel-button>
+        <p class="tologo" v-html="lang[langType].tologoText + '>>'" @click="showLogin = true"></p>
+
+        <!-- 邀请码校验 -->
+        <van-dialog destroy-on-close :confirmButtonText="lang[langType].confirm"
+            :cancelButtonText="lang[langType].cancel" @confirm="checkVerificationCode" v-model:show="showCheck"
+            :title="lang[langType].verificationCode" show-cancel-button>
             <van-field v-model="verificationCode" :placeholder="lang[langType].verificationCodeContent" />
         </van-dialog>
+
+        <!-- 登录框 -->
+        <van-dialog close-on-click-overlay destroy-on-close :show-confirm-button="false" v-model:show="showLogin">
+            <br />
+            <van-form @submit="saveLogin">
+                <van-cell-group inset>
+                    <van-field v-model="form.verificationCode" name="username" :label="lang[langType].verificationCode"
+                        :placeholder="lang[langType].verificationCodeContent" required
+                        :rules="[{ required: true, message: lang[langType].verificationCodeContent }]" />
+                    <van-field v-model="form.password" type="password" name="password" :label="lang[langType].passport"
+                        :placeholder="lang[langType].passportContent" required
+                        :rules="[{ required: true, message: lang[langType].passportContent }]" />
+                </van-cell-group>
+                <div style="margin: 16px;">
+                    <van-button round block type="primary" size="small" native-type="submit">
+                        {{ lang[langType].login }}
+                    </van-button>
+                </div>
+            </van-form>
+        </van-dialog>
     </div>
 </template>
 <script setup>
-import { defineProps, ref, defineEmits } from 'vue';
-import { checkCode } from '@/api/2025.js';
+import { defineProps, ref, defineEmits, reactive } from 'vue';
+import { checkCode, getUserInfo } from '@/api/2025.js';
 import { showToast } from 'vant';
 import lang from './lang.js';
 const showCheck = ref(false);
 const verificationCode = ref('');
+const showLogin = ref(false);
+const form = reactive({})
 const props = defineProps(['langType']);
-const emits = defineEmits(['checkVerificationCode']);
+const emits = defineEmits(['saveData']);
 let code = '';
 
 const checkVerificationCode = () => {
@@ -220,8 +245,22 @@ const checkVerificationCode = () => {
             showToast(lang[props.langType].verificationCodeError);
             return;
         }
+        emits('saveData', code, verificationCode.value.toLowerCase());
+    }).catch((res) => {
+        showToast(res.msg || lang[props.langType].networkError);
+    })
+}
+
+const saveLogin = () => {
+    getUserInfo({
+        "code": form.verificationCode,
+        "idCard": form.password
+    }).then((res) => {
+        emits('saveData', undefined, undefined, res);
+
+    }).catch((res) => {
+        showToast(res.msg || lang[props.langType].networkError);
     })
-    emits('checkVerificationCode', code);
 }
 </script>
 
@@ -271,5 +310,10 @@ const checkVerificationCode = () => {
         margin: 24px auto 21px auto;
         font-size: 16px;
     }
+
+    .tologo {
+        font-size: 14px;
+        text-align: center;
+    }
 }
 </style>

+ 10 - 1
src/view/fenghui/lang.js

@@ -1,7 +1,11 @@
 export default {
     "zh": {
+        "username": "用户名",
+        "password": "密码",
+        "login": "登录",
+        "tologoText": "已报名登陆通道",
         "confirm": "同意",
-        "cancel": "拒绝",
+        "cancel": "取消",
         "verificationCode": "邀请码",
         "title": "中拉互联网发展与合作论坛",
         "verificationCodeError": "验证失败",
@@ -49,6 +53,7 @@ export default {
         "ortherNotesContent": "特殊需求",
         "submit": "提交申请",
         "fileSize": "超出文件大小限制",
+        "networkError": "网络错误",
         "upFileError": "上传失败",
         "upFileSusscess": "上传成功",
         "registration": "注册成功",
@@ -136,6 +141,10 @@ export default {
         ]
     },
     "en": {
+        "username": "Username",
+        "password": "Password",
+        "login": "Login",
+        "tologoText": "​​Login for Registered Users​",
         "confirm": "Yes",
         "cancel": "No",
         "title": "China-Latin America Forum on Internet Development and Cooperation",