This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/store/controller/Wxapp.php
2020-04-25 22:34:57 +08:00

34 lines
751 B
PHP

<?php
namespace app\store\controller;
use app\store\model\Wxapp as WxappModel;
/**
* 小程序管理
* Class Wxapp
* @package app\store\controller
*/
class Wxapp extends Controller
{
/**
* 小程序设置
* @return mixed
* @throws \think\exception\DbException
*/
public function setting()
{
// 当前小程序信息
$model = WxappModel::detail();
if (!$this->request->isAjax()) {
return $this->fetch('setting', compact('model'));
}
// 更新小程序设置
if ($model->edit($this->postData('wxapp'))) {
return $this->renderSuccess('更新成功');
}
return $this->renderError($model->getError() ?: '更新失败');
}
}