diff --git a/src/components/FirstJob/detail.vue b/src/components/FirstJob/detail.vue index bfb8965..a542679 100644 --- a/src/components/FirstJob/detail.vue +++ b/src/components/FirstJob/detail.vue @@ -1,6 +1,6 @@ diff --git a/src/components/FirstJob/joblist.vue b/src/components/FirstJob/joblist.vue index 947b0dd..711263d 100644 --- a/src/components/FirstJob/joblist.vue +++ b/src/components/FirstJob/joblist.vue @@ -1,15 +1,15 @@ diff --git a/src/components/main/index.vue b/src/components/main/index.vue index b559134..65c1d4b 100644 --- a/src/components/main/index.vue +++ b/src/components/main/index.vue @@ -89,7 +89,10 @@

覆盖华东、华南、华中、华北、西南、西北6大区域

- +
@@ -388,7 +391,8 @@ export default { padding-top: 100px; // padding-bottom: 96px; height: 740px; - background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/cooperativeBrandBg.png") no-repeat 100%; + background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/cooperativeBrandBg.png") + no-repeat 100%; .content { ul { li { @@ -444,7 +448,8 @@ export default { justify-content: center; padding: unset; height: 445px; - background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/relationUsBg.png") no-repeat 100% 100%; + background: url("http://matripe.oss-cn-beijing.aliyuncs.com/yishoudan/relationUsBg.png") + no-repeat 100% 100%; // padding-bottom: 126px; .content { diff --git a/src/components/memberInfo/memberInfo.vue b/src/components/memberInfo/memberInfo.vue index 22c185f..3bc0a13 100644 --- a/src/components/memberInfo/memberInfo.vue +++ b/src/components/memberInfo/memberInfo.vue @@ -1,6 +1,6 @@ diff --git a/src/router/index.js b/src/router/index.js index bdc26c9..2b34964 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -102,7 +102,6 @@ const routes = [ component: () => import("../components/userinfo/usercenter/components/mybill.vue"), // component: resolve => require(['../components/userinfo/usercenter/components/mybill.vue'],resolve) - }, { path: "memberInfo", diff --git a/src/utils/commonUtil.js b/src/utils/commonUtil.js index 0675442..f4cebde 100644 --- a/src/utils/commonUtil.js +++ b/src/utils/commonUtil.js @@ -1690,75 +1690,121 @@ export function getAgeFromBirthday(bir) { return infoObj; //返回周岁年龄 } - /** * 代理成员角色类型 */ - export function agencyRoleTypeArray() { +export function agencyRoleTypeArray() { let workTypeArray = [ - { id: 1, name: '创建人', value: "1", text: "创建人", checked: false }, - { id: 2, name: '管理员', value: "2", text: "管理员", checked: false }, - { id: 3, name: '成员', value: "3", text: "成员", checked: false }, + { id: 1, name: "创建人", value: "1", text: "创建人", checked: false }, + { id: 2, name: "管理员", value: "2", text: "管理员", checked: false }, + { id: 3, name: "成员", value: "3", text: "成员", checked: false }, ]; return workTypeArray; } /** -* 根据代理成员角色ID获取名称 -*/ + * 根据代理成员角色ID获取名称 + */ export function getAgencyRoleTypeById(id) { let str = ""; let array = agencyRoleTypeArray(); - array.forEach(item => { - if (item.id == id) { - str = item.name; - } + array.forEach((item) => { + if (item.id == id) { + str = item.name; + } }); return str; } /** -* 代理成员权限 -*/ + * 代理成员权限 + */ export function agencyPermissionArray() { //查看职位、报名、查看报名、查看老乡、修改密码、修改手机号、新增成员、修改成员信息、删除成员 let workTypeArray = [ - { id: 1, name: '查看职位', value: "job:list", text: "查看职位", checked: false }, - { id: 2, name: '报名', value: "apply:add", text: "报名", checked: false }, - { id: 3, name: '查看报名', value: "apply:list", text: "查看报名", checked: false }, - { id: 4, name: '查看老乡', value: "apply:user", text: "查看老乡", checked: false }, - { id: 5, name: '修改密码', value: "user:pwd", text: "修改密码", checked: false }, - { id: 6, name: '修改手机号', value: "user:tel", text: "修改手机号", checked: false }, - { id: 7, name: '新增成员', value: "user:add", text: "新增成员", checked: false }, - { id: 8, name: '修改成员信息', value: "user:update", text: "修改成员信息", checked: false }, - { id: 9, name: '删除成员', value: "user:del", text: "删除成员", checked: false }, + { + id: 1, + name: "查看职位", + value: "job:list", + text: "查看职位", + checked: false, + }, + { id: 2, name: "报名", value: "apply:add", text: "报名", checked: false }, + { + id: 3, + name: "查看报名", + value: "apply:list", + text: "查看报名", + checked: false, + }, + { + id: 4, + name: "查看老乡", + value: "apply:user", + text: "查看老乡", + checked: false, + }, + { + id: 5, + name: "修改密码", + value: "user:pwd", + text: "修改密码", + checked: false, + }, + { + id: 6, + name: "修改手机号", + value: "user:tel", + text: "修改手机号", + checked: false, + }, + { + id: 7, + name: "新增成员", + value: "user:add", + text: "新增成员", + checked: false, + }, + { + id: 8, + name: "修改成员信息", + value: "user:update", + text: "修改成员信息", + checked: false, + }, + { + id: 9, + name: "删除成员", + value: "user:del", + text: "删除成员", + checked: false, + }, ]; return workTypeArray; } /** -* 根据代理权限ID获取名称 -*/ + * 根据代理权限ID获取名称 + */ export function getAgencyPermissionNameById(permissionStr) { let str = ""; let array = agencyPermissionArray(); let names = []; let permissions = permissionStr.split(","); - array.forEach(item => { - if (permissions.indexOf(item.value) >= 0) { - names.push(item.name); - } + array.forEach((item) => { + if (permissions.indexOf(item.value) >= 0) { + names.push(item.name); + } }); return names.join(","); } /** -* 根据代理角色获取权限 -*/ + * 根据代理角色获取权限 + */ export function getAgencyPermissionsByRole(role) { - if(role == 1) { - return "job:list,apply:add,apply:list,apply:user,user:pwd,user:tel,user:add,user:update,user:del"; + if (role == 1) { + return "job:list,apply:add,apply:list,apply:user,user:pwd,user:tel,user:add,user:update,user:del"; } else { - return "job:list,apply:add,apply:list,apply:user,user:pwd,user:tel"; + return "job:list,apply:add,apply:list,apply:user,user:pwd,user:tel"; } } - diff --git a/vue.config.js b/vue.config.js index b7f0c23..c7d77c2 100644 --- a/vue.config.js +++ b/vue.config.js @@ -5,7 +5,7 @@ const defaultSettings = require("./src/settings.js"); // const CompressionPlugin = require("compression-webpack-plugin"); // const zlib = require("zlib"); function resolve(dir) { - return path.join(__dirname, dir); + return path.join(__dirname, dir); } const name = defaultSettings.title || "vue Admin Template"; // page title @@ -19,201 +19,203 @@ const port = 8888 || process.env.port || process.env.npm_config_port; // dev por // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = { - /** - * You will need to set publicPath if you plan to deploy your site under a sub path, - * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/, - * then publicPath should be set to "/bar/". - * In most cases please use '/' !!! - * Detail: https://cli.vuejs.org/config/#publicpath - */ + /** + * You will need to set publicPath if you plan to deploy your site under a sub path, + * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/, + * then publicPath should be set to "/bar/". + * In most cases please use '/' !!! + * Detail: https://cli.vuejs.org/config/#publicpath + */ - publicPath: "./", - outputDir: "dist", - assetsDir: "static", - lintOnSave: process.env.NODE_ENV === "development", - // lintOnSave: false, - productionSourceMap: false, - devServer: { - // 配置反向代理 - port: port, - open: true, - overlay: { - warnings: false, - errors: true, - }, - proxy: { - // 地址中有 /api 的时候会触发代理 - "/api_prod": { - // target: "http://localhost:8001/", - target: "http://bl7.matripe.com.cn:8001", - // target: "http://1shoudan.renminshitang.com.cn", - // target: "https://d.matripe.com.cn", - ws: true, // proxy websockets - changeOrigin: true, // 确定是否跨域 - pathRewrite: { - "^/api_prod": "", - }, - }, - // '/api_prod': { - // target: 'http://a.matripe.com.cn', - // ws: true, // proxy websockets - // changeOrigin: true, // needed for virtual hosted sites - // pathRewrite: { - // '^/api_prod': '' // rewrite path - // } - // }, - // '/api_dev': { - // target: 'http://nb.renminshitang.com.cn:8001', - // ws: true, // proxy websockets - // changeOrigin: true, // needed for virtual hosted sites - // pathRewrite: { - // '^/api_dev': '/' // rewrite path - // } - // } - // ,'/api_test': { - // target: 'http://localhost:8003', - // ws: true, // proxy websockets - // changeOrigin: true, // needed for virtual hosted sites - // pathRewrite: { - // '^/api_test': '' // rewrite path - // } - // } - }, - // before: require('./mock/mock-server.js') - }, - chainWebpack: (config) => { - config.plugins.delete("fork-ts-checker"), // 禁用fork-ts-checker - config.plugins.delete("prefetch"); - }, + publicPath: "./", + outputDir: "dist", + assetsDir: "static", + lintOnSave: process.env.NODE_ENV === "development", + // lintOnSave: false, + productionSourceMap: false, + devServer: { + // 配置反向代理 + port: port, + open: true, + overlay: { + warnings: false, + errors: true, + }, + proxy: { + // 地址中有 /api 的时候会触发代理 + "/api_prod": { + // target: "http://localhost:8001/", + target: "http://bl7.matripe.com.cn:8001", + // target: "http://1shoudan.renminshitang.com.cn", + // target: "https://d.matripe.com.cn", + ws: true, // proxy websockets + changeOrigin: true, // 确定是否跨域 + pathRewrite: { + "^/api_prod": "", + }, + }, + // '/api_prod': { + // target: 'http://a.matripe.com.cn', + // ws: true, // proxy websockets + // changeOrigin: true, // needed for virtual hosted sites + // pathRewrite: { + // '^/api_prod': '' // rewrite path + // } + // }, + // '/api_dev': { + // target: 'http://nb.renminshitang.com.cn:8001', + // ws: true, // proxy websockets + // changeOrigin: true, // needed for virtual hosted sites + // pathRewrite: { + // '^/api_dev': '/' // rewrite path + // } + // } + // ,'/api_test': { + // target: 'http://localhost:8003', + // ws: true, // proxy websockets + // changeOrigin: true, // needed for virtual hosted sites + // pathRewrite: { + // '^/api_test': '' // rewrite path + // } + // } + }, + // before: require('./mock/mock-server.js') + }, + chainWebpack: (config) => { + config.plugins.delete("fork-ts-checker"), // 禁用fork-ts-checker + config.plugins.delete("prefetch"); + }, - configureWebpack: { - // provide the app's title in webpack's name field, so that - // it can be accessed in index.html to inject the correct title. - name: name, + configureWebpack: { + // provide the app's title in webpack's name field, so that + // it can be accessed in index.html to inject the correct title. + name: name, - resolve: { - alias: { - "@": resolve("src"), - '@ant-design/icons/lib/dist.$': resolve('src/icons.js') - }, - }, - // plugins: [ - // new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), - // // 下面两项配置才是 compression-webpack-plugin 压缩配置 - // // 压缩成 .gz 文件 - // new CompressionPlugin({ - // filename: '[path][base].gz', - // algorithm: 'gzip', - // test: /\.js$|\.css$|\.html$/, - // threshold: 10240, - // minRatio: 0.8 - // }), - // // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 - // new CompressionPlugin({ - // filename: '[path][base].br', - // algorithm: 'brotliCompress', - // test: /\.(js|css|html|svg)$/, - // compressionOptions: { - // params: { - // [zlib.constants.BROTLI_PARAM_QUALITY]: 11 - // } - // }, - // threshold: 10240, - // minRatio: 0.8 - // }) - // ], - // }, - optimization: { - runtimeChunk: "single", - splitChunks: { - chunks: "all", - maxInitialRequests: Infinity, - minSize: 20000, - cacheGroups: { - vendor: { - test: /[\\/]node_modules[\\/]/, - name(module) { - // get the name. E.g. node_modules/packageName/not/this/part.js - // or node_modules/packageName - const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1]; - // npm package names are URL-safe, but some servers don't like @ symbols - return `npm.${packageName.replace("@", "")}`; - }, - }, - }, - }, - }, - // chainWebpack (config) { - // // it can improve the speed of the first screen, it is recommended to turn on preload - // config.plugin('preload').tap(() => [ - // { - // rel: 'preload', - // // to ignore runtime.js - // // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 - // fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], - // include: 'initial' - // } - // ]) + resolve: { + alias: { + "@": resolve("src"), + "@ant-design/icons/lib/dist.$": resolve("src/icons.js"), + }, + }, + // plugins: [ + // new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + // // 下面两项配置才是 compression-webpack-plugin 压缩配置 + // // 压缩成 .gz 文件 + // new CompressionPlugin({ + // filename: '[path][base].gz', + // algorithm: 'gzip', + // test: /\.js$|\.css$|\.html$/, + // threshold: 10240, + // minRatio: 0.8 + // }), + // // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 + // new CompressionPlugin({ + // filename: '[path][base].br', + // algorithm: 'brotliCompress', + // test: /\.(js|css|html|svg)$/, + // compressionOptions: { + // params: { + // [zlib.constants.BROTLI_PARAM_QUALITY]: 11 + // } + // }, + // threshold: 10240, + // minRatio: 0.8 + // }) + // ], + // }, + optimization: { + runtimeChunk: "single", + splitChunks: { + chunks: "all", + maxInitialRequests: Infinity, + minSize: 20000, + cacheGroups: { + vendor: { + test: /[\\/]node_modules[\\/]/, + name(module) { + // get the name. E.g. node_modules/packageName/not/this/part.js + // or node_modules/packageName + const packageName = module.context.match( + /[\\/]node_modules[\\/](.*?)([\\/]|$)/ + )[1]; + // npm package names are URL-safe, but some servers don't like @ symbols + return `npm.${packageName.replace("@", "")}`; + }, + }, + }, + }, + }, + // chainWebpack (config) { + // // it can improve the speed of the first screen, it is recommended to turn on preload + // config.plugin('preload').tap(() => [ + // { + // rel: 'preload', + // // to ignore runtime.js + // // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 + // fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], + // include: 'initial' + // } + // ]) - // // when there are many pages, it will cause too many meaningless requests - // config.plugins.delete('prefetch') + // // when there are many pages, it will cause too many meaningless requests + // config.plugins.delete('prefetch') - // // set svg-sprite-loader - // config.module - // .rule('svg') - // .exclude.add(resolve('src/icons')) - // .end() - // config.module - // .rule('icons') - // .test(/\.svg$/) - // .include.add(resolve('src/icons')) - // .end() - // .use('svg-sprite-loader') - // .loader('svg-sprite-loader') - // .options({ - // symbolId: 'icon-[name]' - // }) - // .end() + // // set svg-sprite-loader + // config.module + // .rule('svg') + // .exclude.add(resolve('src/icons')) + // .end() + // config.module + // .rule('icons') + // .test(/\.svg$/) + // .include.add(resolve('src/icons')) + // .end() + // .use('svg-sprite-loader') + // .loader('svg-sprite-loader') + // .options({ + // symbolId: 'icon-[name]' + // }) + // .end() - // config - // .when(process.env.NODE_ENV !== 'development', - // config => { - // config - // .plugin('ScriptExtHtmlWebpackPlugin') - // .after('html') - // .use('script-ext-html-webpack-plugin', [{ - // // `runtime` must same as runtimeChunk name. default is `runtime` - // inline: /runtime\..*\.js$/ - // }]) - // .end() - // config - // .optimization.splitChunks({ - // chunks: 'all', - // cacheGroups: { - // libs: { - // name: 'chunk-libs', - // test: /[\\/]node_modules[\\/]/, - // priority: 10, - // chunks: 'initial' // only package third parties that are initially dependent - // }, - // elementUI: { - // name: 'chunk-elementUI', // split elementUI into a single package - // priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - // test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - // }, - // commons: { - // name: 'chunk-commons', - // test: resolve('src/components'), // can customize your rules - // minChunks: 3, // minimum common number - // priority: 5, - // reuseExistingChunk: true - // } - // } - // }) - // // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk - // config.optimization.runtimeChunk('single') - // } - // ) - // } - }, + // config + // .when(process.env.NODE_ENV !== 'development', + // config => { + // config + // .plugin('ScriptExtHtmlWebpackPlugin') + // .after('html') + // .use('script-ext-html-webpack-plugin', [{ + // // `runtime` must same as runtimeChunk name. default is `runtime` + // inline: /runtime\..*\.js$/ + // }]) + // .end() + // config + // .optimization.splitChunks({ + // chunks: 'all', + // cacheGroups: { + // libs: { + // name: 'chunk-libs', + // test: /[\\/]node_modules[\\/]/, + // priority: 10, + // chunks: 'initial' // only package third parties that are initially dependent + // }, + // elementUI: { + // name: 'chunk-elementUI', // split elementUI into a single package + // priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + // test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm + // }, + // commons: { + // name: 'chunk-commons', + // test: resolve('src/components'), // can customize your rules + // minChunks: 3, // minimum common number + // priority: 5, + // reuseExistingChunk: true + // } + // } + // }) + // // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk + // config.optimization.runtimeChunk('single') + // } + // ) + // } + }, };