2019-09-06 23:53:10 +08:00

45 lines
1.4 KiB
HTML
Executable File

{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;'>
<table>
<tr>
<td width="7%" style="padding-right:5px;">店铺公告:</td>
<td width="93%">
<textarea style="width:100%;height:200px;resize:none" placeholder='请保持在150个字以内' class="ipt" id="shopNotice" maxlength='150'>{$notice}</textarea>
</td>
</tr>
</table>
<button onclick="toEdits()" class="wst-shop-but" style="margin-left: 45%;padding: 5px 10px;margin-top: 20px;">&nbsp;</button>
</div>
{/block}
{block name="js"}
<script>
function toEdits(id){
var params = WST.getParams('.ipt');
console.log(params.shopNotice.length);
if(params.shopNotice.length>150){
WST.msg('店铺公告不能超过150个字',{icon:2});
return;
}
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
$.post(WST.U('home/shops/editNotice'),params,function(data,textStatus){
layer.close(loading);
var json = WST.toJson(data);
if(json.status=='1'){
WST.msg(json.msg,{icon:1});
}else{
WST.msg(json.msg,{icon:2});
}
});
}
</script>
{/block}