Authored by zhangxiaoru

merge

@@ -16,10 +16,10 @@ module.exports = { @@ -16,10 +16,10 @@ module.exports = {
16 siteUrl: '//m.yohobuy.com', 16 siteUrl: '//m.yohobuy.com',
17 assetUrl: '//localhost:5001', 17 assetUrl: '//localhost:5001',
18 domains: { 18 domains: {
19 - api: 'http://api.yoho.yohoops.org/',  
20 - service: 'http://service.yoho.yohoops.org/',  
21 - liveApi: 'http://api.live.yoho.cn/',  
22 - singleApi: 'http://single.yoho.cn/' 19 + api: 'http://api-test3.yohops.com:9999/',
  20 + service: 'http://service-test3.yohops.com:9999/',
  21 + liveApi: 'http://testapi.live.yohops.com:9999/',
  22 + singleApi: 'http://api-test3.yohops.com:9999/'
23 23
24 // api: 'http://api.yoho.cn/', 24 // api: 'http://api.yoho.cn/',
25 // service: 'http://service.yoho.cn/', 25 // service: 'http://service.yoho.cn/',
@@ -3,15 +3,19 @@ const path = require('path'); @@ -3,15 +3,19 @@ const path = require('path');
3 3
4 const changeFiles = { 4 const changeFiles = {
5 js: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .js$', {silent: true}).stdout, 5 js: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .js$', {silent: true}).stdout,
6 - css: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .css$', {silent: true}).stdout 6 + css: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .css$', {silent: true}).stdout,
  7 + vue: shelljs.exec('git diff --cached --name-only --diff-filter=ACM | grep .vue$', {silent: true}).stdout,
7 }; 8 };
  9 +
8 const lintPath = { 10 const lintPath = {
9 js: path.resolve('./node_modules/.bin/eslint'), 11 js: path.resolve('./node_modules/.bin/eslint'),
10 css: path.resolve('./node_modules/.bin/stylelint') 12 css: path.resolve('./node_modules/.bin/stylelint')
11 }; 13 };
12 const lintResult = { 14 const lintResult = {
13 js: {}, 15 js: {},
14 - css: {} 16 + css: {},
  17 + vueScript: {},
  18 + vueStyle: {}
15 }; 19 };
16 20
17 const ext = process.platform === 'win32' ? '.cmd' : ''; // Windows 平台需要加后缀 21 const ext = process.platform === 'win32' ? '.cmd' : ''; // Windows 平台需要加后缀
@@ -28,9 +32,17 @@ if (changeFiles.js) { @@ -28,9 +32,17 @@ if (changeFiles.js) {
28 32
29 if (changeFiles.css) { 33 if (changeFiles.css) {
30 changeFiles.css = changeFiles.css.replace(/\n/g, ' '); 34 changeFiles.css = changeFiles.css.replace(/\n/g, ' ');
31 - lintResult.css = shelljs.exec(`${lintPath.css}${ext} --config .stylelintrc ${changeFiles.css}`); 35 + lintResult.css = shelljs.exec(`${lintPath.css}${ext} --syntax scss --config .stylelintrc ${changeFiles.css}`);
  36 +}
  37 +
  38 +if (changeFiles.vue) {
  39 + changeFiles.vue = changeFiles.vue.replace(/\n/g, ' ');
  40 + lintResult.vueScript = shelljs.exec(`${lintPath.js}${ext} -c .eslintrc --cache --fix ${changeFiles.vue}`);
  41 + lintResult.vueStyle = shelljs.exec(`${lintPath.css}${ext} --syntax scss --extract --config .stylelintrc ${changeFiles.vue}`); // eslint-disable-line
32 } 42 }
33 43
34 -if (lintResult.js.code || lintResult.css.code) {  
35 - process.exit(lintResult.js.code || lintResult.css.code); // eslint-disable-line 44 +const errorCode = lintResult.js.code || lintResult.css.code || lintResult.vueScript.code || lintResult.vueStyle.code;
  45 +
  46 +if (errorCode) {
  47 + process.exit(errorCode); // eslint-disable-line
36 } 48 }
@@ -389,6 +389,10 @@ $(function() { @@ -389,6 +389,10 @@ $(function() {
389 } 389 }
390 }); 390 });
391 391
  392 +$(document).on('input', '#tb_name, #tb_cert_no', function() {
  393 + changeSuccess();
  394 +});
  395 +
392 // data-aslider-in="education|fade" 396 // data-aslider-in="education|fade"
393 $(document).on('click', '#s-education .s-item', function() { 397 $(document).on('click', '#s-education .s-item', function() {
394 $('#s-education-tb').val($.trim($(this).html())); 398 $('#s-education-tb').val($.trim($(this).html()));
@@ -212,12 +212,10 @@ seckillObj = { @@ -212,12 +212,10 @@ seckillObj = {
212 var focusElem = $el.$navUl.find('>li.focus'); 212 var focusElem = $el.$navUl.find('>li.focus');
213 213
214 if (focusElem.length) { 214 if (focusElem.length) {
215 - history.go(0);  
216 -  
217 - // that.refreshProductList(  
218 - // focusElem.find('input.activityId').val(),  
219 - // focusElem.find('input.date').val()  
220 - // ); 215 + that.refreshProductList(
  216 + focusElem.find('input.activityId').val(),
  217 + focusElem.find('input.date').val()
  218 + );
221 } 219 }
222 }, 220 },
223 221