| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //刷新弹出框
- //t = setInterval("showAuto()", 1000 * 60);
- showAuto()
- function sendmsg() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/getbxmessagelist", //获取数据的Servlet地址
- async: true,
- dataType: 'json',
- data: {isread:0},
- success: function(data) {
- if(data.data.rows.length) {
- $('audio').remove();
- audioElementHovertree = document.createElement('audio');
- audioElementHovertree.setAttribute('src', './js/video/Sound.mp3');
- audioElementHovertree.setAttribute('autoplay', 'autoplay'); // 打开自动播放
- var orderId = data.data.rows[0].id
- layer.confirm('来新工单了', {
- icon: 7,
- btn: ['确定'], // 按钮
- shade: 0,
- offset: "rb"
- }, function (index) {
- // 当用户点击“确定”按钮时执行的代码
- console.log('用户点击了确定');
- updataOrderMsg(orderId)
- layer.close(index); // 关闭确认框
- });
- }
- }
- });
- }
- function updataOrderMsg(orderId){
-
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/getyd?id="+orderId, //获取数据的Servlet地址
- async: true,
- dataType: 'json',
- // data: {isread:1},
- success: function(data) {
- if (data.state === "success") {
- layer.msg("已读成功!");
- } else {
- layer.msg("消息提醒操作失败!");
- }
- }
- });
- }
- function showAuto() {
- sendmsg()
- }
|