优化线下打款

master
chenzhi 4 years ago
parent 44ceb3ead3
commit d78a1edc8c

@ -17,9 +17,11 @@ class TransferMerchantModel extends Model
"1"=>"官方自营接口(提现免手续费)",
"2"=>"官方接口"
];
const StatementPaymentWhere ="ways = 1 or ways = 3";
const UnderPaymentWhere ="ways = 2 or ways = 3";
public function getStatementPaymentInfo()
{
$res = $this->where("ways = 1 or ways = 3")->find();
$res = $this->where(self::StatementPaymentWhere)->find();
if($res){
return $this->setInfoStr($res);
}
@ -27,7 +29,7 @@ class TransferMerchantModel extends Model
}
public function getUnderPaymentInfo()
{
$res = $this->where("ways = 2 or ways = 3")->find();
$res = $this->where(self::UnderPaymentWhere)->find();
if($res){
return $this->setInfoStr($res);
}
@ -39,9 +41,18 @@ class TransferMerchantModel extends Model
return $item;
}
public function getStatementPaymentConfig()
{
$res = $this->where(self::StatementPaymentWhere)->field("config")->find();
if($res){
return json_decode($res['config'],true);
}
return false;
}
public function getUnderPaymentConfig()
{
$res = $this->where("ways = 1 or ways = 3")->field("config")->find();
$res = $this->where(self::UnderPaymentWhere)->field("config")->find();
if($res){
return json_decode($res['config'],true);
}

@ -360,7 +360,9 @@ class ExcelPaymentController extends BaseController
}
public function getAccountMoney(){
Vendor("Alipay2020/Fund");
$isCanPayment = true;
if(empty(C("ALI_PAYMENT"))){
$isCanPayment = false;
$money = "测试站无法查看";
}else{
$fund = new \Fund(D("Admin/TransferMerchant")->getUnderPaymentConfig());
@ -368,9 +370,11 @@ class ExcelPaymentController extends BaseController
if($money !== -1){
$money = $money['amount'];
}else{
$isCanPayment = false;
$money = "--";
}
}
$this->assign("isCanPayment",$isCanPayment);
$this->assign("money",$money);
}
//以下打款流程

@ -165,18 +165,29 @@
</table>
</div>
</div>
<div style="display: flex;justify-content:space-between;">
<div style="color: red;font-size: 18px;line-height: 82px;">
支付宝账号:{$paymentInfo['account']} &nbsp;&nbsp;&nbsp; 接口类型:{$paymentInfo['is_free_str']}
</div>
<div style="display: flex;padding:20px 10px;line-height: 40px;justify-content:center;">
<input name="verify" type="text" class="login_input verify" value="" placeholder="请填写验证码"/>
<div id="sendSasfeCode" class="g-btn" style="margin-left: 20px;">获取验证码</div>
<div style="margin-left: 20px;">接收验证码手机:{$mobile}</div>
</div>
<div class="search_list" style="display:flex;justify-content:flex-end;width:100%;">
<div class="input-list" style="margin-left: 30px;float: right;">
<a class="sch-btn" href="javascript:;" id="setPayment" style="width: 150px;">确认打款</a>
<div style="display: flex;padding:20px 10px;line-height: 40px;justify-content:center;">
<input name="verify" type="text" class="login_input verify" value="" placeholder="请填写验证码"/>
<div id="sendSasfeCode" class="g-btn" style="margin-left: 20px;">获取验证码</div>
<div style="margin-left: 20px;">接收验证码手机:{$mobile}</div>
</div>
<div class="search_list" style="display:flex;margin: 0;align-items:center;margin-right: 20px;">
<if condition="$isCanPayment">
<a class="sch-btn" href="javascript:;" id="setPayment" style="width: 150px;height: 40px;line-height: 40px;">确认打款</a>
<else />
打款接口错误,无法打款
</if>
</div>
</div>
</div>
<div style="width: 100vw;height: 100vh;padding: 0;position: absolute;top: 0;z-index: 9999;display: none;" id="creat_msg">
<div class="layui-layer layui-layer-dialog layui-layer-border layui-layer-msg layui-layer-hui"

Loading…
Cancel
Save