You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
171
hyhproject/home2/view/default/users/base.html
Executable file
171
hyhproject/home2/view/default/users/base.html
Executable file
@ -0,0 +1,171 @@
|
||||
<!doctype html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>{block name="title"}{:WSTConf('CONF.mallTitle')}{/block}</title>
|
||||
<link href="__STYLE__/css/common.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/user.css?v={$v}" rel="stylesheet">
|
||||
{block name="css"}{/block}
|
||||
<script type="text/javascript" src="__STATIC__/js/jquery.min.js?v={$v}"></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/layer/layer.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/js/common.js?v={$v}'></script>
|
||||
{block name="depend_common_js"}{/block}
|
||||
<script type='text/javascript' src='__STYLE__/js/common.js?v={$v}'></script>
|
||||
<script>
|
||||
window.conf = {"ROOT":"__ROOT__","IMGURL":"__IMGURL__","APP":"__APP__","STATIC":"__STATIC__", "SUFFIX":"{:config('url_html_suffix')}","SMS_VERFY":"{:WSTConf('CONF.smsVerfy')}","PHONE_VERFY":"{:WSTConf('CONF.phoneVerfy')}","GOODS_LOGO":"{:WSTConf('CONF.goodsLogo')}","SHOP_LOGO":"{:WSTConf('CONF.shopLogo')}","MALL_LOGO":"{:WSTConf('CONF.mallLogo')}","USER_LOGO":"{:WSTConf('CONF.userLogo')}","IS_LOGIN":"{if (int)session('WST_USER.userId')>0 }1{else}0{/if}","TIME_TASK":"1","ROUTES":'{:WSTRoute()}',"IS_CRYPT":"{:WSTConf('CONF.isCryptPwd')}"}
|
||||
{:WSTLoginTarget(0)}
|
||||
$(function() {
|
||||
WST.initUserCenter();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
{block name="top"}
|
||||
{include file="default/top" /}
|
||||
{/block}
|
||||
{block name="header"}
|
||||
|
||||
<div class='wst-lite-bac'>
|
||||
<div class='wst-lite-container'>
|
||||
<div class='wst-logo'><a href='{$Request.root.true}'><img src="__IMGURL__/{:WSTConf('CONF.mallLogo')}" height="80" width='160'></a></div>
|
||||
<div class="wst-lite-tit"><span>买家中心</span><a class="wst-lite-in" href='{$Request.root.true}'>返回商城首页</a></div>
|
||||
<div class="wst-lite-cart">
|
||||
<a href="{:url('home/carts/index')}" target="_blank" onclick="WST.currentUrl('{:url("home/carts/index")}');"><span class="word j-word">我的购物车<span class="num" id="goodsTotalNum">0</span></span></a>
|
||||
<div class="wst-lite-carts hide">
|
||||
<div id="list-carts"></div>
|
||||
<div id="list-carts2"></div>
|
||||
<div id="list-carts3"></div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script id="list-cart" type="text/html">
|
||||
{{# for(var i = 0; i < d.list.length; i++){ }}
|
||||
<div class="goods" id="j-goods{{ d.list[i].cartId }}">
|
||||
<div class="imgs"><a href="{{ WST.U('home/goods/detail','id='+d.list[i].goodsId) }}"><img class="goodsImgc" data-original="__IMGURL__/{{ d.list[i].goodsImg }}" title="{{ d.list[i].goodsName }}"></a></div>
|
||||
<div class="number"><p><a href="{{ WST.U('home/goods/detail','id='+d.list[i].goodsId) }}">{{WST.cutStr(d.list[i].goodsName,26)}}</a></p><p>数量:{{ d.list[i].cartNum }}</p></div>
|
||||
<div class="price"><p>¥{{ d.list[i].shopPrice }}</p><span><a href="javascript:WST.delCheckCart({{ d.list[i].cartId }})">删除</a></span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<div class="wst-lite-sea">
|
||||
<div class='search'>
|
||||
<input type="hidden" id="search-type" value="{:isset($keytype)?1:0}"/>
|
||||
<ul class="j-search-box">
|
||||
<li class="j-search-type">
|
||||
搜<span>{if isset($keytype)}店铺{else}商品{/if}</span> <i class="arrow"> </i>
|
||||
</li>
|
||||
<li class="j-type-list">
|
||||
{if isset($keytype)}
|
||||
<div data="0">商品</div>
|
||||
{else}
|
||||
<div data="1">店铺</div>
|
||||
{/if}
|
||||
</li>
|
||||
</ul>
|
||||
<input type="text" id='search-ipt' class='search-ipt' value='{:isset($keyword)?$keyword:""}'/>
|
||||
<div id='search-btn' class="search-btn" onclick='javascript:WST.search(this.value)'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{/block}
|
||||
<div class="wst-wrap">
|
||||
<div class='wst-header' style='border-bottom: 1px solid #ffffff;'>
|
||||
<div class="wst-shop-nav">
|
||||
<div class="wst-nav-box">
|
||||
{php}$homeMenus = WSTHomeMenus(0);{/php}
|
||||
{volist name="$homeMenus['menus']" id="vo"}
|
||||
<a href="__ROOT__/{$vo['menuUrl']}?homeMenuId={$vo['menuId']}"><li class="liselect wst-lfloat {if($vo['menuId'] == $homeMenus['menuId1'])}wst-nav-boxa{/if}">{$vo['menuName']}</li></a>
|
||||
{/volist}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-nav'></div>
|
||||
<div class='wst-main'>
|
||||
<div class='wst-menu'>
|
||||
{if isset($homeMenus['menus'][$homeMenus['menuId1']]['list']) }
|
||||
{volist name="$homeMenus['menus'][$homeMenus['menuId1']]['list']" id="menus"}
|
||||
<span class='wst-menu-title'>{$menus['menuName']}<img src="__STYLE__/img/user_icon_sider_zhankai.png"></span>
|
||||
<ul>
|
||||
{if isset($menus['list']) }
|
||||
{volist name="menus['list']" id="menu" key='k'}
|
||||
<li class="{if($homeMenus['menuId3']==$menu['menuId'])}wst-menua{/if} wst-menuas" onclick="getMenus('{$menu['menuId']}','{$menu['menuUrl']}')">
|
||||
{$menu['menuName']}
|
||||
<span id="mId_{$menu['menuId']}"></span>
|
||||
</li>
|
||||
{/volist}
|
||||
{/if}
|
||||
</ul>
|
||||
{/volist}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class='wst-content'>
|
||||
{block name="content"}<div class="result"></div>{/block}
|
||||
</div>
|
||||
</div>
|
||||
<div style='clear:both;'></div>
|
||||
<div class="wst-bottom" style='display:none'>
|
||||
<div class="wst-bottom-m">
|
||||
<span class="wst-bottom-ml wst-bottom-ms">我的专属推荐</span><span class="wst-bottom-ml">我关注的商品</span><span class="wst-bottom-ml">我的足迹</span>
|
||||
<span class="wst-bottom-mr"><img class="wst-lfloat" src="__STYLE__/img/user_icon_hyp.png"><a href="" class="wst-lfloat">换一批</a></span>
|
||||
</div>
|
||||
<div style='clear:both;'></div>
|
||||
<div class="wst-bottom-g">
|
||||
<div class="wst-bottom-gs">
|
||||
<div class="wst-bottom-i"><img class="goodsImg" data-original="__STYLE__/img/img_hot_02.jpg"></div>
|
||||
<div class="wst-bottom-n1">商品名称商品名称商品名称商品名称商品名称</div>
|
||||
<span class="wst-bottom-n2"><span class="wst-bottom-n2l">¥100.00</span><span class="wst-bottom-n2r">成交数:<span>123</span></span></span>
|
||||
<span class="wst-bottom-n3"><span class="wst-bottom-n3l">市场价:¥100.00</span><span class="wst-bottom-n3r">已有<span>123</span>人评价</span></span>
|
||||
<span class="wst-bottom-n4"><span class="wst-lfloat">店铺名称店铺名称</span><img class="wst-lfloat" style="margin: 2px 0px 0px 5px;" src="__STYLE__/img/icon_dianpujie_03.png"></span>
|
||||
</div>
|
||||
<div class="wst-bottom-gs">
|
||||
<div class="wst-bottom-i"><img class="goodsImg" data-original="__STYLE__/img/img_hot_02.jpg"></div>
|
||||
<div class="wst-bottom-n1">商品名称商品名称商品名称商品名称商品名称</div>
|
||||
<span class="wst-bottom-n2"><span class="wst-bottom-n2l">¥100.00</span><span class="wst-bottom-n2r">成交数:<span>123</span></span></span>
|
||||
<span class="wst-bottom-n3"><span class="wst-bottom-n3l">市场价:¥100.00</span><span class="wst-bottom-n3r">已有<span>123</span>人评价</span></span>
|
||||
<span class="wst-bottom-n4"><span class="wst-lfloat">店铺名称店铺名称</span><img class="wst-lfloat" style="margin: 2px 0px 0px 5px;" src="__STYLE__/img/icon_dianpujie_03.png"></span>
|
||||
</div>
|
||||
<div class="wst-bottom-gs">
|
||||
<div class="wst-bottom-i"><img class="goodsImg" data-original="__STYLE__/img/img_hot_02.jpg"></div>
|
||||
<div class="wst-bottom-n1">商品名称商品名称商品名称商品名称商品名称</div>
|
||||
<span class="wst-bottom-n2"><span class="wst-bottom-n2l">¥100.00</span><span class="wst-bottom-n2r">成交数:<span>123</span></span></span>
|
||||
<span class="wst-bottom-n3"><span class="wst-bottom-n3l">市场价:¥100.00</span><span class="wst-bottom-n3r">已有<span>123</span>人评价</span></span>
|
||||
<span class="wst-bottom-n4"><span class="wst-lfloat">店铺名称店铺名称</span><img class="wst-lfloat" style="margin: 2px 0px 0px 5px;" src="__STYLE__/img/icon_dianpujie_03.png"></span>
|
||||
</div>
|
||||
<div class="wst-bottom-gs">
|
||||
<div class="wst-bottom-i"><img class="goodsImg" data-original="__STYLE__/img/img_hot_02.jpg"></div>
|
||||
<div class="wst-bottom-n1">商品名称商品名称商品名称商品名称商品名称</div>
|
||||
<span class="wst-bottom-n2"><span class="wst-bottom-n2l">¥100.00</span><span class="wst-bottom-n2r">成交数:<span>123</span></span></span>
|
||||
<span class="wst-bottom-n3"><span class="wst-bottom-n3l">市场价:¥100.00</span><span class="wst-bottom-n3r">已有<span>123</span>人评价</span></span>
|
||||
<span class="wst-bottom-n4"><span class="wst-lfloat">店铺名称店铺名称</span><img class="wst-lfloat" style="margin: 2px 0px 0px 5px;" src="__STYLE__/img/icon_dianpujie_03.png"></span>
|
||||
</div>
|
||||
<div class="wst-bottom-gs">
|
||||
<div class="wst-bottom-i"><img class="goodsImg" data-original="__STYLE__/img/img_hot_02.jpg"></div>
|
||||
<div class="wst-bottom-n1">商品名称商品名称商品名称商品名称商品名称</div>
|
||||
<span class="wst-bottom-n2"><span class="wst-bottom-n2l">¥100.00</span><span class="wst-bottom-n2r">成交数:<span>123</span></span></span>
|
||||
<span class="wst-bottom-n3"><span class="wst-bottom-n3l">市场价:¥100.00</span><span class="wst-bottom-n3r">已有<span>123</span>人评价</span></span>
|
||||
<span class="wst-bottom-n4"><span class="wst-lfloat">店铺名称店铺名称</span><img class="wst-lfloat" style="margin: 2px 0px 0px 5px;" src="__STYLE__/img/icon_dianpujie_03.png"></span>
|
||||
</div>
|
||||
<div style='clear:both;'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style='clear:both;'></div>
|
||||
<br/>
|
||||
</div>
|
||||
{block name="footer"}
|
||||
{include file="default/footer" /}
|
||||
{/block}
|
||||
{block name="js"}{/block}
|
||||
<script>
|
||||
function getMenus(menuId,menuUrl){
|
||||
$.post(WST.U('home/index/getMenuSession'), {menuId:menuId}, function(data){
|
||||
location.href=WST.U(menuUrl);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
52
hyhproject/home2/view/default/users/cashdraws/box_config.html
Executable file
52
hyhproject/home2/view/default/users/cashdraws/box_config.html
Executable file
@ -0,0 +1,52 @@
|
||||
<form id='configForm' autocomplete='off'>
|
||||
<input type='hidden' id='id' class='j-ipt' value='{$object["id"]}'/>
|
||||
<table width='100%' style='margin-top:10px;' class='wst-form'>
|
||||
<tr>
|
||||
<th width='120' align='right'>开卡银行<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select id='accTargetId' class='j-ipt' data-rule="开卡银行: required;">
|
||||
<option value=''>请选择</option>
|
||||
{volist name="banks" id="vo"}
|
||||
<option value='{$vo["bankId"]}' {if $object.accTargetId == $vo['bankId']}selected{/if}>{$vo["bankName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'>开卡地区<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select id="area_0" class='j-areas' level="0" onchange="WST.ITAreas({id:'area_0',val:this.value,isRequire:true,className:'j-areas'});" data-rule="开卡地区: required;">
|
||||
<option value="">-请选择-</option>
|
||||
{foreach $areas as $v}
|
||||
<option value="{$v['areaId']}">{$v['areaName']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height='40'>
|
||||
<th align='right'>卡号<font color='red'>*</font>:</th>
|
||||
<td><input type='text' id='accNo' class='j-ipt' value='{$object["accNo"]}' style='width:250px' data-rule="卡号: required;"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'>持卡人<font color='red'>*</font>:</th>
|
||||
<td><input type='text' id='accUser' class='j-ipt' value='{$object["accUser"]}' style='width:250px' data-rule="持卡人: required;"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='text-align: center;padding-top:5px;'>
|
||||
<button type='button' class='wst-sec-but u-btn' onclick="editConfig()">保存</button>
|
||||
<button type='button' style='margin-left:10px;' class='wst-user-buta2 u-btn' onclick='layerclose()'>取消</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
$(function(){
|
||||
var bankAreaIdPath = '{$object["accAreaIdPath"]}';
|
||||
if(bankAreaIdPath!=''){
|
||||
var areaIdPath = bankAreaIdPath.split("_");
|
||||
$('#area_0').val(areaIdPath[0]);
|
||||
var aopts = {id:'area_0',val:areaIdPath[0],childIds:areaIdPath,className:'j-areas',isRequire:true}
|
||||
WST.ITSetAreas(aopts);
|
||||
}
|
||||
})
|
||||
</script>
|
34
hyhproject/home2/view/default/users/cashdraws/box_draw.html
Executable file
34
hyhproject/home2/view/default/users/cashdraws/box_draw.html
Executable file
@ -0,0 +1,34 @@
|
||||
<form id='drawForm' autocomplete='off' >
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<table width='100%' style='margin-top:10px;' class='wst-form' style='dislay:none'>
|
||||
<tr>
|
||||
<th width='120' align='right'>提现账号<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<select id='accId' class='j-ipt' data-rule="开卡银行: required;">
|
||||
<option value=''>请选择</option>
|
||||
{volist name="accs" id="vo"}
|
||||
<option value='{$vo["id"]}'>{$vo["accUser"]}|{$vo["accNo"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'>提现金额<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='text' id='money' class='j-ipt' style='width:250px' data-rule="提现金额: required;" onkeypress="return WST.isNumberdoteKey(event)" onblur="javascript:WST.limitDecimal(this,2)" onkeyup="javascript:WST.isChinese(this,1)" placeholder="可提现金额:¥{$user['userMoney']-$user['rechargeMoney']}" autocomplete="off"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height='40'>
|
||||
<th align='right'>支付密码<font color='red'>*</font>:</th>
|
||||
<input type="password" style="display:none">
|
||||
<td><input type='password' id='payPwd' class='j-ipt' style='width:250px' data-rule="支付密码: required;" autocomplete="off"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='text-align: center;padding-top:5px;'>
|
||||
<button type='button' class='wst-sec-but u-btn' onclick="drawMoney()">保存</button>
|
||||
<button type='button' style='margin-left:10px;' class='wst-user-buta2 u-btn' onclick='layerclose()'>取消</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
199
hyhproject/home2/view/default/users/cashdraws/cashdraws.js
Executable file
199
hyhproject/home2/view/default/users/cashdraws/cashdraws.js
Executable file
@ -0,0 +1,199 @@
|
||||
$(function () {
|
||||
$('#tab').TabPanel({tab:0,callback:function(tab){
|
||||
switch(tab){
|
||||
case 0:pageQuery(0);break;
|
||||
case 1:pageConfigQuery(0);break;
|
||||
}
|
||||
}})
|
||||
});
|
||||
var isSetPayPwd = 1;
|
||||
function getUserMoney(){
|
||||
$.post(WST.U('home/users/getUserMoney'),{},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var userMoney = json.data.userMoney;
|
||||
var rechargeMoney = json.data.rechargeMoney;
|
||||
$('#userMoney').html('¥'+userMoney);
|
||||
$('#lockMoney').html('¥'+json.data.lockMoney);
|
||||
rechargeMoney = parseFloat(userMoney - rechargeMoney)
|
||||
$('#userCashMoney').html('¥'+rechargeMoney.toFixed(2));
|
||||
if(json.data.isDraw==1){
|
||||
$('#drawBtn').show();
|
||||
}else{
|
||||
$('#drawBtn').hide();
|
||||
}
|
||||
isSetPayPwd = json.data.isSetPayPwd;
|
||||
}
|
||||
});
|
||||
}
|
||||
function pageQuery(p){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
$.post(WST.U('home/cashdraws/pageQuery'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('draw-list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#draw-page-list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'draw-pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageQuery(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#draw-pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var w;
|
||||
function toDrawMoney(){
|
||||
if(isSetPayPwd==0){
|
||||
WST.msg('您尚未设置支付密码,请先设置支付密码',{icon:2},function(){
|
||||
location.href = WST.U('home/users/security');
|
||||
});
|
||||
return;
|
||||
}
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
$.post(WST.U('home/cashdraws/toEdit'),{},function(data,textStatus){
|
||||
layer.close(tips);
|
||||
w = WST.open({
|
||||
type: 1,
|
||||
title:"申请提现",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['550px', '250px'],
|
||||
offset: '100px'
|
||||
});
|
||||
});
|
||||
}
|
||||
function drawMoney(){
|
||||
$('#drawForm').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.j-ipt');
|
||||
if(window.conf.IS_CRYPT=='1'){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
params.payPwd = rsa.encrypt(params.payPwd);
|
||||
}
|
||||
var tips = WST.load({msg:'正在提交数据,请稍后...'});
|
||||
$.post(WST.U('home/cashdraws/drawMoney'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
pageQuery(0);
|
||||
getUserMoney();
|
||||
layer.close(w);
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function layerclose(){
|
||||
layer.close(w);
|
||||
}
|
||||
|
||||
function pageConfigQuery(p){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
$.post(WST.U('home/cashconfigs/pageQuery'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('config-list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#config-page-list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'config-pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageConfigQuery(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#config-pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toEditConfig(id){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
$.post(WST.U('home/cashconfigs/toEdit','id='+id),{},function(data,textStatus){
|
||||
layer.close(tips);
|
||||
w = WST.open({
|
||||
type: 1,
|
||||
title:((id>0)?"编辑":"新增")+"提现账号",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['600px', '250px'],
|
||||
offset: '100px'
|
||||
});
|
||||
});
|
||||
}
|
||||
function editConfig(){
|
||||
$('#configForm').isValid(function(v){
|
||||
if(v){
|
||||
var params = WST.getParams('.j-ipt');
|
||||
params.accAreaId = WST.ITGetAreaVal('j-areas');
|
||||
var tips = WST.load({msg:'正在提交数据,请稍后...'});
|
||||
$.post(WST.U('home/cashconfigs/'+((params.id>0)?'edit':'add')),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
pageConfigQuery(0);
|
||||
layer.closeAll();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function delConfig(id){
|
||||
WST.confirm({content:'您确定要删除该提现账号吗?',yes:function(){
|
||||
var tips = WST.load({msg:'正在提交数据,请稍后...'});
|
||||
$.post(WST.U('home/cashconfigs/del'),{id:id},function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
pageConfigQuery(0);
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}})
|
||||
}
|
128
hyhproject/home2/view/default/users/cashdraws/list.html
Executable file
128
hyhproject/home2/view/default/users/cashdraws/list.html
Executable file
@ -0,0 +1,128 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}提现管理-买家中心{__block__}{/block}
|
||||
{block name='css'}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='score-head'>
|
||||
<div class='user-logo'><img height='100' width='100'src='__IMGURL__{:WSTUserPhoto(session('WST_USER.userPhoto'))}'></div>
|
||||
<div class='user-info'>
|
||||
<div class='userName'>{:session('WST_USER.loginName')}</div>
|
||||
<div class='userScore'>
|
||||
<div class="usermoney">
|
||||
可用资金:<font color='red' id='userMoney'>¥0</font>
|
||||
</div>
|
||||
<div class="cashbox">
|
||||
<span style='margin-left:20px;'><a class="cashbtn" id='drawBtn' href="javascript:toDrawMoney();" >申请提现</a></span>
|
||||
<span class='draw-tips'>(至少¥{:WSTConf('CONF.drawCashUserLimit')}方可提现)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='userScore'>
|
||||
<div class="usermoney">
|
||||
冻结资金:<font color='red' id='lockMoney'>¥0</font>
|
||||
</div>
|
||||
<div class="usermoney">
|
||||
<span class="cashmoney-box">可提现金额:<font color='red' id='userCashMoney'>¥0</font></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>提现记录</li>
|
||||
<li>提现账号</li>
|
||||
</ul>
|
||||
<div class='wst-tab-content'>
|
||||
<div class='wst-tab-item'>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='80'>提现单号</th>
|
||||
<th width='100'>提现银行</th>
|
||||
<th width='130'>开户地区</th>
|
||||
<th width='130'>银行卡号</th>
|
||||
<th width='100'>持卡人</th>
|
||||
<th width='60'>提现金额</th>
|
||||
<th width='250'>提现状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="draw-list" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i].cashNo}}</td>
|
||||
<td>{{d[i].accTargetName}}</td>
|
||||
<td>{{ d[i].accAreaName }}</td>
|
||||
<td>{{ d[i].accNo }}</td>
|
||||
<td>{{ d[i].accUser }}</td>
|
||||
<td>¥{{ d[i].money }}</td>
|
||||
<td {{#if(d[i].cashSatus==-1){}}style='line-height:25px;'{{#}}}>
|
||||
{{#if(d[i].cashSatus==1){}}提现成功
|
||||
{{#}else if(d[i].cashSatus==-1){}}提现失败
|
||||
<br/>【原因】{{d[i].cashRemarks}}
|
||||
{{#}else{}}待处理{{#}}}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="draw-page-list"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7' align="center" style='padding:5px 0px 5px 0px'>
|
||||
<div id="draw-pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{/**提现账号**/}
|
||||
<div class='wst-tab-item hide'>
|
||||
<div class='wst-user-tbar'>
|
||||
<button class='wst-sec-but u-btn wst-rfloat' onclick="toEditConfig(0)">新增</button>
|
||||
</div>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='160'>开户银行</th>
|
||||
<th width='*'>开户地址</th>
|
||||
<th width='180'>卡号</th>
|
||||
<th width='130'>持卡人</th>
|
||||
<th width='80'>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="config-page-list"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5' align="center" style='padding:5px 0px 5px 0px'>
|
||||
<div id="config-pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<script id="config-list" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i].bankName}}</td>
|
||||
<td>{{d[i].areaName }}</td>
|
||||
<td>{{d[i].accNo}}</td>
|
||||
<td>{{d[i].accUser}}</td>
|
||||
<td>
|
||||
<a href='javascript:toEditConfig({{d[i].id}})'>编辑</a>
|
||||
<a href='javascript:delConfig({{d[i].id}})'>删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/cashdraws/cashdraws.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
getUserMoney();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
120
hyhproject/home2/view/default/users/favorites/favorites.js
Executable file
120
hyhproject/home2/view/default/users/favorites/favorites.js
Executable file
@ -0,0 +1,120 @@
|
||||
//关注的商品列表
|
||||
function freGoodsList(pages){
|
||||
var param = {};
|
||||
param.pagesize = 8;
|
||||
param.page = pages;
|
||||
$.post(WST.U('home/favorites/listGoodsQuery'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(param.page>json.TotalPage && json.TotalPage >0){
|
||||
freGoodsList(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list-goods').html(html);
|
||||
});
|
||||
laypage({
|
||||
cont: 'goodsPage',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skip: true, //是否开启跳页
|
||||
skin: '#f46442',
|
||||
groups: 3,
|
||||
prev: '<<',
|
||||
next: '>>',
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
freGoodsList(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$(".wst-fav-goimg").hover(function(){
|
||||
$(this).find(".js-operate").slideDown();
|
||||
},function(){
|
||||
$(this).find(".js-operate").slideUp();
|
||||
});
|
||||
$('.goodsImg2').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
||||
}
|
||||
});
|
||||
}
|
||||
function getGoods(id){
|
||||
location.href=WST.U('home/goods/detail','id='+id);
|
||||
}
|
||||
function cancelFavorite(id,type){
|
||||
WST.confirm({content:"您确定要取消关注吗?", yes:function(tips){
|
||||
var load = WST.load({msg:'请稍后...'});
|
||||
var param = {};
|
||||
param.id = id;
|
||||
param.type = type;
|
||||
$.post(WST.U('home/favorites/cancel'),param,function(data,textStatus){
|
||||
layer.close(load);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1},function(){
|
||||
if(type==0){
|
||||
freGoodsList(WSTCurrPage);
|
||||
}else{
|
||||
freShopList(WSTCurrPage);
|
||||
}
|
||||
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:5});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
//关注的店铺列表
|
||||
function freShopList(pages){
|
||||
var param = {};
|
||||
param.pagesize = 3;
|
||||
param.page = pages;
|
||||
$.post(WST.U('home/favorites/listShopQuery'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(param.page>json.TotalPage && json.TotalPage >0){
|
||||
freShopList(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#list-shops').html(html);
|
||||
});
|
||||
//商品滑动
|
||||
var goodsNum = json.Rows.length;
|
||||
for(var i=0;i<goodsNum;++i){
|
||||
$("#js-goods"+i).als({
|
||||
visible_items: 5,
|
||||
scrolling_items: 1,
|
||||
orientation: "horizontal",
|
||||
circular: "yes",
|
||||
autoscroll: "no",
|
||||
start_from: 2
|
||||
});
|
||||
}
|
||||
$('.goodsImg2').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
||||
$('.shopsImg2').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.SHOP_LOGO});//店铺默认头像
|
||||
laypage({
|
||||
cont: 'shopsPage',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skip: true, //是否开启跳页
|
||||
skin: '#f46442',
|
||||
groups: 3,
|
||||
prev: '<<',
|
||||
next: '>>',
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
freShopList(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function getShop(id){
|
||||
location.href=WST.U('home/shops/home','shopId='+id);
|
||||
}
|
36
hyhproject/home2/view/default/users/favorites/list_goods.html
Executable file
36
hyhproject/home2/view/default/users/favorites/list_goods.html
Executable file
@ -0,0 +1,36 @@
|
||||
{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="wst-fav-listg" id="list-goods"></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-fav-pa"><div id="goodsPage"></div></div>
|
||||
<script id="list" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){}}
|
||||
<div class="wst-fav-goods">
|
||||
<div class="wst-fav-goimg"><img class="goodsImg2" data-original="__IMGURL__/{{ d[i].goodsImg }}" title="{{ d[i].goodsName }}"><span class="js-operate" onclick="javascript:cancelFavorite({{ d[i].favoriteId }},0)">取消收藏</div>
|
||||
<a href="javascript:getGoods({{ d[i].goodsId }})">
|
||||
<p class="wst-fav-gonam">{{WST.cutStr(d[i].goodsName,50)}}</p>
|
||||
<p class="wst-fav-goodp1"><span class="wst-fav-goodpr">¥{{ d[i].shopPrice }}</span><span class="wst-rfloat">成交数:<span class="wst-fav-goodpr2">{{ d[i].saleNum }}</span></p>
|
||||
<p class="wst-fav-goodp2"><span class="wst-fav-goodpr3">市场价:¥{{ d[i].marketPrice }}</span><span class="wst-rfloat">已有<span class="wst-fav-goodpr4">{{ d[i].appraiseNum }}</span>人评价</span></p>
|
||||
<p class="wst-fav-shop">
|
||||
<span class="wst-lfloat">{{WST.cutStr(d[i].shopName,8)}}</span>
|
||||
{{# for(var a = 0; a < d[i].accreds.length; a++){ }}
|
||||
<img src="__IMGURL__/{{ d[i].accreds[a].accredImg }}" title="{{ d[i].accreds[a].accredName }}">
|
||||
{{# } }}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/favorites/favorites.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
freGoodsList();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
49
hyhproject/home2/view/default/users/favorites/list_shops.html
Executable file
49
hyhproject/home2/view/default/users/favorites/list_shops.html
Executable file
@ -0,0 +1,49 @@
|
||||
{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 id="list-shops"></div>
|
||||
<div class="wst-fav-pa"><div id="shopsPage"></div></div>
|
||||
<script id="list" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<div class="wst-favo-shop">
|
||||
<div class="wst-favo-shopl">
|
||||
<a href="javascript:getShop({{ d[i].shopId }})" class="wst-favo-shopimg"><img class="shopsImg2" data-original="__IMGURL__/{{ d[i].shopImg }}" title="{{ d[i].shopName }}"/></a>
|
||||
<p>{{WST.cutStr(d[i].shopName,15)}}</p>
|
||||
<a href="javascript:getShop({{ d[i].shopId }})" class="wst-favo-shopa">进入店铺</a><a href="javascript:cancelFavorite({{ d[i].favoriteId }},1)" class="wst-favo-shopa">取消关注</a>
|
||||
</div>
|
||||
<div class="wst-favo-shopr">
|
||||
<div class="wst-favo-more"><span class="wst-lfloat">推荐商品</span><a href="javascript:getShop({{ d[i].shopId }})" class="wst-rfloat">查看更多 ></a></div>
|
||||
<div class="wst-favo-good wst-lfloat">
|
||||
<div class="als-container" id="{{# if(d[i].goods.length>5){ }}js-goods{{i}}{{# } }}">
|
||||
{{# if(d[i].goods.length>5){ }}<span class="als-prev"><img src="__STYLE__/img/icon_left.png" alt="prev" title="previous" /></span>{{# } }}
|
||||
<div class="als-viewport">
|
||||
<ul class="als-wrapper">
|
||||
{{# for(var a = 0; a < d[i].goods.length; a++){ }}
|
||||
<li class="als-item wst-favo-goods">
|
||||
<div class="wst-favo-goodimg"><a href="javascript:getGoods({{ d[i].goods[a].goodsId }})"><img class="goodsImg2" data-original="__IMGURL__/{{ d[i].goods[a].goodsImg }}" title="{{ d[i].goods[a].goodsName }}"/></a></div>
|
||||
<span>¥{{ d[i].goods[a].shopPrice }}</span>
|
||||
</li>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</div>
|
||||
{{# if(d[i].goods.length>5){ }}<span class="als-next"><img src="__STYLE__/img/icon_right.png" alt="next" title="next" /></span>{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/js/jquery.als.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STYLE__/users/favorites/favorites.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
freShopList();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
6
hyhproject/home2/view/default/users/index.html
Executable file
6
hyhproject/home2/view/default/users/index.html
Executable file
@ -0,0 +1,6 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}买家中心 - {:WSTConf('CONF.mallName')}{__block__}{/block}
|
||||
{block name="css"}
|
||||
{/block}
|
||||
{block name="main"}{/block}
|
||||
{block name="js"}{/block}
|
149
hyhproject/home2/view/default/users/informs/inform_detail.html
Executable file
149
hyhproject/home2/view/default/users/informs/inform_detail.html
Executable file
@ -0,0 +1,149 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}举报详情 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='wst-inform-content'>
|
||||
<form id="informForm" method="post" >
|
||||
<div class="wst-inform-head"><span>举报详情</span></div>
|
||||
<div class='order-box wst-inform-box'>
|
||||
|
||||
<div class='log-box inform-log-box' style="height: auto;" >
|
||||
<div class="state">
|
||||
<div class="icon" style="margin-left: 20px;">
|
||||
<span class="icons icon13 "></span>
|
||||
</div>
|
||||
<div class="arrow arrow2">··················></div>
|
||||
<div class="icon" >
|
||||
<span class="icons icon13 "></span>
|
||||
</div>
|
||||
<div class="arrow arrow2">·················></div>
|
||||
<div class="icon" >
|
||||
|
||||
{if condition="$data['informStatus'] eq 0"}
|
||||
<span class="icons icon12 "></span>
|
||||
{else}
|
||||
<span class="icons icon13 "></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="state3" >
|
||||
<p>提交举报表单</p><p>等待管理员处理</p><p>完成举报</p>
|
||||
</div>
|
||||
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-inform-box">
|
||||
<div class="title">被举报商家 :</div><a target='_blank' href="{:url('home/shops/home',array('shopId'=>$data['shopId']))}">{$data['shopName']}</a>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<!-- 订单信息 -->
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title">
|
||||
<span>相关商品 :</span>
|
||||
</div>
|
||||
<div class="goods-img">
|
||||
<a href="{:Url('home/goods/detail','id='.$data['goodsId'])}" target='_blank'>
|
||||
<div class="wst-img"><img src="__IMGURL__/{:WSTImg($data['goodsImg'])}"></img></div>
|
||||
</a>
|
||||
<div class="wst-text">
|
||||
<a href='{:Url("home/goods/detail","id=".$data["goodsId"])}' target='_blank'>{$data['goodsName']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title">举报类型:</div>
|
||||
<div class="goods-img">
|
||||
{php}$reason = WSTDatas('INFORMS_TYPE',$data['informType']);{/php}
|
||||
{$reason['dataName']}
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title">举报内容:</div>
|
||||
<div class="goods-img">
|
||||
{$data['informContent']}
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div id="photos-inform" class='wst-inform-box' style="border-bottom: 1px solid transparent;">
|
||||
<div class="title">附件:</div>
|
||||
{volist name="$data['informAnnex']" id="annex"}
|
||||
<a href="javascript:void(0)">
|
||||
<img layer-src="__IMGURL__/{$annex}" width="100" height="100" src="__IMGURL__/{$annex}" />
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title">举报时间:</div>
|
||||
<div class="goods-img">
|
||||
{$data['informTime']}
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title">举报结果:</div>
|
||||
<div class="goods-img">
|
||||
{if condition="$data['informStatus'] eq 0"}
|
||||
等待处理
|
||||
{elseif condition="$data['informStatus'] eq 1"/}
|
||||
无效举报
|
||||
{elseif condition="$data['informStatus'] eq 2 "/}
|
||||
有效举报
|
||||
{elseif condition="$data['informStatus'] eq 3 "/}
|
||||
恶意举报
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if condition="$data['informStatus'] eq 1 OR $data['informStatus'] eq 2 OR $data['informStatus'] eq 3"}
|
||||
<div class="title">处理信息:</div>
|
||||
<div class="goods-img">
|
||||
{$data['respondContent']}
|
||||
</div>
|
||||
<div class="title">处理时间:</div>
|
||||
<div class="goods-img">
|
||||
{$data['finalHandleTime']}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-complain-footer'>
|
||||
<button onclick="javascript:history.go(-1)" class="wst-sec-but u-btn">返回</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="wst-remind">
|
||||
<div class="wst-inform-head" ><span>违规举报须知</span></div>
|
||||
<div class="content">
|
||||
<div class="alert">
|
||||
<ul>
|
||||
<li> 1.请提供充分的证据以确保举报成功,请珍惜您的会员权利,帮助商城更好地管理网站;</li>
|
||||
<li> 2.被举报待处理的商品不能反复进行违规提交,处理下架后的商品不能再次举报,商家如重新上架后仍存在违规现象,可再次对该商品进行违规举报;</li>
|
||||
<li> 3.举报仅针对商品或商家本身,如需处理交易中产生的纠纷,请选择投诉;</li>
|
||||
<li> 4.举报时依次选择举报类型及举报主题(必填),填写违规描述(必填,不超过200字),上传5张以内的举证图片(选填),详细的举报内容有助于平台对该条举报的准确处理。</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/informs/informs.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
userComplainInit();
|
||||
// 调用图像层
|
||||
layer.photos({
|
||||
photos: '#photos-inform'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
|
||||
|
113
hyhproject/home2/view/default/users/informs/informs.html
Executable file
113
hyhproject/home2/view/default/users/informs/informs.html
Executable file
@ -0,0 +1,113 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}举报商品 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='wst-inform-content'>
|
||||
<form id="informForm" method="post" >
|
||||
<input type='hidden' id='goodsId' class='ipt' value="{$data['data']['goodsId']}"/>
|
||||
<input type='hidden' id='shopsId' class='ipt' value="{$data['data']['shopId']}"/>
|
||||
<div class="wst-inform-head"><span>举报商品</span></div>
|
||||
<div class='order-box wst-inform-box'>
|
||||
|
||||
<div class='log-box inform-log-box' style="height: auto;" >
|
||||
<div class="state">
|
||||
<div class="icon">
|
||||
<span class="icons icon13 "></span>
|
||||
</div>
|
||||
<div class="arrow arrow2">··················></div>
|
||||
<div class="icon">
|
||||
<span class="icons icon12 "></span>
|
||||
</div>
|
||||
<div class="arrow arrow2">··················></div>
|
||||
<div class="icon">
|
||||
<span class="icons icon12 "></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state3" >
|
||||
<p>提交举报表单</p><p>等待管理员处理</p><p>完成举报</p>
|
||||
</div>
|
||||
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-inform-box">
|
||||
<div class="title">被举报商家 :</div><a target='_blank' href="{:url('home/shops/home',array('shopId'=>$data['data']['shopId']))}">{$data['data']['shopName']}</a>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<!-- 订单信息 -->
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title">
|
||||
<span>相关商品 :</span>
|
||||
</div>
|
||||
<div class="goods-img">
|
||||
<a href="{:Url('home/goods/detail','id='.$data['data']['goodsId'])}" target='_blank'>
|
||||
<div class="wst-img"><img src="__IMGURL__/{:WSTImg($data['data']['goodsImg'])}"></img></div>
|
||||
</a>
|
||||
<div class="wst-text">
|
||||
<a href='{:Url("home/goods/detail","id=".$data["data"]["goodsId"])}' target='_blank'>{$data['data']['goodsName']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title"><font color='red'>*</font>举报类型:</div>
|
||||
<div class="goods-img">
|
||||
{php}$reason = WSTDatas('INFORMS_TYPE');{/php}
|
||||
{volist name='reason' id='vo'}
|
||||
<label><input type='radio' name='informType' class='ipt' autocomplete="off" value='{$vo['dataVal']}' {if $key==1}checked{/if}>{$vo['dataName']}</label>
|
||||
{/volist}
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<div class="title"><font color='red'>*</font>举报内容:</div>
|
||||
<div class="goods-img">
|
||||
<textarea id='informContent' maxlength="200" onchange="this.value=this.value.substring(0, 200)" onkeydown="this.value=this.value.substring(0, 200)" onkeyup="this.value=this.value.substring(0, 200)" name="informContent" class='ipt' autocomplete="off" style='width:100%;height:155px;' placeholder='请输入举报内容'></textarea>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class='wst-inform-box' style="border-bottom: 1px solid transparent;">
|
||||
<div id="filePicker" style='margin-left:0px;width:250px;overflow:hidden;height:25px;'>上传附件(最多5张)</div>
|
||||
</div>
|
||||
<div class='wst-inform-box'>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<div id='picBox' style='height:120px;width:612px;padding:5px;'></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class='wst-complain-footer'>
|
||||
<button onclick="javascript:saveInforms()" class="wst-sec-but u-btn">提交</button>
|
||||
<button onclick="javascript:history.go(-1)" class="wst-sec-but u-btn">返回</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="wst-remind">
|
||||
<div class="wst-inform-head" ><span>违规举报须知</span></div>
|
||||
<div class="content">
|
||||
<div class="alert">
|
||||
<ul>
|
||||
<li> 1.请提供充分的证据以确保举报成功,请珍惜您的会员权利,帮助商城更好地管理网站;</li>
|
||||
<li> 2.被举报待处理的商品不能反复进行违规提交,处理下架后的商品不能再次举报,商家如重新上架后仍存在违规现象,可再次对该商品进行违规举报;</li>
|
||||
<li> 3.举报仅针对商品或商家本身,如需处理交易中产生的纠纷,请选择投诉;</li>
|
||||
<li> 4.举报时依次选择举报类型及举报主题(必填),填写违规描述(必填,不超过200字),上传5张以内的举证图片(选填),详细的举报内容有助于平台对该条举报的准确处理。</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/informs/informs.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
userComplainInit();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
105
hyhproject/home2/view/default/users/informs/informs.js
Executable file
105
hyhproject/home2/view/default/users/informs/informs.js
Executable file
@ -0,0 +1,105 @@
|
||||
//图片文件上传
|
||||
function userComplainInit(){
|
||||
var uploader =WST.upload({
|
||||
pick:'#filePicker',
|
||||
formData: {dir:'informsImg',isThumb:0},
|
||||
fileNumLimit:5,
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f,file){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
var tdiv = $("<div style='width:75px;float:lefst;margin-right:5px;'>"+
|
||||
"<img class='inform_pic"+"' width='75' height='75' src='"+WST.conf.IMGURL+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></div>");
|
||||
var btn = $('<div style="position:relative;top:-80px;left:60px;cursor:pointer;" ><img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_error.png"></div>');
|
||||
tdiv.append(btn);
|
||||
$('#picBox').append(tdiv);
|
||||
btn.on('click','img',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
||||
function saveInforms(historyURL){
|
||||
/* 表单验证 */
|
||||
$('#informForm').validator({
|
||||
fields: {
|
||||
informContent: {
|
||||
rule:"required",
|
||||
msg:{required:"清输入举报内容"},
|
||||
tip:"请输入举报内容",
|
||||
},
|
||||
informType: {
|
||||
rule:"checked;",
|
||||
msg:{checked:"举报类型不能为空"},
|
||||
tip:"请选择举报类型",
|
||||
}
|
||||
|
||||
},
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
var img = [];
|
||||
$('.inform_pic').each(function(){
|
||||
img.push($(this).attr('v'));
|
||||
});
|
||||
params.informAnnex = img.join(',');
|
||||
$.post(WST.U('home/informs/saveInform'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('您的举报已提交,请留意信息回复', {icon: 6},function(){
|
||||
location.href = WST.U('home/informs/index');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toView(id){
|
||||
location.href=WST.U('home/Informs/getUserInformDetail',{'id':id});
|
||||
}
|
||||
function informByPage(p){
|
||||
$('#list').html('<img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/informs/queryUserInformPage'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.data.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
complainByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
66
hyhproject/home2/view/default/users/informs/list_inform.html
Executable file
66
hyhproject/home2/view/default/users/informs/list_inform.html
Executable file
@ -0,0 +1,66 @@
|
||||
{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-user-tbar'>
|
||||
商品名称:<select name="informStatus" id="informStatus" class="s-query">
|
||||
<option value="-1">举报处理状态</option>
|
||||
<option value="0">等待处理</option>
|
||||
<option value="1">无效举报</option>
|
||||
<option value="2">有效举报</option>
|
||||
<option value="3">恶意举报</option>
|
||||
</select>
|
||||
<button class="wst-sec-but u-btn" onclick="informByPage()">查询</button>
|
||||
</div>
|
||||
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr class='head' style="align-content: center;">
|
||||
<th>举报编号</th>
|
||||
<th>举报商品</th>
|
||||
<th>涉及店铺</th>
|
||||
<th>举报原因</th>
|
||||
<th>举报时间</th>
|
||||
<th>举报状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' id='pager' align="center" style='padding:5px 0px 5px 0px'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td style="text-align: center;">
|
||||
{{d[i]['informId']}}
|
||||
</td>
|
||||
|
||||
<td>{{WST.cutStr(d[i]['goodsName'],30)}}</td>
|
||||
|
||||
<td>{{d[i]['shopName']}}</td>
|
||||
|
||||
<td title="{{d[i]['informContent']}}">{{WST.cutStr(d[i]['informContent'],30)}}</td>
|
||||
|
||||
<td>{{d[i]['informTime']}}</td>
|
||||
|
||||
<td>{{d[i]['informStatus']}}</td>
|
||||
|
||||
<td><a style="cursor:pointer;" onclick="toView({{d[i]['informId']}})">查看</a></td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/informs/informs.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
informByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
60
hyhproject/home2/view/default/users/logmoneys/list.html
Executable file
60
hyhproject/home2/view/default/users/logmoneys/list.html
Executable file
@ -0,0 +1,60 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}资金流水-买家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class='score-head'>
|
||||
<div class='user-logo'><img height='100' width='100'src='__IMGURL__{:WSTUserPhoto(session('WST_USER.userPhoto'))}'></div>
|
||||
<div class='user-info'>
|
||||
<div class='userName'>{:session('WST_USER.loginName')}</div>
|
||||
<div class='userScore'>可用资金:<font color='red'>¥{$object['userMoney']}</font></div>
|
||||
<div class='userScore'>冻结资金:<font color='red'>¥{$object['lockMoney']}</font></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>资金流水</li>
|
||||
<li>资金收入</li>
|
||||
<li>资金支出</li>
|
||||
</ul>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='80'>来源/用途</th>
|
||||
<th width='100'>金额</th>
|
||||
<th width='150'>日期</th>
|
||||
<th width='130'>外部流水号</th>
|
||||
<th width='*'>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i].dataSrc}}</td>
|
||||
<td>
|
||||
{{# if(d[i].moneyType==1){ }}
|
||||
<span class="money-add">+ ¥{{ d[i].money }}</span>
|
||||
{{# }else{ }}
|
||||
<span class='money-reduce'> - ¥{{ d[i].money }}</span>
|
||||
{{# } }}
|
||||
</td>
|
||||
<td>{{ d[i].createTime }}</td>
|
||||
<td>{{ WST.blank(d[i].tradeNo,'-')}}</td>
|
||||
<td style='line-height:23px'>{{ d[i].remark }}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="page-list"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5' align="center" style='padding:5px 0px 5px 0px'>
|
||||
<div id="pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/logmoneys/logmoneys.js?v={$v}'></script>
|
||||
{/block}
|
42
hyhproject/home2/view/default/users/logmoneys/logmoneys.js
Executable file
42
hyhproject/home2/view/default/users/logmoneys/logmoneys.js
Executable file
@ -0,0 +1,42 @@
|
||||
$(function () {
|
||||
$('#tab').TabPanel({tab:0,callback:function(tab){
|
||||
switch(tab){
|
||||
case 0:pageQuery(0,-1);break;
|
||||
case 1:pageQuery(0,1);break;
|
||||
case 2:pageQuery(0,0);break;
|
||||
}
|
||||
}})
|
||||
});
|
||||
function pageQuery(p,type){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
params.type = type;
|
||||
$.post(WST.U('home/logmoneys/pageUserQuery'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#page-list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageQuery(e.curr,type);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
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}
|
107
hyhproject/home2/view/default/users/my_consult.html
Executable file
107
hyhproject/home2/view/default/users/my_consult.html
Executable file
@ -0,0 +1,107 @@
|
||||
{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-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th width="10%">咨询商品</th>
|
||||
<th width="20%">商品名称</th>
|
||||
<th>咨询回复</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr>
|
||||
<td width="10%" class="tc g_bd">
|
||||
<a href="{{WST.U('home/goods/detail','id='+d[i].goodsId)}}" target="_blank" class="gc_a">
|
||||
<img class="gImg" src="__IMGURL__/{{d[i].goodsImg}}" width="60" height="60">
|
||||
</a>
|
||||
</td>
|
||||
<td width="20%" class="pd10 g_bd">
|
||||
<a href="{{WST.U('home/goods/detail','id='+d[i].goodsId)}}" target="_blank" class="gc_a">{{d[i].goodsName}}</a>
|
||||
</td>
|
||||
<td class="pd10 g_bd" style="vertical-align:top">
|
||||
<div class="my_consultbox">
|
||||
<span class="my_consult">我的咨询:{{d[i].consultContent}}</span>
|
||||
<span class="consult_time c999">{{d[i].createTime}}</span>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{{# if(WST.blank(d[i].reply)!=''){ }}
|
||||
<div class="gc_replytit">
|
||||
商家回复:
|
||||
</div>
|
||||
<div>
|
||||
{{d[i].reply}}
|
||||
</div>
|
||||
<div class="c999">{{d[i].replyTime}}</div>
|
||||
{{# }else{ }}
|
||||
<div class="gc_replytit">(暂无回复)</div>
|
||||
{{# } }}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script>
|
||||
$(function(){
|
||||
myConsultByPage();
|
||||
})
|
||||
function gDetail(id){
|
||||
return WST.U('home/goods/detail',{id:id});
|
||||
}
|
||||
function myConsultByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/goodsconsult/myConsultByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
myConsultByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
myConsultByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
86
hyhproject/home2/view/default/users/orders/appraise_manage.html
Executable file
86
hyhproject/home2/view/default/users/orders/appraise_manage.html
Executable file
@ -0,0 +1,86 @@
|
||||
{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-user-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>商品信息</th>
|
||||
<th>商品评分</th>
|
||||
<th>服务评分</th>
|
||||
<th>时效评分</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' id='pager' align="center" style='padding:5px 0px 5px 0px'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i]['orderNo']}}</td>
|
||||
<td>
|
||||
<div class="goods-info">
|
||||
<img class='j-lazyImg' width='50' width='50' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
|
||||
<p class="goodsName">
|
||||
{{d[i]['goodsName']}}
|
||||
</p>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['goodsScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['serviceScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['timeScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='5'>评价:{{d[i]['content']}}
|
||||
{{# if(d[i]['images']){ var img = d[i]['images'].split(','); var length = img.length; }}
|
||||
<div id="img-file-{{i}}">
|
||||
{{# for(var g=0;g<length;g++){ }}
|
||||
<img src="__IMGURL__/{{img[g]}}" layer-src="__IMGURL__/{{img[g]}}" width="30" height="30" />
|
||||
|
||||
{{# } }}
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d[i]['shopReply']!='' && d[i]['shopReply']!=null){ }}
|
||||
<div class="reply-box">
|
||||
<p class="reply-content">{{d[i]['shopName']}}【{{d[i]['replyTime']}}】:{{d[i]['shopReply']}}</p>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
userAppraise();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
85
hyhproject/home2/view/default/users/orders/appraise_manage▒╛╡╪═╝╞м.html
Executable file
85
hyhproject/home2/view/default/users/orders/appraise_manage▒╛╡╪═╝╞м.html
Executable file
@ -0,0 +1,85 @@
|
||||
{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-user-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>商品信息</th>
|
||||
<th>商品评分</th>
|
||||
<th>服务评分</th>
|
||||
<th>时效评分</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' id='pager' align="center" style='padding:5px 0px 5px 0px'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i]['orderNo']}}</td>
|
||||
<td>
|
||||
<div class="goods-info">
|
||||
<img class='j-lazyImg' width='50' width='50' data-original='__ROOT__/{{d[i].goodsImg}}'/>
|
||||
<p class="goodsName">
|
||||
{{d[i]['goodsName']}}
|
||||
</p>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['goodsScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['serviceScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['timeScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='5'>评价:{{d[i]['content']}}
|
||||
{{# if(d[i]['images']){ var img = d[i]['images'].split(','); var length = img.length; }}
|
||||
<div id="img-file-{{i}}">
|
||||
{{# for(var g=0;g<length;g++){ }}
|
||||
<img src="__ROOT__/{{img[g].replace('.','_thumb.')}}" layer-src="__ROOT__/{{img[g]}}" width="30" height="30" />
|
||||
{{# } }}
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d[i]['shopReply']!='' && d[i]['shopReply']!=null){ }}
|
||||
<div class="reply-box">
|
||||
<p class="reply-content">{{d[i]['shopName']}}【{{d[i]['replyTime']}}】:{{d[i]['shopReply']}}</p>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
userAppraise();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
85
hyhproject/home2/view/default/users/orders/appraise_manage鈻掆暃鈺♀暘鈺愨暆鈺炐_html
Executable file
85
hyhproject/home2/view/default/users/orders/appraise_manage鈻掆暃鈺♀暘鈺愨暆鈺炐_html
Executable file
@ -0,0 +1,85 @@
|
||||
{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-user-content">
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>商品信息</th>
|
||||
<th>商品评分</th>
|
||||
<th>服务评分</th>
|
||||
<th>时效评分</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' id='pager' align="center" style='padding:5px 0px 5px 0px'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>{{d[i]['orderNo']}}</td>
|
||||
<td>
|
||||
<div class="goods-info">
|
||||
<img class='j-lazyImg' width='50' width='50' data-original='__ROOT__/{{d[i].goodsImg}}'/>
|
||||
<p class="goodsName">
|
||||
{{d[i]['goodsName']}}
|
||||
</p>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['goodsScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['serviceScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{# for(var gs=0;gs<d[i]['timeScore'];++gs){ }}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on.png">
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='5'>评价:{{d[i]['content']}}
|
||||
{{# if(d[i]['images']){ var img = d[i]['images'].split(','); var length = img.length; }}
|
||||
<div id="img-file-{{i}}">
|
||||
{{# for(var g=0;g<length;g++){ }}
|
||||
<img src="__ROOT__/{{img[g].replace('.','_thumb.')}}" layer-src="__ROOT__/{{img[g]}}" width="30" height="30" />
|
||||
{{# } }}
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(d[i]['shopReply']!='' && d[i]['shopReply']!=null){ }}
|
||||
<div class="reply-box">
|
||||
<p class="reply-content">{{d[i]['shopName']}}【{{d[i]['replyTime']}}】:{{d[i]['shopReply']}}</p>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
userAppraise();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
15
hyhproject/home2/view/default/users/orders/box_cancel.html
Executable file
15
hyhproject/home2/view/default/users/orders/box_cancel.html
Executable file
@ -0,0 +1,15 @@
|
||||
<table class='wst-form' style='margin-top:30px;'>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:70px;'>请选择您取消订单的原因,以便我们能更好的为您服务。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>取消原因:</th>
|
||||
<td>
|
||||
<select id='reason'>
|
||||
{volist name=":WSTDatas('ORDER_CANCEL')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
33
hyhproject/home2/view/default/users/orders/box_refund.html
Executable file
33
hyhproject/home2/view/default/users/orders/box_refund.html
Executable file
@ -0,0 +1,33 @@
|
||||
<table class='wst-form' style='margin-top:10px;width:90%'>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:70px;'>请选择取消订单申请退款的原因,以便我们能更好的为您服务。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>原因:</th>
|
||||
<td>
|
||||
<select id='reason' onchange='javascript:changeRejectType(this.value)'>
|
||||
{volist name=":WSTDatas('REFUND_TYPE')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='rejectTr' style='display:none'>
|
||||
<th width='120'>原因<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<textarea id='content' style='width:99%;height:50px;' maxLength='200'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="line-height: 20px">
|
||||
<th width='120' >退款金额<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='text' id='money' maxLength='10' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event,true)"
|
||||
onblur='javascript:WST.limitDecimal(this,2)' style="margin-top: 20px;">
|
||||
<br/>(金额不能超过<font color='red'>¥{$object['realTotalMoney']}</font>{if $object['ectNum']!=""}<font color='green'>≈{$object['ectNum']}ECT</font>{/if})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>退回积分:</th>
|
||||
<td>{$object['useScore']}个(积分抵扣<font color='red'>¥{$object['scoreMoney']}</font>)</td>
|
||||
</tr>
|
||||
</table>
|
21
hyhproject/home2/view/default/users/orders/box_reject.html
Executable file
21
hyhproject/home2/view/default/users/orders/box_reject.html
Executable file
@ -0,0 +1,21 @@
|
||||
<table class='wst-form' style='margin-top:10px;width:90%'>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:70px;'>请选择您拒收订单的原因,以便我们能更好的为您服务。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='120'>取消原因:</th>
|
||||
<td>
|
||||
<select id='reason' onchange='javascript:changeRejectType(this.value)'>
|
||||
{volist name=":WSTDatas('ORDER_REJECT')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='rejectTr' style='display:none'>
|
||||
<th width='120'>原因<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<textarea id='content' style='width:99%;height:80px;' maxLength='200'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
88
hyhproject/home2/view/default/users/orders/complain.html
Executable file
88
hyhproject/home2/view/default/users/orders/complain.html
Executable file
@ -0,0 +1,88 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}投诉订单 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>投诉订单</span></div>
|
||||
<div class='wst-user-content'>
|
||||
<form id="complainForm" method="post" >
|
||||
{if condition="$data['complainStatus'] eq 0"}
|
||||
<input type='hidden' id='orderId' class='ipt' value="{$data['order']['orderId']}"/>
|
||||
<div class='wst-complain-left'>
|
||||
<div class='wst-complain-order-head'>订单商品</div>
|
||||
<div class='wst-complain-order-goods'>
|
||||
{volist name="$data['order']['goodsList']" id="goods" key='key2'}
|
||||
<a target='_blank' href="{:Url('Home/Goods/detail',array('id'=>$goods['goodsId']))}" title="{$goods['goodsName']}">
|
||||
|
||||
<img data-original="__IMGURL__/{$goods['goodsImg']}" height="55" width="55" class='goodsImg'/>
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
<div class='wst-complain-order-head'>订单信息</div>
|
||||
<div class='wst-complain-order-info'>
|
||||
<dl>
|
||||
<dt>订单编号:</dt>
|
||||
<dd>{$data['order']['orderNo']}</dd>
|
||||
<dt>订单金额:</dt>
|
||||
<dd>{$data['order']['realTotalMoney']}</dd>
|
||||
<dt>运 费:</dt>
|
||||
<dd>{$data['order']['deliverMoney']}</dd>
|
||||
<dt>下单时间:</dt>
|
||||
<dd>{$data['order']['createTime']}</dd>
|
||||
<dt>商 家:</dt>
|
||||
<dd>{$data['order']['shopName']}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-complain-main'>
|
||||
<div class='wst-complain-order-head' style='width:732px;'>投诉信息</div>
|
||||
<div class='wst-complain-box'>
|
||||
<table>
|
||||
<tr>
|
||||
<td>投诉类型:</td>
|
||||
<td>
|
||||
{php}$reason = WSTDatas('ORDER_COMPLAINT');{/php}
|
||||
{volist name='reason' id='vo'}
|
||||
<label><input type='radio' name='complainType' class='ipt' autocomplete="off" value='{$vo['dataVal']}' {if $key==1}checked{/if}>{$vo['dataName']}</label>
|
||||
{/volist}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<textarea id='complainContent' name="complainContent" class='ipt' autocomplete="off" style='width:700px;height:155px;' placeholder='请输入投诉内容'></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<div id="filePicker" style='margin-left:0px;width:250px;overflow:hidden;height:25px;'>上传附件(最多5张)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<div id='picBox' style='height:120px;width:732px;padding:5px;'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-complain-footer'>
|
||||
<button onclick="javascript:saveComplain()" class="wst-sec-but u-btn">提交</button>
|
||||
<button onclick="javascript:history.go(-1)" class="wst-sec-but u-btn">返回</button>
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
userComplainInit();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
125
hyhproject/home2/view/default/users/orders/complain_detail.html
Executable file
125
hyhproject/home2/view/default/users/orders/complain_detail.html
Executable file
@ -0,0 +1,125 @@
|
||||
{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-user-content'>
|
||||
<table border='0' class='wst-complain-detail'>
|
||||
<tr>
|
||||
<td colspan='2' class='head'>投诉信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='80'>订单号:</th>
|
||||
<td>{$data['orderNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>投诉类型:</th>
|
||||
<td>
|
||||
{php}$reason = WSTDatas('ORDER_COMPLAINT',$data['complainType']);{/php}
|
||||
{$reason['dataName']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>投诉内容:</th>
|
||||
<td class='line-break'>{$data['complainContent']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign='top'>附件:</th>
|
||||
|
||||
<td id="photos-complain">
|
||||
{volist name="$data['complainAnnex']" id="annex"}
|
||||
<a href="javascript:void(0)">
|
||||
<img layer-src="__IMGURL__/{$annex}" width="100" height="100" src="__IMGURL__/{$annex}" />
|
||||
</a>
|
||||
{/volist}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>投诉时间:</th>
|
||||
<td>{$data['complainTime']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{if condition="$data['needRespond'] eq 1 AND $data['respondContent'] neq ''"}
|
||||
<table border='0' class='wst-complain-detail'>
|
||||
<tr>
|
||||
<td colspan='2' class='head'>应诉信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='80'>应诉内容:</th>
|
||||
<td class='line-break'>{$data['respondContent']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th valign='top'>附件:</th>
|
||||
<td>
|
||||
<div id="respondAnnex">
|
||||
{volist name="$data['respondAnnex']" id="annex2"}
|
||||
<a href="javascript:void(0)"><img class='lazyImg' src="__IMGURL__/{$annex2}" layer-src="__IMGURL__/{$annex2}" height="100" width="100"/></a>
|
||||
{/volist}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>应诉时间:</th>
|
||||
<td>{$data['respondTime']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<table border='0' class='wst-complain-detail' style='margin-top:15px;'>
|
||||
<tr>
|
||||
<td colspan='2' class='head'>仲裁结果</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='80'>仲裁结果:</th>
|
||||
<td>
|
||||
{if condition="$data['complainStatus'] eq 0"}
|
||||
等待处理
|
||||
{elseif condition="$data['complainStatus'] eq 1"/}
|
||||
等待应诉人回应
|
||||
{elseif condition="$data['complainStatus'] eq 2 OR $data['complainStatus'] eq 3"/}
|
||||
等待仲裁
|
||||
{elseif condition="$data['complainStatus'] eq 4"/}
|
||||
已仲裁
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if condition="$data['complainStatus'] eq 4"}
|
||||
<tr>
|
||||
<th valign='top'>仲裁结果:</th>
|
||||
<td class='line-break'>
|
||||
{$data['finalResult']}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if condition="$data['complainStatus'] eq 4"}
|
||||
<tr>
|
||||
<th>仲裁时间:</th>
|
||||
<td>{$data['finalResultTime']} </td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center;'>
|
||||
<button onclick="javascript:history.go(-1)" class="wst-sec-but u-btn">返回</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
// 调用图像层
|
||||
layer.photos({
|
||||
photos: '#photos-complain'
|
||||
});
|
||||
layer.photos({
|
||||
photos: '#respondAnnex'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
126
hyhproject/home2/view/default/users/orders/list_abnormal.html
Executable file
126
hyhproject/home2/view/default/users/orders/list_abnormal.html
Executable file
@ -0,0 +1,126 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="u-query" id='orderNo'/>
|
||||
店铺名称:<input type='text' class="u-query" id='shopName'/>
|
||||
是否退款:
|
||||
<select name="isRefund" id="isRefund" class="s-query">
|
||||
<option value="-1">请选择</option>
|
||||
<option value="1">已退款</option>
|
||||
<option value="0">未退款</option>
|
||||
</select>
|
||||
<button class="wst-sec-but u-btn" onclick="abnormalByPage()">查询</button>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class='shop'>{{d[i].shopName}}</div>
|
||||
<div class='link'>{{WST.shopQQ(d[i].shopQQ)}}{{WST.shopWangWang(d[i].shopWangWang)}}</div>
|
||||
<div>
|
||||
{{d[i].status}}
|
||||
{{#if(d[i].payType ==1 && d[i].isPay == 1){}}
|
||||
{{#if(d[i].isRefund==1){}}【已退款】{{#}else{}}【未退款】{{#}}}
|
||||
{{# } }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{#if(j==0){}}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverType}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{# if(d[i].allowRefund==1){ }}
|
||||
<div><a href='javascript:void(0)' onclick='refund({{d[i].orderId}},"abnormal")'>【申请退款】</a></div>
|
||||
{{# } }}
|
||||
<div><a href='javascript:void(0)' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
{{# if(d[i].isComplain==''){ }}
|
||||
<div><a href='javascript:void(0)' onclick='complain({{d[i].orderId}})'>【订单投诉】</a></div>
|
||||
{{# } }}
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【我的留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
abnormalByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
121
hyhproject/home2/view/default/users/orders/list_appraise.html
Executable file
121
hyhproject/home2/view/default/users/orders/list_appraise.html
Executable file
@ -0,0 +1,121 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="s-query" id='orderNo'/>
|
||||
店铺名称:<input type='text' class="s-query" id='shopName'/>
|
||||
<button class="wst-sec-but u-btn" onclick="waitAppraiseByPage()">查询</button>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class='shop'>{{d[i].shopName}}</div>
|
||||
<div class='link'>{{WST.shopQQ(d[i].shopQQ)}}{{WST.shopWangWang(d[i].shopWangWang)}}</div>
|
||||
<div>
|
||||
{{d[i].status}}
|
||||
{{#if(d[i].orderStatus==0){}} | <a href='#none' onclick='javascript:cancel(d[i].orderId)'>取消订单</a>{{# } }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{#if(j==0){}}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverType}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{#if(d[i].isAppraise==0){}}
|
||||
<div>
|
||||
<a href='javascript:;' onclick='javascript:toAppraise({{d[i].orderId}})'>【评价订单】</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
{{# if(d[i].isComplain==''){ }}
|
||||
<div><a href='#none' onclick='complain({{d[i].orderId}})'>【订单投诉】</a></div>
|
||||
{{# } }}
|
||||
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【我的留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
waitAppraiseByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
117
hyhproject/home2/view/default/users/orders/list_cancel.html
Executable file
117
hyhproject/home2/view/default/users/orders/list_cancel.html
Executable file
@ -0,0 +1,117 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="u-query" id='orderNo'/>
|
||||
店铺名称:<input type='text' class="u-query" id='shopName'/>
|
||||
<button class="wst-sec-but u-btn" onclick="cancelByPage()">查询</button>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class='shop'>{{d[i].shopName}}</div>
|
||||
<div class='link'>{{WST.shopQQ(d[i].shopQQ)}}{{WST.shopWangWang(d[i].shopWangWang)}}</div>
|
||||
<div>
|
||||
{{d[i].status}}
|
||||
{{#if(d[i].payType ==1 && d[i].isPay == 1){}}
|
||||
{{#if(d[i].isRefund==1){}}【已退款】{{#}else{}}【未退款】{{#}}}
|
||||
{{# } }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{#if(j==0){}}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverType}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{# if(d[i].allowRefund==1){ }}
|
||||
<div><a href='javascript:void(0)' onclick='refund({{d[i].orderId}},"cancel")'>【申请退款】</a></div>
|
||||
{{# } }}
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【我的留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
cancelByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
60
hyhproject/home2/view/default/users/orders/list_complain.html
Executable file
60
hyhproject/home2/view/default/users/orders/list_complain.html
Executable file
@ -0,0 +1,60 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="s-query" id='orderNo'/>
|
||||
<button class="wst-sec-but u-btn" onclick="complainByPage()">查询</button>
|
||||
</div>
|
||||
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单编号</th>
|
||||
<th>被投诉方</th>
|
||||
<th>投诉原因</th>
|
||||
<th>投诉时间</th>
|
||||
<th>投诉状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='list'></tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='10' id='pager' align="center" style='padding:5px 0px 5px 0px'></td></tr>
|
||||
</tfoot>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td>
|
||||
{{d[i]['orderNo']}}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</td>
|
||||
|
||||
<td>{{d[i]['shopName']}}</td>
|
||||
|
||||
<td title="{{d[i]['complainContent']}}">{{WST.cutStr(d[i]['complainContent'],50)}}</td>
|
||||
|
||||
<td>{{d[i]['complainTime']}}</td>
|
||||
|
||||
<td>{{d[i]['complainStatus']}}</td>
|
||||
|
||||
<td><a style="cursor:pointer;" onclick="toView({{d[i]['complainId']}})">查看</a></td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
complainByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
124
hyhproject/home2/view/default/users/orders/list_finish.html
Executable file
124
hyhproject/home2/view/default/users/orders/list_finish.html
Executable file
@ -0,0 +1,124 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="u-query" id='orderNo'/>
|
||||
店铺名称:<input type='text' class="u-query" id='shopName'/>
|
||||
<button class="wst-sec-but u-btn" onclick="finishByPage()">查询</button>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class='shop'>{{d[i].shopName}}</div>
|
||||
<div class='link'>{{WST.shopQQ(d[i].shopQQ)}}{{WST.shopWangWang(d[i].shopWangWang)}}</div>
|
||||
<div>
|
||||
{{d[i].status}}
|
||||
{{#if(d[i].orderStatus==0){}} | <a href='#none' onclick='javascript:cancel(d[i].orderId)'>取消订单</a>{{# } }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{#if(j==0){}}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverType}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{#if(d[i].isAppraise==1){}}
|
||||
<div>已评价</div>
|
||||
{{# }else { }}
|
||||
<div>
|
||||
<a href='#none' onclick='javascript:toAppraise({{d[i].orderId}})'>【评价订单】</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
|
||||
{{# if(d[i].isComplain==''){ }}
|
||||
<div><a href='#none' onclick='complain({{d[i].orderId}})'>【订单投诉】</a></div>
|
||||
{{# } }}
|
||||
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【我的留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
finishByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
197
hyhproject/home2/view/default/users/orders/list_order_appraise.html
Executable file
197
hyhproject/home2/view/default/users/orders/list_order_appraise.html
Executable file
@ -0,0 +1,197 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}待评价订单 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>评价订单</span></div>
|
||||
<div class='wst-user-content'>
|
||||
{volist name="$data" id="vo" key='k'}
|
||||
{if (empty($vo['appraise']))}
|
||||
<form id="appraise-form{$k}">
|
||||
|
||||
<div class="appraise-box">
|
||||
<input type="hidden" id="ogId{$k}" value="{$vo['id']}">
|
||||
<input type="hidden" id="gid{$k}" value="{$vo['goodsId']}">
|
||||
<input type="hidden" id="oid{$k}" value="{$vo['orderId']}">
|
||||
<input type="hidden" id="gsid{$k}" value="{$vo['goodsSpecId']}">
|
||||
<div class="o-goods-info">
|
||||
<img src="__IMGURL__/{$vo['goodsImg']}" title="商品名称" />
|
||||
<p class="o-goodsName" title="{$vo['goodsName']}">{if $vo['goodsCode']=='gift'}【赠品】{/if}{$vo['goodsName']}</p>
|
||||
<p class="o-goodsSpec" title="{$vo['goodsSpecNames']}">{$vo['goodsSpecNames']}</p>
|
||||
</div>
|
||||
<div class="appraise-area" id="app-box{$k}">
|
||||
<div class="appraise-item goodsScore{$k}">
|
||||
<div class="appraise-title">商品评分:</div>
|
||||
<div class="appraise-content">
|
||||
<div class="{$vo['id']}_goodsScore" style='float:left'></div>
|
||||
<div id="{$vo['id']}_goodsScore_hint" style='float:left'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item timeScore{$k}">
|
||||
<div class="appraise-title"> 时效评分:</div>
|
||||
<div class="appraise-content">
|
||||
<div class="{$vo['id']}_timeScore" style='float:left'></div>
|
||||
<div id="{$vo['id']}_timeScore_hint" style='float:left'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item serviceScore{$k}">
|
||||
<div class="appraise-title">服务评分:</div>
|
||||
<div class="appraise-content">
|
||||
<div class="{$vo['id']}_serviceScore" style='float:left'></div>
|
||||
<div id="{$vo['id']}_serviceScore_hint" style='float:left'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<div id="score_error{$k}"></div>
|
||||
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title">点评内容:</div>
|
||||
<div class="appraise-content">
|
||||
<textarea maxlength="200" id="content{$k}" style="width:610px;resize:none;" cols="70" rows="5"
|
||||
data-rule="点评内容:required; length(3~200)"
|
||||
data-msg-length="点评内容为3-200个字"
|
||||
data-target="#msg_holder"
|
||||
></textarea>
|
||||
<div id="msg_holder"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title"> </div>
|
||||
<div class="appraise-content">
|
||||
|
||||
<div id='picBox{$k}' style='height:120px;width:650px;margin-top:-20px;position:relative;'>
|
||||
<div id="filePicker{$k}" style='margin-left:0px;width:300px;position:relative;left:2px;top:23px;'>
|
||||
晒照片(限5张)
|
||||
</div>
|
||||
<div class="" style="position:relative;left:-26px;top:-9px;float:right;">
|
||||
<button class="appraise-btn" type="submit" >评价</button></div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="wst-clear"></div>
|
||||
{else /}
|
||||
<div class="appraise-complate">
|
||||
<div class="o-goods-info">
|
||||
<img src="__IMGURL__/{$vo['goodsImg']}" title="商品名称" />
|
||||
<p class="o-goodsName" title="{$vo['goodsName']}">{if $vo['goodsCode']=='gift'}【赠品】{/if}{$vo['goodsName']}</p>
|
||||
<p class="o-goodsSpec" title="{$vo['goodsSpecNames']}">{$vo['goodsSpecNames']}</p>
|
||||
</div>
|
||||
|
||||
<div class="appraise-area">
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title">商品评分:</div>
|
||||
<div class="appraise-content">
|
||||
{for start="0" end="$vo['appraise']['goodsScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on-big.png">
|
||||
{/for}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title"> 时效评分:</div>
|
||||
<div class="appraise-content">
|
||||
{for start="0" end="$vo['appraise']['timeScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on-big.png">
|
||||
{/for}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title">服务评分:</div>
|
||||
<div class="appraise-content">
|
||||
{for start="0" end="$vo['appraise']['serviceScore']"}
|
||||
<img src="__STATIC__/plugins/raty/img/star-on-big.png">
|
||||
{/for}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title">点评内容:</div>
|
||||
<div class="appraise-content">
|
||||
<p class="complate-content">{$vo['appraise']['content']} [{:date('Y-m-d',strtotime($vo['appraise']['createTime']))}]</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
<div class="appraise-item">
|
||||
<div class="appraise-title"> </div>
|
||||
<div class="appraise-content">
|
||||
<div id="appraise-img-{$k}">
|
||||
{volist name="$vo['appraise']['images']" id="img"}
|
||||
{if !empty($img)}
|
||||
<img src="__IMGURL__/{$img}" layer-src="__IMGURL__/{$img}" width="75" height="75" />
|
||||
<!--
|
||||
<img src="__ROOT__/{:str_replace('.','_thumb.',$img)}" layer-src="__ROOT__/{$img}" width="75" height="75" />
|
||||
-->
|
||||
{/if}
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
{/if}
|
||||
{/volist}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/raty/jquery.raty.min.js?v={$v}"></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<script>
|
||||
/*评分*/
|
||||
$(function(){
|
||||
/*调用相册层*/
|
||||
$(this).find('div[id^="appraise-img-"]').each(function(k,v){
|
||||
appraisesShowImg($(this).attr('id'));
|
||||
});
|
||||
|
||||
var options = {
|
||||
hints : ['很不满意', '不满意', '一般', '满意', '非常满意'],
|
||||
width:200,
|
||||
targetKeep: true,
|
||||
starHalf:'__STATIC__/plugins/raty/img/star-half-big.png',
|
||||
starOff:'__STATIC__/plugins/raty/img/star-off-big.png',
|
||||
starOn:'__STATIC__/plugins/raty/img/star-on-big.png',
|
||||
cancelOff: '__STATIC__/plugins/raty/img/cancel-off-big.png',
|
||||
cancelOn: '__STATIC__/plugins/raty/img/cancel-on-big.png'
|
||||
}
|
||||
{volist name="$data" id="g" key='key1' }
|
||||
options.target='#{$g["id"]}_goodsScore_hint';
|
||||
$('.{$g["id"]}_goodsScore').raty(options);
|
||||
options.target='#{$g["id"]}_timeScore_hint';
|
||||
$('.{$g["id"]}_timeScore').raty(options);
|
||||
options.target='#{$g["id"]}_serviceScore_hint';
|
||||
$('.{$g["id"]}_serviceScore').raty(options);
|
||||
upload({$key1});
|
||||
//调用验证规则
|
||||
validator({$key1});
|
||||
{/volist}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
{/block}
|
115
hyhproject/home2/view/default/users/orders/list_wait_pay.html
Executable file
115
hyhproject/home2/view/default/users/orders/list_wait_pay.html
Executable file
@ -0,0 +1,115 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="u-query" id='orderNo'/>
|
||||
店铺名称:<input type='text' class="u-query" id='shopName'/>
|
||||
<button class="wst-sec-but u-btn" onclick="waitPayByPage()">查询</button>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy' style='display:none'>
|
||||
<tr id='loading' class='empty-row' >
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class='shop'>{{d[i].shopName}}</div>
|
||||
<div class='link'>{{WST.shopQQ(d[i].shopQQ)}}{{WST.shopWangWang(d[i].shopWangWang)}}</div>
|
||||
<div>{{d[i].status}} | <a href='#none' onclick='javascript:cancel({{d[i].orderId}},0)'>取消订单</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
var parmas = {};
|
||||
parmas.orderNo = d[i].orderNo;
|
||||
parmas.isBatch = 0;
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{#if(j==0){}}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverType}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div><a href='{{WST.U('home/orders/succeed',parmas)}}'>【立即支付】</a></div>
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
</td>
|
||||
{{# } }}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【我的留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
waitPayByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
133
hyhproject/home2/view/default/users/orders/list_wait_receive.html
Executable file
133
hyhproject/home2/view/default/users/orders/list_wait_receive.html
Executable file
@ -0,0 +1,133 @@
|
||||
{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-user-tbar'>
|
||||
订单号:<input type='text' class="u-query" id='orderNo'/>
|
||||
店铺名称:<input type='text' class="u-query" id='shopName'/>
|
||||
<button class="wst-sec-but u-btn" onclick="waitReceiveByPage()">查询</button>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<table class='wst-order-list'>
|
||||
<thead>
|
||||
<tr class='head'>
|
||||
<th>订单详情</th>
|
||||
<th width="107">支付方式/配送信息</th>
|
||||
<th>金额</th>
|
||||
<th width="87">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='loadingBdy'>
|
||||
<tr id='loading' class='empty-row' style='display:none'>
|
||||
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tbody class="j-order-row">
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4'> </td>
|
||||
</tr>
|
||||
<tr class='order-head'>
|
||||
<td colspan='4' align='right'>
|
||||
<div class='time'>{{d[i].createTime}}</div>
|
||||
<div class='orderno'>订单号:{{d[i].orderNo}}
|
||||
{{# if(d[i].orderSrc==0){ }}<i class="order-pc"></i>
|
||||
{{# }else if(d[i].orderSrc==1){ }}<i class="order-wx"></i>
|
||||
{{# }else if(d[i].orderSrc==2){ }}<i class="order-mo"></i>
|
||||
{{# }else if(d[i].orderSrc==3){ }}<i class="order-app"></i>
|
||||
{{# }else if(d[i].orderSrc==4){ }}<i class="order-ios"></i>
|
||||
{{# } }}
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class='shop'>{{d[i].shopName}}</div>
|
||||
<div class='link'>{{WST.shopQQ(d[i].shopQQ)}}{{WST.shopWangWang(d[i].shopWangWang)}}</div>
|
||||
<div>
|
||||
{{d[i].status}}
|
||||
{{#if(d[i].orderStatus==0){}} | <a href='#none' onclick='javascript:cancel({{d[i].orderId}},1)'>取消订单</a>{{# } }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{#
|
||||
var tmp = null,rows = d[i]['list'].length;
|
||||
for(var j = 0; j < d[i]['list'].length; j++){
|
||||
tmp = d[i]['list'][j];
|
||||
}}
|
||||
<tr class='goods-box'>
|
||||
<td>
|
||||
<div class='goods-img'>
|
||||
<a href="{{WST.U('home/goods/detail','id='+tmp.goodsId)}}" target='_blank'>
|
||||
<img data-original='__IMGURL__/{{tmp.goodsImg}}' title='{{tmp.goodsName}}' class="gImg">
|
||||
</a>
|
||||
</div>
|
||||
<div class='goods-name'>
|
||||
<div>{{tmp.goodsName}}</div>
|
||||
<div>{{tmp.goodsSpecNames}}</div>
|
||||
</div>
|
||||
<div class='goods-extra'>{{tmp.goodsPrice}} x {{tmp.goodsNum}}</div>
|
||||
</td>
|
||||
{{#if(j==0){}}
|
||||
<td rowspan="{{rows}}">
|
||||
<div>{{d[i].payTypeName}}</div>
|
||||
<div>{{d[i].deliverType}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
<div>商品金额:¥{{d[i].goodsMoney}}</div>
|
||||
<div class='line'>运费:¥{{d[i].deliverMoney}}</div>
|
||||
<div>实付金额:¥{{d[i].realTotalMoney}}</div>
|
||||
</td>
|
||||
<td rowspan="{{rows}}">
|
||||
{{#if(d[i].orderStatus==0 && d[i].noticeDeliver==0){}}
|
||||
<div>
|
||||
<a href='#none' onclick='javascript:noticeDeliver({{d[i].orderId}})'>【提醒发货】</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
{{#if(d[i].orderStatus==1){}}
|
||||
<div>
|
||||
<a href='#none' onclick='javascript:toReceive({{d[i].orderId}})'>【确认收货】</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href='#none' onclick='javascript:toReject({{d[i].orderId}})'>【拒绝收货】</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href='#none' onclick='javascript:toDelay({{d[i].orderId}})'>【延时收货】</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div><a href='#none' onclick='view({{d[i].orderId}})'>【订单详情】</a></div>
|
||||
|
||||
{{# if(d[i].isComplain==''){ }}
|
||||
<div><a href='#none' onclick='complain({{d[i].orderId}})'>【订单投诉】</a></div>
|
||||
{{# } }}
|
||||
</td>
|
||||
{{#}}}
|
||||
</tr>
|
||||
{{# } }}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{# if(WST.blank(d[i].orderRemarks)!=''){ }}
|
||||
<div class="order_remaker">【我的留言】{{d[i].orderRemarks}}</div>
|
||||
{{# } }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tr class='empty-row'>
|
||||
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
waitReceiveByPage();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
683
hyhproject/home2/view/default/users/orders/orders.js
Executable file
683
hyhproject/home2/view/default/users/orders/orders.js
Executable file
@ -0,0 +1,683 @@
|
||||
// 提醒发货
|
||||
function noticeDeliver(id){
|
||||
var box = WST.confirm({content:"您确定要提醒发货吗?",yes:function(){
|
||||
layer.close(box);
|
||||
var ll = WST.load({msg:'正在提交信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/noticeDeliver'),{id:id},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waitReceiveByPage(WSTCurrPage);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
||||
|
||||
function waitPayByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.u-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/waitPayByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
waitPayByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
waitPayByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function waitReceiveByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.u-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/waitReceiveByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
waitReceiveByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
waitReceiveByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function toReceive(id){
|
||||
WST.confirm({content:'您确定已收货吗?',yes:function(){
|
||||
var ll = WST.load({msg:'正在提交信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/receive'),{id:id},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waitReceiveByPage(WSTCurrPage);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}})
|
||||
}
|
||||
function toDelay(id){
|
||||
WST.confirm({content:'亲,只能延时收货一次哒?',yes:function(){
|
||||
var ll = WST.load({msg:'正在提交信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/delay'),{id:id},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
waitReceiveByPage(WSTCurrPage);
|
||||
layer.close(ll);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}})
|
||||
}
|
||||
function waitAppraiseByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/waitAppraiseByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
waitAppraiseByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
waitAppraiseByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function finishByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.u-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/finishByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
finishByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function cancel(id,type){
|
||||
var ll = WST.load({msg:'正在加载信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/toCancel'),{id:id},function(data){
|
||||
layer.close(ll);
|
||||
var w = WST.open({
|
||||
type: 1,
|
||||
title:"取消订单",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['500px', '260px'],
|
||||
btn: ['提交', '关闭窗口'],
|
||||
yes: function(index, layero){
|
||||
var reason = $.trim($('#reason').val());
|
||||
ll = WST.load({msg:'数据处理中,请稍候...'});
|
||||
$.post(WST.U('home/orders/cancellation'),{id:id,reason:reason},function(data){
|
||||
layer.close(w);
|
||||
layer.close(ll);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg, {icon: 1});
|
||||
if(type==0){
|
||||
waitPayByPage(WSTCurrPage);
|
||||
}else{
|
||||
waitReceiveByPage(WSTCurrPage);
|
||||
}
|
||||
}else{
|
||||
WST.msg(json.msg, {icon: 2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function toReject(id){
|
||||
var ll = WST.load({msg:'正在加载信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/toReject'),{id:id},function(data){
|
||||
layer.close(ll);
|
||||
var w = WST.open({
|
||||
type: 1,
|
||||
title:"拒收订单",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['500px', '300px'],
|
||||
btn: ['提交', '关闭窗口'],
|
||||
yes: function(index, layero){
|
||||
var params = {};
|
||||
params.reason = $.trim($('#reason').val());
|
||||
params.content = $.trim($('#content').val());
|
||||
params.id = id;
|
||||
if(params.id==10000 && params.conten==''){
|
||||
WST.msg('请输入拒收原因',{icon:2});
|
||||
return;
|
||||
}
|
||||
ll = WST.load({msg:'数据处理中,请稍候...'});
|
||||
$.post(WST.U('home/orders/reject'),params,function(data){
|
||||
layer.close(w);
|
||||
layer.close(ll);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg, {icon: 1});
|
||||
waitReceiveByPage(WSTCurrPage);
|
||||
}else{
|
||||
WST.msg(json.msg, {icon: 2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function changeRejectType(v){
|
||||
if(v==10000){
|
||||
$('#rejectTr').show();
|
||||
}else{
|
||||
$('#rejectTr').hide();
|
||||
}
|
||||
}
|
||||
function cancelByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.u-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/cancelByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
cancelByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function abnormalByPage(p){
|
||||
$('#loading').show();
|
||||
var params = {};
|
||||
params = WST.getParams('.u-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/orders/abnormalByPage'),params,function(data,textStatus){
|
||||
$('#loading').hide();
|
||||
var json = WST.toJson(data);
|
||||
$('.j-order-row').remove();
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
if(params.page>json.TotalPage && json.TotalPage >0){
|
||||
abnormalByPage(json.TotalPage);
|
||||
return;
|
||||
}
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$(html).insertAfter('#loadingBdy');
|
||||
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
abnormalByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function refund(id,src){
|
||||
var ll = WST.load({msg:'正在加载信息,请稍候...'});
|
||||
$.post(WST.U('home/orders/toRefund'),{id:id},function(data){
|
||||
layer.close(ll);
|
||||
var w = WST.open({
|
||||
type: 1,
|
||||
title:"申请退款",
|
||||
shade: [0.6, '#000'],
|
||||
border: [0],
|
||||
content: data,
|
||||
area: ['500px', '320px'],
|
||||
btn: ['提交', '关闭窗口'],
|
||||
yes: function(index, layero){
|
||||
var params = {};
|
||||
params.reason = $.trim($('#reason').val());
|
||||
params.content = $.trim($('#content').val());
|
||||
params.money = $.trim($('#money').val());
|
||||
params.id = id;
|
||||
if(params.money<0){
|
||||
WST.msg('无效的退款金额',{icon:2});
|
||||
return;
|
||||
}
|
||||
if(params.id==10000 && params.conten==''){
|
||||
WST.msg('请输入原因',{icon:2});
|
||||
return;
|
||||
}
|
||||
ll = WST.load({msg:'数据处理中,请稍候...'});
|
||||
$.post(WST.U('home/orderrefunds/refund'),params,function(data){
|
||||
layer.close(ll);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg, {icon: 1});
|
||||
layer.close(w);
|
||||
if(src=='abnormal'){
|
||||
abnormalByPage(WSTCurrPage);
|
||||
}else{
|
||||
cancelByPage(WSTCurrPage);
|
||||
}
|
||||
}else{
|
||||
WST.msg(json.msg, {icon: 2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function view(id){
|
||||
location.href=WST.U('home/orders/detail','id='+id);
|
||||
}
|
||||
function complain(id){
|
||||
location.href=WST.U('home/ordercomplains/complain','orderId='+id);
|
||||
}
|
||||
|
||||
|
||||
/******************** 评价页面 ***********************/
|
||||
function appraisesShowImg(id){
|
||||
layer.photos({
|
||||
photos: '#'+id
|
||||
});
|
||||
}
|
||||
function toAppraise(id){
|
||||
location.href=WST.U("home/orders/orderAppraise",{'oId':id});
|
||||
}
|
||||
//文件上传
|
||||
function upload(n){
|
||||
var uploader =WST.upload({
|
||||
pick:'#filePicker'+n,
|
||||
formData: {dir:'appraises',isThumb:1},
|
||||
fileNumLimit:5,
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f,file){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
// var tdiv = $("<div style='width:75px;float:left;margin-right:5px;'>"+
|
||||
// "<img class='appraise_pic"+n+"' width='75' height='75' src='"+WST.conf.ROOT+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></div>");
|
||||
// var btn = $('<div style="position:relative;top:-80px;left:60px;cursor:pointer;" ><img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_error.png"></div>');
|
||||
// 修改oss地址 mark 20180612 by zl
|
||||
var tdiv = $("<div style='width:75px;float:left;margin-right:5px;'>"+
|
||||
"<img class='appraise_pic"+n+"' width='75' height='75' src='"+WST.conf.IMGURL+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></div>");
|
||||
var btn = $('<div style="position:relative;top:-80px;left:60px;cursor:pointer;" ><img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_error.png"></div>');
|
||||
tdiv.append(btn);
|
||||
$('#picBox'+n).append(tdiv);
|
||||
btn.on('click','img',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validator(n){
|
||||
$('#appraise-form'+n).validator({
|
||||
fields: {
|
||||
score: {
|
||||
rule:"required",
|
||||
msg:{required:"评分必须都大于0"},
|
||||
ok:"",
|
||||
target:"#score_error"+n,
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
valid: function(form){
|
||||
var params = {};
|
||||
//获取该评价的内容
|
||||
params.content = $('#content'+n).val();
|
||||
// 获取该评价附件
|
||||
var photo=[];
|
||||
var images = [];
|
||||
$('.appraise_pic'+n).each(function(k,v){
|
||||
var img = $(this).attr('v');
|
||||
// 用于评价成功后的显示
|
||||
photo.push(WST.conf.IMGURL+'/'+img);
|
||||
images.push(img);
|
||||
});
|
||||
params.images = images.join(',');
|
||||
//获取评分
|
||||
params.goodsScore = $('.goodsScore'+n).find('[name=score]').val();
|
||||
params.timeScore = $('.timeScore'+n).find('[name=score]').val();
|
||||
params.serviceScore = $('.serviceScore'+n).find('[name=score]').val();
|
||||
params.goodsId = $('#gid'+n).val();
|
||||
params.orderId = $('#oid'+n).val();
|
||||
params.goodsSpecId = $('#gsid'+n).val();
|
||||
params.orderGoodsId = $('#ogId'+n).val();
|
||||
|
||||
$.post(WST.U('home/goodsAppraises/add'),params,function(data,dataStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var thisbox = $('#app-box'+n);
|
||||
var html = '<div class="appraise-area"><div class="appraise-item"><div class="appraise-title">商品评分:</div>';
|
||||
html += '<div class="appraise-content">';
|
||||
// 商品评分
|
||||
for(var i=1;i<=params.goodsScore;i++){
|
||||
html +='<img src="'+WST.conf.STATIC+'/plugins/raty/img/star-on-big.png">';
|
||||
}
|
||||
html +='</div></div><div class="wst-clear"></div><div class="appraise-item"><div class="appraise-title"> 时效评分:</div>'
|
||||
html +='<div class="appraise-content">'
|
||||
// 时效评分
|
||||
for(var i=1;i<=params.timeScore;i++){
|
||||
html +='<img src="'+WST.conf.STATIC+'/plugins/raty/img/star-on-big.png">';
|
||||
}
|
||||
html +='</div></div><div class="wst-clear"></div><div class="appraise-item"><div class="appraise-title">服务评分:</div>';
|
||||
html +='<div class="appraise-content">';
|
||||
// 服务评分
|
||||
for(var i=1;i<=params.serviceScore;i++){
|
||||
html +='<img src="'+WST.conf.STATIC+'/plugins/raty/img/star-on-big.png">';
|
||||
}
|
||||
html +='</div></div><div class="wst-clear"></div><div class="appraise-item"><div class="appraise-title">点评内容:</div>';
|
||||
// 评价内容
|
||||
html +='<div class="appraise-content">';
|
||||
// 获取当前年月日
|
||||
var oDate = new Date();
|
||||
var year = oDate.getFullYear()+'-'; //获取系统的年;
|
||||
var month = oDate.getMonth()+1+'-'; //获取系统月份,由于月份是从0开始计算,所以要加1
|
||||
var day = oDate.getDate(); // 获取系统日,
|
||||
html +='<p>'+params.content+'['+year+month+day+']</p>';
|
||||
html +='</div></div><div class="wst-clear"></div><div class="appraise-item"><div class="appraise-title"> </div>';
|
||||
// 评价附件
|
||||
html +='<div class="appraise-content">';
|
||||
// 当前生成的相册id
|
||||
var imgBoxId = "appraise-img-"+n;
|
||||
html +='<div id='+imgBoxId+'>'
|
||||
var count = photo.length;
|
||||
for(var m=0;m<count;m++){
|
||||
// html += '<img src="'+photo[m].replace('.','_thumb.')+'" layer-src="'+photo[m]+'" width="75" height="75" style="margin-right:5px;">';
|
||||
// 修改为oss地址 mark 20180612 by zl
|
||||
html += '<img src="'+WST.conf.IMGURL+photo[m]+'?x-oss-process=image/resize,w_75,h_75" layer-src="'+WST.conf.IMGURL+photo[m]+'?x-oss-process=image/resize,w_75,h_75" width="75" height="75" style="margin-right:5px;">';
|
||||
}
|
||||
html +='</div></div></div></div>';
|
||||
thisbox.html(html);
|
||||
// 调用相册层
|
||||
appraisesShowImg(imgBoxId);
|
||||
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* 用户评价管理 */
|
||||
function showImg(id){
|
||||
layer.photos({
|
||||
photos: '#img-file-'+id
|
||||
});
|
||||
}
|
||||
function userAppraise(p){
|
||||
$('#list').html('<img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/goodsappraises/userAppraise'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(!json.data.Rows){
|
||||
$('#list').html('');
|
||||
}
|
||||
if(json.status==1){
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.data.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
for(var g=0;g<=json.data.Rows.length;g++){
|
||||
showImg(g);
|
||||
}
|
||||
$('.j-lazyImg').lazyload({ effect: "fadeIn",failurelimit : 10,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});
|
||||
});
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.data.TotalPage,
|
||||
curr: json.data.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
userAppraise(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
/**************** 用户投诉页面 *****************/
|
||||
function userComplainInit(){
|
||||
var uploader =WST.upload({
|
||||
pick:'#filePicker',
|
||||
formData: {dir:'complains',isThumb:1},
|
||||
fileNumLimit:5,
|
||||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||||
callback:function(f,file){
|
||||
var json = WST.toJson(f);
|
||||
if(json.status==1){
|
||||
var tdiv = $("<div style='width:75px;float:left;margin-right:5px;'>"+
|
||||
"<img class='complain_pic"+"' width='75' height='75' src='"+WST.conf.IMGURL+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></div>");
|
||||
var btn = $('<div style="position:relative;top:-80px;left:60px;cursor:pointer;" ><img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/seller_icon_error.png"></div>');
|
||||
tdiv.append(btn);
|
||||
$('#picBox').append(tdiv);
|
||||
btn.on('click','img',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
||||
function saveComplain(historyURL){
|
||||
/* 表单验证 */
|
||||
$('#complainForm').validator({
|
||||
fields: {
|
||||
complainContent: {
|
||||
rule:"required",
|
||||
msg:{required:"清输入投诉内容"},
|
||||
tip:"清输入投诉内容",
|
||||
},
|
||||
complainType: {
|
||||
rule:"checked;",
|
||||
msg:{checked:"投诉类型不能为空"},
|
||||
tip:"请选择投诉类型",
|
||||
}
|
||||
|
||||
},
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
var img = [];
|
||||
$('.complain_pic').each(function(){
|
||||
img.push($(this).attr('v'));
|
||||
});
|
||||
params.complainAnnex = img.join(',');
|
||||
|
||||
$.post(WST.U('home/orderComplains/saveComplain'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('您的投诉已提交,请留意信息回复', {icon: 6},function(){
|
||||
location.href = WST.U('home/ordercomplains/index');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*********************** 用户投诉列表页面 ***************************/
|
||||
function toView(id){
|
||||
location.href=WST.U('home/ordercomplains/getUserComplainDetail',{'id':id});
|
||||
}
|
||||
function complainByPage(p){
|
||||
$('#list').html('<img src="'+WST.conf.ROOT+'/hyhproject/home/view/default/img/loading.gif">正在加载数据...');
|
||||
var params = {};
|
||||
params = WST.getParams('.s-query');
|
||||
params.key = $.trim($('#key').val());
|
||||
params.page = p;
|
||||
$.post(WST.U('home/ordercomplains/queryUserComplainByPage'),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.data.Rows, function(html){
|
||||
$('#list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
complainByPage(e.curr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//导出订单
|
||||
function toExport(typeId,status,type){
|
||||
var params = {};
|
||||
params = WST.getParams('.u-query');
|
||||
params.typeId = typeId;
|
||||
params.orderStatus = status;
|
||||
params.type = type;
|
||||
var box = WST.confirm({content:"您确定要导出订单吗?",yes:function(){
|
||||
layer.close(box);
|
||||
location.href=WST.U('home/orders/toExport',params);
|
||||
}});
|
||||
}
|
244
hyhproject/home2/view/default/users/orders/view.html
Executable file
244
hyhproject/home2/view/default/users/orders/view.html
Executable file
@ -0,0 +1,244 @@
|
||||
{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-user-content'>
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>日志信息</div>
|
||||
{if in_array($object['orderStatus'],[-2,0,1,2])}
|
||||
<div class='log-box'>
|
||||
<div class="state">
|
||||
{if $object['payType']==1}
|
||||
<div class="icon">
|
||||
<span class="icons {if condition="($object['orderStatus']==-2)OR($object['orderStatus']==0)OR($object['orderStatus']==1)OR($object['orderStatus']==2)"}icon12 {else}icon11 {/if}{if condition="($object['orderStatus']==-2)"}icon13 {/if}"></span>
|
||||
</div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==0) OR ($object['orderStatus']==1) OR ($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
<div class="icon"><span class="icons {if condition="($object['orderStatus']==0)OR($object['orderStatus']==1)OR($object['orderStatus']==2)"}icon22 {else}icon21{/if}{if condition="($object['orderStatus']==0)"}icon23 {/if}"></span></div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==1) OR ($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
{else}
|
||||
<div class="icon">
|
||||
<span class="icons {if condition="($object['orderStatus']==-2)OR($object['orderStatus']==0)OR($object['orderStatus']==1)OR($object['orderStatus']==2)"}icon12 {else}icon11 {/if}{if condition="($object['orderStatus']==0)"}icon13 {/if}"></span>
|
||||
</div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==1) OR ($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
{/if}
|
||||
<div class="icon">
|
||||
<span class="icons {if condition="($object['orderStatus']==1)OR($object['orderStatus']==2)OR($object['orderStatus']==1)"}icon32 {else}icon31 {/if}{if condition="($object['orderStatus']==1)"}icon33 {/if}"></span>
|
||||
</div>
|
||||
<div class="arrow {if condition="($object['orderStatus']==2)"}arrow2{/if}">··················></div>
|
||||
<div class="icon"><span class="icons {if condition="($object['orderStatus']==2)AND($object['isAppraise']==1)"}icon42 {else}icon41 {/if}{if condition="($object['orderStatus']==2)AND($object['isAppraise']==0)"}icon43 {/if}"></span></div>
|
||||
<div class="arrow {if condition="($object['isAppraise']==1)"}arrow2{/if}">··················></div>
|
||||
<div class="icon"><span class="icons {if condition="($object['isAppraise']==1)"}icon53 {else}icon51 {/if}"></span></div>
|
||||
</div>
|
||||
<div class="state2">
|
||||
<div class="path">
|
||||
{volist name="$object['log']" id="lo"}
|
||||
<span>{$lo['logContent']}<br/>{$lo['logTime']}</span>
|
||||
{/volist}
|
||||
</div>
|
||||
<p>下单</p>{if $object['payType']==1}<p>等待支付</p>{/if}<p>商家发货</p><p>确认收货</p><p>订单结束<br/>双方互评</p>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{else}
|
||||
<div>
|
||||
<table class='log'>
|
||||
{volist name='$object["log"]' id='vo'}
|
||||
<tr>
|
||||
<td>{$vo['logTime']}</td>
|
||||
<td>{$vo['logContent']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- 订单信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>订单信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>订单编号:</th>
|
||||
<td>{$object['orderNo']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>支付方式:</th>
|
||||
<td>{:WSTLangPayType($object['payType'])}</td>
|
||||
</tr>
|
||||
{if($object['payType']==1 && $object['isPay']==1)}
|
||||
<tr>
|
||||
<th>支付时间:</th>
|
||||
<td>{$object['payTime']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>支付信息:</th>
|
||||
<td>【{:WSTLangPayFrom($object['payFrom'])}】{$object['tradeNo']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th>配送方式:</th>
|
||||
<td>{:WSTLangDeliverType($object['deliverType'])}</td>
|
||||
</tr>
|
||||
{if $object['expressNo']!=''}
|
||||
<tr>
|
||||
<th>快递公司:</th>
|
||||
<td>{$object['expressName']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>快递号:</th>
|
||||
<td>{$object['expressNo']}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th>买家留言:</th>
|
||||
<td>{$object['orderRemarks']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{:hook('homeDocumentOrderView',['orderId'=>$object['orderId']])}
|
||||
|
||||
{if $object['isRefund']==1}
|
||||
<!-- 退款信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>退款信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>退款金额:</th>
|
||||
<td>¥{$object['backMoney']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='100'>退款备注:</th>
|
||||
<td>{$object['refundRemark']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>退款时间:</th>
|
||||
<td>{$object['refundTime']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- 发票信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>发票信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>是否需要发票:</th>
|
||||
<td>{if $object['isInvoice']==1}需要{else}不需要{/if}</td>
|
||||
</tr>
|
||||
{if $object['isInvoice']==1}
|
||||
{php}$invoiceArr = json_decode($object['invoiceJson'],true);{/php}
|
||||
<tr>
|
||||
<th>发票抬头:</th>
|
||||
<td>
|
||||
{if $object['isInvoice']==1}
|
||||
{$invoiceArr['invoiceHead']}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if isset($invoiceArr['invoiceCode'])}
|
||||
<tr>
|
||||
<th>发票税号:</th>
|
||||
<td>
|
||||
{$invoiceArr['invoiceCode']}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
<!-- 收货人信息 -->
|
||||
{if ($object['orderType']==0)}
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>收货人信息</div>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th width='100'>收货人:</th>
|
||||
<td>{$object['userName']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>收货地址:</th>
|
||||
<td>{$object['userAddress']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>联系方式:</th>
|
||||
<td>{$object['userPhone']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- 商品信息 -->
|
||||
<div class='order-box'>
|
||||
<div class='box-head'>商品清单</div>
|
||||
<div class='goods-head'>
|
||||
<div class='goods'>商品</div>
|
||||
<div class='price'>单价</div>
|
||||
<div class='num'>数量</div>
|
||||
<div class='t-price'>总价</div>
|
||||
</div>
|
||||
<div class='goods-item'>
|
||||
<div class='shop'>
|
||||
{$object['shopName']}
|
||||
{if $object['shopQQ'] !=''}
|
||||
<a href="tencent://message/?uin={$object['shopQQ']}&Site=QQ交谈&Menu=yes">
|
||||
<img border="0" style='vertical-align:middle;' src="http://wpa.qq.com/pa?p=1:{$object['shopQQ']}:7" alt="QQ交谈" width="71" height="24" />
|
||||
</a>
|
||||
{/if}
|
||||
{if $object['shopWangWang'] !=''}
|
||||
<a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid={$object['shopWangWang']}&siteid=cntaobao&status=1&charset=utf-8">
|
||||
<img border="0" style='vertical-align:middle;' src="http://amos.alicdn.com/realonline.aw?v=2&uid={$object['shopWangWang']}&site=cntaobao&s=1&charset=utf-8" alt="和我联系" />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class='goods-list'>
|
||||
{volist name='$object["goods"]' id='vo2'}
|
||||
{:hook('homeDocumentOrderViewGoodsPromotion',['goods'=>$vo2])}
|
||||
<div class='item j-g{$vo2['goodsId']}'>
|
||||
<div class='goods'>
|
||||
<div class='img'>
|
||||
<a href='{:Url("home/goods/detail","id=".$vo2["goodsId"])}' target='_blank'>
|
||||
<img src='__IMGURL__/{$vo2["goodsImg"]}' width='80' height='80' title='{$vo2["goodsName"]}'/>
|
||||
</a>
|
||||
</div>
|
||||
<div class='name'>{if $vo2['goodsCode']=='gift'}【赠品】{/if}{$vo2["goodsName"]}</div>
|
||||
<div class='spec'>{:str_replace('@@_@@','<br/>',$vo2["goodsSpecNames"])}</div>
|
||||
</div>
|
||||
<div class='price'>¥{$vo2['goodsPrice']}</div>
|
||||
<div class='num'>{$vo2['goodsNum']}</div>
|
||||
<div class='t-price'>¥{$vo2['goodsPrice']*$vo2['goodsNum']}</div>
|
||||
<div class='wst-clear'></div>
|
||||
</div>
|
||||
{if $vo2['goodsType']==1 && $object['orderStatus']==2}
|
||||
<table width='100%' style='margin-top:5px;'>
|
||||
{volist name='$vo2["extraJson"]' id='vgcard'}
|
||||
<tr>
|
||||
<td>卡券号:{$vgcard['cardNo']}</td>
|
||||
<td>卡券密码:{$vgcard['cardPwd']}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</table>
|
||||
{/if}
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
<div class='goods-footer'>
|
||||
<div class='goods-summary' style='text-align:right'>
|
||||
<div class='summary'>商品总金额:¥<span>{$object['goodsMoney']}</span></div>
|
||||
<div class='summary'>运费:¥<span>{$object['deliverMoney']}</span></div>
|
||||
<div class='summary line'>应付总金额:¥<span>{$object['totalMoney']}</span></div>
|
||||
<div class='summary '>积分抵扣金额:¥-<span>{$object['scoreMoney']}</span></div>
|
||||
{if condition="$object['useScore'] gt 0"}
|
||||
<div class='summary '>使用积分数:<span>{$object['useScore']}个</span></div>
|
||||
{/if}
|
||||
{:hook('homeDocumentOrderSummaryView',['order'=>$object])}
|
||||
<div class='summary'>实付总金额:¥<span>{$object['realTotalMoney']}</span></div>
|
||||
<div>可获得积分:<span class='orderScore'>{$object["orderScore"]}</span>个</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/shops/orders/orders.js?v={$v}'></script>
|
||||
{/block}
|
71
hyhproject/home2/view/default/users/recharge/pay_step1.html
Executable file
71
hyhproject/home2/view/default/users/recharge/pay_step1.html
Executable file
@ -0,0 +1,71 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}资金管理-充值{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STYLE__/css/recharge.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>充值</span></div>
|
||||
<div class='wst-user-content'>
|
||||
<div class='pay-sbox'>
|
||||
<div>
|
||||
<div>
|
||||
<div class='wst-tips-box' style="margin-right:10px;">
|
||||
<div class='icon'></div>
|
||||
<div class='tips'>
|
||||
1.充值金额和赠送金额只能用于购买商品,不能提现;<br/>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="pay-type">充值金额
|
||||
<div>
|
||||
<div class="wst-list-box">
|
||||
{volist name="chargeItems" id="item"}
|
||||
<div class="wst-frame2 {$key} " onclick="javascript:changeSelected({$item['id']},'itmeId',this)">
|
||||
{if condition="$item['giveMoney'] gt 0"}
|
||||
<div class='charge-doub'>充值 <span class="charge-money">{$item['chargeMoney']}</span> 元</div>
|
||||
<div>送 {$item['giveMoney']} 元</div>
|
||||
{else/}
|
||||
<div class='charge-alone'>充值 <span class="charge-money">{$item['chargeMoney']}</span> 元</div>
|
||||
{/if}
|
||||
<i></i>
|
||||
</div>
|
||||
{/volist}
|
||||
<div class="wst-frame2 " onclick="javascript:changeSelected(0,'itmeId',this)">
|
||||
<div class='charge-alone'>
|
||||
<span class="j-charge-other">其他金额</span>
|
||||
<span class="j-charge-money"><input class="charge-othermoney j-ipt" id="needPay" value="1" maxlength="10" data-rule="充值金额:required;" onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)" maxlength="8"></span>
|
||||
</div>
|
||||
<i></i>
|
||||
</div>
|
||||
<input type="hidden" value="" id='itmeId' class='j-ipt' />
|
||||
<div class='wst-clear'></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><div></div>
|
||||
<div>
|
||||
<div class="pay-type">选择支付方式</div>
|
||||
<div class="pay-list">
|
||||
<input type="hidden" id="payCode" name="payCode" />
|
||||
{volist name="payments" id="payment"}
|
||||
{if condition="$payment['isOnline'] eq 1"}
|
||||
<div class="wst-payCode-{$payment['payCode']}" data="{$payment['payCode']}"></div>
|
||||
{/if}
|
||||
{/volist}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="bnt-box">
|
||||
<div onclick='javascript:getPayUrl();' class="wst-pay-bnt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/recharge/recharge.js?v={$v}'></script>
|
||||
{/block}
|
||||
|
52
hyhproject/home2/view/default/users/recharge/pay_step2.html
Executable file
52
hyhproject/home2/view/default/users/recharge/pay_step2.html
Executable file
@ -0,0 +1,52 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}资金管理-充值{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STYLE__/css/recharge.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class='wst-user-content'>
|
||||
|
||||
<div class="pay-sbox-head">
|
||||
<div class="wst-user-head"><span>充值</span></div>
|
||||
</div>
|
||||
<div style="padding-top: 27px;">
|
||||
<div class="pay-tip2"></div>
|
||||
</div>
|
||||
<div class='pay-sbox' >
|
||||
<div class="qrcode-box">
|
||||
<div class="pbox">
|
||||
请您扫描以下二维码,钱包充值金额:<span class="wst-fred">¥{$needPay}</span>
|
||||
</div>
|
||||
<div style="" class="wst-qrcode"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/js/qrcode.js?v={$v}'></script>
|
||||
<script>
|
||||
{if condition="$out_trade_no != '' and $code_url!=''"}
|
||||
var qr = qrcode(10, 'M');
|
||||
qr.addData("{$code_url}");
|
||||
qr.make();
|
||||
$(".wst-qrcode").html(qr.createImgTag());
|
||||
|
||||
{/if}
|
||||
setInterval(function(){
|
||||
var params = {};
|
||||
params.trade_no = "{$out_trade_no}";
|
||||
|
||||
$.ajax({
|
||||
url:"{:url('home/weixinpays/getPayStatus')}",
|
||||
data:params,
|
||||
type:"POST",
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
location.href = "{:url('home/logmoneys/usermoneys')}";
|
||||
}
|
||||
}
|
||||
});
|
||||
},1500);
|
||||
</script>
|
||||
{/block}
|
58
hyhproject/home2/view/default/users/recharge/recharge.js
Executable file
58
hyhproject/home2/view/default/users/recharge/recharge.js
Executable file
@ -0,0 +1,58 @@
|
||||
|
||||
function getPayUrl(){
|
||||
var params = {};
|
||||
params.payObj = "recharge";
|
||||
params.targetType = 0;
|
||||
params.needPay = $.trim($("#needPay").val());
|
||||
params.payCode = $.trim($("#payCode").val());
|
||||
params.itmeId = $.trim($("#itmeId").val());
|
||||
if(params.itmeId==0 && params.needPay<=0){
|
||||
WST.msg('请输入充值金额', {icon: 5});
|
||||
return;
|
||||
}
|
||||
if(params.payCode==""){
|
||||
WST.msg('请先选择支付方式', {icon: 5});
|
||||
return;
|
||||
}
|
||||
jQuery.post(WST.U('home/'+params.payCode+'/get'+params.payCode+"URL"),params,function(data) {
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
location.href = json.url;
|
||||
}else{
|
||||
WST.msg('充值失败', {icon: 5});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function inEffect(obj,n){
|
||||
$(obj).addClass('j-selected').siblings('.wst-frame'+n).removeClass('j-selected');
|
||||
}
|
||||
function changeSelected(n,index,obj){
|
||||
$('#'+index).val(n);
|
||||
if(n==0){
|
||||
$(".j-charge-other").hide();
|
||||
$(".j-charge-money").show();
|
||||
|
||||
}else{
|
||||
$(".j-charge-other").show();
|
||||
$(".j-charge-money").hide();
|
||||
}
|
||||
inEffect(obj,2);
|
||||
}
|
||||
$(function(){
|
||||
$(".wst-frame2:first").click();
|
||||
$("#wst-check-orders").click(function(){
|
||||
$("#wst-orders-box").slideToggle(600);
|
||||
});
|
||||
$("div[class^=wst-payCode]").click(function(){
|
||||
var payCode = $(this).attr("data");
|
||||
$("div[class^=wst-payCode]").each(function(){
|
||||
$(this).removeClass().addClass("wst-payCode-"+$(this).attr("data"));
|
||||
});
|
||||
$(this).removeClass().addClass("wst-payCode-"+payCode+"-curr");
|
||||
$("#payCode").val(payCode);
|
||||
});
|
||||
if($("div[class^=wst-payCode]").length>0){
|
||||
$("div[class^=wst-payCode]")[0].click();
|
||||
}
|
||||
});
|
59
hyhproject/home2/view/default/users/security/index.html
Executable file
59
hyhproject/home2/view/default/users/security/index.html
Executable file
@ -0,0 +1,59 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-sec-info">
|
||||
<img class="wst-lfloat usersImg" data-original='__IMGURL__{:WSTUserPhoto($data['userPhoto'])}' width='100' height='100' title="{$data['loginName']}"/>
|
||||
<div class="wst-sec-infor">
|
||||
<span class="wst-sec-na wst-lfloat">{$data['loginName']}</span>
|
||||
{if($data['ranks']['rankId'])}
|
||||
<span class="wst-sec-grade"><img class="wst-lfloat" src="__IMGURL__/{$data['ranks']['userrankImg']}"/><span class="wst-lfloat">{$data['ranks']['rankName']}</span></span>
|
||||
{/if}
|
||||
<div style='clear:both;'></div>
|
||||
<div style="margin-top:6px;">
|
||||
<span class="wst-sec-infoi" id="level"></span>
|
||||
<div class="wst-sec-infoi" style="margin-top:5px;">
|
||||
<span class="wst-sec-strip wst-lfloat">{if ($data['loginPwd'])}<span class="wst-sec-strip2 wst-lfloat"></span>{/if}{if ($data['userEmail'])}<span class="wst-sec-strip2 wst-lfloat"></span>{/if}{if ($data['userPhone'])}<span class="wst-sec-strip2 wst-lfloat"></span>{/if}</span>
|
||||
</div>
|
||||
<div class="wst-sec-infoi" style="margin-top:5px;">
|
||||
<span>上次登录时间:{php}echo date("Y年m月d日 H:i:s",strtotime($data['lastTime']));{/php}</span><br/>
|
||||
<span>上次登录IP:{$data['lastIP']}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style='clear:both;'></div>
|
||||
</div>
|
||||
<div class="wst-sec-s">
|
||||
<div class="wst-sec-lists">{if ($data['loginPwd'])}<span class="wst-sec-green"><img src="__STYLE__/img/user_icon_yyz.png"/>已设置</span>{else}<span class="wst-sec-ash"><img src="__STYLE__/img/icon_wyz.png"/>未设置</span>{/if}
|
||||
<span class="wst-sec-w"> 登录密码</span> 登录密码用于会员的登录以及进行登录的一系列操作,{if ($data['loginPwd'])}建议您定期更改密码{else}您还没有设置密码{/if}
|
||||
<a class="wst-user-buta wst-rfloat" onclick="location.href=WST.U('home/users/editPass')">{if ($data['loginPwd'])}修改密码{else}立即设置{/if}</a></div>
|
||||
<div class="wst-sec-lists">{if ($data['payPwd'])}<span class="wst-sec-green"><img src="__STYLE__/img/user_icon_yyz.png"/>已设置</span>{else}<span class="wst-sec-ash"><img src="__STYLE__/img/icon_wyz.png"/>未设置</span>{/if}
|
||||
<span class="wst-sec-w"> 支付密码</span> 支付密码用于会员的提现账号设置及提现申请操作,{if ($data['payPwd'])}建议您定期更改支付密码{else}您还没有设置支付密码{/if}
|
||||
<a class="wst-user-buta wst-rfloat" onclick="location.href=WST.U('home/users/editPayPass')">{if ($data['payPwd'])}修改密码{else}立即设置{/if}</a></div>
|
||||
<div class="wst-sec-lists">{if ($data['userEmail'])}<span class="wst-sec-green"><img src="__STYLE__/img/user_icon_yyz.png"/>已验证</span>{else}<span class="wst-sec-ash"><img src="__STYLE__/img/icon_wyz.png"/>未验证</span>{/if}
|
||||
<span class="wst-sec-w"> 邮箱验证</span> 邮箱验证方便您及时接收优惠促销信息,以及积分、优惠卷和账户余额变动的提醒。{if ($data['userEmail'])}您的绑定邮箱:{$data['userEmail']}{else}您还没有验证邮箱{/if}
|
||||
<a class="wst-user-buta wst-rfloat" onclick="location.href=WST.U('home/users/editEmail')">{if ($data['userEmail'])}修改邮箱{else}立即验证{/if}</a></div>
|
||||
<div class="wst-sec-lists">{if ($data['userPhone'])}<span class="wst-sec-green"><img src="__STYLE__/img/user_icon_yyz.png"/>已验证</span>{else}<span class="wst-sec-ash"><img src="__STYLE__/img/icon_wyz.png"/>未验证</span>{/if}
|
||||
<span class="wst-sec-w"> 手机验证</span> 手机验证方便您及时接收优惠促销信息,以及积分、优惠卷和账户余额变动的提醒。{if ($data['userPhone'])}您的绑定手机:{$data['userPhone']}{else}您还没有验证手机{/if}
|
||||
<a class="wst-user-buta wst-rfloat" onclick="location.href=WST.U('home/users/editPhone')">{if ($data['userPhone'])}修改手机{else}立即验证{/if}</a></div>
|
||||
<div style='clear:both;'></div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script>
|
||||
$(function(){
|
||||
var securityCount = $('.wst-sec-strip2').length;
|
||||
if(securityCount==1){
|
||||
$('#level').html('安全级别(较低级) <span class="wst-sec-infoin">建议提升安全</span>');
|
||||
}else if(securityCount==2){
|
||||
$('#level').html('安全级别(中级) <span class="wst-sec-infoin">建议提升安全</span>');
|
||||
}else if(securityCount==3){
|
||||
$('#level').html('安全级别(高级) <span class="wst-sec-infoin">建议定期更改密码</span>');
|
||||
}else{
|
||||
$('#level').html('安全级别(低级) <span class="wst-sec-infoin">账号有风险</span>');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
320
hyhproject/home2/view/default/users/security/security.js
Executable file
320
hyhproject/home2/view/default/users/security/security.js
Executable file
@ -0,0 +1,320 @@
|
||||
var time = 0;
|
||||
var isSend = false;
|
||||
var myorm;
|
||||
var emailForm;
|
||||
var phoneForm;
|
||||
var getemailForm;
|
||||
var getphoneForm;
|
||||
var getpayForm;
|
||||
var payForm;
|
||||
$(function(){
|
||||
$('#phoneVerify').validator({
|
||||
valid: function(form){
|
||||
var n=$('#VerifyId').val();
|
||||
getPhoneVerifys(n);
|
||||
}
|
||||
});
|
||||
})
|
||||
function vePayForm(){
|
||||
//修改支付密码
|
||||
myorm = $('#payform').validator({
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
if(window.conf.IS_CRYPT=='1'){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
if(params.oldPass)params.oldPass = rsa.encrypt(params.oldPass);
|
||||
params.newPass = rsa.encrypt(params.newPass);
|
||||
params.reNewPass = rsa.encrypt(params.reNewPass);
|
||||
}
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/payPassEdit'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1,time:2000},function(){
|
||||
location.href=WST.U('home/users/security');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
function veMyorm(){
|
||||
//修改密码
|
||||
myorm = $('#myorm').validator({
|
||||
fields: {
|
||||
newPass: {
|
||||
rule:"required;length[6~20]",
|
||||
msg:{required:"请输入新密码"},
|
||||
tip:"请输入新密码"
|
||||
},
|
||||
reNewPass: {
|
||||
rule:"required;length[6~20];match[newPass]",
|
||||
msg:{required:"请再次输入新密码",match:"两次输入密码不匹配"},
|
||||
tip:"请再次输入新密码"
|
||||
},
|
||||
},
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
if(window.conf.IS_CRYPT=='1'){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
if(params.oldPass)params.oldPass = rsa.encrypt(params.oldPass);
|
||||
params.newPass = rsa.encrypt(params.newPass);
|
||||
params.reNewPass = rsa.encrypt(params.reNewPass);
|
||||
}
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/passEdit'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg("操作成功",{icon:1,time:2000},function(){
|
||||
location.href=WST.U('home/users/security');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
function veemailForm(){
|
||||
//绑定邮箱
|
||||
emailForm = $('#emailForm').validator({
|
||||
rules: {
|
||||
remote: function(element){
|
||||
return $.post(WST.U('home/users/checkEmail'),{"loginName":element.value},function(data,textStatus){
|
||||
});
|
||||
}
|
||||
},
|
||||
fields: {
|
||||
userEmail: {
|
||||
rule:"required;email;remote;",
|
||||
msg:{required:"请输入邮箱",email:"请输入有效的邮箱"},
|
||||
tip:"请输入邮箱",
|
||||
},
|
||||
secretCode: {
|
||||
rule:"required",
|
||||
msg:{required:"请输入校验码"},
|
||||
tip:"请输入校验码",
|
||||
target:"#secretErr"
|
||||
}
|
||||
},
|
||||
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/emailEdit'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
var redirect = WST.U('home/users/doneEmailBind');
|
||||
var edit = $('#editEmail').val();
|
||||
if(edit)redirect=WST.U('home/users/editEmail3');
|
||||
WST.msg('验证通过',{icon:1},function(){location.href=redirect});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function sendEmail(edit){
|
||||
var url = 'home/users/getEmailVerify';
|
||||
if(isSend )return;
|
||||
if(!$('#verifyCode').isValid())return;
|
||||
if(!edit){
|
||||
if(!$('#userEmail').isValid())return;
|
||||
}else{
|
||||
url = 'home/users/getEmailVerifyt';
|
||||
}
|
||||
var loading = WST.msg('正在发送邮件,请稍后...', {icon: 16,time:60000});
|
||||
var params = WST.getParams('.ipt');
|
||||
$.post(WST.U(url),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('邮箱已发送,请注册查收');
|
||||
isSend = true;
|
||||
time = 120;
|
||||
$('#timeSend').attr('disabled', 'disabled').css('background','#e8e6e6');
|
||||
$('#timeSend').html('发送验证邮件(120)');
|
||||
var task = setInterval(function(){
|
||||
time--;
|
||||
$('#timeSend').html('发送验证邮件('+time+")");
|
||||
if(time==0){
|
||||
isSend = false;
|
||||
clearInterval(task);
|
||||
$('#timeSend').html("重新发送验证邮件");
|
||||
$('#timeSend').removeAttr('disabled').css('background','#e23e3d');
|
||||
}
|
||||
},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function vephoneForm(){
|
||||
//绑定手机号
|
||||
phoneForm = $('#phoneForm').validator({
|
||||
valid: function(form){
|
||||
var me = this;
|
||||
// ajax提交表单之前,先禁用submit
|
||||
me.holdSubmit();
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/phoneEdito'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
location.href=WST.U('home/users/editPhoneSu','pr='+json.process);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function vegetemailForm(){
|
||||
//修改邮箱
|
||||
getemailForm = $('#getemailForm').validator({
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/emailEditt'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg('验证通过',{icon:1},function(){location.href=WST.U('home/users/editEmail2')})
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function vegetphoneForm(){
|
||||
//修改手机号
|
||||
getphoneForm = $('#getphoneForm').validator({
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/phoneEditt'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
location.href=WST.U('home/users/editPhoneSut');
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function vegetpayForm(){
|
||||
//重置支付密码
|
||||
getpayForm = $('#getpayForm').validator({
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/payEditt'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
location.href=WST.U('home/users/editPaySut');
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function vepayForm(){
|
||||
//设置支付密码
|
||||
payForm = $('#payForm').validator({
|
||||
valid: function(form){
|
||||
var me = this;
|
||||
me.holdSubmit();
|
||||
var params = WST.getParams('.ipt');
|
||||
if(window.conf.IS_CRYPT=='1'){
|
||||
var public_key=$('#token').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
params.newPass = rsa.encrypt(params.newPass);
|
||||
params.reNewPass = rsa.encrypt(params.reNewPass);
|
||||
}
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/users/payEdito'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
location.href=WST.U('home/users/editPaySu','pr='+json.process);
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
WST.getVerify('#verifyImg');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//发送手机验证码
|
||||
function getPhoneVerify(n){
|
||||
if(!$('#userPhone').isValid())return;
|
||||
$('#VerifyId').val(n);
|
||||
if(window.conf.SMS_VERFY==1){
|
||||
WST.open({type: 1,title:"请输入验证码",shade: [0.6, '#000'],border: [0],content: $('#phoneVerify'),area: ['600px', '180px']});
|
||||
}else{
|
||||
getPhoneVerifys(n);
|
||||
}
|
||||
}
|
||||
function getPhoneVerifys(n){
|
||||
WST.msg('正在发送短信,请稍后...',{time:600000});
|
||||
var time = 0;
|
||||
var isSend = false;
|
||||
var params = WST.getParams('.ipt');
|
||||
$.post(WST.U('home/users/getPhoneVerify'+n),params,function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(isSend )return;
|
||||
isSend = true;
|
||||
if(json.status!=1){
|
||||
WST.msg(json.msg, {icon: 5});
|
||||
WST.getVerify('#verifyImg');
|
||||
time = 0;
|
||||
isSend = false;
|
||||
}if(json.status==1){
|
||||
WST.msg('短信已发送,请注册查收');
|
||||
layer.closeAll('page');
|
||||
time = 120;
|
||||
$('#timeObtain').attr('disabled', 'disabled').css('background','#e8e6e6');
|
||||
$('#timeObtain').html('获取手机验证码(120)').css('width','130px');
|
||||
var task = setInterval(function(){
|
||||
time--;
|
||||
$('#timeObtain').html('获取手机验证码('+time+")");
|
||||
if(time==0){
|
||||
isSend = false;
|
||||
clearInterval(task);
|
||||
$('#timeObtain').html("重新获取验证码").css('width','100px');
|
||||
$('#timeObtain').removeAttr('disabled').css('background','#e23e3d');
|
||||
}
|
||||
},1000);
|
||||
}
|
||||
});
|
||||
}
|
108
hyhproject/home2/view/default/users/security/user_edit_email.html
Executable file
108
hyhproject/home2/view/default/users/security/user_edit_email.html
Executable file
@ -0,0 +1,108 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>绑定邮箱</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-sec-head2">
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='One')}wst-sec-gr{/if}">1、验证身份</div>
|
||||
<div class="wst-lfloat wst-sec-min1 {if ($process=='One')}wst-sec-gr1{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-mi">
|
||||
<div class="wst-lfloat wst-sec-min2 {if ($process=='Two')}wst-sec-gr2{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-min3 {if ($process=='Two')}wst-sec-gr3{/if}"></div>
|
||||
</div>
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='Two')}wst-sec-gr{/if}">2、修改邮箱</div>
|
||||
<div class="wst-lfloat wst-sec-min1 {if ($process=='Two')}wst-sec-gr1{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-mi">
|
||||
<div class="wst-lfloat wst-sec-min2 {if ($process=='Three')}wst-sec-gr2{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-min3 {if ($process=='Three')}wst-sec-gr3{/if}"></div>
|
||||
</div>
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='Three')}wst-sec-gr{/if}">3、完成</div>
|
||||
</div>
|
||||
{if ($process=='One')}
|
||||
<form method="post" id="getemailForm" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>已验证的邮箱:</th>
|
||||
<td>{$data['userEmail']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>验证码:</th>
|
||||
<td>
|
||||
<input id="verifyCode" style="ime-mode:disabled;" name="verifyCode" data-rule="验证码: required;" data-msg-required="请输入验证码" data-tip="请输入验证码" data-target="#verify" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<label class="wst-sec-img">
|
||||
<img id='verifyImg' src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:110px;">
|
||||
</label>
|
||||
<label> 看不清?<a href="javascript:WST.getVerify('#verifyImg')" style="color:#69b7b5;">换一张</a></label><span id="verify"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>校验码:</th>
|
||||
<td style='height:60px;'>
|
||||
<input id="secretCode" style="ime-mode:disabled;width:250px;" data-rule="校验码:required;" data-target="#secretErr" name="secretCode" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<button id="timeSend" class="wst-sec-but" type="button" onclick="sendEmail(true)" style="width:120px;height: 30px;margin-top:5px;">发送验证邮件</button><span id="secretErr"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button id="next" class="wst-sec-but" type="submit" style="width:120px;height: 30px;margin-left:180px">下一步</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/if}
|
||||
{if ($process=='Two')}
|
||||
<form method="post" id="emailForm" autocomplete="off">
|
||||
<input type='hidden' id='process' class='ipt' value='{$process}'/>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'>绑定邮箱地址 <font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='userEmail' name='userEmail' style='width:250px;' maxLength='30'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'>验证码 <font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input id="verifyCode" data-rule="验证码:required" data-target="#verify" style="ime-mode:disabled;width:250px;" name="verifyCode" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<label class="wst-sec-img">
|
||||
<img id='verifyImg' src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:110px;">
|
||||
</label>
|
||||
<label> 看不清?<a href="javascript:WST.getVerify('#verifyImg')" style="color:#69b7b5;">换一张</a></label><span id="verify"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>校验码:</th>
|
||||
<td style='height:60px;'>
|
||||
<input id="secretCode" style="ime-mode:disabled;width:250px;" data-rule="校验码:required;" data-target="#secretErr" name="secretCode" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<button id="timeSend" class="wst-sec-but" type="button" onclick="sendEmail()" style="width:120px;height: 30px;margin-top:5px;">发送验证邮件</button><span id="secretErr"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button id="next" class="wst-sec-but" type="submit" style="width:120px;height: 30px;margin-left:180px">下一步</button>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="hidden" id="editEmail" value="1">
|
||||
</table>
|
||||
</form>
|
||||
{/if}
|
||||
{if ($process=='Three')}
|
||||
<div class="wst-sec-su">
|
||||
<span class="wst-sec-sut"><img src="__STYLE__/img/icon_success.png"/></span>
|
||||
<span class="wst-sec-sub">您已成功绑定邮箱!</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){veemailForm();vegetemailForm();})
|
||||
</script>
|
||||
{/block}
|
116
hyhproject/home2/view/default/users/security/user_edit_pay.html
Executable file
116
hyhproject/home2/view/default/users/security/user_edit_pay.html
Executable file
@ -0,0 +1,116 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>绑定手机</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-sec-head2">
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='One')}wst-sec-gr{/if}">1、验证身份</div>
|
||||
<div class="wst-lfloat wst-sec-min1 {if ($process=='One')}wst-sec-gr1{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-mi">
|
||||
<div class="wst-lfloat wst-sec-min2 {if ($process=='Two')}wst-sec-gr2{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-min3 {if ($process=='Two')}wst-sec-gr3{/if}"></div>
|
||||
</div>
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='Two')}wst-sec-gr{/if}">2、设置支付密码</div>
|
||||
<div class="wst-lfloat wst-sec-min1 {if ($process=='Two')}wst-sec-gr1{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-mi">
|
||||
<div class="wst-lfloat wst-sec-min2 {if ($process=='Three')}wst-sec-gr2{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-min3 {if ($process=='Three')}wst-sec-gr3{/if}"></div>
|
||||
</div>
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='Three')}wst-sec-gr{/if}">3、完成</div>
|
||||
</div>
|
||||
{if ($process=='One')}
|
||||
{if($data['phoneType']==1)}
|
||||
<form method="post" id="getpayForm" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>已验证的手机:</th>
|
||||
<td>{$data['userPhone']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>输入短信校验码:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='Checkcode' name='Checkcode' data-rule="校验码: required;" data-msg-required="请输入校验码" data-tip="请输入校验码" data-target="#verifyPhone1" style='width:250px;' maxLength='30'/>
|
||||
<button id="timeObtain" class="wst-sec-obtain" type="button" onclick="javascript:getPhoneVerify('pay');">获取手机验证码</button>
|
||||
<span id="verifyPhone1"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:116px;height:60px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">确认</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{else}
|
||||
<div class="wst-sec-su">
|
||||
<span class="wst-sec-sub" style="color: #333333;">您还未绑定手机号码,请绑定手机号码。</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if ($process=='Two')}
|
||||
<form method="post" id="payForm" autocomplete="off">
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<input type='hidden' id='process' class='ipt' value='{$process}' autocomplete="off"/>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>新支付密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='newPass' name='newPass' style='width:250px;' maxLength='6' data-rule='新支付密码:required;length(6)'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>确认支付密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='reNewPass' name='reNewPass' style='width:250px;' maxLength='6' data-rule='确认支付密码:required;length(6)'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:75px;height:60px;'>
|
||||
<button class='wst-sec-but wst-lfloat' type="submit" style="width:100px;height: 30px;">保 存</button>
|
||||
<button class='wst-sec-but2 wst-lfloat' type="reset" style="width:100px;height: 30px;margin-left:16px;">重 置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div style="text-align: center;margin-top:50px;"><button type="button" id="timeSend" class='wst-btn-querys'style="display:none;">下一步</button></div>
|
||||
{/if}
|
||||
{if ($process=='Three')}
|
||||
<div class="wst-sec-su">
|
||||
<span class="wst-sec-sut"><img src="__STYLE__/img/icon_success.png"/></span>
|
||||
<span class="wst-sec-sub">您已成功重置支付密码!</span>
|
||||
</div>
|
||||
{/if}
|
||||
<form method="post" id="phoneVerify" autocomplete="off" style="display:none;">
|
||||
<input type='hidden' id='VerifyId' value='' autocomplete="off"/>
|
||||
<table class='wst-form' style="width:500px;">
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>验证码:</th>
|
||||
<td>
|
||||
<input id="smsVerfy" style="ime-mode:disabled;width:150px;" name="smsVerfy" data-rule="验证码: required;" data-msg-required="请输入验证码" data-tip="请输入验证码" data-target="#verify" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<label class="wst-sec-img">
|
||||
<img id='verifyImg' src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:110px;">
|
||||
</label>
|
||||
<label> 看不清?<a href="javascript:WST.getVerify('#verifyImg')"style="color:#69b7b5;">换一张</a></label><span id="verify"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:71px;height:50px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">确认</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){vegetpayForm();vepayForm();})
|
||||
</script>
|
||||
{/block}
|
108
hyhproject/home2/view/default/users/security/user_edit_phone.html
Executable file
108
hyhproject/home2/view/default/users/security/user_edit_phone.html
Executable file
@ -0,0 +1,108 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>绑定手机</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="wst-sec-head2">
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='One')}wst-sec-gr{/if}">1、验证身份</div>
|
||||
<div class="wst-lfloat wst-sec-min1 {if ($process=='One')}wst-sec-gr1{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-mi">
|
||||
<div class="wst-lfloat wst-sec-min2 {if ($process=='Two')}wst-sec-gr2{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-min3 {if ($process=='Two')}wst-sec-gr3{/if}"></div>
|
||||
</div>
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='Two')}wst-sec-gr{/if}">2、修改手机</div>
|
||||
<div class="wst-lfloat wst-sec-min1 {if ($process=='Two')}wst-sec-gr1{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-mi">
|
||||
<div class="wst-lfloat wst-sec-min2 {if ($process=='Three')}wst-sec-gr2{/if}"></div>
|
||||
<div class="wst-lfloat wst-sec-min3 {if ($process=='Three')}wst-sec-gr3{/if}"></div>
|
||||
</div>
|
||||
<div class="wst-lfloat wst-sec-min {if ($process=='Three')}wst-sec-gr{/if}">3、完成</div>
|
||||
</div>
|
||||
{if ($process=='One')}
|
||||
<form method="post" id="getphoneForm" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>已验证的手机:</th>
|
||||
<td>{$data['userPhone']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>输入短信校验码:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='Checkcode' name='Checkcode' data-rule="校验码: required;" data-msg-required="请输入校验码" data-tip="请输入校验码" data-target="#verifyPhone1" style='width:250px;' maxLength='30'/>
|
||||
<button id="timeObtain" class="wst-sec-obtain" type="button" onclick="javascript:getPhoneVerify('t');">获取手机验证码</button>
|
||||
<span id="verifyPhone1"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:116px;height:60px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">确认</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/if}
|
||||
{if ($process=='Two')}
|
||||
<form method="post" id="phoneForm" autocomplete="off">
|
||||
<input type='hidden' id='process' class='ipt' value='{$process}' autocomplete="off"/>
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>绑定手机号码:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='userPhone' name='userPhone' style='width:250px;' maxLength='30' data-rule="手机号 required;mobile;remote(post:{:url('home/users/checkLoginKey')})" data-msg-mobile="请输入有效的手机号" data-msg-required="请输入手机号" data-tip="请输入手机号" data-target="#verifyPhone"/>
|
||||
<button id="timeObtain" class="wst-sec-obtain" type="button" onclick="javascript:getPhoneVerify('o');">获取手机验证码</button>
|
||||
<span id="verifyPhone"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>输入短信校验码:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='Checkcode' name='Checkcode' style='width:250px;' maxLength='30' data-rule="短信校验码: required;" data-msg-required="请输入短信校验码" data-tip="请输入短信校验码"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:116px;height:60px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">立即绑定</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div style="text-align: center;margin-top:50px;"><button type="button" id="timeSend" class='wst-btn-querys'style="display:none;">下一步</button></div>
|
||||
{/if}
|
||||
{if ($process=='Three')}
|
||||
<div class="wst-sec-su">
|
||||
<span class="wst-sec-sut"><img src="__STYLE__/img/icon_success.png"/></span>
|
||||
<span class="wst-sec-sub">您已成功绑定手机!</span>
|
||||
</div>
|
||||
{/if}
|
||||
<form method="post" id="phoneVerify" autocomplete="off" style="display:none;">
|
||||
<input type='hidden' id='VerifyId' value='' autocomplete="off"/>
|
||||
<table class='wst-form' style="width:500px;">
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>验证码:</th>
|
||||
<td>
|
||||
<input id="smsVerfy" style="ime-mode:disabled;width:150px;" name="smsVerfy" data-rule="验证码: required;" data-msg-required="请输入验证码" data-tip="请输入验证码" data-target="#verify" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<label class="wst-sec-img">
|
||||
<img id='verifyImg' src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:110px;">
|
||||
</label>
|
||||
<label> 看不清?<a href="javascript:WST.getVerify('#verifyImg')"style="color:#69b7b5;">换一张</a></label><span id="verify"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:71px;height:50px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">确认</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){vegetphoneForm();vephoneForm();})
|
||||
</script>
|
||||
{/block}
|
66
hyhproject/home2/view/default/users/security/user_email.html
Executable file
66
hyhproject/home2/view/default/users/security/user_email.html
Executable file
@ -0,0 +1,66 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>绑定邮箱</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
{if ($process=='One')}
|
||||
<form method="post" id="emailForm" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>绑定邮箱地址:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='userEmail' name='userEmail' style='width:250px;' maxLength='30'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>验证码:</th>
|
||||
<td>
|
||||
<input id="verifyCode" data-rule="验证码:required" data-target="#verify" style="ime-mode:disabled;width:250px;" name="verifyCode" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<label class="wst-sec-img">
|
||||
<img id='verifyImg' src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:110px;">
|
||||
</label>
|
||||
<label> 看不清?<a href="javascript:WST.getVerify('#verifyImg')" style="color:#69b7b5;">换一张</a></label><span id="verify"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>校验码:</th>
|
||||
<td style='height:60px;'>
|
||||
<input id="secretCode" style="ime-mode:disabled;width:250px;" name="secretCode" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<button id="timeSend" class="wst-sec-but" type="button" onclick="sendEmail()" style="width:120px;height: 30px;margin-top:5px;">发送验证邮件</button><span id="secretErr"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button id="next" class="wst-sec-but" type="submit" style="width:120px;height: 30px;margin-left:180px">下一步</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div id="prompt" class="wst-sec-prompt hide">
|
||||
<div class="wst-lfloat">
|
||||
<p><span>已发送验证邮箱至:</span><span id="inemail" style=" font-weight: bold;"></span></p>
|
||||
<p class="wst-sec-p1">验证邮箱30分钟内有效,请尽快登录您的邮箱点击验证链接完成验证</p>
|
||||
<p style="color:#f10b0b;">(请立即完成验证,邮箱验证不通过则绑定邮箱失败)</p>
|
||||
<p class="wst-sec-p1" style="font-weight: bold;">没收到邮箱?</p>
|
||||
<p class="wst-sec-p2">1.检查您的垃圾箱或广告箱,邮件有可能被误认为垃圾或广告邮件;或选择<a style="color:#006898;" onclick="location.href=WST.U('home/users/editEmail')">重新发送</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if ($process=='Three')}
|
||||
<div class="wst-sec-su">
|
||||
<span class="wst-sec-sut"><img src="__STYLE__/img/icon_success.png"/></span>
|
||||
<span class="wst-sec-sub">您已成功绑定邮箱!</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){veemailForm();})
|
||||
</script>
|
||||
{/block}
|
49
hyhproject/home2/view/default/users/security/user_pass.html
Executable file
49
hyhproject/home2/view/default/users/security/user_pass.html
Executable file
@ -0,0 +1,49 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<div class="wst-user-head"><span>设置密码</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<form method="post" id="myorm" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
{if ($data['loginPwd'])}
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>原始密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='oldPass' name='oldPass' {if ($data['loginPwd'])}data-rule="原始密码: required;" data-msg-required="请填写原始密码" data-tip="请输入原始密码"{/if} style='width:250px;' maxLength='16'/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>新密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='newPass' name='newPass' style='width:250px;' maxLength='16'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>确认密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='reNewPass' name='reNewPass' style='width:250px;' maxLength='16'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:75px;height:60px;'>
|
||||
<button class='wst-sec-but wst-lfloat' type="submit" style="width:100px;height: 30px;">保 存</button>
|
||||
<button class='wst-sec-but2 wst-lfloat' type="reset" style="width:100px;height: 30px;margin-left:16px;">重 置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){veMyorm();})
|
||||
</script>
|
||||
{/block}
|
53
hyhproject/home2/view/default/users/security/user_pay_pass.html
Executable file
53
hyhproject/home2/view/default/users/security/user_pay_pass.html
Executable file
@ -0,0 +1,53 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
|
||||
<div class="wst-user-head"><span>设置支付密码</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<form method="post" id="payform" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
{if ($data['payPwd'])}
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>原始密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='oldPass' name='oldPass' {if ($data['payPwd'])}data-rule="原始支付密码: required;" data-msg-required="请填写原始支付密码" data-tip="请输入原始支付密码"{/if} style='width:250px;' maxLength='16'/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>新支付密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='newPass' name='newPass' style='width:250px;' maxLength='16' data-rule='新支付密码:required;'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'> <font color='red'>*</font>确认支付密码:</th>
|
||||
<td>
|
||||
<input type='password' class="ipt" id='reNewPass' name='reNewPass' style='width:250px;' maxLength='16' data-rule='确认支付密码:required;'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'></th>
|
||||
<td><a href="{:url('home/users/backPayPass')}">忘记支付密码?</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:75px;height:60px;'>
|
||||
<button class='wst-sec-but wst-lfloat' type="submit" style="width:100px;height: 30px;">保 存</button>
|
||||
<button class='wst-sec-but2 wst-lfloat' type="reset" style="width:100px;height: 30px;margin-left:16px;">重 置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){vePayForm();})
|
||||
</script>
|
||||
{/block}
|
68
hyhproject/home2/view/default/users/security/user_phone.html
Executable file
68
hyhproject/home2/view/default/users/security/user_phone.html
Executable file
@ -0,0 +1,68 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}安全设置 - 买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link href="__STYLE__/css/security.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="wst-user-head"><span>绑定手机</span><a href="{:url('home/users/security')}">返回</a></div>
|
||||
<div class="wst-clear"></div>
|
||||
{if ($process=='One')}
|
||||
<form method="post" id="phoneForm" autocomplete="off">
|
||||
<table class='wst-form'>
|
||||
<tr>
|
||||
<th align='right'>绑定手机号码<font color='red'>*</font>:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='userPhone' name='userPhone' style='width:250px;' maxLength='30' data-rule="手机号 required;mobile;remote(post:{:url('home/users/checkLoginKey')})" data-msg-mobile="请输入有效的手机号" data-msg-required="请输入手机号" data-tip="请输入手机号" data-target="#verifyPhone"/>
|
||||
<button id="timeObtain" class="wst-sec-obtain" type="button" onclick="javascript:getPhoneVerify('b');">获取手机验证码</button>
|
||||
<span id="verifyPhone"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>输入短信校验码:</th>
|
||||
<td>
|
||||
<input type='text' class="ipt" id='Checkcode' name='Checkcode' style='width:250px;' maxLength='30' data-rule="短信校验码: required;" data-msg-required="请输入短信校验码" data-tip="请输入短信校验码"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:115px;height:60px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">立即绑定</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<form method="post" id="phoneVerify" autocomplete="off" style="display:none;">
|
||||
<input type='hidden' id='VerifyId' value='' autocomplete="off"/>
|
||||
<table class='wst-form' style="width:500px;">
|
||||
<tr>
|
||||
<th align='right'><font color='red'>*</font>验证码:</th>
|
||||
<td>
|
||||
<input id="smsVerfy" style="ime-mode:disabled;width:150px;" name="smsVerfy" data-rule="验证码: required;" data-msg-required="请输入验证码" data-tip="请输入验证码" data-target="#verify" class="ipt wst-lfloat" tabindex="6" autocomplete="off" maxlength="6" type="text"/>
|
||||
<label class="wst-sec-img">
|
||||
<img id='verifyImg' src="{:url('home/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")' style="width:110px;">
|
||||
</label>
|
||||
<label> 看不清?<a href="javascript:WST.getVerify('#verifyImg')"style="color:#69b7b5;">换一张</a></label><span id="verify"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style='padding-left:71px;height:50px;'>
|
||||
<button class="wst-sec-but" type="submit" style="width:100px;height: 30px;">确认</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/if}
|
||||
{if ($process=='Three')}
|
||||
<div class="wst-sec-su">
|
||||
<span class="wst-sec-sut"><img src="__STYLE__/img/icon_success.png"/></span>
|
||||
<span class="wst-sec-sub">您已成功绑定手机!</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/security/security.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script>
|
||||
$(function(){vephoneForm();})
|
||||
</script>
|
||||
{/block}
|
224
hyhproject/home2/view/default/users/user.js
Executable file
224
hyhproject/home2/view/default/users/user.js
Executable file
@ -0,0 +1,224 @@
|
||||
var userPic;
|
||||
var falg = true;
|
||||
$(function () {
|
||||
$('#tab').TabPanel({tab:0,callback:function(no){
|
||||
if(no==1 && falg){
|
||||
uploadUserPhoto();falg = false;
|
||||
}
|
||||
|
||||
}});
|
||||
});
|
||||
|
||||
|
||||
// function checkCoords()
|
||||
// {
|
||||
// //判断是否有裁剪
|
||||
// if (parseInt($('#w').val())){
|
||||
// var loading = WST.msg('图像处理中,请稍候...', {icon: 16,shade: [0.3, '#999999']});
|
||||
// /*获取裁剪数据*/
|
||||
// var photoData = {};
|
||||
// photoData.x = $('#x').val();
|
||||
// photoData.y = $('#y').val();
|
||||
// photoData.w = $('#w').val();
|
||||
// photoData.h = $('#h').val();
|
||||
// photoData.photoSrc = $('#photoSrc').val();
|
||||
// $.post(WST.U('Home/users/editUserPhoto'),photoData,function(data, textStatus){
|
||||
// if(data.status==1)
|
||||
// {
|
||||
// layer.close(loading);
|
||||
// //将上传的图片路径赋给全局变量
|
||||
// userPic = data.data;
|
||||
// $('#userPhotoPreview').html('<img id="userPhoto" class="ipt" src="'+WST.conf.ROOT+'/'+userPic+'?='+Math.random()+'" height="150" />');
|
||||
// $('#userPhotoPreview1').html('<img id="userPhoto1" class="ipt" src="'+WST.conf.ROOT+'/'+userPic+'?='+Math.random()+'" height="150" />');
|
||||
// $('#userPhotoCut').hide();
|
||||
// $('#userPhoto').show();
|
||||
// }else{
|
||||
// WST.msg(data.msg,{icon:2});
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// return true;
|
||||
// }
|
||||
// WST.msg('请对图片裁剪后再进行提交',{icon:2});
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* [checkCoords 修改为上传oss的变化] mark 20180612
|
||||
* @return {[type]} [description]
|
||||
*/
|
||||
function checkCoords()
|
||||
{
|
||||
//判断是否有裁剪
|
||||
if (parseInt($('#w').val())){
|
||||
var loading = WST.msg('图像处理中,请稍候...', {icon: 16,shade: [0.3, '#999999']});
|
||||
/*获取裁剪数据*/
|
||||
var photoData = {};
|
||||
photoData.x = $('#x').val();
|
||||
photoData.y = $('#y').val();
|
||||
photoData.w = $('#w').val();
|
||||
photoData.h = $('#h').val();
|
||||
photoData.photoSrc = $('#photoSrc').val();
|
||||
$.post(WST.U('Home/users/editUserPhoto'),photoData,function(data, textStatus){
|
||||
if(data.status==1)
|
||||
{
|
||||
layer.close(loading);
|
||||
//将上传的图片路径赋给全局变量
|
||||
userPic = data.data;
|
||||
$('#userPhotoPreview').html('<img id="userPhoto" class="ipt" src="'+WST.conf.IMGURL+'/'+userPic+'" height="150" />');
|
||||
$('#userPhotoPreview1').html('<img id="userPhoto1" class="ipt" src="'+WST.conf.IMGURL+'/'+userPic+'" height="150" />');
|
||||
$('#userPhotoCut').hide();
|
||||
$('#userPhoto').show();
|
||||
}else{
|
||||
WST.msg(data.msg,{icon:2});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
WST.msg('请对图片裁剪后再进行提交',{icon:2});
|
||||
return false;
|
||||
}
|
||||
|
||||
function uploadUserPhoto()
|
||||
{
|
||||
WST.upload({
|
||||
pick:'#userPhotoPicker',
|
||||
formData: {dir:'users',isCut:1},
|
||||
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){
|
||||
/*上传成功*/
|
||||
$('#userPhotoCut').show();
|
||||
$('#userPhoto').hide();
|
||||
|
||||
// var uploadPhotoSrc = WST.conf.ROOT+"/"+json.savePath+json.thumb+'?='+Math.random();
|
||||
// 修改为oss地址 mark 20180612 by zl
|
||||
var uploadPhotoSrc = WST.conf.IMGURL+"/"+json.savePath+json.thumb;
|
||||
|
||||
|
||||
var cutCode = '<img src="'+uploadPhotoSrc+'" id="target" alt="" style="max-width:606;height:auto;" />';
|
||||
cutCode += '<div id="preview-pane">';
|
||||
cutCode += '<div><p align="center">裁剪预览</p>';
|
||||
cutCode += '<div class="cut-help"><h4>操作帮助</h4>'
|
||||
cutCode += '<p>请在裁剪区域放大缩小及移动选取框,选择要裁剪的范围,裁切宽高比例固定;裁切后的效果为右侧预览图所显示;保存提交后生效。</p></div></div>'
|
||||
cutCode += '<div class="preview-container"><img src="'+uploadPhotoSrc+'" class="jcrop-preview" alt="Preview" /></div></div>';
|
||||
$('#userPhotoCutBox>p').html(cutCode);
|
||||
$('#photoSrc').val(json.savePath+json.thumb);
|
||||
$('#userPic').val(json.savePath+json.thumb);
|
||||
//初始化jcrop
|
||||
jcropInit();
|
||||
$('#uploadMsg').empty().hide();
|
||||
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var jcrop_api;
|
||||
function jcropInit(){
|
||||
var boundx,
|
||||
boundy,
|
||||
|
||||
$preview = $('#preview-pane'),
|
||||
$pcnt = $('#preview-pane .preview-container'),
|
||||
$pimg = $('#preview-pane .preview-container img'),
|
||||
|
||||
xsize = $pcnt.width(),
|
||||
ysize = $pcnt.height();
|
||||
|
||||
$('#target').Jcrop({
|
||||
onChange: updatePreview,
|
||||
onSelect: updatePreview,
|
||||
aspectRatio: 1,
|
||||
},function(){
|
||||
// Use the API to get the real image size
|
||||
var bounds = this.getBounds();
|
||||
boundx = bounds[0];
|
||||
boundy = bounds[1];
|
||||
//设置宽度以使文字居中
|
||||
$('#img-src').css('width',boundx+'px');
|
||||
|
||||
// Store the API in the jcrop_api variable
|
||||
jcrop_api = this;
|
||||
jcrop_api.setSelect([0,0,150,150]);
|
||||
|
||||
// Move the preview into the jcrop container for css positioning
|
||||
$preview.appendTo(jcrop_api.ui.holder);
|
||||
});
|
||||
|
||||
function updatePreview(c)
|
||||
{
|
||||
if (parseInt(c.w) > 0)
|
||||
{
|
||||
var rx = xsize / c.w;
|
||||
var ry = ysize / c.h;
|
||||
|
||||
$pimg.css({
|
||||
width: Math.round(rx * boundx) + 'px',
|
||||
height: Math.round(ry * boundy) + 'px',
|
||||
marginLeft: '-' + Math.round(rx * c.x) + 'px',
|
||||
marginTop: '-' + Math.round(ry * c.y) + 'px'
|
||||
});
|
||||
}
|
||||
//设置裁剪的图片数据
|
||||
$('#x').val(c.x);
|
||||
$('#y').val(c.y);
|
||||
$('#w').val(c.w);
|
||||
$('#h').val(c.h);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
/*日期插件*/
|
||||
laydate({
|
||||
elem: '#brithday', //需显示日期的元素选择器
|
||||
event: 'click', //触发事件
|
||||
format: 'YYYY-MM-DD', //日期格式
|
||||
istime: false, //是否开启时间选择
|
||||
isclear: true, //是否显示清空
|
||||
istoday: true, //是否显示今天
|
||||
issure: true, //是否显示确认
|
||||
festival: true, //是否显示节日
|
||||
min: '1900-01-01', //最小日期
|
||||
max: '2099-12-31', //最大日期
|
||||
fixed: false, //是否固定在可视区域
|
||||
zIndex: 99999999 //css z-index
|
||||
});
|
||||
|
||||
/* 表单验证 */
|
||||
$('#userEditForm').validator({
|
||||
fields: {
|
||||
userName: {rule:"required",msg:{required:"请输入昵称"},tip:"请输入昵称"},
|
||||
userSex: {rule:"checked;",msg:{checked:"至少选择一项"},tip:"请选择您的性别"}
|
||||
},
|
||||
valid: function(form){
|
||||
var params = WST.getParams('.ipt');
|
||||
if(!userPic){
|
||||
userPic = $('#userPic').val();
|
||||
}
|
||||
//接收上传的头像路径
|
||||
params.userPhoto = userPic;
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('Home/Users/toEdit'),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg("操作成功",{icon:1});
|
||||
return;
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
170
hyhproject/home2/view/default/users/user_edit.html
Executable file
170
hyhproject/home2/view/default/users/user_edit.html
Executable file
@ -0,0 +1,170 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}首页-买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="__STATIC__/plugins/jcrop/css/jquery.Jcrop.css?v={$v}" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
<form id="userEditForm" autocomplete="off" >
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav uinfo-nav">
|
||||
<li id="wst-msg-li-0">个人资料<span style="display:none;" class="wst-order-tips-box"></span></li>
|
||||
<li id="wst-msg-li-1">头像照片<span style="display:none;"></span></li>
|
||||
</ul>
|
||||
<div class="wst-tab-content" style='width:99%;border:none;'>
|
||||
<div class='wst-tab-item'>
|
||||
<table class='wst-form uinfo-form' >
|
||||
<tr>
|
||||
<th>登录账号<font color='red'> </font>:</th>
|
||||
<td width="260" class="gray">
|
||||
<div id='user_account'>{:session('WST_USER.loginName')}</div>
|
||||
</td>
|
||||
<td class="gray" style='padding-left:15px;'>个人头像:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='100'><font color='red'>*</font>昵称:</th>
|
||||
<td class="uinfo">
|
||||
<input type="text" class="ipt" id="userName" name="userName" value="{$data['userName']}" />
|
||||
</td>
|
||||
<td rowspan="6" valign="top">
|
||||
<div id='userPhotoPreview1' style="border:1px solid #ccc;width:151px;height:151px;margin-left:15px;">
|
||||
<!-- <img class="usersImg" data-original='{:WSTUserPhoto($data['userPhoto'])}' height='150'/> -->
|
||||
<!-- mark 20180612 修改为oss地址-->
|
||||
<img class="usersImg" data-original='__IMGURL__/{:WSTUserPhoto($data['userPhoto'])}' height='150'/>
|
||||
<br/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>真实姓名<font color='red'> </font>:</th>
|
||||
<td class="uinfo">
|
||||
<input type="text" class="ipt" id="trueName" name="trueName" value="{$data['trueName']}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><font color='red'>*</font>性别:</th>
|
||||
<td>
|
||||
<div class="radio-box">
|
||||
<label><input type='radio' class='ipt wst-radio' name='userSex' id="userSex-1" <?=($data['userSex']==1)?'checked':'';?> value="1" /><label class="mt-1" for="userSex-1"></label> 男</label>
|
||||
<label><input type='radio' class='ipt wst-radio' name='userSex' id="userSex-2" <?=($data['userSex']==2)?'checked':'';?> value="2" /><label class="mt-1" for="userSex-2"></label> 女</label>
|
||||
<label><input type='radio' class='ipt wst-radio' name='userSex' id="userSex-3" <?=($data['userSex']==0)?'checked':'';?> value="0" /><label class="mt-1" for="userSex-3"></label> 保密</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生日<font color='red'></font>:</th>
|
||||
<td class="uinfo">
|
||||
<input id="brithday" class="ipt" id="brithday" name="brithday" value="{$data['brithday']}" >
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>QQ<font color='red'> </font>:</th>
|
||||
<td class="uinfo">
|
||||
<input type="text" class="ipt" id="userQQ" name="userQQ" value="{$data['userQQ']}" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan='2' style="text-align:center">
|
||||
<input type="hidden" name="id" id="userId" class="ipt" value="{$data['userId']}" />
|
||||
<button type="submit" class="wst-sec-but u-btn">保存</button>
|
||||
<button type="reset" class="wst-sec-but u-btn">重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class='wst-tab-item' style="display:none" >
|
||||
|
||||
<table class='wst-form' id="userPhoto">
|
||||
<tr>
|
||||
<th width='100'>头像预览<font color='red'> </font>:</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<div id='userPhotoPreview'>
|
||||
{if ($data['userPhoto'])}
|
||||
<!-- mark 修改为oss地址 by 20180612-->
|
||||
<img class="usersImg" data-original='__IMGURL__/{$data['userPhoto']}' height='150' width="150"/>
|
||||
{else}
|
||||
<img class="usersImg" data-original='' height='150' width="150" />
|
||||
{/if}
|
||||
<br/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td width="400">图片大小:150 x 150 (px),格式为 gif, jpg, jpeg, png</td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td width="50">
|
||||
<input type='hidden' id='userPic' value='{$data['userPhoto']}' />
|
||||
<div id="userPhotoPicker" style='margin-left:0px;margin-top:5px;height:30px;overflow:hidden'>上传用户头像</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div class="container" id="userPhotoCut" style="display:none;">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<div class="jc-demo-box">
|
||||
<div id="img-src" style="text-align:center;max-width:500px;height:auto;">
|
||||
<p>裁剪区域</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="userPhotoCutBox" style="position:relative;min-height:505px;">
|
||||
<div id="cutArea"></div><p></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<form action="<?=url('Home/Users/editUserPhoto')?>" method="post" id="userPhotoInfo">
|
||||
<input type="hidden" id="x" name="x" class="photo-size" />
|
||||
<input type="hidden" id="y" name="y" class="photo-size" />
|
||||
<input type="hidden" id="w" name="w" class="photo-size" />
|
||||
<input type="hidden" id="h" name="h" class="photo-size" />
|
||||
<input type="hidden" id="photoSrc" name="photoSrc" value="">
|
||||
<div id="c-btn">
|
||||
<input type="button" value="保存" class="cut-btn" onclick="checkCoords()">
|
||||
<input type="button" value="返回" class="cut-btn" onclick="returnPhotoPage()">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="wst-clear"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/plugins/jcrop/js/jquery.Jcrop.js?v={$v}"></script>
|
||||
<script type='text/javascript' src='__STYLE__/users/user.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/layer/laydate.js?v={$v}"></script>
|
||||
{/block}
|
95
hyhproject/home2/view/default/users/useraddress/edit.html
Executable file
95
hyhproject/home2/view/default/users/useraddress/edit.html
Executable file
@ -0,0 +1,95 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}首页-买家中心{__block__}{/block}
|
||||
{block name="css"}
|
||||
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<style>
|
||||
.wst-form tr>td>input[type='text']{
|
||||
width:339px;
|
||||
height:20px;
|
||||
}
|
||||
</style>
|
||||
<div class="wst-user-head" style="margin-bottom:3px;"><span>管理地址</span></div>
|
||||
<form id="useraddressForm" autocomplete="off" >
|
||||
<table class='wst-form' >
|
||||
<tr>
|
||||
<th><font color='red'>*</font>区域:</th>
|
||||
<td>
|
||||
<select id="area_0" class='j-areas' level="0" onchange="WST.ITAreas({id:'area_0',val:this.value,isRequire:true,className:'j-areas'});">
|
||||
<option value="">-请选择-</option>
|
||||
{foreach $area1 as $v}
|
||||
<option value="{$v['areaId']}">{$v['areaName']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<div style="width:400px;height:20px;float:left" id="errorMsg"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width='110'><font color='red'>*</font>详细地址:</th>
|
||||
<td>
|
||||
<input type="text" class="ipt" id="userAddress" name="userAddress" value="{$data['userAddress']}" placeholder="您的详细地址" maxlength="30" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><font color='red'>*</font>联系名称:</th>
|
||||
<td>
|
||||
<input type="text" class="ipt" id="userName" name="userName" value="{$data['userName']}" placeholder="联系名称" maxlength="20" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><font color='red'>*</font>联系电话:</th>
|
||||
<td>
|
||||
<input type="text" class="ipt contact" id="userPhone" name="userPhone" value="{$data['userPhone']}" placeholder="联系电话" >
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><font color='red'>*</font>是否默认地址:</th>
|
||||
<td>
|
||||
<div class="radio-box">
|
||||
<label><input type="radio" class="ipt wst-radio" id="isDefault-1" name="isDefault" <?=($data['isDefault']==1)?'checked':'';?> value="1" /><label class="mt-1" for="isDefault-1"></label> 是</label>
|
||||
<label><input type="radio" class="ipt wst-radio" id="isDefault-0" name="isDefault" <?=($data['isDefault']==0)?'checked':'';?> value="0" /><label class="mt-1" for="isDefault-0"></label> 否</label>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="addr-btn-box">
|
||||
<input type="hidden" name="id" id="addressId" class="ipt" value="{$data['addressId']}" />
|
||||
<button type="submit" class="wst-sec-but u-btn">提交</button>
|
||||
<button type="button" onclick="javascript:history.go(-1)" class="wst-sec-but u-btn">返回</button>
|
||||
</div>
|
||||
</form>
|
||||
<style>
|
||||
.addr-btn-box{
|
||||
margin-left:10%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function(){
|
||||
//默认选中下拉框
|
||||
if($('#addressId').val()>0){
|
||||
var areaIdPath = "{$data['areaIdPath']}".split("_");
|
||||
$('#area_0').val(areaIdPath[0]);
|
||||
var aopts = {id:'area_0',val:areaIdPath[0],childIds:areaIdPath,className:'j-areas'}
|
||||
WST.ITSetAreas(aopts);
|
||||
}
|
||||
userAddrEditInit();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/useraddress/useraddress.js?v={$v}'></script>
|
||||
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
|
||||
{/block}
|
||||
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
64
hyhproject/home2/view/default/users/useraddress/list.html
Executable file
64
hyhproject/home2/view/default/users/useraddress/list.html
Executable file
@ -0,0 +1,64 @@
|
||||
{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>
|
||||
<input type="button" value="新增收货地址" class="wst-sec-but u-btn addr-btn" onclick="location.href=WST.U('home/useraddress/edit')" />
|
||||
<label>你已经创建<span class="g g1">0</span>个收货地址</label>
|
||||
<script id="address" type="text/html">
|
||||
{{# for(var i = 0, len = d.length; i < len; i++){ }}
|
||||
<table class='wst-addr' >
|
||||
<tr>
|
||||
<td>{{d[i].userName}}—{{d[i].areaName1}}</td>
|
||||
<td>
|
||||
|
||||
{{# if(d[i].isDefault==1) { }}
|
||||
<p class="default">默认地址</p>
|
||||
{{# } }}
|
||||
<a href="javascript:delAddress({{ d[i].addressId }},this)" class='del'>X</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td class="addr-title">收货人:</td>
|
||||
<td>{{d[i].userName}}</td>
|
||||
</tr>
|
||||
<tr><td class="addr-title">所在地区:</td>
|
||||
<td>{{d[i].areaName}}</td>
|
||||
</tr>
|
||||
<tr><td class="addr-title">地址:</td>
|
||||
<td>{{d[i].userAddress}}</td>
|
||||
</tr>
|
||||
<tr><td class="addr-title">联系电话:</td>
|
||||
<td>{{d[i].userPhone}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class='edit'>
|
||||
<a href="javascript:editAddress({{ d[i].addressId }})">编辑</a>
|
||||
{{# if(d[i].isDefault!=1) { }}
|
||||
<a href="javascript:setDefault({{ d[i].addressId }})">设为默认</a>
|
||||
{{# } }}
|
||||
<div class="wst-clear"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{{# } }}
|
||||
</script>
|
||||
<div id="address_box" class="address_box">
|
||||
|
||||
</div>
|
||||
<input type="button" value="新增收货地址" class="wst-sec-but u-btn addr-btn" onclick="location.href=WST.U('home/useraddress/edit')" />
|
||||
<label>你已经创建<span class="g g1">0</span>个收货地址</span></label>
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/useraddress/useraddress.js?v={$v}'></script>
|
||||
<script>
|
||||
$(function(){
|
||||
listQuery();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
116
hyhproject/home2/view/default/users/useraddress/useraddress.js
Executable file
116
hyhproject/home2/view/default/users/useraddress/useraddress.js
Executable file
@ -0,0 +1,116 @@
|
||||
function userAddrEditInit(){
|
||||
/* 表单验证 */
|
||||
$('#useraddressForm').validator({
|
||||
fields: {
|
||||
userAddress: {
|
||||
rule:"required;length[~60, true]",
|
||||
msg:{required:"请输入您的收货地址"},
|
||||
tip:"请输入您的收货地址",
|
||||
ok:"",
|
||||
},
|
||||
userName: {
|
||||
rule:"required;length[~12, true]",
|
||||
msg:{required:"请输入您的名称"},
|
||||
tip:"请输入您的名称",
|
||||
ok:"",
|
||||
},
|
||||
userPhone: {
|
||||
rule:"required;length[~50, true]",
|
||||
msg:{required:"联系电话"},
|
||||
tip:"请输入您的联系电话",
|
||||
ok:"",
|
||||
},
|
||||
isDefault: {
|
||||
rule:"checked;",
|
||||
msg:{checked:"至少选择一项"},
|
||||
tip:"是否作为默认地址",
|
||||
ok:"",
|
||||
}
|
||||
},
|
||||
valid: function(form){
|
||||
var isNoSelected = false;
|
||||
$('.j-areas').each(function(){
|
||||
isSelected = true;
|
||||
if($(this).val()==''){
|
||||
isNoSelected = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if(isNoSelected){
|
||||
WST.msg('请选择完整区域!',{icon:2});
|
||||
return;
|
||||
}
|
||||
var params = WST.getParams('.ipt');
|
||||
params.areaId = WST.ITGetAreaVal('j-areas');
|
||||
var loading = WST.msg('正在提交数据,请稍后...', {icon: 16,time:60000});
|
||||
$.post(WST.U('home/useraddress/'+((params.addressId==0)?"add":"toEdit")),params,function(data,textStatus){
|
||||
layer.close(loading);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status=='1'){
|
||||
WST.msg(json.msg,{icon:1});
|
||||
location.href=WST.U('home/useraddress/index');
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
function listQuery(){
|
||||
$.post(WST.U('Home/Useraddress/listQuery'),'',function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1 && json.data){
|
||||
json = json.data;
|
||||
var count = json.length;//已添加的记录数
|
||||
$('.g1').html(count);
|
||||
var gettpl = document.getElementById('address').innerHTML;
|
||||
laytpl(gettpl).render(json, function(html){
|
||||
$('#address_box').html(html);
|
||||
});
|
||||
}else{
|
||||
$('#address_box').empty();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editAddress(id){
|
||||
location.href=WST.U('home/useraddress/edit','id='+id);
|
||||
}
|
||||
|
||||
function delAddress(id,t){
|
||||
WST.confirm({content:"您确定要删除该地址吗?",yes:function(tips){
|
||||
var ll = layer.load('数据处理中,请稍候...');
|
||||
$.post(WST.U('Home/UserAddress/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(){
|
||||
listQuery();
|
||||
});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}});
|
||||
|
||||
}
|
||||
function setDefault(id){
|
||||
WST.confirm({content:"您确定设置为默认地址吗?",yes:function(tips){
|
||||
var ll = layer.load('数据处理中,请稍候...');
|
||||
$.post(WST.U('Home/UserAddress/setDefault'),{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(){
|
||||
listQuery();
|
||||
});
|
||||
}else{
|
||||
WST.msg('操作失败!', {icon: 5});
|
||||
}
|
||||
});
|
||||
}});
|
||||
}
|
57
hyhproject/home2/view/default/users/userscores/list.html
Executable file
57
hyhproject/home2/view/default/users/userscores/list.html
Executable file
@ -0,0 +1,57 @@
|
||||
{extend name="default/users/base" /}
|
||||
{block name="title"}积分管理-买家中心{__block__}{/block}
|
||||
{block name="content"}
|
||||
<div class='score-head'>
|
||||
<div class='user-logo'><img height='100' width='100'src='__IMGURL__{:WSTUserPhoto(session('WST_USER.userPhoto'))}'></div>
|
||||
<div class='user-info'>
|
||||
<div class='userName'>{:session('WST_USER.loginName')}</div>
|
||||
<div class='userScore'>可用积分:<font color='red'>{$object['userScore']}</font>个</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wst-user-content'>
|
||||
<div id='tab' class="wst-tab-box">
|
||||
<ul class="wst-tab-nav">
|
||||
<li>积分明细</li>
|
||||
<li>积分收入</li>
|
||||
<li>积分支出</li>
|
||||
</ul>
|
||||
<table class='wst-list' style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='*'>来源/用途</th>
|
||||
<th width='120'>积分变化</th>
|
||||
<th width='160'>日期</th>
|
||||
<th width='260'>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script id="tblist" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<tr>
|
||||
<td width='160'>{{d[i].dataSrc}}</td>
|
||||
<td width='120'>
|
||||
{{# if(d[i].scoreType==1){ }}
|
||||
<span class="score-add">+ {{ d[i].score }}</span>
|
||||
{{# }else{ }}
|
||||
<span class='score-reduce'> - {{ d[i].score }}</span>
|
||||
{{# } }}
|
||||
</td>
|
||||
<td width='160'>{{ d[i].createTime }}</td>
|
||||
<td width='*'>{{ d[i].dataRemarks }}</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
<tbody id="page-list"></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='4' align="center" style='padding:5px 0px 5px 0px'>
|
||||
<div id="pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__STYLE__/users/userscores/userscores.js?v={$v}'></script>
|
||||
{/block}
|
42
hyhproject/home2/view/default/users/userscores/userscores.js
Executable file
42
hyhproject/home2/view/default/users/userscores/userscores.js
Executable file
@ -0,0 +1,42 @@
|
||||
$(function () {
|
||||
$('#tab').TabPanel({tab:0,callback:function(tab){
|
||||
switch(tab){
|
||||
case 0:pageQuery(0,-1);break;
|
||||
case 1:pageQuery(0,1);break;
|
||||
case 2:pageQuery(0,0);break;
|
||||
}
|
||||
}})
|
||||
});
|
||||
function pageQuery(p,type){
|
||||
var tips = WST.load({msg:'正在获取数据,请稍后...'});
|
||||
var params = {};
|
||||
params.page = p;
|
||||
params.type = type;
|
||||
$.post(WST.U('home/userscores/pageQuery'),params,function(data,textStatus){
|
||||
layer.close(tips);
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
json = json.data;
|
||||
var gettpl = document.getElementById('tblist').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#page-list').html(html);
|
||||
});
|
||||
if(json.TotalPage>1){
|
||||
laypage({
|
||||
cont: 'pager',
|
||||
pages:json.TotalPage,
|
||||
curr: json.CurrentPage,
|
||||
skin: '#e23e3d',
|
||||
groups: 3,
|
||||
jump: function(e, first){
|
||||
if(!first){
|
||||
pageQuery(e.curr,type);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$('#pager').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user