evoxwht пре 4 година
родитељ
комит
3514322969

+ 1 - 1
crmeb/app/adminapi/controller/v1/setting/SystemGroupData.php

@@ -2,7 +2,7 @@
 // +----------------------------------------------------------------------
 // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
 // +----------------------------------------------------------------------
-// | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
+// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
 // +----------------------------------------------------------------------
 // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
 // +----------------------------------------------------------------------

+ 1 - 0
crmeb/app/api/controller/v1/order/StoreOrderController.php

@@ -62,6 +62,7 @@ class StoreOrderController
      */
     protected $getChennel = [
         'weixin' => 0,
+        'routine' => 1,
         'weixinh5' => 2,
         'pc' => 3
     ];

+ 0 - 1
crmeb/app/common.php

@@ -816,7 +816,6 @@ if (!function_exists('get_image_thumb')) {
             $image = $type == 'all' ? $data : $data[$type] ?? $filePath;
         } catch (\Throwable $e) {
             $image = $filePath;
-//            throw new ValidateException($e->getMessage());
             \think\facade\Log::error('获取缩略图失败,原因:' . $e->getMessage() . '----' . $e->getFile() . '----' . $e->getLine() . '----' . $filePath);
         }
         $data = parse_url($image);

+ 0 - 3
crmeb/app/dao/user/UserWechatUserDao.php

@@ -192,9 +192,6 @@ class UserWechatUserDao extends BaseDao
                 case "nickname":
                 case "phone":
                     $model = $model->where($userAlias . trim($fieldKey), 'like', "%" . trim($nickname) . "%");
-//                    break;
-//                case "phone":
-//                    $model = $model->where($userAlias . trim($fieldKey), 'like', "%" . trim($nickname) . "%");
                     break;
                 case "uid":
                     $model = $model->where($userAlias . trim($fieldKey), trim($nickname));

+ 1 - 1
crmeb/app/services/user/LoginServices.php

@@ -103,7 +103,7 @@ class LoginServices extends BaseServices
                     if ($spreadUid) {
                         $spreadUid = (int)$spreadUid;
                         $data['spread_uid'] = $spreadUid;
-                        $data['spread_time'] = $userInfo->last_time;
+                        $data['spread_time'] = time();
                         $this->dao->incField($spreadUid, 'spread_count', 1);
                         //绑定用户后置事件
                         event('user.register', [$spreadUid, $userInfo['user_type'], $userInfo['nickname'], $userInfo['uid'], 0]);

+ 9 - 10
crmeb/app/services/user/UserAddressServices.php

@@ -165,18 +165,17 @@ class UserAddressServices extends BaseServices
     public function editAddress(int $uid, array $addressInfo)
     {
         if ($addressInfo['id'] == 0) {
+            $where = [
+                ['uid', '=', $uid],
+                ['real_name', '=', $addressInfo['real_name']],
+                ['phone', '=', $addressInfo['phone']],
+                ['detail', '=', $addressInfo['detail']],
+                ['is_del', '=', 0]
+            ];
             if (isset($addressInfo['address']['city_id'])) {
-                $where[] = ['city_id', '=', $addressInfo['address']['city_id']];
-            } else {
-                $where = [];
+                $where += ['city_id', '=', $addressInfo['address']['city_id']];
             }
-            $res = $this->dao->getCount([
-                    ['uid', '=', $uid],
-                    ['real_name', '=', $addressInfo['real_name']],
-                    ['phone', '=', $addressInfo['phone']],
-                    ['detail', '=', $addressInfo['detail']],
-                    ['is_del', '=', 0]
-                ] + $where);
+            $res = $this->dao->getCount($where);
             if ($res) throw new ValidateException('地址已存在,请勿重复添加');
         }
 

+ 1 - 1
crmeb/app/services/user/UserServices.php

@@ -1530,7 +1530,7 @@ class UserServices extends BaseServices
     {
         switch ($data['type']) {
             case 'week':
-                $startTime = strtotime('this week');
+                $startTime = strtotime('this week Monday');
                 $endTime = time();
                 break;
             case 'month':