Explorar o código

昵称和个性签名关键词替换

lizhen_gitee hai 1 ano
pai
achega
23027c8a9a

+ 1 - 1
application/admin/lang/zh-cn/user/user.php

@@ -54,7 +54,7 @@ return [
     'Is_active 1'          => '是',
     'Is_active 0'          => '否',
     'Ios_user_id'          => '苹果用户ID',
-    'Plat_unique_id'       => '设备唯一ID',
+    'Plat_unique_id'       => '设备唯一编号',
     'Marital_id'           => '情感状况',
     'Job_id'               => '职业',
     'Wages_id'             => '收入',

+ 7 - 0
application/api/controller/User.php

@@ -12,6 +12,7 @@ use think\Validate;
 use app\common\library\Token;
 use think\Db;
 use onlogin\onlogin;
+use app\common\library\Keyworld;
 
 use addons\epay\library\Service;
 //use addons\epay\library\Wechat;
@@ -336,6 +337,12 @@ class User extends Api
             if($field == 'photo_images'){
                 $newone = input('photo_images', '', 'trim,strip_tags,htmlspecialchars');
             }
+            if($field == 'nickname'){
+                $newone = Keyworld::sensitive($newone);
+            }
+            if($field == 'bio'){
+                $newone = Keyworld::sensitive($newone);
+            }
 
             $data[$field] = $newone;
         }

+ 1 - 1
public/assets/js/backend/user/user.js

@@ -60,7 +60,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
 //                        {field: 'wechat_openid', title: __('Wechat_openid'), operate: 'LIKE'},
 //                        {field: 'is_active', title: __('Is_active'), searchList: {"1":__('Is_active 1'),"0":__('Is_active 0')}, formatter: Table.api.formatter.normal},
 //                        {field: 'ios_user_id', title: __('Ios_user_id'), operate: 'LIKE'},
-//                        {field: 'plat_unique_id', title: __('Plat_unique_id'), operate: 'LIKE'},
+                        {field: 'plat_unique_id', title: __('Plat_unique_id'), operate: 'LIKE'},
 //                        {field: 'marital_id', title: __('Marital_id'), operate: 'LIKE'},
 //                        {field: 'job_id', title: __('Job_id'), operate: 'LIKE'},
 //                        {field: 'wages_id', title: __('Wages_id'), operate: 'LIKE'},