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

Merge branch 'feature/fix_activity' into 'master'

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

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