You've already forked qlg.tsgz.moe
addons
app_download_files
extend
hyhproject
admin
app
common
home
behavior
common
conf
controller
model
validate
view
default
css
img
js
shops
cashdraws
freights
goods
goodsappraises
goodsconsult
goodsvirtuals
logmoneys
messages
list.html
message.js
show.html
orders
recharge
reports
settlements
shopcats
shopconfigs
shoproles
shops
shopusers
stockwarn
base.html
import.html
index.html
base.html
footer.html
header.html
header_lite.html
index.html
right_cart.html
self_shop.html
self_shop_header.html
top.html
home2
mobile2
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5436787D.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
index.html
index.php
reg.lock
robots.txt
107 lines
3.3 KiB
JavaScript
Executable File
107 lines
3.3 KiB
JavaScript
Executable File
$(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});
|
|
}
|
|
});
|
|
}});
|
|
}
|