You've already forked qlg.tsgz.moe
							
							Init Repo
This commit is contained in:
		
							
								
								
									
										82
									
								
								hyhproject/home2/view/default/users/messages/list.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										82
									
								
								hyhproject/home2/view/default/users/messages/list.html
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,82 @@ | ||||
| {extend name="default/users/base" /} | ||||
| {block name="title"}首页-买家中心{__block__}{/block} | ||||
| {block name="css"} | ||||
| {/block} | ||||
| {block name="content"} | ||||
| <div class="wst-user-head"><span>用户信息</span></div> | ||||
| <div class="wst-clear"></div> | ||||
| <div class="u-menu"> | ||||
|    <a href="javascript:void(0)" onclick="batchRead()">标记为已读</a> | | ||||
|    <a href='javascript:void(0);' onclick="batchDel()" >删除</a> | ||||
| </div> | ||||
|  | ||||
|   <div class="wst-body">  | ||||
|        <div class='wst-page-content'>         | ||||
|         <table class='wst-list'> | ||||
|            <thead> | ||||
|              <tr> | ||||
|                <th width='25'> | ||||
|                 <div class="checkbox-box-s"> | ||||
|                    <input class="wst-checkbox-s" onclick="javascript:WST.checkChks(this,'.chk')" type='checkbox' id="all"/> | ||||
|                    <label for="all"></label> | ||||
|                  </div> | ||||
|               </th> | ||||
|                <th width='45'>状态</th> | ||||
|                <th>消息</th> | ||||
|                <th width='130'>时间</th> | ||||
|                <th width='100'>操作</th> | ||||
|              </tr> | ||||
|            </thead> | ||||
|            <script id="msg" type="text/html"> | ||||
|             {{# for(var i = 0, len = d.length; i < len; i++){ }} | ||||
|              <tr> | ||||
|                <td> | ||||
|                   <div class="checkbox-box-s"> | ||||
|                     <input type='checkbox'  class='chk wst-checkbox-s' id="chk-{{i}}" value='{{ d[i].id }}' /><label class='mt-1' for="chk-{{i}}"></label> | ||||
|                   </div> | ||||
|                </td> | ||||
|                <td> | ||||
|  | ||||
|                {{# if(d[i].msgStatus ==1) { }} | ||||
|                 <div class='readMsg'></div> | ||||
|                {{# }else{ }} | ||||
|                 <div class='newMsg'></div> | ||||
|                {{# } }} | ||||
|                </td> | ||||
|                <td><div class="wst-hide msg-content">{{ d[i].msgContent }}</div></td> | ||||
|                <td>{{ d[i].createTime }}</td> | ||||
|                <td> | ||||
|                <a class="s-handle" href="javascript:showMsg({{ d[i].id }})">[查看]</a> | ||||
|                <a class="s-handle" href="javascript:delMsg(this,{{ d[i].id }})">[删除]</a> | ||||
|                  | ||||
|                </td> | ||||
|              </tr> | ||||
|             {{# } }} | ||||
|             </script> | ||||
|            <tbody id="msg_box"> | ||||
|  | ||||
|            	 | ||||
|  | ||||
|  | ||||
|  | ||||
|              <tfoot> | ||||
|              <tr> | ||||
|                 <td colspan='12' align='center'> | ||||
|  | ||||
|                 <div id="wst-page" class='wst-page' style="padding-bottom:10px;"> | ||||
|                 </div> | ||||
|  | ||||
|                 </td> | ||||
|              </tr> | ||||
|              </tfoot> | ||||
|            </tbody> | ||||
|         </table> | ||||
|  | ||||
|         | ||||
|  | ||||
|         </div> | ||||
|     </div> | ||||
| {/block} | ||||
| {block name="js"} | ||||
| <script type='text/javascript' src='__STYLE__/users/messages/message.js?v={$v}'></script> | ||||
| {/block} | ||||
							
								
								
									
										106
									
								
								hyhproject/home2/view/default/users/messages/message.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										106
									
								
								hyhproject/home2/view/default/users/messages/message.js
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,106 @@ | ||||
| $(function(){ | ||||
|   queryByList(); | ||||
| }); | ||||
| function queryByList(p){ | ||||
|      var params = {}; | ||||
|      params.page = p; | ||||
|      var load = WST.load({msg:'正在加载信息,请稍后...'}) | ||||
|      $.post(WST.U('Home/Messages/pageQuery'),params,function(data,textStatus){ | ||||
|     	   layer.close(load); | ||||
|          var json = WST.toJson(data); | ||||
| 	       if(json.data){ | ||||
| 		        json = json.data; | ||||
|             if(params.page>json.TotalPage && json.TotalPage >0){ | ||||
|                queryByList(json.TotalPage); | ||||
|                return; | ||||
|             } | ||||
| 	          var gettpl = document.getElementById('msg').innerHTML; | ||||
| 	          //复选框为未选中状态 | ||||
| 	          $('#all').attr('checked',false); | ||||
| 	          laytpl(gettpl).render(json.Rows, function(html){ | ||||
| 	             $('#msg_box').html(html); | ||||
| 	          }); | ||||
|             laypage({ | ||||
|               cont: 'wst-page',  | ||||
|               pages:json.TotalPage,  | ||||
|               curr: json.CurrentPage, | ||||
|               skin: '#e23e3d', | ||||
|               groups: 3, | ||||
|               jump: function(e, first){ | ||||
|                   if(!first){ | ||||
|                       queryByList(e.curr); | ||||
|                   } | ||||
|               }  | ||||
|             }); | ||||
|                | ||||
| 	        } | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function showMsg(id){ | ||||
|   location.href=WST.U('home/messages/showMsg','msgId='+id); | ||||
| } | ||||
|  | ||||
| function delMsg(obj,id){ | ||||
| WST.confirm({content:"您确定要删除该消息吗?", yes:function(tips){ | ||||
|   var ll = WST.load('数据处理中,请稍候...'); | ||||
|   $.post(WST.U('home/messages/del'),{id:id},function(data,textStatus){ | ||||
|     layer.close(ll); | ||||
|       layer.close(tips); | ||||
|     var json = WST.toJson(data); | ||||
|     if(json.status=='1'){ | ||||
|       WST.msg('操作成功!', {icon: 1}, function(){ | ||||
|          queryByList(WSTCurrPage); | ||||
|       }); | ||||
|     }else{ | ||||
|          WST.msg('操作失败!', {icon: 5}); | ||||
|     } | ||||
|   }); | ||||
| }}); | ||||
| } | ||||
| function batchDel(){ | ||||
|     var ids = WST.getChks('.chk'); | ||||
|     if(ids==''){ | ||||
|       WST.msg('请选择要删除的消息!', {icon: 5}); | ||||
|       return; | ||||
|     } | ||||
|     WST.confirm({content:"您确定要删除该消息吗?", yes:function(tips){ | ||||
|         var params = {}; | ||||
|         params.ids = ids; | ||||
|         var load = WST.load({msg:'请稍后...'}); | ||||
|         $.post(WST.U('home/messages/batchDel'),params,function(data,textStatus){ | ||||
|           layer.close(load); | ||||
|           var json = WST.toJson(data); | ||||
|           if(json.status=='1'){ | ||||
|             WST.msg('操作成功',{icon:1},function(){ | ||||
|                  queryByList(WSTCurrPage); | ||||
|             }); | ||||
|           }else{ | ||||
|             WST.msg('操作失败',{icon:5}); | ||||
|           } | ||||
|         }); | ||||
|     }}); | ||||
| } | ||||
| function batchRead(){ | ||||
|     var ids = WST.getChks('.chk'); | ||||
|     if(ids==''){ | ||||
|       WST.msg('请选择处理的消息!', {icon: 5}); | ||||
|       return; | ||||
|     } | ||||
|     WST.confirm({content:"您确定要将这些消息标记为已读吗?", yes:function(tips){ | ||||
|         var params = {}; | ||||
|         params.ids = ids; | ||||
|         var load = WST.load({msg:'请稍后...'}); | ||||
|         $.post(WST.U('home/messages/batchRead'),params,function(data,textStatus){ | ||||
|           layer.close(load); | ||||
|           var json = WST.toJson(data); | ||||
|           if(json.status=='1'){ | ||||
|             WST.msg('操作成功',{icon:1},function(){ | ||||
|                  queryByList(WSTCurrPage); | ||||
|             }); | ||||
|           }else{ | ||||
|             WST.msg('操作失败',{icon:5}); | ||||
|           } | ||||
|         }); | ||||
|     }}); | ||||
| } | ||||
							
								
								
									
										25
									
								
								hyhproject/home2/view/default/users/messages/show.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										25
									
								
								hyhproject/home2/view/default/users/messages/show.html
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| {extend name="default/users/base" /} | ||||
| {block name="title"}首页-买家中心{__block__}{/block} | ||||
| {block name="css"} | ||||
| <style> | ||||
| .msgContent img{ | ||||
| 	width: 100%; | ||||
| } | ||||
| </style> | ||||
| {/block} | ||||
| {block name="content"} | ||||
| <div class="wst-user-head"><span>查看消息</span><a href="<?=url('home/Messages/Index');?>">返回</a></div> | ||||
| <div class="wst-clear"></div> | ||||
|   <div class="wst-body">  | ||||
|        <div class='wst-page-content'>         | ||||
|         <div class='wst-tbar-group'> | ||||
|                        | ||||
|         </div> | ||||
|           <div class="msgContent">       | ||||
|             {$data['msgContent']} | ||||
|           </div> | ||||
|         </div> | ||||
|     </div> | ||||
| {/block} | ||||
| {block name="js"} | ||||
| {/block} | ||||
		Reference in New Issue
	
	Block a user