Переглянути джерело

默认账号侧边栏禁用,产品管理页新增逻辑

lisiyan 10 місяців тому
батько
коміт
4833f81dd6

+ 13 - 12
src/assets/style/element-variables.scss

@@ -106,14 +106,14 @@ li.el-menu-item,
 
 // ToolTip
 .el-tooltip__popper.is-dark {
-  padding: 2px 8px;
+  padding: 8px;
   background: #373A47;
   box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.12);
   line-height: 20px;
   font-size: 14px;
   font-weight: 400;
   .popper__arrow {
-    display: none;
+    display: inherit !important;
   }
 }
 .el-tooltip__popper {
@@ -147,19 +147,20 @@ li.el-menu-item,
     display: none !important;
   }
   .el-dialog__body {
-    display: flex !important;
-    flex-direction: column !important;
-    align-items: center !important;
-    text-align: center !important;
-    padding: 24px !important;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    text-align: center;
+    padding: 24px;
     word-break: normal;
   }
   .el-dialog__footer {
-    padding: 0 24px 24px !important;
+    padding: 0 24px 24px;
     .el-button {
-      width: 133px !important;
-      height: 32px !important;
-      padding: 0 !important;
+      width: 133px;
+      height: 32px;
+      padding: 0;
+      line-height: 24px;
       &.el-button--default {
         border-color: #1460F3 !important;
         span {
@@ -171,7 +172,7 @@ li.el-menu-item,
       }
     }
     .el-button + .el-button {
-      margin-left: 8px !important;
+      margin-left: 8px;
     }
   }
   .el-dialog__footer_div {

+ 9 - 0
src/components/icon/copy.vue

@@ -0,0 +1,9 @@
+<template>
+  <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <path fill-rule="evenodd" clip-rule="evenodd" d="M10.063 9.5H21.5C22.0523 9.5 22.5 9.94772 22.5 10.5V23.937C23.3626 23.715 24 22.9319 24 22V10C24 8.89543 23.1045 8 22 8H12C11.0681 8 10.285 8.63739 10.063 9.5Z" fill="#1460F3" fill-opacity="0.8"/>
+    <mask id="path-3-inside-1_1768_3960" fill="white">
+    <rect x="9" y="10" width="13" height="15" rx="1"/>
+    </mask>
+    <rect x="9" y="10" width="13" height="15" rx="1" stroke="#1460F3" stroke-width="3" mask="url(#path-3-inside-1_1768_3960)"/>
+  </svg>
+</template>

+ 10 - 0
src/components/icon/copyActive.vue

@@ -0,0 +1,10 @@
+<template>
+  <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <rect width="32" height="32" rx="3" fill="#EEF4FF"/>
+    <path fill-rule="evenodd" clip-rule="evenodd" d="M10.063 9.5H21.5C22.0523 9.5 22.5 9.94772 22.5 10.5V23.937C23.3626 23.715 24 22.9319 24 22V10C24 8.89543 23.1045 8 22 8H12C11.0681 8 10.285 8.63739 10.063 9.5Z" fill="#1460F3"/>
+    <mask id="path-3-inside-1_1813_2777" fill="white">
+    <rect x="9" y="10" width="13" height="15" rx="1"/>
+    </mask>
+    <rect x="9" y="10" width="13" height="15" rx="1" stroke="#1460F3" stroke-width="3" mask="url(#path-3-inside-1_1813_2777)"/>
+  </svg>
+</template>

src/components/icon/eye_colse.vue → src/components/icon/eye_close.vue


+ 6 - 0
src/components/icon/update.vue

@@ -0,0 +1,6 @@
+<template>
+  <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <rect width="48" height="48" rx="24" fill="#FFAE49"/>
+    <path d="M27.7931 37V22.2537H35L24 11L13 22.2537H20.2069V37" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+  </svg>
+</template>

+ 6 - 15
src/components/sideMenu.vue

@@ -41,19 +41,10 @@ export default {
       })
       this.$cookies.remove('accessToken')
       userStore().clearUserInfo()
-    },
-    updataUserInfo(){
-      get(
-        '/pdf-tech/vppMember/getMemberInfo'
-      ).then((res) => {
-        if (res.data.code === 200 && res.data.msg == 'success') {
-          userStore().setUserInfo(res.data.result)
-        }
-      })
     }
   },
   filters:{
-    avant(){
+    avatar(){
       if (userStore().user.userName) {
         return userStore().user.userName.trim().substr(0, 1).toUpperCase()
       }
@@ -105,7 +96,7 @@ export default {
   <div class=" flex flex-col justify-between h-100vh">
     <div class="aside ">
       <div class="user-info">
-        <div class="head-photo"><p>{{ userName | avant() }}</p></div>
+        <div class="head-photo"><p>{{ userName | avatar() }}</p></div>
         <div class="info">
           <p>{{ userName | name() }}</p>
           <p>{{ email | email() }}</p>
@@ -146,20 +137,20 @@ export default {
           </el-menu-item>
         </div>
         <div v-if="role?.indexOf('4') !== -1">
-          <el-menu-item index="/reseller-manage-product">
+          <el-menu-item index="/reseller-manage-product" :disabled="!init">
             <Product />
             <span>Product Management</span>
           </el-menu-item>
-          <el-menu-item index="/reseller-manage-license">
+          <el-menu-item index="/reseller-manage-license" :disabled="!init">
             <License />
             <span>Manage License</span>
           </el-menu-item>
         </div>
-        <el-menu-item index="/settings">
+        <el-menu-item index="/settings" :disabled="!init">
           <Settings />
           <span>Settings</span>
         </el-menu-item>
-        <el-menu-item index="/support">
+        <el-menu-item index="/support" :disabled="!init">
           <Support />
           <span>Support</span>
         </el-menu-item>

+ 4 - 10
src/router/index.js

@@ -43,15 +43,10 @@ const router = new VueRouter({
         title: 'Log In PDF Tech Console'
       }
     },
-    {
-      path: "/upload-file",
-      name: "upload",
-      component: () => import("../views/UploadFile.vue")
-    },
     {
       path: "/non-admin-user",
       name: "noadmin",
-      component: () => import("../views/Noadmin.vue"),
+      component: () => import("@/views/Noadmin.vue"),
       meta: {
         title: 'Non-admin User'
       }
@@ -66,7 +61,7 @@ const router = new VueRouter({
     },
     {
       path: "/forget-password",
-      name: "forgotpassword",
+      name: "forgotPassword",
       component: () => import("../views/forgotpassword.vue"),
       meta: {
         title: 'Forget Password | PDF Tech Account'
@@ -175,7 +170,7 @@ const router = new VueRouter({
         },
         {
           path: "/assign-license",
-          name: "assignlicense",
+          name: "assignLicense",
           component: () => import("../views/Assignlicense.vue"),
           meta: {
             title: 'Manage License | PDF Tech Console'
@@ -183,7 +178,7 @@ const router = new VueRouter({
         },
         {
           path: "/batch-cancel-license",
-          name: "volumecancel",
+          name: "volumeCancel",
           component: () => import("../views/VolumeCancel.vue"),
           meta: {
             title: 'Manage License | PDF Tech Console'
@@ -260,7 +255,6 @@ router.beforeEach(async(to, from, next) => {
       if (userStore().user.role?.indexOf("2") !== -1 || userStore().user.role?.indexOf("1") !== -1 || userStore().user.role?.indexOf("4") !== -1) {
         next()
       } else {
-        debugger
         next('/non-admin-user')
       }
       const init = await userStore().getInitorUpdate()

+ 7 - 7
src/views/Create.vue

@@ -1,13 +1,13 @@
 <script>
 import { get, post } from '../../utils/request'
-import Eyecolse from '@/components/icon/eye_colse.vue'
-import Eyeopen from '@/components/icon/eye_open.vue'
+import EyeClose from '@/components/icon/eye_close.vue'
+import EyeOpen from '@/components/icon/eye_open.vue'
 import Loading from '@/components/icon/loading.vue'
 import Error from '@/components/icon/error.vue'
 import Email from '@/components/icon/email.vue'
 
 export default {
-  components: { Eyecolse, Eyeopen, Loading, Error, Email },
+  components: { EyeClose, EyeOpen, Loading, Error, Email },
   created() {
     if(!this.$route.query.code){
       this.$router.push('/404')
@@ -376,8 +376,8 @@ export default {
                 :class="passwordType ? 'eye-open' : 'eye-close'"
                 @click="passwordType = !passwordType"
               >
-                <Eyeopen v-show="passwordType" />
-                <Eyecolse v-show="!passwordType" /> </span
+                <EyeOpen v-show="passwordType" />
+                <EyeClose v-show="!passwordType" /> </span
               ><Error
                 class="w-14px h-14px block ml-10px"
                 :class="passwordError ? 'block' : 'hidden'"
@@ -399,8 +399,8 @@ export default {
                 :class="passwordConfirmType ? 'eye-open' : 'eye-close'"
                 @click="passwordConfirmType = !passwordConfirmType"
               >
-                <Eyeopen v-show="passwordConfirmType" />
-                <Eyecolse v-show="!passwordConfirmType" /> </span
+                <EyeOpen v-show="passwordConfirmType" />
+                <EyeClose v-show="!passwordConfirmType" /> </span
               ><Error
                 class="w-14px h-14px block ml-10px"
                 :class="passwordConfirmError ? 'block' : 'hidden'"

+ 5 - 5
src/views/LicenseManage.vue

@@ -14,7 +14,7 @@ const teamId = ref('')
 const status = ref('')
 const queryString = ref('')
 const total = ref(0)
-const linceseId = ref('')
+const licenseId = ref('')
 const licenseStatus = ref('')
 const tableData = ref([])
 const productList = ref([])
@@ -65,7 +65,7 @@ onMounted(() => {
     pageText.childNodes[0].nodeValue = 'Jump to Page'
   }
   pagingQuery()
-  getproductList()
+  getProductList()
   getTeamList()
 })
 const pagingQuery = (val) => {
@@ -114,7 +114,7 @@ const pagingQuery = (val) => {
   })
 }
 //获取已购买产品
-const getproductList = (val) => {
+const getProductList = (val) => {
   get('/pdf-tech/product/listWithAdmin').then(
     (res) => {
       productList.value = productListNameMapping(res.data.result)
@@ -167,7 +167,7 @@ const getTeamList = (val) => {
 const handleClick = (val) => {
   dialogVisible.value = true
   cancelEmail.value = val.email
-  linceseId.value = val.id
+  licenseId.value = val.id
   licenseStatus.value = val.validFlag
 }
 //导出序列码
@@ -205,7 +205,7 @@ const cancelAssign = () => {
   downloadLoading.value = true
   if (licenseStatus.value === 'Assigned' || licenseStatus.value === 'Activated' || licenseStatus.value === 'Partially activated') {
     var urlencoded = new URLSearchParams()
-    urlencoded.append('licenceId', linceseId.value)
+    urlencoded.append('licenceId', licenseId.value)
     post(
       '/pdf-tech/vppLicenseCode/cancelLicenceAssign',
       urlencoded

+ 25 - 25
src/views/Login.vue

@@ -1,14 +1,14 @@
 <script>
 import { post, get } from '../../utils/request'
 import crypto from '@/crypto/crypto'
-import Eyecolse from '@/components/icon/eye_colse.vue'
-import Eyeopen from '@/components/icon/eye_open.vue'
+import EyeClose from '@/components/icon/eye_close.vue'
+import EyeOpen from '@/components/icon/eye_open.vue'
 import Error from '@/components/icon/error.vue'
 import { userStore } from '@/store/userInfo'
 import TrailForm from '@/components/trailForm.vue'
 
 export default {
-  components: { Eyecolse, Eyeopen, Error, TrailForm },
+  components: { EyeClose, EyeOpen, Error, TrailForm },
   data() {
     return {
       passwordError: false,
@@ -16,7 +16,7 @@ export default {
       empty: true,
       teamIds: '',
       passwordType: false,
-      remenber: false,
+      remember: false,
       ruleForm: {
         email: '',
         password: ''
@@ -42,14 +42,14 @@ export default {
     }
   },
   mounted() {
-    const isRemenber = localStorage.getItem('isRemenber')
-    if (isRemenber) {
+    const isRemember = localStorage.getItem('isRemember')
+    if (isRemember) {
       this.ruleForm.email = localStorage.getItem('username') || ''
       this.ruleForm.password =
         crypto.get(localStorage.getItem('password')) || ''
-      this.remenber = true
+      this.remember = true
     }
-    this.isdisable()
+    this.isDisable()
   },
   methods: {
     submit() {
@@ -57,10 +57,10 @@ export default {
       this.emailError = false
       this.$refs['ruleForm'].validate((valid) => {
         if (valid) {
-          var formdata = new FormData()
-          formdata.append('username', this.ruleForm.email)
-          formdata.append('password', this.ruleForm.password)
-          post('/pdf-tech/login', formdata).then(
+          var formData = new FormData()
+          formData.append('username', this.ruleForm.email)
+          formData.append('password', this.ruleForm.password)
+          post('/pdf-tech/login', formData).then(
             (res) => {
               if (res.data.code === 200 && res.data.msg === '获取授权码成功') {
                 this.$message({
@@ -96,10 +96,10 @@ export default {
                 localStorage.setItem('username', this.ruleForm.email)
                 const SECRET_PWD = crypto.set(this.ruleForm.password) // 加密
                 localStorage.setItem('password', SECRET_PWD)
-                if (this.remenber) {
-                  localStorage.setItem('isRemenber', 'true')
+                if (this.remember) {
+                  localStorage.setItem('isRemember', 'true')
                 } else {
-                  localStorage.removeItem('isRemenber')
+                  localStorage.removeItem('isRemember')
                 }
                 
               } else if (
@@ -133,7 +133,7 @@ export default {
         }
       })
     },
-    isdisable() {
+    isDisable() {
       if (
         this.ruleForm.email.trim() !== '' ||
         this.ruleForm.password.trim() !== ''
@@ -200,7 +200,7 @@ export default {
           <div class="flex items-center">
             <el-input
               v-model.trim="ruleForm.email"
-              @input="isdisable()"
+              @input="isDisable()"
               placeholder="Email address"
             />
             <Error
@@ -214,7 +214,7 @@ export default {
             <el-input
               v-model="ruleForm.password"
               placeholder="Password"
-              @input="isdisable()"
+              @input="isDisable()"
               @keyup.enter.native="submit()"
               :type="passwordType ? '' : 'password'"
             >
@@ -225,8 +225,8 @@ export default {
               :class="passwordType ? 'eye-open' : 'eye-close'"
               @click="passwordType = !passwordType"
             >
-              <Eyeopen v-show="passwordType" />
-              <Eyecolse v-show="!passwordType" />
+              <EyeOpen v-show="passwordType" />
+              <EyeClose v-show="!passwordType" />
             </span>
             <Error
               class="w-14px h-14px block"
@@ -239,11 +239,11 @@ export default {
             <el-checkbox
               label="Keep me logged in"
               name="type"
-              v-model="remenber"
+              v-model="remember"
             ></el-checkbox>
-            <router-link to="/forget-password" class="text-[#1460F3]">
+            <!-- <router-link to="/forget-password" class="text-[#1460F3]">
               Forgot Password?
-            </router-link>
+            </router-link> -->
           </div>
         </el-form-item>
         <el-form-item>
@@ -262,11 +262,11 @@ export default {
             Create account
           </router-link>
         </div> -->
-        <div class="flex justify-center">
+        <!-- <div class="flex justify-center">
           <span @click="showTrailForm = true" class="text-12px text-[#1460F3] cursor-pointer">
             Don't have an account?
           </span>
-        </div>
+        </div> -->
       </el-form>
     </div>
     <div v-show="showTrailForm" class="bg-cover" @touchmove.stop.prevent></div>

+ 98 - 19
src/views/ProductManagement.vue

@@ -4,6 +4,9 @@ import copy from 'copy-to-clipboard'
 import { get, post } from '../../utils/request'
 import { userStore } from '@/store/userInfo'
 import { productListNameMapping } from '../../utils/mapping'
+import CopyId from '@/components/icon/copy.vue'
+import CopyIdActive from '@/components/icon/copyActive.vue'
+import Update from '@/components/icon/update.vue'
 
 const { proxy } = getCurrentInstance()
 const currentPage = ref(1)
@@ -20,6 +23,7 @@ const role = userStore().user.role
 const serverId = ref('')
 const serverIdDialogVisible = ref(false)
 const file = ref(null)
+const isCopyServerId = ref(false)
 
 onMounted(() => {
   let pageText = document.getElementsByClassName('el-pagination__jump')[0]
@@ -32,7 +36,7 @@ onMounted(() => {
   const base = isWindows ? baseurl + '/windows/store?mode=team' : baseurl + '/store?mode=team'
   url.value = base + '&email=' + userStore().user.email
   pagingQuery()
-  getproductList()
+  getProductList()
 })
 //筛选
 const searchInfo = () => {
@@ -58,7 +62,7 @@ const pagingQuery = () => {
   })
 }
 //获取已购买产品
-const getproductList = (val) => {
+const getProductList = (val) => {
   get('/pdf-tech/product/listWithAll').then(
     (res) => {
       productList.value = productListNameMapping(res.data.result)
@@ -83,6 +87,17 @@ const handleCurrentChange = (value) => {
 
 const upLoadChange = (value) => {
   file.value = value.raw
+  const length = file.value.name.split(".").length
+  const type = file.value.name.split(".")[length - 1]
+  if (type !== 'txt') {
+    proxy.$message({
+      duration: 5000,
+      message: 'This file does not seem to be a TXT file.',
+      type: 'error'
+    })
+    dialogVisible.value = false
+    return
+  }
   const formData = new FormData()
   formData.append("keyFile", file.value)
   post('/pdf-tech/vppKeyFile/parseKeyFile', formData)
@@ -93,13 +108,15 @@ const upLoadChange = (value) => {
           message: 'Upload Successfully',
           type: 'success'
         })
+        pagingQuery()
       } else {
         proxy.$message({
           duration: 5000,
-          message: 'Upload Failed',
+          message: 'Verify Failed, please try again',
           type: 'error'
         })
       }
+      dialogVisible.value = false
     })
     .catch(() => {
       proxy.$message({
@@ -107,6 +124,7 @@ const upLoadChange = (value) => {
         message: 'Upload Failed',
         type: 'error'
       })
+      dialogVisible.value = false
     })
 }
 
@@ -120,22 +138,30 @@ const handleGetKeyFile = async () => {
   serverIdDialogVisible.value = true
 }
 
-const copyServerId = () => {
+const copyServerId = (val) => {
   copy(serverId.value)
-  proxy.$message({
-    duration: 5000,
-    message: 'Copy Successfully',
-    type: 'success'
-  })
-  serverIdDialogVisible.value = false
+  if (val === 'icon') {
+    isCopyServerId.value = true
+    setTimeout(() => {
+      isCopyServerId.value = false
+    }, 2000)
+  } else {
+    proxy.$message({
+      duration: 5000,
+      message: 'Copy Successfully',
+      type: 'success'
+    })
+    serverIdDialogVisible.value = false
+  }
 }
 </script>
 
 <template>
   <div class="flex flex-col items-center">
-    <el-dialog title="" :visible.sync="dialogVisible" width="376px" top="30vh" center :show-close="false">
-      <h3 class="text-16px font-bold mt-16px">Update Your License</h3>
-      <p>
+    <el-dialog :visible.sync="dialogVisible" width="376px" top="30vh" center :show-close="false">
+      <Update class="mx-auto" />
+      <h3 class="text-16px font-bold mt-16px text-center my-16px">Update Your License</h3>
+      <p class=" text-center">
         Don't have a key file yet? <span class="text-16px text-[#1460F3] cursor-pointer" @click="handleGetKeyFile">Get one</span>
       </p>
       <div slot="footer" class="dialog-footer">
@@ -145,6 +171,7 @@ const copyServerId = () => {
           :on-change="upLoadChange"
           :auto-upload="false"
           :show-file-list="false"
+          accept=".txt"
           action=""
         >
           <el-button type="primary">
@@ -153,12 +180,19 @@ const copyServerId = () => {
         </el-upload>
       </div>
     </el-dialog>
-    <el-dialog title="" :visible.sync="serverIdDialogVisible" width="376px" top="30vh" :show-close="false">
-      <h3 class="text-16px font-bold mt-16px">Copy Server ID</h3>
-      <p>Contact us with your Server ID to get your key file</p>
-      <h3 class="text-16px font-bold mt-16px">Sever ID:</h3>
-      <p>{{ serverId }}</p>
-      <span slot="footer" class="dialog-footer">
+    <el-dialog :visible.sync="serverIdDialogVisible" width="404px" top="30vh" :show-close="false">
+      <h3 class="text-24px leading-32px font-bold mb-24px">Copy Server ID</h3>
+      <p class="text-16px leading-20px">Contact us with your Server ID to get your key file</p>
+      <h3 class="text-16px leading-20px font-bold mt-8px">Sever ID:</h3>
+      <div class="w-full rounded-6px border-1 border-[#D9D9D9] flex items-center justify-between pl-12px h-40px mt-4px">
+        {{ serverId }}
+        <div @click="copyServerId('icon')" class="cursor-pointer mr-4px copyBtn relative">
+          <CopyId />
+          <CopyIdActive class="hidden" />
+          <div class="tips absolute hidden bg-[#373A47] rounded-4px p-8px text-14px leading-20px text-white top-[-48px] right-[-8px] whitespace-nowrap" :class="isCopyServerId && 'right-[-36px]'">{{ isCopyServerId ? 'Copy Success' : 'Copy' }}</div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer copyId">
         <el-button @click="serverIdDialogVisible = false">Cancel</el-button>
         <el-button type="primary" @click="copyServerId">Copy</el-button>
       </span>
@@ -260,5 +294,50 @@ const copyServerId = () => {
 .el-table::v-deep .cell{
   word-break: break-word;
 }
+::v-deep .el-dialog {
+  .el-dialog__body {
+    display: inherit;
+    text-align: left;
+    color: #232A40;
+    .copyBtn {
+      .tips:before {
+        content: "";
+        position: absolute;
+        bottom: -10px;
+        left: 50%;
+        transform: translateX(-50%);
+        border-style: solid;
+        border-width: 10px 10px 0 10px;
+        border-color: #373A47 transparent transparent transparent;
+      }
+      &:hover {
+        .tips {
+          display: inherit;
+        }
+        & svg:nth-child(1) {
+          display: none;
+        }
+        & svg:nth-child(2) {
+          display: inline-block;
+        }
+      }
+    }
+  }
+  .dialog-footer {
+    button {
+      font-weight: bold;
+    }
+  }
+  .copyId {
+    .el-button + .el-button {
+      margin-left: 16px;
+    }
+    button {
+      width: 170px;
+      height: 48px;
+      border-radius: 8px;
+    }
+  }
+}
 </style>
 

+ 3 - 7
src/views/Settings.vue

@@ -149,7 +149,7 @@ export default {
       })
     },
     // 获取用户信息
-    updataUserInfo() {
+    updateUserInfo() {
       get(
         '/pdf-tech/vppMember/getMemberInfo'
       ).then((res) => {
@@ -168,7 +168,7 @@ export default {
     this.ruleForm.userName = userStore().user.userName
     this.ruleForm.area = userStore().user.area || ''
     this.role = userStore().user.role
-    this.updataUserInfo()
+    this.updateUserInfo()
   }
 }
 </script>
@@ -336,11 +336,7 @@ export default {
             </el-input>
           </div>
         </el-form-item>
-        <router-link
-          to="/forget-password"
-          class="flex ml-8px leading-20px mb-10px text-[#1460F3]"
-          >Forgot Your Password?</router-link
-        >
+        <!-- <router-link to="/forget-password" class="flex ml-8px leading-20px mb-10px text-[#1460F3]" >Forgot Your Password?</router-link> -->
         <el-form-item>
           <button
             type="button"

+ 2 - 2
src/views/Support.vue

@@ -8,10 +8,10 @@ import Email from '@/components/icon/email.vue'
 const { proxy } = getCurrentInstance()
 
 onMounted(() => {
-  updataUserInfo()
+  updateUserInfo()
 })
 // 获取用户信息
-const updataUserInfo = () => {
+const updateUserInfo = () => {
   get(
     '/pdf-tech/vppMember/getMemberInfo'
   ).then((res) => {

+ 1 - 1
utils/request.js

@@ -10,7 +10,7 @@ let msg = {
 
 // 创建请求实例
 const instance = axios.create({
-  baseURL: import.meta.env.VITE_BASE_URL,
+  // baseURL: import.meta.env.VITE_BASE_URL,
   // 指定请求超时的毫秒数
   timeout: 10000,
   // 表示跨域请求时是否需要使用凭证