123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924 |
- <!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="<?php echo RESOURCE_SITE_URL; ?>/mobile/talk/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(); ?>"/>
- </head>
- <body class="n_room_body">
- <div class="room_pwd_board">
- <div class="board_title">
- <p>输入房间密码</p>
- </div>
- <div class="pwd">
- <div class="one line"></div>
- <div class="two line"></div>
- <div class="three line"></div>
- <div class="four line"></div>
- </div>
- <div class="keyboard">
- <div>
- <a href="javascript:void(0)" class="input_number">1</a>
- <a href="javascript:void(0)" class="input_number">2</a>
- <a href="javascript:void(0)" class="input_number">3</a>
- </div>
- <div>
- <a href="javascript:void(0)" class="input_number">4</a>
- <a href="javascript:void(0)" class="input_number">5</a>
- <a href="javascript:void(0)" class="input_number">6</a>
- </div>
- <div>
- <a href="javascript:void(0)" class="input_number">7</a>
- <a href="javascript:void(0)" class="input_number">8</a>
- <a href="javascript:void(0)" class="input_number">9</a>
- </div>
- <div>
- <a href="javascript:void(0)" class="cancel">取消</a>
- <a href="javascript:void(0)" class="input_number">0</a>
- <a href="javascript:void(0)" class="delete_btn">
- <img src="<?php echo RESOURCE_SITE_URL;?>/mobile/talk/images/del_btn.png" alt="">
- </a>
- </div>
- </div>
- </div>
- <?php
- if(isset($output['tpl']))
- {
- $opentalk = intval($output['param']['open_talk']);
- if($opentalk) {
- $output['tpl']->show_open();
- } else {
- $output['tpl']->show();
- }
- }
- ?>
- <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/jquery-1.11.0.min.js?<?php echo bonus_version(); ?>"></script>
- <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/talk/js/jquery-weui.min.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"
- src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js?<?php echo bonus_version(); ?>"></script>
- <script type="text/javascript"
- src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/qrcode.js"></script>
- <script type="text/javascript">
- $(function () {
- var is_app = <?php echo $output['param']['is_app']; ?>;
- var talk_type = "<?php echo $output['param']['talk_type']; ?>";
- var talk_id = <?php echo $output['param']['talk_id']; ?>;
- var cur_mid = <?php echo $output['param']['member_id']; ?>;
- var relay_id = <?php echo $output['param']['relay_id']; ?>;
- var room_name = '<?php echo $output['param']['room_name']; ?>';
- var room_avatar = '<?php echo $output['param']['room_avatar']; ?>';
- var open_talk = <?php echo $output['param']['open_talk']; ?>;
- if(is_app) {
- var jsBridge = new Bridge();
- if(open_talk > 0) {
- $('html').css({
- 'min-height':"100%",
- 'background':'#FFF'
- });
- }
- }else{
- $('html').css('padding-bottom','60px');
- $('.app_inshow').hide();
- }
- var checkLogin = function () {
- if(is_app>0 && cur_mid <= 0) {
- jsBridge.call_native_handler('on_native_click', '{"action":"login"}', function (data) {
- var jsdata = JSON.parse(data);
- if (!jsdata.login) {
- return;
- }
- else {
- sessionStorage.setItem('is_reload','true');
- window.location.reload();
- }
- });
- }
- var is_reload = sessionStorage.getItem('is_reload');
- if(is_reload) {
- sessionStorage.removeItem('is_reload');
- window.location.reload();
- }
- };
- $(window).on('pageshow',function(){
- checkLogin();
- share_btn();
- });
- function share_btn()
- {
- if(is_app){
- if(talk_type == 'room' && open_talk==0)
- {
- if(room_name == '') room_name = "熊猫美妆";
- var app_share_url = $("#show-qrcode").attr('data-qrcode-url');
- var jsonobject = {
- action:"view_init",
- params: {
- can_share:true,
- title:"我在"+room_name+"群里等你",
- sub_title:"这10000元基金必须有你的一份 加群聊 共享天猫美妆员工价",
- img_url:room_avatar,
- url:app_share_url
- }
- };
- jsBridge.call_native_handler('on_native_click',JSON.stringify(jsonobject));
- }
- }
- }
- function share_wake(){
- if(is_app > 0 && talk_type == 'room')
- {
- var jsonobject = {
- action:"share_page",
- params: {
- path:"",
- title:room_name,
- sub_title:"加入美妆群,下载熊猫美妆APP,分享故事分享红包",
- img_url:room_avatar,
- url:'<?php echo BASE_SITE_URL . "/mobile/index.php?act=index&op=room_index&client_type=wap&talk_type=room&talk_id={$output['param']['talk_id']}"; ?>'
- }
- };
- jsBridge.call_native_handler('on_native_click',JSON.stringify(jsonobject));
- }
- }
- $("#room_share_btn").on('click',function(){
- share_wake();
- });
- if($('#add_group_pwd').length > 0 || $('#add_group_apply').length > 0 || $('#add_group').length > 0) {
- $('html').css({"min-height":"100%",background:"#ffffff"})
- }
- //上传头像 app 上传
- $('#edit_group_avatar').on('click', function (){
- var jsonobject = {
- action: "select_photo",
- params: {
- isCrop: true
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
- var room_avatar = res;
- if(room_avatar) {
- $.showLoading();
- $.post('/mobile/index.php?act=member_talk&op=change_room_avatar2',
- {
- room_id: talk_id,
- file_path: room_avatar,
- client_type: 'ajax'
- }, function (res) {
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return false;
- } else {
- $(".g_avatar").attr("src", result.datas.avatar);
- $.toast('修改成功',1000);
- }
- });
- } else {
- return false;
- }
- });
- return false;
- });
- var getTalkInfo = function () {
- var jsonobject = {
- action: "talk_info",
- params: {
- talk_id: talk_id,
- talk_type: talk_type,//room和chatwo两个类型
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
- var datas = JSON.parse(res);
- if (datas.talk_info.stick) {
- $('#talk_top').attr('checked', true);
- }
- if (datas.talk_info.forbid) {
- $('#no_disturb').attr('checked', true);
- }
- });
- };
- if(is_app) {
- getTalkInfo();
- }
- $('#add_member').on('click', function () {
- var jsonobject = {
- action: "friend_add",
- params: {
- room_id: talk_id
- }
- };
- $.showLoading();
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
- $.hideLoading();
- var datas = JSON.parse(res);
- if (datas.friends.length <= 0 || datas.friends == null) return;
- var add_friends = datas.friends.join(',');
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=invite',
- {
- invitees: add_friends,
- room_id: talk_id,
- client_type: 'ajax'
- },
- function (res) {
- $.hideLoading();
- var datas = JSON.parse(res);
- if (datas.code != 200) {
- $.alert(datas.message);
- return;
- }
- var html = '';
- if (datas.datas.invitees && datas.datas.invitees.length > 0) {
- for (var i = 0; i < datas.datas.invitees.length; i++) {
- html += '<div class="weui-flex__item" data-member-id="' + datas.datas.invitees[i].member_id + '">' +
- '<img src="' + datas.datas.invitees[i].avatar + '" alt="">' +
- '<p>' + datas.datas.invitees[i].nickname + '</p>\n' +
- '</div>'
- }
- $('div[data-last="true"]').after(html);
- $.toast('添加成功',1000);
- }
- });
- });
- });
- $('#del_member').on('click', function () {
- var jsonobject = {
- action: "friend_del",
- params: {
- room_id: talk_id
- }
- };
- $.showLoading();
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
- $.hideLoading();
- var datas = JSON.parse(res);
- if (datas.friends.length <= 0 || datas.friends == null) return;
- var del_friends = datas.friends.join(',');
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=kickout', {
- users: del_friends,
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- var del_users = result.datas.users;
- var num = del_users.length;
- if(num > 0)
- {
- for (var i = 0; i < del_users.length; i++) {
- $('div[data-member-id=' + datas.friends[i] + ']').remove();
- }
- $.toast('删除成功',1000);
- }else
- {
- $.alert("请先移交管理员权限后,再离开聊天");
- return;
- }
- });
- });
- });
- $('#change_owner').on('click', function () {
- var jsonobject = {
- action: "talk_manager",
- params: {
- room_id: talk_id
- }
- };
- $.showLoading();
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
- $.hideLoading();
- var datas = JSON.parse(res);
- if (datas.friends.length <= 0 || datas.friends == null) return;
- var new_owner = datas.friends.join(',');
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=change_room_owner',
- {
- room_owner:new_owner,
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- console.log(result);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- $.toast('转让成功',1000);
- setTimeout(function () {
- window.location.reload();
- },1000);
- });
- });
- });
- $('#talk_top').on('change', function () {
- var _selfVal = $(this).is(':checked');
- var jsonobject;
- if (_selfVal) {
- jsonobject = {
- action: "talk_stick",
- params: {
- talk_id: talk_id,
- talk_type: talk_type,
- stick: true
- }
- };
- }
- else {
- jsonobject = {
- action: "talk_stick",
- params: {
- talk_id: talk_id,
- talk_type: talk_type,
- stick: false
- }
- };
- }
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- $('#no_disturb').on('change', function () {
- var _selfVal = $(this).is(':checked');
- var jsonobject;
- if (_selfVal) {
- jsonobject = {
- action: "talk_forbid",
- params: {
- talk_id: talk_id,
- talk_type: talk_type,
- forbid: true
- }
- };
- }
- else {
- jsonobject = {
- action: "talk_forbid",
- params: {
- talk_id: talk_id,
- talk_type: talk_type,
- forbid: false
- }
- };
- }
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- $('#edit_group_name').on('click', function () {
- $.prompt({
- title: '修改群名称',
- text: '请输入群名称(不得超过15字)',
- empty: false, // 是否允许为空
- onOK: function (input) {
- if (input && input.trim().length <= 15) {
- //点击确认
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=room_edit',
- {
- room_name: input,
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- var new_group_name = input.trim();
- $('#edit_group_name .weui-cell__ft').text(new_group_name);
- $('.group_name h3').text(new_group_name);
- $.toast('修改成功',1000);
- });
- }
- else {
- $.alert('群名称不得超过15字');
- }
- },
- onCancel: function () {
- //点击取消
- }
- });
- });
- $('#edit_nickname').on('click',function(){
- $.prompt({
- title: '修改我的昵称',
- text: '请输入您的昵称(不得超过15字)',
- empty: false, // 是否允许为空
- onOK: function (input) {
- if (input && input.trim().length <= 15) {
- //点击确认
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=change_membernick',
- {
- member_nick: input,
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- var new_group_name = input.trim();
- $('.weui-flex__item[data-member-id="'+cur_mid+'"] p').text(new_group_name);
- $('.group-nickname').text(new_group_name);
- $.toast('修改成功',1000);
- });
- }
- else {
- $.alert('群名称不得超过15字');
- }
- },
- onCancel: function () {
- //点击取消
- }
- });
- });
- $('#edit_room_desc').on('click',function(){
- $.prompt({
- title: '修改群介绍',
- text: '请输入群的简介(65个字符以内)',
- empty: false, // 是否允许为空
- onOK: function (input) {
- if (input && input.trim().length <= 65) {
- //点击确认
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=room_edit',
- {
- room_desc: input,
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- var room_desc = input.trim();
- $('.group_name p').text(room_desc);
- $('#room-desc-btn').text("已设置");
- $.toast('修改成功',1000);
- });
- }
- else {
- $.alert('群介绍不得超过65字');
- }
- },
- onCancel: function () {
- //点击取消
- }
- });
- });
- $('#quit_group').on('click',function(){
- $.confirm({
- title: '确认退出',
- text: '您确认退出该群吗?',
- onOK: function () {
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=leave',{
- room_id:talk_id,
- client_type:'ajax'
- },function(res){
- var datas = JSON.parse(res);
- if(datas.code != 200) {
- $.alert(datas.message);
- $.hideLoading();
- return;
- }
- $.hideLoading();
- $.toast('退出成功',1000);
- if(is_app) {
- var jsonobject = {
- action: "talk_quit",
- params: {
- talk_id: talk_id,
- talk_type: talk_type
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject),function(){
- $.hideLoading();
- });
- } else {
- WeixinJSBridge.call('closeWindow');
- }
- });
- },
- onCancel: function () {
- }
- });
- });
- $('#hide_msg').on('click', function () {
- $.confirm({
- title: '确认清空',
- text: '您确认清空聊天记录吗?',
- onOK: function () {
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=hide_msg',
- {
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- console.log(result);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- $.toast('清除成功',1000);
- var jsonobject = {
- action: "talk_clear",
- params: {
- talk_id: talk_id,
- talk_type: talk_type
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- },
- onCancel: function () {
- }
- })
- });
- $('#add_group').on('click', function () {
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=send_apply',
- {
- room_id: talk_id,
- relay_id:relay_id,
- client_type: 'ajax'
- },
- function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- $.toast('进入成功',1000,function(){
- if(is_app) {
- var jsonobject = {
- action:"chat_to",
- params:{
- talk_type:"room",
- talk_id:talk_id,
- name:'<?php echo str_replace("'","",$output['param']['room_name'])?>'
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- } else {
- window.location.reload();
- }
- });
- });
- });
- $('#add_group_pwd').on('click', function () {
- $('.room_pwd_board').show();
- pwdBoard.clear();
- });
- $('#add_group_apply').on('click', function () {
- window.location.href = "/mobile/index.php?act=member_talk&op=message_board&type=1&talk_id="+talk_id;
- });
- $('#add-member-btn').on('click',function(){
- var member = $(this).attr("data-member-id");
- window.location.href = "/mobile/index.php?act=member_talk&op=message_board&type=2&talk_id="+member;
- });
- $('#talk-member-btn').on('click',function(){
- var nickname = $(this).attr("data-member-nickname").trim();
- var member_id = $(this).attr("data-member-id");
- var jsonobject = {
- action:"chat_to",
- params:{
- talk_type:"chatwo",
- talk_id:member_id,
- name:nickname
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- $('.group_notice_board p').on('click',function(){
- $(this).toggleClass('text_overflow');
- if($(this).hasClass('text_overflow')) {
- $('.group_notice_board').removeAttr('style');
- }
- else {
- $('.group_notice_board').css('max-height','999px');
- }
- });
- $('.qrcode_btn').on('click',function(){
- $('.pop').show(200);
- });
- $('.close_btn').on('click',function(){
- $('.pop').hide();
- });
- $('.pop').on('touchmove',function(e){
- e.preventDefault();
- });
- $('#group_pwd').on('click',function(e){
- if(!$(this).is(':checked')) {
- e.preventDefault();
- $.showLoading();
- $.get('/mobile/index.php?act=member_talk&op=change_passwd',
- {
- room_id: talk_id,
- client_type: 'ajax',
- use_pass:0
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- return;
- }
- $('#group_pwd').removeAttr('checked');
- });
- }
- else {
- $('.room_pwd_board').show();
- pwdBoard.clear();
- }
- });
- $('#group_AC').on('click',function(){
- $.actions({
- actions: [{
- text: "企业认证",
- onClick: function() {
- $('.weui-actionsheet__action .weui-actionsheet__cell').click();
- setTimeout(function () {
- window.location.href="/mobile/index.php?act=member_talk&op=room_certificate&ctype=2&talk_id="+talk_id;
- },0)
- }
- },{
- text: "校园认证",
- onClick: function() {
- $('.weui-actionsheet__action .weui-actionsheet__cell').click();
- setTimeout(function () {
- window.location.href="/mobile/index.php?act=member_talk&op=room_certificate&ctype=1&talk_id="+talk_id;
- },0)
- }
- }]
- });
- });
- $('.group_members .member-detail').on('click',function(){
- var schema = $(this).attr('data-schema');
- window.location.href = schema;
- });
- $("#room-apply-btn").on('click',function () {
- window.location.href = "/mobile/index.php?act=member_talk&op=room_applys&talk_id="+talk_id;
- });
- var make_qrcode = function () {
- var typeNumber = 10;
- var errorCorrectionLevel = 'L';
- var qrCode = qrcode(typeNumber, errorCorrectionLevel);
- qrCode.addData(document.getElementById('show-qrcode').getAttribute('data-qrcode-url'));
- qrCode.make();
- document.getElementById('show-qrcode').innerHTML = qrCode.createImgTag(3,2);
- };
- make_qrcode();
- $("#view-group-notice").on('click',function () {
- var has_notice = parseInt($(this).attr('data-has-notice'));
- var ismanager = parseInt($(this).attr('data-ismanager'));
- if( has_notice || ismanager){
- var schema = $(this).attr("data-schema");
- window.location.href = schema;
- }else{
- $.alert("只有群主可以编辑公告");
- return false;
- }
- });
- var PwdBoard = function(){
- this.send_type = '';
- this.init = function () {
- if($('#add_group_pwd').length > 0) {
- this.send_type = 'apply';
- }
- else {
- this.send_type = 'create';
- }
- this.input();
- this.del();
- this.cancel();
- };
- this.pwd = [];
- this.input = function(){
- var _self = this;
- $(document).on('click','.input_number',function(){
- var number = $(this).text();
- _self.pwd.push(number);
- _self.show();
- if(_self.pwd.length >= 4) {
- _self.send();
- }
- });
- };
- this.clear = function(){
- $('.pwd .line').empty();
- this.pwd = [];
- };
- this.show = function(){
- $('.pwd .line').empty();
- for(var i=0;i<this.pwd.length;i++) {
- $('.pwd .line').eq(i).text(this.pwd[i]);
- }
- };
- this.del = function(){
- var _self = this;
- $(document).on('click','.delete_btn',function(){
- if(_self.pwd.length <= 0) return;
- _self.pwd.pop();
- _self.show();
- });
- };
- this.cancel = function(){
- $(document).on('click','.cancel',function(){
- $('.room_pwd_board').hide();
- $('#group_pwd').removeAttr('checked');
- });
- };
- this.send = function(){
- $.showLoading();
- if(this.send_type == 'create') {
- $.get('/mobile/index.php?act=member_talk&op=change_passwd',
- {
- passwd: this.pwd.join(""),
- room_id: talk_id,
- client_type: 'ajax',
- use_pass:1
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- $('#group_pwd').removeAttr('checked');
- return;
- }
- $('#group_pwd').attr('checked',true);
- setTimeout(function(){
- $('.room_pwd_board').hide();
- },1000);
- $.toast('群密码设置成功',1500);
- });
- }
- else if(this.send_type == 'apply')
- {
- $.get('/mobile/index.php?act=member_talk&op=send_apply',
- {
- passwd :this.pwd.join(""),
- relay_id:relay_id,
- room_id: talk_id,
- client_type: 'ajax'
- }, function (res) {
- $.hideLoading();
- var result = JSON.parse(res);
- if (result.code != 200) {
- $.alert(result.message);
- setTimeout(function(){
- $('.room_pwd_board').hide();
- },1000);
- return;
- }
- setTimeout(function(){
- $('.room_pwd_board').hide();
- },1000);
- $.toast('进入成功',1000);
-
- var jsonobject = {
- action:"chat_to",
- params:{
- talk_type:"room",
- talk_id:talk_id,
- name:'<?php echo str_replace("'","",$output['param']['room_name'])?>'
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- }
- };
- this.init();
- };
- var pwdBoard = new PwdBoard();
- function app()
- {
- var app=navigator.userAgent.toLowerCase(),//判断设备
- app_nav=navigator.appVersion.toLowerCase(),
- href='';
- if (app_nav.indexOf('iphone')>-1&&app.indexOf('iphone')){
- href='http://a.app.qq.com/o/simple.jsp?pkgname=com.lrlz.beautyshop';
- } else if (app.indexOf('micromessenger')>-1 && app_nav.indexOf('android')>-1) {
- href = "<?php echo BASE_SITE_URL . "/hfive/android_down/index.html"; ?>";
- }
- else {
- href="javascript:void(0)";
- }
- return href;
- }
- $('#link').attr('href',app());
- $("#more_members").on('click',function () {
- var url = $(this).attr('data-page');
- window.location.href = url;
- });
- $("#open_talk").on('click',function () {
- var jsonobject = {
- action:"chat_to",
- params:{
- talk_type:"room",
- talk_id:talk_id,
- name:'<?php echo str_replace("'","",$output['param']['room_name'])?>'
- }
- };
- jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- return;
- });
- }
- );
- </script>
- </body>
- </html>
|