123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\api\controller;
- use app\admin\model\Goods;
- use app\common\controller\Api;
- use app\common\model\SolutionShop;
- use app\common\model\SolutionForeign;
- use app\common\model\SolutionKnowledge;
- /**
- * 解决方案
- */
- class Solution extends Api
- {
- protected $noNeedLogin = ['*'];
- /**
- * 门店解决方案
- */
- public function solution_shop(){
- $res = SolutionShop::all(function ($query){
- $query->field('id,name,content,image');
- });
- array_push($res,Goods::get(['id'=>4]));
- $this->success('请求成功',$res);
- }
- /**
- * 外贸解决方案
- */
- public function solution_foreign(){
- $res = SolutionForeign::all(function ($query){
- $query->field('id,name,content,image');
- });
- array_push($res,Goods::get(['id'=>5]));
- $this->success('请求成功',$res);
- }
- /**
- * 知识付费解决方案
- */
- public function solution_knowledge(){
- $res = SolutionKnowledge::all(function ($query){
- $query->field('id,name,content,image');
- });
- array_push($res,Goods::get(['id'=>6]));
- $this->success('请求成功',$res);
- }
- }
|