Browse Source

checkredis

yuenan
娄梦宁 3 years ago
parent
commit
adc63ceabd
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      addons/unishop/controller/Product.php

+ 5
- 0
addons/unishop/controller/Product.php View File

@@ -8,6 +8,7 @@ use addons\unishop\model\Evaluate;
use addons\unishop\model\Favorite;
use addons\unishop\model\Product as productModel;
use addons\unishop\model\Coupon;
use app\admin\model\Qa;
use think\Exception;

class Product extends Base
@@ -81,6 +82,10 @@ class Product extends Base
$data->evaluate_list = collection($evaluate)->append(['createtime_text'])->toArray();
}
$data = $data->append(['images_text', "detail_images_text",'spec_list', 'spec_table_list'])->toArray();
$qaModel = new Qa();
$qa=$qaModel->field("question,answer")->select();
$list = collection($qa)->toArray();
$data['qa']=$list;
$this->success('', $data);
} catch (Exception $e) {
$this->error($e->getMessage());


Loading…
Cancel
Save