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,44 @@
{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}

View File

@ -0,0 +1,76 @@
var isShopUploadinit = false;
function toEdit(type){
$('#einfo_'+type).show();
$('#vinfo_'+type).hide();
if(!isShopUploadinit){
isShopUploadinit = true;
WST.upload({
pick:'#shopImgPicker',
formData: {dir:'shops'},
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
callback:function(f){
var json = WST.toJson(f);
if(json.status==1){
$('#uploadMsg').empty().hide();
$('#preview').attr('src',WST.conf.IMGURL+"/"+json.savePath+json.thumb);
$('#shopImg').val(json.savePath+json.name);
}
},
progress:function(rate){
$('#uploadMsg').show().html('已上传'+rate+"%");
}
});
initTime('#serviceStartTime',$('#serviceStartTime').attr('v'));
initTime('#serviceEndTime',$('#serviceStartTime').attr('v'));
}
}
function initTime($id,val){
var html = [],t0,t1;
var str = val.split(':');
for(var i=0;i<24;i++){
t0 = (val.indexOf(':00')>-1 && (parseInt(str[0],10)==i))?'selected':'';
t1 = (val.indexOf(':30')>-1 && (parseInt(str[0],10)==i))?'selected':'';
html.push('<option value="'+i+':00" '+t0+'>'+i+':00</option>');
html.push('<option value="'+i+':30" '+t1+'>'+i+':30</option>');
}
$($id).append(html.join(''));
}
function toCancel(type){
$('#einfo_'+type).hide();
$('#vinfo_'+type).show();
}
function editInfo(){
$('#editFrom_1').isValid(function(v){
if(v){
var params = WST.getParams('.ipt_1');
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
$.post(WST.U('home/shops/editInfo'),params,function(data,textStatus){
layer.close(loading);
var json = WST.toJson(data);
if(json.status=='1'){
WST.msg(json.msg,{icon:1});
$('#v_shopImg').attr('src',WST.conf.IMGURL+"/"+params.shopImg);
$('#v_shopQQ').html(params.shopQQ);
$('#v_shopWangWang').html(params.shopWangWang);
if(params.isInvoice==1){
$('#tr_isInvoice').show();
$('#v_isInvoice').html("提供发票");
}else{
$('#tr_isInvoice').hide();
$('#v_isInvoice').html("不提供发票");
}
$('#v_freight').html(params.freight);
$('#v_serviceStartTime').html(params.serviceStartTime);
$('#v_serviceEndTime').html(params.serviceEndTime);
$('#einfo_1').hide();
$('#vinfo_1').show();
window.location.reload();
}else{
WST.msg(json.msg,{icon:2});
}
});
}
});
}

View File

@ -0,0 +1,246 @@
{extend name="default/shops/base" /}
{block name="title"}店铺信息-卖家中心{__block__}{/block}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
{/block}
{block name="content"}
<style>
label{margin-right:10px;}
</style>
<div id='tab' class="wst-tab-box">
<ul class="wst-tab-nav">
<li>店铺信息</li>
<li>银行信息</li>
</ul>
<div class="wst-tab-content" style='width:99%;margin-bottom: 10px;'>
<div class="wst-tab-item" style="position: relative;">
<table id='vinfo_1' class='wst-form'>
<tr>
<th width='150'>店铺编号:</th>
<td>{$object['shopSn']}
<!--<a href='javascript:toEdit(1)' style='float:right;'>编辑</a>-->
</td>
</tr>
<tr>
<th>店铺名称:</th>
<td>{$object['shopName']}</td>
</tr>
<tr>
<th>店铺联系人:</th>
<td>{$object['shopkeeper']}</td>
</tr>
<tr>
<th>店铺联系电话:</th>
<td>{$object['telephone']}</td>
</tr>
<tr>
<th>公司名称:</th>
<td>{$object['shopCompany']}</td>
</tr>
<tr>
<th>公司坐机电话:</th>
<td>{$object['shopTel']}</td>
</tr>
<tr>
<th>经营类目:</th>
<td>{$object['catshopNames']}</td>
</tr>
<tr>
<th>认证类型:</th>
<td>
{php}$accredLen = count($object['accreds']);{/php}
{volist name="$object['accreds']" id="vo"}
{$vo["accredName"]}{if $i < $accredLen }、{/if}
{/volist}
</td>
</tr>
<tr>
<th>店铺图标:</th>
<td>
<img id='v_shopImg' width='150' height='150' src='__IMGURL__/{$object["shopImg"]}'/>
</td>
</tr>
<tr>
<th>客服QQ:</th>
<td id='v_shopQQ'>{$object['shopQQ']}</td>
</tr>
<tr>
<th>旺旺:</th>
<td id='v_shopWangWang'>{$object['shopWangWang']}</td>
</tr>
<tr>
<th>店铺地址:</th>
<td>
{$object['areaName']}
</td>
</tr>
<tr>
<th>店铺详细地址:</th>
<td>{$object['shopAddress']}</td>
</tr>
<tr>
<th>是否提供开发票:</th>
<td id='v_isInvoice'>
{if $object['isInvoice']==1}提供发票{/if}
{if $object['isInvoice']==0}不提供发票{/if}
</td>
</tr>
<tr id='tr_isInvoice' {if $object['isInvoice']==0}style='display:none'{/if}>
<th>发票说明:</th>
<td id='v_invoiceRemarks'>{$object['invoiceRemarks']}</td>
</tr>
<tr>
<th>默认运费:</th>
<td >¥<span id='v_freight'>{$object['freight']}</span></td>
</tr>
<tr>
<th>服务时间:</th>
<td><span id='v_serviceStartTime'>{$object['serviceStartTime']}</span><span id='v_serviceEndTime'>{$object['serviceEndTime']}</span>
</td>
</tr>
<!-- mark by cheng 添加更明显的编辑信息按钮-->
<tr>
<td colspan='2' style="text-align:center">
<a class='s-btn' href='javascript:toEdit(1)'>编辑信息</a>
</td>
</tr>
</table>
<div></div>
<form id='editFrom_1' autocomplete="off">
<table id='einfo_1' class='wst-form hide'>
<tr>
<th width='150'>店铺图标<font color='red'>*</font></th>
<td>
<img id='preview' width='150' height='150' src='__IMGURL__/{$object["shopImg"]}'/>
<div id='shopImgPicker'>请上传店铺图标</div><span id='uploadMsg'></span>
<input type='hidden' id='shopImg' class='ipt_1' value='{$object["shopImg"]}'/>
</td>
</tr>
<tr>
<th>客服QQ:</th>
<td>
<input class="ipt_1" id="shopQQ" value="{$object['shopQQ']}" type="text" style='width:60%'>
</td>
</tr>
<tr>
<th> </th>
<td>
<span style='color:gray;'>做为客服接收临时消息的QQ,需开通<a target="_blank" href="http://shang.qq.com/v3/index.html">QQ推广功能</a> -> '首页'-> '推广工具'-> '立即免费开通'</span>
</td>
</tr>
<tr>
<th>旺旺类型<font color='red'>*</font></th>
<td>
<label>
<input type='radio' value='0' class="ipt_1" name='shopWangWangType'{if $object['shopWangWangType']==0}checked{/if}/>淘宝旺旺
</label>
<label>
<input type='radio' value='1' class="ipt_1" name='shopWangWangType'{if $object['shopWangWangType']==1}checked{/if}/>阿里旺旺(1688诚信通)
</label>
</td>
</tr>
<tr>
<th>旺旺号:</th>
<td><input class="ipt_1" id="shopWangWang" value="{$object['shopWangWang']}" type="text" style='width:60%'></td>
</tr>
<tr>
<th>是否提供开发票<font color='red'>*</font></th>
<td>
<label>
<input type='radio' value='1' class="ipt_1" name='isInvoice' onclick='javascript:WST.showHide(1,"#trInvoice")' {if $object['isInvoice']==1}checked{/if}/>提供
</label>
<label>
<input type='radio' value='0' class="ipt_1" name='isInvoice' onclick='javascript:WST.showHide(0,"#trInvoice")' {if $object['isInvoice']==0}checked{/if}/>不提供
</label>
</td>
</tr>
<tr id='trInvoice' {if $object['isInvoice']==0}style='display:none'{/if}>
<th>发票说明<font color='red'>*</font></th>
<td><input class="ipt_1" id="invoiceRemarks" value="{$object['invoiceRemarks']}" type="text" style='width:60%' data-rule="发票说明:required(#isInvoice1:checked)"></td>
</tr>
<tr>
<th>默认运费<font color='red'>*</font></th>
<td><input class="ipt_1" id="freight" value="{$object['freight']}" size='5' maxlength="10" data-rule="默认运费:required;" type="text">¥</td>
</tr>
<tr>
<th>服务时间<font color='red'>*</font></th>
<td>
<select class='ipt_1' id='serviceStartTime' v="{$object['serviceStartTime']}"></select>
<select class='ipt_1' id='serviceEndTime' v="{$object['serviceEndTime']}"></select>
</td>
</tr>
<tr>
<th><font color='red'>小提示*</font></th>
<td>银行结算信息只能修改一次,除非必要请不要修改,当前修改次数:<font color='red'>({$object['changeNum']})</font></td>
</tr>
<tr>
<th>开户银行名称<font color='red'>*</font></th>
<td>
<select id='bankId' class='ipt_1' data-rule='结算银行账号:required;'>
{foreach $bankList as $v}
<option value="{$v['bankId']}" {if $object['bankId']==$v['bankId']}selected{/if}>{$v['bankName']}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<th>卡号<font color='red'>*</font></th>
<td><input class="ipt_1" id="bankNo" value="{$object['bankNo']}" type="text" style='width:60%'></td>
</tr>
<tr>
<th>持卡人<font color='red'>*</font></th>
<td><input class="ipt_1" id="bankUserName" value="{$object['bankUserName']}" type="text" style='width:60%'></td>
</tr>
<tr>
<td colspan='2' style="text-align:center">
<a class='s-btn' href='javascript:editInfo()'>保存</a>
<a class='s-btn2' href='javascript:toCancel(1)'>取消</a>
</td>
</tr>
</table>
</form>
</div>
<div class="wst-tab-item" style="display:none;">
<table class='wst-form'>
<tr>
<th width='150'>开卡银行:</th>
<td>{$object['bankName']}</td>
</tr>
<!--
<tr>
<th width='150'>开卡地区:</th>
<td>{$object['bankAreaName']}</td>
</tr>
-->
<tr>
<th>卡号:</th>
<td>{$object['bankNo']}</td>
</tr>
<tr>
<th>持卡人:</th>
<td>{$object['bankUserName']}</td>
</tr>
</table>
</div>
</div>
</div>
{/block}
{block name="js"}
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
<script type='text/javascript' src='__STYLE__/shops/shops/shops.js?v={$v}'></script>
<script>
$(function(){
$('#tab').TabPanel({tab:0,callback:function(no){}});
})
</script>
{/block}