Przeglądaj źródła

工会改公会

lizhen_gitee 1 rok temu
rodzic
commit
e5144f8579

+ 1 - 1
application/admin/controller/guild/Guild.php

@@ -6,7 +6,7 @@ use app\admin\model\Message;
 use app\common\controller\Backend;
 
 /**
- * 会管理
+ * 会管理
  *
  * @icon fa fa-circle-o
  */

+ 2 - 2
application/admin/lang/zh-cn/guild/guild.php

@@ -3,8 +3,8 @@
 return [
     'Id'                       => 'id',
     'G_id'                     => '公会搜索ID',
-    'User_id'                  => '公会长',
-    'Party_id'                 => '会房间',
+    'User_id'                  => '公会长id',
+    'Party_id'                 => '会房间',
     'Name'                     => '公会名称',
     'Image'                    => '公会logo',
     'Desc'                     => '公会简介',

+ 1 - 1
application/admin/lang/zh-cn/guild/member.php

@@ -6,7 +6,7 @@ return [
     'Role'          => '角色',
     'Role 0'        => '普通成员',
     'Role 1'        => '家族管理员',
-    'Role 2'        => '会长',
+    'Role 2'        => '会长',
     'Sign_type'     => '签约类型',
     'Sign_type 1'   => '三个月',
     'Sign_type 2'   => '半年',

+ 2 - 2
application/admin/lang/zh-cn/party/party.php

@@ -4,7 +4,7 @@ return [
     'Id'                  => 'ID',
     'User_id'             => '房主ID',
     'Room_type'           => '房间类型',
-    'Room_type 1'         => '会房',
+    'Room_type 1'         => '会房',
     'Room_type 2'         => 'K歌厅',
     'Is_cool'             => '靓号',
     'Is_cool 1'           => '是',
@@ -16,7 +16,7 @@ return [
     'Party_notice'        => '房间公告标题',
     'Party_notice_detail' => '房间公告描述',
     'Platrate'            => '平台抽成(%)',
-    'Guilderrate'         => '会长抽成(%)',
+    'Guilderrate'         => '会长抽成(%)',
     'Naming'              => '派对冠名',
     'Is_online'           => '在线状态',
     'Is_online 1'         => '在线',

+ 1 - 1
application/admin/lang/zh-cn/platprofit/guild.php

@@ -6,7 +6,7 @@ return [
     'Party_id'         => '派对ID',
     'Gift_value'       => '礼物总价值',
     'Plat_value'       => '平台抽成',
-    'Guilder_value'    => '会长抽成',
+    'Guilder_value'    => '会长抽成',
     'Createtime'       => '创建时间',
     'Guild.g_id'       => '公会搜索ID',
     'Guild.user_id'    => '公会长',

+ 18 - 17
application/admin/view/guild/guild/edit.html

@@ -6,7 +6,7 @@
             <input id="c-g_id" data-rule="required" data-source="g/index" class="form-control selectpage" name="row[g_id]" type="text" value="{$row.g_id|htmlentities}">
         </div>
     </div>-->
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
@@ -17,7 +17,7 @@
         <div class="col-xs-12 col-sm-8">
             <input id="c-party_id" data-rule="required" data-source="party/index" class="form-control selectpage" name="row[party_id]" type="text" value="{$row.party_id|htmlentities}">
         </div>
-    </div>
+    </div>-->
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
         <div class="col-xs-12 col-sm-8">
@@ -50,37 +50,38 @@
             <textarea id="c-notice" class="form-control " rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
         </div>
     </div>
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Member')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-member" class="form-control" name="row[member]" type="number" value="{$row.member|htmlentities}">
         </div>
-    </div>
-    <div class="form-group">
+    </div>-->
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Weight')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-weight" class="form-control" name="row[weight]" type="number" value="{$row.weight|htmlentities}">
         </div>
+    </div>-->
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Info')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-info" class="form-control" name="row[info]" type="text" value="{$row.info|htmlentities}">
+        </div>
     </div>
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
         <div class="col-xs-12 col-sm-8">
-            
+
             <div class="radio">
-            {foreach name="statusList" item="vo"}
-            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
-            {/foreach}
+                {foreach name="statusList" item="vo"}
+                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
+                {/foreach}
             </div>
 
         </div>
     </div>
-    <div class="form-group">
-        <label class="control-label col-xs-12 col-sm-2">{:__('Info')}:</label>
-        <div class="col-xs-12 col-sm-8">
-            <input id="c-info" class="form-control" name="row[info]" type="text" value="{$row.info|htmlentities}">
-        </div>
-    </div>
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Province_id')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-province_id" data-rule="required" data-source="province/index" class="form-control selectpage" name="row[province_id]" type="text" value="{$row.province_id|htmlentities}">
@@ -91,7 +92,7 @@
         <div class="col-xs-12 col-sm-8">
             <input id="c-city_id" data-rule="required" data-source="city/index" class="form-control selectpage" name="row[city_id]" type="text" value="{$row.city_id|htmlentities}">
         </div>
-    </div>
+    </div>-->
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 1 - 1
application/api/controller/Family.php

@@ -484,7 +484,7 @@ class Family extends Api
         $memberInfo["createtime"] = !empty($memberInfo["createtime"]) ? date("Y-m-d", $memberInfo["createtime"]) : '';
         $memberInfo["logintime"] = !empty($logintime) ? date("Y-m-d", $logintime) : '';
 
-        //我在这个会的角色
+        //我在这个会的角色
         $myGuildMember = model('FamilyMember')->field('role')->where(["user_id"=>$this->auth->id,"guild_id"=>$memberInfo->guild_id])->find();
         $memberInfo["my_role"] = !empty($myGuildMember) ? $myGuildMember['role'] : -1;
 

+ 5 - 5
application/api/controller/Guild.php

@@ -437,14 +437,14 @@ class Guild extends Api
                 $res4 = \app\common\model\Guild::where(["id"=>$guildInfo->id])->setInc("member");
                 if($res1 && $res2 && $res3 && $res4) {
                     // +message
-                    \app\common\model\Message::addMessage($joininInfo->user_id,"工会审核通知","恭喜,您的加入工会审核通过啦!工会ID:".$guildInfo->g_id);
+                    \app\common\model\Message::addMessage($joininInfo->user_id,"公会审核通知","恭喜,您的加入公会审核通过啦!公会ID:".$guildInfo->g_id);
                     Db::commit();
                     $this->success("已审核通过!");
                 }
             } else {
                 if($res1 && $res2) {
                     // +message
-                    \app\common\model\Message::addMessage($joininInfo->user_id,"工会审核通知","您的工会加入申请,会长审核拒绝,没关系,调整姿势再来一遍!");
+                    \app\common\model\Message::addMessage($joininInfo->user_id,"公会审核通知","您的公会加入申请,会长审核拒绝,没关系,调整姿势再来一遍!");
                     Db::commit();
                     $this->success("已审核拒绝!");
                 }
@@ -606,7 +606,7 @@ class Guild extends Api
         $memberInfo["createtime"] = !empty($memberInfo["createtime"]) ? date("Y-m-d", $memberInfo["createtime"]) : '';
         $memberInfo["logintime"] = !empty($logintime) ? date("Y-m-d", $logintime) : '';
 
-        //我在这个会的角色
+        //我在这个会的角色
         $myGuildMember = model('GuildMember')->field('role')->where(["user_id"=>$this->auth->id,"guild_id"=>$memberInfo->guild_id])->find();
         $memberInfo["my_role"] = !empty($myGuildMember) ? $myGuildMember['role'] : -1;
 
@@ -714,7 +714,7 @@ class Guild extends Api
         if(!$memberInfo) $this->error("会员信息查询失败!");
 
         if($memberInfo['role'] == 2 || $memberInfo['user_id'] == $guildInfo['user_id']){
-            $this->error('会长不能被踢出会');
+            $this->error('会长不能被踢出会');
         }
 
         Db::startTrans();
@@ -844,7 +844,7 @@ class Guild extends Api
         if($applyInfo && $applyInfo->status>=0) $this->error("您已经发送过开厅申请了,请勿重复发送!");
         // 查看是否有加入公会的申请
         $joinInfo = \app\common\model\GuildJoinin::where(["user_id"=>$user_id,"status"=>0])->find();
-        if($joinInfo) $this->error("您存在申请加入公会信息,请联系会长处理完毕后方可申请开厅!");
+        if($joinInfo) $this->error("您存在申请加入公会信息,请联系会长处理完毕后方可申请开厅!");
         // 查看是已经是公会成员
         $memberInfo = \app\common\model\GuildMember::where(["user_id"=>$user_id])->find();
         if($memberInfo) $this->error("您已存在签约中的公会,无法开新厅!");

+ 6 - 6
application/api/controller/Party.php

@@ -101,7 +101,7 @@ class Party extends Api
         $party_name = input('party_name');
         $seatnum    = input('seatnum');
         $is_public  = input('is_public',1); //是否公开:1=是,0=否
-        $room_type  = input('room_type',2); // 房间类型:1=会房,2=K歌房
+        $room_type  = input('room_type',2); // 房间类型:1=会房,2=K歌房
         $partyModel = new \app\common\model\Party();
 
         $user_id = $this->auth->id;
@@ -132,12 +132,12 @@ class Party extends Api
             $authInfo = model('Guild')->where(["user_id"=>$user_id])->order('id desc')->find();
             if($authInfo) {
                 if($authInfo->status == 0) {
-                    $this->error("您的会申请还在这审核中...,请耐心等待!");
+                    $this->error("您的会申请还在这审核中...,请耐心等待!");
                 } elseif($authInfo->status == -1) {
-                    $this->error("您的会申请已解散,请重新申请!");
+                    $this->error("您的会申请已解散,请重新申请!");
                 }
             } else {
-                $this->error("请先申请会!");
+                $this->error("请先申请会!");
             }
         }
 
@@ -167,7 +167,7 @@ class Party extends Api
             if($party_id > 9999) {
                 $this->error("房间超限,请联系客服");
             }
-            if ($room_type == 1) {//会房间获取家族信息
+            if ($room_type == 1) {//会房间获取家族信息
                 $guildWhere['user_id'] = $user_id;
                 $guildWhere['status'] = 1;
                 $guild = model('Guild')->where($guildWhere)->order('id desc')->find();
@@ -812,7 +812,7 @@ class Party extends Api
                 }
             }
 
-            // 公会管理员和会长激活派对厅
+            // 公会管理员和会长激活派对厅
            /* $guildInfo = \app\common\model\Guild::where(['user_id' => $partyInfo['user_id'], 'status' => 1])->find();
             if ($guildInfo) {
                 // 获取公会管理员

+ 1 - 1
application/common/model/Guild.php

@@ -36,7 +36,7 @@ class Guild extends Model
                 "createtime" => time()
             ];
             $guild_id = self::insertGetId($data);
-            // 添加会长
+            // 添加会长
             $data = [
                 "guild_id" => $guild_id,
                 "user_id" => $user_id,

+ 1 - 1
application/common/service/UserService.php

@@ -315,7 +315,7 @@ class UserService
             $guildWhere['id'] = $guildId;
             $guild = model('Guild')->where($guildWhere)->find();
             if (empty($guild)) {
-                throw new Exception('未找到会信息');
+                throw new Exception('未找到会信息');
             }
             $guildRole = 4;//家族角色:1组长,2副族长,3成员,4非成员
             if ($userId == $guild['user_id']) {

+ 6 - 5
public/assets/js/backend/guild/guild.js

@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     index_url: 'guild/guild/index' + location.search,
                     add_url: 'guild/guild/add',
                     edit_url: 'guild/guild/edit',
-                    del_url: 'guild/guild/del',
+//                    del_url: 'guild/guild/del',
                     multi_url: 'guild/guild/multi',
                     import_url: 'guild/guild/import',
                     table: 'guild',
@@ -28,18 +28,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'id', title: __('Id')},
 //                        {field: 'g_id', title: __('G_id')},
                         {field: 'user_id', title: __('User_id')},
+                        {field: 'user.username', title: __('User.username'), operate: 'LIKE'},
+
                         {field: 'party_id', title: __('Party_id')},
                         {field: 'name', title: __('Name'), operate: 'LIKE'},
                         {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'member', title: __('Member')},
-                        {field: 'weight', title: __('Weight')},
+//                        {field: 'weight', title: __('Weight')},
                         {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"-1":__('Status -1')}, formatter: Table.api.formatter.status},
                         {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {field: 'info', title: __('Info'), operate: 'LIKE'},
-                        {field: 'province_id', title: __('Province_id')},
-                        {field: 'city_id', title: __('City_id')},
-                        {field: 'user.username', title: __('User.username'), operate: 'LIKE'},
+//                        {field: 'province_id', title: __('Province_id')},
+//                        {field: 'city_id', title: __('City_id')},
                         {field: 'shoproarea.province_name', title: __('Shoproarea.province_name'), operate: 'LIKE'},
                         {field: 'shoproarea.name', title: __('Shoproarea.name'), operate: 'LIKE'},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}