huangdong пре 6 година
родитељ
комит
aff0fad6f8
3 измењених фајлова са 267 додато и 1 уклоњено
  1. 1 1
      helper/room_helper.php
  2. 27 0
      mobile/control/member_talk.php
  3. 239 0
      mobile/templates/default/talk/official_rooms.php

+ 1 - 1
helper/room_helper.php

@@ -169,7 +169,7 @@ class room_helper
         $result = [];
         if(empty($roomids)) return $result;
 
-        $items = $mod_room->getRooms(['room_id' => ['in',$roomids]],'*',$order,$count);
+        $items = $mod_room->getRooms(['type'=>\room\proto_type::room_chat,'room_id' => ['in',$roomids]],'*',$order,$count);
         foreach ($items as $item) {
             $room = new room\room_info($item);
             $result[] = $room->format();

+ 27 - 0
mobile/control/member_talk.php

@@ -1370,6 +1370,33 @@ class member_talkControl extends mbMemberControl
         return self::outsuccess( ["goods" => $goods] ,"/talk/room_goods");
     }
 
+
+    ///////////////认证群列表
+    public function official_roomsOp()
+    {
+        return self::outsuccess(null,'talk/official_rooms');
+    }
+
+    public function ajax_certs_roomsOp()
+    {
+        $mod_room = Model('room');
+        $items = $mod_room->getRooms(["type"=>proto_type::room_chat,"room_level"=>['gt',0]],'*','users desc',$this->page_size(),$this->page_size());
+
+        $rooms = [];
+        $hasmore = false;
+        if(!empty($items))
+        {
+            foreach ($items as $item)
+            {
+                $info = new \room\room_info($item);
+                $rooms[] = $info->format();
+            }
+            $hasmore = count($items) < $this->page_size() ? false : true;
+        }
+
+        return self::outsuccess(["rooms"=>$rooms,"mobile_page" => ["hasmore" => $hasmore,"curpage" => $this->page_no()]]);
+    }
+
     /////
     public function del_fiendsOp()
     {

+ 239 - 0
mobile/templates/default/talk/official_rooms.php

@@ -0,0 +1,239 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
+    <title>捐赠步数</title>
+    <link type="text/css" rel="stylesheet"
+          href="<?php echo RESOURCE_SITE_URL; ?>/mobile/talk/css/weui.css?<?php echo bonus_version(); ?>"/>
+    <link rel="stylesheet"
+          href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css?<?php echo bonus_version(); ?>">
+    <link type="text/css" rel="stylesheet"
+          href="<?php echo RESOURCE_SITE_URL; ?>/mobile/talk/css/homepage.css?<?php echo bonus_version(); ?>"/>
+    <style type="text/css">
+        html, body {
+            background: #ffffff;
+            font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif;
+        }
+        .group_name h3 {
+            margin-top: 7px;
+        }
+
+        .weui-cell__hd img {
+            width: 50px;
+            height: 50px;
+
+        }
+        .group_list .weui-cell__hd img {
+            border-radius: 5px;
+            margin-right: 10px;
+        }
+        .group_list .weui-cell__ft .weui-btn_mini {
+            display: block;
+            font-size: 13px;
+            line-height: 16px;
+            padding: 5px 10px;
+            font-weight: bold;
+        }
+        .title {
+            overflow: hidden;
+        }
+        .title h3{
+            font-size: 15px;
+            margin-left: 15px;
+            margin-top: 10px;
+        }
+        .title span {
+            font-size: 12px;
+            font-weight: 400;
+            color: #333333;
+            margin-right: 15px;
+            margin-top: 12px;
+        }
+        .weui-btn_primary {
+            background: #2B2B2B;
+        }
+        .week_total {
+            font-size: 12px;
+            font-weight: 400;
+            color: #666666;
+        }
+        .sport_echarts {
+            position: relative;
+        }
+        .today_num,.month {
+            position: absolute;
+            right: 15px;
+            top: 10px;
+            font-size: 15px;
+            font-weight: 600;
+            color: #ffffff;
+            z-index: 10;
+        }
+        .month {
+            left: 15px;
+        }
+        .question_mark {
+            width: 14px;
+            height: 14px;
+            vertical-align: bottom;
+            margin-left: 5px;
+        }
+        .rules {
+            position: absolute;
+            right: 15px;
+            bottom: 30px;
+            font-size: 12px;
+        }
+        .group_info {
+            position: relative;
+        }
+    </style>
+</head>
+<body>
+
+<div class="group_list" >
+    <div class="weui-cells" id="apply_list">
+    </div>
+    <div id="load_state"></div>
+</div>
+
+<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js?<?php echo bonus_version(); ?>"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/utility.js?<?php echo bonus_version(); ?>"></script>
+<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js?<?php echo bonus_version(); ?>"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/talk/js/talk_room.js?<?php echo bonus_version(); ?>"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/fastclick.js?<?php echo bonus_version(); ?>"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/new_bridge.js?<?php echo bonus_version(); ?>"></script>
+
+<script type="text/javascript">
+    $(function () {
+        FastClick.attach(document.body);
+
+        var ApplyList = function ()
+        {
+            RoomList.apply(this,arguments);
+            this.droploadCallback = function(res)
+            {
+                var applyList = JSON.parse(res);
+                console.log(applyList);
+
+                if (applyList.code != 200) {
+                    $.alert(applyList.message);
+                    return;
+                }
+
+                var applyHTML = new ApplyHTML(applyList.datas.rooms);
+                applyHTML.appendHTML(this.append_el);
+                if (applyList.datas.mobile_page.hasmore) {
+                    this.curpage = applyList.datas.mobile_page.curpage+1;
+                    this.hasmore = true;
+                    applyHTML.loadHTML(this.load_state_el);
+                }
+                else {
+                    $(window).off('scroll');
+                    this.hasmore = false;
+                    applyHTML.endHTML(this.load_state_el);
+                }
+            };
+        };
+
+
+        var apply_list = new ApplyList({act:'member_talk',op: "ajax_certs_rooms"},"#apply_list","#load_state",true);
+        apply_list.init();
+
+
+        var ApplyHTML = function () {
+            RoomListHTML.apply(this,arguments);
+            this.appendHTML = function (id) {
+                console.log(this);
+                var html = "";
+                for (var i = 0; i < this.useObj.length; i++) {
+                    html +=
+                        "<div class=\"weui-cell\">\n" +
+                        "   <div class=\"weui-cell__hd\">\n" +
+                        "       <img src=\""+this.useObj[i].avatar+"\">\n" +
+                        "   </div>\n" +
+                        "   <div class=\"weui-cell__bd\">\n" +
+                        "       <p>"+this.useObj[i].name+"</p>\n" +
+                        "       <p class='week_total'></p>\n" +
+                        "   </div>\n" +
+                        "</div>";
+                }
+                $(id).append(html);
+            }
+        };
+
+        $(window).on('pageshow',function(){
+            var is_reload = sessionStorage.getItem('is_reload');
+            if(is_reload) {
+                sessionStorage.removeItem('is_reload');
+                window.location.reload();
+            }
+        });
+
+        // $(document).on('click','.refusal_btn',function(){
+        //     var msg_id = $(this).attr('data-msg-id');
+        //     $.showLoading();
+        //     $.get("/mobile/index.php", {
+        //         act: "member_relation",
+        //         op: "handle_applys",
+        //         msg_id: msg_id,
+        //         pass:0,
+        //         client_type: "ajax",
+        //     }, function (res) {
+        //         $.hideLoading();
+        //         var data = JSON.parse(res);
+        //         if (data.code != 200) {
+        //             $.alert(data.message);
+        //             return;
+        //         }
+        //         $.toast('操作成功',1000);
+        //         window.location.reload();
+        //     });
+        //     return false;
+        // });
+        //
+        // $(document).on('click','.agree_btn',function(e)
+        // {
+        //     var msg_id = $(this).attr('data-msg-id');
+        //     $.showLoading();
+        //     $.get("/mobile/index.php", {
+        //         act: "member_relation",
+        //         op: "handle_applys",
+        //         msg_id: msg_id,
+        //         pass:1,
+        //         client_type: "ajax",
+        //     }, function (res) {
+        //         $.hideLoading();
+        //         var data = JSON.parse(res);
+        //         if (data.code != 200) {
+        //             $.alert(data.message);
+        //             return;
+        //         }
+        //         $.toast('操作成功',1000);
+        //
+        //         window.location.reload();
+        //     });
+        //     return false;
+        // });
+
+        $(document).on('click','.applys-item',function(){
+            var schema = $(this).attr('data-schema');
+            window.location.href = schema;
+        });
+
+        $(document).on('click','.member-detail',function(){
+            var id = $(this).attr('data-member-id');
+            window.location.href = "/mobile/index.php?act=user_index&op=detail&member_id="+id;
+        });
+
+        $(document).on('click','.room-detail',function(){
+            var id = $(this).attr('data-room-id');
+            window.location.href = "/mobile/index.php?act=index&op=room_index&talk_type=room&talk_id="+id;
+        });
+    });
+</script>
+</body>
+</html>
+
+