下单展示付款方式
This commit is contained in:
parent
4184b2c7bc
commit
59aacbb71b
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
namespace wstmart\app\controller;
|
||||
use think\Db;
|
||||
use wstmart\common\model\Orders as OM;
|
||||
/**
|
||||
* ============================================================================
|
||||
@ -30,8 +31,14 @@ class Qlgpay extends Base{
|
||||
|
||||
}
|
||||
$userId = $this->getUserId();
|
||||
$shopId = isset($rs['shopId'])?$rs['shopId']:0;
|
||||
$m = new OM();
|
||||
$pay = array_merge($pay,$m->getPayMoney($userId,$pay['needPay']));
|
||||
$pay['shopId'] = $shopId;
|
||||
$shopUserId = Db::name('shops')->where('shopId', '=', $shopId)->value('userId');
|
||||
if ($shopUserId) $pay['shopPaymentInfo'] = Db::name('user_recive')
|
||||
->where('userId', '=', $shopUserId)
|
||||
->find();
|
||||
exit(jsonReturn('',1,$pay));
|
||||
|
||||
}
|
||||
|
@ -3087,7 +3087,7 @@ class Orders extends Base{
|
||||
}else{
|
||||
$where['orderNo'] = $orderNo;
|
||||
}
|
||||
$orders = model('orders')->where($where)->field('needPay,payRand')->select();
|
||||
$orders = model('orders')->where($where)->field('needPay,payRand,shopId')->select();
|
||||
if(empty($orders))return [];
|
||||
$needPay = 0;
|
||||
$payRand = 0;
|
||||
@ -3098,6 +3098,13 @@ class Orders extends Base{
|
||||
$data = array();
|
||||
$data["needPay"] = $needPay;
|
||||
$data["payRand"] = $payRand;
|
||||
$shopId = $orders[0]['shopId'];
|
||||
foreach ($orders as $_) {
|
||||
if ($shopId != $_['shopId']) {
|
||||
$shopId = -1;
|
||||
}
|
||||
}
|
||||
if ($shopId>0) $data["shopId"] = $shopId;
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user