En route пре 1 година
родитељ
комит
3a0715f60e

+ 4 - 2
.env.development

@@ -5,8 +5,10 @@ VUE_APP_TITLE =广州市建设工程消防协会
 ENV = 'development'
 
 # 开发环境
-VUE_APP_BASE_API = 'http://192.168.1.13:8032/'
-VUE_APP_IMG_API = 'http://192.168.1.13:8032'
+VUE_APP_BASE_API = 'http://192.168.1.12:8032/'
+VUE_APP_IMG_API = 'http://192.168.1.12:8032'
+# 开发环境-web端地址
+VUE_APP_JUMP = 'http://192.168.20:8081'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 2 - 0
.env.production

@@ -7,6 +7,8 @@ ENV = 'production'
 # 生产环境
 VUE_APP_BASE_API = 'https://api.gzxfxh2022.com/'
 VUE_APP_IMG_API = 'https://api.gzxfxh2022.com'
+# 生产环境-web端地址
+VUE_APP_JUMP = 'https://www.gzxfxh2022.com'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 31 - 21
src/components/membership/index.vue

@@ -18,6 +18,7 @@
         <el-row>
           <el-col
             v-for="(item, index) in ruleList"
+            :key="index"
             :span="item.span ? item.span : 24"
             ><el-form-item :label="item.label" :prop="item.prop">
               <el-select
@@ -28,7 +29,7 @@
               >
                 <el-option
                   v-for="items in options1"
-                  :key="item.value"
+                  :key="items.value"
                   :label="items.text"
                   :value="items.value"
                 >
@@ -42,7 +43,7 @@
               >
                 <el-option
                   v-for="items in options2"
-                  :key="item.value"
+                  :key="items.value"
                   :label="items.text"
                   :value="items.value"
                 >
@@ -52,9 +53,12 @@
                 v-model="ruleForm[item.prop]"
                 v-else-if="item.scope === 'options'"
               >
-                <el-radio v-for="items in item.options" :label="items.value">{{
-                  items.label
-                }}</el-radio>
+                <el-radio
+                  v-for="(items, indexs) in item.options"
+                  :key="indexs"
+                  :label="items.value"
+                  >{{ items.label }}</el-radio
+                >
               </el-radio-group>
 
               <el-date-picker
@@ -73,19 +77,25 @@
                 clearable
                 v-model.trim="ruleForm[item.prop]"
               ></el-input-number>
-              <div v-else-if="item.scope === 'file'" style="display: flex">
+              <div
+                v-else-if="item.scope === 'file'"
+                style="display: flex; flex-wrap: wrap"
+              >
                 <a
                   v-if="ruleForm[item.prop]"
                   :href="$methods.splitImgHost(ruleForm.FilePath)"
                   target="_blank"
                   class="file_style"
-                  >点击查看文件</a
+                  >已上传(点击可查看下载)</a
                 >
                 <label for="uploads" style="vertical-align: text-bottom"
                   ><span class="btn">{{
                     ruleForm[item.prop] ? "更换文件" : "上传文件"
                   }}</span></label
                 >
+                <span style="color: red"
+                  >(支持所有办公文件格式,多个文件请使用压缩包格式上传)</span
+                >
                 <input
                   type="file"
                   id="uploads"
@@ -325,21 +335,21 @@ export default {
       if (file === undefined) {
         return;
       }
-      if (file.size > 10 * 1024 * 1024) {
-        self.$message.error("文件不得大于10MB");
-        return;
-      }
-      var type = e.target.value.toLowerCase().split(".").splice(-1);
-      if (
-        type[0] != "jpg" &&
-        type[0] != "pdf" &&
-        type[0] != "png" &&
-        type[0] != "jpeg"
-      ) {
-        self.$message.error("上传格式需为:.jpg/.png/.jpeg/.pdf");
-        e.target.value = "";
+      if (file.size > 50 * 1024 * 1024) {
+        self.$message.error("文件不得大于50MB");
         return;
       }
+      // var type = e.target.value.toLowerCase().split(".").splice(-1);
+      // if (
+      //   type[0] != "jpg" &&
+      //   type[0] != "pdf" &&
+      //   type[0] != "png" &&
+      //   type[0] != "jpeg"
+      // ) {
+      //   self.$message.error("上传格式需为:.jpg/.png/.jpeg/.pdf");
+      //   e.target.value = "";
+      //   return;
+      // }
       let formDatas = new FormData();
       formDatas.append("file", file);
       this.$api
@@ -400,6 +410,6 @@ export default {
 }
 .btn {
   cursor: pointer;
-  color:red;
+  color: rgb(0, 102, 255);
 }
 </style>

+ 2 - 2
src/components/tinymce/index.vue

@@ -82,8 +82,8 @@ export default {
               if (file === undefined) {
                 return;
               }
-              if (file.size > 5 * 1024 * 1024) {
-                self.$message.error("文件不得大于5M");
+              if (file.size > 50 * 1024 * 1024) {
+                self.$message.error("文件不得大于50M");
                 return;
               }
               var type = file.name.toLowerCase().split(".").splice(-1);

+ 1 - 5
src/utils/permission.js

@@ -7,11 +7,7 @@ NProgress.configure({ showSpinner: false })
 router.beforeEach(async (to, from, next) => {
   NProgress.start();
   if (store.state.isDesktop) {
-    // request.getWeAppLink().then(res => {
-    //   console.log("isDesktop")
-    //   res.msg && (window.location.href = res.msg);
-    // });
-    // window.location.href = 'http://192.168.1.20:8082/home'
+    window.location.href = process.env.VUE_APP_JUMP + to.fullPath
   }
   // 前台处理
   if (to.matched.length === 0) {//未匹配到的时候跳转到404页面

+ 4 - 4
src/utils/request.js

@@ -5,12 +5,12 @@ import errorCode from '@/utils/errorCode'
 import { set } from 'nprogress'
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-// export const BASE_URL = process.env.VUE_APP_BASE_API
-// export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
+export const BASE_URL = process.env.VUE_APP_BASE_API
+export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 // export const BASE_URL = 'https://api.gzxfxh2022.com/'
 // export const BASE_IMG_URL = 'https://api.gzxfxh2022.com'
-export const BASE_URL = 'http://192.168.1.12:8032/'
-export const BASE_IMG_URL = 'http://192.168.1.12:8032'
+// export const BASE_URL = 'http://192.168.1.12:8032/'
+// export const BASE_IMG_URL = 'http://192.168.1.12:8032'
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: BASE_URL,

+ 8 - 3
src/views/home/index.vue

@@ -4,7 +4,7 @@
     <van-swipe class="my-swipe1" indicator-color="white" :autoplay="3000">
       <van-swipe-item v-for="(item, index) in BannerList1" :key="index"
         ><div class="swipe_box">
-          <img :src="$methods.splitImgHost(item.ImageUrl)" alt="" /></div
+          <img :src="$methods.splitImgHost(item.ImageUrl)" alt="" @click="jumpUrl(item.JumpUrl)" /></div
       ></van-swipe-item>
     </van-swipe>
     <div class="li_box">
@@ -31,7 +31,7 @@
         <van-swipe class="my-swipe2" indicator-color="white" :autoplay="3000">
           <van-swipe-item v-for="(item, index) in BannerList2" :key="index"
             ><div class="swipe_boxs">
-              <img :src="$methods.splitImgHost(item.ImageUrl)" alt="" /></div
+              <img :src="$methods.splitImgHost(item.ImageUrl)" alt="" @click="jumpUrl(item.JumpUrl)" /></div
           ></van-swipe-item>
         </van-swipe>
       </div>
@@ -174,7 +174,12 @@ export default {
         this.tableData = res.Data.List || [];
       });
     },
-
+    jumpUrl(url) {
+      if (url) {
+        window.open(url, "_blank");
+      }
+      return;
+    },
     //会员天地
     getList4() {
       this.$api

+ 7 - 4
vue.config.js

@@ -8,6 +8,9 @@ function resolve(dir) {
 // 是否为生产环境
 const isProduction = process.env.ENV !== 'development'
 module.exports = {
+    devServer: {
+        port: 8082,
+    },
     lintOnSave: false,//禁用代码检测
     productionSourceMap: false,
     configureWebpack: {
@@ -29,9 +32,9 @@ module.exports = {
     chainWebpack(config) {
         if (isProduction) {
             // 移除 prefetch 插件
-            config.plugins.delete('prefetch')
+            // config.plugins.delete('prefetch')
             // 移除 preload 插件
-            config.plugins.delete('preload');
+            // config.plugins.delete('preload');
             config.plugin('provide').use(webpack.ProvidePlugin, [{
                 'window.Quill': 'quill'
             }])
@@ -55,8 +58,8 @@ module.exports = {
                         config
                             .optimization.splitChunks({
                                 chunks: 'all',
-                                minSize: 1000000,
-                                maxSize: 3000000,
+                                minSize: 10000,
+                                maxSize: 100000,
                                 cacheGroups: {
                                     libs: {
                                         name: 'chunk-libs',