Commit c7a61d8e authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/fix_activity' into 'master'

fix: 默认用户信息展示、活动详情ui调整

See merge request !97
parents dab40756 4a32cbb6
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
presets: ["@vue/cli-plugin-babel/preset"],
plugins: ["lodash"]
};
src/assets/images/home/biaoti@2x.png

78.9 KB | W: | H:

src/assets/images/home/biaoti@2x.png

61.7 KB | W: | H:

src/assets/images/home/biaoti@2x.png
src/assets/images/home/biaoti@2x.png
src/assets/images/home/biaoti@2x.png
src/assets/images/home/biaoti@2x.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -84,7 +84,7 @@ export default {
},
async setUserInfo({ commit }) {
const userInfo = await getUserInfo();
commit("setUserInfo", userInfo);
commit("setUserInfo", { ...{ name: "小芒果", avatar }, ...userInfo });
}
}
};
......@@ -14,12 +14,12 @@
&:before {
z-index: 1;
position: absolute;
top: 22px;
top: 16px;
left: 0;
width: 93px;
height: 33px;
height: 32px;
content: '';
background: url('../../../assets/logo-top.png') no-repeat 0 0 /contain;
background: url('../../../assets/images/home/logo-top@2x.png') no-repeat 0 0 /contain;
}
&-detail {
......@@ -45,8 +45,8 @@
}
&-title {
margin-top: 67px;
padding: 0 26px;
margin-top: 48px;
padding: 0 57px;
}
&-desc {
......@@ -65,10 +65,10 @@
}
&-prize {
margin: 20px 7px;
width: 362px;
height: 362px;
background: url('../../../assets/images/home/zhuanpan.png') no-repeat 0 0 /contain;
margin: 14px 42px;
width: 291px;
height: 291px;
background: url('../../../assets/images/home/zhuanpan@2x.png') no-repeat 0 0 /contain;
&-pointer {
transform: none;
......@@ -76,7 +76,7 @@
height: 100%;
// width: 82px;
// height: 100px;
background: url('../../../assets/images/home/zhizhen.png') no-repeat center/82px 100px;
background: url('../../../assets/images/home/zhizhen@2x.png') no-repeat center/82px 100px;
}
}
......
......@@ -39,6 +39,7 @@
class="activity-swiper-container"
:autoplay="3000"
:show-indicators="false"
:touchable="false"
vertical
>
<cr-swipe-item v-for="(item, index) in personList" :key="index">
......
......@@ -2,6 +2,7 @@ const path = require("path");
const resolve = dir => path.join(__dirname, dir);
const SentryPlugin = require("webpack-sentry-plugin");
const CompressionPlugin = require("compression-webpack-plugin");
const lodashWebpackPlugin = require("lodash-webpack-plugin");
const SentryConfig = require("./.sentryclirc");
const IS_PROD = process.env.NODE_ENV === "production";
......@@ -20,6 +21,14 @@ module.exports = {
// 移除 preload 插件(针对生产环境首屏请求数进行优化) preload 插件的用途:https://cli.vuejs.org/zh/guide/html-and-static-assets.html#preload
config.plugins.delete("preload");
config.plugin("lodashReplace").use(new lodashWebpackPlugin());
config.module
.rule("images")
.use("url-loader")
.loader("url-loader")
.tap(options => Object.assign(options, { limit: 10000 }));
// 添加别名
config.resolve.alias.set("@", resolve("src"));
// svg-sprite
......@@ -56,28 +65,56 @@ module.exports = {
config.optimization.splitChunks({
chunks: "all",
cacheGroups: {
cherryUI: {
name: "chunk-cherryUI", // split cherryUI 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[\\/]@qg[\\/]_?cherry-ui(.*)/, // in order to adapt to cnpm
chunks: "initial",
reuseExistingChunk: true,
enforce: true
},
saSdk: {
name: "chunk-sa-sdk", // split cherryUI into a single package
priority: 19, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]sa-sdk-javascript[\\/]/, // in order to adapt to cnpm
chunks: "initial",
reuseExistingChunk: true,
enforce: true
},
libs: {
name: "chunk-libs",
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: "initial" // only package third parties that are initially dependent
chunks: "initial",
reuseExistingChunk: true,
enforce: true
},
cherryUI: {
name: "chunk-cherryUI", // split cherryUI 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[\\/]@qg[\\/]_?cherry-ui(.*)/ // in order to adapt to cnpm
api: {
name: "chunk-api",
priority: 9,
chunks: "all",
minChunks: 3,
test: resolve("src/api"),
reuseExistingChunk: true,
enforce: true
},
svg: {
name: "chunk-svg",
priority: 8,
chunks: "initial",
test: resolve("src/assets/icons/svg"),
reuseExistingChunk: true,
enforce: true
},
// svg: {
// name: "chunk-svg",
// priority: 15,
// test: resolve("src/assets/icons/svg")
// },
commons: {
name: "chunk-commons",
test: resolve("src/components"), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
test: resolve("src"), // can customize your rules
chunks: "all",
minChunks: 3,
maxInitialRequests: 5,
minSize: 0,
reuseExistingChunk: true,
enforce: true
}
}
});
......@@ -96,6 +133,8 @@ module.exports = {
minRatio: 0.8
})
);
//生产环境取消 console.log
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true;
}
},
lintOnSave: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment