Browse Source

后台,用户vip等级

lizhen_gitee 2 years ago
parent
commit
fe639dae19

+ 8 - 1
application/admin/lang/zh-cn/userwallet.php

@@ -8,5 +8,12 @@ return [
     'Vip_endtime'   => 'vip到期时间',
     'User.username' => '用户名',
     'User.nickname' => '昵称',
-    'User.mobile'   => '手机号'
+    'User.mobile'   => '手机号',
+    'Vip_level'       => 'vip等级',
+    'Vip_level 0'      => '无',
+    'Vip_level 10'     => '月度会员',
+    'Vip_level 20'     => '季度会员',
+    'Vip_level 30'     => '半年会员',
+    'Vip_level 40'     => '年度会员',
+
 ];

+ 15 - 1
application/admin/model/Userwallet.php

@@ -25,7 +25,8 @@ class Userwallet extends Model
 
     // 追加属性
     protected $append = [
-        'vip_endtime_text'
+        'vip_endtime_text',
+       // 'vip_level_text'
     ];
     
 
@@ -44,6 +45,19 @@ class Userwallet extends Model
         return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
     }
 
+   /* public function getVipLevelList()
+    {
+        return ['0' => __('Vip_level 0'),'10' => __('Vip_level 10'),'20' => __('Vip_level 20'),'30' => __('Vip_level 30'),'40' => __('Vip_level 40'),];
+    }
+
+    public function getVipLevelTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['vip_level']) ? $data['vip_level'] : '');
+        $list = $this->getVipLevelList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }*/
+
+
 
     public function user()
     {

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

@@ -7,7 +7,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 extend: {
                     index_url: 'userwallet/index' + location.search,
                     add_url: 'userwallet/add',
-                    edit_url: 'userwallet/edit',
+//                    edit_url: 'userwallet/edit',
 //                    del_url: 'userwallet/del',
                     multi_url: 'userwallet/multi',
                     import_url: 'userwallet/import',
@@ -33,6 +33,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'money', title: __('Money'), operate:'BETWEEN'},
                         {field: 'gold', title: __('Gold')},
                         {field: 'vip_endtime', title: __('Vip_endtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {field: 'vip_level', title: __('Vip_level'),searchList: {"0":__('Vip_level 0'),"10":__('Vip_level 10'),"20":__('Vip_level 20'),"30":__('Vip_level 30'),"40":__('Vip_level 40')}, formatter: Table.api.formatter.status},
                         {field: 'operate', title: __('Operate'), table: table,
                             buttons:[
                                 {

+ 9 - 10
二期修改数据库.txt

@@ -9,13 +9,12 @@ mt_user_match_video_log  新增字段 money    已同步到线上
 mt_user_match_typing_log  新增字段 money    已同步到线上
 
 二期===================================================================================
-mt_user 新增字段  wechat_account
-mt_user 新增字段  secretvideo_status  默认值 -1
-
-mt_user_secretvideo 新增全表
-
-mt_basedata 新增一行  聊天规范
-网站配置新增  解锁微信号,解锁私密视频
-
-mt_user_wallet   新增字段 vip_level
-mt_payvip_config 新增字段 vip_level
+mt_user 新增字段  wechat_account                           已同步到线上
+mt_user 新增字段  secretvideo_status  默认值 -1            已同步到线上
+mt_user_secretvideo 新增全表                                已同步到线上
+mt_order_secretvideo 新增全表                                已同步到线上
+mt_order_wechataccount 新增全表                            已同步到线上
+mt_basedata 新增一行  聊天规范                               已同步到线上
+网站配置新增  解锁微信号,解锁私密视频                      已同步到线上
+mt_user_wallet   新增字段 vip_level                       已同步到线上
+mt_payvip_config 新增字段 vip_level                       已同步到线上