Commit 5f7ccecb by 冷斌

fix bug

parent e2ee6bb2
......@@ -39,7 +39,7 @@ class ProfitController extends HomebaseController
$this->display();
}
public function info()
protected function getInfo()
{
$uid=I("uid");
$token=I("token");
......@@ -76,6 +76,12 @@ class ProfitController extends HomebaseController
}
}
$data['certification'] = $certification;
return $data;
}
public function info()
{
$data = $this->getInfo();
echo json_encode(array("ret"=>200,'data'=>$data,'msg'=>''));
die;
}
......@@ -129,13 +135,6 @@ class ProfitController extends HomebaseController
die;
}
public function withdraw()
{
$uid=I("uid");
......@@ -149,6 +148,13 @@ class ProfitController extends HomebaseController
$this->display();
}
public function withdrawInfo()
{
$data = $this->getInfo();
echo json_encode(array("ret"=>200,'data'=>$data,'msg'=>''));
die;
}
}
......@@ -61,7 +61,7 @@
//数据集
wayNum: 1, // 1支付宝 2银行卡
allow_money: 999, // 可提现金额
withdraw_money:'', // 提现金额
withdraw_money:'', // 提现金额
},
methods: {
//事件
......@@ -85,6 +85,31 @@
},
created: function () {
//加载触发函数
let _this = this;
let url = _this.url('/index.php?g=Appapi&m=Profit&a=withdrawInfo');
let info = _this.info();
$.ajax({
url: url,
dataType: "json",
type: "GET",
success: function (data) {
if (data.ret == 200) {
let d = data.data;
// _this.certification = d.certification;
if (d.identity != 1 || d.certification != 1) {
window.location.href = _this.url('/index.php?g=Appapi&m=Profit&a=index');
return;
}
} else {
layer.msg(data.msg);
}
},
error: function (e) {
layer.msg(e.msg);
}
})
}
});
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment