Commit 02213f41 by 万亚飞

fix bug

parent a4387fd9
......@@ -7,11 +7,10 @@ function resolveRoot(dir) {
module.exports = {
entry: {
vendor: ['babel-polyfill', 'react'],
vendor: ['babel-polyfill'],
app: resolveRoot('src/index.js')
},
output: {
filename: 'js/[name].[contenthash:8].js',
path: resolveRoot('dist')
},
plugins: [new webpack.NamedModulesPlugin()],
......
......@@ -11,12 +11,13 @@ function resolveRoot(dir) {
return path.join(__dirname, '..', dir);
}
module.exports = merge(base, {
devtool: 'cheap-module-eval-source-map',
// entry: {
// vendor: ['react', 'better-scroll', 'react-redux', 'react-lazyload']
// },
output: {
publicPath: '/'
// filename: 'js/[name].[hash:8].js',
publicPath: '/',
filename: 'js/[name].[hash:8].js'
},
module: {
rules: [
......@@ -112,11 +113,11 @@ module.exports = merge(base, {
],
mode: 'development',
devServer: {
contentBase: '../build',
contentBase: '/',
host: '0.0.0.0',
historyApiFallback: true,
open: true,
port: 5000,
port: 5002,
hot: true
}
});
......@@ -19,9 +19,10 @@ function resolveRoot(dir) {
return path.join(__dirname, '..', dir);
}
module.exports = merge(base, {
devtool: 'source-map',
output: {
publicPath: '/new/'
// filename: 'js/[name].[contenthash:8].js'
publicPath: '/new/',
filename: 'js/[name].[contenthash:8].js'
},
module: {
rules: [
......
//开发环境
module.exports = {
NODE_ENV: '"development"',
ENV_MARK: 'development',
ENV_MARK: '"development"',
prefix: '"https://testapi.ydl.com/api"',
prefixH2: '"https//testh2.yidianling.com"'
};
......@@ -77,7 +77,7 @@
},
"betterScripts": {
"build:dev": {
"command": "webpack --config ./build/webpack.dev.js",
"command": "webpack-dev-server --config ./build/webpack.dev.js",
"env": {
"ENV_MARK": "development"
}
......
......@@ -31,9 +31,10 @@ class TrainItem extends Component {
<div className="item-operate box-c">
<span
onClick={() => {
if (data.id == '-1') return;
this.props.delToggle({ id: data.id, delType: iType, modifyId: data.modifyId });
}}
className="o-btn"
className={classNames('o-btn', { disabled: data.id == '-1' })}
>
删除
</span>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
import Mock from 'mockjs'
import homeData from './homeData.json'
import categoryData from './category.json'
Mock.mock('/slides', { code: 0, data: homeData.slides }) //swiper的图片
Mock.mock('/policyDescList', { code: 0, data: homeData.policyDescList }) // //siwper下面三个标签的内容
Mock.mock('/kingKongModule', { code: 0, data: homeData.kingKongModule.kingKongList }) //请求siwper下面十个图片和描述
Mock.mock('/indexActivityModule', { code: 0, data: homeData.indexActivityModule }) //请求新人专享礼下面的图片
Mock.mock('/tagList', { code: 0, data: homeData.tagList }) //请求品牌制造商直供内容
Mock.mock('/categoryList', { code: 0, data: homeData.categoryHotSellModule.categoryList }) //请求类目热销榜
Mock.mock('/popularitemList', { code: 0, data: homeData.popularItemList }) //请求人气推荐的内容
Mock.mock('/flashSaleModule', { code: 0, data: homeData.flashSaleModule.itemList }) //请求限时购模块内容
Mock.mock('/newItemList', { code: 0, data: homeData.newItemList }) //请求新品首发模块内容
Mock.mock('/categoryModule', { code: 0, data: homeData.categoryModule }) //categoryModule模块的内容
Mock.mock('/categoryL1List', { code: 0, data: categoryData.categoryL1List }) //请求分类页面的全部内容
\ No newline at end of file
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