liyongli 13 godzin temu
rodzic
commit
ef16a0058c

+ 0 - 24
src/view/fenghui/demo.html

@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>WASM Encryption Demo</title>
-</head>
-<body>
-<script type="module">
-    import init, {encrypt, decrypt} from "./pkg/wasm_encrypt.min.js";
-
-    async function run() {
-        await init();  // 初始化 wasm 模块
-
-        const obj = { foo: 123, bar: "hello" };
-        const token = encrypt(obj);
-        console.log(token);
-        const back  = decrypt(token);
-        console.log(back);
-    }
-
-    run();
-</script>
-</body>
-</html>

+ 6 - 5
src/view/fenghui/form.vue

@@ -424,6 +424,7 @@
                 </van-field>
                 <br />
                 <van-button
+                    :loading="loading"
                     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 }}
@@ -441,6 +442,7 @@ const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
+const loading = ref(false);
 const formData = reactive({})
 const activitiesAttended = ref([])
 const cardTypeList = computed(() => lang[props.langType].cardTypeList)
@@ -595,10 +597,9 @@ const dateTimeColumns = computed(() => {
 });
 
 
-let loading = false
 const onSubmit = () => {
-    if (loading) return
-    loading = true
+    if (loading.value) return
+    loading.value = true
     const active = {
         active2: '否',
         active3: '否',
@@ -662,12 +663,12 @@ const onSubmit = () => {
         // Object.keys(from).forEach((key) => {
         //     from[key] = '';
         // });
-        loading = false
+        loading.value = false
         showDialog({
             message: lang[props.langType].registration,
         })
     }).catch((res) => {
-        loading = false
+        loading.value = false
         showToast(res.msg || lang[props.langType].networkError);
     });
 }

+ 6 - 5
src/view/fenghui/form1.vue

@@ -410,6 +410,7 @@
                 </van-field>
                 <br />
                 <van-button
+                    :loading="loading"
                     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 }}
@@ -428,6 +429,7 @@ const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
+const loading = ref(false);
 const formData = reactive({})
 const cardTypeList = computed(() => lang[props.langType].cardTypeList)
 const unitTypeList = computed(() => lang[props.langType].foreignCountryUnitType)
@@ -583,10 +585,9 @@ const dateTimeColumns = computed(() => {
 });
 
 
-let loading = false
 const onSubmit = () => {
-    if (loading) return
-    loading = true
+    if (loading.value) return
+    loading.value = true
     const active = {
         active2: '否',
         active3: '否',
@@ -649,12 +650,12 @@ const onSubmit = () => {
         // Object.keys(from).forEach((key) => {
         //     from[key] = '';
         // });
-        loading = false
+        loading.value = false
         showDialog({
             message: lang[props.langType].registration,
         })
     }).catch((res) => {
-        loading = false
+        loading.value = false
         showToast(res.msg || lang[props.langType].networkError);
     });
 }

+ 6 - 5
src/view/fenghui/form1Recurrence.vue

@@ -411,6 +411,7 @@
                 </van-field>
                 <br />
                 <van-button
+                    :loading="loading"
                     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 }}
@@ -431,6 +432,7 @@ const emits = defineEmits(['closeComponent']);
 const formData = reactive({
     active2: []
 })
+const loading = ref(false);
 const cardTypeList = computed(() => lang[props.langType].cardTypeList)
 const unitTypeList = computed(() => lang[props.langType].foreignCountryUnitType)
 const showBirthday = ref(false)
@@ -668,10 +670,9 @@ const dateTimeColumns = computed(() => {
 });
 
 
-let loading = false
 const onSubmit = () => {
-    if (loading) return
-    loading = true
+    if (loading.value) return
+    loading.value = true
     const active = {
         active2: '否',
         active3: '否',
@@ -736,12 +737,12 @@ const onSubmit = () => {
         // Object.keys(from).forEach((key) => {
         //     from[key] = '';
         // });
-        loading = false
+        loading.value = false
         showDialog({
             message: lang[props.langType].upRegistration,
         })
     }).catch((res) => {
-        loading = false
+        loading.value = false
         showToast(res.msg || lang[props.langType].networkError);
     });
 }

+ 6 - 5
src/view/fenghui/form2.vue

@@ -99,6 +99,7 @@
                 </van-field>
                 <br />
                 <van-button
+                    :loading="loading"
                     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 }}
@@ -116,6 +117,7 @@ const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
 
+const loading = ref(false);
 const formData = reactive({})
 const unitTypeList = computed(() => lang[props.langType].workGroup)
 const showUnitType = ref(false)
@@ -160,10 +162,9 @@ const beforeRead = (file) => {
     return false;
 };
 
-let loading = false
 const onSubmit = () => {
-    if (loading) return
-    loading = true
+    if (loading.value) return
+    loading.value = true
     saveData({
         name: formData.name, // 姓名
         code: props.verificationCode, // 邀请码
@@ -183,12 +184,12 @@ const onSubmit = () => {
         // Object.keys(from).forEach((key) => {
         //     from[key] = '';
         // });
-        loading = false
+        loading.value = false
         showDialog({
             message: lang[props.langType].registration,
         })
     }).catch((res) => {
-        loading = false
+        loading.value = false
         showToast(res.msg || lang[props.langType].networkError);
     });
 }

+ 6 - 5
src/view/fenghui/form2Recurrence.vue

@@ -99,6 +99,7 @@
                 </van-field>
                 <br />
                 <van-button
+                    :loading="loading"
                     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 }}
@@ -115,6 +116,7 @@ import lang from './lang.js';
 const props = defineProps(['langType', 'verificationCode', 'subData']);
 
 const emits = defineEmits(['closeComponent']);
+const loading = ref(false);
 const formData = reactive({})
 const unitTypeList = computed(() => lang[props.langType].workGroup)
 const showUnitType = ref(false)
@@ -194,10 +196,9 @@ const beforeRead = (file) => {
     return false;
 };
 
-let loading = false
 const onSubmit = () => {
-    if (loading) return
-    loading = true
+    if (loading.value) return
+    loading.value = true
     editData({
         id: props.subData.id, // 人员id
         name: formData.name, // 姓名
@@ -218,12 +219,12 @@ const onSubmit = () => {
         // Object.keys(from).forEach((key) => {
         //     from[key] = '';
         // });
-        loading = false
+        loading.value = false
         showDialog({
             message: lang[props.langType].registration,
         })
     }).catch((res) => {
-        loading = false
+        loading.value = false
         showToast(res.msg || lang[props.langType].networkError);
     });
 }

+ 6 - 6
src/view/fenghui/formRecurrence.vue

@@ -422,6 +422,7 @@
                 </van-field>
                 <br />
                 <van-button
+                    :loading="loading"
                     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 }}
@@ -444,6 +445,7 @@ const formData = reactive({
 })
 const cardTypeList = computed(() => lang[props.langType].cardTypeList)
 const unitTypeList = computed(() => lang[props.langType].foreignCountryUnitType)
+const loading = ref(false);
 const form = ref(null);
 const showBirthday = ref(false)
 const showReachTime = ref(false)
@@ -676,11 +678,9 @@ const dateTimeColumns = computed(() => {
     return [years, months, days, hours, minutes];
 });
 
-
-let loading = false
 const onSubmit = () => {
-    if (loading) return
-    loading = true
+    if (loading.value) return
+    loading.value = true
     const active = {
         active2: '否',
         active3: '否',
@@ -745,12 +745,12 @@ const onSubmit = () => {
         // Object.keys(from).forEach((key) => {
         //     from[key] = '';
         // });
-        loading = false
+        loading.value = false
         showDialog({
             message: lang[props.langType].upRegistration,
         })
     }).catch((res) => {
-        loading = false
+        loading.value = false
         showToast(res.msg || lang[props.langType].networkError);
     });
 }