|
@@ -4,6 +4,7 @@ namespace app\api\controller;
|
|
|
|
|
|
use app\common\controller\Api;
|
|
|
use think\Db;
|
|
|
+use addons\unishop\model\Product as productModel;
|
|
|
/**
|
|
|
* 首页接口
|
|
|
*/
|
|
@@ -41,7 +42,8 @@ class Index extends Api
|
|
|
'switch' => 1,
|
|
|
'deletetime' => null,
|
|
|
];
|
|
|
- $index_show_product = Db::name('unishop_product')->field('id,image,title')->where($map)->find();
|
|
|
+ $productModel = new productModel();
|
|
|
+ $index_show_product = $productModel->field('id,image,title')->where($map)->find();
|
|
|
$index_show_product = info_domain_image($index_show_product,['image']);
|
|
|
|
|
|
|