Commit 3824e5fa by mushishixian

fix

parent a9131910
...@@ -69,6 +69,10 @@ class SkuListFilter ...@@ -69,6 +69,10 @@ class SkuListFilter
$map['p'] = $map['page']; $map['p'] = $map['page'];
unset($map['page']); unset($map['page']);
$map['offset'] = $map['limit'];
unset($map['limit']);
if (!empty($map['p']) && $map['p'] > 1000) { if (!empty($map['p']) && $map['p'] > 1000) {
$map['p'] = rand(5, 1000); $map['p'] = rand(5, 1000);
} }
......
...@@ -43,16 +43,16 @@ class SkuService ...@@ -43,16 +43,16 @@ class SkuService
$sku['is_expire'] = $data['data']['status'][$goodsId] && $data['data']['status'][$goodsId] > 0 ? 0 : 1; $sku['is_expire'] = $data['data']['status'][$goodsId] && $data['data']['status'][$goodsId] > 0 ? 0 : 1;
$spu = json_decode($redis->hget('spu', $sku['spu_id']), true); $spu = json_decode($redis->hget('spu', $sku['spu_id']), true);
//型号处理 //型号处理
if (empty($sku['goods_name'])) { if (empty($sku['goods_name'])&&!empty($spu)) {
$sku['goods_name'] = $spu['spu_name']; $sku['goods_name'] = $spu['spu_name'];
} }
$sku['encap'] = $spu['encap']; $sku['encap'] = array_get($spu, 'encap', '');
if (array_get($auditData, $sku['goods_id'])) { if (array_get($auditData, $sku['goods_id'])) {
$sku['audit_time'] = $auditData[$sku['goods_id']]["audit_time"]; $sku['audit_time'] = $auditData[$sku['goods_id']]["audit_time"];
$sku['audit_user'] = $auditData[$sku['goods_id']]["audit_user"]; $sku['audit_user'] = $auditData[$sku['goods_id']]["audit_user"];
} }
//制造商处理 //制造商处理
if (empty($sku['brand_name'])) { if (empty($sku['brand_name'])&&!empty($spu)) {
$brand = $redis->hget('brand_id', $spu['brand_id']); $brand = $redis->hget('brand_id', $spu['brand_id']);
if ($brand) { if ($brand) {
$sku['brand_name'] = $brand; $sku['brand_name'] = $brand;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
$('.main_filter').attr('class', 'main_filter'); $('.main_filter').attr('class', 'main_filter');
$(this).attr('class', 'main_filter layui-badge layui-bg-green'); $(this).attr('class', 'main_filter layui-badge layui-bg-green');
type = $(this).attr('id'); type = $(this).attr('id');
whereCondition.source_type = type initCondition.source_type = type
table.reload('skuList', { table.reload('skuList', {
page: { page: {
curr: 1 curr: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment