Commit 74aab6d0 by 孙亚楠

d

parent 8c9b52c0
...@@ -231,20 +231,7 @@ class BpoSDPJApi { ...@@ -231,20 +231,7 @@ class BpoSDPJApi {
id_name:_cCashInfo.id_name, id_name:_cCashInfo.id_name,
id_no:_cCashInfo.id_no, id_no:_cCashInfo.id_no,
}; };
//判断用户是否提现过 交易状态 00 成功 01 待处理 02 失败 this.ccashinfoSve.formatStatus(resData,_cCashInfo);
if(!_cCashInfo.trade_status){
resData.redirect_code = 1; //跳转到认证
} else{
resData.redirect_code = 2;//跳转到领取结果
resData.trade_status = _cCashInfo.trade_status;
if(resData.trade_status=="00"){
_cCashInfo.amt = system.f2y(_cCashInfo.amt);
}else if(resData.trade_status=="02"){
_cCashInfo.mark = "";
}else if(resData.trade_status=="01"){
_cCashInfo.mark = "待处理";
}
}
return this.getCodeResult(0, resData); return this.getCodeResult(0, resData);
}catch (e) { }catch (e) {
console.log(e); console.log(e);
......
...@@ -95,7 +95,29 @@ class CcashinfoService extends ServiceBase { ...@@ -95,7 +95,29 @@ class CcashinfoService extends ServiceBase {
} }
/**
* fn:格式化状态
* @param ccashinfo
*/
formatStatus(resData,bean){
if (!bean || !resData) {
return;
}
//判断用户是否提现过 交易状态 00 成功 01 待处理 02 失败
if(!bean.trade_status){
resData.redirect_code = 1; //跳转到认证
} else{
resData.redirect_code = 2;//跳转到领取结果
resData.trade_status = bean.trade_status;
if(resData.trade_status=="00"){
resData.amt = system.f2y(bean.amt);
}else if(resData.trade_status=="02"){
resData.trade_desc = bean.trade_desc;
}else if(resData.trade_status=="01"){
resData.trade_desc =bean.trade_desc;
}
}
}
} }
......
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