|
@@ -47,6 +47,11 @@ class Index extends BaseController
|
|
|
['limit', 24]
|
|
['limit', 24]
|
|
|
], $request);
|
|
], $request);
|
|
|
$list = Product::getProductList($data);
|
|
$list = Product::getProductList($data);
|
|
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
|
|
+ if($v['price'] == 0) {
|
|
|
|
|
+ $list[$k]['price'] = round($v['ot_price'] * 1.15, 2);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return app('json')->success($list);
|
|
return app('json')->success($list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -66,6 +71,9 @@ class Index extends BaseController
|
|
|
$storeInfo['description'] = preg_replace_callback('#<img.*?src="([^"]*)"[^>]*>#i', function ($imagsSrc) {
|
|
$storeInfo['description'] = preg_replace_callback('#<img.*?src="([^"]*)"[^>]*>#i', function ($imagsSrc) {
|
|
|
return isset($imagsSrc[1]) && isset($imagsSrc[0]) ? str_replace($imagsSrc[1], str_replace('\\', '/', $imagsSrc[1]), $imagsSrc[0]) : '';
|
|
return isset($imagsSrc[1]) && isset($imagsSrc[0]) ? str_replace($imagsSrc[1], str_replace('\\', '/', $imagsSrc[1]), $imagsSrc[0]) : '';
|
|
|
}, $storeInfo['description']);
|
|
}, $storeInfo['description']);
|
|
|
|
|
+ if($storeInfo['price'] == 0){
|
|
|
|
|
+ $storeInfo['price'] = round($storeInfo['ot_price'] * 1.15, 2);
|
|
|
|
|
+ }
|
|
|
$data['storeInfo'] = $storeInfo;
|
|
$data['storeInfo'] = $storeInfo;
|
|
|
list($productAttr, $productValue) = ProductAttr::getProductAttrDetail($id, 0, 0);
|
|
list($productAttr, $productValue) = ProductAttr::getProductAttrDetail($id, 0, 0);
|
|
|
$data['productAttr'] = $productAttr;
|
|
$data['productAttr'] = $productAttr;
|