Authored by Targaryen

flex-huawei

... ... @@ -55,11 +55,11 @@
{{#unless @root.isApp}}
{{#if productList}}
<div class="product-list-box">
<div class="product-list">
<ul class="product-list">
{{#productList}}
{{> index/product-list}}
{{/productList}}
</div>
</ul>
</div>
{{/if}}
{{/unless}}
... ...
<div class="goods-box">
<li class="goods-box">
<div class="goods-img">
<a href="{{href}}">
<img class="lazy" data-original="{{image2 pic_url w=106 h=138}}" />
... ... @@ -10,4 +10,4 @@
<p class="price">¥{{price}}</p>
</a>
</div>
</div>
\ No newline at end of file
</li>
\ No newline at end of file
... ...
... ... @@ -13,7 +13,6 @@ const _ = require('lodash');
const webpack = require('webpack');
const HappyPack = require('happypack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const scss = require('postcss-scss');
const postcssConfig = require('./postcss.config.js');
const happyThreadPool = HappyPack.ThreadPool({ // eslint-disable-line
... ... @@ -46,7 +45,7 @@ const cssLoader = (env, type) => {
loader: 'postcss-loader',
options: {
plugins: postcssConfig.postcssPlugin(env),
parser: scss
parser: 'postcss-scss'
}
});
}
... ... @@ -109,7 +108,7 @@ module.exports = (env) => {
options: {
postcss: {
plugins: postcssConfig.postcssPlugin(env),
parser: scss
parser: 'postcss-scss'
},
autoprefixer: false,
loaders: {
... ...
... ... @@ -26,6 +26,7 @@ let setting = {
let $infos = $('#info-list');
let getDynamicData = require('./list-dynamic');
let productlistWith = require('./index/product-list');
require('common');
... ... @@ -93,3 +94,5 @@ $('.info-list').on('click', function(e) {
}, true);
}
});
productlistWith();
... ...
... ... @@ -23,11 +23,13 @@ let $infoList = $('#info-list'),
curType = $curNav.data('type');
let getDynamicData = require('./list-dynamic');
let productlistWith = require('./index/product-list');
let state = {};
require('common');
if ($loadMoreInfo.length > 0) {
$loading = $loadMoreInfo.children('.loading');
$noMore = $loadMoreInfo.children('.no-more');
... ... @@ -128,3 +130,5 @@ $nav.on('touchstart', function(e) {
}).on('touchend touchcancel', function() {
$nav.find('li').removeClass('bytouch');
});
productlistWith();
... ...
const $ = require('yoho-jquery');
function productlistWith() {
let $productList = $('.product-list');
$productList.each(function() {
$(this).css('width', $(this).children().length * 8.5 + 'rem');
});
}
module.exports = productlistWith;
... ...
... ... @@ -21,6 +21,7 @@ let searching = false;
let mySwiper = {};
let getDynamicData = require('./list-dynamic');
let productlistWith = require('./index/product-list');
require('common');
... ... @@ -251,6 +252,7 @@ function loadMore($container, opt, url) {
opt.page++;
productlistWith();
searching = false;
delete opt.isTab;
... ...
... ... @@ -66,6 +66,7 @@
}
.guang-nav-item {
width: 25%;
color: #ccc;
font-size: 14PX;
text-align: center;
... ...
... ... @@ -2,11 +2,13 @@
* @Author: Targaryen
* @Date: 2017-05-03 14:08:52
* @Last Modified by: Targaryen
* @Last Modified time: 2017-05-09 11:13:08
* @Last Modified time: 2017-05-15 19:22:38
*/
.guang-list-page {
.product-list-box {
margin: 40px 20px 0;
width: 100%;
margin-top: 40px;
padding: 0 20px;
overflow-x: scroll;
overflow-y: hidden;
}
... ... @@ -14,7 +16,6 @@
.product-list {
height: 138px;
overflow-y: hidden;
display: inline-flex;
.goods-box {
width: 320px;
... ...