|
@@ -112,6 +112,7 @@
|
|
},
|
|
},
|
|
success: function (res) {
|
|
success: function (res) {
|
|
if (res.code != 200) {
|
|
if (res.code != 200) {
|
|
|
|
+ $.hideLoading();
|
|
$.alert(res.message);
|
|
$.alert(res.message);
|
|
} else {
|
|
} else {
|
|
var room_avatar = res.datas.file_path;
|
|
var room_avatar = res.datas.file_path;
|
|
@@ -196,9 +197,12 @@
|
|
};
|
|
};
|
|
$.showLoading();
|
|
$.showLoading();
|
|
jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
|
|
jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
|
|
|
|
+ $.hideLoading();
|
|
var datas = JSON.parse(res);
|
|
var datas = JSON.parse(res);
|
|
- if (datas.friends.length <= 0) return;
|
|
|
|
|
|
+ if (datas.friends.length <= 0 || datas.friends == null) return;
|
|
var add_friends = datas.friends.join(',');
|
|
var add_friends = datas.friends.join(',');
|
|
|
|
+
|
|
|
|
+ $.showLoading();
|
|
$.get('/mobile/index.php?act=member_talk&op=invite',
|
|
$.get('/mobile/index.php?act=member_talk&op=invite',
|
|
{
|
|
{
|
|
invitees: add_friends,
|
|
invitees: add_friends,
|
|
@@ -236,9 +240,11 @@
|
|
};
|
|
};
|
|
$.showLoading();
|
|
$.showLoading();
|
|
jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
|
|
jsBridge.call_native_handler('on_native_click', JSON.stringify(jsonobject), function (res) {
|
|
|
|
+ $.hideLoading();
|
|
var datas = JSON.parse(res);
|
|
var datas = JSON.parse(res);
|
|
- if (datas.friends.length <= 0) return;
|
|
|
|
|
|
+ if (datas.friends.length <= 0 || datas.friends == null) return;
|
|
var del_friends = datas.friends.join(',');
|
|
var del_friends = datas.friends.join(',');
|
|
|
|
+ $.showLoading();
|
|
$.get('/mobile/index.php?act=member_talk&op=kick',
|
|
$.get('/mobile/index.php?act=member_talk&op=kick',
|
|
{
|
|
{
|
|
troublemaker: del_friends,
|
|
troublemaker: del_friends,
|
|
@@ -260,6 +266,42 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ $('#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_owner',
|
|
|
|
+ {
|
|
|
|
+ room_owner:new_owner,
|
|
|
|
+ room_id: talk_id,
|
|
|
|
+ client_type: 'ios'
|
|
|
|
+ }, function (res) {
|
|
|
|
+ $.hideLoading();
|
|
|
|
+ var result = JSON.parse(res);
|
|
|
|
+ console.log(result);
|
|
|
|
+ if (result.code != 200) {
|
|
|
|
+ $.alert(result.message);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $.toast('转让成功');
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ window.location.reload();
|
|
|
|
+ },1000);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
$('#talk_top').on('change', function () {
|
|
$('#talk_top').on('change', function () {
|
|
var _selfVal = $(this).is(':checked');
|
|
var _selfVal = $(this).is(':checked');
|
|
var jsonobject;
|
|
var jsonobject;
|