提交 830ab116 编写于 作者: G gongfuxiang

钱包优化

上级 de48ea58
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="items"> <div class="items">
<label>开启充值</label> <label>开启充值</label>
<div> <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 /}} {{else /}}
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="items"> <div class="items">
<label>开启提现申请</label> <label>开启提现申请</label>
<div> <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 /}} {{else /}}
...@@ -43,13 +43,14 @@ ...@@ -43,13 +43,14 @@
</li> </li>
<li> <li>
<div class="items"> <div class="items">
<label>开启余额支付功能</label> <label>提现申请时间限制</label>
<div> <div>
{{if isset($data['is_pay']) and $data['is_pay'] eq 1}} {{if empty($data['cash_time_limit'])}}
30
{{else /}} {{else /}}
{{$data.cash_time_limit}}
{{/if}} {{/if}}
分钟
</div> </div>
</div> </div>
</li> </li>
......
...@@ -11,48 +11,43 @@ ...@@ -11,48 +11,43 @@
</legend> </legend>
<div class="am-form-group"> <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> <div>
{{foreach $is_whether_list as $v}} {{foreach $is_whether_list as $v}}
<label class="am-radio-inline m-r-10"> <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> </label>
{{/foreach}} {{/foreach}}
</div> </div>
</div> </div>
<div class="am-form-group"> <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> <div>
{{foreach $is_whether_list as $v}} {{foreach $is_whether_list as $v}}
<label class="am-radio-inline m-r-10"> <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> </label>
{{/foreach}} {{/foreach}}
</div> </div>
</div> </div>
<div class="am-form-group"> <div class="am-form-group">
<label>开启余额支付功能<span class="am-form-group-label-tips">默认关闭</span></label> <label>提现申请时间限制</label>
<div> <div class="am-input-group am-input-group-sm">
{{foreach $is_whether_list as $v}} <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}}" />
<label class="am-radio-inline m-r-10"> <span class="am-input-group-btn">
<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}} <button type="button" class="am-btn am-btn-default am-radius">分钟</button>
</label> </span>
{{/foreach}} </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> </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(小数保留两位、四舍五入)
</span>
</p>
</div>
<div class="am-form-group"> <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> <div>
...@@ -62,7 +57,17 @@ ...@@ -62,7 +57,17 @@
</label> </label>
{{/foreach}} {{/foreach}}
</div> </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>
<div class="am-form-group am-form-group-refreshing"> <div class="am-form-group am-form-group-refreshing">
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- form end --> <!-- form end -->
<!-- list start --> <!-- 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> <thead>
<tr> <tr>
<th class="am-hide-md-down">用户信息</th> <th class="am-hide-md-down">用户信息</th>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- form end --> <!-- form end -->
<!-- 列表 --> <!-- 列表 -->
<table class="am-table am-table-striped"> <table class="am-table am-table-striped am-table-hover m-t-10">
<thead> <thead>
<tr> <tr>
<th class="am-hide-md-down">用户信息</th> <th class="am-hide-md-down">用户信息</th>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- form end --> <!-- form end -->
<!-- list start --> <!-- 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> <thead>
<tr> <tr>
<th class="am-hide-md-down">用户信息</th> <th class="am-hide-md-down">用户信息</th>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<!-- form end --> <!-- form end -->
<!-- 列表 --> <!-- 列表 -->
<table class="am-table am-table-striped"> <table class="am-table am-table-striped am-table-hover m-t-10">
<thead> <thead>
<tr> <tr>
<th class="am-hide-sm-only">业务类型</th> <th class="am-hide-sm-only">业务类型</th>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<li>3. 如果您的手机已失效,可以 <a href="{{:MyUrl('index/safety/index')}}">绑定邮箱</a> 后通过接收邮件完成验证。</li> <li>3. 如果您的手机已失效,可以 <a href="{{:MyUrl('index/safety/index')}}">绑定邮箱</a> 后通过接收邮件完成验证。</li>
<li>4. 请正确输入下方图形验证码,如看不清可点击图片进行更换,输入完成后进行下一步操作。</li> <li>4. 请正确输入下方图形验证码,如看不清可点击图片进行更换,输入完成后进行下一步操作。</li>
<li>5. 收到安全验证码后,请在{{:Myc('common_verify_expire_time', 600, true)/60}}分钟内完成验证。</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> </ul>
</div> </div>
<!-- tips end --> <!-- tips end -->
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
</li> </li>
<div class="am-topbar-right"> <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> <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}}
{{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> <a href="{{:PluginsHomeUrl('wallet', 'cash', 'authinfo')}}" class="am-btn am-btn-success am-topbar-btn am-btn-sm am-icon-money"> 提现</a>
{{/if}} {{/if}}
</div> </div>
......
...@@ -63,8 +63,8 @@ class Admin extends Controller ...@@ -63,8 +63,8 @@ class Admin extends Controller
{ {
// 是否 // 是否
$is_whether_list = [ $is_whether_list = [
0 => array('value' => 0, 'name' => '否', 'checked' => true), 0 => array('value' => 0, 'name' => '否'),
1 => array('value' => 1, 'name' => '是'), 1 => array('value' => 1, 'name' => '是', 'checked' => true),
]; ];
$this->assign('is_whether_list', $is_whether_list); $this->assign('is_whether_list', $is_whether_list);
......
...@@ -96,6 +96,13 @@ class Cash extends Common ...@@ -96,6 +96,13 @@ class Cash extends Common
*/ */
public function authinfo($params = []) 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 = [ $check_account_list = [
['field' => 'mobile_security', 'value' => 'mobile', 'name' => '手机'], ['field' => 'mobile_security', 'value' => 'mobile', 'name' => '手机'],
...@@ -118,9 +125,19 @@ class Cash extends Common ...@@ -118,9 +125,19 @@ class Cash extends Common
*/ */
public function createinfo($params = []) 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_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); $this->assign('check_status', $check_status);
// 参数 // 参数
......
...@@ -13,6 +13,7 @@ namespace app\plugins\wallet\index; ...@@ -13,6 +13,7 @@ namespace app\plugins\wallet\index;
use think\Controller; use think\Controller;
use app\service\UserService; use app\service\UserService;
use app\service\PaymentService; use app\service\PaymentService;
use app\service\PluginsService;
use app\plugins\wallet\service\WalletService; use app\plugins\wallet\service\WalletService;
/** /**
...@@ -26,6 +27,7 @@ class Common extends Controller ...@@ -26,6 +27,7 @@ class Common extends Controller
{ {
protected $user; protected $user;
protected $user_wallet; protected $user_wallet;
protected $plugins_base;
/** /**
* 构造方法 * 构造方法
...@@ -72,6 +74,11 @@ class Common extends Controller ...@@ -72,6 +74,11 @@ class Common extends Controller
// 用户钱包信息 // 用户钱包信息
$this->user_wallet = $user_wallet['data']; $this->user_wallet = $user_wallet['data'];
$this->assign('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);
} }
} }
?> ?>
\ No newline at end of file
...@@ -100,6 +100,12 @@ class Recharge extends Common ...@@ -100,6 +100,12 @@ class Recharge extends Common
return $this->error('非法访问'); 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'] = $this->user;
$params['user_wallet'] = $this->user_wallet; $params['user_wallet'] = $this->user_wallet;
......
...@@ -45,39 +45,25 @@ return array ( ...@@ -45,39 +45,25 @@ return array (
'plugins_service_user_login_end' => 'plugins_service_user_login_end' =>
array ( array (
0 => 'app\\plugins\\userloginrewardintegral\\Hook', 0 => 'app\\plugins\\userloginrewardintegral\\Hook',
1 => 'app\\plugins\\ucenter\\Hook',
), ),
'plugins_css' => 'plugins_css' =>
array ( array (
0 => 'app\\plugins\\commonrightnavigation\\Hook', 0 => 'app\\plugins\\commonrightnavigation\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook', 1 => 'app\\plugins\\freightfee\\Hook',
2 => 'app\\plugins\\freightfee\\Hook', 2 => 'app\\plugins\\share\\Hook',
3 => 'app\\plugins\\share\\Hook', 3 => 'app\\plugins\\footercustomerservice\\Hook',
4 => 'app\\plugins\\footercustomerservice\\Hook', 4 => 'app\\plugins\\membershiplevel\\Hook',
5 => 'app\\plugins\\membershiplevel\\Hook',
), ),
'plugins_js' => 'plugins_js' =>
array ( array (
0 => 'app\\plugins\\commonrightnavigation\\Hook', 0 => 'app\\plugins\\commonrightnavigation\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook', 1 => 'app\\plugins\\share\\Hook',
2 => 'app\\plugins\\share\\Hook',
), ),
'plugins_view_common_bottom' => 'plugins_view_common_bottom' =>
array ( array (
0 => 'app\\plugins\\commonrightnavigation\\Hook', 0 => 'app\\plugins\\commonrightnavigation\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook', 1 => 'app\\plugins\\expressforkdn\\Hook',
2 => 'app\\plugins\\expressforkdn\\Hook', 2 => 'app\\plugins\\share\\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',
), ),
'plugins_service_navigation_header_handle' => 'plugins_service_navigation_header_handle' =>
array ( array (
...@@ -140,22 +126,6 @@ return array ( ...@@ -140,22 +126,6 @@ return array (
array ( array (
0 => 'app\\plugins\\freightfee\\Hook', 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' => 'plugins_view_goods_detail_photo_bottom' =>
array ( array (
0 => 'app\\plugins\\share\\Hook', 0 => 'app\\plugins\\share\\Hook',
...@@ -168,6 +138,14 @@ return array ( ...@@ -168,6 +138,14 @@ return array (
array ( array (
0 => 'app\\plugins\\footercustomerservice\\Hook', 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' => 'plugins_service_user_login_success_record' =>
array ( array (
0 => 'app\\plugins\\membershiplevel\\Hook', 0 => 'app\\plugins\\membershiplevel\\Hook',
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
.user-content-body .available .panel-value { .user-content-body .available .panel-value {
color: #4CAF50; color: #4CAF50;
} }
.user-content-body .locking {
margin-top: 5px;
}
.user-content-body .locking .panel-value { .user-content-body .locking .panel-value {
color: #FF9800; color: #FF9800;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册