作者 王智

222

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