钱包优化

This commit is contained in:
gongfuxiang 2019-05-12 14:17:31 +08:00
parent de48ea5892
commit 830ab11676
14 changed files with 90 additions and 79 deletions

View File

@ -21,7 +21,7 @@
<div class="items">
<label>开启充值</label>
<div>
{{if isset($data['is_recharge']) and $data['is_recharge'] eq 1}}
{{if !isset($data['is_enable_recharge']) or $data['is_enable_recharge'] eq 1}}
{{else /}}
@ -33,7 +33,7 @@
<div class="items">
<label>开启提现申请</label>
<div>
{{if isset($data['is_cash']) and $data['is_cash'] eq 1}}
{{if !isset($data['is_enable_cash']) or $data['is_enable_cash'] eq 1}}
{{else /}}
@ -43,13 +43,14 @@
</li>
<li>
<div class="items">
<label>开启余额支付功能</label>
<label>提现申请时间限制</label>
<div>
{{if isset($data['is_pay']) and $data['is_pay'] eq 1}}
{{if empty($data['cash_time_limit'])}}
30
{{else /}}
{{$data.cash_time_limit}}
{{/if}}
分钟
</div>
</div>
</li>

View File

@ -11,48 +11,43 @@
</legend>
<div class="am-form-group">
<label>开启充值<span class="am-form-group-label-tips">默认关闭</span></label>
<label>开启充值<span class="am-form-group-label-tips">默认开启</span></label>
<div>
{{foreach $is_whether_list as $v}}
<label class="am-radio-inline m-r-10">
<input type="radio" name="is_recharge" value="{{$v.value}}" {{if isset($data['is_recharge']) and $data['is_recharge'] eq $v['value']}}checked="checked"{{else /}}{{if !isset($data['is_recharge']) and isset($v['checked']) and $v['checked'] eq true}}checked="checked"{{/if}}{{/if}} data-am-ucheck /> {{$v.name}}
<input type="radio" name="is_enable_recharge" value="{{$v.value}}" {{if isset($data['is_enable_recharge']) and $data['is_enable_recharge'] eq $v['value']}}checked="checked"{{else /}}{{if !isset($data['is_enable_recharge']) and isset($v['checked']) and $v['checked'] eq true}}checked="checked"{{/if}}{{/if}} data-am-ucheck /> {{$v.name}}
</label>
{{/foreach}}
</div>
</div>
<div class="am-form-group">
<label>开启提现申请<span class="am-form-group-label-tips">默认关闭</span></label>
<label>开启提现申请<span class="am-form-group-label-tips">默认开启</span></label>
<div>
{{foreach $is_whether_list as $v}}
<label class="am-radio-inline m-r-10">
<input type="radio" name="is_cash" value="{{$v.value}}" {{if isset($data['is_cash']) and $data['is_cash'] eq $v['value']}}checked="checked"{{else /}}{{if !isset($data['is_cash']) and isset($v['checked']) and $v['checked'] eq true}}checked="checked"{{/if}}{{/if}} data-am-ucheck /> {{$v.name}}
<input type="radio" name="is_enable_cash" value="{{$v.value}}" {{if isset($data['is_enable_cash']) and $data['is_enable_cash'] eq $v['value']}}checked="checked"{{else /}}{{if !isset($data['is_enable_cash']) and isset($v['checked']) and $v['checked'] eq true}}checked="checked"{{/if}}{{/if}} data-am-ucheck /> {{$v.name}}
</label>
{{/foreach}}
</div>
</div>
<div class="am-form-group">
<label>开启余额支付功能<span class="am-form-group-label-tips">默认关闭</span></label>
<div>
{{foreach $is_whether_list as $v}}
<label class="am-radio-inline m-r-10">
<input type="radio" name="is_pay" value="{{$v.value}}" {{if isset($data['is_pay']) and $data['is_pay'] eq $v['value']}}checked="checked"{{else /}}{{if !isset($data['is_pay']) and isset($v['checked']) and $v['checked'] eq true}}checked="checked"{{/if}}{{/if}} data-am-ucheck /> {{$v.name}}
</label>
{{/foreach}}
</div>
</div>
<div class="am-alert am-alert-warning" data-am-alert="">
<button type="button" class="am-close">&times;</button>
<p>
赠送金额规则小于0或空则不赠送<br>
<span class="mini-tips-text">
固定金额:填写相应的金额即可<br>
比例:填写百分比数值,如 10% 则填写 10小数保留两位、四舍五入
<label>提现申请时间限制</label>
<div class="am-input-group am-input-group-sm">
<input type="number" name="cash_time_limit" placeholder="提现申请时间限制" data-validation-message="请输入提现申请时间限制" class="am-radius" value="{{if empty($data['cash_time_limit'])}}30{{else /}}{{$data.cash_time_limit}}{{/if}}" />
<span class="am-input-group-btn">
<button type="button" class="am-btn am-btn-default am-radius">分钟</button>
</span>
</p>
</div>
<div class="am-alert am-alert-warning" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>
提现申请通过安全验证后,在规定时间内完提现申请操作,单位[ 分钟 ]默认30分钟
</p>
</div>
</div>
<div class="am-form-group">
<label>充值赠送<span class="am-form-group-label-tips">默认固定金额</span></label>
<div>
@ -62,7 +57,17 @@
</label>
{{/foreach}}
</div>
<input type="number" name="recharge_give_value" placeholder="充值赠送金额值" step="0.01" data-validation-message="请填写有效的充值赠送金额值" class="am-radius m-t-10" {{if !empty($data['recharge_give_value']) and $data['recharge_give_value'] gt 0}} value="{{$data.recharge_give_value}}"{{/if}} />
<input type="number" name="recharge_give_value" placeholder="充值赠送金额值" step="0.01" data-validation-message="请填写有效的充值赠送金额值" class="am-radius m-t-5" {{if !empty($data['recharge_give_value']) and $data['recharge_give_value'] gt 0}} value="{{$data.recharge_give_value}}"{{/if}} />
<div class="am-alert am-alert-warning" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>
赠送金额规则小于0或空则不赠送<br>
<span class="mini-tips-text">
固定金额:填写相应的金额即可<br>
比例:填写百分比数值,如 10% 则填写 10小数保留两位、四舍五入
</span>
</p>
</div>
</div>
<div class="am-form-group am-form-group-refreshing">

View File

@ -52,7 +52,7 @@
<!-- form end -->
<!-- list start -->
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
<table class="am-table am-table-striped am-table-hover m-t-10">
<thead>
<tr>
<th class="am-hide-md-down">用户信息</th>

View File

@ -52,7 +52,7 @@
<!-- form end -->
<!-- 列表 -->
<table class="am-table am-table-striped">
<table class="am-table am-table-striped am-table-hover m-t-10">
<thead>
<tr>
<th class="am-hide-md-down">用户信息</th>

View File

@ -52,7 +52,7 @@
<!-- form end -->
<!-- list start -->
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
<table class="am-table am-table-striped am-table-hover m-t-10">
<thead>
<tr>
<th class="am-hide-md-down">用户信息</th>

View File

@ -60,7 +60,7 @@
<!-- form end -->
<!-- 列表 -->
<table class="am-table am-table-striped">
<table class="am-table am-table-striped am-table-hover m-t-10">
<thead>
<tr>
<th class="am-hide-sm-only">业务类型</th>

View File

@ -35,7 +35,7 @@
<li>3. 如果您的手机已失效,可以 <a href="{{:MyUrl('index/safety/index')}}">绑定邮箱</a> 后通过接收邮件完成验证。</li>
<li>4. 请正确输入下方图形验证码,如看不清可点击图片进行更换,输入完成后进行下一步操作。</li>
<li>5. 收到安全验证码后,请在{{:Myc('common_verify_expire_time', 600, true)/60}}分钟内完成验证。</li>
<li>6. 安全验证成功后请在30分钟内完成提现申请。</li>
<li>6. 安全验证成功后,请在{{if empty($plugins_base_data['cash_time_limit'])}}30{{else /}}{{$plugins_base_data.cash_time_limit}}{{/if}}分钟内完成提现申请。</li>
</ul>
</div>
<!-- tips end -->

View File

@ -11,10 +11,10 @@
</li>
<div class="am-topbar-right">
{{if in_array($plugins_control, ['wallet', 'recharge'])}}
{{if in_array($plugins_control, ['wallet', 'recharge']) and (!isset($plugins_base_data['is_enable_recharge']) or $plugins_base_data['is_enable_recharge'] eq 1)}}
<button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-icon-shield" data-am-modal="{target: '#plugins-recharge-pay-modal', width: 260, height: 130}"> 充值</button>
{{/if}}
{{if in_array($plugins_control, ['wallet', 'cash'])}}
{{if in_array($plugins_control, ['wallet', 'cash']) and (!isset($plugins_base_data['is_enable_cash']) or $plugins_base_data['is_enable_cash'] eq 1)}}
<a href="{{:PluginsHomeUrl('wallet', 'cash', 'authinfo')}}" class="am-btn am-btn-success am-topbar-btn am-btn-sm am-icon-money"> 提现</a>
{{/if}}
</div>

View File

@ -63,8 +63,8 @@ class Admin extends Controller
{
// 是否
$is_whether_list = [
0 => array('value' => 0, 'name' => '否', 'checked' => true),
1 => array('value' => 1, 'name' => '是'),
0 => array('value' => 0, 'name' => '否'),
1 => array('value' => 1, 'name' => '是', 'checked' => true),
];
$this->assign('is_whether_list', $is_whether_list);

View File

@ -96,6 +96,13 @@ class Cash extends Common
*/
public function authinfo($params = [])
{
// 是否开启提现申请
if(isset($this->plugins_base['is_enable_cash']) && $this->plugins_base['is_enable_cash'] == 0)
{
$this->assign('msg', '暂时关闭了提现申请');
return $this->fetch('public/tips_error');
}
// 手机号/邮箱
$check_account_list = [
['field' => 'mobile_security', 'value' => 'mobile', 'name' => '手机'],
@ -118,9 +125,19 @@ class Cash extends Common
*/
public function createinfo($params = [])
{
// 是否开启提现申请
if(isset($this->plugins_base['is_enable_cash']) && $this->plugins_base['is_enable_cash'] == 0)
{
$this->assign('msg', '暂时关闭了提现申请');
return $this->fetch('public/tips_error');
}
// 安全验证后规定时间内时间限制
$cash_time_limit = empty($this->plugins_base['cash_time_limit']) ? 30 : $this->plugins_base['cash_time_limit']*60;
// 是否验证成功
$check_time = session('plugins_wallet_cash_check_success');
$check_status = (!empty($check_time) && $check_time+1800 >= time()) ? 1 : 0;
$check_status = (!empty($check_time) && $check_time+$cash_time_limit >= time()) ? 1 : 0;
$this->assign('check_status', $check_status);
// 参数

View File

@ -13,6 +13,7 @@ namespace app\plugins\wallet\index;
use think\Controller;
use app\service\UserService;
use app\service\PaymentService;
use app\service\PluginsService;
use app\plugins\wallet\service\WalletService;
/**
@ -26,6 +27,7 @@ class Common extends Controller
{
protected $user;
protected $user_wallet;
protected $plugins_base;
/**
* 构造方法
@ -72,6 +74,11 @@ class Common extends Controller
// 用户钱包信息
$this->user_wallet = $user_wallet['data'];
$this->assign('user_wallet', $user_wallet['data']);
// 应用配置
$plugins_base = PluginsService::PluginsData('wallet');
$this->plugins_base = $plugins_base['data'];
$this->assign('plugins_base_data', $this->plugins_base);
}
}
?>

View File

@ -100,6 +100,12 @@ class Recharge extends Common
return $this->error('非法访问');
}
// 是否开启充值
if(isset($this->plugins_base['is_enable_recharge']) && $this->plugins_base['is_enable_recharge'] == 0)
{
return DataReturn('暂时关闭了在线充值', -1);
}
// 用户
$params['user'] = $this->user;
$params['user_wallet'] = $this->user_wallet;

View File

@ -45,39 +45,25 @@ return array (
'plugins_service_user_login_end' =>
array (
0 => 'app\\plugins\\userloginrewardintegral\\Hook',
1 => 'app\\plugins\\ucenter\\Hook',
),
'plugins_css' =>
array (
0 => 'app\\plugins\\commonrightnavigation\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook',
2 => 'app\\plugins\\freightfee\\Hook',
3 => 'app\\plugins\\share\\Hook',
4 => 'app\\plugins\\footercustomerservice\\Hook',
5 => 'app\\plugins\\membershiplevel\\Hook',
1 => 'app\\plugins\\freightfee\\Hook',
2 => 'app\\plugins\\share\\Hook',
3 => 'app\\plugins\\footercustomerservice\\Hook',
4 => 'app\\plugins\\membershiplevel\\Hook',
),
'plugins_js' =>
array (
0 => 'app\\plugins\\commonrightnavigation\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook',
2 => 'app\\plugins\\share\\Hook',
1 => 'app\\plugins\\share\\Hook',
),
'plugins_view_common_bottom' =>
array (
0 => 'app\\plugins\\commonrightnavigation\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook',
2 => 'app\\plugins\\expressforkdn\\Hook',
3 => 'app\\plugins\\share\\Hook',
),
'plugins_service_goods_handle_end' =>
array (
0 => 'app\\plugins\\usernotloginhidegoodsprice\\Hook',
1 => 'app\\plugins\\membershiplevel\\Hook',
),
'plugins_service_goods_spec_base' =>
array (
0 => 'app\\plugins\\usernotloginhidegoodsprice\\Hook',
1 => 'app\\plugins\\membershiplevel\\Hook',
1 => 'app\\plugins\\expressforkdn\\Hook',
2 => 'app\\plugins\\share\\Hook',
),
'plugins_service_navigation_header_handle' =>
array (
@ -140,22 +126,6 @@ return array (
array (
0 => 'app\\plugins\\freightfee\\Hook',
),
'plugins_service_user_register_end' =>
array (
0 => 'app\\plugins\\ucenter\\Hook',
),
'plugins_service_user_logout_handle' =>
array (
0 => 'app\\plugins\\ucenter\\Hook',
),
'plugins_service_user_login_pwd_update' =>
array (
0 => 'app\\plugins\\ucenter\\Hook',
),
'plugins_service_user_accounts_update' =>
array (
0 => 'app\\plugins\\ucenter\\Hook',
),
'plugins_view_goods_detail_photo_bottom' =>
array (
0 => 'app\\plugins\\share\\Hook',
@ -168,6 +138,14 @@ return array (
array (
0 => 'app\\plugins\\footercustomerservice\\Hook',
),
'plugins_service_goods_handle_end' =>
array (
0 => 'app\\plugins\\membershiplevel\\Hook',
),
'plugins_service_goods_spec_base' =>
array (
0 => 'app\\plugins\\membershiplevel\\Hook',
),
'plugins_service_user_login_success_record' =>
array (
0 => 'app\\plugins\\membershiplevel\\Hook',

View File

@ -4,9 +4,6 @@
.user-content-body .available .panel-value {
color: #4CAF50;
}
.user-content-body .locking {
margin-top: 5px;
}
.user-content-body .locking .panel-value {
color: #FF9800;
}