From 3bee77da197aa4823c16827470743a1fd80b9eae Mon Sep 17 00:00:00 2001 From: From-wh Date: Tue, 4 Jul 2023 16:16:10 +0800 Subject: [PATCH 01/40] =?UTF-8?q?improve:=20=E5=9B=BE=E7=89=87=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/components/uploadPictures/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/template/admin/src/components/uploadPictures/index.vue b/template/admin/src/components/uploadPictures/index.vue index 73f111a29..354345cc0 100644 --- a/template/admin/src/components/uploadPictures/index.vue +++ b/template/admin/src/components/uploadPictures/index.vue @@ -396,6 +396,7 @@ export default { pid: this.pids, images: this.ids.toString(), }; + if (!data.images) return; moveApi(data) .then(async (res) => { this.$Message.success(res.msg); From e4bd6e487004c7aca54a0e0460127592ca5b848b Mon Sep 17 00:00:00 2001 From: From-wh Date: Tue, 4 Jul 2023 18:03:25 +0800 Subject: [PATCH 02/40] =?UTF-8?q?style:=20=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/marketing/storeCouponIssue/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/admin/src/pages/marketing/storeCouponIssue/index.vue b/template/admin/src/pages/marketing/storeCouponIssue/index.vue index c3717c213..814366872 100644 --- a/template/admin/src/pages/marketing/storeCouponIssue/index.vue +++ b/template/admin/src/pages/marketing/storeCouponIssue/index.vue @@ -18,7 +18,7 @@ - + diff --git a/template/uni-app/pages/users/promoter-order/index.vue b/template/uni-app/pages/users/promoter-order/index.vue index 468687318..f597dcfac 100644 --- a/template/uni-app/pages/users/promoter-order/index.vue +++ b/template/uni-app/pages/users/promoter-order/index.vue @@ -4,7 +4,7 @@ - {{$t(`累积推广订单`)}} + {{$t(`累计推广订单`)}} {{count || 0}}{{$t(`单`)}} @@ -34,9 +34,7 @@ {{$t(`订单编号`)}}:{{child.order_id}} - {{$t(`返佣时间`)}}:{{child.time}} - {{$t(`下单时间`)}}:{{child.time}} + {{$t(`下单时间`)}}:{{child.time}} {{child.open?$t(`收起`):$t(`更多`)}} From 04cf5d4df46aed69b61b8c6743eb5fcb55aa31b3 Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 6 Jul 2023 14:45:31 +0800 Subject: [PATCH 07/40] =?UTF-8?q?style:=20form=E8=A1=A8=E5=8D=95=E6=96=87?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/styles/style.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/template/admin/src/styles/style.css b/template/admin/src/styles/style.css index 1f7fddb7d..280a53f18 100644 --- a/template/admin/src/styles/style.css +++ b/template/admin/src/styles/style.css @@ -213,8 +213,9 @@ body { font-size: 13px; padding: 10px 5px !important; } - -.ivu-form .ivu-form-item-label, +.ivu-form .ivu-form-item-label { + font-size: 12px !important; +} .ivu-radio-group-button .ivu-radio-wrapper, .ivu-table { font-size: 13px !important; From e77ab14af1a0fd0be1e0cc2a32b49f6d975622c3 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 6 Jul 2023 18:09:24 +0800 Subject: [PATCH 08/40] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8D=B0sql?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/common.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crmeb/app/common.php b/crmeb/app/common.php index 8d8575b0d..fb9968911 100644 --- a/crmeb/app/common.php +++ b/crmeb/app/common.php @@ -23,6 +23,7 @@ use app\services\system\lang\LangCodeServices; use app\services\system\lang\LangCountryServices; use think\facade\Config; use think\facade\Log; +use think\facade\Db; if (!function_exists('crmebLog')) { /** @@ -1090,3 +1091,19 @@ if (!function_exists('out_push')) { return true; } } + +if (!function_exists('dump_sql')) { + /** + * 默认数据推送 + * @param string $pushUrl + * @param array $data + * @param string $tip + * @return bool + */ + function dump_sql() + { + Db::listen(function ($sql) { + var_dump($sql); + }); + } +} From f0389d734807bd75c81069c369ac10e670ae095c Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 6 Jul 2023 18:11:00 +0800 Subject: [PATCH 09/40] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/activity/coupon/StoreCouponIssueDao.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crmeb/app/dao/activity/coupon/StoreCouponIssueDao.php b/crmeb/app/dao/activity/coupon/StoreCouponIssueDao.php index dd06cd2e0..6dac47ece 100644 --- a/crmeb/app/dao/activity/coupon/StoreCouponIssueDao.php +++ b/crmeb/app/dao/activity/coupon/StoreCouponIssueDao.php @@ -72,6 +72,17 @@ class StoreCouponIssueDao extends BaseDao ->page($page, $limit)->order('id desc')->select()->toArray(); } + /** + * 优惠券数量 + * @param $where + * @return int + * @throws \ReflectionException + */ + public function couponCount($where): int + { + return $this->search($where)->count(); + } + /** * 获取优惠券列表 * @param int $uid 用户ID From 5dc72970ee0a162ba58f8724f68cec8181b2025c Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 6 Jul 2023 18:11:52 +0800 Subject: [PATCH 10/40] =?UTF-8?q?=E7=A7=92=E6=9D=80=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/activity/seckill/StoreSeckillDao.php | 3 ++- .../app/services/activity/coupon/StoreCouponIssueServices.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crmeb/app/dao/activity/seckill/StoreSeckillDao.php b/crmeb/app/dao/activity/seckill/StoreSeckillDao.php index 7034905d1..efcb6cbbe 100644 --- a/crmeb/app/dao/activity/seckill/StoreSeckillDao.php +++ b/crmeb/app/dao/activity/seckill/StoreSeckillDao.php @@ -41,7 +41,7 @@ class StoreSeckillDao extends BaseDao */ public function search(array $where = [], bool $search = false) { - return parent::search($where, $search)->when(isset($where['seckllTime']), function ($query) use ($where) { + return parent::search($where)->when(isset($where['seckllTime']), function ($query) use ($where) { [$startTime, $stopTime] = is_array($where['seckllTime']) ? $where['seckllTime'] : [time(), time() - 86400]; $query->where('start_time', '<=', $startTime)->where('stop_time', '>=', $stopTime); })->when(isset($where['sid']) && $where['sid'], function ($query) use ($where) { @@ -67,6 +67,7 @@ class StoreSeckillDao extends BaseDao * 条件获取数量 * @param array $where * @return int + * @throws \ReflectionException */ public function getCount(array $where) { diff --git a/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php b/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php index bb667dabc..6c88aff60 100644 --- a/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php +++ b/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php @@ -65,8 +65,7 @@ class StoreCouponIssueServices extends BaseServices foreach ($list as &$item) { $item['use_time'] = date('Y-m-d', $item['start_use_time']) . ' ~ ' . date('Y-m-d', $item['end_use_time']); } -// unset($where['type'], $where['receive_type']); - $count = $this->dao->count($where); + $count = $this->dao->couponCount($where); return compact('list', 'count'); } From 02716e02278e607088e9e4e7c47b5ad253603835 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 6 Jul 2023 18:12:03 +0800 Subject: [PATCH 11/40] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86=E7=9A=84=E7=BC=93=E5=AD=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../easywechat/orderShipping/OrderClient.php | 42 ++++++------------- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/crmeb/crmeb/services/easywechat/orderShipping/OrderClient.php b/crmeb/crmeb/services/easywechat/orderShipping/OrderClient.php index a5910585b..f888d2c48 100644 --- a/crmeb/crmeb/services/easywechat/orderShipping/OrderClient.php +++ b/crmeb/crmeb/services/easywechat/orderShipping/OrderClient.php @@ -4,36 +4,19 @@ namespace crmeb\services\easywechat\orderShipping; use crmeb\exceptions\AdminException; use crmeb\services\CacheService; -use EasyWeChat\Core\AccessToken; use EasyWeChat\Core\Exceptions\HttpException; -use think\facade\Cache; class OrderClient extends BaseOrder { - const redis_prefix = 'mini_order'; + const cache_prefix = 'mini_order'; const express_company = 'ZTO'; // 默认发货快递公司为(中通快递) - /** - * @var \Redis + * @var */ - protected $redis; - - /** - * @return object|\Redis|null - * - * @date 2023/05/10 - * @author yyw - */ - protected function getRedis() - { - if (empty($this->redis)) { - $this->redis = Cache::store('redis')->handler(); - } - return $this->redis; - } + protected $cache; /** * 处理联系人 @@ -214,8 +197,8 @@ class OrderClient extends BaseOrder { $res = $this->isManaged(); if ($res['is_trade_managed']) { - $key = self::redis_prefix . '_is_trade_managed'; - $this->getRedis()->set($key, $res['is_trade_managed']); + $key = self::cache_prefix . '_is_trade_managed'; + CacheService::set($key, $res['is_trade_managed']); return true; } else { return false; @@ -232,8 +215,8 @@ class OrderClient extends BaseOrder */ public function checkManaged() { - $key = self::redis_prefix . '_is_trade_managed'; - if ($this->getRedis()->exists($key)) { + $key = self::cache_prefix . '_is_trade_managed'; + if (CacheService::get($key)) { return true; } else { return $this->setManaged(); @@ -252,10 +235,10 @@ class OrderClient extends BaseOrder { $list = $this->getDeliveryList(); if ($list) { - $key = self::redis_prefix . '_delivery_list'; + $key = self::cache_prefix . '_delivery_list'; $date = array_column($list['delivery_list'], 'delivery_id', 'delivery_name'); // 创建缓存 - $this->getRedis()->hMSet($key, $date); + CacheService::set($key, json_encode($date)); return $date; } else { @@ -274,15 +257,14 @@ class OrderClient extends BaseOrder */ public function getDelivery($company_name) { - $key = self::redis_prefix . '_delivery_list'; - if (!$this->getRedis()->exists($key)) { + $key = self::cache_prefix . '_delivery_list'; + if (!CacheService::get($key)) { $date = $this->setDeliveryList(); $express_company = $date[$company_name] ?? ''; } else { - $express_company = $this->getRedis()->hMGet($key, [$company_name])[$company_name] ?? ''; + $express_company = json_decode(CacheService::get($key), true)[$company_name] ?? ''; } if (empty($express_company)) { -// throw new AdminException('物流公司异常2'); $express_company = self::express_company; } From e00166ca3ea660fcf3db91d556887d0ef018a7b4 Mon Sep 17 00:00:00 2001 From: From-wh Date: Fri, 7 Jul 2023 10:29:04 +0800 Subject: [PATCH 12/40] =?UTF-8?q?improve:=20=E8=B4=AD=E4=B9=B0=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=A1=AB=E5=86=99=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/components/productWindow/index.vue | 2 +- template/uni-app/pages/goods_details/index.vue | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/template/uni-app/components/productWindow/index.vue b/template/uni-app/components/productWindow/index.vue index bdcd5758c..2638d9544 100644 --- a/template/uni-app/components/productWindow/index.vue +++ b/template/uni-app/components/productWindow/index.vue @@ -151,7 +151,7 @@ * */ bindCode: function(e) { - this.$emit('iptCartNum', this.attr.productSelect.cart_num); + this.$emit('iptCartNum', e); }, closeAttr: function() { this.$emit('myevent'); diff --git a/template/uni-app/pages/goods_details/index.vue b/template/uni-app/pages/goods_details/index.vue index 43c91200c..7591d087e 100644 --- a/template/uni-app/pages/goods_details/index.vue +++ b/template/uni-app/pages/goods_details/index.vue @@ -806,7 +806,15 @@ * */ iptCartNum: function(e) { - this.$set(this.attr.productSelect, "cart_num", e); + if (e) { + let number = 1 + if (Number.isInteger(parseInt(e)) && parseInt(e) > 0) { + number = parseInt(e); + } + this.$nextTick(e => { + this.$set(this.attr.productSelect, "cart_num", e < 0 ? 1 : number); + }) + } }, // 后退 returns() { From f06dcb0d074d6c1b7f400443c1cb7593d5a237d2 Mon Sep 17 00:00:00 2001 From: From-wh Date: Fri, 7 Jul 2023 10:35:17 +0800 Subject: [PATCH 13/40] =?UTF-8?q?improve:=20=E6=8A=BD=E5=B1=89=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/pages/order/orderList/handle/orderDetails.vue | 2 +- template/admin/src/pages/user/list/handle/userDetails.vue | 2 +- template/admin/src/pages/user/list/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/template/admin/src/pages/order/orderList/handle/orderDetails.vue b/template/admin/src/pages/order/orderList/handle/orderDetails.vue index ecfeb5ccf..09d94574c 100644 --- a/template/admin/src/pages/order/orderList/handle/orderDetails.vue +++ b/template/admin/src/pages/order/orderList/handle/orderDetails.vue @@ -1,6 +1,6 @@