...
|
...
|
@@ -42,8 +42,86 @@ class IndexModel extends global.mClass{ |
|
|
return $result;
|
|
|
})();
|
|
|
}
|
|
|
latestOrders($uid){
|
|
|
getFooterBanner($code){
|
|
|
$code=$code||'20110609-152143';
|
|
|
|
|
|
}
|
|
|
// getBrandListUrl(){
|
|
|
// return this.SearchAPI.get('/yohosearch/brand/list.json', {},{cache:true});
|
|
|
// }
|
|
|
// getProductUrl($condition, $type = ''){
|
|
|
// let $orderMaps={
|
|
|
// s_t_desc:'shelve_time:desc',
|
|
|
// s_t_asc:'shelve_time:asc',
|
|
|
// s_p_asc:'sales_price:asc',
|
|
|
// s_p_desc:'sales_price:desc',
|
|
|
// p_d_desc:'discount:desc',
|
|
|
// p_d_asc:'discount:asc',
|
|
|
// skn_desc:'product_skn:desc',
|
|
|
// skn_asc:'product_skn:asc',
|
|
|
// activities_desc:'activities.order_by:desc',
|
|
|
// activities_asc:'activities.order_by:asc',
|
|
|
// s_n_asc:'sales_num:asc',
|
|
|
// s_n_desc:'sales_num:desc',
|
|
|
// activities_id_desc:'activities.activity_id:desc',
|
|
|
// activities_id_asc:'activities.activity_id:asc',
|
|
|
// brand_desc:'brand_weight:desc'
|
|
|
// }
|
|
|
// $param={
|
|
|
// status:1,
|
|
|
// sales:'Y',
|
|
|
// outlets:2,
|
|
|
// stocknumber:1,
|
|
|
// attribute_not:2
|
|
|
// };
|
|
|
// if(!$condition.order){
|
|
|
// $param.order=$orderMaps.s_t_desc;
|
|
|
// }else{
|
|
|
// $param.order=$orderMaps[$condition.order]?$orderMaps[$condition.order]:'';
|
|
|
// }
|
|
|
// if(!$condition.page){
|
|
|
// $param.page=1;
|
|
|
// }
|
|
|
// if(!$condition.viewNum){
|
|
|
// $param.viewNum=$condition.viewNum;
|
|
|
// }else if(!$condition.limit){
|
|
|
// $param.viewNum=60;
|
|
|
// }else{
|
|
|
// $param.viewNum=$condition.limit;
|
|
|
// delete $condition.limit;
|
|
|
// }
|
|
|
// if(!$condition){
|
|
|
// $param += $condition;
|
|
|
// }
|
|
|
// return this.SearchAPI.get($type, $param,{cache:true});
|
|
|
|
|
|
// }
|
|
|
// formatFavBrand($brandInfo, $i = 10){
|
|
|
// $hotBrands=[];
|
|
|
// if($brandInfo){
|
|
|
// $brandInfo.forEach(function($value){
|
|
|
// if ($value.is_hot && $value.is_hot == 'Y') {
|
|
|
// $hotBrands.push({
|
|
|
// 'href' : Helpers::url('', '', $value['brand_domain']),
|
|
|
// 'logo' : Images::getSourceUrl($value['brand_ico'], 'brandLogo'),
|
|
|
// 'name' : $value.brand_name,
|
|
|
// });
|
|
|
// }
|
|
|
// });
|
|
|
// }
|
|
|
// return $hotBrands;
|
|
|
// }
|
|
|
// homeData(){
|
|
|
// let that=this;
|
|
|
// return co(function * (){
|
|
|
// let $result = {};
|
|
|
// let $url={};
|
|
|
// $url.fav_brand =yield that.getBrandListUrl();
|
|
|
// $url.new=yield that.getProductUrl({new:'Y',viewNum:10});
|
|
|
// console.log($url);
|
|
|
// return $url;
|
|
|
// // $result.brand=$data.fav_brand&&!$data.fav_brand?
|
|
|
// }();
|
|
|
// }
|
|
|
}
|
|
|
module.exports = IndexModel; |
...
|
...
|
|