新增打款配置

master
chenzhi 5 years ago
parent 748ec401f3
commit ba9468fedc

@ -151,12 +151,31 @@ class ToolController extends ThinkController {
{
$this->BaseConfig("transfer_set");
$this->meta_title = '打款设置';
//TODO:获取 当前账号余额
$money = 10000;
$this->assign("money",$money);
$this->display();
}
public function saveTransferSet()
{
$name = $_POST['name'];
$config = I('config');
if(empty($config['user_id']) || empty($config['user_num']) || empty($config['phone'])){
$this->error('会员id,打款账号,打款验证手机号 均不允许为空');
}
if(!checkPhone($config['phone'])) {
$this->error('联系电话格式不正确');
}
$data = array('config'=>json_encode($config));
$map['name']=$name;
$flag = M('Tool','tab_')->where($map)->setField($data);
if($flag !== false){
$this->success('保存成功');
}else{
$this->error('保存失败');
}
}
/**

@ -10,7 +10,7 @@
<div class="tab-wrap">
<div class="tab-content tabcon1711 tabcon17112">
<div id="tab1" class="tab-pane in tab1">
<form action="{:U('saveTool')}" method="post" class="form-horizontal OSS form_info_ml">
<form action="{:U('saveTransferSet')}" method="post" class="form-horizontal OSS form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
@ -36,9 +36,9 @@
</tr>
<tr>
<td class="l noticeinfo">打款验证手机号</td>
<td class="l noticeinfo">当前账号余额</td>
<td class="r table_radio">
<div>4564564646</div>
<div>{$money}元</div>
</td>
</tr>

Loading…
Cancel
Save