作者 王智

222

... ... @@ -403,10 +403,12 @@ class Api
->join('product p', 'p.id=s.product_id')
->join('class_con c', 'c.id=p.class_con_id')
->join('logo l', 'l.id=p.logo_id')
->field('p.stock,s.product_id,s.id,p.avatar,p.name,c.class_con,l.logo,s.buy_num,p.price')
->field('p.stock,s.product_id,s.id,p.avatar,p.name,c.class_con,l.logo,s.buy_num')
->select();
$tidu = Db::name('product')->where(['id' => $product_id])->find();
dump($tidu);
die;
if ($tidu['tidu1']!=null) {
if ($buy_num < $tidu['tidu1'] & $buy_num > 0) {
$price = $buy_num * $tidu['price'];
... ...