Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

View File

@ -0,0 +1,81 @@
{extend name="default/shops/base" /}
{block name="title"}首页-卖家中心{__block__}{/block}
{block name="css"}
{/block}
{block name="content"}
<div class="wst-shop-head"><span>用户信息</span></div>
<div class="wst-clear"></div>
<div class='wst-shop-content' style='margin-top:0px;'>
<div class="s-menu">
<a href="javascript:void(0)" onclick="batchRead()" style='margin-right:0px;float:none;width:60px;display:inline;'>标记为已读</a> |
<a href='javascript:void(0);' onclick="batchDel()" style='float:none;width:60px;display:inline;'>删除</a>
</div>
<div class='wst-page-content'>
<table class='wst-list'>
<thead>
<tr>
<th width='25'>
<div class="checkbox-box-s checkbox-box-s-all">
<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 }}</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>
&nbsp;
</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__/shops/messages/message.js?v={$v}'></script>
{/block}

View 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/showShopMsg','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});
}
});
}});
}

View File

@ -0,0 +1,25 @@
{extend name="default/shops/base" /}
{block name="title"}首页-卖家中心{__block__}{/block}
{block name="css"}
<style>
.msgContent img{
width: 100%;
}
</style>
{/block}
{block name="content"}
<div class="wst-shop-head"><span>查看消息</span><a href="<?=url('home/Messages/shopMessage');?>">返回</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}