Authored by 陈轩

Merge remote-tracking branch 'origin/release/5.1' into release/5.1

... ... @@ -17,7 +17,7 @@ const shopIndex = (req, res) => {
})
};
} else {
uid = crypto.encryption('', req.query.uid + ''),
uid = crypto.encryption('', req.query.uid + '');
parameter = {
appVersion: true,
uid: uid
... ...
... ... @@ -20,7 +20,7 @@ const shopList = (uid, tabName) => {
}).then((result) => {
if (result && result.code === 200) {
_.forEach(result.data, function(data) {
let href = '//m.yohobuy.com/product/index/brand?shop_id=' + data.shopsId + '&openby: yohobuy={"action":"go.shop","params":{"shop_id":"'
let href = '//m.yohobuy.com/product/index/brand?shop_id=' + data.shopsId + '&openby:yohobuy={"action":"go.shop","params":{"shop_id":"'
+ data.shopsId + '","shop_template_type":"' + data.shopTemplateType + '","shop_name":"' + data.shopName + '"}}';
data.isFavorite = data.isFavorite === 'Y';
... ...
... ... @@ -4,12 +4,9 @@
{{> resources/banner-top}}
{{/ bannerTop}}
<div class="shop-nav nav">
</div>
<div class="shop-nav nav"></div>
<div class="shop-list">
</div>
<div class="shop-list"></div>
{{/ shopCollect}}
<input type="hidden" name="app_version" value="{{appVersion}}">
<input type="hidden" name="uid" value="{{uid}}">
... ...
... ... @@ -3,15 +3,19 @@ const path = require('path');
const changeFiles = {
js: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .js$', {silent: true}).stdout,
css: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .css$', {silent: true}).stdout
css: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .css$', {silent: true}).stdout,
vue: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .vue$', {silent: true}).stdout,
};
const lintPath = {
js: path.resolve('./node_modules/.bin/eslint'),
css: path.resolve('./node_modules/.bin/stylelint')
};
const lintResult = {
js: {},
css: {}
css: {},
vueScript: {},
vueStyle: {}
};
const ext = process.platform === 'win32' ? '.cmd' : ''; // Windows 平台需要加后缀
... ... @@ -28,9 +32,17 @@ if (changeFiles.js) {
if (changeFiles.css) {
changeFiles.css = changeFiles.css.replace(/\n/g, ' ');
lintResult.css = shelljs.exec(`${lintPath.css}${ext} --config .stylelintrc ${changeFiles.css}`);
lintResult.css = shelljs.exec(`${lintPath.css}${ext} --syntax scss --config .stylelintrc ${changeFiles.css}`);
}
if (changeFiles.vue) {
changeFiles.vue = changeFiles.vue.replace(/\n/g, ' ');
lintResult.vueScript = shelljs.exec(`${lintPath.js}${ext} -c .eslintrc --cache --fix ${changeFiles.vue}`);
lintResult.vueStyle = shelljs.exec(`${lintPath.css}${ext} --syntax scss --extract --config .stylelintrc ${changeFiles.vue}`); // eslint-disable-line
}
if (lintResult.js.code || lintResult.css.code) {
process.exit(lintResult.js.code || lintResult.css.code); // eslint-disable-line
const errorCode = lintResult.js.code || lintResult.css.code || lintResult.vueScript.code || lintResult.vueStyle.code;
if (errorCode) {
process.exit(errorCode); // eslint-disable-line
}
... ...
... ... @@ -8,7 +8,7 @@
</div>
<div class="shop-tile">
<img src="{{logoUrl}}"></img>
<img class="lazy" data-original="{{image logoUrl 110 70}}"></img>
<p>
<span class="shop-name">{{shopName}}</span><br>
<span class="giving">{{words}}</span>
... ... @@ -17,7 +17,7 @@
</div>
<div class="info-content">
<img class="content" src="{{bannerUrl}}"></img>
<img class="lazy content" data-original="{{image bannerUrl 690 175}}"></img>
</div>
</a>
</div>
... ...
... ... @@ -4,7 +4,8 @@
var $ = require('yoho-jquery'),
Swiper = require('yoho-swiper'),
tip = require('../plugin/tip');
tip = require('../plugin/tip'),
lazyLoad = require('yoho-jquery-lazyload');
var searching,
shopId,
... ... @@ -76,6 +77,8 @@ function shopListData(tabName, stoping) {
$('.shop-list').html(list);
lazyLoad($('img.lazy'));
stoping = false;
... ...