Explorar el Código

Merge branch 'master' of http://git.huxiukeji.com/zhangxiaobin/ggyuyin

lizhen_gitee hace 1 año
padre
commit
9724f2b93e

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

@@ -10,6 +10,7 @@ return [
     'Desc'             => '公会简介',
     'Notice'           => '公会公告',
     'Status'           => '公会状态',
+    'Status 0'         => '待审核',
     'Status -1'        => '已解散',
     'Status 1'         => '正常',
     'Weight'           => '权重',

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

@@ -33,7 +33,7 @@ class Guild extends Model
 
     public function getStatusList()
     {
-        return ['1' => __('Status 1'),'-1' => __('Status -1')];
+        return ['0' => __('Status 0'),'1' => __('Status 1'),'-1' => __('Status -1')];
     }
 
 

+ 6 - 1
application/api/controller/Guild.php

@@ -3,6 +3,7 @@
 namespace app\api\controller;
 
 use app\common\controller\Api;
+use fast\Random;
 use think\Db;
 use think\Exception;
 use Redis;
@@ -143,10 +144,14 @@ class Guild extends Api
         $guild_notice = $this->request->request("guild_notice"); //公会公告
 
         if(!$guild_name && !$guild_image && !$guild_desc && !$guild_notice) $this->error("请输入要修改的内容!");
+        $user_id = $this->auth->id;
         if (empty($guild_id)) {
             $guildInfo = new \app\common\model\Guild();
+            $guildInfo->user_id = $user_id;
+            $ids = Guild::column("g_id");
+            $guildInfo->g_id = $this->getUinqueId(4, [$ids]);
+            $guildInfo->status = 0;
         } else {
-            $user_id = $this->auth->id;
             // 获取公会信息
             $guildInfo = \app\common\model\Guild::where(["id"=>$guild_id])->find();
             // 验证更新条件

+ 9 - 2
application/config.php

@@ -400,12 +400,19 @@ return [
     //     'SecretId' => 'AKIDd070nmKyAFSP6WHQTEJ1UfeGgquspZ1C',
     //     'SecretKey' => '9qLbjaDcvn0yg6HE0JRhjU6TcV4V5QUI',
     // ],
-    // 腾讯im配置
-    'tencent_im' => [
+    // 腾讯im配置 测试环境
+    /*'tencent_im' => [
         'sdkappid' => '1400556860',
         'identifier' => 'administrator',
         'key' => 'a216112853ffc4b1a5714d60fab9029fcbac86f122fa1a74ca42aa64df9a5324',
         'SecretId' => 'AKIDIOFp78tNbYDbiZ8SVHm0xd1C7k6AyUjg',
         'SecretKey' => 'h8H9l8ED3f16yc06vUm9G5duud5GAnCK',
+    ]*/
+    'tencent_im' => [
+        'sdkappid' => '1400818730',
+        'identifier' => 'administrator',
+        'key' => 'f31aa80a36cef72829fbcdcb10aa2aadcea2944787f2b268d46021e67711326b',
+        'SecretId' => 'AKIDISQCk4FCuSN9j8LL9k7GH6oLgpkAOQDm',
+        'SecretKey' => 'PaZKq8D4vgOtFSYUEoESVLwJVu78wXxA',
     ]
 ];

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

@@ -36,7 +36,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'member', title: __('公会成员数')},
                         // {field: 'weight', title: __('Weight')},
-                        {field: 'status', title: __('Status'), searchList: {"-1":__('Status -1'),"1":__('Status 1')}, formatter: Table.api.formatter.status},
+                        {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: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}