Authored by 郭成尧

all-support-path-params

... ... @@ -209,7 +209,7 @@ router.get(/^\/(.*?)-new/, rewrite.resolve, rewrite.resolvePathParams, news.newG
router.get('/list/new', news.newGoods); // 兼容 PC 的链接
router.get('/new/selectNewSale', rewrite.resolvePathParamsAjax, news.selectNewSale);
router.get('/new/filter', news.filter);
router.get('/new/filter', rewrite.resolvePathParamsAjax, news.filter);
router.get('/newnew', news._newGoods); // TODO: repleace /new
router.get('/new/recommend-shop.json', news.recommendShop);
... ... @@ -233,7 +233,7 @@ router.get('/detail/limitHelp', newDetail.limitHelp);
router.get('/index/allBrand', newShop.allBrand); // 店铺全部品牌
router.get('/global/list', globalPro.list); // 全球购列表页
router.get('/global/search', globalPro.search); // 全球购列表页搜索数据
router.get('/global/search', rewrite.resolvePathParamsAjax, globalPro.search); // 全球购列表页搜索数据
router.get(/^\/global\/(\d+)\.html/, globalPro.detail); // 全球购店铺详情页
router.get('/global/gethtml', globalPro.gethtml); // 全球购商品信息
... ...
... ... @@ -84,7 +84,8 @@ function getUrlParam(name) {
defaultOpt = $.extend({
yh_channel: getUrlParam('channel') || defaultOpt.channel || 'boys', // TODO GO ON!
saleType: 1
saleType: 1,
currentUrl: location.pathname
}, defaultOpt);
storeOpt = $.extend({}, defaultOpt);
... ... @@ -224,8 +225,7 @@ function search(opt) {
$.extend(setting, defaultOpt, {
type: 'stock',
order: 0,
page: page,
currentUrl: location.pathname
page: page
});
searching = true;
... ...
... ... @@ -103,7 +103,8 @@ class ListController extends Controller {
let page = this.nav.page + 1;
let params = $.extend({}, this.query, {
page: page
page: page,
currentUrl: location.pathname
});
this.searching = true;
... ...
... ... @@ -25,6 +25,8 @@ let winH = $(window).height(),
// 默认筛选条件
let defaultOpt = require('common/query-param');
defaultOpt.currentUrl = location.pathname;
let storeOpt = $.extend({}, defaultOpt); // 存储默认筛选条件以便重置
let now = new Date(),
... ...
... ... @@ -111,7 +111,8 @@ if ($('.sale-vip-page').length > 0) {
// 获取频道
$.extend(defaultOpt, {
yh_channel: getUrlParam('channel') || defaultOpt.channel || 'all'
yh_channel: getUrlParam('channel') || defaultOpt.channel || 'all',
currentUrl: location.pathname
});
// 判断导航类型
... ...