You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
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}
|
Reference in New Issue
Block a user