MyMesgone.blade.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. {include file="Application/Home/View/Public/header.blade.php"}
  2. {include file="Application/Home/View/Public/userLeft.blade.php"}
  3. <link rel="stylesheet" href="/Public/Home/css/center.css"/>
  4. {literal}
  5. <style type="text/css">
  6. /* CSS样式制作 */
  7. *{padding:0px; margin:0px;}
  8. #tab{
  9. overflow: hidden;
  10. }
  11. .hide{
  12. display: none;
  13. }
  14. #tab div{
  15. width: 90%;
  16. line-height:24px;
  17. border-top:none;
  18. padding:1px;
  19. /*border:1px solid #336699;*/
  20. padding:10px;
  21. }
  22. #tab a{
  23. display: block;
  24. width: 100%;
  25. text-decoration:none;
  26. color:black;
  27. }
  28. #tab a:hover{
  29. text-decoration:none;
  30. color:#336699;
  31. }
  32. .hide{display:none;}
  33. #magNumber{
  34. width: 20px;
  35. height: 20px;
  36. border-radius:100%;
  37. text-align: center;
  38. background-color: #0cc936;
  39. color: white;
  40. }
  41. dd {
  42. display: block;
  43. margin: 0;
  44. padding: 0;
  45. }
  46. .ky-messageWin {
  47. line-height: 30px;
  48. }
  49. .ky-messageWin ul {
  50. margin: 0;
  51. padding: 0;
  52. width: 100%;
  53. display: block;
  54. margin-bottom: 20px;
  55. }
  56. .ky-nonmsgtype {
  57. list-style-type: none;
  58. }
  59. .ky-nonmsgtype ul {
  60. display: block;
  61. margin: 10px 0 0 0;
  62. padding-left: 10px;
  63. }
  64. .ky-messageWin dl dt {
  65. display: block;
  66. margin-left: 10px;
  67. }
  68. .ky-messageWin dt {
  69. border-width: 0px 0px 1px 0px;
  70. border-style: solid;
  71. border-color: rgba(193, 184, 184, 0.58);
  72. }
  73. .ky-nonmsgtype li{
  74. cursor: pointer;
  75. }
  76. .ky-nonmsgtype li,
  77. .ky-content li {
  78. display: inline-block;
  79. margin-right: 10px;
  80. font-size: 14px;
  81. line-height: 30px;
  82. }
  83. .ky-content {
  84. margin: 10px 10px 0 15px;
  85. }
  86. .ky-content li {
  87. display: block;
  88. margin-bottom: 10px;
  89. border: 1px dashed;
  90. border-width: 0 0 1px 0;
  91. line-height: 45px;
  92. }
  93. .ky-content li a, .ky-content li a:hover {
  94. font-weight: 400;
  95. font-size: 14px;
  96. color: #051321;
  97. text-decoration: none;
  98. }
  99. .ky-content .noread a {
  100. color: red;
  101. font-weight: 800;
  102. text-decoration: none;
  103. font-size: 15px;
  104. }
  105. .noread a {
  106. color: red;
  107. font-weight: 800;
  108. text-decoration: none;
  109. font-size: 15px;
  110. }
  111. .ky-content a:hover {
  112. color: blue;
  113. text-decoration: underline;
  114. font-size: 16px;
  115. }
  116. .ky-nonmsgtype li a {
  117. color: #051321;
  118. text-decoration: none;
  119. }
  120. .ky-messageWin {
  121. width: 90%;
  122. /*border: 1px solid grey;*/
  123. }
  124. .ky-messageWin dt {
  125. border-width: 0px 0px 1px 0px;
  126. border-style: solid;
  127. border-color: rgba(193, 184, 184, 0.58);
  128. }
  129. .ky-nonmsgtype .current {
  130. color: red;
  131. font-weight: 800;
  132. font-size: 17px;
  133. }
  134. .ky-show-title {
  135. font-size: 18px;
  136. font-weight: 800;
  137. display: block;
  138. line-height: 40px;
  139. text-align: center;
  140. }
  141. .ky-show-date {
  142. display: block;
  143. text-align: right;
  144. margin-right: 50px;
  145. }
  146. </style>
  147. {/literal}
  148. {literal}
  149. <div class="member-content">
  150. <div class="content_h">
  151. <div class="ky-messageWin">
  152. <dl id = "tab">
  153. <dt class="ky-nonmsgtype" >
  154. <ul >
  155. <li class="off"><a href="/Home-Account/myMesg">所有消息</a></li>
  156. <li class="current"><a href="/Home-Account/myMesgone">系统通知</a></li>
  157. </ul>
  158. </dt>
  159. <dd >
  160. <div class="ky-content" id="thirdPage" class="show">
  161. <ul>
  162. <template v-for="li in list">
  163. <template v-if="li.hasread == 0">
  164. <li class="noread" >
  165. <a href="#" style="color: red;display: inline-block;width: 90%;" onclick="bb({{ li.id }})"><span>【未读】</span>
  166. <span style="float: left;">[系统通知]</span>
  167. <span v-text='li.title'></span><span style="float:right" v-text='li.add_time'>2017-05-25 12:20</span></a>
  168. </li>
  169. </template>
  170. <template v-else>
  171. <li class="">
  172. <a href="#" style="color: black;display: inline-block;width: 90%;" onclick="bb({{ li.id }})"><span>【已读】</span>
  173. <span style="float: left;">[系统通知]</span>
  174. <span v-text='li.title'></span><span style="float:right" v-text='li.add_time'>2017-05-25 12:20</span></a>
  175. <span style="display: inline-block;float:right;margin-left: 20px;color: black;font-size: 15px;font-weight: 800;cursor: pointer;" onclick="del({{ li.id }})">删除</span>
  176. </li>
  177. </template>
  178. </template>
  179. </ul>
  180. <span style="float: left;text-decoration: none;"><a href="#" onclick="message(1,3)">上一页</a></span><span style="float: right;text-decoration: none;"><a href="#" onclick="message(2,3)">下一页</a></span>
  181. </div>
  182. </dd>
  183. </dl>
  184. </div>
  185. </div>
  186. </div>
  187. {/literal}
  188. </div>
  189. </div>
  190. <script src="/Public/Home/js/checkToken.js"></script>
  191. <script src="/Public/Home/js/jqPaginator.js"></script>
  192. {literal}
  193. <script type="text/javascript">
  194. function del(e){
  195. console.log(e);
  196. apiAjax('/Api-Other/DelMessageRed',{'id':e},function(data){
  197. if (data.status==1) {
  198. alert('成功');
  199. }else{
  200. alert('失败');
  201. }
  202. window.location.href="/Home-Account/myMesgone";
  203. });
  204. }
  205. $(".leftList>li").removeClass('active');
  206. $(".leftList>li li").removeClass('active');
  207. $(".leftList>li").eq(1).addClass('active');
  208. $(".leftList>li.active").find('li').eq(2).addClass('active');
  209. function bb(id) {
  210. apiAjax('/Api-Other/MessageRed',{'id':id},function(data){
  211. });
  212. window.location.href="/home/account/messge?id="+id;
  213. }
  214. // JS实现选项卡切换
  215. // window.onload = function(){
  216. // var myTab = document.getElementById("tab"); //整个div
  217. // var myUl = myTab.getElementsByTagName("ul")[0];//一个节点
  218. // var myLi = myUl.getElementsByTagName("li"); //数组
  219. // var myDiv = myTab.getElementsByTagName("div"); //数组
  220. // for(var i = 0; i<myLi.length;i++){
  221. // myLi[i].index = i;
  222. // myLi[i].onclick = function(){
  223. // for(var j = 0; j < myLi.length; j++){
  224. // myLi[j].className="off";
  225. // $(myDiv[j]).removeClass('show');
  226. // $(myDiv[j]).addClass("hide");
  227. // }
  228. // this.className = "current";
  229. // $(myDiv[this.index]).removeClass('hide');
  230. // $(myDiv[this.index]).addClass("show");
  231. // }
  232. // }
  233. // };
  234. //去除消息通知的点号
  235. $('#msg').hide();
  236. //获取消息列表
  237. var ALLReade=new Vue({
  238. el:'#Page1',
  239. data:{
  240. list:[],
  241. num:[],
  242. page:1,
  243. }
  244. });
  245. //系统消息
  246. var system=new Vue({
  247. el:'#thirdPage',
  248. data:{
  249. list:[],
  250. }
  251. });
  252. function message(pa,type) {
  253. if (pa == 1){
  254. var page = (ALLReade.page)-1;
  255. }else {
  256. var page = (ALLReade.page)+1;
  257. }
  258. // console.log(page);
  259. apiAjax('/api/other/AllMessage',{page:page,type:type},function (data) {
  260. if(data.status==1){
  261. val=data.data.data;
  262. system.list=data.data.data;
  263. ALLReade.page=data.data.page;
  264. }
  265. });
  266. }
  267. apiAjax('/api/other/AllMessage',{type:3},function (data) {
  268. if(data.status==1){
  269. val=data.data.data;
  270. system.list=data.data.data;
  271. ALLReade.page=data.data.page;
  272. }
  273. });
  274. </script>
  275. {/literal}
  276. {include file="Application/Home/View/Public/footer.php"}