Procházet zdrojové kódy

Merge branch 'dev' into setApi

tangning před 3 roky
rodič
revize
ffbbdd76da

+ 1 - 1
.env.development

@@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
 # Cross-domain proxy, you can configure multiple
 # Please note that no line breaks
 # http://192.168.0.38:8190/shop
-VITE_PROXY = [["/basic-api","https://cszfb.4dkankan.com/basic-api"],["/upload","http://localhost:3300/upload"],["/zfb-api","https://cszfb.4dkankan.com"]]
+VITE_PROXY = [["/basic-api","https://cszfb.4dkankan.com/basic-api"],["/zfb-api","https://cszfb.4dkankan.com"]]
 # VITE_PROXY = [["/basic-api","http://192.168.0.47:8190"],["/upload","http://localhost:3300/upload"],["/zfb-api","http://192.168.0.47:7081"]]
 #["/zfb-api","http://192.168.0.47:7081"]]
 # VITE_PROXY=[["/api","https://vvbin.cn/test"]]

+ 1 - 1
.env.production

@@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
 # Delete console
 VITE_DROP_CONSOLE = true
 
-VITE_PROXY = [["/basic-api","https://cszfb.4dkankan.com/basic-api"],["/upload","http://localhost:3300/upload"],["/zfb-api","https://cszfb.4dkankan.com"]]
+VITE_PROXY = [["/basic-api","https://zfb.4dkankan.com/basic-api"],["/zfb-api","https://zfb.4dkankan.com"]]
 # Whether to enable gzip or brotli compression
 # Optional: gzip | brotli | none
 # If you need multiple forms, you can use `,` to separate

+ 19 - 0
src/views/corporation/AddModal.vue

@@ -33,6 +33,25 @@
       componentProps: {
         maxLength: 25,
       },
+      rules: [
+        {
+          required: true,
+          // @ts-ignore
+          validator: async (rule, value) => {
+            var reg_tel = /^[a-zA-Z\u4e00-\u9fa5]+$/;
+            // var reg = /\S+@\S+\.\S+/;
+            if (!value) {
+              return Promise.reject('请输入员工名称');
+            }
+            if (!reg_tel.test(value)) {
+              /* eslint-disable-next-line */
+              return Promise.reject('请输入正确的员工名称');
+            }
+            return Promise.resolve();
+          },
+          trigger: 'change',
+        },
+      ],
     },
     {
       field: 'phone',

+ 19 - 19
src/views/scenes/liveDrawer.vue

@@ -371,26 +371,26 @@
         isUpdate.value = !!data?.isUpdate;
         console.log('isUpdate', isUpdate.value);
         const { record } = data;
-        if (unref(isUpdate)) {
-          await updateSchema({
-            field: 'sceneNum',
-            componentProps: {
-              api: getAllSceneApi,
-              disabled: isUpdate.value,
-              immediate: true,
-              resultField: 'list',
-              labelField: 'sceneName',
-              valueField: 'num',
-              onChange: function (_, item) {
-                console.log('onChange', item);
-                myData.sceneUrl = item.webSite || item.sceneUrl || item.liveRoomUrl;
-              },
-              params: {
-                page: 1,
-                limit: 100,
-              },
+        await updateSchema({
+          field: 'sceneNum',
+          componentProps: {
+            api: getAllSceneApi,
+            disabled: isUpdate.value,
+            immediate: true,
+            resultField: 'list',
+            labelField: 'sceneName',
+            valueField: 'num',
+            onChange: function (_, item) {
+              myData.sceneUrl = item.webSite || item.sceneUrl || item.liveRoomUrl;
             },
-          });
+            params: {
+              page: 1,
+              limit: 100,
+              sceneNum: record && record.sceneNum,
+            },
+          },
+        });
+        if (unref(isUpdate)) {
           try {
             const res = await getLiveInfoApi({ id: record.id, token });
             let setDAta: infoItem = {

+ 1 - 1
src/views/staff/detailsModal.vue

@@ -87,7 +87,7 @@
               required: true,
               // @ts-ignore
               validator: async (rule, value) => {
-                var reg_tel = /^[a-zA-Z0-9\u4e00-\u9fa5()]+$/;
+                var reg_tel = /^[a-zA-Z\u4e00-\u9fa5]+$/;
                 // var reg = /\S+@\S+\.\S+/;
                 if (!value) {
                   return Promise.reject('请输入员工名称');

+ 2 - 2
src/views/sys/login/LoginForm.vue

@@ -147,8 +147,8 @@
   const isDragValidate = ref(false);
 
   const formData = reactive({
-    account: '17324327132',
-    password: 'zfb123456',
+    account: '',
+    password: '',
     // password: encodeStr(window.btoa('zfb123456')),
     // captcha: '',
   });