You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
251
hyhproject/wechat2/view/default/users/cashconfigs/cashconfigs.js
Executable file
251
hyhproject/wechat2/view/default/users/cashconfigs/cashconfigs.js
Executable file
@ -0,0 +1,251 @@
|
||||
jQuery.noConflict();
|
||||
// 获取提现记录
|
||||
function getCashConfigs(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/cashconfigs/pageQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#listBox').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-account.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>没有提现账户</p>';
|
||||
html += '</div>';
|
||||
$('#listBox').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getCashConfigs();
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
$('#modal-large').css({'top':0,'margin-top':0});
|
||||
var h = WST.pageHeight();
|
||||
$("#frame").css('bottom','-'+h/2);
|
||||
var listh = h/2-106;
|
||||
$(".wst-fr-box .list").css('overflow-y','scroll').css('height',listh+'px');
|
||||
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getCashConfigs();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//新增或编辑提现账号
|
||||
function editAddress(id){
|
||||
$('#accTargetId').val('');
|
||||
$('#accUser').val('');
|
||||
$('#accNo').val('');
|
||||
$('#accAreaId').val('');
|
||||
$('#addresst').html('请选择地址');
|
||||
$('.wst-ad-submit .button').attr('onclick','javascript:saveConfig('+id+');');
|
||||
if(id>0){
|
||||
$('.iziModal-header-title').html('修改提现账号');
|
||||
$.post(WST.U('wechat/cashConfigs/getById'), {id:id}, function(data){
|
||||
var info = WST.toJson(data);
|
||||
if(info){
|
||||
$('#accTargetId').val(info.accTargetId);
|
||||
$('#accUser').val(info.accUser);
|
||||
$('#accNo').val(info.accNo);
|
||||
$('#accAreaId').val(info.accAreaId);
|
||||
$('#areaName').html($('#addr_'+id).val());
|
||||
}
|
||||
addressInfo= null;
|
||||
});
|
||||
}else{
|
||||
$('.iziModal-header-title').html('新增提现账号');
|
||||
}
|
||||
jQuery('#modal-large').iziModal('open');
|
||||
}
|
||||
jQuery("#modal-large").iziModal({
|
||||
title: "新增提现账号",
|
||||
subtitle: "",
|
||||
iconClass: 'icon-chat',
|
||||
overlayColor: 'rgba(0, 0 0, 0.6)',
|
||||
headerColor: '#ffffff'
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 循环创建地区
|
||||
* @param id 当前分类ID
|
||||
* @param val 当前分类值
|
||||
* @param className 样式,方便将来获取值
|
||||
*/
|
||||
WST.ITAreas = function(opts){
|
||||
opts.className = opts.className?opts.className:"j-areas";
|
||||
var obj = $('#'+opts.id);
|
||||
obj.attr('lastarea',1);
|
||||
$.post(WST.U('wechat/areas/listQuery'),{parentId:opts.val},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.data && json.data.length>0){
|
||||
json = json.data;
|
||||
var html = [],tmp;
|
||||
var tid = opts.id+"_"+opts.val;
|
||||
var level = parseInt(obj.attr('level'),10);
|
||||
$('.area_'+level).addClass('hide');
|
||||
var level = level+1;
|
||||
html.push('<div id="'+tid+'" class="list '+opts.className+' area_'+level+'" areaId="0" level="'+level+'">');
|
||||
for(var i=0;i<json.length;i++){
|
||||
tmp = json[i];
|
||||
html.push("<p onclick='javascript:inChoice(this,\""+tid+"\","+tmp.areaId+","+level+");'>"+tmp.areaName+"</p>");
|
||||
}
|
||||
html.push('</div>');
|
||||
$(html.join('')).insertAfter('#'+opts.id);
|
||||
var h = WST.pageHeight();
|
||||
var listh = h/2-106;
|
||||
$(".wst-fr-box .list").css('overflow-y','scroll').css('height',listh+'px');
|
||||
$(".wst-fr-box .option").append('<p class="ui-nowrap-flex term active_'+level+' active" onclick="javascript:inOption(this,'+level+')">请选择</p>');
|
||||
}else{
|
||||
opts.isLast = true;
|
||||
opts.lastVal = opts.val;
|
||||
$('#accAreaId').val(opts.lastVal);
|
||||
var ht = '';
|
||||
$('.wst-fr-box .term').each(function(){
|
||||
ht += $(this).html();
|
||||
});
|
||||
$('#areaName').html(ht);
|
||||
dataHide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//地址选择
|
||||
function inOption(obj,n){
|
||||
$(obj).addClass('active').siblings().removeClass('active');
|
||||
$('.area_'+n).removeClass('hide').siblings('.list').addClass('hide');
|
||||
var level = $('#level').val();
|
||||
var n = n+1;
|
||||
for(var i=n; i<=level; i++){
|
||||
$('.area_'+i).remove();
|
||||
$('.active_'+i).remove();
|
||||
}
|
||||
}
|
||||
|
||||
function inChoice(obj,id,val,level){
|
||||
$('#level').val((level+1));
|
||||
$(obj).addClass('active').siblings().removeClass('active');
|
||||
$('#'+id).attr('areaId',val);
|
||||
$('.active_'+level).removeClass('active').html($(obj).html());
|
||||
WST.ITAreas({id:id,val:val,className:'j-areas'});
|
||||
}
|
||||
|
||||
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#frame').show();
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"bottom": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
jQuery('#frame').animate({'bottom': '-'+dataHeight}, 500);
|
||||
jQuery('#cover').hide();
|
||||
setTimeout(function(){
|
||||
jQuery('#frame').hide();
|
||||
},500);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//保存
|
||||
function saveConfig(cId){
|
||||
var accUser = $('#accUser').val();
|
||||
var accNo = $('#accNo').val();
|
||||
var areaId = $('#areaId').val();
|
||||
var accAreaId = $('#accAreaId').val();
|
||||
var accTargetId = $('#accTargetId').val();
|
||||
|
||||
if(accTargetId==''){
|
||||
WST.msg('请选择账户类型','info');
|
||||
$('#accTargetId').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(accAreaId==''){
|
||||
WST.msg('请选择地址','info');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(accUser==''){
|
||||
WST.msg('持卡人不能为空','info');
|
||||
$('#accUser').focus();
|
||||
return false;
|
||||
}
|
||||
if(accNo==''){
|
||||
WST.msg('卡号不能为空','info');
|
||||
return false;
|
||||
}
|
||||
|
||||
var param = {};
|
||||
param.id = cId;
|
||||
param.accAreaId = accAreaId;
|
||||
param.accUser = accUser;
|
||||
param.accNo = accNo;
|
||||
param.accTargetId = accTargetId;
|
||||
$('.wst-ad-submit .button').addClass("active").attr('disabled', 'disabled');
|
||||
var act = (cId>0)?'edit':'add';
|
||||
$.post(WST.U('wechat/cashconfigs/'+act), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
history.go(0);
|
||||
},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
setTimeout(function(){
|
||||
$('.wst-ad-submit .button').removeAttr('disabled').removeClass("active");
|
||||
},1500);
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
|
||||
//删除提现账号
|
||||
function del(id){
|
||||
WST.dialog('确定删除吗?','toDel('+id+')');
|
||||
}
|
||||
//删除提现账号
|
||||
function toDel(id){
|
||||
$.post(WST.U('wechat/cashconfigs/del'), {id:id}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
$('#listBox').html(' ');
|
||||
$('#currPage').val(0)
|
||||
getCashConfigs();
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
}
|
||||
WST.dialogHide('prompt');
|
||||
data = json = null;
|
||||
});
|
||||
}
|
48
hyhproject/wechat2/view/default/users/cashconfigs/edit.html
Executable file
48
hyhproject/wechat2/view/default/users/cashconfigs/edit.html
Executable file
@ -0,0 +1,48 @@
|
||||
<div id="modal-large" class="iziModal">
|
||||
<input type="hidden" name="" value="" id="accAreaId" autocomplete="off">
|
||||
<div class="wst-ad-form">
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">账户类型:</label>
|
||||
<select name="accTargetId" id="accTargetId" class="wst-ca-choice">
|
||||
<option value="">请选择</option>
|
||||
{volist name="$banks" id="b"}
|
||||
<option value="{$b['bankId']}">{$b['bankName']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">账户地址:</label>
|
||||
<div id="areaName" class="ui-nowrap-flex address" onclick="javascript:dataShow();">请选择账户地址</div>
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">持卡人:</label><input class="ui-border-binte" id="accUser" type="text" placeholder="请填写持卡人姓名" maxLength="20">
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">卡号:</label>
|
||||
<input class="ui-border-binte" id="accNo" type="text" maxLength="20" placeholder="请填写银行卡号" onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)">
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
</div>
|
||||
<div class="wst-ad-submit"><button class="ui-btn-lg button" onclick="javascript:saveAddress(0);">保存</button></div>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 地址框 */}
|
||||
<div class="wst-fr-box" id="frame" style="display:none;">
|
||||
<input type="hidden" name="" value="" id="level" autocomplete="off">
|
||||
<div class="title"><span>账户地址</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
<div class="option">
|
||||
<p class="ui-nowrap-flex term active_0 active" onclick="javascript:inOption(this,0)">请选择</p>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<div id="area_0" class="list j-areas area_0" areaId="0" level="0">
|
||||
{volist name="area" id="ar"}
|
||||
<p onclick="javascript:inChoice(this,'area_0',{$ar['areaId']},0);">{$ar['areaName']}</p>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
55
hyhproject/wechat2/view/default/users/cashconfigs/list.html
Executable file
55
hyhproject/wechat2/view/default/users/cashconfigs/list.html
Executable file
@ -0,0 +1,55 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的提现账户 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/iziModal.css?v={$v}">
|
||||
<link rel="stylesheet" href="__WECHAT__/css/cashconfigs.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>我的提现账户</h1>
|
||||
<span class="add" onclick="editAddress()">添加</span>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<script type="text/html" id="list">
|
||||
{{# for(var i=0;i<d.length;++i){ }}
|
||||
<ul class="ui-row" >
|
||||
<li class="ui-col ui-col-80" onclick="editAddress({{d[i].id}})">
|
||||
<input type="hidden" id="addr_{{d[i].id}}" value="{{d[i].areaName}}">
|
||||
<p class="wst-ca-accno">{{d[i].accNo}}</p>
|
||||
<p class="wst-ca-info"> 持卡人姓名:{{d[i].accUser}}</p>
|
||||
<p class="wst-ca-info"> 开户行:{{d[i].bankName}}</p>
|
||||
</li>
|
||||
<li class="ui-col ui-col-20" onclick="del({{d[i].id}})"><p class="c-tr"><span class="delete-icon"></span>删除<p></li>
|
||||
</ul>
|
||||
{{# } }}
|
||||
</script>
|
||||
<section class="ui-container" id="listBox">
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{include file="default/users/cashconfigs/edit" /}<!-- 新增/编辑收货地址模板 -->
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/izimodal/iziModal.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/cashconfigs/cashconfigs.js?v={$v}'></script>
|
||||
{/block}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
47
hyhproject/wechat2/view/default/users/cashdraws/cashdraws.js
Executable file
47
hyhproject/wechat2/view/default/users/cashdraws/cashdraws.js
Executable file
@ -0,0 +1,47 @@
|
||||
jQuery.noConflict();
|
||||
// 获取提现记录
|
||||
function getCashDraws(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/cashdraws/pageQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('scoreList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#score-list').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-relevant.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关信息</p>';
|
||||
html += '</div>';
|
||||
$('#score-list').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getCashDraws();
|
||||
WST.initFooter('user');
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getCashDraws();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
52
hyhproject/wechat2/view/default/users/cashdraws/list.html
Executable file
52
hyhproject/wechat2/view/default/users/cashdraws/list.html
Executable file
@ -0,0 +1,52 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}提现记录 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/cashdraws.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>提现记录</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
|
||||
<script type="text/html" id="scoreList">
|
||||
<ul class="ui-row score-detail">
|
||||
{{# for(var i=0;i<d.length;i++){ }}
|
||||
<li class="ui-col ui-col-75">
|
||||
<p>{{d[i].accUser}}</p>
|
||||
<p>{{d[i].accTargetName}}{{d[i].accAreaName}}</p>
|
||||
<span class="score-time">{{d[i].createTime}}</span>
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 score-text">
|
||||
{{#if(d[i].cashSatus==1){}}
|
||||
<span style="color:green;">已通过</span>
|
||||
{{#}else if(d[i].cashSatus==-1){}}
|
||||
失败
|
||||
{{#}else{}}
|
||||
<span style="color: #59595c;">待处理</span>
|
||||
{{#}}}
|
||||
<br />
|
||||
- {{d[i].money}}
|
||||
</li>
|
||||
{{#if(d[i].cashSatus==-1){}}
|
||||
<li class="ui-col">提现失败原因:{{d[i].cashRemarks}}</li>
|
||||
{{#}}}
|
||||
<div class="wst-clear"></div>
|
||||
<div class="score-line"></div>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div id="score-list"></div>
|
||||
</section>
|
||||
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/cashdraws/cashdraws.js?v={$v}'></script>
|
||||
{/block}
|
127
hyhproject/wechat2/view/default/users/edit.html
Executable file
127
hyhproject/wechat2/view/default/users/edit.html
Executable file
@ -0,0 +1,127 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}账户管理 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/userinfo.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="useri_infos">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<a href="{:url('wechat/users/index')}"><i class="ui-icon-return return_users"></i></a><h1 class="useri_info">账户管理</h1>
|
||||
<i onclick="javascript:closeUploadArea()" style="display:none;font-size: 0.15rem;" id="upload_close">关闭</i>
|
||||
<a href="javascript:void(0);" style="display:none;float:right;font-size: 0.15rem;" id="upload_button">上传</a>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container" id="useri_info">
|
||||
<ul class="ui-list ui-list-one ui-list-link wst-ed-info">
|
||||
<li>
|
||||
<div class="ui-list-info">
|
||||
<h4 class="ui-nowrap" id="chooseImages">头像</h4>
|
||||
<input type="file" id="uploadImg" class="uploadfile-input" accept="image/*">
|
||||
<div class="ui-list-thumb" id="previewImages" style="width: 65px;">
|
||||
<span>
|
||||
<img src="{:WSTUserPhoto($user['userPhoto'])}" class="wst-useri_portrait" id="imgurl">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="wst-useri_line"></div>
|
||||
<ul class="ui-list ui-list-text wst-ed-info">
|
||||
<li>
|
||||
<h4 class="ui-nowrap">用户名</h4>
|
||||
<div class="ui-txt-info">{$user['loginName']}</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="wst-useri_line"></div>
|
||||
<ul class="ui-list ui-list-text ui-list-link wst-ed-info">
|
||||
<li onclick="javascript:openNickName();">
|
||||
<h4 class="ui-nowrap">昵称</h4>
|
||||
<div class="ui-txt-info" id="nickname">{$user['userName']}</div>
|
||||
</li>
|
||||
<div class="wst-useri_line"></div>
|
||||
<li onclick="javascript:openUserSex();">
|
||||
<h4 class="ui-nowrap">性别</h4>
|
||||
<?php $usersex = array('保密','男','女');?>
|
||||
<div class="ui-txt-info" id="usersex"><?php echo $usersex[$user['userSex']];?></div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="wst-useri_line"></div>
|
||||
</section>
|
||||
<sction class="ui-container" id="upload_modal">
|
||||
<div class="upload-modal">
|
||||
<div id="clipArea" class="clipArea"></div>
|
||||
<input type="hidden" id="imgData" autocomplete="off">
|
||||
</div>
|
||||
</sction>
|
||||
</div>
|
||||
<div id="useri_nickname" style="display:none;">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="javascript:returnUserinfo()"></i><h1>修改昵称</h1>
|
||||
</header>
|
||||
<section class="ui-container" style="height:80%;">
|
||||
<div class="wst-useri_determine">
|
||||
<input type="text" id="userName" placeholder="昵称">
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<footer>
|
||||
<div class="ui-btn-wrap">
|
||||
<button class="ui-btn-lg ui-btn-danger wst-ed-button" onclick="javascript:editNickName()">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<div id="useri_sex" style="display:none;">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="javascript:returnUserinfo()"></i><h1>修改性别</h1>
|
||||
</header>
|
||||
<section class="ui-container" id="useri_sex">
|
||||
<ul class="ui-list wst-listse wst-listse1" onclick="javascript:eidtUserSex(this, 0);">
|
||||
<li>
|
||||
<div class="wst-list-infose1">
|
||||
<span>保密</span>
|
||||
</div>
|
||||
</li>
|
||||
<div class="wst-list-infose2">
|
||||
<?php if($user['userSex']==0){ ?>
|
||||
<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</ul>
|
||||
<ul class="ui-list wst-listse wst-listse2" onclick="javascript:eidtUserSex(this, 1);">
|
||||
<li>
|
||||
<div class="wst-list-infose1">
|
||||
<span>男</span>
|
||||
</div>
|
||||
</li>
|
||||
<div class="wst-list-infose2">
|
||||
<?php if($user['userSex']==1){ ?>
|
||||
<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</ul>
|
||||
<ul class="ui-list wst-listse wst-listse3" onclick="javascript:eidtUserSex(this, 2);">
|
||||
<li>
|
||||
<div class="wst-list-infose1">
|
||||
<span>女</span>
|
||||
</div>
|
||||
</li>
|
||||
<div class="wst-list-infose2">
|
||||
<?php if($user['userSex']==2){ ?>
|
||||
<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/photoclip/iscroll-zoom.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/photoclip/hammer.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/photoclip/jquery.photoClip.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/photoclip/upload.hpictures.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/user.js?v={$v}'></script>
|
||||
{/block}
|
98
hyhproject/wechat2/view/default/users/favorites/favorite_shop.js
Executable file
98
hyhproject/wechat2/view/default/users/favorites/favorite_shop.js
Executable file
@ -0,0 +1,98 @@
|
||||
// 获取关注的店铺
|
||||
function getFavorites(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/favorites/listShopQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('shopList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#shopBox').html(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-follow-shps.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>您还没有关注店铺。</p>';
|
||||
html += '</div>';
|
||||
$('#shopBox').html(html);
|
||||
}
|
||||
imgShop('j-imgAdapt');
|
||||
imgShop('goodsImg');
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
function goToShop(sid){
|
||||
location.href=WST.U('wechat/shops/home','shopId='+sid);
|
||||
}
|
||||
// 全选
|
||||
function checkAll(obj){
|
||||
var chk = $(obj).prop('checked');
|
||||
$('.s-active').each(function(k,v){
|
||||
$(this).prop('checked',chk);
|
||||
});
|
||||
}
|
||||
// 取消关注
|
||||
function cancelFavorite(){
|
||||
WST.dialogHide('prompt');
|
||||
var fids = new Array();
|
||||
$('.s-active').each(function(k,v){
|
||||
if($(this).attr('checked')){
|
||||
fids.push($(this).attr('fid'));
|
||||
}
|
||||
});
|
||||
fids = fids.join(',');
|
||||
if(fids==''){
|
||||
WST.msg('请先选择店铺','info');
|
||||
return;
|
||||
}
|
||||
$.post(WST.U('wechat/favorites/cancel'),{id:fids,type:1},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#currPage').val('0')
|
||||
getFavorites();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getFavorites();
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getFavorites();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//适应图片大小正方形
|
||||
function imgShop(name){
|
||||
var w = $('.'+name).width();
|
||||
if(name == 'j-imgAdapt'){
|
||||
$('.'+name).css({"width": w+"px","height": w+"px"});
|
||||
}else{
|
||||
$('.'+name).css({"width": w+"px","height": w+20+"px"});
|
||||
}
|
||||
$('.'+name+' a').css({"width": w+"px","height": w+"px"});
|
||||
$('.'+name+' a img').css({"width": w+"px","height": w+"px"});
|
||||
$('.'+name+' a .goodsPrice').css({"width": w+"px"});
|
||||
}
|
95
hyhproject/wechat2/view/default/users/favorites/favorites.js
Executable file
95
hyhproject/wechat2/view/default/users/favorites/favorites.js
Executable file
@ -0,0 +1,95 @@
|
||||
// 获取关注的商品
|
||||
function getFavorites(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.id = $('#catId').val();
|
||||
param.condition = $('#condition').val();
|
||||
param.desc = $('#desc').val();
|
||||
param.keyword = $('#searchKey').val();
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/favorites/listGoodsQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('fGoods').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#goods-list').html(html);
|
||||
});
|
||||
$('#currPage').val(data.CurrentPage);
|
||||
$('#totalPage').val(data.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-follow-goods.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>您还没有关注商品。</p>';
|
||||
html += '</div>';
|
||||
$('#goods-list').html(html);
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
// 全选
|
||||
function checkAll(obj){
|
||||
var chk = $(obj).attr('checked');
|
||||
$('.active').each(function(k,v){
|
||||
$(this).prop('checked',chk);
|
||||
});
|
||||
}
|
||||
// 取消关注
|
||||
function cancelFavorite(){
|
||||
WST.dialogHide('prompt');
|
||||
var gids = new Array();
|
||||
$('.active').each(function(k,v){
|
||||
if($(this).attr('checked')){
|
||||
gids.push($(this).attr('gid'));
|
||||
}
|
||||
});
|
||||
gids = gids.join(',');
|
||||
if(gids==''){
|
||||
WST.msg('请先选择商品','info');
|
||||
return;
|
||||
}
|
||||
$.post(WST.U('wechat/favorites/cancel'),{id:gids,type:0},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#currPage').val('0')
|
||||
getFavorites();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getFavorites();
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getFavorites();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function addCart(goodsId){
|
||||
$.post(WST.U('wechat/carts/addCart'),{goodsId:goodsId,buyNum:1},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
74
hyhproject/wechat2/view/default/users/favorites/list_goods.html
Executable file
74
hyhproject/wechat2/view/default/users/favorites/list_goods.html
Executable file
@ -0,0 +1,74 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的关注 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/favorites.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>关注商品</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
<div class="ui-loading-wrap wst-Load" id="Load">
|
||||
<i class="ui-loading"></i>
|
||||
</div>
|
||||
<footer class="ui-footer wst-footer-btns" style="height:42px; border-top: 1px solid #e8e8e8;" id="footer">
|
||||
<div class="wst-toTop" id="toTop">
|
||||
<i class="wst-toTopimg"><span>顶部</span></i>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace">
|
||||
<div class="ui-col ui-col-2 favorite-tc">
|
||||
<label class="ui-checkbox">
|
||||
<input class="sactive" type="checkbox" onclick="javascript:checkAll(this);">
|
||||
</label>
|
||||
全选
|
||||
</div>
|
||||
|
||||
<div class="ui-col">
|
||||
<div class="ui-btn-wrap f-btn">
|
||||
<button class="ui-btn ui-btn-danger" onclick="WST.dialog('确认要取消关注吗','cancelFavorite()');">
|
||||
取消关注
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<script id="fGoods" type="text/html">
|
||||
{{# for(var i=0; i<d.length; i++){ }}
|
||||
<div class="ui-row-flex wst-shl-list" >
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="checkbox" gId="{{d[i].favoriteId}}" onclick="javascript:WST.changeIconStatus($(this), 1);">
|
||||
</label>
|
||||
|
||||
<div class="ui-col">
|
||||
<div class="img j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="javascript:WST.intoGoods({{d[i].goodsId}});">
|
||||
<img src="__ROOT__/{{WST.conf.GOODS_LOGO}}" data-echo="__ROOT__/{{d[i].goodsImg}}" title="{{d[i].shopName}}"></a></div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-2 info">
|
||||
<div class="title ui-nowrap-multi" onclick="javascript:WST.intoGoods({{d[i].goodsId}});">{{d[i].goodsName}}</div>
|
||||
<p class="price"><span>¥ </span>{{d[i].shopPrice}}</p>
|
||||
<p class="deal">成交数:{{d[i].saleNum}}</p><span class="add-cart" onclick="addCart({{d[i].goodsId}})"></span>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<section class="ui-container info-prompt">
|
||||
<ul class="ui-tab-content">
|
||||
<li id="goods-list"></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/users/favorites/favorites.js?v={$v}'></script>
|
||||
{/block}
|
92
hyhproject/wechat2/view/default/users/favorites/list_shops.html
Executable file
92
hyhproject/wechat2/view/default/users/favorites/list_shops.html
Executable file
@ -0,0 +1,92 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}关注店铺 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/favorites.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>关注店铺</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
<div class="ui-loading-wrap wst-Load" id="Load">
|
||||
<i class="ui-loading"></i>
|
||||
</div>
|
||||
<footer class="ui-footer wst-footer-btns" style="height:42px; border-top: 1px solid #e8e8e8;" id="footer">
|
||||
<div class="wst-toTop" id="toTop">
|
||||
<i class="wst-toTopimg"><span>顶部</span></i>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace">
|
||||
<div class="ui-col ui-col-2 favorite-tc">
|
||||
<label class="ui-checkbox">
|
||||
<input class="sactive" type="checkbox" onclick="javascript:checkAll(this);">
|
||||
</label>
|
||||
全选
|
||||
</div>
|
||||
|
||||
<div class="ui-col">
|
||||
<div class="ui-btn-wrap f-btn">
|
||||
<button class="ui-btn ui-btn-danger" onclick="WST.dialog('确认要取消关注吗','cancelFavorite()');">
|
||||
取消关注
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</footer>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
|
||||
<script id="shopList" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<div class="ui-row-flex ui-whitespace ui-row-flex-ver shop-box">
|
||||
<div class="ui-col f-shop-header">
|
||||
<div class="ui-row-flex ui-whitespace">
|
||||
<div class="ui-col ui-col-3">
|
||||
<label class="ui-checkbox f-chk">
|
||||
<input class="s-active" type="checkbox" fId="{{d[i].favoriteId}}" onclick="javascript:WST.changeIconStatus($(this), 1);">
|
||||
</label>
|
||||
<div class="shopImg j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="goToShop({{d[i].shopId}})"><img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{{ d[i].shopImg }}" title="{{ d[i].shopName }}"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-2" onclick="goToShop({{d[i].shopId}})">
|
||||
<div class="f-shopname ui-nowrap ui-whitespace">{{d[i].shopName}}</div>
|
||||
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 f-goshops" onclick="goToShop({{d[i].shopId}})">
|
||||
<a href="javascript:void(0);" onclick="goToShop({{d[i].shopId}})"><span class="wst-action">进入店铺</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-row-flex goods-box">
|
||||
{{# var gLength = Math.min(d[i].goods.length,4) }}
|
||||
{{# for(var g=0;g<gLength;++g){ }}
|
||||
<div class="goodsImg"><a href="javascript:void(0);" onclick="WST.intoGoods({{d[i].goods[g].goodsId}})"><img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{{WST.replaceImg(d[i].goods[g].goodsImg,'_m_thumb')}}">
|
||||
<p class="goodsPrice ui-nowrap"><span>¥ </span>{{d[i].goods[g].shopPrice}}</p></a>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<section class="ui-container" id="shopBox">
|
||||
|
||||
</section>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/users/favorites/favorite_shop.js?v={$v}'></script>
|
||||
{/block}
|
48
hyhproject/wechat2/view/default/users/history/history.js
Executable file
48
hyhproject/wechat2/view/default/users/history/history.js
Executable file
@ -0,0 +1,48 @@
|
||||
// 获取浏览记录
|
||||
function getHistory(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/goods/historyQuery'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('list').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#listBox').append(html);
|
||||
});
|
||||
$('#currPage').val(data.CurrentPage);
|
||||
$('#totalPage').val(data.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-history.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无浏览记录</p>';
|
||||
html += '<button class="ui-btn-s" onclick="javascript:WST.intoIndex();">去逛逛</button>';
|
||||
html += '</div>';
|
||||
$('#listBox').html(html);
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
WST.initFooter();
|
||||
getHistory();
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getHistory();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
47
hyhproject/wechat2/view/default/users/history/list.html
Executable file
47
hyhproject/wechat2/view/default/users/history/list.html
Executable file
@ -0,0 +1,47 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}浏览记录 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/history.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>浏览记录</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<script type="text/html" id="list">
|
||||
{{# for(var i=0;i<d.length;++i){ }}
|
||||
<div class="ui-row-flex goods-item">
|
||||
<div class="ui-col">
|
||||
<div class="img j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="javascript:WST.intoGoods({{d[i]['goodsId']}});"><img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{{d[i]['goodsImg']}}"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-3" onclick="javascript:WST.intoGoods({{d[i]['goodsId']}});">
|
||||
<div class="ui-row-flex ui-row-flex-ver wst-info">
|
||||
<div class="goodsTitle ui-nowrap-multi">{{d[i].goodsName}}</div>
|
||||
<div>
|
||||
<p class="price"><span>¥ </span>{{d[i].shopPrice}}</p>
|
||||
<p class="goods-info">成交数:{{d[i].saleNum}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<section class="ui-container" id="listBox">
|
||||
</section>
|
||||
|
||||
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/history/history.js?v={$v}'></script>
|
||||
{/block}
|
260
hyhproject/wechat2/view/default/users/index.html
Executable file
260
hyhproject/wechat2/view/default/users/index.html
Executable file
@ -0,0 +1,260 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/user.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container" id="user">
|
||||
<div class="wst-users_info">
|
||||
<a href="{:url('wechat/messages/index')}"><i class="wst-msg-icon">
|
||||
{if ($data['message']['num']>0)}
|
||||
<span class="number" id="msgNum">{$data['message']['num']}</span>
|
||||
{/if}
|
||||
</i></a>
|
||||
<i class="ui-icon-set wst-info-icon" onclick="location.href='{:url('wechat/users/userset')}'"></i>
|
||||
<div class="ui-row-flex" style="height:0.7rem">
|
||||
<div class="ui-col ui-col-2">
|
||||
<div class="wst-users_infol" id="previewImages">
|
||||
<img src="{:WSTUserPhoto($user['userPhoto'])}" class="wst-useri_portrait" id="imgurl">
|
||||
</div>
|
||||
<p class="wst-users_infor wst-users_infortop">
|
||||
{:$user['userName']?$user['userName']:$user['loginName']}
|
||||
{if ($user['ranks']['rankName']!='')}<img src="__ROOT__/{$user['ranks']['userrankImg']}">{/if}
|
||||
</p>
|
||||
{if ($user['ranks']['rankName']!='')}
|
||||
<p class="wst-users_infor wst-users_inforbo">{$user['ranks']['rankName']}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="ui-col">
|
||||
{php}$signScore=explode(",",WSTConf('CONF.signScore'));{/php}
|
||||
{if(WSTConf('CONF.signScoreSwitch')==1 && $signScore[0]>0)}
|
||||
<div class="wst-us-sign">
|
||||
{if(session('WST_USER.signScoreTime')==date('Y-m-d'))}
|
||||
<a id="j-sign" class="sign sign2" disabled="disabled"></a>
|
||||
{else}
|
||||
<a id="j-sign" class="sign" onclick="javascript:inSign();"></a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{:hook('wechatDocumentUserIndex')}
|
||||
|
||||
{/* 商家订单管理 */}
|
||||
{if ($user['userType']==1)}
|
||||
<?php $shopMenus = WSTShopOrderMenus();?>
|
||||
{if (count($shopMenus)>0)}
|
||||
<div class="user-order">
|
||||
<ul class="ui-row order">
|
||||
<li class="ui-col ui-col-50"><i class="order-icon"></i>商家订单管理</li>
|
||||
<li class="ui-col ui-col-50 view-order" onclick="location.href='{:url('wechat/orders/sellerorder')}'">查看全部订单 ></li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{/*用户订单管理 */}
|
||||
<div class="user-order">
|
||||
<ul class="ui-row order">
|
||||
<li class="ui-col ui-col-50"><i class="order-icon"></i>我的订单</li>
|
||||
<li class="ui-col ui-col-50 view-order" onclick="location.href='{:url('wechat/orders/index')}'">查看全部订单 ></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ui-row-flex wst-users_icon">
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/orders/index',['type'=>'waitPay'])}">
|
||||
<p class="ui-badge-wrap">
|
||||
<i class="wst-users_icon1"></i>
|
||||
{if ($data['order']['waitPay']>0)}
|
||||
<span class="ui-badge-corner wait-payment ui-nowrap-flex ui-whitespace" id="waitPay">{$data['order']['waitPay']}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">待付款</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/orders/index',['type'=>'waitDeliver'])}">
|
||||
<p class="ui-badge-wrap">
|
||||
<i class="wst-users_icon2"></i>
|
||||
{if ($data['order']['waitSend']>0)}
|
||||
<span class="ui-badge-corner wait-payment" id="waitSend">{$data['order']['waitSend']}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">待发货</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/orders/index',['type'=>'waitReceive'])}">
|
||||
<p class="ui-badge-wrap">
|
||||
<i class="wst-users_icon3"></i>
|
||||
{if ($data['order']['waitReceive']>0)}
|
||||
<span class="ui-badge-corner wait-payment" id="waitReceive">{$data['order']['waitReceive']}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">待收货</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/orders/index',['type'=>'waitAppraise'])}">
|
||||
<p class="ui-badge-wrap">
|
||||
<i class="wst-users_icon4"></i>
|
||||
{if ($data['order']['waitAppraise']>0)}
|
||||
<span class="ui-badge-corner wait-payment" id="waitAppraise">{$data['order']['waitAppraise']}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">待评价</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/orders/index',['type'=>'abnormal'])}">
|
||||
<p style="display:none;"><i class="wst-users_icon5"></i></p><p><i class="wst-users_icon5"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">取消拒收</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-order">
|
||||
<ul class="ui-row order">
|
||||
<li class="ui-col ui-col-50"><i class="wallet-icon"></i>我的财产</li>
|
||||
<li class="ui-col ui-col-50 view-order" onclick="location.href='{:url('wechat/logmoneys/usermoneys')}'">资金管理 ></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ui-row-flex wst-users_capital">
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/logmoneys/usermoneys')}">
|
||||
<p class="ui-badge-wrap ui-nowrap"><span>¥ </span>{$user['userMoney']}</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">余额</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui-col ui-col">
|
||||
<a href="{:url('wechat/userscores/index')}">
|
||||
<p class="ui-badge-wrap ui-nowrap" id="currentScore">{$user['userScore']}</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">积分</span>
|
||||
</a>
|
||||
</div>
|
||||
{:hook('wechatDocumentUserIndexTerm')}
|
||||
</div>
|
||||
|
||||
<div class="user-order">
|
||||
<ul class="ui-row order">
|
||||
<li class="ui-col ui-col-50"><i class="tool-icon"></i>必备工具</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="ui-row" style="background: #fff;">
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/favorites/goods')}">
|
||||
<p><i class="user-icon1"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">关注商品</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/favorites/shops')}">
|
||||
<p><i class="user-icon2"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">关注店铺</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/goods/history')}">
|
||||
<p><i class="user-icon3"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">浏览记录</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/users/security')}">
|
||||
<p><i class="user-icon4"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">账户安全</span>
|
||||
</a>
|
||||
</li> -->
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/logmoneys/usermoneys')}">
|
||||
<p><i class="user-icon5"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">资金管理</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/userscores/index')}">
|
||||
<p><i class="user-icon6"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">我的积分</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- <li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="#">
|
||||
<i class="user-icon7"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">我的礼券</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="#">
|
||||
<i class="user-icon8"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">我的客服</span>
|
||||
</a>
|
||||
</li> -->
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/useraddress/index')}">
|
||||
<p><i class="user-icon9"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">地址管理</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- <li class="ui-col ui-col-25 user-icon-box">
|
||||
<a href="{:url('wechat/messages/index')}">
|
||||
<p class="ui-badge-wrap" style="width:33px;">
|
||||
<i class="user-icon10"></i>
|
||||
{if ($data['message']['num']>0)}
|
||||
<span class="ui-badge-corner wait-payment" id="msgNum">{$data['message']['num']}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">商城消息</span>
|
||||
</a>
|
||||
</li> -->
|
||||
|
||||
<li class="ui-col ui-col-25 user-icon-box ui-center-hor">
|
||||
<a href="{:url('wechat/ordercomplains/index')}">
|
||||
<p><i class="user-icon11"></i></p>
|
||||
<span class="ui-flex ui-flex-align-end ui-flex-pack-center">订单投诉</span>
|
||||
</a>
|
||||
</li>
|
||||
{:hook('wechatDocumentUserIndexTools')}
|
||||
</ul>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/users/user.js?v={$v}'></script>
|
||||
{if(!empty($datawx))}
|
||||
<script src="{:request()->scheme()}://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
||||
<script>
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: '<?php echo WSTConf('CONF.wxAppId'); ?>', //公众号的唯一标识
|
||||
timestamp: '<?php echo $datawx['timestamp'];?>', //生成签名的时间戳
|
||||
nonceStr: '<?php echo $datawx['noncestr'];?>', //生成签名的随机串
|
||||
signature: '<?php echo $datawx['signature'];?>',//签名
|
||||
jsApiList: [ //需要使用的JS接口
|
||||
'previewImage',
|
||||
]
|
||||
});
|
||||
wx.ready(function(){
|
||||
//图片预览
|
||||
document.querySelector('#previewImages').onclick = function () {
|
||||
var url=document.getElementById('imgurl').src;
|
||||
wx.previewImage({
|
||||
current: url,
|
||||
urls: [
|
||||
url
|
||||
]
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
113
hyhproject/wechat2/view/default/users/logmoneys/list.html
Executable file
113
hyhproject/wechat2/view/default/users/logmoneys/list.html
Executable file
@ -0,0 +1,113 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的资金 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/logmoneys.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>我的资金</h1>
|
||||
<span class="record" onclick="location.href='{:url('wechat/cashdraws/index')}'">提现记录</span>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="{$rs['isSetPayPwd']}" id="isSet" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="ui-row-flex ui-row-flex-ver head">
|
||||
<div class="title">
|
||||
<div class="money_number">
|
||||
<p id="userMoney" money="{$rs['userMoney']}" cash="{:WSTConf('CONF.drawCashUserLimit')}">可用资金:<span>¥ </span>{$rs['userMoney']}</p>
|
||||
</div>
|
||||
<div class="money_number2">
|
||||
<p money="{$rs['userMoney']}" cash="{:WSTConf('CONF.drawCashUserLimit')}">冻结资金:<span>¥ </span>{$rs['lockMoney']}</p>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="ui-col head-btn-box"></div>
|
||||
</div>
|
||||
<ul class="ui-row recharge-box">
|
||||
<li class="ui-col ui-col-50" onclick="location.href='{:url('wechat/logmoneys/toRecharge')}'">
|
||||
<div class="wst_model">
|
||||
<div class="icon_add"><p>充值</p></div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="ui-col ui-col-50" onclick="getCash()">
|
||||
<div class="wst_model">
|
||||
<div class="icon_out"><p>提现</p></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="ui-row money-detail" onclick="check()">
|
||||
<li class="ui-col ui-col-50 money-detail-title"><div class="icon_stript stript_1"></div><h5> 我的提现账户</h5></li>
|
||||
<li class="ui-col ui-col-50 money-detail-title m-tr"><h5>{$rs['num']}个 ></h5></li>
|
||||
</ul>
|
||||
<ul class="ui-row money-detail" onclick="javascript:toRecord()">
|
||||
<li class="ui-col ui-col-50 money-detail-title"><div class="icon_stript stript_2"></div><h5> 我的资金流水</h5></li>
|
||||
<li class="ui-col ui-col-50 money-detail-title m-tr"><h5>></h5></li>
|
||||
</ul>
|
||||
<ul class="ui-row first-time">
|
||||
<li class="ui-col ui-col-100 ft-title"><i></i><span>首次提现步骤:</span></li>
|
||||
<li class="ui-col ui-col-100 ft-item">1.设置支付密码和绑定手机号码</li>
|
||||
<li class="ui-col ui-col-100 ft-item">2.绑定您的微信钱包或银行卡</li>
|
||||
</ul>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}
|
||||
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
|
||||
{/* 对话框 prompt */}
|
||||
<div class="ui-dialog" id="payPwdBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
<p id="wst-dialog" class="wst-dialog-t">
|
||||
请输入支付密码:<br />
|
||||
<input type="password" id="payPwd" maxLength="6" class="wst-pay-inp" />
|
||||
</p>
|
||||
<p class="wst-dialog-l"></p>
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event3" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 分类层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title"><span>申请提现</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="info">
|
||||
<p>可提现金额</p>
|
||||
<p class="money"><span>¥ </span>{$rs['userMoney']}</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-25">提现账号:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<select name="accId" id="accId" class="wst-lo-choice">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="ui-col ui-col-25">提现金额:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<input type="number" name="money" id="money" class="wst-lo-choice" onkeyup="javascript:WST.isChinese(this,1)" autocomplete="off" />
|
||||
</li>
|
||||
<li class="ui-col ui-col-25">支付密码:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<input type="password" id="cashPayPwd" class="wst-lo-choice" maxLength="6" onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)" autocomplete="off" />
|
||||
</li>
|
||||
<li class="ui-col wst-red">(至少¥ {:WSTConf('CONF.drawCashUserLimit')}以上可提现)</li>
|
||||
<li class="ui-col ui-col-100">
|
||||
<div class="ui-btn-wrap">
|
||||
<button class="ui-btn-lg ui-btn-danger wst-apply-button" id="submit" onclick="drawMoney()">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/logmoneys/logmoneys.js?v={$v}'></script>
|
||||
{/block}
|
155
hyhproject/wechat2/view/default/users/logmoneys/logmoneys.js
Executable file
155
hyhproject/wechat2/view/default/users/logmoneys/logmoneys.js
Executable file
@ -0,0 +1,155 @@
|
||||
jQuery.noConflict();
|
||||
$(document).ready(function(){
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
var w = WST.pageWidth();
|
||||
$("#frame").css('top',0);
|
||||
$("#frame").css('right',-w);
|
||||
});
|
||||
//资金流水列表
|
||||
function getRecordList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.type = $('#type').val() || -1;
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/logMoneys/pageQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('scoreList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#score-list').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-relevant.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关信息</p>';
|
||||
html += '</div>';
|
||||
$('#score-list').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
// 验证支付密码资金
|
||||
function check(){
|
||||
var isSetPayPwd = $('#isSet').val();
|
||||
if(isSetPayPwd==0){
|
||||
$('#wst-event2').html('去设置');
|
||||
WST.dialog('您未设置支付密码','location.href="'+WST.U('wechat/users/editPayPass')+'"');
|
||||
return;
|
||||
}else{
|
||||
showPayBox();
|
||||
}
|
||||
|
||||
}
|
||||
// 支付密码对话框
|
||||
function showPayBox(){
|
||||
$("#wst-event3").attr("onclick","javascript:checkSecret()");
|
||||
$("#payPwdBox").dialog("show");
|
||||
}
|
||||
function checkSecret(){
|
||||
var payPwd = $.trim($('#payPwd').val());
|
||||
if(payPwd==''){
|
||||
WST.msg('请输入支付密码','info');
|
||||
return;
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
var payPwd = rsa.encrypt(payPwd);
|
||||
}
|
||||
$.post(WST.U('wechat/logmoneys/checkPayPwd'),{payPwd:payPwd},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$("#payPwdBox").dialog("hide");
|
||||
location.href=WST.U('wechat/cashconfigs/index');
|
||||
}else{
|
||||
WST.msg(json.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
//资金流水
|
||||
function toRecord(){
|
||||
location.href = WST.U('wechat/logmoneys/record');
|
||||
}
|
||||
/******************** 提现层 *************************/
|
||||
function getCash(){
|
||||
$('#money').val('');
|
||||
$('#cashPayPwd').val('');
|
||||
$.post(WST.U('wechat/cashconfigs/pageQuery'),{},function(data){
|
||||
var json = WST.toJson(data);
|
||||
var html = '<option value="">请选择</option>';
|
||||
if(json.status==1){
|
||||
$(json.data.Rows).each(function(k,v){
|
||||
html +='<option value='+v.id+'>'+v.accUser+'|'+v.accNo+'</option>';
|
||||
});
|
||||
$('#accId').html(html);
|
||||
// 判断是否禁用按钮
|
||||
if($('#userMoney').attr('money')<$('#userMoney').attr('cash'))$('#submit').attr('disabled','disabled');
|
||||
dataShow();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
})
|
||||
}
|
||||
// 申请提现
|
||||
function drawMoney(){
|
||||
var accId = $('#accId').val();
|
||||
var money = $('#money').val();
|
||||
var payPwd = $('#cashPayPwd').val();
|
||||
|
||||
if(accId==''){
|
||||
WST.msg('请选择提现账号','info');
|
||||
return;
|
||||
}
|
||||
if(money==''){
|
||||
WST.msg('请输入提现金额','info');
|
||||
return
|
||||
}
|
||||
if(payPwd==''){
|
||||
WST.msg('请输入支付密码','info');
|
||||
return
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
var payPwd = rsa.encrypt(payPwd);
|
||||
}
|
||||
var param = {};
|
||||
param.accId = accId;
|
||||
param.money = money;
|
||||
param.payPwd = payPwd;
|
||||
$.post(WST.U('wechat/cashdraws/drawMoney'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg('提现申请已提交','success');
|
||||
setTimeout(function(){
|
||||
history.go(0);
|
||||
},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
})
|
||||
}
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
55
hyhproject/wechat2/view/default/users/logmoneys/record.html
Executable file
55
hyhproject/wechat2/view/default/users/logmoneys/record.html
Executable file
@ -0,0 +1,55 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}资金流水 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/userscores.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "资金流水"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="ui-row-flex ui-whitespace ui-row-flex-ver head" style="text-align: left;">
|
||||
<div class="ui-col" style="padding-top: 30px;font-size: 0.16rem;text-align: right;">可用资金:¥ {$rs['userMoney']}</div>
|
||||
<div class="ui-col" style="font-size: 0.16rem;text-align: right;">冻结资金:¥ {$rs['lockMoney']}</div>
|
||||
</div>
|
||||
<script type="text/html" id="scoreList">
|
||||
<ul class="ui-row score-detail">
|
||||
{{# for(var i=0;i<d.length;i++){ }}
|
||||
<li class="ui-col ui-col-75 wst-re-info">
|
||||
{{d[i].remark}}
|
||||
<span class="score-time">{{d[i].createTime}}</span>
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 {{(d[i].moneyType==1)?'score-plus':'score-reduce'}}">{{(d[i].moneyType==1)?'+':'-'}} {{d[i].money}}</li>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="score-line"></div>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
<div class="score-detail-title">资金明细</div>
|
||||
<div id="score-list"></div>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/logmoneys/logmoneys.js?v={$v}'></script>
|
||||
<script>
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getRecordList();
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getRecordList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
77
hyhproject/wechat2/view/default/users/messages/list.html
Executable file
77
hyhproject/wechat2/view/default/users/messages/list.html
Executable file
@ -0,0 +1,77 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的消息 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/messages.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="location.href='{:url('wechat/users/index')}'"></i><h1>我的消息</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
<div class="ui-loading-wrap wst-Load" id="Load">
|
||||
<i class="ui-loading"></i>
|
||||
</div>
|
||||
<footer class="ui-footer wst-footer-btns" style="height:45px; border-top: 1px solid #e0e0e0;" id="footer">
|
||||
<div class="wst-toTop" id="toTop">
|
||||
<i class="wst-toTopimg"><span>顶部</span></i>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace">
|
||||
<div class="ui-col ui-col-2 favorite-tc">
|
||||
<label class="ui-checkbox" style="margin-left:5px;">
|
||||
<input class="sactive" type="checkbox" onclick="javascript:checkAll(this);">
|
||||
</label>
|
||||
全选
|
||||
</div>
|
||||
|
||||
<div class="ui-col">
|
||||
<div class="ui-btn-wrap f-btn">
|
||||
<button class="ui-btn ui-btn-danger del-btn" onclick="toDelMsg()">
|
||||
删除消息
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<script type="text/html" id="msgList">
|
||||
{{# for(var i=0; i<d.length; i++){ }}
|
||||
<li>
|
||||
<label class="ui-checkbox msg-chk">
|
||||
<input class="active" type="checkbox" msgId="{{d[i].id}}" >
|
||||
</label>
|
||||
<div class="ui-list-info" onclick="javascript:getMsgDetails({{d[i].id}});">
|
||||
<h5 class="ui-nowrap">
|
||||
<span class="{{(d[i].msgStatus == 0)?'wst-info_ico':'wst-info_ico1' }} j-icon_{{d[i].id}}"></span>{{d[i].msgContent}}</h5>
|
||||
</div>
|
||||
</li>
|
||||
<div class="wst-Line"></div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<section class="ui-container info-prompt">
|
||||
<ul class="ui-list ui-list-text wst-info_content" id="info-list">
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<div id="info_details" style="display:none;">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="javascript:returnInfo()"></i><h1>消息详情</h1>
|
||||
</header>
|
||||
<section class="ui-container">
|
||||
<div class="ui-whitespace detail-time"><span class="wst-info_detime"></span></div>
|
||||
<div class="ui-whitespace"><span class="wst-info_decontent"></span></div>
|
||||
</section>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__ROOT__/hyhproject//wechat/view/default/users/messages/messages.js?v={$v}'></script>
|
||||
{/block}
|
103
hyhproject/wechat2/view/default/users/messages/messages.js
Executable file
103
hyhproject/wechat2/view/default/users/messages/messages.js
Executable file
@ -0,0 +1,103 @@
|
||||
//消息列表
|
||||
function getMessages(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 12;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/messages/pageQuery'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
var mhtml = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('msgList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#info-list').append(html);
|
||||
});
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
|
||||
}else{
|
||||
mhtml += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-message.png"></div>';
|
||||
mhtml += '<div class="wst-prompt-info">';
|
||||
mhtml += '<p>对不起,没有相关消息。</p>';
|
||||
mhtml += '</div>';
|
||||
$('.info-prompt').append(mhtml);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
});
|
||||
}
|
||||
//返回消息列表
|
||||
function returnInfo(){
|
||||
$('#info_details').hide();
|
||||
$('#info_list').show();
|
||||
}
|
||||
|
||||
// 全选
|
||||
function checkAll(obj){
|
||||
var chk = $(obj).attr('checked');
|
||||
$('.active').each(function(k,v){
|
||||
$(this).prop('checked',chk);
|
||||
});
|
||||
}
|
||||
//消息详情
|
||||
function getMsgDetails(id){
|
||||
$('#info_list').hide();
|
||||
$('#info_details').show();
|
||||
$('.j-icon_'+id).addClass('wst-info_ico1').removeClass('wst-info_ico');
|
||||
$.post(WST.U('wechat/messages/getById'), {msgId:id}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json){
|
||||
$('.wst-info_detime').html(json.createTime);
|
||||
$('.wst-info_decontent').html(json.msgContent);
|
||||
}
|
||||
json = null;
|
||||
});
|
||||
}
|
||||
var msgIdsToDel=new Array();//要删除的消息的id 数组
|
||||
//去删除商城消息
|
||||
function toDelMsg(){
|
||||
var msgIds = new Array();
|
||||
$('.active').each(function(k,v){
|
||||
if($(this).attr('checked')){
|
||||
msgIds.push($(this).attr('msgid'));
|
||||
}
|
||||
});
|
||||
msgIdsToDel = msgIds;
|
||||
if(msgIds.join(',')==''){
|
||||
WST.msg('请选择要删除的消息','info');
|
||||
return false;
|
||||
}
|
||||
WST.dialog('确定要删除选中的消息吗?','delMsg()');
|
||||
}
|
||||
var vn ='';
|
||||
//删除商城消息
|
||||
function delMsg(){
|
||||
WST.dialogHide('prompt');
|
||||
$.post(WST.U('wechat/messages/del'), {ids:msgIdsToDel}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
$('#currPage').val(0)
|
||||
$('#info-list').html(' ');
|
||||
getMessages();
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
}
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getMessages();
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getMessages();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
152
hyhproject/wechat2/view/default/users/orders/list_complains.html
Executable file
152
hyhproject/wechat2/view/default/users/orders/list_complains.html
Executable file
@ -0,0 +1,152 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的投诉 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/list_complains.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}
|
||||
$we = WSTWechat();
|
||||
$datawx = $we->getJsSignature(request()->scheme()."://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
{/php}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>我的投诉</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<script type="text/html" id="complainList">
|
||||
<ul class="ui-row">
|
||||
{{# for(var i=0;i<d.length;i++){ }}
|
||||
<div class="complain-box">
|
||||
<li class="ui-col ui-col-50" onclick="javascript:WST.intoShops({{d[i].shopId}});">{{d[i].shopName}}</li>
|
||||
<li class="ui-col ui-col-50 c-tr">{{d[i].complainTime}}</li>
|
||||
<div class="c-item" onclick="complainDetail({{d[i].complainId}})">
|
||||
<li class="ui-col ui-col-75">订单号:{{d[i].orderNo}}</li>
|
||||
<li class="ui-col ui-col-25 c-tr wst-co-status">{{d[i].complainStatus}}</li>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
<div class="c-line"></div>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
<div id="complain-list"></div>
|
||||
</section>
|
||||
<script type="text/html" id="complainDetail">
|
||||
<ul class="ui-row com-detail-box">
|
||||
<li class="ui-col ui-col-100 com-detail-big-title">投诉信息</li>
|
||||
<li class="ui-col ui-col-25 com-detail-title">订单编号:</li>
|
||||
<li class="ui-col ui-col-75">{{d.orderNo}}</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">投诉内容:</li>
|
||||
<li class="ui-col ui-col-75">{{d.complainContent}}</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">投诉类型:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{# if (d.complainType==1){ }}
|
||||
承诺的没有做到
|
||||
{{# } else if (d.complainType==2) { }}
|
||||
未按约定时间发货
|
||||
{{# } else if (d.complainType==3) { }}
|
||||
未按成交价格进行交易
|
||||
{{# } else if (d.complainType==4) { }}
|
||||
恶意骚扰
|
||||
{{# } }}
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">附件:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{# if(d.complainAnnex){ }}
|
||||
{{# for(var c=0;c<d.complainAnnex.length;c++){ }}
|
||||
<img src="__ROOT__/{{d.complainAnnex[c]}}" style="width:60px;height:60px;" class="imgurl" onclick="javascript:getImg(this);">
|
||||
{{# } }}
|
||||
{{# }else{ }}
|
||||
无
|
||||
{{# } }}
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">投诉时间:</li>
|
||||
<li class="ui-col ui-col-75">{{d.complainTime}}</li>
|
||||
</ul>
|
||||
|
||||
|
||||
{{# if (d.needRespond==1 && WST.blank(d.respondContent)!=''){ }}
|
||||
|
||||
<ul class="ui-row com-detail-box">
|
||||
<li class="ui-col ui-col-100 com-detail-big-title">应诉信息</li>
|
||||
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">应诉内容:</li>
|
||||
<li class="ui-col ui-col-75">{{d.respondContent}}</li>
|
||||
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">附件:</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{# if(d.respondAnnex){ }}
|
||||
{{# for(var r=0;r<d.respondAnnex.length;r++){ }}
|
||||
<img src="__ROOT__/{{d.respondAnnex[r]}}" class="annex">
|
||||
{{# } }}
|
||||
{{# }else{ }}
|
||||
无
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 com-detail-title">应诉时间:</li>
|
||||
<li class="ui-col ui-col-75">{{d.respondTime}}</li>
|
||||
</ul>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<ul class="ui-row com-detail-box">
|
||||
<li class="ui-col ui-col-100 com-detail-big-title">仲裁信息【
|
||||
{{# if(d.complainStatus==0){ }}
|
||||
等待处理
|
||||
{{# }else if(d.complainStatus==1){ }}
|
||||
等待应诉人回应
|
||||
{{# }else if(d.complainStatus==2 || d.complainStatus==3){ }}
|
||||
等待仲裁
|
||||
{{# }else if(d.complainStatus==4){ }}
|
||||
已仲裁
|
||||
{{# } }}
|
||||
】</li>
|
||||
|
||||
{{# if(d.complainStatus==4){ }}
|
||||
<li class="ui-col ui-col-25 com-detail-title">仲裁结果:</li>
|
||||
<li class="ui-col ui-col-75">{{d.finalResult}}</li>
|
||||
|
||||
<li class="ui-col ui-col-25 com-detail-title">仲裁时间:</li>
|
||||
<li class="ui-col ui-col-75">{{d.finalResultTime}}</li>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 分类层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title"><span>投诉详情</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="complainDetailBox">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/list_complains.js?v={$v}'></script>
|
||||
{php}if($datawx['status']==1){ {/php}
|
||||
<script src="{:request()->scheme()}://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
||||
<script>
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: '<?php echo $we->appId;?>', //公众号的唯一标识
|
||||
timestamp: '<?php echo $datawx['timestamp'];?>', //生成签名的时间戳
|
||||
nonceStr: '<?php echo $datawx['noncestr'];?>', //生成签名的随机串
|
||||
signature: '<?php echo $datawx['signature'];?>',//签名
|
||||
jsApiList: [ //需要使用的JS接口
|
||||
'previewImage',
|
||||
]
|
||||
});
|
||||
</script>
|
||||
{php} } {/php}
|
||||
{/block}
|
102
hyhproject/wechat2/view/default/users/orders/list_complains.js
Executable file
102
hyhproject/wechat2/view/default/users/orders/list_complains.js
Executable file
@ -0,0 +1,102 @@
|
||||
jQuery.noConflict();
|
||||
// 获取订单列表
|
||||
function getComplainList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/orderComplains/complainByPage'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('complainList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#complain-list').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-complaint.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无投诉信息</p>';
|
||||
html += '</div>';
|
||||
$('#complain-list').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getComplainList();
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
$("#frame").css('top',0);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getComplainList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
function complainDetail(cId){
|
||||
$.post(WST.U('wechat/orderComplains/getComplainDetail'),{'id':cId},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json){
|
||||
var gettpl = document.getElementById('complainDetail').innerHTML;
|
||||
laytpl(gettpl).render(json, function(html){
|
||||
// 写入数据
|
||||
$('#complainDetailBox').html(html);
|
||||
// 设置滚动条
|
||||
var screenH = WST.pageHeight();
|
||||
var titleH = $('#frame').find('.title').height();
|
||||
var contentH = $('#complainDetailBox').height();
|
||||
|
||||
if(screenH-titleH < contentH){
|
||||
$('#complainDetailBox').css('height',screenH-titleH);
|
||||
}
|
||||
// 展示弹出层
|
||||
dataShow();
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
function getImg(obj){
|
||||
var url = 'http://'+window.location.host+$(obj).attr('src');
|
||||
var imgUrls = '';
|
||||
$('.imgurl').each(function(){
|
||||
imgUrls += "'http://"+window.location.host+$(this).attr('src') + "',";
|
||||
});
|
||||
//图片预览
|
||||
wx.previewImage({
|
||||
current: url,
|
||||
urls: [
|
||||
url
|
||||
]
|
||||
});
|
||||
}
|
172
hyhproject/wechat2/view/default/users/orders/orders_appraises.html
Executable file
172
hyhproject/wechat2/view/default/users/orders/orders_appraises.html
Executable file
@ -0,0 +1,172 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}商品评价 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders_appraises.css?v={$v}">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title='商品评价'{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$oId}" id="oId" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="ui-row-flex item-head">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex shop"><i></i>{$data['shopName']}</div>
|
||||
</div>
|
||||
{volist name="data['Rows']" id="g"}
|
||||
<div class="ui-row-flex border-b g-item">
|
||||
<div class="ui-col">
|
||||
<div class="g-Img j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="javascript:WST.intoGoods({$g['goodsId']});">
|
||||
<img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{:WSTImg($g['goodsImg'],3)}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 g-gInfo">
|
||||
<p class="g-gName ui-nowrap-multi">{$g['goodsName']}</p>
|
||||
<p class="g-gSpec ui-nowrap-flex">{if($g['goodsSpecNames'])}规格:{$g['goodsSpecNames']}{/if}</p>
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;">
|
||||
{if ($g['appraise']!='')}
|
||||
<span class="appraise" onclick="appraise({$g.goodsId},{$g['goodsSpecId'] ?? 0},{$g.id},this)"></span>
|
||||
{else /}
|
||||
<span class="appraise" onclick="appraise({$g.goodsId},{$g['goodsSpecId'] ?? 0},{$g.id},this)"></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div id="appBox_{$g.id}"></div>
|
||||
{/volist}
|
||||
<script id="appraises-box" type="text/html">
|
||||
<ul class="ui-row appraise-box">
|
||||
<li class="ui-col ui-col-25 appraise-title">商品名称</li>
|
||||
<li class="ui-col ui-col-75 ui-nowrap-multi appraise-name">
|
||||
{{d.goodsName}}
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 appraise-title" style="height: 25px;line-height:25px;">商品评分</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-80">
|
||||
{{# if(d.goodsScore!=''){ }}
|
||||
{{# for(var i=0;i<d.goodsScore;i++){ }}
|
||||
<span class="start-on"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# for(var j=0;j<5-d.goodsScore;j++){ }}
|
||||
<span class="start-not"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# }else{ }}
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-20 score" id="goodsScore" score="{{(d.timeScore!='')?d.timeScore:'0'}}" style="height: 25px;line-height:25px;">{{(d.goodsScore!='')?d.goodsScore:'0'}}分</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 appraise-title" style="height: 25px;line-height:25px;">服务评分</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-80">
|
||||
{{# if(d.serviceScore!=''){ }}
|
||||
{{# for(var i=0;i<d.serviceScore;i++){ }}
|
||||
<span class="start-on"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# for(var j=0;j<5-d.serviceScore;j++){ }}
|
||||
<span class="start-not"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# }else{ }}
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-20 score" id="serviceScore" score="{{(d.timeScore!='')?d.timeScore:'0'}}" style="height: 25px;line-height:25px;">{{(d.serviceScore!='')?d.serviceScore:'0'}}分</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="ui-col ui-col-25 appraise-title" style="height: 25px;line-height:25px;">时效评分</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
<ul class="ui-row">
|
||||
<li class="ui-col ui-col-80">
|
||||
{{# if(d.timeScore!=''){ }}
|
||||
{{# for(var i=0;i<d.timeScore;i++){ }}
|
||||
<span class="start-on"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# for(var j=0;j<5-d.timeScore;j++){ }}
|
||||
<span class="start-not"></span>
|
||||
{{# } }}
|
||||
|
||||
{{# }else{ }}
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
<span class="start-not" onclick="clickStar(this)"></span>
|
||||
{{# } }}
|
||||
</li>
|
||||
<li class="ui-col ui-col-20 score" id="timeScore" score="{{(d.timeScore!='')?d.timeScore:'0'}}" style="height: 25px;line-height:25px;">{{(d.timeScore!='')?d.timeScore:'0'}}分</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{{# if(d.content==''){ }}
|
||||
<li class="ui-col" style="padding:10px">
|
||||
<textarea class="appraisesContent" id="content"></textarea>
|
||||
</li>
|
||||
<div class="ui-col uploadfile-box">
|
||||
<ul class="complainFileBox" id="edit_chart">
|
||||
</ul>
|
||||
<div id="filePicker" style='margin-left:10px;width:250px;overflow:hidden;height:35px;font-size:.13rem;'>上传附件(最多5张)</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="ui-btn-wrap post-btn">
|
||||
<button class="ui-btn-lg ui-btn-danger" onclick="javascript:saveAppr({{d.goodsId}},{{d.goodsSpecId}},{{d.orderGoodsId}});">提交</button>
|
||||
</div>
|
||||
{{# }else{ }}
|
||||
<li class="ui-col ui-col-25 appraise-title">点评内容</li>
|
||||
<li class="ui-col ui-col-75">
|
||||
{{d.content}}
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 appraise-title" style="padding-top:15px;">评价附件</li>
|
||||
<li class="ui-col ui-col-75" style="margin-top:10px;margin-left:-10px;">
|
||||
{{# if(WST.blank(d.images)!=''){
|
||||
var img = d.images;
|
||||
}}
|
||||
<ul class="complainFileBox">
|
||||
{{# for(var g=0;g<img.length;++g){ }}
|
||||
<li><img src="__ROOT__/{{img[g]}}"> </li>
|
||||
{{# } }}
|
||||
</ul>
|
||||
{{# } }}
|
||||
</li>
|
||||
|
||||
{{# } }}
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div id="appraisesBox">
|
||||
</div>
|
||||
|
||||
</section>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_appraises.js?v={$v}'></script>
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
{/block}
|
115
hyhproject/wechat2/view/default/users/orders/orders_appraises.js
Executable file
115
hyhproject/wechat2/view/default/users/orders/orders_appraises.js
Executable file
@ -0,0 +1,115 @@
|
||||
jQuery.noConflict();
|
||||
//商品评价
|
||||
function clickStar(obj){
|
||||
var index = $(obj).index(); // 当前选中的分数
|
||||
$(obj).parent().find('span').each(function(k,v){
|
||||
if(k<=index){
|
||||
$(this).removeClass('start-not').addClass('start-on');
|
||||
}else{
|
||||
$(this).removeClass('start-on').addClass('start-not');
|
||||
}
|
||||
})
|
||||
$(obj).parent().siblings().html(index+1+'分');
|
||||
$(obj).parent().siblings().attr('score',index+1);
|
||||
}
|
||||
|
||||
function appraise(gId,sId,ogId,obj){
|
||||
|
||||
$('.appraise').removeClass('score');
|
||||
$(obj).addClass('score');
|
||||
var gName = $(obj).parent().parent().find('.g-gName').html();
|
||||
|
||||
var param = {};
|
||||
param.gId = gId;
|
||||
param.sId = sId;
|
||||
param.oId = $('#oId').val();
|
||||
param.orderGoodsId = ogId;
|
||||
$.post(WST.U('wechat/goodsappraises/getAppr'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
var gettpl = document.getElementById('appraises-box').innerHTML;
|
||||
json.data.goodsName = gName;
|
||||
json.data.goodsId = gId;
|
||||
json.data.goodsSpecId = sId;
|
||||
json.data.orderGoodsId = ogId;
|
||||
laytpl(gettpl).render(json.data, function(html){
|
||||
$('div[id^="appBox_"]').html(' ');
|
||||
$('#appBox_'+ogId).html(html);
|
||||
});
|
||||
if(json.data.serviceScore=='')userAppraiseInit();
|
||||
}else{
|
||||
WST.msg('请求出错','info');
|
||||
}
|
||||
})
|
||||
}
|
||||
function saveAppr(gId,sId,ogId){
|
||||
var content = $.trim($('#content').val());
|
||||
if(content==''){
|
||||
WST.msg('评价内容不能为空','info');
|
||||
return
|
||||
}
|
||||
var param = {};
|
||||
param.content = content;
|
||||
param.goodsId = gId;
|
||||
param.goodsSpecId = sId;
|
||||
param.orderId = $('#oId').val();
|
||||
param.timeScore = $('#timeScore').attr('score');
|
||||
param.goodsScore = $('#goodsScore').attr('score');
|
||||
param.serviceScore = $('#serviceScore').attr('score');
|
||||
param.orderGoodsId = ogId;
|
||||
|
||||
var imgs = [];
|
||||
// 是否有上传附件
|
||||
$('.imgSrc').each(function(k,v){
|
||||
imgs.push($(this).attr('v'));
|
||||
})
|
||||
imgs = imgs.join(',');
|
||||
if(imgs!='')
|
||||
param.images = imgs;
|
||||
|
||||
$.post(WST.U('wechat/goodsappraises/add'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){history.go(0);},1000);
|
||||
}else{
|
||||
WST.msg(json.msg);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
$(function(){
|
||||
WST.initFooter('user');
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
})
|
||||
|
||||
|
||||
/*************** 上传图片 *****************/
|
||||
function userAppraiseInit(){
|
||||
var uploader =WST.upload({
|
||||
pick:'#filePicker',
|
||||
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 = $("<li>"+
|
||||
"<img class='imgSrc' src='"+WST.conf.ROOT+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></li>");
|
||||
var btn = $('<div class="del-btn"><span class="ui-icon-delete"></span></div>');
|
||||
tdiv.append(btn);
|
||||
$('#edit_chart').append(tdiv);
|
||||
btn.on('click','span',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
185
hyhproject/wechat2/view/default/users/orders/orders_complains.html
Executable file
185
hyhproject/wechat2/view/default/users/orders/orders_complains.html
Executable file
@ -0,0 +1,185 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}订单投诉 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders_complains.css?v={$v}">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="useri_infos">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<a href="{:url('wechat/users/index')}"><i class="ui-icon-return"></i></a><h1 class="useri_info">订单投诉</h1>
|
||||
<i onclick="javascript:closeUploadArea()" style="display:none;font-size: 0.15rem;" id="upload_close">关闭</i>
|
||||
<a href="javascript:void(0);" style="display:none;float:right;font-size: 0.15rem;" id="upload_button">上传</a>
|
||||
</header>
|
||||
{/block}
|
||||
|
||||
{block name="main"}
|
||||
<sction class="ui-container" id="upload_modal">
|
||||
<div class="upload-modal">
|
||||
<div id="clipArea" class="clipArea"></div>
|
||||
<input type="hidden" id="imgData" autocomplete="off">
|
||||
</div>
|
||||
</sction>
|
||||
<input type="hidden" name="" value="" id="complainType" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$oId}" id="oId" autocomplete="off">
|
||||
<section class="ui-container" id="Ccontrainer">
|
||||
<script type="text/html" id="detailBox">
|
||||
<div id="detailBox">
|
||||
<div class="ui-row-flex ui-whitespace detail-head">
|
||||
<div class="ui-col ui-col ">订单号:{{d.orderNo}}</div>
|
||||
<div class="ui-col order-tr o-status">
|
||||
{{d.status}}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d.isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-row-flex-ver d-uInfo">
|
||||
<div class="ui-col">{{d.shopName}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{# for(var i=0;i<d.goods.length;i++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b d-goodsitme">
|
||||
<div class="ui-col">
|
||||
<div class="o-Img j-imgAdapt">
|
||||
<a href="javascript:void(0);" onclick="javascript:WST.intoGoods({{d.goods[i]['goodsId']}});">
|
||||
<img src="__ROOT__/{:WSTConf('CONF.goodsLogo')}" data-echo="__ROOT__/{{d.goods[i].goodsImg}}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi">{{d.goods[i].goodsName}}</p>
|
||||
|
||||
|
||||
<p class="o-gSpec d-gSpec">
|
||||
{{# if(d.goods[i].goodsSpecNames){ }}
|
||||
{{d.goods[i].goodsSpecNames.replace(/@@_@@/g,'<br />')}}
|
||||
{{# } }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;"><p class="price">¥ {{d.goods[i].goodsPrice}}</p><p> x {{d.goods[i].goodsNum}}</p></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<div class="ui-row-flex ui-whitespace d-item">
|
||||
<div class="ui-col ui-col">下单时间</div>
|
||||
<div class="ui-col ui-col order-tr">{{d.createTime}}</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace d-item" style="min-height:80px;">
|
||||
<div class="ui-col ui-col">商品总额</div>
|
||||
<div class="ui-col ui-col-4 order-tr">
|
||||
<p class="price">¥ {{d.goodsMoney}}</p>
|
||||
<p class="price"><span class="title">运费:</span>¥ {{d.deliverMoney}}</p>
|
||||
<p>实付款:<span class="price">¥ {{d.needPay}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<div id="orderDetail">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace d-item c-item">
|
||||
<div class="ui-col ui-col">投诉类型</div>
|
||||
<div class="ui-col ui-col-3 order-tr" onclick="dataShow(0)" id="complainText" >请选择投诉类型 > </div>
|
||||
</div>
|
||||
|
||||
<div class="ui-row-flex ui-whitespace ui-row-flex-ver c-box">
|
||||
<div class="ui-col c-title">投诉内容</div>
|
||||
<div class="ui-col c-content">
|
||||
<textarea id="complain"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="ui-col uploadfile-box">
|
||||
<ul class="complainFileBox" id="edit_chart">
|
||||
|
||||
</ul>
|
||||
|
||||
<div id="filePicker" style='margin-left:5px;width:250px;overflow:hidden;height:35px;font-size:.13rem;'>上传附件(最多5张)</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-btn-wrap" style="padding:5px;padding-bottom:5px;">
|
||||
<button class="ui-btn-lg ui-btn-danger c-btn" onclick="saveCom({$oId})">
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 订单详情层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title" id="boxTitle"><span>投诉类型</span><i class="ui-icon-close-page" onclick="javascript:dataHide(0);"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">承诺的没有做到</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='1' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">未按约定时间发货</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='2' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">未按成交价格进行交易</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='3' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="ui-row complain-item">
|
||||
<li class="ui-col ui-col-75">恶意骚扰</li>
|
||||
<li class="ui-col ui-col-25 chk-box">
|
||||
<label class="ui-checkbox">
|
||||
<input class="active" type="radio" name="data" value='4' >
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="ui-btn-wrap">
|
||||
<button class="ui-btn-lg ui-btn-danger c-btn" onclick="dataHide(1)">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_complains.js?v={$v}'></script>
|
||||
|
||||
|
||||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
|
||||
{/block}
|
122
hyhproject/wechat2/view/default/users/orders/orders_complains.js
Executable file
122
hyhproject/wechat2/view/default/users/orders/orders_complains.js
Executable file
@ -0,0 +1,122 @@
|
||||
jQuery.noConflict();
|
||||
$(function(){
|
||||
getOrderDetail();
|
||||
userComplainInit();
|
||||
})
|
||||
function getOrderDetail(){
|
||||
var oid = $('#oId').val();
|
||||
$.post(WST.U('wechat/orders/getDetail'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status!=-1){
|
||||
var gettpl1 = document.getElementById('detailBox').innerHTML;
|
||||
laytpl(gettpl1).render(json, function(html){
|
||||
$('#orderDetail').html(html);
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/*********************** 投诉类型 ****************************/
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide(0);").show();
|
||||
jQuery('#frame').animate({"bottom": 0}, 500);
|
||||
}
|
||||
function dataHide(type){
|
||||
if(type==1){
|
||||
var flag=false,chk;
|
||||
$('.active').each(function(k,v){
|
||||
if($(this).prop('checked')){
|
||||
flag = true
|
||||
$('#complainType').val($(this).val());
|
||||
chk = $(this).parent().parent().siblings().html();
|
||||
}
|
||||
});
|
||||
if(!flag){
|
||||
WST.msg('请选择投诉类型');
|
||||
return;
|
||||
}
|
||||
$('#complainText').html(chk+' >');
|
||||
}
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'bottom': '-'+dataHeight}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
function uploadFile(){
|
||||
$('#filePicker').trigger("click");
|
||||
}
|
||||
|
||||
|
||||
function saveCom(oId){
|
||||
// 验证投诉类型
|
||||
var type = $('#complainType').val();
|
||||
if(type==''){
|
||||
dataShow();
|
||||
WST.msg('请选择投诉类型','info');
|
||||
return;
|
||||
}
|
||||
var complainContent = $.trim($('#complain').val());
|
||||
if(complainContent==''){
|
||||
WST.msg('投诉内容不能为空','info');
|
||||
return;
|
||||
}
|
||||
var param = {};
|
||||
param.orderId = oId;
|
||||
param.complainType = type;
|
||||
param.complainContent = complainContent;
|
||||
|
||||
var imgs = [];
|
||||
// 是否有上传附件
|
||||
$('.imgSrc').each(function(k,v){
|
||||
imgs.push($(this).attr('v'));
|
||||
})
|
||||
imgs = imgs.join(',');
|
||||
if(imgs!='')
|
||||
param.complainAnnex = imgs;
|
||||
|
||||
$.post(WST.U('wechat/ordercomplains/saveComplain'),param,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(data.status){
|
||||
WST.msg('投诉成功请留意商城消息','success');
|
||||
setTimeout(function(){location.href=WST.U('wechat/ordercomplains/index')},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/*************** 上传图片 *****************/
|
||||
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 = $("<li>"+
|
||||
"<img class='imgSrc' src='"+WST.conf.ROOT+"/"+json.savePath+json.thumb+"' v='"+json.savePath+json.name+"'></li>");
|
||||
var btn = $('<div class="del-btn"><span class="ui-icon-delete"></span></div>');
|
||||
tdiv.append(btn);
|
||||
$('#edit_chart').append(tdiv);
|
||||
btn.on('click','span',function(){
|
||||
uploader.removeFile(file);
|
||||
$(this).parent().parent().remove();
|
||||
uploader.refresh();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
progress:function(rate){
|
||||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||||
}
|
||||
});
|
||||
}
|
485
hyhproject/wechat2/view/default/users/orders/orders_list.html
Executable file
485
hyhproject/wechat2/view/default/users/orders/orders_list.html
Executable file
@ -0,0 +1,485 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的订单 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive wst-header wst-headero">
|
||||
<i class="ui-icon-return" onclick="location.href='{:url('wechat/users/index')}'"></i><h1>我的订单</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$type}" id="type" autocomplete="off">
|
||||
<script id="shopList" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex ui-whitespace item-head">
|
||||
<div class="ui-col ui-col-2" onclick="javascript:WST.intoShops({{d[i].shopId}});"><p class="ui-nowrap-flex"><i class="shopicon"></i>{{d[i].shopName}}</p></div>
|
||||
<div class="ui-col order-tr o-status">
|
||||
{{ d[i].status }}
|
||||
{{# if($.inArray(d[i].orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d[i].payType==1 && d[i].isPay==1) { }}
|
||||
{{# if(d[i].isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# for(var g=0;g<d[i].list.length;g++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b" onclick="getOrderDetail({{d[i].orderId}})">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{{d[i].list[g].goodsImg}}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi ui-whitespace">{{d[i].list[g].goodsName}}</p>
|
||||
|
||||
{{# if(d[i].list[g].goodsSpecNames){ }}
|
||||
<p class="o-gSpec ui-nowrap-flex ui-whitespace">规格:{{d[i].list[g].goodsSpecNames}}</p>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;">
|
||||
{{# if(d[i].list[g].goodsCode=='gift'){ }}
|
||||
【赠品】
|
||||
{{# }else{ }}
|
||||
<p>¥ {{d[i].list[g].goodsPrice}}</p><p>x {{d[i].list[g].goodsNum}}</p>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
<div class="ui-btn-wrap" style="padding:5px 0px;">
|
||||
{{# if(d[i].orderCodeTitle!=""){ }}
|
||||
<span class="order_from">{{d[i].orderCodeTitle}}</span>
|
||||
{{# } }}
|
||||
<div class="o-oListMoney">
|
||||
订单总价:<span>¥ {{d[i].realTotalMoney}}</span>
|
||||
</div>
|
||||
{{# if(d[i].orderStatus==-2){ }}
|
||||
<button class="ui-btn o-btn" onclick="choicePay({{d[i].orderNo}},0);">
|
||||
立即付款
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==0 && d[i].noticeDeliver==0 ){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="WST.dialog('您确定要提醒发货吗?','noticeDeliver({{d[i].orderId}})')">
|
||||
提醒发货
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==-2 || d[i].orderStatus==0){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="showCancelBox('cancelOrder({{d[i].orderId}})')">
|
||||
取消订单
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if((d[i].orderStatus!=-1 || d[i].orderStatus==1) && d[i].orderStatus!=-2 && d[i].isComplain==0 ){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="complain({{d[i].orderId}})">
|
||||
投诉
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==2 && d[i].isAppraise==0) { }}
|
||||
<button class="ui-btn o-btn" onclick="toAppr({{d[i].orderId}})">
|
||||
评价
|
||||
</button>
|
||||
{{# } }}
|
||||
{{# if(d[i].isAppraise==1){ }}
|
||||
<button class="ui-btn o-btn" onclick="toAppr({{d[i].orderId}})">
|
||||
查看评价
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
|
||||
{{# if((d[i].allowRefund==1) && (d[i].orderStatus==-1 || d[i].orderStatus==-3)){ }}
|
||||
<button class="ui-btn o-btn" onclick="showRefundBox({{d[i].orderId}})">
|
||||
申请退款
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
|
||||
{{# if(d[i].orderStatus==1){ }}
|
||||
<button class="ui-btn o-btn o-cancel-btn" onclick="showRejectBox('rejectOrder({{d[i].orderId}})')">
|
||||
拒收
|
||||
</button>
|
||||
<button class="ui-btn o-btn" onclick="WST.dialog('你确定已收货吗?','receive({{d[i].orderId}})')">
|
||||
确认收货
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{ d[i]['hook']?d[i]['hook']:"" }}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<section class="ui-container" id="shopBox">
|
||||
<div class="ui-tab">
|
||||
<ul class="ui-tab-nav order-tab">
|
||||
<li class="tab-item {if $type==''}tab-curr{/if}" type="" >全部</li>
|
||||
<li class="tab-item {if $type=='waitPay'}tab-curr{/if}" type="waitPay" >待付款</li>
|
||||
<li class="tab-item {if $type=='waitDeliver'}tab-curr{/if}" type="waitDeliver" >待发货</li>
|
||||
<li class="tab-item {if $type=='waitReceive'}tab-curr{/if}" type="waitReceive" >待收货</li>
|
||||
<li class="tab-item {if $type=='waitAppraise'}tab-curr{/if}" type="waitAppraise" >待评价</li>
|
||||
<li class="tab-item {if $type=='finish'}tab-curr{/if}" type="finish" >已完成</li>
|
||||
<li class="tab-item {if $type=='abnormal'}tab-curr{/if}" type="abnormal" >取消拒收</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="order-box">
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{:hook('wechatDocumentOrderList')}
|
||||
<script type="text/html" id="detailBox">
|
||||
<div id="detailBox">
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
{{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex">
|
||||
{{# if(d.payType==1) { }}
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>待付款</p></div>
|
||||
{{# } }}
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>待发货</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>已发货</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.orderStatus==2){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>已收货</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1 && d.payType==1 && d.isPay==1){ }}
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>卖家申请退款</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.refundStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>商家申请退款处理</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.refundStatus==2) { }} class="active"{{# } }}></span>
|
||||
<span {{# if(d.refundStatus==2) { }} class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.refundStatus==2) { }} active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>退款完成</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单状态:</span>
|
||||
<span class="o-status">{{d.status}}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d.payType==1 && d.isPay==1) { }}
|
||||
{{# if(d.isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单编号:</span>{{d.orderNo}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">下单时间:</span>{{d.createTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-head">
|
||||
{{# if(d.userName){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">收货人:</span>{{d.userName}} <span class="d-utel">{{d.userPhone}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">收货地址:</span><span class="d-uaddr">{{d.userAddress}}<i></i></span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">支付信息:</span>{{d.payInfo}}</div>
|
||||
</div>
|
||||
{{# if(d.payTime){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">支付时间:</span>{{d.payTime}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">配送信息:</span>{{d.deliverInfo}}</div>
|
||||
</div>
|
||||
{{# if(WST.blank(d.expressNo)!=''){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">快递公司:</span>{{d.expressName}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">快递号:</span>{{d.expressNo}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票信息:</span>{{# if(d.isInvoice==1) { }}需要{{# } else{ }}不需要{{# } }}</div>
|
||||
</div>
|
||||
{{# if(d.isInvoice==1) { }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票抬头:</span>{{d.invoiceClient}}</div>
|
||||
</div>
|
||||
{{#
|
||||
var inv_json = JSON.parse(d.invoiceJson);
|
||||
var inv_code = (inv_json!=null && inv_json.invoiceCode!=undefined)?inv_json.invoiceCode:'';
|
||||
if(inv_json!=null && inv_json.type!=undefined && inv_json.type==0){
|
||||
}}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票税号:</span>{{inv_code}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单备注:</span>{{d.orderRemarks}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# if(d.isRefund==1){ }}
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款金额:</span>¥ {{d.backMoney}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款备注:</span>{{d.refundRemark}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款时间:</span>{{d.refundTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex o-shops">
|
||||
<div class="ui-col ui-col wst-or-term"><p class="shops" onclick="javascript:WST.intoShops({{d.shopId}});"><i></i>{{d.shopName}}<p></div>
|
||||
</div>
|
||||
{{# for(var i=0;i<d.goods.length;i++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b d-goodsitme" onclick="javascript:WST.intoGoods({{d.goods[i].goodsId}})">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{{d.goods[i].goodsImg}}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi ui-whitespace">{{d.goods[i].goodsName}}</p>
|
||||
<p class="o-gSpec d-gSpec">
|
||||
{{# if(d.goods[i].goodsSpecNames){ }}
|
||||
{{d.goods[i].goodsSpecNames.replace(/@@_@@/g,'<br />')}}
|
||||
{{# } }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;">
|
||||
{{# if(d.goods[i].goodsCode=='gift'){ }}
|
||||
【赠品】
|
||||
{{# }else{ }}
|
||||
<p>¥ {{d.goods[i].goodsPrice}}</p><p>x {{d.goods[i].goodsNum}}</p>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
{{# if(d.goods[i].goodsType==1 && d.orderStatus==2){ }}
|
||||
{{# for(var e=0;e<d.goods[i].extraJson.length;e++){ }}
|
||||
<div class="ui-row-flex ui-row-flex-ver d-uInfo">
|
||||
<div class="ui-col">
|
||||
<p>卡券号:{{d.goods[i].extraJson[e].cardNo}}</p>
|
||||
<p>卡券密码:{{d.goods[i].extraJson[e].cardPwd}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">获得积分</span><span class="o-status2">{{d.orderScore}} 个</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">商品总额</span><span class="o-status2">¥ {{d.goodsMoney}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">运费</span><span class="o-status2">¥ {{d.deliverMoney}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">积分抵扣金额</span><span class="o-status2">¥ -{{d.scoreMoney}}</span></div>
|
||||
</div>
|
||||
{{# if(d.useScore>0){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">使用积分数</span><span class="o-status2">{{d.useScore}} 个</span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{ d['hook']?d['hook']:"" }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term2"><span class="wst-or-describe2">实付款</span><span class="o-status2"><span style="font-size:0.13rem;">¥ </span>{{d.realTotalMoney}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 订单详情层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title" id="boxTitle"><span id="wordTitle">订单详情</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/* 退款层 */}
|
||||
<div class="wst-fr-box" id="refundFrame">
|
||||
<div class="title"><span>申请退款</span><i class="ui-icon-close-page" onclick="javascript:reFundDataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="refund-content">
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex" style="padding:10px;border-bottom:RGB(242,242,242) 2px dashed;">
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>买家申请退款</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block"></i></p>
|
||||
<div class="wst-clear"></div></p><p>商家申请退款处理</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block"></i></p>
|
||||
<div class="wst-clear"></div></p><p>退款完成</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-or-refund">
|
||||
<p class="prompt">请选择取消订单申请退款的原因,以便我们能更好的为您服务。</p>
|
||||
<div class="term">
|
||||
<span class="sign">*</span>退款原因:
|
||||
<select id='refundReason' onchange='javascript:changeRefundType(this.value)'>
|
||||
{volist name=":WSTDatas('REFUND_TYPE')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="term">
|
||||
<span class="sign">*</span>退款金额: <input type='number' id='money' maxLength='10' onkeyup="javascript:WST.isChinese(this,1)" autocomplete="off">
|
||||
</div>
|
||||
<p class="prompt">(金额不能超过<font color='red' id="realTotalMoney">0</font>,<span id="useScore">0</span>个积分抵扣<font color='red' id="scoreMoney">¥ 0</font>)</p>
|
||||
<div class="term">
|
||||
<div id='refundTr' style="width:99%;display:none;" >
|
||||
<span class="sign">*</span>其他原因
|
||||
<textarea id='refundContent' style='width:100%;height:80px;padding: 5px;' maxLength='200'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<p class="cancel-btn-box ui-flex ui-flex-pack-center">
|
||||
<button id="wst-event8" type="button" class="ui-btn-s wst-dialog-b2">提交申请退款</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
<div class="ui-dialog" id="cancelBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
<div class="ui-dialog-bd-title">请选择您取消订单的原因:</div>
|
||||
<select id='reason'>
|
||||
{volist name=":WSTDatas('ORDER_CANCEL')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
|
||||
<p class="cancel-btn-box">
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event0" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-dialog" id="rejectBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
<div class="ui-dialog-bd-title">请选择您拒收订单的原因:</div>
|
||||
|
||||
<select id='reject' onchange='javascript:changeRejectType(this.value)'>
|
||||
{volist name=":WSTDatas('ORDER_REJECT')" id="vo"}
|
||||
<option value='{$vo["dataVal"]}'>{$vo["dataName"]}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<br />
|
||||
<div id='rejectTr' style='display:none'>
|
||||
原因<font color='red'>*</font>:
|
||||
<textarea id='content' style='width:99%;height:80px;' maxLength='200'></textarea>
|
||||
</div>
|
||||
|
||||
<p class="cancel-btn-box">
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event3" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
<script>
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getOrderList();
|
||||
WST.initFooter('user');
|
||||
backPrevPage(WST.U('wechat/users/index'));
|
||||
// Tab切换卡
|
||||
$('.tab-item').click(function(){
|
||||
$(this).addClass('tab-curr').siblings().removeClass('tab-curr');
|
||||
var type = $(this).attr('type');
|
||||
$('#type').val(type);
|
||||
reFlashList();
|
||||
});
|
||||
// 弹出层
|
||||
var w = WST.pageWidth();
|
||||
$("#frame").css('top',0);
|
||||
$("#frame").css('right',-w);
|
||||
$("#refundFrame").css('top',0);
|
||||
$("#refundFrame").css('right',-w);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getOrderList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
321
hyhproject/wechat2/view/default/users/orders/orders_list.js
Executable file
321
hyhproject/wechat2/view/default/users/orders/orders_list.js
Executable file
@ -0,0 +1,321 @@
|
||||
jQuery.noConflict();
|
||||
// 提醒发货
|
||||
function noticeDeliver(id){
|
||||
hideDialog('#wst-di-prompt');
|
||||
$.post(WST.U('wechat/orders/noticeDeliver'),{id:id},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
reFlashList();// 刷新列表
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取订单列表
|
||||
function getOrderList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.type = $('#type').val();
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/orders/getOrderList'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('shopList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#order-box').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-order.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关订单</p>';
|
||||
html += '<button class="ui-btn-s" onclick="javascript:WST.intoIndex();">去逛逛</button>';
|
||||
html += '</div>';
|
||||
$('#order-box').html(html);
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
|
||||
// 刷新列表页
|
||||
function reFlashList(){
|
||||
$('#currPage').val('0');
|
||||
$('#order-box').html(' ');
|
||||
getOrderList();
|
||||
}
|
||||
|
||||
function showCancelBox(event){
|
||||
$("#wst-event0").attr("onclick","javascript:"+event);
|
||||
$("#cancelBox").dialog("show");
|
||||
}
|
||||
// 取消订单
|
||||
function cancelOrder(oid){
|
||||
hideDialog('#cancelBox');
|
||||
$.post(WST.U('wechat/orders/cancellation'),{id:oid,reason:$('#reason').val()},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#order-box').html(' ');
|
||||
reFlashList();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 拒收
|
||||
function showRejectBox(event){
|
||||
$("#wst-event3").attr("onclick","javascript:"+event);
|
||||
$("#rejectBox").dialog("show");
|
||||
}
|
||||
|
||||
function rejectOrder(oid){
|
||||
var param = {};
|
||||
param.id=oid;
|
||||
param.reason=$('#reject').val();
|
||||
param.content=$('#content').val();
|
||||
if($('reject').val()==10000){
|
||||
var content = $.trim($('#content').val());
|
||||
if(content == '')
|
||||
WST.msg('请输入拒收原因','info');
|
||||
return;
|
||||
}
|
||||
|
||||
$.post(WST.U('wechat/orders/reject'),param,function(data){
|
||||
|
||||
hideDialog('#rejectBox');
|
||||
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$('#content').val(' ');
|
||||
reFlashList();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 退款
|
||||
function showRefundBox(id){
|
||||
// 重置表单
|
||||
$('#refundReason').val(1);
|
||||
$('#refundContent').html(' ');
|
||||
$('#money').val(' ');
|
||||
$('#refundTr').hide();
|
||||
$.post(WST.U('wechat/orders/getRefund'),{id:id},function(data){
|
||||
$('#realTotalMoney').html('¥'+data.realTotalMoney);
|
||||
$('#useScore').html(data.useScore);
|
||||
$('#scoreMoney').html('¥ '+data.scoreMoney);
|
||||
// 弹出层滚动条
|
||||
var clientH = WST.pageHeight();// 屏幕高度
|
||||
var boxheadH = $('#refund-boxTitle').height();// 弹出层标题高度
|
||||
var contentH = $('#refund-content').height(); // 弹出层内容高度
|
||||
$('#refund-content').css('height',clientH-boxheadH+'px');
|
||||
$("#wst-event8").attr("onclick","javascript:refund("+id+")");
|
||||
reFundDataShow();
|
||||
})
|
||||
}
|
||||
function changeRefundType(v){
|
||||
if(v==10000){
|
||||
$('#refundTr').show();
|
||||
}else{
|
||||
$('#refundTr').hide();
|
||||
}
|
||||
}
|
||||
//弹框
|
||||
function reFundDataHide(){
|
||||
$('#shopBox').show();
|
||||
var dataHeight = $("#refundFrame").css('height');
|
||||
var dataWidth = $("#refundFrame").css('width');
|
||||
jQuery('#refundFrame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
function reFundDataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:reFundDataHide();").show();
|
||||
jQuery('#refundFrame').animate({"right": 0}, 500);
|
||||
setTimeout(function(){$('#shopBox').hide();},600)
|
||||
}
|
||||
// 退款
|
||||
function refund(id){
|
||||
var params = {};
|
||||
params.reason = $.trim($('#refundReason').val());
|
||||
params.content = $.trim($('#refundContent').val());
|
||||
params.money = $.trim($('#money').val());
|
||||
params.id = id;
|
||||
if(params.money<0 || params.money==''){
|
||||
WST.msg('无效的退款金额','info');
|
||||
return;
|
||||
}
|
||||
if(params.reason==10000){
|
||||
var content = $.trim($('#refundContent').val());
|
||||
if(content == ''){
|
||||
WST.msg('请输入原因','info');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$.post(WST.U('wechat/orderrefunds/refund'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg('申请退款成功','success');
|
||||
history.go(0);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function changeRejectType(v){
|
||||
if(v==10000){
|
||||
$('#rejectTr').show();
|
||||
}else{
|
||||
$('#rejectTr').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 隐藏对话框
|
||||
function hideDialog(id){
|
||||
$(id).dialog("hide");
|
||||
}
|
||||
|
||||
// 确认收货
|
||||
function receive(oid){
|
||||
hideDialog('#wst-di-prompt');
|
||||
$.post(WST.U('wechat/orders/receive'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
reFlashList();// 刷新列表
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*********************** 订单详情 ****************************/
|
||||
//弹框
|
||||
function dataShow(title){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
setTimeout(function(){$('#shopBox').hide();},600)
|
||||
$('#wordTitle').html(title);
|
||||
}
|
||||
function dataHide(){
|
||||
$('#shopBox').show();
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getOrderDetail(oid){
|
||||
$.post(WST.U('wechat/orders/getDetail'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status!=-1){
|
||||
var gettpl1 = document.getElementById('detailBox').innerHTML;
|
||||
laytpl(gettpl1).render(json, function(html){
|
||||
$('#content').html(html);
|
||||
// 弹出层滚动条
|
||||
var clientH = WST.pageHeight();// 屏幕高度
|
||||
var boxheadH = $('#boxTitle').height();// 弹出层标题高度
|
||||
var contentH = $('#content').height(); // 弹出层内容高度
|
||||
$('#content').css('height',clientH-boxheadH+'px');
|
||||
dataShow('订单详情');
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
// 跳转到评价页
|
||||
function toAppr(oid){
|
||||
location.href=WST.U('wechat/orders/orderappraise',{'oId':oid});
|
||||
}
|
||||
// 投诉
|
||||
function complain(oid){
|
||||
location.href=WST.U('wechat/ordercomplains/complain',{'oId':oid});
|
||||
}
|
||||
|
||||
//余额支付
|
||||
function walletPay(type){
|
||||
var payPwd = $('#payPwd').val();
|
||||
if(!payPwd){
|
||||
WST.msg('请输入支付密码','info');
|
||||
return;
|
||||
}
|
||||
if(type==0){
|
||||
var payPwd2 = $('#payPwd2').val();
|
||||
if(payPwd2==''){
|
||||
WST.msg('确认密码不能为空','info');
|
||||
return false;
|
||||
}
|
||||
if(payPwd!=payPwd2){
|
||||
WST.msg('确认密码不一致','info');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
var payPwd = rsa.encrypt(payPwd);
|
||||
}
|
||||
var params = {};
|
||||
if(type==0){
|
||||
params.newPass = payPwd;
|
||||
$.post(WST.U('wechat/users/editpayPwd'),params,function(data,textStatus){
|
||||
WST.noload();
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.load('成功设置密码,<br>订单支付中···');
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
WST.load('正在核对密码···');
|
||||
}
|
||||
params.payPwd = payPwd;
|
||||
params.orderNo = $('#orderNo').val();
|
||||
params.isBatch = $('#isBatch').val();
|
||||
$('.wst-btn-dangerlo').attr('disabled', 'disabled');
|
||||
setTimeout(function(){
|
||||
$.post(WST.U('wechat/wallets/payByWallet'),params,function(data,textStatus){
|
||||
WST.noload();
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/orders/index');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
setTimeout(function(){
|
||||
$('.wst-btn-dangerlo').removeAttr('disabled');
|
||||
},2000);
|
||||
}
|
||||
});
|
||||
},1000);
|
||||
}
|
||||
//选择支付方式
|
||||
function choicePay(orderNo,isBatch){
|
||||
location.href=WST.U('wechat/orders/succeed',{'orderNo':orderNo,'isBatch':isBatch});
|
||||
}
|
||||
//跳转支付
|
||||
function toPay(orderNo,isBatch,n){
|
||||
if(n=='weixinpays'){
|
||||
location.href=WST.U('wechat/weixinpays/toPay',{'orderNo':orderNo,'isBatch':isBatch});
|
||||
}else if(n=='wallets'){
|
||||
location.href = WST.U('wechat/wallets/payment',{"orderNo":orderNo,'isBatch':isBatch});
|
||||
}
|
||||
}
|
115
hyhproject/wechat2/view/default/users/orders/orders_pay.html
Executable file
115
hyhproject/wechat2/view/default/users/orders/orders_pay.html
Executable file
@ -0,0 +1,115 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}
|
||||
{$payObj=='recharge'?"在线充值":"支付订单"}
|
||||
- {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header class="ui-header ui-header-positive wst-header">
|
||||
{if($payObj=='recharge')}
|
||||
<a class="ui-icon-return" href='{:Url('wechat/logmoneys/usermoneys')}'></a><h1>在线充值</h1>
|
||||
{else}
|
||||
<a class="ui-icon-return" href='{:Url('wechat/orders/index')}'></a><h1>支付订单</h1>
|
||||
{/if}
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container" id="shopBox">
|
||||
{if(empty($message))}
|
||||
{if($payObj=='recharge')}
|
||||
<div class="recharge-box">
|
||||
<div>钱包充值</div>
|
||||
<div class="paybox"><span class="wst-orders_prices">¥ {$needPay}</span></div>
|
||||
</div>
|
||||
{else}
|
||||
{volist name="$rs['list']" id="order"}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex item-head" onclick="getOrderDetail({{d[i].orderId}})">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex">订单号:{$order['orderNo']}<span style="float : right;">邮费:{$order['deliverMoney']}</span></div>
|
||||
</div>
|
||||
{volist name="$rs['goods'][$order['orderId']]" id="vo"}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{$vo['goodsImg']}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi">{$vo['goodsName']}</p>
|
||||
{if condition="count($vo['goodsSpecNames']) gt 0"}
|
||||
<p class="o-gSpec ui-nowrap-flex">规格:
|
||||
{volist name="$vo['goodsSpecNames']" id="spec"}
|
||||
{$spec}
|
||||
{/volist}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0"><p>¥ {$vo['goodsPrice']}</p><p>x {$vo['goodsNum']}</p></div>
|
||||
</div>
|
||||
{/volist}
|
||||
|
||||
<div class="ui-btn-wrap" style="text-align: right;padding:10px 0">
|
||||
<span class="wst-orders_pricet">总金额:<span class="wst-orders_prices">¥ <?php echo sprintf("%.2f", $rs['totalMoney']);?></span></span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{/volist}
|
||||
{/if}
|
||||
<div style="text-align: center;padding-top: 20px;">
|
||||
<button type="button" class="wst-btn-dangerlo" onclick="javascript:callpay();" style="width: 80%; display: inline-block;">确认支付</button>
|
||||
</div>
|
||||
</section>
|
||||
{else}
|
||||
<ul class="ui-row-flex wst-flexslp">
|
||||
<li class="ui-col ui-flex ui-flex-pack-center">
|
||||
<p>{$message}</p>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
{if(empty($message))}
|
||||
<script type="text/javascript">
|
||||
//调用微信JS api 支付
|
||||
function jsApiCall(){
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest',
|
||||
<?php echo $jsApiParameters; ?>,
|
||||
function(res){
|
||||
if(res.err_msg=="get_brand_wcpay_request:ok"){
|
||||
location.href = "{$returnUrl}";
|
||||
}
|
||||
}
|
||||
);
|
||||
setTimeout(function(){
|
||||
$('.wst-btn-dangerlo').removeAttr('disabled');
|
||||
},2000);
|
||||
}
|
||||
function callpay(){
|
||||
$('.wst-btn-dangerlo').attr('disabled', 'disabled');
|
||||
if (typeof WeixinJSBridge == "undefined"){
|
||||
if( document.addEventListener ){
|
||||
document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
|
||||
}else if (document.attachEvent){
|
||||
document.attachEvent('WeixinJSBridgeReady', jsApiCall);
|
||||
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
|
||||
}
|
||||
}else{
|
||||
jsApiCall();
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
{if($payObj=='recharge')}
|
||||
backPrevPage(WST.U('wechat/logmoneys/usermoneys'));
|
||||
{else}
|
||||
backPrevPage(WST.U('wechat/orders/index'));
|
||||
{/if}
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
27
hyhproject/wechat2/view/default/users/orders/orders_pay_list.html
Executable file
27
hyhproject/wechat2/view/default/users/orders/orders_pay_list.html
Executable file
@ -0,0 +1,27 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}选择支付方式 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>选择支付方式</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
<ul class="ui-list ui-list-text ui-list-link wst-pa-l">
|
||||
{volist name="$payments[1]" id="pa"}
|
||||
<li class="line" onclick="javascript:toPay({$orderNo},{$isBatch},'{$pa['payCode']}');">
|
||||
<span class="{$pa['payCode']}"></span><h5 class="ui-nowrap">{$pa['payName']}</h5>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
{/block}
|
87
hyhproject/wechat2/view/default/users/orders/orders_pay_wallets.html
Executable file
87
hyhproject/wechat2/view/default/users/orders/orders_pay_wallets.html
Executable file
@ -0,0 +1,87 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}支付订单 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<header class="ui-header ui-header-positive wst-header">
|
||||
<a class="ui-icon-return" href='{:Url('wechat/orders/index')}'></a><h1>支付订单</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
|
||||
{/* 大加载 */}
|
||||
<div class="ui-loading-block" id="Loadl">
|
||||
<div class="ui-loading-cnt">
|
||||
<i class="ui-loading-bright"></i>
|
||||
<p id="j-Loadl">正在加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
<section class="ui-container">
|
||||
{if(empty($message))}
|
||||
<input type="hidden" name="" value="{$data['orderNo']}" id="orderNo" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$data['isBatch']}" id="isBatch" autocomplete="off">
|
||||
{volist name="$rs['list']" id="order"}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex item-head">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex">订单号:{$order['orderNo']}<span style="float : right;">邮费:{$order['deliverMoney']}</span></div>
|
||||
</div>
|
||||
{volist name="$rs['goods'][$order['orderId']]" id="vo"}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{$vo['goodsImg']}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi">{$vo['goodsName']}</p>
|
||||
{if condition="count($vo['goodsSpecNames']) gt 0"}
|
||||
<p class="o-gSpec ui-nowrap-flex">规格:
|
||||
{volist name="$vo['goodsSpecNames']" id="spec"}
|
||||
{$spec}
|
||||
{/volist}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0"><p>¥ {$vo['goodsPrice']}</p><p>x {$vo['goodsNum']}</p></div>
|
||||
</div>
|
||||
{/volist}
|
||||
|
||||
<div class="ui-btn-wrap" style="text-align: right;padding:10px 0">
|
||||
<span class="wst-orders_pricet">总金额:<span class="wst-orders_prices">¥ <?php echo sprintf("%.2f", $rs['totalMoney']);?></span></span>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
{/volist}
|
||||
<div class="wst-wa-info">
|
||||
<p class="info">钱包余额:<span>¥ {$userMoney}</span>,待支付订单总额:<span>¥ {$needPay}</span></p>
|
||||
{if($payPwd==0)}
|
||||
<p class="pay-info">您尚未设置支付密码,请设置支付密码</p>
|
||||
<div class="pay">设置密码:<input type="password" id="payPwd" maxlength="6" autocomplete="off"></div>
|
||||
<div class="pay">确认密码:<input type="password" id="payPwd2" maxlength="6" autocomplete="off"></div>
|
||||
{else}
|
||||
<div class="pay">支付密码:<input type="password" id="payPwd" maxlength="6" autocomplete="off"></div>
|
||||
{/if}
|
||||
</div>
|
||||
{if($payPwd==1)}<div class="wst-wa-forget ui-whitespace"><a href="{:url('wechat/users/backPayPass')}">忘记密码?</a></div>{/if}
|
||||
<div style="text-align: center;">
|
||||
<button type="button" class="wst-btn-dangerlo" onclick="javascript:walletPay({$payPwd});" style="width: 80%; display: inline-block;">确认支付</button>
|
||||
</div>
|
||||
{else}
|
||||
<ul class="ui-row-flex wst-flexslp">
|
||||
<li class="ui-col ui-flex ui-flex-pack-center">
|
||||
<p>{$message}</p>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</section>
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/orders/orders_list.js?v={$v}'></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
backPrevPage(WST.U('wechat/orders/index'));
|
||||
});
|
||||
</script>
|
||||
{/block}
|
84
hyhproject/wechat2/view/default/users/recharge/recharge.html
Executable file
84
hyhproject/wechat2/view/default/users/recharge/recharge.html
Executable file
@ -0,0 +1,84 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的资金 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/recharge.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive wst-header">
|
||||
<i class="ui-icon-return" onclick="history.back()"></i><h1>充值</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
|
||||
<ul class="ui-grid-trisect">
|
||||
{volist name="chargeItems" id="item"}
|
||||
<li>
|
||||
<div class="wst-frame2 {$key} <?php echo ($key==0)?'j-selected':''; ?>" onclick="javascript:changeSelected({$item['id']},'itemId',this)">
|
||||
<div>
|
||||
{if condition="$item['giveMoney'] gt 0"}
|
||||
<div class='charge-doub'>充值 <span class="charge-money" id="needPay_{$item['id']}" sum="{$item['chargeMoney']}">{$item['chargeMoney']}</span> 元</div>
|
||||
<div>送 {$item['giveMoney']} 元</div>
|
||||
{else/}
|
||||
<div class='charge-alone'>充值 <span class="charge-money">{$item['chargeMoney']}</span> 元</div>
|
||||
{/if}
|
||||
</div>
|
||||
<i></i>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
<li >
|
||||
<div class="wst-frame2 " onclick="javascript:changeSelected(0,'itemId',this)">
|
||||
<div>
|
||||
<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:rechargeMoney(this.value)" maxlength="8">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
{php}
|
||||
$sum = 0;
|
||||
if($chargeItems){
|
||||
$sum = $chargeItems[0]['chargeMoney'];
|
||||
}
|
||||
{/php}
|
||||
<div class="wst-re-info">
|
||||
<p>当前余额<span class="balance">¥ <span>{$rs['userMoney']}</span></span></p>
|
||||
<p>充值金额<span class="balance">¥ <span id="rechargeMoney">{$sum}</span></span></p>
|
||||
</div>
|
||||
<div class="ui-form">
|
||||
{volist name="payments" id="payment" }
|
||||
<div class="ui-form-item ui-form-item-radio paytype-term">
|
||||
<label class="ui-checkbox" for="radio">
|
||||
<input type="radio" {if condition="$key eq 0"}checked{/if} name="payCode" value="{$payment['payCode']}">
|
||||
</label>
|
||||
<i class="{$payment['payCode']}"></i>
|
||||
<p>{$payment['payName']}</p>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
<div class="ui-btn-wrap">
|
||||
<button class="ui-btn-lg ui-btn-danger wst-re-button" onclick="toPay()">确认支付</button>
|
||||
</div>
|
||||
<div class="tips-box">
|
||||
<ul class="ui-row first-time">
|
||||
<li class="ui-col ui-col-100 ft-title"><i></i><span>充值说明:</span></li>
|
||||
<li class="ui-col ui-col-100 ft-item">1.充值金额和赠送金额只能用于购买商品,不能提现;</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="hidden" value="" id='itemId' class='j-ipt' />
|
||||
</section>
|
||||
{/block}
|
||||
|
||||
{block name="footer"}
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/recharge/recharge.js?v={$v}'></script>
|
||||
{/block}
|
45
hyhproject/wechat2/view/default/users/recharge/recharge.js
Executable file
45
hyhproject/wechat2/view/default/users/recharge/recharge.js
Executable file
@ -0,0 +1,45 @@
|
||||
jQuery.noConflict();
|
||||
function inEffect(obj,n){
|
||||
$("ul div").removeClass('j-selected');
|
||||
$(obj).addClass('j-selected');
|
||||
}
|
||||
function changeSelected(n,index,obj){
|
||||
$('#'+index).val(n);
|
||||
if(n==0){
|
||||
$(".j-charge-other").hide();
|
||||
$(".j-charge-money").show();
|
||||
var needPay = $("#needPay").val();
|
||||
|
||||
}else{
|
||||
$(".j-charge-other").show();
|
||||
$(".j-charge-money").hide();
|
||||
var needPay = $("#needPay_"+n).attr("sum");
|
||||
}
|
||||
rechargeMoney(needPay);
|
||||
inEffect(obj,2);
|
||||
}
|
||||
function rechargeMoney(n){
|
||||
$("#rechargeMoney").html(n);
|
||||
}
|
||||
|
||||
function toPay(){
|
||||
var params = {};
|
||||
params.payObj = "recharge";
|
||||
params.targetType = 0;
|
||||
params.needPay = $.trim($("#needPay").val());
|
||||
params.payCode = $("input[name='payCode']:checked").val();
|
||||
params.itemId = $.trim($("#itemId").val());
|
||||
if(params.itemId==0 && params.needPay<=0){
|
||||
WST.msg('请输入充值金额', 'info');
|
||||
return;
|
||||
}
|
||||
if(params.payCode==""){
|
||||
WST.msg('请先选择支付方式','info');
|
||||
return;
|
||||
}
|
||||
location.href = WST.U('wechat/weixinpays/toPay',params);
|
||||
}
|
||||
|
||||
$(function(){
|
||||
jQuery(".wst-frame2:first").click();
|
||||
});
|
27
hyhproject/wechat2/view/default/users/security/index.html
Executable file
27
hyhproject/wechat2/view/default/users/security/index.html
Executable file
@ -0,0 +1,27 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}账户安全 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "账户安全"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
<ul class="ui-list ui-list-text ui-list-link wst-se-l">
|
||||
<li class="line" onclick="javascript:inLogin();">
|
||||
<span class="pay"></span><h5 class="ui-nowrap">{if($user['loginPwd']==0)}设置{else}修改{/if}登录密码</h5></a>
|
||||
</li>
|
||||
<li class="line" onclick="javascript:inPay();">
|
||||
<span class="pay"></span><h5 class="ui-nowrap">{if($user['payPwd']==0)}设置{else}修改{/if}支付密码</h5></a>
|
||||
</li>
|
||||
<li onclick="javascript:inPhone();">
|
||||
<span class="phone"></span><h5 class="ui-nowrap">{if($user['userPhone']==0)}绑定{else}修改{/if}手机号码</h5>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
|
||||
{/block}
|
334
hyhproject/wechat2/view/default/users/security/security.js
Executable file
334
hyhproject/wechat2/view/default/users/security/security.js
Executable file
@ -0,0 +1,334 @@
|
||||
var time = 0;
|
||||
var isSend = false;
|
||||
$(document).ready(function(){
|
||||
WST.initFooter('user');
|
||||
});
|
||||
//修改登录密码
|
||||
function inLogin(){
|
||||
location.href = WST.U('wechat/users/editLoginPass');
|
||||
}
|
||||
function editLogin(type){
|
||||
if(type==1){
|
||||
var orloginPwd = $('#orloginPwd').val();
|
||||
if(orloginPwd==''){
|
||||
WST.msg('原密码不能为空','info');
|
||||
$('#orloginPwd').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var loginPwd = $('#loginPwd').val();
|
||||
var cologinPwd = $('#cologinPwd').val();
|
||||
if(loginPwd==''){
|
||||
WST.msg('新密码不能为空','info');
|
||||
$('#loginPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(cologinPwd==''){
|
||||
WST.msg('确认密码不能为空','info');
|
||||
$('#cologinPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(loginPwd.length < 6){
|
||||
WST.msg('请输入6位以上数字或者字母密码','info');
|
||||
$('#cologinPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(cologinPwd!=loginPwd){
|
||||
WST.msg('确认密码不一致','info');
|
||||
$('#cologinPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
if(type==1)var orloginPwd = rsa.encrypt(orloginPwd);
|
||||
var loginPwd = rsa.encrypt(loginPwd);
|
||||
}
|
||||
WST.load('设置中···');
|
||||
var param = {};
|
||||
param.type = type;
|
||||
if(type==1)param.oldPass = orloginPwd;
|
||||
param.newPass = loginPwd;
|
||||
$('#modifyPwd').addClass("active").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/users/editloginPwd'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/users/security');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
$('#modifyPwd').removeAttr('disabled').removeClass("active");
|
||||
}
|
||||
WST.noload();
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
//修改支付密码
|
||||
function inPay(){
|
||||
location.href = WST.U('wechat/users/editPayPass');
|
||||
}
|
||||
function editPay(type){
|
||||
if(type==1){
|
||||
var orpayPwd = $('#orpayPwd').val();
|
||||
if(orpayPwd==''){
|
||||
WST.msg('原密码不能为空','info');
|
||||
$('#orpayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var payPwd = $('#payPwd').val();
|
||||
var copayPwd = $('#copayPwd').val();
|
||||
if(payPwd==''){
|
||||
WST.msg('新密码不能为空','info');
|
||||
$('#payPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(copayPwd==''){
|
||||
WST.msg('确认密码不能为空','info');
|
||||
$('#copayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(payPwd.length !=6){
|
||||
WST.msg('请输入6位数字密码','info');
|
||||
$('#copayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(copayPwd!=payPwd){
|
||||
WST.msg('确认密码不一致','info');
|
||||
$('#copayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
if(type==1)var orpayPwd = rsa.encrypt(orpayPwd);
|
||||
var payPwd = rsa.encrypt(payPwd);
|
||||
}
|
||||
WST.load('设置中···');
|
||||
var param = {};
|
||||
param.type = type;
|
||||
if(type==1)param.oldPass = orpayPwd;
|
||||
param.newPass = payPwd;
|
||||
$('#modifyPwd').addClass("active").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/users/editpayPwd'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/users/security');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
$('#modifyPwd').removeAttr('disabled').removeClass("active");
|
||||
}
|
||||
WST.noload();
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
//找回支付密码
|
||||
function backpayCode(){
|
||||
if(WST.conf.SMS_VERFY==1){
|
||||
var smsVerfy = $('#smsVerfy').val();
|
||||
if(smsVerfy ==''){
|
||||
WST.msg('请输入验证码','info');
|
||||
$('#smsVerfy').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var param = {};
|
||||
param.smsVerfy = smsVerfy;
|
||||
if(isSend)return;
|
||||
isSend = true;
|
||||
$.post(WST.U('wechat/users/backpayCode'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
time = 120;
|
||||
$('#obtain').attr('disabled', 'disabled').html('120秒获取');
|
||||
var task = setInterval(function(){
|
||||
time--;
|
||||
$('#obtain').html(''+time+"秒获取");
|
||||
if(time==0){
|
||||
isSend = false;
|
||||
clearInterval(task);
|
||||
$('#obtain').removeAttr('disabled').html("重新发送");
|
||||
}
|
||||
},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
WST.getVerify("#verifyImg");
|
||||
isSend = false;
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
function backPaypwd(type){
|
||||
if(type==1){
|
||||
var payPwd = $('#payPwd').val();
|
||||
var copayPwd = $('#copayPwd').val();
|
||||
if(payPwd==''){
|
||||
WST.msg('新密码不能为空','info');
|
||||
$('#payPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(copayPwd==''){
|
||||
WST.msg('确认密码不能为空','info');
|
||||
$('#copayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(payPwd.length !=6){
|
||||
WST.msg('请输入6位数字密码','info');
|
||||
$('#copayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(copayPwd!=payPwd){
|
||||
WST.msg('确认密码不一致','info');
|
||||
$('#copayPwd').focus();
|
||||
return false;
|
||||
}
|
||||
if(window.conf.IS_CRYPTPWD==1){
|
||||
var public_key=$('#key').val();
|
||||
var exponent="10001";
|
||||
var rsa = new RSAKey();
|
||||
rsa.setPublic(public_key, exponent);
|
||||
var payPwd = rsa.encrypt(payPwd);
|
||||
}
|
||||
WST.load('设置中···');
|
||||
var param = {};
|
||||
param.newPass = payPwd;
|
||||
$('#modifyPwd').addClass("active").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/users/resetbackPay'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/users/security');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
$('#modifyPwd').removeAttr('disabled').removeClass("active");
|
||||
}
|
||||
WST.noload();
|
||||
data = json = null;
|
||||
});
|
||||
}else{
|
||||
var phoneCode = $('#phoneCode').val();
|
||||
if(phoneCode==''){
|
||||
WST.msg('请输入短信验证码','info');
|
||||
$('#phoneCode').focus();
|
||||
return false;
|
||||
}
|
||||
var param = {};
|
||||
param.phoneCode = phoneCode;
|
||||
$('#modifyPhone').addClass("active").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/users/verifybackPay'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/users/backPayPass');
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
$('#modifyPhone').removeAttr('disabled').removeClass("active");
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
//修改手机
|
||||
function inPhone(){
|
||||
location.href = WST.U('wechat/users/editPhone');
|
||||
}
|
||||
//发送短信
|
||||
function obtainCode(type){
|
||||
if(type==0){
|
||||
var userPhone = $('#userPhone').val();
|
||||
if(userPhone ==''){
|
||||
WST.msg('请输入手机号码','info');
|
||||
$('#userPhone').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(WST.conf.SMS_VERFY==1){
|
||||
var smsVerfy = $('#smsVerfy').val();
|
||||
if(smsVerfy ==''){
|
||||
WST.msg('请输入验证码','info');
|
||||
$('#smsVerfy').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var param = {};
|
||||
param.userPhone = userPhone;
|
||||
param.smsVerfy = smsVerfy;
|
||||
if(isSend)return;
|
||||
isSend = true;
|
||||
$.post(WST.U('wechat/users/'+((type==0)?"sendCodeTie":"sendCodeEdit")), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
time = 120;
|
||||
$('#obtain').attr('disabled', 'disabled').html('120秒获取');
|
||||
var task = setInterval(function(){
|
||||
time--;
|
||||
$('#obtain').html(''+time+"秒获取");
|
||||
if(time==0){
|
||||
isSend = false;
|
||||
clearInterval(task);
|
||||
$('#obtain').removeAttr('disabled').html("重新发送");
|
||||
}
|
||||
},1000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
WST.getVerify("#verifyImg");
|
||||
isSend = false;
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
//修改手机号码
|
||||
function editPhone(type){
|
||||
if(type==0){
|
||||
var userPhone = $('#userPhone').val();
|
||||
if(userPhone==''){
|
||||
WST.msg('手机号码不能为空','info');
|
||||
$('#userPhone').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var phoneCode = $('#phoneCode').val();
|
||||
if(phoneCode==''){
|
||||
WST.msg('请输入短信验证码','info');
|
||||
$('#phoneCode').focus();
|
||||
return false;
|
||||
}
|
||||
var param = {};
|
||||
param.phoneCode = phoneCode;
|
||||
$('#modifyPhone').addClass("active").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/users/'+((type==0)?"phoneEdit":"phoneEdito")), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
if(type==0){
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/users/security');
|
||||
},2000);
|
||||
}else{
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/users/editPhoneo');
|
||||
},2000);
|
||||
}
|
||||
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
$('#modifyPhone').removeAttr('disabled').removeClass("active");
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
64
hyhproject/wechat2/view/default/users/security/user_back_paypwd.html
Executable file
64
hyhproject/wechat2/view/default/users/security/user_back_paypwd.html
Executable file
@ -0,0 +1,64 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}找回支付密码 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "找回支付密码"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{/* 大加载 */}
|
||||
<div class="ui-loading-block" id="Loadl">
|
||||
<div class="ui-loading-cnt">
|
||||
<i class="ui-loading-bright"></i>
|
||||
<p id="j-Loadl">正在加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
{if($user['phoneType']==1)}
|
||||
<div class="wst-se-footer">
|
||||
<button id="modifyPhone" type="button" class="button" onclick="javascript:backPaypwd({$user['backType']});">{if($user['backType']==0)}下一步{else}确定{/if}</button>
|
||||
</div>
|
||||
{else}
|
||||
<div class="wst-se-footer">
|
||||
<button id="modifyPhone" type="button" class="button" onclick="javascript:inPhone();">去绑定手机号码</button>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
{if($user['backType']==1)}
|
||||
<div class="wst-se-pay">
|
||||
<div class="pay"><input id="payPwd" type="password" placeholder="新密码" maxlength="6"></div>
|
||||
<div class="pay"><input id="copayPwd" type="password" placeholder="确认密码" maxlength="6"></div>
|
||||
</div>
|
||||
{else}
|
||||
{if($user['phoneType']==1)}
|
||||
<div class="wst-se-pay">
|
||||
<div class="phone">您绑定的手机号码为:{$user['userPhone']}</div>
|
||||
{if(WSTConf('CONF.smsVerfy')==1)}
|
||||
<div class="verify">
|
||||
<input id="smsVerfy" type="text" placeholder="输入验证码" maxlength="10">
|
||||
<img id='verifyImg' src="{:url('wechat/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")'>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="verify">
|
||||
<input id="phoneCode" type="text" placeholder="输入短信验证码" maxlength="8">
|
||||
<button id="obtain" type="button" class="ui-btn-primary" onclick="javascript:backpayCode()">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<ul class="ui-row-flex wst-flexslp ui-whitespace">
|
||||
<li class="ui-col ui-flex ui-flex-pack-center">
|
||||
<p>对不起,你还未绑定手机号码,请去绑定手机号码。</p>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
{/if}
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
|
||||
{/block}
|
35
hyhproject/wechat2/view/default/users/security/user_login_pass.html
Executable file
35
hyhproject/wechat2/view/default/users/security/user_login_pass.html
Executable file
@ -0,0 +1,35 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}{if($user['loginPwd']==1)}修改{else}设置{/if}登录密码 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$user['loginPwd']==1?$Title = "修改登录密码":$Title = "设置登录密码"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{/* 大加载 */}
|
||||
<div class="ui-loading-block" id="Loadl">
|
||||
<div class="ui-loading-cnt">
|
||||
<i class="ui-loading-bright"></i>
|
||||
<p id="j-Loadl">正在加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-se-footer">
|
||||
<button id="modifyPwd" type="button" class="button" onclick="javascript:editLogin({$user['loginPwd']});">确定</button>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="wst-se-pay">
|
||||
{if($user['loginPwd']==1)}<div class="pay"><input id="orloginPwd" type="password" placeholder="原密码"></div>{/if}
|
||||
<div class="pay"><input id="loginPwd" type="password" placeholder="新密码"></div>
|
||||
<div class="pay"><input id="cologinPwd" type="password" placeholder="确认密码"></div>
|
||||
</div>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
|
||||
{/block}
|
36
hyhproject/wechat2/view/default/users/security/user_pay_pass.html
Executable file
36
hyhproject/wechat2/view/default/users/security/user_pay_pass.html
Executable file
@ -0,0 +1,36 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}{if($user['payPwd']==1)}修改{else}设置{/if}支付密码 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$user['payPwd']==1?$Title = "修改支付密码":$Title = "设置支付密码"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{/* 大加载 */}
|
||||
<div class="ui-loading-block" id="Loadl">
|
||||
<div class="ui-loading-cnt">
|
||||
<i class="ui-loading-bright"></i>
|
||||
<p id="j-Loadl">正在加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-se-footer">
|
||||
<button id="modifyPwd" type="button" class="button" onclick="javascript:editPay({$user['payPwd']});">确定</button>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="wst-se-pay">
|
||||
{if($user['payPwd']==1)}<div class="pay"><input id="orpayPwd" type="password" placeholder="原密码" maxlength="6"></div>{/if}
|
||||
<div class="pay"><input id="payPwd" type="password" placeholder="新密码" maxlength="6"></div>
|
||||
<div class="pay"><input id="copayPwd" type="password" placeholder="确认密码" maxlength="6"></div>
|
||||
</div>
|
||||
{if($user['payPwd']==1)}<p class="wst-se-back"><a href="{:url('wechat/users/backPayPass')}">忘记支付密码?</a></p>{/if}
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
|
||||
{/block}
|
45
hyhproject/wechat2/view/default/users/security/user_phone.html
Executable file
45
hyhproject/wechat2/view/default/users/security/user_phone.html
Executable file
@ -0,0 +1,45 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}{if($user['phoneType']==1)}修改{else}绑定{/if}手机号码 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/security.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$user['phoneType']==1?$Title = "修改手机号码":$Title = "绑定手机号码"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
{/* 大加载 */}
|
||||
<div class="ui-loading-block" id="Loadl">
|
||||
<div class="ui-loading-cnt">
|
||||
<i class="ui-loading-bright"></i>
|
||||
<p id="j-Loadl">正在加载中...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-se-footer">
|
||||
<button id="modifyPhone" type="button" class="button" onclick="javascript:editPhone({$user['phoneType']});">{if($user['phoneType']==1)}下一步{else}确定{/if}</button>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
<div class="wst-se-pay">
|
||||
{if($user['phoneType']==1)}
|
||||
<div class="phone">您绑定的手机号码为:{$user['userPhone']}</div>
|
||||
{else}
|
||||
<div class="pay"><input id="userPhone" type="tel" placeholder="手机号码"></div>
|
||||
{/if}
|
||||
{if(WSTConf('CONF.smsVerfy')==1)}
|
||||
<div class="verify">
|
||||
<input id="smsVerfy" type="text" placeholder="输入验证码" maxlength="10">
|
||||
<img id='verifyImg' src="{:url('wechat/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg")'>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="verify">
|
||||
<input id="phoneCode" type="text" placeholder="输入短信验证码" maxlength="8">
|
||||
<button id="obtain" type="button" class="ui-btn-primary" onclick="javascript:obtainCode({$user['phoneType']})">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/users/security/security.js?v={$v}'></script>
|
||||
{/block}
|
439
hyhproject/wechat2/view/default/users/sellerorders/orders_list.html
Executable file
439
hyhproject/wechat2/view/default/users/sellerorders/orders_list.html
Executable file
@ -0,0 +1,439 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的订单 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/orders.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<div id="info_list">
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive wst-header wst-headero">
|
||||
<i class="ui-icon-return" onclick="location.href='{:url('wechat/users/index')}'"></i><h1>我的订单</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$type}" id="type" autocomplete="off">
|
||||
|
||||
<script id="shopList" type="text/html">
|
||||
{{# for(var i = 0; i < d.length; i++){ }}
|
||||
<div class="order-item">
|
||||
<div class="ui-row-flex ui-whitespace item-head" onclick="getOrderDetail({{d[i].orderId}})">
|
||||
<div class="ui-col ui-col-2 ui-nowrap-flex">订单号:{{d[i].orderNo}}{{d[i].noticeDeliver}}
|
||||
{{# if(d[i].orderStatus==0 && d[i].noticeDeliver==1){ }}
|
||||
<span class='notice'><img style='width:0.2rem' src='{{WST.conf.ROOT}}\wstmart\wechat\view\default\img\nocite_deliver.png'>提醒发货</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
<div class="ui-col order-tr o-status">
|
||||
{{ d[i].status }}
|
||||
{{# if($.inArray(d[i].orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d[i].payType==1 && d[i].isPay==1) { }}
|
||||
{{# if(d[i].isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# for(var g=0;g<d[i].list.length;g++){ }}
|
||||
<div class="ui-row-flex ui-whitespace border-b" onclick="getOrderDetail({{d[i].orderId}})">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{{d[i].list[g].goodsImg}}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi ui-whitespace">{{d[i].list[g].goodsName}}</p>
|
||||
|
||||
{{# if(d[i].list[g].goodsSpecNames){ }}
|
||||
<p class="o-gSpec ui-nowrap-flex ui-whitespace">规格:{{d[i].list[g].goodsSpecNames}}</p>
|
||||
{{# } }}
|
||||
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;">
|
||||
{{# if(d[i].list[g].goodsCode=='gift'){ }}
|
||||
【赠品】
|
||||
{{# }else{ }}
|
||||
<p>¥ {{d[i].list[g].goodsPrice}}</p><p>x {{d[i].list[g].goodsNum}}</p>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<div style="padding-top:5px;padding-bottom:5px;">
|
||||
<div class="o-oListMoney">
|
||||
订单总价:<span>¥ {{d[i].realTotalMoney}}</span>
|
||||
</div>
|
||||
{{# if(d[i].orderStatus==-2){ }}
|
||||
<button class="ui-btn o-btn" onclick="showEditMoneyBox('editOrderMoney({{d[i].orderId}})')">
|
||||
修改价格
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].orderStatus==0){ }}
|
||||
<button class="ui-btn o-btn" onclick="toDeliver({{d[i].orderId}},{{d[i].deliverTypes}})">
|
||||
发货
|
||||
</button>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d[i].payType==1 && WST.blank(d[i].refundId)!=''){ }}
|
||||
<button class="ui-btn o-btn" onclick="showRefundBox({{d[i].refundId}})">
|
||||
退款操作
|
||||
</button>
|
||||
{{# } }}
|
||||
{{# if(d[i].isAppraise==1){ }}
|
||||
<button class="ui-btn o-btn" onclick="toAppr({{d[i].orderId}})">
|
||||
查看评价
|
||||
</button>
|
||||
{{# } }}
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<section class="ui-container" id="shopBox">
|
||||
<div class="ui-tab">
|
||||
<ul class="ui-tab-nav order-tab">
|
||||
<?php $shopMenus = WSTShopOrderMenus();?>
|
||||
{if (count($shopMenus)==6)}
|
||||
<li class="tab-item {if $type=='all'}tab-curr{/if}" type="all" >全部</li>
|
||||
{/if}
|
||||
{if array_key_exists("waitPay",$shopMenus)}
|
||||
<li class="tab-item {if $type=='waitPay'}tab-curr{/if}" type="waitPay" >待付款</li>
|
||||
{/if}
|
||||
{if array_key_exists("waitDeliver",$shopMenus)}
|
||||
<li class="tab-item {if $type=='waitDeliver'}tab-curr{/if}" type="waitDeliver" >待发货</li>
|
||||
{/if}
|
||||
{if array_key_exists("waitReceive",$shopMenus)}
|
||||
<li class="tab-item {if $type=='waitReceive'}tab-curr{/if}" type="waitReceive" >待收货</li>
|
||||
{/if}
|
||||
{if array_key_exists("waitAppraise",$shopMenus)}
|
||||
<li class="tab-item {if $type=='waitAppraise'}tab-curr{/if}" type="waitAppraise" >待评价</li>
|
||||
{/if}
|
||||
{if array_key_exists("finish",$shopMenus)}
|
||||
<li class="tab-item {if $type=='finish'}tab-curr{/if}" type="finish" >已完成</li>
|
||||
{/if}
|
||||
{if array_key_exists("abnormal",$shopMenus)}
|
||||
<li class="tab-item {if $type=='abnormal'}tab-curr{/if}" type="abnormal" >取消拒收</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="order-box">
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="detailBox">
|
||||
<div id="detailBox">
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
{{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex">
|
||||
{{# if(d.payType==1) { }}
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[-2,0,1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>待付款</p></div>
|
||||
{{# } }}
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[0,1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>待发货</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if($.inArray(d.orderStatus,[1,2])!=-1){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>已发货</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.orderStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.orderStatus==2){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>已收货</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1 && d.payType==1 && d.isPay==1){ }}
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>买家申请退款</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}class="active"{{# } }}></span>
|
||||
<span {{# if(d.refundStatus==2){ }}class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.refundStatus==1 || d.refundStatus==2 || d.refundStatus==0){ }}active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>商家申请退款处理</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span {{# if(d.refundStatus==2) { }} class="active"{{# } }}></span>
|
||||
<span {{# if(d.refundStatus==2) { }} class="active"{{# } }}></span>
|
||||
<p class="icon"><i class="ui-icon-success-block {{# if(d.refundStatus==2) { }} active{{# } }}"></i></p>
|
||||
<div class="wst-clear"></div></p><p>退款完成</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单状态:</span>
|
||||
<span class="o-status">{{d.status}}
|
||||
{{# if($.inArray(d.orderStatus,[-1,-3])!=-1){ }}
|
||||
{{# if(d.payType==1 && d.isPay==1) { }}
|
||||
{{# if(d.isRefund==1) { }}
|
||||
(已退款)
|
||||
{{# }else{ }}
|
||||
(未退款)
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单编号:</span>{{d.orderNo}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">下单时间:</span>{{d.createTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="detail-head">
|
||||
{{# if(d.userName){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">收货人:</span>{{d.userName}} <span class="d-utel">{{d.userPhone}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">收货地址:</span><span class="d-uaddr">{{d.userAddress}}<i></i></span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">支付信息:</span>{{d.payInfo}}</div>
|
||||
</div>
|
||||
{{# if(d.payTime){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">支付时间:</span>{{d.payTime}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">配送信息:</span>{{d.deliverInfo}}</div>
|
||||
</div>
|
||||
{{# if(WST.blank(d.expressNo)!=''){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">快递公司:</span>{{d.expressName}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">快递号:</span>{{d.expressNo}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票信息:</span>{{# if(d.isInvoice==1) { }}需要{{# } else{ }}不需要{{# } }}</div>
|
||||
</div>
|
||||
{{# if(d.isInvoice==1) { }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票抬头:</span>{{d.invoiceClient}}</div>
|
||||
</div>
|
||||
{{#
|
||||
var inv_json = JSON.parse(d.invoiceJson);
|
||||
var inv_code = (inv_json!=null && inv_json.invoiceCode!=undefined)?inv_json.invoiceCode:'';
|
||||
if(inv_json!=null && inv_json.type!=undefined && inv_json.type==0){
|
||||
}}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">发票税号:</span>{{inv_code}}</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">订单备注:</span>{{d.orderRemarks}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# if(d.isRefund==1){ }}
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款金额:</span>¥ {{d.backMoney}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款备注:</span>{{d.refundRemark}}</div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe">退款时间:</span>{{d.refundTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
|
||||
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex o-shops">
|
||||
<div class="ui-col ui-col wst-or-term"><p class="shops" onclick="javascript:WST.intoShops({{d.shopId}});"><i></i>{{d.shopName}}<p></div>
|
||||
</div>
|
||||
{{# for(var i=0;i<d.goods.length;i++){ }}
|
||||
<p>商品编号: {{d.goods[i].goodsSn}}</p>
|
||||
<div class="ui-row-flex ui-whitespace border-b d-goodsitme" onclick="javascript:WST.intoGoods({{d.goods[i].goodsId}})">
|
||||
<div class="ui-col">
|
||||
<img src="__ROOT__/{{d.goods[i].goodsImg}}" class="o-Img">
|
||||
</div>
|
||||
<div class="ui-col ui-col-3 o-gInfo">
|
||||
<p class="o-gName ui-nowrap-multi ui-whitespace">{{d.goods[i].goodsName}}</p>
|
||||
<p class="o-gSpec d-gSpec">
|
||||
{{# if(d.goods[i].goodsSpecNames){ }}
|
||||
{{d.goods[i].goodsSpecNames.replace(/@@_@@/g,'<br />')}}
|
||||
{{# } }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ui-col order-tr" style="word-break:break-all;padding:5px 0;">
|
||||
{{# if(d.goods[i].goodsCode=='gift'){ }}
|
||||
【赠品】
|
||||
{{# }else{ }}
|
||||
<p>¥ {{d.goods[i].goodsPrice}}</p><p>x {{d.goods[i].goodsNum}}</p>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
{{# if(d.goods[i].goodsType==1 && d.orderStatus==2){ }}
|
||||
{{# for(var e=0;e<d.goods[i].extraJson.length;e++){ }}
|
||||
<div class="ui-row-flex ui-row-flex-ver d-uInfo">
|
||||
<div class="ui-col">
|
||||
<p>卡券号:{{d.goods[i].extraJson[e].cardNo}}</p>
|
||||
<p>卡券密码:{{d.goods[i].extraJson[e].cardPwd}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
|
||||
<div class="detail-head">
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">获得积分</span><span class="o-status2">{{d.orderScore}} 个</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">商品总额</span><span class="o-status2">¥ {{d.goodsMoney}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">运费</span><span class="o-status2">¥ {{d.deliverMoney}}</span></div>
|
||||
</div>
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">积分抵扣金额</span><span class="o-status2">¥ -{{d.scoreMoney}}</span></div>
|
||||
</div>
|
||||
{{# if(d.useScore>0){ }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term"><span class="wst-or-describe2">使用积分数</span><span class="o-status2">{{d.useScore}} 个</span></div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{ d['hook']?d['hook']:"" }}
|
||||
<div class="ui-row-flex">
|
||||
<div class="ui-col ui-col wst-or-term2"><span class="wst-or-describe2">实付款</span><span class="o-status2"><span style="font-size:0.13rem;">¥ </span>{{d.realTotalMoney}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 订单详情层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title" id="boxTitle"><span>订单详情</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/* 退款层 */}
|
||||
<div class="wst-fr-box" id="refundFrame">
|
||||
<div class="title"><span>申请退款</span><i class="ui-icon-close-page" onclick="javascript:reFundDataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="refund-content">
|
||||
<div class="detail-head" style="margin-top:0;">
|
||||
<div class="wst-or-process">
|
||||
<div class="ui-row-flex" style="padding:10px;border-bottom:RGB(242,242,242) 2px dashed;">
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span class="active"></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>卖家申请退款</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span class="active"></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block active"></i></p>
|
||||
<div class="wst-clear"></div></p><p>商家申请退款处理</p></div>
|
||||
<div class="ui-col ui-col process"><p class="line">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<p class="icon"><i class="ui-icon-success-block"></i></p>
|
||||
<div class="wst-clear"></div></p><p>退款完成</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-or-refund">
|
||||
<p class="term" style="padding: 3px 5px 0 5px;">订单号:<span id="refundOid"></span></p>
|
||||
<p class="term" style="padding: 3px 5px 0 5px;">实付金额:<span id="realTotalMoney"></span></p>
|
||||
<p class="term" style="padding: 3px 5px 0 5px;">退款金额:<span id="refundMoney" class="sign"></span></p>
|
||||
<p class="term" style="padding: 3px 5px 0 5px;">退款积分:<span id="useScore" class="sign">0</span> 个(积分抵扣<span id="scoreMoney" class="sign">¥ 0</span>)</p>
|
||||
<p style="padding: 3px 5px 0 5px;">商家意见:
|
||||
<label><input type='radio' onclick='WST.showHide(0,"#tr")' name='refundStatus' id='refundStatus' value='1' checked/>同意</label>
|
||||
<label style='margin-left:15px;'><input type='radio' onclick='WST.showHide(1,"#tr")' name='refundStatus' id='refundStatus' value='-1'/>不同意</label>
|
||||
</p>
|
||||
<div class="term">
|
||||
<div id='tr' style="width:99%;display:none;" >
|
||||
<span class="sign">*</span>原因
|
||||
<textarea id='shopRejectReason' style='width:100%;height:80px;padding: 5px;' maxLength='200'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<p class="cancel-btn-box ui-flex ui-flex-pack-center">
|
||||
<button id="wst-event8" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/* 发货 */}
|
||||
<div class="ui-dialog" id="deliveryBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
快递公司:<br>
|
||||
<select id='expressId' style="height:30px;width:100%;">
|
||||
{volist name="$express" id="vo"}
|
||||
<option value='{$vo["expressId"]}'>{$vo["expressName"]}</option>
|
||||
{/volist}
|
||||
</select><br>
|
||||
快递号:<br>
|
||||
<input type="text" id="expressNo" style="float: left;height:30px;width:100%;"/>
|
||||
|
||||
<p class="cancel-btn-box">
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event0" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 修改价格 */}
|
||||
<div class="ui-dialog" id="editMoneyBox">
|
||||
<div class="ui-dialog-cnt">
|
||||
<div class="ui-dialog-bd">
|
||||
新价格:<input type='text' id='newOrderMoney' maxLength='10' style='width:150px;height:30px' onkeyup="javascript:WST.isChinese(this,1)" onkeypress="return WST.isNumberdoteKey(event,true)" onblur='javascript:WST.limitDecimal(this,2)'>
|
||||
|
||||
<p class="cancel-btn-box">
|
||||
<button id="wst-event1" type="button" class="ui-btn-s wst-dialog-b1" data-role="button">取消</button>
|
||||
<button id="wst-event3" type="button" class="ui-btn-s wst-dialog-b2">确定</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/sellerorders/orders_list.js?v={$v}'></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
// 弹出层
|
||||
var w = WST.pageWidth();
|
||||
$("#frame").css('top',0);
|
||||
$("#frame").css('right',-w);
|
||||
});
|
||||
</script>
|
||||
{/block}
|
285
hyhproject/wechat2/view/default/users/sellerorders/orders_list.js
Executable file
285
hyhproject/wechat2/view/default/users/sellerorders/orders_list.js
Executable file
@ -0,0 +1,285 @@
|
||||
jQuery.noConflict();
|
||||
// 获取订单列表
|
||||
function getOrderList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.type = $('#type').val();
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
param.deliverType = -1;
|
||||
param.payType = -1;
|
||||
$.post(WST.U('wechat/orders/getSellerOrderList'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
var html = '';
|
||||
json = json.data;
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('shopList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#order-box').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-order.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关订单</p>';
|
||||
html += '</div>';
|
||||
$('#order-box').html(html);
|
||||
}
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
$('#type').val(jQuery("#shopBox li:first").attr("type"));
|
||||
jQuery("#shopBox li:first").addClass("tab-curr");
|
||||
getOrderList();
|
||||
WST.initFooter('user');
|
||||
// Tab切换卡
|
||||
$('.tab-item').click(function(){
|
||||
$(this).addClass('tab-curr').siblings().removeClass('tab-curr');
|
||||
var type = $(this).attr('type');
|
||||
$('#type').val(type);
|
||||
reFlashList();
|
||||
});
|
||||
// 弹出层
|
||||
$("#frame").css('top',0);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getOrderList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 刷新列表页
|
||||
function reFlashList(){
|
||||
$('#currPage').val('0');
|
||||
$('#order-box').html(' ');
|
||||
getOrderList();
|
||||
}
|
||||
|
||||
|
||||
// 拒收
|
||||
function showEditMoneyBox(event){
|
||||
$("#wst-event3").attr("onclick","javascript:"+event);
|
||||
$("#editMoneyBox").dialog("show");
|
||||
}
|
||||
|
||||
function editOrderMoney(oid){
|
||||
var newOrderMoney = $('#newOrderMoney').val();
|
||||
$.post(WST.U('wechat/orders/editOrderMoney'),{id:oid,orderMoney:newOrderMoney},function(data){
|
||||
hideDialog('#editMoneyBox');
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
$('#newOrderMoney').val(' ');
|
||||
WST.msg(json.msg,'success');
|
||||
reFlashList();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 退款
|
||||
function showRefundBox(id){
|
||||
$.post(WST.U('wechat/orders/toShopRefund'),{id:id},function(data){
|
||||
var json = WST.toJson(data);
|
||||
$('#refundOid').html(json.orderNo);
|
||||
$('#realTotalMoney').html('¥ '+json.realTotalMoney);
|
||||
$('#refundMoney').html('¥ '+json.backMoney);
|
||||
$('#useScore').html(json.useScore);
|
||||
$('#scoreMoney').html('¥ '+json.scoreMoney);
|
||||
// 弹出层滚动条
|
||||
var clientH = WST.pageHeight();// 屏幕高度
|
||||
var boxheadH = $('#refund-boxTitle').height();// 弹出层标题高度
|
||||
var contentH = $('#refund-content').height(); // 弹出层内容高度
|
||||
$('#refund-content').css('height',clientH-boxheadH+'px');
|
||||
$("#wst-event8").attr("onclick","javascript:refund("+id+")");
|
||||
reFundDataShow();
|
||||
})
|
||||
}
|
||||
//弹框
|
||||
function reFundDataHide(){
|
||||
$('#shopBox').show();
|
||||
var dataHeight = $("#refundFrame").css('height');
|
||||
var dataWidth = $("#refundFrame").css('width');
|
||||
jQuery('#refundFrame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
function reFundDataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:reFundDataHide();").show();
|
||||
jQuery('#refundFrame').animate({"right": 0}, 500);
|
||||
setTimeout(function(){$('#shopBox').hide();},600)
|
||||
}
|
||||
// 退款
|
||||
function refund(id){
|
||||
|
||||
var params = {};
|
||||
params.refundStatus = $('#refundStatus')[0].checked?1:-1;
|
||||
params.content = $.trim($('#shopRejectReason').val());
|
||||
params.id = id;
|
||||
if(params.refundStatus==-1 && params.content==''){
|
||||
WST.msg('请输入原因','info');
|
||||
return;
|
||||
}
|
||||
$.post(WST.U('wechat/orderrefunds/shoprefund'),params,function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg('操作成功','success');
|
||||
history.go(0);
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 隐藏对话框
|
||||
function hideDialog(id){
|
||||
$(id).dialog("hide");
|
||||
}
|
||||
|
||||
// 确认收货
|
||||
function receive(oid){
|
||||
hideDialog('#wst-di-prompt');
|
||||
$.post(WST.U('wechat/orders/receive'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
reFlashList();// 刷新列表
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********************** 订单详情 ****************************/
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
setTimeout(function(){$('#shopBox').hide();},600)
|
||||
|
||||
}
|
||||
function dataHide(){
|
||||
$('#shopBox').show();
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getOrderDetail(oid){
|
||||
$.post(WST.U('wechat/orders/getDetail'),{id:oid},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status!=-1){
|
||||
var gettpl1 = document.getElementById('detailBox').innerHTML;
|
||||
laytpl(gettpl1).render(json, function(html){
|
||||
$('#content').html(html);
|
||||
// 弹出层滚动条
|
||||
var clientH = WST.pageHeight();// 屏幕高度
|
||||
var boxheadH = $('#boxTitle').height();// 弹出层标题高度
|
||||
var contentH = $('#content').height(); // 弹出层内容高度
|
||||
if((clientH-boxheadH) < contentH){
|
||||
$('#content').css('height',clientH-boxheadH+'px');
|
||||
}
|
||||
dataShow();
|
||||
});
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
// 跳转到评价页
|
||||
function toAppr(oid){
|
||||
location.href=WST.U('wechat/orders/orderappraise',{'oId':oid});
|
||||
}
|
||||
// 投诉
|
||||
function complain(oid){
|
||||
location.href=WST.U('wechat/ordercomplains/complain',{'oId':oid});
|
||||
}
|
||||
|
||||
//修改价格
|
||||
function editPrice(orderNo){
|
||||
alert('修改价格');
|
||||
}
|
||||
|
||||
// 发货
|
||||
var deliverType
|
||||
function toDeliver(id,type){
|
||||
deliverType = type
|
||||
if(type==0){
|
||||
delivery('orderDelivery('+id+')');
|
||||
}else{
|
||||
WST.dialog('确定发货吗?','orderDelivery('+id+')');
|
||||
}
|
||||
}
|
||||
function delivery(event){
|
||||
$("#wst-event0").attr("onclick","javascript:"+event);
|
||||
$("#deliveryBox").dialog("show");
|
||||
}
|
||||
function orderDelivery(oid){
|
||||
if(deliverType==0){
|
||||
hideDialog('#deliveryBox');
|
||||
}else{
|
||||
WST.dialogHide('prompt');
|
||||
}
|
||||
$.post(WST.U('wechat/orders/deliver'),{id:oid,expressId:$('#expressId').val(),expressNo:$('#expressNo').val()},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status>0){
|
||||
$('#order-box').html(' ');
|
||||
reFlashList();
|
||||
}else{
|
||||
WST.msg(json.msg,'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*************** 修改价格需要用到的方法 ******************/
|
||||
|
||||
//只能輸入數字和小數點
|
||||
WST.isNumberdoteKey = function(evt){
|
||||
var e = evt || window.event;
|
||||
var srcElement = e.srcElement || e.target;
|
||||
|
||||
var charCode = (evt.which) ? evt.which : event.keyCode;
|
||||
if (charCode > 31 && ((charCode < 48 || charCode > 57) && charCode!=46)){
|
||||
return false;
|
||||
}else{
|
||||
if(charCode==46){
|
||||
var s = srcElement.value;
|
||||
if(s.length==0 || s.indexOf(".")!=-1){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
WST.limitDecimal = function(obj,len){
|
||||
var s = obj.value;
|
||||
if(s.indexOf(".")>-1){
|
||||
if((s.length - s.indexOf(".")-1)>len){
|
||||
obj.value = s.substring(0,s.indexOf(".")+len+1);
|
||||
}
|
||||
}
|
||||
s = null;
|
||||
}
|
110
hyhproject/wechat2/view/default/users/user.js
Executable file
110
hyhproject/wechat2/view/default/users/user.js
Executable file
@ -0,0 +1,110 @@
|
||||
//返回个人信息
|
||||
function returnUserinfo(){
|
||||
jQuery('#useri_infos').slideDown();
|
||||
jQuery('#footer').slideDown();
|
||||
jQuery('#useri_nickname').slideUp();
|
||||
jQuery("#useri_sex").slideUp();
|
||||
}
|
||||
//修改昵称面板
|
||||
function openNickName(){
|
||||
jQuery('#useri_infos').slideUp();
|
||||
jQuery('#footer').slideUp();
|
||||
jQuery('#useri_nickname').slideDown();
|
||||
}
|
||||
//修改昵称
|
||||
function editNickName(){
|
||||
var userName = $('#userName').val();
|
||||
if(userName==''){
|
||||
WST.msg('昵称不能为空','info');
|
||||
$('#userName').focus();
|
||||
return false;
|
||||
}
|
||||
$('.nickname_onclick').attr("onclick", "null");
|
||||
$.post(WST.U('wechat/users/editUserInfo'), {userName:userName}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status == '1'){
|
||||
WST.msg(json.msg,'success');
|
||||
$('#nickname').html(userName);
|
||||
setTimeout(function(){
|
||||
setTimeout(function(){
|
||||
$('.nickname_onclick').attr("onclick", "editNickName()");
|
||||
},1000);
|
||||
returnUserinfo();
|
||||
},1500);
|
||||
}else{
|
||||
WST.msg('修改昵称失败,请重试','warn');
|
||||
setTimeout(function(){
|
||||
$('.nickname_onclick').attr("onclick", "editNickName()");
|
||||
},1500);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
//修改性別面板
|
||||
function openUserSex(){
|
||||
jQuery('#useri_infos').slideUp();
|
||||
jQuery('#footer').slideUp();
|
||||
jQuery("#useri_sex").slideDown();
|
||||
}
|
||||
//修改性别
|
||||
function eidtUserSex(obj, userSex){
|
||||
$(obj).children('.wst-list-infose2').html('<i class="ui-icon-checked-s wst-icon-checked-s_se"></i>');
|
||||
$(obj).siblings().children('.wst-list-infose2').html('');
|
||||
$('.wst-listse').attr("onclick", "null");
|
||||
$.post(WST.U('wechat/users/editUserInfo'), {userSex:userSex}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status == '1'){
|
||||
var newUserSex = '';
|
||||
if(userSex==0){
|
||||
newUserSex = '保密';
|
||||
}else if(userSex==1){
|
||||
newUserSex = '男';
|
||||
}else if(userSex==2){
|
||||
newUserSex = '女';
|
||||
}
|
||||
WST.msg(json.msg,'success');
|
||||
$('#usersex').html(newUserSex);
|
||||
setTimeout(function(){
|
||||
returnUserinfo();
|
||||
setTimeout(function(){
|
||||
$('.wst-listse1').attr("onclick", "eidtUserSex(this, 0)");
|
||||
$('.wst-listse2').attr("onclick", "eidtUserSex(this, 1)");
|
||||
$('.wst-listse3').attr("onclick", "eidtUserSex(this, 2)");
|
||||
},1000);
|
||||
},1500);
|
||||
}else{
|
||||
WST.msg('修改性别失败,请重试','warn');
|
||||
setTimeout(function(){
|
||||
$('.wst-listse1').attr("onclick", "eidtUserSex(this, 0)");
|
||||
$('.wst-listse2').attr("onclick", "eidtUserSex(this, 1)");
|
||||
$('.wst-listse3').attr("onclick", "eidtUserSex(this, 2)");
|
||||
},1000);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
/*签到*/
|
||||
function inSign(){
|
||||
$("#j-sign").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/userscores/signScore'),{},function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
$("#j-sign").addClass('sign2')
|
||||
$("#currentScore").html(json.data.totalScore);
|
||||
WST.msg(json.msg,'success');
|
||||
}else{
|
||||
$("#j-sign").removeClass('sign2');
|
||||
WST.msg(json.msg,'warn');
|
||||
$("#j-sign").removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(function(){
|
||||
if(WST.conf.IS_LOGIN==0){//是否登录
|
||||
WST.inLogin();
|
||||
return;
|
||||
}
|
||||
WST.initFooter('user');
|
||||
WST.imgAdapt('j-imgAdapt');
|
||||
})
|
||||
|
232
hyhproject/wechat2/view/default/users/useraddress/address.js
Executable file
232
hyhproject/wechat2/view/default/users/useraddress/address.js
Executable file
@ -0,0 +1,232 @@
|
||||
jQuery.noConflict();
|
||||
//新增或编辑收货地址页
|
||||
function editAddress(addressId){
|
||||
$('#wst-switch').html('');
|
||||
$('#username').val('');
|
||||
$('#cellphone').val('');
|
||||
$('#address_detailed').val('');
|
||||
$('#areaId').val('');
|
||||
$('#addresst').html('请选择收货地址');
|
||||
$('.wst-ad-submit .button').attr('onclick','javascript:saveAddress('+addressId+');');
|
||||
if(addressId>0){
|
||||
$('.iziModal-header-title').html('修改收货地址');
|
||||
$.post(WST.U('wechat/useraddress/getById'), {addressId:addressId}, function(data){
|
||||
var info = WST.toJson(data);
|
||||
if(info){
|
||||
$('#username').val(info.userName);
|
||||
$('#cellphone').val(info.userPhone);
|
||||
$('#address_detailed').val(info.userAddress);
|
||||
$('#areaId').val(info.areaId);
|
||||
if(info.isDefault==1){
|
||||
$('#defaults').attr('checked',true);
|
||||
}else{
|
||||
$('#defaults').removeAttr('checked');
|
||||
}
|
||||
$('#addresst').html(info.areaName);
|
||||
}
|
||||
addressInfo= null;
|
||||
});
|
||||
}else{
|
||||
$('.iziModal-header-title').html('新增收货地址');
|
||||
}
|
||||
jQuery('#modal-large').iziModal('open');
|
||||
}
|
||||
jQuery("#modal-large").iziModal({
|
||||
title: "新增收货地址",
|
||||
subtitle: "",
|
||||
iconClass: 'icon-chat',
|
||||
overlayColor: 'rgba(0, 0 0, 0.6)',
|
||||
headerColor: '#ffffff'
|
||||
});
|
||||
//保存收货地址
|
||||
function saveAddress(addressId){
|
||||
var userName = $('#username').val();
|
||||
var userPhone = $('#cellphone').val();
|
||||
var areaId = $('#areaId').val();
|
||||
var userAddress = $('#address_detailed').val();
|
||||
if( $('#defaults').is(':checked')){
|
||||
var isdefaultAddress = 1;//设为默认地址
|
||||
}else{
|
||||
var isdefaultAddress = 0;//不设为默认地址
|
||||
}
|
||||
if(userName==''){
|
||||
WST.msg('收货人名称不能为空','info');
|
||||
return false;
|
||||
}
|
||||
if(userPhone==''){
|
||||
WST.msg('联系电话不能为空','info');
|
||||
return false;
|
||||
}
|
||||
if(areaId==''){
|
||||
WST.msg('请选择地址','info');
|
||||
return false;
|
||||
}
|
||||
if(userAddress==''){
|
||||
WST.msg('请填写详细地址','info');
|
||||
return false;
|
||||
}
|
||||
var param = {};
|
||||
param.addressId = addressId;
|
||||
param.userName = userName;
|
||||
param.areaId = areaId;
|
||||
param.userPhone = userPhone;
|
||||
param.userAddress = userAddress;
|
||||
param.isDefault = isdefaultAddress;
|
||||
$('.wst-ad-submit .button').addClass("active").attr('disabled', 'disabled');
|
||||
$.post(WST.U('wechat/useraddress/edits'), param, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
var type = $('#type').val();
|
||||
var id = $('#addressId2').val();
|
||||
if(param.addressId==0 && type==1)var addId = json.data.addressId;
|
||||
setTimeout(function(){
|
||||
if(param.addressId==0 && type==1){
|
||||
chooseAddress(addId);
|
||||
}else{
|
||||
location.href = WST.U('wechat/useraddress/index','type='+type+'&addressId='+id);
|
||||
}
|
||||
},1500);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
setTimeout(function(){
|
||||
$('.wst-ad-submit .button').removeAttr('disabled').removeClass("active");
|
||||
},1500);
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
//设为默认地址
|
||||
function inDefault(obj,id){
|
||||
$(obj).addClass('default').removeClass('nodefault').siblings('.j-operate').addClass('nodefault').removeClass('default');
|
||||
$('.wst-ad-operate').css('position','relative');
|
||||
$.post(WST.U('wechat/useraddress/setDefault'), {id:id}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if( json.status == 1 ){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
location.href = WST.U('wechat/useraddress/index');
|
||||
},1500);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
$('.wst-ad-operate').css('position','static');
|
||||
}
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
function setToDefault(obj){
|
||||
if( $(obj).is(':checked')){
|
||||
$('#defaults').removeAttr('checked');
|
||||
}else{
|
||||
$('#defaults').attr('checked',true);
|
||||
}
|
||||
}
|
||||
//删除收货地址
|
||||
function delAddress(addressId){
|
||||
WST.dialog('确定删除吗?','toDelAddress('+addressId+')');
|
||||
}
|
||||
//删除收货地址
|
||||
function toDelAddress(addressId){
|
||||
$.post(WST.U('wechat/useraddress/del'), {id:addressId}, function(data){
|
||||
var json = WST.toJson(data);
|
||||
if(json.status==1){
|
||||
WST.msg(json.msg,'success');
|
||||
setTimeout(function(){
|
||||
var type = $('#type').val();
|
||||
var id = $('#addressId2').val();
|
||||
location.href = WST.U('wechat/useraddress/index','type='+type+'&addressId='+id);
|
||||
},2000);
|
||||
}else{
|
||||
WST.msg(json.msg,'warn');
|
||||
}
|
||||
WST.dialogHide('prompt');
|
||||
data = json = null;
|
||||
});
|
||||
}
|
||||
//地址选择
|
||||
function inOption(obj,n){
|
||||
$(obj).addClass('active').siblings().removeClass('active');
|
||||
$('.area_'+n).removeClass('hide').siblings('.list').addClass('hide');
|
||||
var level = $('#level').val();
|
||||
var n = n+1;
|
||||
for(var i=n; i<=level; i++){
|
||||
$('.area_'+i).remove();
|
||||
$('.active_'+i).remove();
|
||||
}
|
||||
}
|
||||
function inChoice(obj,id,val,level){
|
||||
$('#level').val((level+1));
|
||||
$(obj).addClass('active').siblings().removeClass('active');
|
||||
$('#'+id).attr('areaId',val);
|
||||
$('.active_'+level).removeClass('active').html($(obj).html());
|
||||
WST.ITAreas({id:id,val:val,className:'j-areas'});
|
||||
}
|
||||
/**
|
||||
* 循环创建地区
|
||||
* @param id 当前分类ID
|
||||
* @param val 当前分类值
|
||||
* @param className 样式,方便将来获取值
|
||||
*/
|
||||
WST.ITAreas = function(opts){
|
||||
opts.className = opts.className?opts.className:"j-areas";
|
||||
var obj = $('#'+opts.id);
|
||||
obj.attr('lastarea',1);
|
||||
$.post(WST.U('wechat/areas/listQuery'),{parentId:opts.val},function(data,textStatus){
|
||||
var json = WST.toJson(data);
|
||||
if(json.data && json.data.length>0){
|
||||
json = json.data;
|
||||
var html = [],tmp;
|
||||
var tid = opts.id+"_"+opts.val;
|
||||
var level = parseInt(obj.attr('level'),10);
|
||||
$('.area_'+level).addClass('hide');
|
||||
var level = level+1;
|
||||
html.push('<div id="'+tid+'" class="list '+opts.className+' area_'+level+'" areaId="0" level="'+level+'">');
|
||||
for(var i=0;i<json.length;i++){
|
||||
tmp = json[i];
|
||||
html.push("<p onclick='javascript:inChoice(this,\""+tid+"\","+tmp.areaId+","+level+");'>"+tmp.areaName+"</p>");
|
||||
}
|
||||
html.push('</div>');
|
||||
$(html.join('')).insertAfter('#'+opts.id);
|
||||
var h = WST.pageHeight();
|
||||
var listh = h/2-106;
|
||||
$(".wst-fr-box .list").css('overflow-y','scroll').css('height',listh+'px');
|
||||
$(".wst-fr-box .option").append('<p class="ui-nowrap-flex term active_'+level+' active" onclick="javascript:inOption(this,'+level+')">请选择</p>');
|
||||
}else{
|
||||
opts.isLast = true;
|
||||
opts.lastVal = opts.val;
|
||||
$('#areaId').val(opts.lastVal);
|
||||
var ht = '';
|
||||
$('.wst-fr-box .term').each(function(){
|
||||
ht += $(this).html();
|
||||
});
|
||||
$('#addresst').html(ht);
|
||||
dataHide();
|
||||
}
|
||||
});
|
||||
}
|
||||
function chooseAddress(id){
|
||||
location.href = WST.U('wechat/carts/settlement','addressId='+id);
|
||||
}
|
||||
$(document).ready(function(){
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
$('#modal-large').css({'top':0,'margin-top':0});
|
||||
var h = WST.pageHeight();
|
||||
$("#frame").css('bottom','-'+h/2);
|
||||
var listh = h/2-106;
|
||||
$(".wst-fr-box .list").css('overflow-y','scroll').css('height',listh+'px');
|
||||
});
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#frame').show();
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"bottom": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
jQuery('#frame').animate({'bottom': '-'+dataHeight}, 500);
|
||||
jQuery('#cover').hide();
|
||||
setTimeout(function(){
|
||||
jQuery('#frame').hide();
|
||||
},500);
|
||||
}
|
49
hyhproject/wechat2/view/default/users/useraddress/edit.html
Executable file
49
hyhproject/wechat2/view/default/users/useraddress/edit.html
Executable file
@ -0,0 +1,49 @@
|
||||
<div id="modal-large" class="iziModal">
|
||||
<input type="hidden" name="" value="" id="areaId" autocomplete="off">
|
||||
<div class="wst-ad-form">
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">收货人:</label><input class="ui-border-binte" id="username" type="text" placeholder="请填写收货人">
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">联系电话:</label><input class="ui-border-binte" id="cellphone" type="text" placeholder="请填写联系电话" onkeypress='return WST.isNumberKey(event);' onkeyup="javascript:WST.isChinese(this,1)">
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">收货地址:</label>
|
||||
<div id="addresst" class="ui-nowrap-flex address" onclick="javascript:dataShow();">请选择收货地址</div>
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form-itemin">
|
||||
<label class="word">详细地址:</label><input class="ui-border-binte" id="address_detailed" type="text" placeholder="请填写详细地址">
|
||||
</div>
|
||||
<div class="wst-ad-line"><p></p></div>
|
||||
<div class="ui-form">
|
||||
<div class="ui-form-item ui-form-item-switch wst-ad-operate">
|
||||
<p>设为默认地址</p>
|
||||
<label class="ui-switch">
|
||||
<input type="checkbox" id="defaults" onclick="javascript:setToDefault(this)">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-ad-submit"><button class="ui-btn-lg button" onclick="javascript:saveAddress(0);">保存</button></div>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 地址框 */}
|
||||
<div class="wst-fr-box" id="frame" style="display:none;">
|
||||
<input type="hidden" name="" value="" id="level" autocomplete="off">
|
||||
<div class="title"><span>收货地址</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
<div class="option">
|
||||
<p class="ui-nowrap-flex term active_0 active" onclick="javascript:inOption(this,0)">请选择</p>
|
||||
</div>
|
||||
<div class="wst-clear"></div>
|
||||
<div id="area_0" class="list j-areas area_0" areaId="0" level="0">
|
||||
{volist name="area" id="ar"}
|
||||
<p onclick="javascript:inChoice(this,'area_0',{$ar['areaId']},0);">{$ar['areaName']}</p>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
56
hyhproject/wechat2/view/default/users/useraddress/list.html
Executable file
56
hyhproject/wechat2/view/default/users/useraddress/list.html
Executable file
@ -0,0 +1,56 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}收货地址管理 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/iziModal.css?v={$v}">
|
||||
<link rel="stylesheet" href="__WECHAT__/css/address.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
<header style="background:#ffffff;" class="ui-header ui-header-positive ui-border-b wst-header">
|
||||
<i class="ui-icon-return" {if($type==1)}onclick="javascript:chooseAddress({$addressId});"{else}onclick="history.back();"{/if}></i><h1>我的地址</h1>
|
||||
</header>
|
||||
{/block}
|
||||
{block name="footer"}
|
||||
<div class="wst-ad-footer"><button class="button" onclick="javascript:editAddress(0);">新增</button></div>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="{$type}" id="type" autocomplete="off">
|
||||
<input type="hidden" name="" value="{$addressId}" id="addressId2" autocomplete="off">
|
||||
<section class="ui-container" id="address">
|
||||
{volist name="list" id="li"}
|
||||
<ul class="ui-list wst-listse">
|
||||
<li {if($type==1)}onclick="javascript:chooseAddress({$li['addressId']});"{/if}>
|
||||
<div class="wst-list-infose1">
|
||||
<span class="name">{$li['userName']} {$li['userPhone']}</span>
|
||||
<span class="address">{$li['areaName']}-{$li['userAddress']}</span>
|
||||
</div>
|
||||
</li>
|
||||
<div class="wst-ad-operate">
|
||||
{if($type!=1)}<span class="left">设为默认</span>{/if}
|
||||
<span class="right" onclick="javascript:delAddress({$li['addressId']});"><i class="delete"></i> 删除</span>
|
||||
<span class="right" onclick="javascript:editAddress({$li['addressId']});"><i class="edit"></i> 编辑</span>
|
||||
<div class="wst-clear"></div>
|
||||
</div>
|
||||
</ul>
|
||||
{if($type==1)}
|
||||
<i class="j-operate {if($addressId==$li['addressId'])}default{else}nodefault{/if}"></i>
|
||||
{else}
|
||||
<i class="j-operate {if($li['isDefault']==1)}default{else}nodefault{/if}" onclick="javascript:inDefault(this,{$li['addressId']});"></i>
|
||||
{/if}
|
||||
{/volist}
|
||||
{empty name="list"}
|
||||
<div class="wst-prompt-icon"><img src="__WECHAT__/img/nothing-address.png"></div>
|
||||
<div class="wst-prompt-info">
|
||||
<p>没有收货地址</p>
|
||||
</div>
|
||||
{/empty}
|
||||
</section>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{include file="default/users/useraddress/edit" /}<!-- 新增/编辑收货地址模板 -->
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/js/izimodal/iziModal.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/useraddress/address.js?v={$v}'></script>
|
||||
{/block}
|
49
hyhproject/wechat2/view/default/users/userscores/list.html
Executable file
49
hyhproject/wechat2/view/default/users/userscores/list.html
Executable file
@ -0,0 +1,49 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的积分 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/userscores.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "我的积分"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="ui-row-flex ui-whitespace ui-row-flex-ver head">
|
||||
<div class="user_scores">
|
||||
<p>我的积分</p>
|
||||
<p id="userMoney" >{$object['userScore']}<span> 个</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="scoreList">
|
||||
<ul class="ui-row score-detail">
|
||||
{{# for(var i=0;i<d.length;i++){ }}
|
||||
<li class="ui-col ui-col-75 wst-re-info">
|
||||
<p>{{d[i].dataRemarks}}</p>
|
||||
<span class="score-time">{{d[i].createTime}}</span>
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 {{(d[i].scoreType==1)?'score-plus':'score-reduce'}}">{{(d[i].scoreType==1)?'+':'-'}} {{d[i].score}}</li>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="score-line"></div>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
<li class="score-detail-title">积分明细</li>
|
||||
<div id="score-list"></div>
|
||||
</section>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 分类层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title"><span>积分使用规则</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
积分使用规则
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/userscores/userscores.js?v={$v}'></script>
|
||||
{/block}
|
67
hyhproject/wechat2/view/default/users/userscores/userscores.js
Executable file
67
hyhproject/wechat2/view/default/users/userscores/userscores.js
Executable file
@ -0,0 +1,67 @@
|
||||
jQuery.noConflict();
|
||||
// 获取订单列表
|
||||
function getScoreList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.type = $('#type').val() || -1;
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/userscores/pageQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('scoreList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#score-list').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-relevant.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关信息</p>';
|
||||
html += '</div>';
|
||||
$('#score-list').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getScoreList();
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
var w = WST.pageWidth();
|
||||
var h = WST.pageHeight();
|
||||
$('#frame .content').css('overflow-y','scroll').css('height',h-48);
|
||||
$("#frame").css('right',-w);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getScoreList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
41
hyhproject/wechat2/view/default/users/userset/about.html
Executable file
41
hyhproject/wechat2/view/default/users/userset/about.html
Executable file
@ -0,0 +1,41 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}关于我们 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/userset.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "关于我们"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
<div class="wst-about">
|
||||
<div class="wst-brand" ><img src="__ROOT__/{:WSTConf('CONF.mallLogo')}"></div>
|
||||
<p>{:WSTConf('CONF.seoMallTitle')}</p>
|
||||
<div class="wst-version">
|
||||
<div class="wst-border">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wst-about" >
|
||||
<ul class="ui-list ui-list-text wst-contact" style="background: transparent;">
|
||||
<li class="line">
|
||||
<span class="phone"></span><h5>联系电话:{:WSTConf('CONF.serviceTel')}</h5>
|
||||
</li>
|
||||
<li class="line">
|
||||
<span class="qq"></span><h5>客服QQ:{:WSTConf('CONF.serviceQQ')}</h5>
|
||||
</li>
|
||||
<li class="line">
|
||||
<span class="email"></span><h5>联系邮箱:{:WSTConf('CONF.serviceEmail')}</h5>
|
||||
</li>
|
||||
<li class="line">
|
||||
<span class="belong"></span><h5>版权所有:{:WSTConf('CONF.seoMallTitle')}</h5>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/users/userset/userset.js'></script>
|
||||
{/block}
|
28
hyhproject/wechat2/view/default/users/userset/list.html
Executable file
28
hyhproject/wechat2/view/default/users/userset/list.html
Executable file
@ -0,0 +1,28 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}用户设置 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/userset.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "用户设置"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="footer"}{/block}
|
||||
{block name="main"}
|
||||
<section class="ui-container">
|
||||
<ul class="ui-list ui-list-text ui-list-link wst-se-l">
|
||||
<li class="line" onclick="location.href='{:url('wechat/users/edit')}'">
|
||||
<span class="pay"></span><h5 class="ui-nowrap">个人中心</h5></a>
|
||||
</li>
|
||||
<li class="line" onclick="location.href='{:url('wechat/users/security')}'">
|
||||
<span class="safety"></span><h5 class="ui-nowrap">账户安全</h5></a>
|
||||
</li>
|
||||
<li class="line" onclick="location.href='{:url('wechat/users/aboutus')}'">
|
||||
<span class="about"></span><h5 class="ui-nowrap">关于我们</h5>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
{/block}
|
||||
{block name="include"}
|
||||
{include file="default/dialog" /}<!-- 对话框模板 -->
|
||||
{/block}
|
Reference in New Issue
Block a user