Browse Source

充值订单搜索,注册黑名单检测

lizhen_gitee 11 months ago
parent
commit
42224d58ad

+ 5 - 1
application/api/controller/User.php

@@ -129,6 +129,8 @@ class User extends Api
 
         } else {
             $extend = [
+                'plat_unique_id' => input('plat_unique_id',''),
+                'plat_from'      => input('plat_from',''),
             ];
             $ret = $this->auth->register('', '', '', $mobile, $extend);
 
@@ -670,7 +672,7 @@ class User extends Api
 
         $data = [
             'plat_unique_id'  => $plat_unique_id,
-            'plat_from'  => $plat_from,
+            'plat_from'       => $plat_from,
         ];
         Db::name('user')->where('id',$this->auth->id)->update($data);
         $this->success();
@@ -848,6 +850,8 @@ class User extends Api
         } else {
             $extend = [
                 'wechat_openid' => $wechatCode['openid'],
+                'plat_unique_id' => input('plat_unique_id',''),
+                'plat_from'      => input('plat_from',''),
             ];
             $ret = $this->auth->register('', '','', $mobile, $extend);
         }

+ 9 - 0
application/common/library/Auth.php

@@ -222,6 +222,15 @@ class Auth
             return false;
         }*/
 
+        //检测设备号是否拉黑
+        if(isset($extend['plat_unique_id']) && !empty($extend['plat_unique_id'])){
+            $check = Db::name('shebei_black')->where('plat_unique_id',$extend['plat_unique_id'])->find();
+            if($check){
+                $this->setError('设备已拉黑,禁止注册');
+                return false;
+            }
+        }
+
         if(empty($mobile)){
             $this->setError('手机号必填');
             return false;

+ 2 - 1
public/assets/js/backend/payorder.js

@@ -22,10 +22,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 url: $.fn.bootstrapTable.defaults.extend.index_url,
                 pk: 'id',
                 sortName: 'id',
+                search:false,
                 columns: [
                     [
                         {checkbox: true},
-                        {field: 'id', title: __('Id')},
+                        {field: 'id', title: __('Id'),operate:false},
 //                        {field: 'user_id', title: __('User_id')},
                         {field: 'user.username', title: __('User.username'), operate: 'LIKE'},
                         {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},