|
|
@@ -301,9 +301,15 @@ class StoreOrder extends BaseModel
|
|
|
$payPostage = self::getOrderPriceGroup($cartInfo, $addr)['storePostage'];
|
|
|
}
|
|
|
if ($shipping_type === 1) {
|
|
|
- if (!$test && !$addressId) return self::setErrorInfo('请选择收货地址!', true);
|
|
|
- if (!$test && (!UserAddress::be(['uid' => $uid, 'id' => $addressId, 'is_del' => 0]) || !($addressInfo = UserAddress::find($addressId))))
|
|
|
- return self::setErrorInfo('地址选择有误!', true);
|
|
|
+// if (!$test && !$addressId) return self::setErrorInfo('请选择收货地址!', true);
|
|
|
+// if (!$test && (!UserAddress::be(['uid' => $uid, 'id' => $addressId, 'is_del' => 0]) || !($addressInfo = UserAddress::find($addressId))))
|
|
|
+// return self::setErrorInfo('地址选择有误!', true);
|
|
|
+ $addressInfo['real_name'] = $real_name;
|
|
|
+ $addressInfo['phone'] = $phone;
|
|
|
+ $addressInfo['province'] = '';
|
|
|
+ $addressInfo['city'] = '';
|
|
|
+ $addressInfo['district'] = '';
|
|
|
+ $addressInfo['detail'] = '';
|
|
|
} else {
|
|
|
if ((!$real_name || !$phone) && !$test) return self::setErrorInfo('请填写姓名和电话', true);
|
|
|
$addressInfo['real_name'] = $real_name;
|
|
|
@@ -863,7 +869,7 @@ class StoreOrder extends BaseModel
|
|
|
}
|
|
|
if ($user['level'] < 2) $user['level'] = 2;
|
|
|
|
|
|
- }else if ($product['price'] == 399 and $product['cate_id'] == 2){
|
|
|
+ }else if ($product['price'] == 199 and $product['cate_id'] == 2){
|
|
|
if ($order['pay_type'] != 'yue'){
|
|
|
if ($user['spread_uid']) self::superior($user['spread_uid'],$user['nickname']);
|
|
|
}
|
|
|
@@ -929,20 +935,20 @@ class StoreOrder extends BaseModel
|
|
|
$top1 = User::where('uid', $uid)->find(); // 一级上级
|
|
|
$price = 0;
|
|
|
if ($top1['level'] == 1){
|
|
|
- $top1['brokerage_price'] += 40;
|
|
|
- $price = 40;
|
|
|
+ $top1['brokerage_price'] += 20;
|
|
|
+ $price = 20;
|
|
|
|
|
|
}elseif ($top1['level'] == 2){
|
|
|
- $top1['brokerage_price'] += 130;
|
|
|
- $price = 130;
|
|
|
+ $top1['brokerage_price'] += 50;
|
|
|
+ $price = 50;
|
|
|
}
|
|
|
- if ($price < 130){
|
|
|
+ if ($price < 50){
|
|
|
if ($top1['spread_uid']){
|
|
|
$user = getParent($top1['uid']);
|
|
|
if ($user){
|
|
|
foreach ($user as $v){
|
|
|
$top = User::where('uid', $v)->find();
|
|
|
- $top['brokerage_price'] += 90;
|
|
|
+ $top['brokerage_price'] += 30;
|
|
|
$top->save();
|
|
|
UserBill::income('佣金', $top['uid'], 'now_money', 'brokerage', 90, 0, $top['brokerage_price'], '用户'.$nickname.'购买礼包,间推399礼包奖励');
|
|
|
}
|