瀏覽代碼

用户保存设备唯一ID

lizhen_gitee 1 年之前
父節點
當前提交
1f209756e2

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

@@ -55,5 +55,6 @@ return [
     'Shoesize'             => '鞋码',
     'Is_tuijian'           => '首页推荐',
     'Is_tuijian 1'         => '是',
-    'Is_tuijian 0'         => '否'
+    'Is_tuijian 0'         => '否',
+    'plat_unique_id'       => '设备唯一ID'
 ];

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

@@ -439,6 +439,7 @@ class User extends Api
         $longitude = input_post('longitude',0);
         $latitude  = input_post('latitude',0);
         $cityname  = input_post('cityname','');
+        $plat_unique_id  = input_post('plat_unique_id','');
         if(empty($longitude) || empty($latitude) || empty($cityname)){
             $this->error();
         }
@@ -447,6 +448,7 @@ class User extends Api
             'longitude' => $longitude,
             'latitude'  => $latitude,
             'cityname'  => $cityname,
+            'plat_unique_id'  => $plat_unique_id,
         ];
         Db::name('user')->where('id',$this->auth->id)->update($data);
         $this->success();

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

@@ -64,6 +64,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
 //                        {field: 'is_active', title: __('Is_active'), searchList: {"1":__('Is_active 1'),"0":__('Is_active 0')}, formatter: Table.api.formatter.normal},
                         {field: 'attribute', title: __('Attribute'), operate: 'LIKE'},
                         {field: 'shoesize', title: __('Shoesize'), operate: 'LIKE'},
+                        {field: 'plat_unique_id', title: __('plat_unique_id'),sortable:true, operate: 'LIKE'},
                         {field: 'is_tuijian', title: __('Is_tuijian'), searchList: {"1":__('Is_tuijian 1'),"0":__('Is_tuijian 0')}, formatter: Table.api.formatter.normal},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]