study 2 semanas atrás
pai
commit
cd01dfca99

BIN
src/assets/welcome/07.png


+ 1 - 1
src/core/bootstrap.js

@@ -26,6 +26,6 @@ export default function Initializer () {
   store.commit(TOGGLE_MULTI_TAB, storage.get(TOGGLE_MULTI_TAB, defaultSettings.multiTab))
   store.commit('SET_TOKEN', storage.get(ACCESS_TOKEN))
 
-  store.dispatch('setLang', storage.get(APP_LANGUAGE, 'en-US'))
+  store.dispatch('setLang', storage.get(APP_LANGUAGE, 'zh-CN'))
   // last step
 }

+ 4 - 4
src/locales/index.js

@@ -4,15 +4,15 @@ import storage from 'store'
 import moment from 'moment'
 
 // default lang
-import enUS from './lang/en-US'
+import zhCN from './lang/zh-CN'
 
 Vue.use(VueI18n)
 
-export const defaultLang = 'en-US'
+export const defaultLang = 'zh-CN'
 
 const messages = {
-  'en-US': {
-    ...enUS
+  'zh-CN': {
+    ...zhCN
   }
 }
 

+ 1 - 0
src/router/index.js

@@ -35,5 +35,6 @@ Vue.use(Router)
 
 export default new Router({
   mode: 'history',
+  base: process.env.NODE_ENV === "production" ?"/user/" : "/",
   routes: constantRouterMap.concat(asyncRouterMap)
 })

+ 1 - 1
src/store/modules/app.js

@@ -29,7 +29,7 @@ const app = {
     color: '',
     weak: false,
     multiTab: true,
-    lang: 'en-US',
+    lang: 'zh-CN',
     _antLocale: {}
   },
   mutations: {

+ 2 - 2
src/utils/request.js

@@ -9,13 +9,13 @@ import router from '@/router'
 // 创建 axios 实例
 const request = axios.create({
   // API 请求的默认前缀
-  baseURL: process.env.VUE_APP_API_BASE_URL,
+  baseURL: process.env.VUE_APP_API_BASE_URL+'/v1',
   timeout: 6000 // 请求超时时间
 })
 
 // 异常拦截处理器
 const errorHandler = (error) => {
-
+console.log('process.env.VUE_APP_API_BASE_URL',process.env.VUE_APP_API_BASE_URL)
   if (error.response) {
     const data = error.response.data
     // 从 localstorage 获取 token

+ 77 - 39
src/views/dashboard/Analysis.vue

@@ -40,14 +40,23 @@
 
       <!-- 无数据时显示 -->
       <div v-else class="empty-state">
-        <a-empty
-          image="https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg"
-          :image-style="{
-            height: '120px',
-          }"
-        >
-          <span slot="description"> 暂无文档数据 </span>
-        </a-empty>
+        <div class="no-content">
+          <svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
+            <g transform="translate(0 1)" fill="none" fillRule="evenodd">
+              <ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
+              <g fillRule="nonzero" stroke="#D9D9D9">
+                <path
+                  d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
+                ></path>
+                <path
+                  d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
+                  fill="#FAFAFA"
+                ></path>
+              </g>
+            </g>
+          </svg>
+          <div style="margin-top: 20px">暂无内容</div>
+        </div>
       </div>
     </div>
 
@@ -61,7 +70,23 @@
     >
       <div class="">
         <div v-if="selectedDoc.body" v-html="selectedDoc.body" class="rich-text-content"></div>
-        <div v-else class="no-content">暂无详细内容</div>
+        <div v-else class="no-content">
+          <svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
+            <g transform="translate(0 1)" fill="none" fillRule="evenodd">
+              <ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse>
+              <g fillRule="nonzero" stroke="#D9D9D9">
+                <path
+                  d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
+                ></path>
+                <path
+                  d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
+                  fill="#FAFAFA"
+                ></path>
+              </g>
+            </g>
+          </svg>
+          <div style="margin-top: 20px">暂无内容</div>
+        </div>
       </div>
     </a-drawer>
   </div>
@@ -142,7 +167,7 @@ export default {
         .get(`user/knowledge/fetch?language=zh-CN&keyword=${this.searchText}`)
         .then((res) => {
           console.log('接口返回数据:', res)
-          this.knowledgeData = res?.data??{}
+          this.knowledgeData = res?.data ?? {}
         })
         .catch((error) => {
           console.error('获取详情失败:', error)
@@ -332,41 +357,53 @@ export default {
 .rich-text-content {
   line-height: 1.8;
   color: #333;
-  
+
   /* 富文本内容样式重置和优化 */
-  >>> h1, 
-  >>> h2, 
-  >>> h3, 
-  >>> h4, 
-  >>> h5, 
+  >>> h1,
+  >>> h2,
+  >>> h3,
+  >>> h4,
+  >>> h5,
   >>> h6 {
     margin: 1.5em 0 0.8em 0;
     color: #262626;
     font-weight: 600;
   }
-  
-  >>> h1 { font-size: 24px; }
-  >>> h2 { font-size: 20px; }
-  >>> h3 { font-size: 18px; }
-  >>> h4 { font-size: 16px; }
-  >>> h5 { font-size: 14px; }
-  >>> h6 { font-size: 12px; }
-  
+
+  >>> h1 {
+    font-size: 24px;
+  }
+  >>> h2 {
+    font-size: 20px;
+  }
+  >>> h3 {
+    font-size: 18px;
+  }
+  >>> h4 {
+    font-size: 16px;
+  }
+  >>> h5 {
+    font-size: 14px;
+  }
+  >>> h6 {
+    font-size: 12px;
+  }
+
   >>> p {
     margin: 1em 0;
     text-align: justify;
   }
-  
-  >>> ul, 
+
+  >>> ul,
   >>> ol {
     margin: 1em 0;
     padding-left: 2em;
   }
-  
+
   >>> li {
     margin: 0.5em 0;
   }
-  
+
   >>> blockquote {
     margin: 1em 0;
     padding: 1em 1.5em;
@@ -375,7 +412,7 @@ export default {
     color: #666;
     font-style: italic;
   }
-  
+
   >>> code {
     padding: 2px 6px;
     background: #f5f5f5;
@@ -384,7 +421,7 @@ export default {
     font-family: 'Courier New', monospace;
     font-size: 0.9em;
   }
-  
+
   >>> pre {
     margin: 1.5em 0;
     padding: 1.5em;
@@ -393,53 +430,53 @@ export default {
     border-radius: 6px;
     overflow-x: auto;
   }
-  
+
   >>> pre code {
     background: none;
     border: none;
     padding: 0;
   }
-  
+
   >>> table {
     width: 100%;
     margin: 1.5em 0;
     border-collapse: collapse;
     border: 1px solid #e8e8e8;
   }
-  
+
   >>> th,
   >>> td {
     padding: 12px 16px;
     border: 1px solid #e8e8e8;
     text-align: left;
   }
-  
+
   >>> th {
     background: #fafafa;
     font-weight: 600;
   }
-  
+
   >>> img {
     max-width: 100%;
     height: auto;
     border-radius: 6px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
   }
-  
+
   >>> a {
     color: #1890ff;
     text-decoration: none;
   }
-  
+
   >>> a:hover {
     text-decoration: underline;
   }
-  
+
   >>> strong {
     font-weight: 600;
     color: #262626;
   }
-  
+
   >>> em {
     font-style: italic;
     color: #666;
@@ -450,6 +487,7 @@ export default {
   display: flex;
   justify-content: center;
   align-items: center;
+  flex-direction: column;
   min-height: 200px;
 }
 </style>

+ 35 - 39
src/views/dashboard/Workplace.vue

@@ -7,9 +7,7 @@
     <a-card title="我的订阅" class="subscription-card">
       <div class="subscription-content">
         <h3 class="plan-title">测试</h3>
-        <p v-if="past" class="expire-text" style="color:#e04f1a;font-weight: 600">
-          已过期
-        </p>
+        <p v-if="past" class="expire-text" style="color: #e04f1a; font-weight: 600">已过期</p>
         <p v-else class="expire-text">
           于 {{ expired }} 到期,距离到期还有 <span class="highlight">{{ expiredDay }}</span> 天。
         </p>
@@ -21,14 +19,7 @@
           </p>
         </div>
 
-        <a-button
-            @click="goTO(3)"
-            type="primary"
-            size="large"
-            class="purchase-btn"
-          >
-            续费订阅
-          </a-button>
+        <a-button @click="goTO(3)" type="primary" size="large" class="purchase-btn"> 续费订阅 </a-button>
       </div>
     </a-card>
 
@@ -116,7 +107,7 @@
 import QRCode from 'qrcode'
 export default {
   name: 'SubscriptionPage',
-  data () {
+  data() {
     return {
       progressColor: '#fa541c',
       subscribeModalVisible: false,
@@ -125,7 +116,7 @@ export default {
         { id: 1, title: '查看教程', desc: '学习如何使用 V2Board', icon: 'book' },
         { id: 2, title: '一键订阅', desc: '快速将节点导入对应客户端进行使用', icon: 'wifi' },
         { id: 3, title: '续费订阅', desc: '对您当前的订阅进行续费', icon: 'clock-circle' },
-        { id: 4, title: '遇到问题', desc: '遇到问题可以通过工单与我们沟通', icon: 'global' }
+        { id: 4, title: '遇到问题', desc: '遇到问题可以通过工单与我们沟通', icon: 'global' },
       ],
       subscribeUrl: '', // 订阅地址
       info: '',
@@ -135,15 +126,15 @@ export default {
       allFlow: '0.00',
       percent: 0,
       qrImageUrl: '',
-      past:false,
+      past: false,
     }
   },
-  created () {
+  created() {
     this.getInfo()
     this.getSubscribe()
   },
   methods: {
-    async generateQRCode () {
+    async generateQRCode() {
       try {
         if (!this.subscribeUrl.trim()) {
           return
@@ -152,7 +143,7 @@ export default {
         // 生成图片 URL
         this.qrImageUrl = await QRCode.toDataURL(this.subscribeUrl, {
           width: 200,
-          margin: 2
+          margin: 2,
         })
         console.log('this.qrImageUrl', this.qrImageUrl)
       } catch (error) {
@@ -160,7 +151,7 @@ export default {
         this.$message.error('生成二维码失败')
       }
     },
-    getInfo () {
+    getInfo() {
       this.$http.get('/user/info').then((res) => {
         console.log('res', res)
         this.$store.commit('SET_NAME', { name: res.data.email })
@@ -171,7 +162,7 @@ export default {
         }
       })
     },
-    getSubscribe () {
+    getSubscribe() {
       this.$http.get('/user/getSubscribe').then((res) => {
         if (res.data.d || res.data.u) {
           this.useFlow = this.getMB(res.data.d) + this.getMB(res.data.u)
@@ -188,7 +179,7 @@ export default {
         this.generateQRCode()
       })
     },
-    getMB (e) {
+    getMB(e) {
       const bytes = e
 
       // 转换为 MB
@@ -208,8 +199,7 @@ export default {
       // = ${gb} GB
       // `);
     },
-    getTime (time) {
-
+    getTime(time) {
       // 格式化输出
       const targetTimestamp = time * 1000 // 转换为毫秒
       const targetDate = new Date(targetTimestamp)
@@ -221,41 +211,47 @@ export default {
       // 计算天数差
       const timeDiff = targetTimestamp - now.getTime()
       const daysRemaining = Math.ceil(timeDiff / (1000 * 60 * 60 * 24))
-      if(daysRemaining <= 0){
+      if (daysRemaining <= 0) {
         this.past = true
       }
       return daysRemaining
     },
-    goTO (id) {
+    goTO(id) {
       if (id == 1) {
         this.$router.push('/dashboard/analysis')
       } else if (id == 2) {
         this.showSubscribeModal()
       } else if (id == 3) {
-        this.$router.push({
-          path: '/form/plan',
-          query: {
-            plan_id: this.info?.plan_id ?? ''
-          }
-        })
+        if (this.info && this.info.plan_id) {
+          this.$router.push({
+            path: '/form/plan',
+            query: {
+              plan_id: this.info?.plan_id ?? '',
+            },
+          })
+        } else {
+          this.$router.push({
+            path: '/form/base-form'
+          })
+        }
       } else if (id == 4) {
         this.$router.push('/account/workOrder')
       }
     },
 
     // 显示一键订阅弹窗
-    showSubscribeModal () {
+    showSubscribeModal() {
       this.subscribeModalVisible = true
     },
 
     // 显示二维码弹窗
-    showQRCodeModal () {
+    showQRCodeModal() {
       this.qrModalVisible = true
       this.subscribeModalVisible = false
     },
 
     // 复制订阅地址
-    copySubscribeUrl () {
+    copySubscribeUrl() {
       const textArea = document.createElement('textarea')
       textArea.value = this.subscribeUrl
       document.body.appendChild(textArea)
@@ -267,7 +263,7 @@ export default {
     },
 
     // 导入到 Clash For Windows
-    importToClash () {
+    importToClash() {
       // 尝试使用 clash:// 协议打开 Clash For Windows
       const clashUrl = `clash://install-config?url=${encodeURIComponent(this.subscribeUrl)}`
 
@@ -285,11 +281,11 @@ export default {
     },
 
     // 查看教程
-    viewTutorial () {
+    viewTutorial() {
       this.$router.push('/dashboard/analysis')
       // 这里可以跳转到教程路由
-    }
-  }
+    },
+  },
 }
 </script>
 
@@ -300,8 +296,8 @@ export default {
 
 .purchase-btn {
   height: 32px;
-    font-size: 14px;
-    border-radius: 4px;
+  font-size: 14px;
+  border-radius: 4px;
 }
 
 .subscription-page {

+ 12 - 1
src/views/form/basicForm/index.vue

@@ -12,7 +12,7 @@
     </div>
 
     <!-- 计划卡片 -->
-    <div class="plan-cards">
+    <div v-if="sortedDataList.length > 0" class="plan-cards">
       <a-card
         v-for="(item, index) in sortedDataList"
         :key="index"
@@ -78,6 +78,10 @@
         </div>
       </a-card>
     </div>
+    <div v-else class="no-content">
+      <svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fillRule="evenodd"><ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fillRule="nonzero" stroke="#D9D9D9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA"></path></g></g></svg>
+      <div style="margin-top: 20px;">暂无内容</div>
+    </div>
   </div>
 </template>
 
@@ -352,4 +356,11 @@ export default {
     padding: 16px;
   }
 }
+.no-content {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  min-height: 200px;
+}
 </style>

+ 1 - 1
src/views/list/BasicList.vue

@@ -110,7 +110,7 @@
       @cancel="handleCancelTransfer"
     >
       <div class="transfer-modal-content">
-        <p class="transfer-notice">划转后的余额仅用于v2Board消费使用</p>
+        <p class="transfer-notice">划转后的余额仅用于加速乐消费使用</p>
 
         <div class="current-balance">
           <div class="balance-label">当前推广佣金余额</div>

+ 5 - 4
src/views/user/Login.vue

@@ -18,7 +18,7 @@
             <a-input
               size="large"
               type="text"
-              :placeholder="$t('user.login.username.placeholder')"
+              placeholder="请输入邮箱"
               v-decorator="[
                 'email',
                 {rules: [{ required: true, message: $t('user.userName.required') }, { validator: handleUsernameOrEmail }], validateTrigger: 'change'}
@@ -31,7 +31,7 @@
           <a-form-item>
             <a-input-password
               size="large"
-              :placeholder="$t('user.login.password.placeholder')"
+              placeholder="请输入密码"
               v-decorator="[
                 'password',
                 {rules: [{ required: true, message: $t('user.password.required') }], validateTrigger: 'blur'}
@@ -266,8 +266,7 @@ export default {
         console.log('res', res)
         this.$store.commit('SET_NAME', { name: res.data.email })
         localStorage.setItem('SET_NAME', res.data.email)
-      })
-      this.$router.push({ path: '/' })
+        this.$router.push({ path: '/' })
       // 延迟 1 秒显示欢迎信息
       setTimeout(() => {
         this.$notification.success({
@@ -276,6 +275,8 @@ export default {
         })
       }, 1000)
       this.isLoginError = false
+      })
+      
     },
     requestFailed (err) {
       this.isLoginError = true

+ 1 - 2
src/views/user/welcome.vue

@@ -250,8 +250,7 @@ export default {
           description: '稳定高速的网络连接',
         },
         {
-          // img: '07',
-          img: '11',
+          img: '07',
           title: '高质量带宽',
           description: '优质带宽保障',
         },

+ 2 - 4
vue.config.js

@@ -40,6 +40,7 @@ const assetsCDN = {
 
 // vue.config.js
 const vueConfig = {
+  publicPath: '/user/',
   configureWebpack: {
     // webpack plugins
     plugins: [
@@ -126,10 +127,7 @@ const vueConfig = {
     proxy: {
       '/api': {
         target: 'https://v2board.damalife.com',
-        changeOrigin: true,
-        pathRewrite: {
-          '^/api': '/api/v1' // 将 /api 重写为 /api/v1
-        }
+        changeOrigin: true
       }
     }
   },