Authored by 沈志敏

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

@@ -87,7 +87,7 @@ if (isProduction) { @@ -87,7 +87,7 @@ if (isProduction) {
87 domains: { 87 domains: {
88 api: 'http://api.yoho.yohoops.org/', 88 api: 'http://api.yoho.yohoops.org/',
89 service: 'http://service.yoho.yohoops.org/', 89 service: 'http://service.yoho.yohoops.org/',
90 - singleApi: 'http://api_single.yoho.cn/' 90 + singleApi: 'http://single.yoho.cn/'
91 }, 91 },
92 memcache: { 92 memcache: {
93 master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], 93 master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
@@ -203,18 +203,23 @@ gulp.task('webpack-dev-server', () => { @@ -203,18 +203,23 @@ gulp.task('webpack-dev-server', () => {
203 } 203 }
204 }); 204 });
205 205
206 - // webpackDashboardPlugin 206 + devConfig.output.publicPath = 'http://localhost:5004/';
  207 +
  208 + // 开发环境插件
  209 + devConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
  210 +
207 if (useDashboard) { 211 if (useDashboard) {
208 - const dashboard = new Dashboard(); 212 + const dashboard = new Dashboard(); // webpackDashboardPlugin
209 213
210 devConfig.plugins.push(new DashboardPlugin(dashboard.setData)); 214 devConfig.plugins.push(new DashboardPlugin(dashboard.setData));
211 } 215 }
212 216
213 - devConfig.entry.libs.unshift('webpack-dev-server/client?http://localhost:5004/'); 217 + devConfig.entry.libs.unshift(`webpack-dev-server/client?${devConfig.output.publicPath}`, 'webpack/hot/dev-server');
214 218
215 new WebpackDevServer(webpack(devConfig), { 219 new WebpackDevServer(webpack(devConfig), {
216 contentBase: '.', 220 contentBase: '.',
217 - publicPath: '//localhost:5004/', 221 + publicPath: devConfig.output.publicPath,
  222 + hot: true,
218 inline: true, 223 inline: true,
219 quiet: useDashboard, 224 quiet: useDashboard,
220 stats: { 225 stats: {
@@ -227,7 +232,7 @@ gulp.task('webpack-dev-server', () => { @@ -227,7 +232,7 @@ gulp.task('webpack-dev-server', () => {
227 if (err) { 232 if (err) {
228 throw new gutil.PluginError('webpack-dev-server', err); 233 throw new gutil.PluginError('webpack-dev-server', err);
229 } 234 }
230 - gutil.log('[webpack-serve]', 'http://localhost:5004/'); 235 + gutil.log('[webpack-serve]', devConfig.output.publicPath);
231 }); 236 });
232 }); 237 });
233 238
@@ -90,7 +90,8 @@ @@ -90,7 +90,8 @@
90 title: result.shopName, 90 title: result.shopName,
91 des: shareSubTitle, 91 des: shareSubTitle,
92 url: shareUrl, 92 url: shareUrl,
93 - img: result.shopLogo ? result.shopLogo.replace(/{width}/g, 120).replace(/{height}/g, 80) : '', 93 + img: result.shopLogo ? result.shopLogo.split('?')[0] +
  94 + '?imageMogr2/thumbnail/300x300/format/jpg/quality/90' : '',
94 isBlkShop: result.isBlkShop, 95 isBlkShop: result.isBlkShop,
95 domain: locationQuery.domain, 96 domain: locationQuery.domain,
96 brandName: result.brandName, 97 brandName: result.brandName,