-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpush-index.html
133 lines (128 loc) · 4.85 KB
/
push-index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>最新核查</title>
<link rel="stylesheet" href="css/mui.min.css">
<link rel="stylesheet" href="css/app.css">
<style type="text/css">
input::-webkit-input-placeholder {text-align: left;}
.p_time{font-size: .875rem;}
.p_content{line-height: 1.5;color: #555;}
</style>
</head>
<body class="mui-plus mui-statusbar mui-statusbar-offset">
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">最新核查</h1>
<!--<a class="mui-icon mui-icon-bars mui-pull-right"></a>-->
</header>
<div class="mui-content" ng-app="pushApp" ng-controller="pushCtrl" >
<div id="message_push_detail" class="mui-card" ng-repeat="pushList in PushList">
</div>
</div>
</body>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/mui.min.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="js/template-web.js" type="text/javascript"></script>
<script src="js/common.js" type="text/javascript"></script>
<script src="js/applogin.js" type="text/javascript"></script>
<script id="messagePushDetailTempl" type="text/html">
<div class="mui-card-header">{{name}}</div>
{{each tables table}}
<a href="push-list.html" class="mui-card-content" tableId='{{table.id}}' recordIds="{{table.recordIds}}" tableName="{{table.tableName}}" tableComment="{{table.tableComment}}">
<div class="mui-card-content-inner">
<p class="p_content">{{table.tableComment}}</p>
<p class="p_time">创建时间:<span>{{createTime}}</span></p>
<p class="p_time">下放时间:<span>{{openTime}}</span></p>
</div>
<div class="mui-card-footer">
<a class="mui-btn mui-btn-blue taskBtn" href="push-list.html" tableComment="{{table.tableComment}}" tableId='{{table.id}}' recordIds="{{table.recordIds}}" tableName="{{table.tableName}}">开始任务</a>
</div>
</a>
{{/each}}
</script>
<script src="js/watermark.js" type="text/javascript"></script>
<script type="text/javascript">
mui.plusReady(function(){
var self = plus.webview.currentWebview();
var mpId = self.mpId;//获得参数
// console.log("门派ID先谢谢",mpId);
//跳转至推送记录详情
mui('.mui-content').on('tap', 'a', function() {
var href = this.getAttribute("href");
//非plus环境,直接走href跳转
if(!mui.os.plus) {
location.href = href;
return;
}
//打开新窗口
var id = this.getAttribute("data-wid");
if(!id) {
id = href;
}
if(href && ~href.indexOf('.html')) {
//打开窗口的相关参数
var options = {
styles:{
popGesture: "close"
},
extras:{
'id':this.getAttribute("data-pid"),
'tableId':this.getAttribute("tableId"),
'recordIds':this.getAttribute("recordIds"),
'tableName':this.getAttribute("tableName"),
'tableComment':this.getAttribute("tableComment"),
'mpId':mpId
}
};
// console.log(JSON.stringify(options))
mui.openWindow(href,id,options);
}
});
console.log(base_url+'base/getPushMessageDetail/' + mpId)
//加载推送表信息
mui.ajax(base_url+'/base/getPushMessageDetail/' + mpId, {
dataType:'json',//服务器返回json格式数据
type:'get',//HTTP请求类型
timeout:100000,//超时时间设置为10秒
headers:{
'Content-Type':'application/x-www-form-urlencoded' //此处如果使用application/json 会遇到post发送参数失败的问题
,'user_id_token':app.getUser().userid },
success: function(result) {
var data = result.data;
/*如果返回推送关联的表数据为0,
则认为该任务已经完成。
并请求后台将该推送消息标记为完成 */
// console.log("data:"+JSON.stringify(result));
/*if (data.tables.length == 0) {
mui.ajax(base_url+'/base/updatePushMessage/' + mpId, {
dataType:'json',//服务器返回json格式数据
type:'post',//HTTP请求类型
timeout:10000,//超时时间设置为10秒
headers:{
'Content-Type':'application/x-www-form-urlencoded' //此处如果使用application/json 会遇到post发送参数失败的问题
},
success: function(result) {
//mui.back();
console.log(result);
},
error: function(xhr,type,errorThrown) {
console.log(type);
}
});
}*/
var htmlPushDetail = template('messagePushDetailTempl', data);
// console.log(htmlPushDetail);
console.log(JSON.stringify(result));
$('#message_push_detail').html(htmlPushDetail);
},
error: function(xhr,type,errorThrown) {
console.log(type);
}
});
});
</script>
</html>