|
|
|
@ -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('保存失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|