mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
优化代码
This commit is contained in:
parent
e1b6d608fe
commit
397ec0c48f
@ -113,7 +113,7 @@ class StoreOrderController
|
||||
public function detail(Request $request, StoreOrderServices $services, UserServices $userServices, $orderId)
|
||||
{
|
||||
$economizeServices = app()->make(StoreOrderEconomizeServices::class);
|
||||
$orderData = $services->getUserOrderByKey($economizeServices, $orderId, (int)$request->uid());
|
||||
$orderData = $services->getUserOrderByKey($economizeServices, $orderId, 0);
|
||||
$orderData['nickname'] = $userServices->value(['uid' => $orderData['uid']], 'nickname');
|
||||
return app('json')->success($orderData);
|
||||
}
|
||||
|
||||
@ -138,6 +138,7 @@ class StorePinkDao extends BaseDao
|
||||
/**
|
||||
* 获取拼团完成的个数
|
||||
* @return float
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function getPinkOkSumTotalNum()
|
||||
{
|
||||
|
||||
@ -446,8 +446,9 @@ class StoreOrderDao extends BaseDao
|
||||
|
||||
/**
|
||||
* 获取订单详情
|
||||
* @param $uid
|
||||
* @param $key
|
||||
* @param string $key
|
||||
* @param int $uid
|
||||
* @param array $with
|
||||
* @return array|\think\Model|null
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
@ -455,7 +456,9 @@ class StoreOrderDao extends BaseDao
|
||||
*/
|
||||
public function getUserOrderDetail(string $key, int $uid, $with = [])
|
||||
{
|
||||
return $this->getOne(['order_id|unique' => $key, 'uid' => $uid, 'is_del' => 0], '*', $with);
|
||||
$where = ['order_id|unique' => $key, 'is_del' => 0];
|
||||
if ($uid > 0) $where = $where + ['uid' => $uid];
|
||||
return $this->getOne($where, '*', $with);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -88,6 +88,9 @@ class StorePinkServices extends BaseServices
|
||||
* 参团人员
|
||||
* @param int $id
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function getPinkMember(int $id)
|
||||
{
|
||||
@ -96,8 +99,11 @@ class StorePinkServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 拼团退款
|
||||
* @param $id
|
||||
* @param $order
|
||||
* @return bool
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function setRefundPink($order)
|
||||
{
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view class='text acea-row row-between'>
|
||||
<view class='name line2'>{{item.productInfo.store_name}}</view>
|
||||
<view class='money'>
|
||||
<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price)).toFixed(2)}}
|
||||
<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}}
|
||||
</view>
|
||||
<view class='num'>x{{item.cart_num}}</view>
|
||||
</view>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user