Authored by ccbikai(👎🏻🍜)

Merge branch 'master' into release/5.3.1

@@ -4,14 +4,28 @@ @@ -4,14 +4,28 @@
4 */ 4 */
5 'use strict'; 5 'use strict';
6 const wechatModel = require('../models/wechat'); 6 const wechatModel = require('../models/wechat');
  7 +const conf = {
  8 + 'community': { //此处是社区分享
  9 + appId: 'wx96121aa89f31c5ea',
  10 + secret: '7669da1a8842ed1df4c5e1b53868f3ca'
  11 + },
  12 + 'default': { //此处使用的是 女生志 的appId
  13 + appId: 'wxb52ec6a352f0b090',
  14 + secret: '9fe6bedb0b7f30986a168c7fc44f34c0'
  15 + }
  16 +};
7 17
8 exports.wechatShare = (req, res, next) => { 18 exports.wechatShare = (req, res, next) => {
9 let params = { 19 let params = {
10 - appId: req.query.appId || 'wxb52ec6a352f0b090', //此处使用的是 女生志 的appId  
11 - secret: req.query.secret || '9fe6bedb0b7f30986a168c7fc44f34c0',  
12 url: req.query.url || 'http://www.yohobuy.com/' 20 url: req.query.url || 'http://www.yohobuy.com/'
13 }; 21 };
14 22
  23 + if (req.query.confType) {
  24 + params = Object.assign(conf[req.query.confType], params);
  25 + } else {
  26 + params = Object.assign(conf.default, params);
  27 + }
  28 +
15 wechatModel.calcSignature(params).then((result) => { 29 wechatModel.calcSignature(params).then((result) => {
16 res.jsonp(result); 30 res.jsonp(result);
17 }).catch(next); 31 }).catch(next);
@@ -104,7 +104,7 @@ const postcssPlugin = (et) => { @@ -104,7 +104,7 @@ const postcssPlugin = (et) => {
104 104
105 plugins = [ 105 plugins = [
106 require('postcss-import')({ 106 require('postcss-import')({
107 - resolve (id) { 107 + resolve(id) {
108 let name = path.basename(id); 108 let name = path.basename(id);
109 109
110 if (!/^_/.test(name)) { 110 if (!/^_/.test(name)) {
@@ -272,10 +272,6 @@ gulp.task('webpack', ['assets'], (done) => { @@ -272,10 +272,6 @@ gulp.task('webpack', ['assets'], (done) => {
272 plugins: postcssPlugin(env.pro), 272 plugins: postcssPlugin(env.pro),
273 options: { 273 options: {
274 parser: scss 274 parser: scss
275 - },  
276 - autoprefixer: false,  
277 - loaders: {  
278 - css: ExtractTextPlugin.extract(['css?-url'])  
279 } 275 }
280 } 276 }
281 }); 277 });