|
|
@@ -11,6 +11,29 @@ use Yii;
|
|
|
class PtItemController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //官方认证修改 ssh 20231125
|
|
|
+ public function actionChangeAuth()
|
|
|
+ {
|
|
|
+ $id = Yii::$app->request->get('id', 0);
|
|
|
+ $item = PtItemClass::getById($id, true);
|
|
|
+ if (empty($item)) {
|
|
|
+ util::fail('没有找到花材');
|
|
|
+ }
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ if ($this->adminId != 4) {
|
|
|
+ util::fail('无法操作');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if ($this->adminId != 919) {
|
|
|
+ util::fail('无法操作');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $newAuth = $item->auth == 0 ? 1 : 0;
|
|
|
+ $item->auth = $newAuth;
|
|
|
+ $item->save();
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
//获取平台里的花材列表
|
|
|
public function actionList()
|
|
|
{
|