|
|
@@ -170,6 +170,26 @@ class CustomController extends BaseController
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|
|
|
+ //客户vip切换
|
|
|
+ public function actionChangeVip()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $vip = $post['vip'];
|
|
|
+ $id = $post['customId'];
|
|
|
+ unset($post['id']);
|
|
|
+ $custom = CustomClass::getById($id, true, 'id, shopId, vip');
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有找到客户信息');
|
|
|
+ }
|
|
|
+ if ($custom->shopId != $this->shopId) {
|
|
|
+ util::fial('无权限修改');
|
|
|
+ }
|
|
|
+ $custom->vip = $vip;
|
|
|
+ $custom->save();
|
|
|
+
|
|
|
+ util::complete('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
//修改名称 ssh 2022096
|
|
|
public function actionChangeName()
|
|
|
{
|