Authored by Aiden Xu

Merge remote-tracking branch 'origin/develop' into develop

Showing 84 changed files with 415 additions and 340 deletions
... ... @@ -12,8 +12,11 @@ const logger = global.yoho.logger;
const cache = global.yoho.cache;
// 此处请勿使用有货公众号的 appId, 此处使用的是 女生志 的appId
const appId = 'wxb52ec6a352f0b090';
const secret = '9fe6bedb0b7f30986a168c7fc44f34c0';
// const appId = 'wxb52ec6a352f0b090';
// const secret = '9fe6bedb0b7f30986a168c7fc44f34c0';
const appId = 'wx7b3dd56c9e9dd409';
const secret = '5d1b51755bbb4f24b9d2dc34d97acdff';
const sha1 = (str) => {
const generator = crypto.createHash('sha1');
... ...
... ... @@ -16,7 +16,7 @@ const exchange = {
// 订单 可换货商品列表
order(req, res, next) {
const uid = 8041886;
const uid = req.user.uid; // const udi = 8039837 //test account
const orderId = req.query.orderId;
if (!orderId) {
... ... @@ -43,7 +43,8 @@ const exchange = {
// 提交 换货
submit(req, res, next) {
const uid = req.user.uid || 8050882;
// const uid = req.user.uid || 8050882;
const uid = 8039837;
exchangeModel.submitExchange(uid, req.body).then(result => {
res.json(result);
... ...
... ... @@ -7,7 +7,6 @@
const orderModel = require('../models/order');
const notLoginCode = 400;
const notLoginTip = '抱歉,您暂未登录!';
const testUid = 8041886;// 8039836; //8050882;// 测试uid
const isBLK = 1;
const order = {
... ... @@ -24,8 +23,6 @@ const order = {
let orderCode = req.query.orderCode;
let uid = req.user.uid;
uid = testUid; // 测试uid
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ... @@ -40,12 +37,11 @@ const order = {
});
},
getOrderData: (req, res) => {
let uid = req.query.id;
let uid = req.user.uid;
let page = req.query.page;
let type = req.query.type;
let limit = req.query.limit;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ... @@ -68,8 +64,6 @@ const order = {
let orderCode = req.query.orderCode;
let uid = req.user.uid;
uid = testUid; // 测试uid
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ... @@ -102,8 +96,6 @@ const order = {
let orderCode = req.body.orderCode;
let uid = req.user.uid;
uid = testUid; // 测试uid
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ... @@ -118,8 +110,6 @@ const order = {
coin: (req, res, next) => {
let uid = req.user.id;
uid = testUid;
orderModel.getCoins(uid).then(result => {
res.render('coin', {
module: 'home',
... ... @@ -140,7 +130,6 @@ const order = {
let page = req.query.page;
let limit = req.query.limit;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ...
<div class="my-page">
<div class="my-header">
<span class="setting icon icon-setting" id="setting"></span>
<a class="user-info no-intercept" id="user-info" href='/home/mydetails'>
<a class="user-info" id="user-info" href='/home/mydetails'>
<span class="user-avatar" {{#if head_ico}} style="background-image: url('{{head_ico}}');" {{/if}}></span>
<br><span class="username">{{nickname}}</span>
</a>
</div>
<div class="my-order">
<a class="order-title no-intercept" href="/home/orders?type=1">
<a class="order-title" href="/home/orders?type=1">
我的订单
<span class="read-order">
查看全部订单 <span class="icon icon-right"></span>
</span>
</a>
<div class="order-type clearfix">
<a class="type-item no-intercept" href="/home/orders?type=2">
<a class="type-item" href="/home/orders?type=2">
<span class="icon icon-wait-pay"></span>
<br>待付款
{{#if wait_pay_num}}
<span class="num">{{wait_pay_num}}</span>
{{/if}}
</a>
<a class="type-item no-intercept" href="/home/orders?type=3">
<a class="type-item" href="/home/orders?type=3">
<span class="icon icon-wait-cargo"></span>
<br>待发货
{{#if wait_cargo_num}}
<span class="num">{{wait_cargo_num}}</span>
{{/if}}
</a>
<a class="type-item no-intercept" href="/home/orders?type=4">
<a class="type-item" href="/home/orders?type=4">
<span class="icon icon-send-cargo"></span>
<br>待收货
{{#if send_cargo_num}}
<span class="num">{{send_cargo_num}}</span>
{{/if}}
</a>
<a class="type-item no-intercept" href="/home/refund/orders">
<a class="type-item" href="/home/refund/orders">
<span class="icon icon-refund-exchange"></span>
<br>退换货
{{#if refund_exchange_num}}
... ... @@ -45,33 +45,33 @@
</div>
</div>
<div class="group-list">
<a class="list-item no-intercept" id="address">
<a class="list-item" id="address">
地址管理
<span class="num">{{address_num}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item no-intercept" href="/home/favorite">
<a class="list-item" href="/home/favorite">
收藏的商品
<span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span>
</a>
<a class="list-item no-intercept" href="/home/favorite?tab=brand">
<a class="list-item" href="/home/favorite?tab=brand">
收藏的品牌
<span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item no-intercept" href="/home/mycurrency">
<a class="list-item" href="/home/mycurrency">
YOHO 币
<span class="num">{{yoho_coin_num}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item no-intercept" href="/home/help">
<a class="list-item" href="/home/help">
帮助中心
<span class="num"><span class="icon icon-right"></span></span>
</a>
<a class="list-item no-intercept" href="/home/service">
<a class="list-item" href="/home/service">
在线客服
<span class="num"><span class="icon icon-right"></span></span>
</a>
... ...
... ... @@ -20,20 +20,15 @@ module.exports = {
domains: {
// api: 'http://192.168.102.202:8080/gateway/',
// service: 'http://192.168.102.202:8080/gateway/',
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/'
// api: 'http://testapi.yoho.cn:28078/',
// service: 'http://testservice.yoho.cn:28077/'
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
api: 'http://devapi.yoho.cn:58078/',
service: 'http://devservice.yoho.cn:58077/'
},
subDomains: {
host: '.m.yohoblk.com',
default: '//m.yohoblk.com',
guang: '//guang.m.yohoblk.com',
list: '//list.m.yohoblk.com',
search: '//search.m.yohoblk.com',
huodong: '//huodong.m.yohoblk.com',
activity: '//activity.yohoblk.com',
index: '//m.yohoblk.com'
},
useOneapm: false,
... ... @@ -87,7 +82,7 @@ if (isProduction) {
master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112', 'memcache3.yohoops.org:12112'],
session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
timeout: 1000,
timeout: 100,
retries: 0
},
useOneapm: true,
... ... @@ -97,14 +92,17 @@ if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohoblk.com for test',
domains: {
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/'
api: 'http://devapi.yoho.cn:58078/',
service: 'http://devservice.yoho.cn:58077/'
// api: 'http://testapi.yoho.cn:28078/',
// service: 'http://testservice.yoho.cn:28077/'
},
memcache: {
master: ['127.0.0.1:12111'],
slave: ['127.0.0.1:12112'],
session: ['127.0.0.1:12111'],
timeout: 1000,
timeout: 100,
retries: 0
},
useOneapm: true,
... ...
... ... @@ -28,7 +28,7 @@
"express-handlebars": "^3.0.0",
"express-session": "^1.14.0",
"influxdb-winston": "^1.0.1",
"lodash": "^4.13.1",
"lodash": "^4.14.1",
"memcached": "^2.2.1",
"moment": "^2.14.1",
"morgan": "^1.7.0",
... ... @@ -37,17 +37,20 @@
"serve-favicon": "^2.3.0",
"uuid": "^2.0.2",
"vue-loader": "^8.5.3",
"vue-touch": "^1.1.0",
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.1.4",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "0.0.30"
"yoho-node-lib": "0.0.31"
},
"devDependencies": {
"autoprefixer": "^6.3.7",
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-plugin-transform-runtime": "^6.12.0",
"babel-preset-es2015": "^6.9.0",
"eslint": "^3.1.1",
"babel-runtime": "^6.11.6",
"eslint": "^3.2.0",
"eslint-config-yoho": "^1.0.1",
"eslint-plugin-html": "^1.5.1",
"extract-text-webpack-plugin": "^1.0.1",
... ... @@ -59,6 +62,7 @@
"gulp-util": "^3.0.7",
"handlebars-loader": "^1.3.0",
"husky": "^0.11.6",
"jquery": "2.2.4",
"nodemon": "^1.10.0",
"postcss-assets": "^4.0.1",
"postcss-cachebuster": "^0.1.3",
... ... @@ -72,20 +76,20 @@
"postcss-sprites": "^3.3.0",
"postcss-use": "^2.2.0",
"precss": "^1.4.0",
"shelljs": "^0.7.2",
"shelljs": "^0.7.3",
"style-loader": "^0.13.1",
"stylelint": "^6.9.0",
"stylelint-config-yoho": "1.2.5",
"vue": "1.0.26",
"vue-infinite-scroll": "0.2.3",
"vue-lazyload": "0.4.3",
"vue-loader": "^8.5.3",
"vue-swipe": "0.2.6",
"vue-touch": "1.1.0",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
"webpack-stream": "^3.1.0",
"yoho-cookie": "^1.2.0",
"yoho-jquery": "^2.2.4",
"yoho-qs": "^1.0.1",
"yoho-vue": "^1.0.26",
"yoho-vue-infinite-scroll": "^0.2.3",
"yoho-vue-lazyload": "^0.4.3",
"yoho-vue-swipe": "^0.2.6"
"yoho-cookie": "1.2.0",
"yoho-qs": "1.0.1"
}
}
... ...
... ... @@ -5,8 +5,8 @@
* Time: 14:13
*/
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const brandListBox = require('channel/brand-list-box.vue');
require('common/vue-filter');
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const cateRes = require('channel/cate-resource-box.vue');
require('common/vue-filter');
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
const brandCate = require('channel/brand-cate.vue');
new Vue({
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
const channel = require('channel/index.vue');
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const sidebar = require('channel/sidebar.vue');
... ...
... ... @@ -4,7 +4,7 @@
* @date 2016-07-27
*/
'use strict';
let Vue = require('yoho-vue');
let Vue = require('vue');
Vue.directive('countDown', {
acceptStatement: true,
... ...
... ... @@ -8,6 +8,11 @@ const parse = require('yoho-qs/parse'); // 提供解析函数
const origin = location.origin;
/**
* TODO: 结构优化
*/
/**
* 跳转 App 头部参数
* 文档 http://git.yoho.cn/mobile/AppJSBridge/blob/master/HeaderType.md
* @type {Object}
... ... @@ -33,7 +38,8 @@ const titleMap = {
action: ''
},
right: {
action: origin + '/home'
icon: 'chat',
action: 'goToService'
}
},
3: {
... ... @@ -47,7 +53,7 @@ const titleMap = {
},
right: {
des: '提交',
action: 'submitForm'
action: 'test'
}
},
4: {
... ... @@ -68,16 +74,17 @@ const titleMap = {
},
ltitle: {
des: '商品',
action: origin + '/favorite'
action: origin + '/home/favorite'
},
rtitle: {
des: '品牌',
action: origin + '/favorite?tab=brand'
action: origin + '/home/favorite?tab=brand'
},
right: {
des: '编辑',
action: 'editModel'
}
},
defaultSelectedIndex: '1'
},
6: {
headerid: '6',
... ... @@ -188,7 +195,7 @@ module.exports = (url) => {
// 资讯
if (/\/news$/.test(path)) {
return yoho.goTab({index: 3});
return yoho.goTab({index: 2});
}
// 品牌 品类
... ... @@ -196,6 +203,11 @@ module.exports = (url) => {
return yoho.goTab({index: 1});
}
// 首页
if (/\/$/.test(path)) {
return yoho.goTab({index: 0});
}
yoho.goNewPage({
header: matchHeader(url),
url: /^(https?:)?\/\//i.test(url) ? url : origin + url
... ...
... ... @@ -7,7 +7,7 @@
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const Overlay = require('./overlay');
const template = require('components/loading.hbs');
... ...
... ... @@ -7,7 +7,7 @@
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const template = require('components/modal.hbs');
const Overlay = require('./overlay');
... ...
... ... @@ -7,7 +7,7 @@
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const ANIMATIONS = {
none: {
... ...
... ... @@ -7,7 +7,7 @@
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const template = require('components/select.hbs');
const Overlay = require('./overlay');
... ... @@ -37,7 +37,7 @@ function Select(items) {
elem.removeClass('slide-in');
overlay.hide();
elem.hide();
}
};
const show = function(cb) {
if (elem.parent().length === 0) {
... ... @@ -62,7 +62,7 @@ function Select(items) {
setTimeout(() => {
elem.addClass('slide-in');
}, 200);
}
};
$(del).click(function() {
hide();
... ...
... ... @@ -5,7 +5,21 @@
* Time: 16:55
*/
const $ = require('yoho-jquery');
const $ = require('jquery');
const jsApiList = [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'onMenuShareQZone'
];
let shareData = {
title: document.title,
link: location.href,
desc: '我在BLK发现了一个不错的品牌,赶快来看看吧!',
imgUrl: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg'
};
if (/MicroMessenger/i.test(navigator.userAgent)) {
$.ajax({
... ... @@ -26,42 +40,14 @@ if (/MicroMessenger/i.test(navigator.userAgent)) {
timestamp: res.timestamp,
nonceStr: res.nonceStr,
signature: res.signature,
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem',
'showAllNonBaseMenuItem',
'translateVoice',
'startRecord',
'stopRecord',
'onRecordEnd',
'playVoice',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
'getNetworkType',
'openLocation',
'getLocation',
'hideOptionMenu',
'showOptionMenu',
'closeWindow',
'scanQRCode',
'chooseWXPay',
'openProductSpecificView',
'addCard',
'chooseCard',
'openCard'
]
jsApiList: jsApiList
});
window.wx.ready(function() {
window.wx.onMenuShareAppMessage(shareData);
window.wx.onMenuShareTimeline(shareData);
window.wx.onMenuShareQQ(shareData);
window.wx.onMenuShareWeibo(shareData);
window.wx.onMenuShareQZone(shareData);
});
}
}
... ... @@ -69,13 +55,14 @@ if (/MicroMessenger/i.test(navigator.userAgent)) {
}
});
}
module.exports = (shareData) => {
module.exports = (data) => {
shareData = data;
if (window.wx) {
window.wx.ready(function() {
window.wx.onMenuShareAppMessage(shareData);
window.wx.onMenuShareTimeline(shareData);
window.wx.onMenuShareQQ(shareData);
window.wx.onMenuShareWeibo(shareData);
});
window.wx.onMenuShareAppMessage(shareData);
window.wx.onMenuShareTimeline(shareData);
window.wx.onMenuShareQQ(shareData);
window.wx.onMenuShareWeibo(shareData);
window.wx.onMenuShareQZone(shareData);
}
};
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
let vue = new Vue();
... ...
let Vue = require('yoho-vue');
let Vue = require('vue');
/**
* 替换参数
... ...
... ... @@ -5,8 +5,8 @@
* Time: 20:20
*/
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const appBox = require('example/app-box.vue');
... ...
var Vue = require('yoho-vue');
var Vue = require('vue');
var app = require('example/home.vue');
var tpl = require('example/hello.hbs');
... ...
... ... @@ -6,9 +6,9 @@
'use strict';
const Vue = require('yoho-vue');
const Vue = require('vue');
const coin = require('home/coin-detail.vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const infiniteScroll = require('vue-infinite-scroll');
Vue.use(infiniteScroll);
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const exchange = require('home/exchange.vue');
... ...
const Vue = require('yoho-vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const infiniteScroll = require('vue-infinite-scroll');
const favBrandList = require('home/fav-brand-list.vue');
const VueTouch = require('vue-touch');
require('common/vue-filter');
Vue.use(VueTouch)
Vue.use(VueTouch);
Vue.use(infiniteScroll);
new Vue({
... ...
const Vue = require('yoho-vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const infiniteScroll = require('vue-infinite-scroll');
const favProductList = require('home/fav-product-list.vue');
const VueTouch = require('vue-touch');
require('common/vue-filter');
Vue.use(VueTouch)
Vue.use(VueTouch);
Vue.use(infiniteScroll);
new Vue({
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2016/07/20
*/
var $ = require('yoho-jquery'),
var $ = require('jquery'),
tip = require('../common/tip'),
yoho = require('yoho');
... ...
var yoho = require('yoho');
var $ = require('yoho-jquery');
var interceptClick = require('common/intercept-click');
var $ = require('jquery');
// 地址管理
$('#address').on('click', function() {
yoho.goAddress({
'type': '2'
if (!yoho.isLogin) {
$('a').addClass('no-intercept');
$('a').on('click', function() {
yoho.goLogin();
return false;
});
return false;
});
} else {
// 地址管理
$('#address').on('click', function() {
yoho.goAddress({
type: '2'
});
return false;
});
}
// 系统设置
$('#setting').on('click', function() {
yoho.goSetting();
return false;
});
$('.my-page').on('click', 'a', function() {
// 未登录时跳转至登录页
if (!yoho.isLogin) {
yoho.goLogin();
return false;
}
// 拦截跳转
var href = $(this).attr('href');
if (href) {
interceptClick(href);
return false;
}
});
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
const Logistics = require('home/refund/logistics.vue');
const LogisticsCompany = require('home/refund/logistics-company.vue');
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
const Mydetails = require('home/mydetails.vue');
new Vue({
... ...
... ... @@ -5,7 +5,7 @@
*/
'use strict';
const Vue = require('yoho-vue');
const Vue = require('vue');
const OrderDetail = require('home/order-detail.vue');
require('common/vue-filter');
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
const orderLogistic = require('home/order-logistic.vue');
new Vue({
... ...
... ... @@ -5,9 +5,9 @@
*/
'use strict';
const Vue = require('yoho-vue');
const Vue = require('vue');
const Order = require('home/order.vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const infiniteScroll = require('vue-infinite-scroll');
Vue.use(infiniteScroll);
... ...
... ... @@ -5,9 +5,9 @@
*/
'use strict';
const Vue = require('yoho-vue');
const Vue = require('vue');
const refundOrder = require('home/refund-order.vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const infiniteScroll = require('vue-infinite-scroll');
Vue.use(infiniteScroll);
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const refund = require('home/refund.vue');
... ...
... ... @@ -14,7 +14,7 @@
* 1. cookie 操作请使用 yoho-cookie 文档:https://github.com/florian/cookie.js
* 2. 查询字符串读取 请使用 yoho-qs
*/
const $ = require('yoho-jquery');
const $ = require('jquery');
const interceptClick = require('common/intercept-click');
$(() => {
... ...
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const app = require('news/detail.vue');
... ...
... ... @@ -4,9 +4,9 @@
* Date: 2016/7/26
* Time: 17:37
*/
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
const indexBox = require('news/index-box.vue');
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
const $ = require('jquery');
const app = require('product/detail/index.vue');
const loading = require('common/loading');
const lazyload = require('yoho-vue-lazyload');
const lazyload = require('vue-lazyload');
require('common/vue-filter');
require('../common/overlay');
... ... @@ -34,5 +35,3 @@ new Vue({
app: app
}
});
... ...
const Vue = require('yoho-vue');
const $ = require('yoho-jquery');
const Vue = require('vue');
const $ = require('jquery');
const search = require('product/list/index.vue');
$(function() {
... ...
const Vue = require('yoho-vue');
const Vue = require('vue');
const newProduct = require('product/new/index.vue');
new Vue(newProduct);
... ...
const Vue = require('yoho-vue');
const $ = require('yoho-jquery');
const Vue = require('vue');
const $ = require('jquery');
const search = require('product/search/index.vue');
$(function() {
... ...
... ... @@ -5,8 +5,8 @@
* Time: 14:30
*/
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const shareBox = require('product/shop/share-box.vue');
require('common/vue-filter');
... ...
... ... @@ -4,9 +4,9 @@
* Date: 2016/7/19
* Time: 16:05
*/
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
const shopBox = require('product/shop/shop-box.vue');
... ...
... ... @@ -276,6 +276,17 @@ const yoho = {
}
},
goPageView(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.pageView',
arguments: args
});
} else {
tip(tipInfo);
}
},
/**
* 原生调用 JS 方法
* @param name 方法名
... ...
... ... @@ -77,10 +77,16 @@ ul {
margin-right: 50px;
}
.line-clamp-2 {
@define-mixin line-clamp {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-all;
}
@for $i from 1 to 3 {
.line-clamp-$i {
-webkit-line-clamp: $(i);
@mixin line-clamp;
}
}
... ...
... ... @@ -12,7 +12,7 @@
.setting {
float: left;
margin-top: 40px;
margin-top: 80px;
margin-left: 15px;
font-size: 46px;
}
... ...
... ... @@ -196,7 +196,7 @@
}
</style>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const tab = require('channel/tab.vue');
const contentCode = require('content-code');
... ...
... ... @@ -55,7 +55,7 @@
}
</style>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const bus = require('common/vue-bus');
const tip = require('common/tip');
const indexList = require('component/tool/index-list.vue');
... ...
... ... @@ -7,6 +7,7 @@
</template>
<script>
const $ = require('jquery');
const cookie = require('yoho-cookie');
const bus = require('common/vue-bus');
... ...
... ... @@ -5,8 +5,8 @@
<img :src="selection.thumbnail | resize 45 60"/>
</div>
<div class="text-box">
<h3>{{entity.productName}}</h3>
<h4>{{entity.productPriceBo.formatSalesPrice}}</h4>
<h3 class="line-clamp-2">{{entity.productName}}</h3>
<h4>{{entity.productPriceBo && entity.productPriceBo.formatSalesPrice}}</h4>
</div>
</div>
... ... @@ -44,7 +44,6 @@
h3 {
margin: 0;
max-height: 60px;
font-weight: 300;
}
... ...
<template>
<div class="filter-box">
<div class="filter" :class="{ 'filter-open': isVisible}">
<div class="filter" :class="{ 'filter-open': isVisible}">
<div class="filter-actions">
<a href="javascript:;" class="filter-action" @click="clearVals">清空</a>
<button class="button button-small filter-action" @click="okAction">确定</button>
... ... @@ -19,7 +19,7 @@
</div>
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const bus = require('common/vue-bus');
const Overlay = require('common/overlay');
const filterSub = require('./filter/filter-sub.vue');
... ... @@ -144,49 +144,49 @@
transform: translate3d(0, 0, 0);
}
}
.filter-actions {
font-size: 34px;
text-align: right;
padding: 45px 0;
}
.filter-action {
font-size: inherit;
margin-left: 40px;
}
.filter-actions,
.filter-cate {
border-bottom: 1px solid $grey;
}
.filter-cates {
list-style: none;
margin: 0;
padding: 0;
}
.filter-cate .icon-right {
margin-left: 24px;
}
.filter-cate,
.icon-right {
height: 118px;
line-height: 118px;
}
.filter-cate-label {
font-size: 36px;
font-weight: bold;
}
.filter-cate-val {
float: right;
font-size: 28px;
}
.filter-cate-val,
.filter-cate .icon {
color: $grey;
... ...
<template>
<div class="filter" :class="{ 'filter-open': isVisible}">
<div class="filter" :class="{ 'filter-open': isVisible}">
<div class="filter-actions">
<a href="javascript:;" class="filter-action" @click="clearVals">清空</a>
<button class="button button-small filter-action" @click="okAction">确定</button>
... ... @@ -16,7 +16,7 @@
</div>
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const bus = require('common/vue-bus');
const Overlay = require('common/overlay');
const yoho = require('yoho');
... ... @@ -143,49 +143,49 @@
transform: translate3d(0, 0, 0);
}
}
.filter-actions {
font-size: 34px;
text-align: right;
padding: 45px 0;
}
.filter-action {
font-size: inherit;
margin-left: 40px;
}
.filter-actions,
.filter-cate {
border-bottom: 1px solid $grey;
}
.filter-cates {
list-style: none;
margin: 0;
padding: 0;
}
.filter-cate .icon-right {
margin-left: 24px;
}
.filter-cate,
.icon-right {
height: 118px;
line-height: 118px;
}
.filter-cate-label {
font-size: 36px;
font-weight: bold;
}
.filter-cate-val {
float: right;
font-size: 28px;
}
.filter-cate-val,
.filter-cate .icon {
color: $grey;
... ...
... ... @@ -20,7 +20,7 @@
* index: [{}....]
* }
*/
const $ = require('yoho-jquery');
const $ = require('jquery');
const indexList = require('component/tool/index-list.vue');
module.exports = {
... ...
... ... @@ -5,7 +5,7 @@
</div>
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const parser = require('yoho-qs/parse');
const tip = require('common/tip');
const brandFilter = require('./brand.vue');
... ...
... ... @@ -21,9 +21,9 @@
</div>
</template>
<script>
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
Vue.use(lazyload);
Vue.use(infinitScroll);
... ...
... ... @@ -9,7 +9,7 @@
</ul>
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const bus = require('common/vue-bus');
const simple = require('./order/simple.vue');
const updown = require('./order/updown.vue');
... ...
... ... @@ -11,8 +11,8 @@
</template>
<script>
require('yoho-vue-swipe/dist/vue-swipe.css');
const swipe = require('yoho-vue-swipe');
require('vue-swipe/dist/vue-swipe.css');
const swipe = require('vue-swipe');
module.exports = {
props: ['floor'],
... ...
... ... @@ -5,6 +5,7 @@
</template>
<script>
const $ = require('jquery');
const titleFloor = require('component/resources/title-floor.vue');
const productList = require('component/product/list.vue');
... ...
... ... @@ -24,7 +24,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const bus = require('common/vue-bus');
const contentCode = require('content-code');
... ...
... ... @@ -4,8 +4,8 @@
<button class="button" @click="yoho.goLogout()">退出登录</button>
<button class="button" @click='yoho.goShopingKey({"shoppingkey":"123456789"})'>设置ShopingKey</button>
<button class="button" @click="yoho.goShopingCart()">跳转购物车</button>
<button class="button" @click='yoho.goAddress({"type":"1"})'>地址选择页面</button>
<button class="button" @click='yoho.goAddress({"type":"2"})'>地址管理页面</button>
<button class="button" @click='yoho.goAddress({"type":"1"}, addressCallback)'>地址选择页面</button>
<button class="button" @click='yoho.goAddress({"type":"2"}, addressCallback)'>地址管理页面</button>
<button class="button" @click='yoho.goImageBrowser({"images":["http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg"], "index": "1"})'>图片浏览</button>
<button class="button" @click='yoho.goNewPage({"url":"http://m.yohoblk.com"})'>新页面</button>
<button class="button" @click="yoho.goPay()">支付</button>
... ... @@ -42,12 +42,18 @@
modal.alert('传递的信息是:' + data);
}
});
share({
title: '标题',
link: location.href,
desc: '我在BLK发现了一个不错的品牌,赶快来看看吧!',
imgUrl: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg'
});
},
methods: {
addressCallback(info) {
alert(JSON.stringify(info));
}
}
};
</script>
... ...
... ... @@ -15,7 +15,7 @@
<script>
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
module.exports = {
... ...
... ... @@ -17,7 +17,7 @@
<div class="list-item exchange-mode">
<span>换货方式</span>
<i class="icon icon-right right"></i>
<select class="right" v-model="deliveryType">
<select class="right" v-model="deliveryTpye">
<option v-for="mode in delivery" :value="mode.id">{{mode.name}}</option>
</select>
</div>
... ... @@ -33,7 +33,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const qs = require('yoho-qs');
const tip = require('common/tip');
const bus = require('common/vue-bus');
... ... @@ -42,6 +42,7 @@
const productList = require('home/return/list.vue');
const featureSelector = require('component/product/feature-selector.vue');
const reasonConfig = require('home/return/reason');
module.exports = {
el: '#exchange',
... ... @@ -58,8 +59,9 @@
address: {},
delivery: [],
deliveryType: null,
indexMap: {} // goods[index].id 与 index 的映射
deliveryTpye: null,
indexMap: {}, // goods[index].id 与 index 的映射
processing: false
};
},
events: {
... ... @@ -104,12 +106,13 @@
const arr = [];
res.data.specialExchangeReason.forEach(obj => arr.push(obj.id));
global.store.reasons = [{
reasonConfig.reasons = [{
id: 0,
name: '请选择'
}].concat(res.data.exchangeReason);
global.store.specialReasons = arr;
global.store.specialNotice = res.data.specialNoticeBo;
reasonConfig.specialReasons = arr;
reasonConfig.specialNotice = res.data.specialNoticeBo;
}
});
},
... ... @@ -125,7 +128,7 @@
yoho.goAddress({
type: '1'
}, (address) => {
if(address) {
if (address) {
self.$set('address', {
addressId: address.address_id,
area: address.area,
... ... @@ -154,8 +157,6 @@
console.log(goods.goodsId);
this.showFeatureSelector = false;
// this.goodsArr.$set(index, Object.assign({}, goods, change));
},
// 查询 商品 feature
... ... @@ -173,24 +174,26 @@
order_code: this.orderCode,
address_id: this.address.addressId,
address: this.address.address,
consigee_name: this.address.consignee,
consignee_name: this.address.consignee,
area_code: this.address.areaCode,
zip_code: this.address.zipCode,
mobile: this.address.mobile,
delivery_typ: this.deliveryType,
delivery_tpye: this.deliveryTpye,
app_type: 1,
goods: []
};
this.selectedGoods.forEach(good => {
data.goods.push({
product_skn: good.productSkn,
product_skc: good.productSku,
product_skc: good.productSkc,
product_sku: good.productSku,
goods_type: good.goodsTypeId,
last_price: good.lastPrice,
exchange_reason: good.reason.id,
remark: good.remark,
evidence_images: good.imageList,
remark: good.remark || '',
evidence_images: good.imageList || '',
new_goods_id: good.change.goodsId,
new_product_sku: good.change.sku
});
... ... @@ -199,19 +202,60 @@
return data;
},
// 提交 换货
submit() {
$.ajax({
method: 'POST',
url: '/home/exchange/submit',
data: this.submitData()
}).then(result => {
if (result.code === 200) {
console.log(result);
} else {
modal.alert(result.message);
validator: function(data) {
let msg = '';
if (!data.order_code) {
msg = '订单号有问题';
}
if (!data.goods.length) {
msg = '至少选中一个换货商品';
}
data.goods.some(goods => {
let isSpecialReason = reasonConfig.specialReasons.indexOf(goods.exchange_reason) !== -1;
if (goods.exchange_reason === 0) {
msg = '请选择选货原因';
return true;
}
if (isSpecialReason && !(goods.mark && goods.evidence_images)) {
msg = '换货原因 请填写完整';
return true;
}
});
return msg;
},
// 提交 换货
submit() {
const self = this;
const data = this.submitData();
const msg = this.validator(data);
if (msg === '' && !this.processing) {
this.processing = true;
data.goods = JSON.stringify(data.goods);
$.ajax({
method: 'POST',
url: '/home/exchange/submit',
data
}).then(result => {
if (result.code === 200) {
yoho.goNewPage({url: `/home/exchange-status?orderId=${self.orderCode}`});
} else {
modal.alert(result.message);
}
}).always(()=>{
self.processing = false;
});
} else {
modal.alert(msg);
}
}
},
watch: {
... ... @@ -225,13 +269,21 @@
.then(result => {
$.each(result.data, (index, obj) => {
if (obj.isDefault === 'Y') {
self.$set('deliveryType', obj.id);
self.$set('deliveryTpye', obj.id);
return false;
}
});
self.$set('delivery', result.data);
});
},
processing(val) {
if (val) {
// when processing
} else {
// when not in processing
}
}
},
components: {
... ...
... ... @@ -45,7 +45,12 @@
},
created() {
this.$set('product.change', {
color: this.product.colorName,
size: this.product.sizeName,
goodsId: this.product.goodsId,
sku: this.product.productSku
});
}
};
... ...
... ... @@ -35,7 +35,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const yoho = require('yoho');
... ... @@ -65,14 +65,15 @@
tab: 'brand'
}
}).then(data => {
if (_this.page === data.pageTotal) {
if (data.pageTotal && _this.page === data.pageTotal) {
_this.busy = true;
} else {
_this.busy = false;
}
data.brandList.forEach(function(o){
if (!_this.keys[o.brandId]) {
if (data.brandList) {
data.brandList.forEach(function(o){
if (!_this.keys[o.brandId]) {
_this.keys[o.brandId] = true;
_this.brandData.push({
... ... @@ -83,7 +84,8 @@
down: o.status === 0
});
}
})
});
}
_this.nullbox = _this.brandData.length ? 'hide' : '';
}).fail(() => {
... ... @@ -197,6 +199,7 @@
let _this = this;
yoho.addNativeMethod('editModel', function(action) {
alert('1111')
_this.hideDelBth();
_this.editmodel = action;
});
... ...
... ... @@ -40,7 +40,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const yoho = require('yoho');
... ... @@ -69,38 +69,40 @@
page: ++_this.page
}
}).then(data => {
if (_this.page === data.pageTotal) {
if (data.pageTotal && _this.page === data.pageTotal) {
_this.busy = true;
} else {
_this.busy = false;
}
data.productList.forEach(function(o){
if (!o.productSkn) {
return;
}
if (!_this.keys[o.productId]) {
_this.keys[o.productId] = true;
let discountPrice = false;
if (Number(o.marketPrice) - Number(o.salesPrice) > 0) {
discountPrice = '¥' + Number(Math.max(o.salesPrice, 0)).toFixed(2);
if (data.productList) {
data.productList.forEach(function(o){
if (!o.productSkn) {
return;
}
_this.productData.push({
fav_id: o.productId,
link: o.goodsId && o.cnAlphabet ? o.productId : '',
imgUrl: o.image,
title: o.productName,
price: '¥' + Number(Math.max(o.marketPrice, 0)).toFixed(2),
discountPrice: discountPrice,
sellOut: o.storage <= 0,
invalidGoods: o.status === 0
});
}
})
if (!_this.keys[o.productId]) {
_this.keys[o.productId] = true;
let discountPrice = false;
if (Number(o.marketPrice) - Number(o.salesPrice) > 0) {
discountPrice = '¥' + Number(Math.max(o.salesPrice, 0)).toFixed(2);
}
_this.productData.push({
fav_id: o.productId,
link: o.goodsId && o.cnAlphabet ? o.productId : '',
imgUrl: o.image,
title: o.productName,
price: '¥' + Number(Math.max(o.marketPrice, 0)).toFixed(2),
discountPrice: discountPrice,
sellOut: o.storage <= 0,
invalidGoods: o.status === 0
});
}
});
}
_this.nullbox = _this.productData.length ? 'hide' : '';
}).fail(() => {
... ...
... ... @@ -31,7 +31,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const yoho = require('yoho');
const tip = require('common/tip');
const genderSel = require('common/select')([{
... ...
... ... @@ -53,7 +53,7 @@
<script>
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const Modal = require('common/modal');
const yohoAPI = require('yoho');
... ...
... ... @@ -157,7 +157,7 @@ $border_color_light: #eee;
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const qs = require('yoho-qs');
const tip = require('common/tip');
... ...
... ... @@ -49,7 +49,7 @@
<script>
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const Modal = require('common/modal');
const yohoAPI = require('yoho');
... ...
... ... @@ -41,7 +41,7 @@
<script>
'use strict';
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
//const Modal = require('common/modal');
... ...
... ... @@ -49,7 +49,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const qs = require('yoho-qs');
const modal = require('common/modal');
... ...
... ... @@ -15,7 +15,7 @@
</template>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
module.exports = {
... ...
module.exports = {
specialReasons: [],
specialNotice: {},
reasons: []
};
... ...
... ... @@ -12,22 +12,25 @@
<option v-for="reason in reasons" v-bind:value="reason.id" selected="{{reason.id === product.reason.id}}">{{reason.name}}</option>
</select>
</div>
<div class="remark">
<textarea v-model="product.remark" rows="3" max-length="100" placeholder="原因说明"></textarea>
</div>
<div v-show="specialReasons.indexOf(product.reason.id) !== -1" class="image-list clearfix">
<div class="image-item" v-for="image in imageListForShow">
<span v-on:click="deleteImage(image.index)" class="icon icon-close"></span>
<img v-bind:src="image.path">
<template v-if="specialReasons.indexOf(product.reason.id) !== -1">
<div class="remark">
<textarea v-model="product.remark" rows="3" max-length="100" placeholder="原因说明"></textarea>
</div>
<upload v-show="imageListForShow.length < 4" class="image-item" v-bind:image-list="product.imageList"></upload>
</div>
<div class="image-list clearfix">
<div class="image-item" v-for="image in imageListForShow">
<span v-on:click="deleteImage(image.index)" class="icon icon-close"></span>
<img v-bind:src="image.path">
</div>
<upload v-show="imageListForShow.length < 4" class="image-item" v-bind:image-list="product.imageList"></upload>
</div>
</template>
</div>
</template>
<script>
const upload = require('component/tool/upload.vue');
const modal = require('common/modal');
const reasonConfig = require('home/return/reason');
const getImgHost = function(url) {
let urlArr = url.split('/'),
... ... @@ -48,7 +51,7 @@
return {
reasons: [],
specialReasons: [],
specialNoticeBo: {}
specialNotice: {}
};
},
computed: {
... ... @@ -78,9 +81,9 @@
},
created() {
this.$set('reasons', global.store.reasons);
this.$set('specialReasons', global.store.specialReasons);
this.$set('specialNoticeBo', global.store.specialNoticeBo);
this.$set('reasons', reasonConfig.reasons);
this.$set('specialReasons', reasonConfig.specialReasons);
this.$set('specialNotice', reasonConfig.specialNotice);
}
};
... ...
... ... @@ -68,7 +68,7 @@
const contentCode = require('content-code');
const resources = require('component/resources/index.vue');
const qs = require('yoho-qs');
const $ = require('yoho-jquery');
const $ = require('jquery');
const tip = require('common/tip');
const yoho = require('yoho');
... ...
... ... @@ -41,7 +41,7 @@
}
</style>
<script>
const swipe = require('yoho-vue-swipe');
const swipe = require('vue-swipe');
const yoho = require('yoho');
require('common/vue-filter');
... ...
... ... @@ -393,19 +393,19 @@
* @author: Aiden Xu<aiden.xu@yoho.cn>
* @date: 2016/07/19
*/
const $ = require('yoho-jquery');
const $ = require('jquery');
const app = $('#app');
const tip = require('common/tip');
const yoho = require('yoho');
const share = require('common/share');
require('yoho-vue-swipe/dist/vue-swipe.css');
require('vue-swipe/dist/vue-swipe.css');
module.exports = {
data() {
return {
yoho: yoho,
isApp: true || yoho.isApp,
isApp: yoho.isApp,
intro: {},
firstImage: '',
entity: {
... ...
... ... @@ -9,10 +9,10 @@
</div>
</template>
<script>
const $ = require('yoho-jquery');
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const $ = require('jquery');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
const qs = require('yoho-qs/parse');
const bus = require('common/vue-bus');
const tip = require('common/tip');
... ...
... ... @@ -9,10 +9,10 @@
</div>
</template>
<script>
const $ = require('yoho-jquery');
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const $ = require('jquery');
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
const qs = require('yoho-qs/parse');
const bus = require('common/vue-bus');
const tip = require('common/tip');
... ...
... ... @@ -13,9 +13,10 @@
</div>
</template>
<script>
const Vue = require('yoho-vue');
const lazyload = require('yoho-vue-lazyload');
const infinitScroll = require('yoho-vue-infinite-scroll');
const Vue = require('vue');
const $ = require('jquery');
const lazyload = require('vue-lazyload');
const infinitScroll = require('vue-infinite-scroll');
const qs = require('yoho-qs');
const bus = require('common/vue-bus');
... ... @@ -142,12 +143,12 @@
margin-bottom: 56px;
}
}
.empty-tip-cn {
font-size: 34px;
margin-bottom: 30px;
}
.empty-tip-en {
font-size: 20px;
}
... ...
... ... @@ -12,7 +12,7 @@
}
</style>
<script>
const $ = require('yoho-jquery');
const $ = require('jquery');
const qs = require('yoho-qs/parse');
const bus = require('common/vue-bus');
const tip = require('common/tip');
... ...
... ... @@ -59,7 +59,7 @@
<script>
const yoho = require('yoho');
const $ = require('yoho-jquery');
const $ = require('jquery');
module.exports = {
data() {
... ...
... ... @@ -22,13 +22,13 @@ shelljs.ls(path.join(__dirname, 'js/**/*.page.js')).forEach((f) => {
// 生成规则:module.page: './js/module/xx.page.js'
entries[`${dir[0]}.${dir[1].match(/(.*).page.js/)[1]}`] = `./js/${dir.join('/')}`;
entries.libs = [
'yoho-jquery',
'yoho-qs',
'yoho-cookie',
'yoho-vue',
'yoho-vue-lazyload',
'yoho-vue-swipe',
'yoho-vue-infinite-scroll',
'jquery',
'vue',
'vue-lazyload',
'vue-swipe',
'vue-infinite-scroll',
'./js/index.js' // 全局公有文件
];
});
... ... @@ -56,7 +56,7 @@ module.exports = {
}]
},
resolve: {
modulesDirectories: ['node_modules', './vue', './hbs', './js']
modulesDirectories: ['node_modules', './vue', './hbs', './scss', './js']
},
plugins: [
new ExtractTextPlugin('[name].css'),
... ... @@ -64,11 +64,6 @@ module.exports = {
new webpack.optimize.CommonsChunkPlugin({
name: 'libs',
filename: 'libs.js'
}),
new webpack.ProvidePlugin({
$: 'yoho-jquery',
jQuery: 'yoho-jquery',
'window.jQuery': 'yoho-jquery'
})
]
};
... ...