Jamen 2 月之前
父節點
當前提交
578f382b18
共有 3 個文件被更改,包括 19 次插入12 次删除
  1. 4 4
      config/index.js
  2. 6 0
      src/api/login.js
  3. 9 8
      src/view/login/index.vue

+ 4 - 4
config/index.js

@@ -12,7 +12,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        target: 'http://124.71.22.8:13100',
+        target: 'http://127.0.0.1:13100',
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api'
@@ -20,7 +20,7 @@ module.exports = {
         logLevel: "debug"
       },
       '/pdfviewer': {
-        target: 'http://124.71.22.8:13100',
+        target: 'http://127.0.0.1:13100',
         changeOrigin: true,
         pathRewrite: {
           '^/pdfviewer': ''
@@ -28,7 +28,7 @@ module.exports = {
         logLevel: "debug"
       },
       '/papi': {
-        target: 'http://124.71.22.8:13100',
+        target: 'http://127.0.0.1:13100',
         changeOrigin: true,
         pathRewrite: {
           '^/papi': '/api'
@@ -38,7 +38,7 @@ module.exports = {
 
     // Various Dev Server settings
     // host: '192.168.1.59', // can be overwritten by process.env.HOST
-    host: '192.168.10.5', // can be overwritten by process.env.HOST
+    host: '127.0.0.1', // can be overwritten by process.env.HOST
     port: 13200, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

+ 6 - 0
src/api/login.js

@@ -47,6 +47,12 @@ export function getWXUserID(params) {
   })
 }
 
+export function getIPC() {
+  return request({
+    url: window.location.origin+'/static/recordNumber.json',
+    method: 'get',
+  })
+}
 // export function updateDocumentCut(data, id) {
 //   return request({
 //     url: '/document/windocfolder/' + id + '/',

+ 9 - 8
src/view/login/index.vue

@@ -77,7 +77,7 @@
             autocomplete="new-password"
             :rules="[{ trigger: 'onBlur', required: true, message: '请填写用户名' }]"
             label-class="filed-label"
-            style="border-radius:40px 40px 0 0;height:auto;display:block;font-size:16px"
+            style="border-radius:40px 40px 0 0;height:auto;display:block;font-size:16px;padding:10px 16px !important;"
           />
           <van-field
             label="密码"
@@ -87,7 +87,7 @@
             placeholder="请输入密码"
             autocomplete="new-password"
             label-class="filed-label"
-            style="border-radius:0 0 40px 40px;height:auto;display:block;font-size:16px"
+            style="border-radius:0 0 40px 40px;height:auto;display:block;font-size:16px;padding:10px 16px !important;"
           />
         </div>
         <div style="margin:36px 10%;width:80%">
@@ -114,10 +114,9 @@
   </div>
 </template>
 <script>
-import { login, getDDConfig, getDDUserID, getWXUserID } from "@/api/login";
+import { login, getDDConfig, getDDUserID, getWXUserID,getIPC } from "@/api/login";
 import { getHeadPic } from '@/api/userinfo.js'
 import { setToken, getToken } from "@/utils/cookie_ctrl";
-import {ICPNumber,safetyRecordNumber,textColor} from "../../../static/recordNumber.json"
 export default {
   name: "Login",
   data() {
@@ -140,7 +139,7 @@ export default {
     console.log(
       "==============================Login created=============================="
     );
-    this.getRecordData()
+    this.getRecordData();
     this.token = getToken();
     console.log("-Login- token: ", this.token);
     console.log("-Login- token's type: ", typeof this.token);
@@ -171,9 +170,11 @@ export default {
   },
   methods: {
     getRecordData(){
-      this.recordData.ICPNumber = ICPNumber
-      this.recordData.safetyRecordNumber = safetyRecordNumber
-      this.recordData.textColor = textColor
+      getIPC().then(rs=>{
+        this.recordData.ICPNumber = rs.data.ICPNumber
+        this.recordData.safetyRecordNumber = rs.data.safetyRecordNumber
+        this.recordData.textColor = rs.data.textColor
+      })
     },
     /** Request: 登录请求 */
     create_login(data, callback) {