|
@@ -324,12 +324,14 @@ window.addEventListener('message', function(e) { // 监听 message 事件
|
|
|
U.MD.D.I.selectUser();
|
|
|
}
|
|
|
});
|
|
|
-U.MD.D.I.isRoom = function() {
|
|
|
- U.A.Request(US.Config.pbl + "selectRoomByFile?uid=" + US.userInfo.userid, [], function(res) { //US.userInfo.userid
|
|
|
+U.MD.D.I.isRoom = function () {
|
|
|
+ U.A.Request(US.Config.pbl + "selectRoomByFile?uid=" + US.userInfo.userid, [], function (res) {
|
|
|
if (res.value == null || res.value[0].length == 0) {
|
|
|
U.MD.D.I.openRoomConfirm();
|
|
|
} else {
|
|
|
US.numNum = res.value[0][0].num;
|
|
|
+ US.roomid = res.value[0][0].id;
|
|
|
+ U.MD.D.I.getWork(res.value[0][0].id, res.value[0][0].id);
|
|
|
U.MD.D.I.isOpenRoomConfirm();
|
|
|
}
|
|
|
}, [], { "type": "GET", "withCredentials": true });
|
|
@@ -365,13 +367,14 @@ U.MD.D.I.addRoom = function(numNum) {
|
|
|
}
|
|
|
}, [], { "type": "GET", "withCredentials": true });
|
|
|
}
|
|
|
-U.MD.D.I.goRoom = function(number) {
|
|
|
- U.A.Request(US.Config.pbl + "selectRoomByFile?uid=" + number, [], function(res) { //US.userInfo.userid
|
|
|
+U.MD.D.I.goRoom = function (number) {
|
|
|
+ U.A.Request(US.Config.pbl + "selectRoomByFile?uid=" + number, [], function (res) {
|
|
|
if (res.value[0].length > 0) {
|
|
|
U.alert("加入成功");
|
|
|
if ($("#add_room")[0]) {
|
|
|
- $("#add_room")[0].close(); //关闭登陆
|
|
|
+ $("#add_room")[0].close();
|
|
|
}
|
|
|
+ U.MD.D.I.getWork(res.value[0][0].id, res.value[0][0].userid);
|
|
|
} else {
|
|
|
U.alert("此房间不存在或已被解散");
|
|
|
}
|
|
@@ -396,6 +399,17 @@ U.MD.D.I.copyText = function(target) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+U.MD.D.I.getWork = function (rid, uid) {
|
|
|
+ // U.A.Request(US.SCOKET, ["getWord", rid, US.pageId, uid], function (r) {
|
|
|
+ // console.log(r);
|
|
|
+ // });
|
|
|
+ U.A.Request(US.Config.pbl + "select_file?fid=" + rid, [], function (res) {
|
|
|
+ if (res.value[0].length > 0) {
|
|
|
+ US.data = JSON.parse(res.value[0][0].data);
|
|
|
+ }
|
|
|
+ }, [], { "type": "GET", "withCredentials": true });
|
|
|
+}
|
|
|
+
|
|
|
U.MD.D.I.addPerson = function() {
|
|
|
var BOX = $$("div", {});
|
|
|
var form_main = $$('div', { "className": "form-main" }, BOX);
|