|
|
@@ -9,6 +9,7 @@ use app\model\system\ProductAttr;
|
|
|
use app\Request;
|
|
|
use library\services\UtilService;
|
|
|
use library\services\QrcodeService;
|
|
|
+use think\facade\Db;
|
|
|
|
|
|
class Index extends BaseController
|
|
|
{
|
|
|
@@ -51,7 +52,24 @@ class Index extends BaseController
|
|
|
if($v['price'] == 0) {
|
|
|
$list[$k]['price'] = round($v['ot_price'] * 1.15, 2);
|
|
|
}
|
|
|
- $list[$k]['market_price'] = round($list[$k]['price'] * 1.15, 2);
|
|
|
+ $list[$k]['market_price'] = round($list[$k]['price'] * 1.3, 2);
|
|
|
+ $score = Db::name("product_score")->where('product_id', $v['id'])->find();
|
|
|
+ if($score) {
|
|
|
+ $attr = json_decode($score['attribute'], true);
|
|
|
+ $max = $attr[2]['taobao'];
|
|
|
+ if($attr[2]['t1688'] > $max)
|
|
|
+ $max = $attr[2]['t1688'];
|
|
|
+ if($attr[2]['pdd'] > $max)
|
|
|
+ $max = $attr[2]['pdd'];
|
|
|
+ if($attr[2]['dy'] > $max)
|
|
|
+ $max = $attr[2]['dy'];
|
|
|
+ if($attr[2]['ks'] > $max)
|
|
|
+ $max = $attr[2]['ks'];
|
|
|
+ if($attr[2]['other'] > $max)
|
|
|
+ $max = $attr[2]['other'];
|
|
|
+ if($max)
|
|
|
+ $list[$k]['market_price'] = $max;
|
|
|
+ }
|
|
|
if($v['label'] != ""){
|
|
|
$list[$k]['label'] = explode('、',$v['label']);
|
|
|
}else{
|