wmc 10 months ago
commit b5564d37bb
  1. 2
      .gitignore
  2. 6
      app/api/controller/Recovery.php
  3. 8
      app/api/service/User.php
  4. 6
      app/api/service/identity/PaySuccess.php
  5. 7
      app/common/service/server/Order.php
  6. BIN
      public/static/tabbar/cart-active.png
  7. BIN
      public/static/tabbar/cart.png
  8. BIN
      public/static/tabbar/cate-active.png
  9. BIN
      public/static/tabbar/cate.png
  10. BIN
      public/static/tabbar/home-active.png
  11. BIN
      public/static/tabbar/user-active.png
  12. BIN
      public/static/tabbar/user.png

2
.gitignore vendored

@ -3,3 +3,5 @@
*.log
/vendor
/runtime
/public/uploads
/public/static

@ -47,8 +47,8 @@ class Recovery extends Controller
{
$recovery_name = $this->request->post('recovery_name');
$category_id = intval($this->request->post('category_id'));
$order_field = $this->request->post('order_field');
$order_sort = $this->request->post('order_sort', 'desc');
$order_field = (string)$this->request->post('order_field');
$order_sort = (string)$this->request->post('order_sort', 'desc');
$where = [];
if ($recovery_name) {
$where[] = ['server_recovery.recovery_name', 'like', "%$recovery_name%"];
@ -58,7 +58,7 @@ class Recovery extends Controller
}
$where[] = ['server_recovery.status', '=', 1];
$model = new ServerRecovery();
$list = $model->getList($where, $order_field, $order_sort);
$list = $model->getList($where, 15, $order_field, $order_sort);
$data['list'] = $list->items();
$data['total'] = $list->total();
if (!$list->isEmpty()) {

@ -128,11 +128,11 @@ class User extends UserService
*/
public static function isStore(): bool
{
$userType = static::getCurrentLoginUserType();
if ($userType && $userType == UserTypeEnum::STORE) {
$userId = self::getCurrentLoginUserId();
$userInfo = static::getCurrentLoginUser(true);
if ($userInfo && $userInfo['user_type'] == UserTypeEnum::STORE) {
$userId = $userInfo['user_id'];
//商家表里有没有
$model = new \app\api\model\Store();
$model = new \app\common\model\store\User();
$store_id = $model->where(['user_id' => $userId])->value('store_id');
if ($store_id) {
return true;

@ -385,9 +385,11 @@ class PaySuccess extends BaseService
}
if (!User::isDealerUser($userInfo['user_id'])) {
// 新增分销商用户
$model = new UserModel();
$mobile = $model->where(['user_id' => $userInfo['user_id']])->value('mobile');
User::add($userInfo['user_id'], [
'real_name' => $userInfo['mobile'],
'mobile' => $userInfo['mobile'],
'real_name' => $mobile,
'mobile' => $mobile,
]);
}
}

@ -64,7 +64,7 @@ class Order extends BaseService
public static function cancelOrder(array $order): bool
{
//未完成 未取消
if (!empty($order['order_status']) && $order['order_status'] != ServerEnum::COMPLETED || $order['order_status'] != ServerEnum::CANCELLED) {
if (!empty($order['order_status']) && self::checkCancel($order)) {
if (!empty($order['coupon_id'])) {
// 回退用户优惠券
$order['coupon_id'] > 0 && UserCouponModel::setIsUse($order['coupon_id'], false);
@ -95,7 +95,8 @@ class Order extends BaseService
*/
public static function checkCancel($order): bool
{
if (!empty($order['order_status']) && $order['order_status'] != ServerEnum::COMPLETED || $order['order_status'] != ServerEnum::CANCELLED) {
if (!empty($order['order_status']) && !in_array($order['order_status'], [ServerEnum::COMPLETED, ServerEnum::CANCELLED])) {
return true;
}
return false;
@ -144,7 +145,7 @@ class Order extends BaseService
public static function checkPay($order): bool
{
$userId = UserService::getCurrentLoginUserId();
if (!empty($order) && $order['pay_status'] == PayStatus::PENDING && $order['user_id'] == $userId) {
if (!empty($order) && $order['pay_status'] == PayStatus::PENDING && $order['user_id'] == $userId && $order['order_status'] == ServerEnum::APPLYPAY) {
return true;
}
return false;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Loading…
Cancel
Save