diff --git a/addons/unishop/controller/Order.php b/addons/unishop/controller/Order.php
index b1d36e9..4d64bc8 100644
--- a/addons/unishop/controller/Order.php
+++ b/addons/unishop/controller/Order.php
@@ -77,14 +77,14 @@ class Order extends Base
}
/** 默认地址 **/
- $address = (new AddressModel)->where(['user_id' => $user_id, 'is_default' => AddressModel::IS_DEFAULT_YES])->find();
- if ($address) {
- $area = (new Area)->whereIn('id', [$address->province_id, $address->city_id, $address->area_id])->column('name', 'id');
- $address = $address->toArray();
- $address['province']['name'] = $area[$address['province_id']];
- $address['city']['name'] = $area[$address['city_id']];
- $address['area']['name'] = $area[$address['area_id']];
- }
+// $address = (new AddressModel)->where(['user_id' => $user_id, 'is_default' => AddressModel::IS_DEFAULT_YES])->find();
+// if ($address) {
+// $area = (new Area)->whereIn('id', [$address->province_id, $address->city_id, $address->area_id])->column('name', 'id');
+// $address = $address->toArray();
+// $address['province']['name'] = $area[$address['province_id']];
+// $address['city']['name'] = $area[$address['city_id']];
+// $address['area']['name'] = $area[$address['area_id']];
+// }
/** 可用优惠券 **/
@@ -101,8 +101,8 @@ class Order extends Base
/** 运费数据 **/
- $cityId = $address['city_id'] ? $address['city_id'] : 0;
- $delivery = (new DeliveryRuleModel())->getDelivetyByArea($cityId);
+// $cityId = $address['city_id'] ? $address['city_id'] : 0;
+// $delivery = (new DeliveryRuleModel())->getDelivetyByArea($cityId);
foreach ($productData as &$product) {
$product['image'] = Config::getImagesFullUrl($product['image']);
@@ -112,9 +112,9 @@ class Order extends Base
$this->success('', [
'product' => $productData,
- 'address' => $address,
+// 'address' => $address,
'coupon' => $coupon,
- 'delivery' => $delivery['list']
+// 'delivery' => $delivery['list']
]);
} catch (Exception $e) {
diff --git a/addons/unishop/model/Order.php b/addons/unishop/model/Order.php
index 5deab7c..f9f5fb4 100644
--- a/addons/unishop/model/Order.php
+++ b/addons/unishop/model/Order.php
@@ -238,9 +238,9 @@ class Order extends Model
// 订单费用
//$orderPrice;
// 运费
- $deliveryPrice = Delivery::algorithm($delivery, $data['number']);
+// $deliveryPrice = Delivery::algorithm($delivery, $data['number']);
// 总费用
- $totalPrice = bcadd(bcsub($orderPrice, $discountPrice, 2), $deliveryPrice, 2);
+ $totalPrice = bcadd(bcsub($orderPrice, $discountPrice, 2), 0, 2);
$out_trade_no = date('Ymd',time()).uniqid().$userId;
(new self)->save([
@@ -249,7 +249,7 @@ class Order extends Model
'out_trade_no' => $out_trade_no,
'order_price' => $orderPrice,
'discount_price' => $discountPrice,
- 'delivery_price' => $deliveryPrice,
+// 'delivery_price' => $deliveryPrice,
'total_price' => $totalPrice,
'ip' => $_SERVER['REMOTE_ADDR'] ?? '',
'remark' => $data['remark'] ?? '',
diff --git a/addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue b/addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue
index c6e340f..011a2a2 100644
--- a/addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue
+++ b/addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue
@@ -84,7 +84,7 @@