Przeglądaj źródła

Merge branch 'release/v5.4.0' of Software/android-cloud-H5 into master

zengzhixiang 2 lat temu
rodzic
commit
f47d278cd3
2 zmienionych plików z 28 dodań i 2 usunięć
  1. 20 0
      pages/customer-service.vue
  2. 8 2
      plugins/file-center.js

+ 20 - 0
pages/customer-service.vue

@@ -46,6 +46,26 @@ export default {
     isOnunread() {
       return this.$route.query.onunread === 'true';
     },
+    ysfConfigData() {
+      return [
+        { key: 'real_name', value: this.$auth.user.userName },
+        { key: 'mobile_phone', hidden: true, value: this.$auth.user.phone },
+        { key: 'email', value: this.$auth.user.email },
+        {
+          key: 'avatar',
+          label: '头像',
+          value:
+            this.$auth.user.headImgFileId &&
+            fileKeyToUrl(this.$auth.user.headImgFileId),
+        }, // 访客头像
+        {
+          index: 0,
+          key: 'account',
+          label: '账号',
+          value: this.$auth.user.phone,
+        },
+      ];
+    },
   },
   mounted() {},
   methods: {

+ 8 - 2
plugins/file-center.js

@@ -1,16 +1,22 @@
+// import path from 'path';
 import qs from 'qs';
+// import url from 'url';
+
 
 let baseURL;
 if (process.env.NODE_ENV === 'development') {
   // 开发环境通过本地代理
-  baseURL = process.env.FILE_PREFIX;
+  // baseURL = process.env.FILE_PREFIX;
+  baseURL = '/file';
 } else {
   // 部署环境通过域名直连
-  baseURL = `http${process.env.FILE_PORT === '443' ? 's' : ''}://${
+  baseURL = `http${process.env.FILE_HTTPS === 'true' ? 's' : ''}://${
     process.env.FILE_HOST
   }:${process.env.FILE_PORT}/${process.env.FILE_PREFIX}`;
 }
 
+
+
 export const fileKeyToUrl = (fileKey, params = {}) =>
   `${baseURL}/document/newFile/download/0/${
     process.env.FILE_UPLOAD_KEY