查看物流页面金额显示问题修复

This commit is contained in:
evoxwht 2023-03-31 17:08:24 +08:00
parent 8f26575d54
commit 8456a5f935
2 changed files with 9 additions and 1 deletions

View File

@ -467,8 +467,14 @@ class StoreOrderController
/**
* 订单 查看物流
* @param Request $request
* @param StoreOrderCartInfoServices $services
* @param ExpressServices $expressServices
* @param $uni
* @param string $type
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function express(Request $request, StoreOrderCartInfoServices $services, ExpressServices $expressServices, $uni, $type = '')
{
@ -484,6 +490,7 @@ class StoreOrderController
foreach ($order['cart_info'] as $k => $cart) {
$cartNew['cart_num'] = $cart['cart_num'];
$cartNew['truePrice'] = $cart['truePrice'];
$cartNew['postage_price'] = $cart['postage_price'];
$cartNew['productInfo']['image'] = $cart['productInfo']['image'];
$cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
$cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';
@ -507,6 +514,7 @@ class StoreOrderController
$cart = json_decode($cart, true);
$cartNew['cart_num'] = $cart['cart_num'];
$cartNew['truePrice'] = $cart['truePrice'];
$cartNew['postage_price'] = $cart['postage_price'];
$cartNew['productInfo']['image'] = $cart['productInfo']['image'];
$cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
$cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';

View File

@ -8,7 +8,7 @@
<view class='text acea-row row-between'>
<view class='name line2'>{{item.productInfo.store_name}}</view>
<view class='money'>
<view>{{$t(`¥`)}}{{item.truePrice}}</view>
<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}}</view>
<view>x{{item.cart_num}}</view>
</view>
</view>