8
This commit is contained in:
@@ -2,15 +2,11 @@
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
use app\model\Order;
|
||||
use app\model\Withdrawl as WithdrawlModel;
|
||||
use app\model\Address as AddressModel;
|
||||
use support\exception\BusinessException;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
use Throwable;
|
||||
use Web3\Contracts\Types\Address as TypesAddress;
|
||||
use Workerman\Worker;
|
||||
use Exception;
|
||||
use app\model\Archives as ArchivesModel;
|
||||
|
||||
class IndexController extends Crud
|
||||
{
|
||||
@@ -19,12 +15,11 @@ class IndexController extends Crud
|
||||
* 后台主页
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws BusinessException|Throwable
|
||||
* @throws BusinessException|Exception
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
return 'ok';
|
||||
return view(base_path().'/public/index.html');
|
||||
return view('public/index.html');
|
||||
}
|
||||
public function user(Request $request,$code)
|
||||
{
|
||||
@@ -37,4 +32,32 @@ class IndexController extends Crud
|
||||
return 'group';
|
||||
}
|
||||
|
||||
public function privacy_policy(Request $request)
|
||||
{
|
||||
return $this->siglepage($request);
|
||||
}
|
||||
|
||||
public function aboutus(Request $request)
|
||||
{
|
||||
return $this->siglepage($request);
|
||||
}
|
||||
function siglepage($request){
|
||||
$name = $request->action;
|
||||
if(!$name){
|
||||
return $this->error(__("Article does not exist"));
|
||||
}
|
||||
/** @var ArchivesModel $vo */
|
||||
$vo = ArchivesModel::where('name',$name)->find();
|
||||
if(!$vo) {
|
||||
return $this->error(__("Article does not exist"));
|
||||
}
|
||||
$addon = \app\model\Content::where('id', $vo->id)->find()->toArray();
|
||||
if ($addon) {
|
||||
$vo->setAddonData($addon);
|
||||
}
|
||||
return view('common/siglepage',[
|
||||
'vo' => $vo
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user