|
|
@@ -337,7 +337,7 @@ class UserController extends BaseController
|
|
|
public function actionBindAdd()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserBindForm::class, '添加点位绑定成功', 'add', ['add'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserBindForm::class, Yii::t('ctx', 'successfully'), 'add', ['add'], null, function ($form, $result) {
|
|
|
// Log::adminHandle('为' . $form->userName . '添加点位绑定,主点位:' . $form->mainUserName);
|
|
|
});
|
|
|
}
|
|
|
@@ -353,7 +353,7 @@ class UserController extends BaseController
|
|
|
{
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserBindForm::class, '点位绑定编辑成功', 'edit', ['edit'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserBindForm::class, Yii::t('ctx', 'successfully'), 'edit', ['edit'], null, function ($form, $result) {
|
|
|
//$userBaseInfo = Info::baseInfo($result->USER_ID);
|
|
|
// Log::adminHandle('为' . $userBaseInfo['USER_NAME'] . '更改点位绑定关系');
|
|
|
});
|
|
|
@@ -381,7 +381,7 @@ class UserController extends BaseController
|
|
|
}, function ($selected) use ($userBindForm) {
|
|
|
$userBindForm->delete($selected);
|
|
|
}, false);
|
|
|
- return self::notice('撤销点位绑定成功');
|
|
|
+ return self::notice(Yii::t('ctx', 'successfully'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -394,7 +394,7 @@ class UserController extends BaseController
|
|
|
{
|
|
|
// 获取用户名
|
|
|
if (!$userName = Info::generateUserName('hz')) {
|
|
|
- return static::notice('会员编号生成失败', 400);
|
|
|
+ return static::notice(Yii::t('ctx', 'failed'), 400);
|
|
|
}
|
|
|
return static::notice(['userName' => $userName]);
|
|
|
}
|
|
|
@@ -464,7 +464,7 @@ class UserController extends BaseController
|
|
|
public function actionTeamworkAdd()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserTeamworkForm::class, '添加合作点位成功', 'add', ['add'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserTeamworkForm::class, Yii::t('ctx', 'successfully'), 'add', ['add'], null, function ($form, $result) {
|
|
|
// Log::adminHandle('为' . $form->mainUserName . '添加合作点位,姓名:' . $form->userName, 0, $result->USER_ID, $form->userName);
|
|
|
});
|
|
|
}
|
|
|
@@ -485,7 +485,7 @@ class UserController extends BaseController
|
|
|
{
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserTeamworkForm::class, '合作点位编辑成功', 'changeDivide', ['changeDivide'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserTeamworkForm::class, Yii::t('ctx', 'successfully'), 'changeDivide', ['changeDivide'], null, function ($form, $result) {
|
|
|
foreach ($result['logs'] as $k => $value) {
|
|
|
$userName = Info::getUserNameByUserId($k);
|
|
|
// Log::adminHandle('为' . $userName . '编辑合作点位分成比例为' . $value , 1, $k, $userName);
|
|
|
@@ -592,7 +592,7 @@ class UserController extends BaseController
|
|
|
$formModel->scenario = 'add';
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $formModel->edit()) {
|
|
|
// Log::adminHandle('添加体系' . Yii::$app->request->post('systemName'));
|
|
|
- return static::notice('添加体系成功');
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -610,7 +610,7 @@ class UserController extends BaseController
|
|
|
{
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserSystemForm::class, '编辑体系成功', 'edit', ['edit'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserSystemForm::class, Yii::t('ctx', 'successfully'), 'edit', ['edit'], null, function ($form, $result) {
|
|
|
// Log::adminHandle('编辑体系' . $result['SYSTEM_NAME']);
|
|
|
});
|
|
|
}
|
|
|
@@ -627,7 +627,7 @@ class UserController extends BaseController
|
|
|
*/
|
|
|
public function actionSystemRenew()
|
|
|
{
|
|
|
- return parent::edit(UserSystemForm::class, '恢复体系成功', 'renewSystem', [
|
|
|
+ return parent::edit(UserSystemForm::class, Yii::t('ctx', 'successfully'), 'renewSystem', [
|
|
|
'renewSystem',
|
|
|
], null, function ($form, $result) {
|
|
|
// Log::adminHandle('编辑体系' . $result['SYSTEM_NAME']);
|
|
|
@@ -648,7 +648,7 @@ class UserController extends BaseController
|
|
|
}, function ($selected) use ($userSystemForm) {
|
|
|
$userSystemForm->delete($selected);
|
|
|
}, false);
|
|
|
- return self::notice('撤销体系成功');
|
|
|
+ return self::notice(Yii::t('ctx', 'successfully'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -768,7 +768,7 @@ class UserController extends BaseController
|
|
|
public function actionMoveAdd()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(NetMoveForm::class, 'Application for net removal succeeds', 'add', ['add'], null, function ($form, $result) { // 移网申请成功
|
|
|
+ return parent::edit(NetMoveForm::class, Yii::t('ctx', 'successfully'), 'add', ['add'], null, function ($form, $result) { // 移网申请成功
|
|
|
// $user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('申请为' . $user['USER_NAME'] . '移网', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
});
|
|
|
@@ -782,7 +782,12 @@ class UserController extends BaseController
|
|
|
*/
|
|
|
public function actionMoveNetType()
|
|
|
{
|
|
|
- return static::notice(['netType' => UserMove::TYPE_NAME]);
|
|
|
+ $network = UserMove::TYPE_NAME;
|
|
|
+ foreach ($network as &$item) {
|
|
|
+ $item['name'] = Yii::t('ctx', $item['label']);
|
|
|
+ }
|
|
|
+
|
|
|
+ return static::notice(['netType' => $network]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -816,7 +821,7 @@ class UserController extends BaseController
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
|
$user = Info::baseInfoZh($result['USER_ID']);
|
|
|
// Log::adminHandle('修改' . $user['USER_NAME'] . '移网录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('The modification of the data input is complete'); // 修改移网录入数据完成
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully')); // 修改移网录入数据完成
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -853,7 +858,7 @@ class UserController extends BaseController
|
|
|
$formModel->scenario = 'changeAudit';
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->changeAudit()) {
|
|
|
// Log::adminHandle('审核移网数据');
|
|
|
- return static::notice('Check and verify the net moving data'); // 审核移网数据完成
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully')); // 审核移网数据完成
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1077,7 +1082,7 @@ class UserController extends BaseController
|
|
|
public function actionUserAdd()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(AdminAddUserForm::class, 'Successfully added', null, null, null, function ($form, $result) {//添加成功
|
|
|
+ return parent::edit(AdminAddUserForm::class, Yii::t('ctx', 'successfully'), null, null, null, function ($form, $result) {//添加成功
|
|
|
// Log::adminHandle('后台添加会员:' . $result['USER_NAME'], 1, $result['ID'], $result['USER_NAME']);
|
|
|
});
|
|
|
}
|
|
|
@@ -1129,7 +1134,7 @@ class UserController extends BaseController
|
|
|
$form = new UserBasicForm();
|
|
|
$form->scenario = 'modifyPassword';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->edit()){
|
|
|
- return static::notice('Password modified successfully'); // 密码修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully')); // 密码修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1168,7 +1173,7 @@ class UserController extends BaseController
|
|
|
$form = new UserBasicForm();
|
|
|
$form->scenario = 'modifyProfile';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->modifyProfile()){
|
|
|
- return static::notice('Personal data modified successfully');//个人资料修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//个人资料修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1178,7 +1183,7 @@ class UserController extends BaseController
|
|
|
$form = new UserBasicForm();
|
|
|
$form->scenario = 'modifyStatus';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->modifyStatus()){
|
|
|
- return static::notice('Member status modified successfully');//会员状态修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//会员状态修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1193,7 +1198,7 @@ class UserController extends BaseController
|
|
|
$form = new UserBasicForm();
|
|
|
$form->scenario = 'isModifyPasswordStatus';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->isModifyPasswordStatus()){
|
|
|
- return static::notice('Status modified successfully');//状态修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//状态修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1292,7 +1297,7 @@ class UserController extends BaseController
|
|
|
$user = User::getBaseInfoFromRedis($result);
|
|
|
//// Log::adminHandle('删除空单会员' . $user['USER_NAME'], 1, $result, $user['USER_NAME']);
|
|
|
// Log::adminHandle('删除空单会员' . $user['USER_NAME'], 1);
|
|
|
- return static::notice('Delete empty member');//删除空单会员完成
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//删除空单会员完成
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1435,7 +1440,7 @@ class UserController extends BaseController
|
|
|
public function actionChangeUserDecLevel()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(DecLevelLogForm::class, 'Member Level Modified Successfully', 'adminChange', [ // 修改会员级别成功
|
|
|
+ return parent::edit(DecLevelLogForm::class, Yii::t('ctx', 'successfully'), 'adminChange', [ // 修改会员级别成功
|
|
|
'adminChange',
|
|
|
], null, function ($form, $result) {
|
|
|
//$userName = Info::getUserNameByUserId($result['ID']);
|
|
|
@@ -1452,7 +1457,7 @@ class UserController extends BaseController
|
|
|
public function actionChangeUserDecRole()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(DecRoleLogForm::class, 'Successfully modified the document Stockist level', 'adminChange', [//修改报单中心级别成功
|
|
|
+ return parent::edit(DecRoleLogForm::class, Yii::t('ctx', 'successfully'), 'adminChange', [//修改报单中心级别成功
|
|
|
'adminChange',
|
|
|
], null, function ($form, $result) {
|
|
|
//$userName = Info::getUserNameByUserId($result['ID']);
|
|
|
@@ -1469,7 +1474,7 @@ class UserController extends BaseController
|
|
|
public function actionChangeShowEmpLevel()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(ChangeShowEmpLvForm::class, 'Succeeded in modifying the member foreground display level', 'adminChange', [//修改会员前台显示聘级成功
|
|
|
+ return parent::edit(ChangeShowEmpLvForm::class, Yii::t('ctx', 'successfully'), 'adminChange', [//修改会员前台显示聘级成功
|
|
|
'adminChange',
|
|
|
], null, function ($form, $result) {
|
|
|
//$userName = Info::getUserNameByUserId($result['ID']);
|
|
|
@@ -1563,7 +1568,7 @@ class UserController extends BaseController
|
|
|
public function actionRegInfoAuditAdd()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(RegInfoAuditForm::class, 'Registration information entered successfully', 'add', ['add'], null, function ($form, $result) {//注册信息录入成功
|
|
|
+ return parent::edit(RegInfoAuditForm::class, Yii::t('ctx', 'successfully'), 'add', ['add'], null, function ($form, $result) {//注册信息录入成功
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('申请为' . $user['USER_NAME'] . '注册信息录入', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
});
|
|
|
@@ -1616,7 +1621,7 @@ class UserController extends BaseController
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->edit()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('修改' . $user['USER_NAME'] . '注册信息录入数据', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('Completion of modifying registration information and entering data');//修改注册信息录入数据完成
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//修改注册信息录入数据完成
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1634,7 +1639,7 @@ class UserController extends BaseController
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
|
|
|
$user = User::getBaseInfoFromRedis($result['USER_ID']);
|
|
|
// Log::adminHandle('审核' . $user['USER_NAME'] . '注册信息', 1, $result['USER_ID'], $user['USER_NAME']);
|
|
|
- return static::notice('Audit registration information completed');//审核注册信息完成
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//审核注册信息完成
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -1720,7 +1725,7 @@ class UserController extends BaseController
|
|
|
public function actionCloseLogin()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(CloseLoginForm::class, '操作成功', 'single', ['single'], null, function ($form, $result) {
|
|
|
+ return parent::edit(CloseLoginForm::class, Yii::t('ctx', 'successfully'), 'single', ['single'], null, function ($form, $result) {
|
|
|
// $appStr = CloseLoginForm::$apps[$form->shopOrBonus];
|
|
|
// $closeStr = CloseLoginForm::$closeSwitch[$form->isClose];
|
|
|
// $typeStr = CloseLoginForm::$types[$form->type];
|
|
|
@@ -1748,7 +1753,7 @@ class UserController extends BaseController
|
|
|
public function actionCloseAreaLogin()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(CloseLoginForm::class, '按地区登录操作成功', 'area', ['area'], null, function ($form, $result) {
|
|
|
+ return parent::edit(CloseLoginForm::class, Yii::t('ctx', 'successfully'), 'area', ['area'], null, function ($form, $result) {
|
|
|
// $appStr = CloseLoginForm::$apps[$form->shopOrBonus];
|
|
|
// $closeStr = CloseLoginForm::$closeSwitch[$form->isClose];
|
|
|
// $province = $form->areaSelected[0] ?? '';
|
|
|
@@ -1769,7 +1774,7 @@ class UserController extends BaseController
|
|
|
public function actionBatchCloseLogin()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(CloseLoginForm::class, '指定会员登录操作成功', 'batch', ['batch'], null, function ($form, $result) {
|
|
|
+ return parent::edit(CloseLoginForm::class, Yii::t('ctx', 'successfully'), 'batch', ['batch'], null, function ($form, $result) {
|
|
|
/*$appStr = CloseLoginForm::$apps[$form->shopOrBonus];
|
|
|
$closeStr = CloseLoginForm::$closeSwitch[$form->isClose];
|
|
|
$remark = $form->remark;
|
|
|
@@ -1803,7 +1808,7 @@ class UserController extends BaseController
|
|
|
public function actionCloseDec()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(CloseDecForm::class, '操作成功', 'single', ['single'], null, function ($form, $result) {
|
|
|
+ return parent::edit(CloseDecForm::class, Yii::t('ctx', 'successfully'), 'single', ['single'], null, function ($form, $result) {
|
|
|
// $closeStr = CloseDecForm::$closeSwitch[$form->isClose];
|
|
|
// $typeStr = CloseDecForm::$types[$form->type];
|
|
|
// $remark = $form->remark;
|
|
|
@@ -1820,7 +1825,7 @@ class UserController extends BaseController
|
|
|
public function actionBatchCloseDec()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(CloseDecForm::class, '指定会员报单操作成功', 'batch', ['batch'], null, function ($form, $result) {
|
|
|
+ return parent::edit(CloseDecForm::class, Yii::t('ctx', 'successfully'), 'batch', ['batch'], null, function ($form, $result) {
|
|
|
/*$closeStr = CloseDecForm::$closeSwitch[$form->isClose];
|
|
|
$remark = $form->remark;
|
|
|
if (is_array($result)) {
|
|
|
@@ -1843,7 +1848,7 @@ class UserController extends BaseController
|
|
|
public function actionCloseAreaDec()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(CloseDecForm::class, '按地区报单操作成功', 'area', ['area'], null, function ($form, $result) {
|
|
|
+ return parent::edit(CloseDecForm::class, Yii::t('ctx', 'successfully'), 'area', ['area'], null, function ($form, $result) {
|
|
|
// $closeStr = CloseDecForm::$closeSwitch[$form->isClose];
|
|
|
// $province = $form->areaSelected[0] ?? '';
|
|
|
// $city = $form->areaSelected[1] ?? '';
|
|
|
@@ -1928,7 +1933,7 @@ class UserController extends BaseController
|
|
|
public function actionStatusAuditAdd()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserStatusForm::class, '申请成功', 'add', ['add'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserStatusForm::class, Yii::t('ctx', 'successfully'), 'add', ['add'], null, function ($form, $result) {
|
|
|
$userInfo = Info::baseInfo($result->USER_ID);
|
|
|
// Log::adminHandle('申请修改' . $userInfo['USER_NAME'] . '状态为' . Yii::$app->params['userStatus'][$result->STATUS_VALUE]['label'], 1, $result->USER_ID, $userInfo['USER_NAME']);
|
|
|
});
|
|
|
@@ -1988,7 +1993,7 @@ class UserController extends BaseController
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->audit()) {
|
|
|
$userInfo = Info::baseInfo($result->USER_ID);
|
|
|
// Log::adminHandle('审核修改' . $userInfo['USER_NAME'] . '状态为' . Yii::$app->params['userStatus'][$result->STATUS_VALUE]['label'], 1, $result->USER_ID, $userInfo['USER_NAME']);
|
|
|
- return static::notice('审核会员状态完成');
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -2020,7 +2025,7 @@ class UserController extends BaseController
|
|
|
public function actionIsOperating()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserStatusForm::class, '调整会员运作状态成功', 'operating', ['operating'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserStatusForm::class, Yii::t('ctx', 'successfully'), 'operating', ['operating'], null, function ($form, $result) {
|
|
|
/*$isOperating = $form->isOperating ? '运作' : '不运作';
|
|
|
if(is_array($result)){
|
|
|
foreach ($result as $value){
|
|
|
@@ -2041,7 +2046,7 @@ class UserController extends BaseController
|
|
|
public function actionIsGroup()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserGroupForm::class, '调整会员团队领导人成功', 'group', ['group'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserGroupForm::class, Yii::t('ctx', 'successfully'), 'group', ['group'], null, function ($form, $result) {
|
|
|
$isGroup = $form->isGroup ? '设为团队领导人' : '取消团队领导人';
|
|
|
if (is_array($result)) {
|
|
|
foreach ($result as $value) {
|
|
|
@@ -2062,7 +2067,7 @@ class UserController extends BaseController
|
|
|
public function actionIsDec()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserDecForm::class, '设置报单中心成功', 'isDec', ['isDec'], null, null);
|
|
|
+ return parent::edit(UserDecForm::class, Yii::t('ctx', 'successfully'), 'isDec', ['isDec'], null, null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2074,7 +2079,7 @@ class UserController extends BaseController
|
|
|
public function actionIsStudio()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserDecForm::class, '设置工作室成功', 'isStudio', ['isStudio'], null, null);
|
|
|
+ return parent::edit(UserDecForm::class, Yii::t('ctx', 'successfully'), 'isStudio', ['isStudio'], null, null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2086,7 +2091,7 @@ class UserController extends BaseController
|
|
|
public function actionIsAtlas()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserDecForm::class, '设置成功', 'isAtlas', ['isAtlas'], null, null);
|
|
|
+ return parent::edit(UserDecForm::class, Yii::t('ctx', 'successfully'), 'isAtlas', ['isAtlas'], null, null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2098,7 +2103,7 @@ class UserController extends BaseController
|
|
|
public function actionIsRecharge()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserDecForm::class, '设置成功', 'isRecharge', ['isRecharge'], null, null);
|
|
|
+ return parent::edit(UserDecForm::class, Yii::t('ctx', 'successfully'), 'isRecharge', ['isRecharge'], null, null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2131,7 +2136,7 @@ class UserController extends BaseController
|
|
|
public function actionChangeTransferProp()
|
|
|
{
|
|
|
if (Yii::$app->request->isPost) {
|
|
|
- return parent::edit(UserTransferPropForm::class, '调整会员转账/提现比例成功', 'change', ['change'], null, function ($form, $result) {
|
|
|
+ return parent::edit(UserTransferPropForm::class, Yii::t('ctx', 'successfully'), 'change', ['change'], null, function ($form, $result) {
|
|
|
/*$remark = $form->remark;
|
|
|
if (is_array($result)) {
|
|
|
foreach ($result as $value) {
|
|
|
@@ -2228,7 +2233,7 @@ class UserController extends BaseController
|
|
|
$formModel = new RechargeForm();
|
|
|
$formModel->scenario = 'addByAdmin';
|
|
|
if ($formModel->load(Yii::$app->request->post(), '') && $result = $formModel->recharge()) {
|
|
|
- return static::notice('充值成功');
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));
|
|
|
}
|
|
|
return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
|
|
|
}
|
|
|
@@ -2243,7 +2248,7 @@ class UserController extends BaseController
|
|
|
$form = new BaUserBasicForm();
|
|
|
$form->scenario = 'modifyPassword';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->edit()){
|
|
|
- return static::notice('Password modified successfully'); // 密码修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully')); // 密码修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -2273,7 +2278,7 @@ class UserController extends BaseController
|
|
|
$form = new BaUserBasicForm();
|
|
|
$form->scenario = 'modifyProfile';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->modifyProfile()){
|
|
|
- return static::notice('Personal data modified successfully');//个人资料修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//个人资料修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -2283,7 +2288,7 @@ class UserController extends BaseController
|
|
|
$form = new BaUserBasicForm();
|
|
|
$form->scenario = 'modifyStatus';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->modifyStatus()){
|
|
|
- return static::notice('Member status modified successfully');//会员状态修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//会员状态修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|
|
|
@@ -2298,7 +2303,7 @@ class UserController extends BaseController
|
|
|
$form = new BaUserBasicForm();
|
|
|
$form->scenario = 'isModifyPasswordStatus';
|
|
|
if(Yii::$app->request->isPost && $form->load(Yii::$app->request->post(), '') && $result = $form->isModifyPasswordStatus()){
|
|
|
- return static::notice('Status modified successfully');//状态修改成功
|
|
|
+ return static::notice(Yii::t('ctx', 'successfully'));//状态修改成功
|
|
|
} else {
|
|
|
return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
|
|
|
}
|