Browse Source

checkredis

undefined
娄梦宁 4 years ago
parent
commit
084f8a8695
7 changed files with 19 additions and 19 deletions
  1. +13
    -13
      addons/unishop/behavior/OrderFlash.php
  2. +1
    -1
      addons/unishop/controller/Address.php
  3. +1
    -1
      addons/unishop/controller/Ads.php
  4. +1
    -1
      addons/unishop/controller/Category.php
  5. +1
    -1
      addons/unishop/controller/Order.php
  6. +1
    -1
      addons/unishop/controller/Product.php
  7. +1
    -1
      addons/unishop/controller/User.php

+ 13
- 13
addons/unishop/behavior/OrderFlash.php View File

@@ -78,18 +78,18 @@ class OrderFlash


// 条件三
$delivery = (new DeliveryRuleModel())->cityInScopeOfDelivery($extra['city_id'], $extra['delivery_id']);
if (!$delivery) {
throw new Exception(__('Your receiving address is not within the scope of delivery'));
} else {
if ($delivery['min'] > array_sum($numbers)) {
throw new Exception(__('You must purchase at least %s item to use this shipping method', $delivery['min']));
}
}
$address = (new Address)->where(['id' => $extra['address_id'], 'user_id' => $extra['userId']])->find();
if (!$address) {
throw new Exception(__('Address not exist'));
}
// $delivery = (new DeliveryRuleModel())->cityInScopeOfDelivery($extra['city_id'], $extra['delivery_id']);
// if (!$delivery) {
// throw new Exception(__('Your receiving address is not within the scope of delivery'));
// } else {
// if ($delivery['min'] > array_sum($numbers)) {
// throw new Exception(__('You must purchase at least %s item to use this shipping method', $delivery['min']));
// }
// }
// $address = (new Address)->where(['id' => $extra['address_id'], 'user_id' => $extra['userId']])->find();
// if (!$address) {
// throw new Exception(__('Address not exist'));
// }

// 条件四
$orderPrice = 0;
@@ -108,7 +108,7 @@ class OrderFlash
// 没有优惠券
$coupon = [];

$params = [$products, $delivery, $coupon, $baseProductInfo, $address, $orderPrice, $specs, $numbers];
$params = [$products, [], $coupon, $baseProductInfo, [], $orderPrice, $specs, $numbers];
}

/**


+ 1
- 1
addons/unishop/controller/Address.php View File

@@ -27,7 +27,7 @@ class Address extends Base
* 允许频繁访问的接口
* @var array
*/
protected $frequently = ['area'];
protected $frequently = [];

/**
* 全部收货地址


+ 1
- 1
addons/unishop/controller/Ads.php View File

@@ -12,7 +12,7 @@ use app\common\controller\Api;
class Ads extends Api
{

protected $noNeedLogin = ['index'];
protected $noNeedLogin = [];
protected $noNeedRight = ['*'];

public function _initialize()


+ 1
- 1
addons/unishop/controller/Category.php View File

@@ -7,7 +7,7 @@ use app\common\controller\Api;
class Category extends Api
{

protected $noNeedLogin = ['all','menu','inlist'];
protected $noNeedLogin = [];
protected $noNeedRight = ['*'];

public function _initialize()


+ 1
- 1
addons/unishop/controller/Order.php View File

@@ -38,7 +38,7 @@ class Order extends Base
*/
protected $frequently = ['getorders'];

protected $noNeedLogin = ['count'];
protected $noNeedLogin = [];

/**
* 创建订单


+ 1
- 1
addons/unishop/controller/Product.php View File

@@ -12,7 +12,7 @@ use think\Exception;

class Product extends Base
{
protected $noNeedLogin = ['detail', 'lists'];
protected $noNeedLogin = [];

/**
* 获取产品数据


+ 1
- 1
addons/unishop/controller/User.php View File

@@ -19,7 +19,7 @@ use think\Validate;

class User extends Base
{
protected $noNeedLogin = ['login', 'status', 'authSession', 'decryptData', 'register', 'resetpwd', 'loginForWechatMini'];
protected $noNeedLogin = ['login', 'status', 'authSession', 'decryptData', 'register', 'resetpwd', 'loginForWechatMini','checkRedis'];

/**
* 会员登录


Loading…
Cancel
Save