From e3b08cbd710b3b21bc6e524f6dbc0d85735aa97f Mon Sep 17 00:00:00 2001 From: From-wh Date: Sat, 18 Feb 2023 17:43:05 +0800 Subject: [PATCH 01/29] =?UTF-8?q?style:=20=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/annex/vip_paid/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/uni-app/pages/annex/vip_paid/index.vue b/template/uni-app/pages/annex/vip_paid/index.vue index 29de79881..e4280079f 100644 --- a/template/uni-app/pages/annex/vip_paid/index.vue +++ b/template/uni-app/pages/annex/vip_paid/index.vue @@ -469,7 +469,7 @@ this.groomList(); uni.hideLoading(); uni.showToast({ - title: this.$t(`成功开启0元试用`), + title: this.$t(`成功开启试用`), }); } }).catch(err => { @@ -488,7 +488,7 @@ this.groomList(); uni.hideLoading(); uni.showToast({ - title: this.$t(`成功开启0元试用`), + title: this.$t(`成功开启试用`), }); } }).catch(err => { From f25d936c4d36d8ee572c1836f1cd79a8ab52bc2b Mon Sep 17 00:00:00 2001 From: From-wh Date: Sat, 18 Feb 2023 17:43:35 +0800 Subject: [PATCH 02/29] =?UTF-8?q?improve:=20=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-app/pages/goods/cashier/index.vue | 16 +- .../pages/users/user_payment/index.vue | 1429 ++++++++--------- 2 files changed, 717 insertions(+), 728 deletions(-) diff --git a/template/uni-app/pages/goods/cashier/index.vue b/template/uni-app/pages/goods/cashier/index.vue index 0266a6c55..269870de7 100644 --- a/template/uni-app/pages/goods/cashier/index.vue +++ b/template/uni-app/pages/goods/cashier/index.vue @@ -505,17 +505,11 @@ case 'ALIPAY_PAY': //#ifdef H5 - if (this.from === 'weixin') { - uni.redirectTo({ - url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}` - }); - } else { - uni.hideLoading(); - that.formContent = res.data.result.jsConfig; - that.$nextTick(() => { - document.getElementById('alipaysubmit').submit(); - }) - } + uni.hideLoading(); + that.formContent = res.data.result.jsConfig; + that.$nextTick(() => { + document.getElementById('alipaysubmit').submit(); + }) //#endif // #ifdef MP uni.navigateTo({ diff --git a/template/uni-app/pages/users/user_payment/index.vue b/template/uni-app/pages/users/user_payment/index.vue index 779979922..e6438a971 100644 --- a/template/uni-app/pages/users/user_payment/index.vue +++ b/template/uni-app/pages/users/user_payment/index.vue @@ -1,718 +1,713 @@ - - - - - From f2d8547f504f99c44e1362423f7452d28946d16f Mon Sep 17 00:00:00 2001 From: From-wh Date: Sat, 18 Feb 2023 17:44:01 +0800 Subject: [PATCH 03/29] =?UTF-8?q?style:=20=E4=B8=8B=E5=8D=95=E9=A1=B5?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/components/numberScroll.vue | 3 --- .../uni-app/pages/goods/order_confirm/index.vue | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/template/uni-app/components/numberScroll.vue b/template/uni-app/components/numberScroll.vue index 9a7fc8819..2ace75d54 100644 --- a/template/uni-app/components/numberScroll.vue +++ b/template/uni-app/components/numberScroll.vue @@ -78,7 +78,6 @@ let arr = new Array(num.toString().length); arr.fill(0); this.indexArr = arr; - console.log(this.indexArr) }, watch: { num: function(val, oldVal) { @@ -99,7 +98,6 @@ this.indexArr = arr; } this.numChange(val); - console.log(this.indexArr) } }, mounted() { @@ -129,7 +127,6 @@ } } this.indexArr = copyIndexArr; - console.log(this.indexArr) }) } } diff --git a/template/uni-app/pages/goods/order_confirm/index.vue b/template/uni-app/pages/goods/order_confirm/index.vue index 81e7841f4..dfcc56490 100644 --- a/template/uni-app/pages/goods/order_confirm/index.vue +++ b/template/uni-app/pages/goods/order_confirm/index.vue @@ -1614,8 +1614,8 @@ .mark { background-color: #f9f9f9; - width: 345px; - height: 70px; + // width: 345px; + min-height: 70px; border-radius: 1px; margin-top: 15px; padding: 12px 14px; @@ -1626,7 +1626,7 @@ .mark-msg { color: #333; - font-size: 32rpx; + font-size: 28rpx; } } @@ -1669,11 +1669,12 @@ .order-submission .wrapper .item textarea { background-color: #f9f9f9; - width: 690rpx; - height: 140rpx; + width: 100%; + height: 135rpx; border-radius: 3rpx; margin-top: 30rpx; - padding: 25rpx 28rpx; + padding: 25rpx 28rpx; + font-size: 28rpx; box-sizing: border-box; } From eafae4e3c6dc91f431c3dd091c274668ee89fc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Sat, 18 Feb 2023 18:15:38 +0800 Subject: [PATCH 04/29] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/listener/timer/SystemTimer.php | 49 ++++++++++++------- .../system/timer/SystemTimerServices.php | 19 +++++-- crmeb/config/log.php | 2 + 3 files changed, 49 insertions(+), 21 deletions(-) diff --git a/crmeb/app/listener/timer/SystemTimer.php b/crmeb/app/listener/timer/SystemTimer.php index 858198999..add6798dc 100644 --- a/crmeb/app/listener/timer/SystemTimer.php +++ b/crmeb/app/listener/timer/SystemTimer.php @@ -19,8 +19,12 @@ class SystemTimer implements ListenerInterface { public function handle($event): void { - new Crontab('*/6 * * * * *', function () { - file_put_contents(root_path() . 'runtime/.timer', time()); + $time = time(); + $date = date('Y-m-d H:i:s', time()); + $timer_log_open = config("log.timer_log", false); + + new Crontab('*/6 * * * * *', function () use ($time) { + file_put_contents(root_path() . 'runtime/.timer', $time); }); /** @var SystemTimerServices $systemTimerServices */ @@ -31,11 +35,12 @@ class SystemTimer implements ListenerInterface $timeStr = $this->getTimerStr($item); //未支付自动取消订单 if ($item['mark'] == 'order_cancel') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var StoreOrderServices $orderServices */ $orderServices = app()->make(StoreOrderServices::class); $orderServices->orderUnpaidCancel(); + if ($timer_log_open) Log::notice($date . ' 执行未支付自动取消订单'); } catch (\Throwable $e) { Log::error('自动取消订单失败,失败原因:' . $e->getMessage()); } @@ -43,11 +48,12 @@ class SystemTimer implements ListenerInterface } //拼团到期订单处理 if ($item['mark'] == 'pink_expiration') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var StorePinkServices $storePinkServices */ $storePinkServices = app()->make(StorePinkServices::class); $storePinkServices->statusPink(); + if ($timer_log_open) Log::notice($date . ' 执行拼团到期订单处理'); } catch (\Throwable $e) { Log::error('拼团到期订单处理失败,失败原因:' . $e->getMessage()); } @@ -55,11 +61,12 @@ class SystemTimer implements ListenerInterface } //自动解绑上级绑定 if ($item['mark'] == 'agent_unbind') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var AgentManageServices $agentManage */ $agentManage = app()->make(AgentManageServices::class); $agentManage->removeSpread(); + if ($timer_log_open) Log::notice($date . ' 执行自动解绑上级绑定'); } catch (\Throwable $e) { Log::error('自动解除上级绑定失败,失败原因:' . $e->getMessage()); } @@ -67,11 +74,12 @@ class SystemTimer implements ListenerInterface } //更新直播商品状态 if ($item['mark'] == 'live_product_status') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var LiveGoodsServices $liveGoods */ $liveGoods = app()->make(LiveGoodsServices::class); $liveGoods->syncGoodStatus(); + if ($timer_log_open) Log::notice($date . ' 执行更新直播商品状态'); } catch (\Throwable $e) { Log::error('更新直播商品状态失败,失败原因:' . $e->getMessage()); } @@ -79,11 +87,12 @@ class SystemTimer implements ListenerInterface } //更新直播间状态 if ($item['mark'] == 'live_room_status') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var LiveRoomServices $liveRoom */ $liveRoom = app()->make(LiveRoomServices::class); $liveRoom->syncRoomStatus(); + if ($timer_log_open) Log::notice($date . ' 执行更新直播间状态'); } catch (\Throwable $e) { Log::error('更新直播间状态失败,失败原因:' . $e->getMessage()); } @@ -91,11 +100,12 @@ class SystemTimer implements ListenerInterface } //自动收货 if ($item['mark'] == 'take_delivery') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var StoreOrderTakeServices $services */ $services = app()->make(StoreOrderTakeServices::class); $services->autoTakeOrder(); + if ($timer_log_open) Log::notice($date . ' 执行自动收货'); } catch (\Throwable $e) { Log::error('自动收货失败,失败原因:' . $e->getMessage()); } @@ -103,11 +113,12 @@ class SystemTimer implements ListenerInterface } //查询预售到期商品自动下架 if ($item['mark'] == 'advance_off') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var StoreProductServices $product */ $product = app()->make(StoreProductServices::class); $product->downAdvance(); + if ($timer_log_open) Log::notice($date . ' 执行预售到期商品自动下架'); } catch (\Throwable $e) { Log::error('预售到期商品自动下架失败,失败原因:' . $e->getMessage()); } @@ -115,11 +126,12 @@ class SystemTimer implements ListenerInterface } //自动好评 if ($item['mark'] == 'product_replay') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var StoreOrderServices $orderServices */ $orderServices = app()->make(StoreOrderServices::class); $orderServices->autoComment(); + if ($timer_log_open) Log::notice($date . ' 执行自动好评'); } catch (\Throwable $e) { Log::error('自动好评失败,失败原因:' . $e->getMessage()); } @@ -127,11 +139,12 @@ class SystemTimer implements ListenerInterface } //清除昨日海报 if ($item['mark'] == 'clear_poster') { - new Crontab($timeStr, function () { + new Crontab($timeStr, function () use ($date, $timer_log_open) { try { /** @var SystemAttachmentServices $attach */ $attach = app()->make(SystemAttachmentServices::class); $attach->emptyYesterdayAttachment(); + if ($timer_log_open) Log::notice($date . ' 执行清除昨日海报'); } catch (\Throwable $e) { Log::error('清除昨日海报失败,失败原因:' . $e->getMessage()); } @@ -141,13 +154,13 @@ class SystemTimer implements ListenerInterface } /** * 0 1 2 3 4 5 - | | | | | | - | | | | | +------ day of week (0 - 6) (Sunday=0) - | | | | +------ month (1 - 12) - | | | +-------- day of month (1 - 31) - | | +---------- hour (0 - 23) - | +------------ min (0 - 59) - +-------------- sec (0-59)[可省略,如果没有0位,则最小时间粒度是分钟] + * | | | | | | + * | | | | | +------ day of week (0 - 6) (Sunday=0) + * | | | | +------ month (1 - 12) + * | | | +-------- day of month (1 - 31) + * | | +---------- hour (0 - 23) + * | +------------ min (0 - 59) + * +-------------- sec (0-59)[可省略,如果没有0位,则最小时间粒度是分钟] */ /** * 获取定时任务时间表达式 diff --git a/crmeb/app/services/system/timer/SystemTimerServices.php b/crmeb/app/services/system/timer/SystemTimerServices.php index 5af025944..1dd322d13 100644 --- a/crmeb/app/services/system/timer/SystemTimerServices.php +++ b/crmeb/app/services/system/timer/SystemTimerServices.php @@ -13,6 +13,7 @@ use app\services\order\StoreOrderTakeServices; use app\services\product\product\StoreProductServices; use app\services\system\attachment\SystemAttachmentServices; use crmeb\exceptions\AdminException; +use think\facade\Log; class SystemTimerServices extends BaseServices { @@ -204,40 +205,52 @@ class SystemTimerServices extends BaseServices */ public function timerRun() { - file_put_contents(root_path() . 'runtime/.timer', time()); //检测定时任务是否正常 + $time = time(); + $date = date('Y-m-d H:i:s', time()); + $timer_log_open = config("log.timer_log", false); + file_put_contents(root_path() . 'runtime/.timer', $time); //检测定时任务是否正常 $list = $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray(); foreach ($list as $item) { - if ($item['next_execution_time'] < time()) { + if ($item['next_execution_time'] < $time) { if ($item['mark'] == 'order_cancel') { //未支付自动取消订单 app()->make(StoreOrderServices::class)->orderUnpaidCancel(); + if($timer_log_open) Log::notice($date . ' 执行未支付自动取消订单'); } elseif ($item['mark'] == 'pink_expiration') { //拼团到期订单处理 app()->make(StorePinkServices::class)->statusPink(); + if($timer_log_open) Log::notice($date . ' 执行拼团到期订单处理'); } elseif ($item['mark'] == 'agent_unbind') { //自动解绑上级绑定 app()->make(AgentManageServices::class)->removeSpread(); + if($timer_log_open) Log::notice($date . ' 执行自动解绑上级绑定'); } elseif ($item['mark'] == 'live_product_status') { //更新直播商品状态 app()->make(LiveGoodsServices::class)->syncGoodStatus(); + if($timer_log_open) Log::notice($date . ' 执行更新直播商品状态'); } elseif ($item['mark'] == 'live_room_status') { //更新直播间状态 app()->make(LiveRoomServices::class)->syncRoomStatus(); + if($timer_log_open) Log::notice($date . ' 执行更新直播间状态'); } elseif ($item['mark'] == 'take_delivery') { //自动收货 app()->make(StoreOrderTakeServices::class)->autoTakeOrder(); + if($timer_log_open) Log::notice($date . ' 执行自动收货'); } elseif ($item['mark'] == 'advance_off') { //查询预售到期商品自动下架 app()->make(StoreProductServices::class)->downAdvance(); + if($timer_log_open) Log::notice($date . ' 执行预售到期商品自动下架'); } elseif ($item['mark'] == 'product_replay') { //自动好评 app()->make(StoreOrderServices::class)->autoComment(); + if($timer_log_open) Log::notice($date . ' 执行自动好评'); } elseif ($item['mark'] == 'clear_poster') { //清除昨日海报 app()->make(SystemAttachmentServices::class)->emptyYesterdayAttachment(); + if($timer_log_open) Log::notice($date . ' 执行清除昨日海报'); } //写入本次执行时间和下次执行时间 - $this->dao->update(['mark' => $item['mark']], ['last_execution_time' => time(), 'next_execution_time' => $this->getTimerCycleTime($item)]); + $this->dao->update(['mark' => $item['mark']], ['last_execution_time' => $time, 'next_execution_time' => $this->getTimerCycleTime($item)]); } } } diff --git a/crmeb/config/log.php b/crmeb/config/log.php index 8bda15fdb..843388526 100644 --- a/crmeb/config/log.php +++ b/crmeb/config/log.php @@ -24,6 +24,8 @@ return [ 'success_log' => false, //是否开启业务失败日志 'fail_log' => false, + //是否开启定时任务日志 + 'timer_log' => false, // 日志通道列表 'channels' => [ 'file' => [ From 7416ff1a971dd2513ba0c8f2b1b804736a50e757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Sat, 18 Feb 2023 18:15:55 +0800 Subject: [PATCH 05/29] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddiy=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/product/product/StoreCategoryServices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/app/services/product/product/StoreCategoryServices.php b/crmeb/app/services/product/product/StoreCategoryServices.php index 2496f8c8d..3c6374fc3 100644 --- a/crmeb/app/services/product/product/StoreCategoryServices.php +++ b/crmeb/app/services/product/product/StoreCategoryServices.php @@ -95,7 +95,7 @@ class StoreCategoryServices extends BaseServices $where = []; if ($show !== '') $where['is_show'] = $show; if (!$type) $where['pid'] = 0; - $data = get_tree_children($this->dao->getTierList($where, ['id as value', 'cate_name as label', 'pid']), 'children', 'value'); + $data = get_tree_children($this->dao->getTierList($where, ['id', 'cate_name as title', 'pid']), 'children', 'id'); foreach ($data as &$item) { if (!isset($item['children'])) { $item['disabled'] = true; From 52f7140be13a29272a8816b9f6ca524e6ee42197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Sat, 18 Feb 2023 18:16:11 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/upload/storage/Cos.php | 8 ++++---- crmeb/crmeb/services/upload/storage/Local.php | 8 ++++---- crmeb/crmeb/services/upload/storage/Oss.php | 8 ++++---- crmeb/crmeb/services/upload/storage/Qiniu.php | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/crmeb/crmeb/services/upload/storage/Cos.php b/crmeb/crmeb/services/upload/storage/Cos.php index 7dad105b3..4fb29c52a 100644 --- a/crmeb/crmeb/services/upload/storage/Cos.php +++ b/crmeb/crmeb/services/upload/storage/Cos.php @@ -126,17 +126,17 @@ class Cos extends BaseUpload if (!$isStream) { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } $key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension()); diff --git a/crmeb/crmeb/services/upload/storage/Local.php b/crmeb/crmeb/services/upload/storage/Local.php index 77260195e..460fc1939 100644 --- a/crmeb/crmeb/services/upload/storage/Local.php +++ b/crmeb/crmeb/services/upload/storage/Local.php @@ -113,17 +113,17 @@ class Local extends BaseUpload { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } if ($realName) { diff --git a/crmeb/crmeb/services/upload/storage/Oss.php b/crmeb/crmeb/services/upload/storage/Oss.php index 9f2db973d..d52125ff2 100644 --- a/crmeb/crmeb/services/upload/storage/Oss.php +++ b/crmeb/crmeb/services/upload/storage/Oss.php @@ -121,17 +121,17 @@ class Oss extends BaseUpload { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } $key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension()); diff --git a/crmeb/crmeb/services/upload/storage/Qiniu.php b/crmeb/crmeb/services/upload/storage/Qiniu.php index 8b1bc59a9..400b9e489 100644 --- a/crmeb/crmeb/services/upload/storage/Qiniu.php +++ b/crmeb/crmeb/services/upload/storage/Qiniu.php @@ -117,17 +117,17 @@ class Qiniu extends BaseUpload { $fileHandle = app()->request->file($file); if (!$fileHandle) { - return $this->setError('Upload file does not exist'); + return $this->setError('上传的文件不存在'); } if ($this->validate) { if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) { - return $this->setError('Upload fileExt error'); + return $this->setError('不合法的文件后缀'); } if (filesize($fileHandle) > $this->validate['filesize']) { - return $this->setError('Upload filesize error'); + return $this->setError('文件过大'); } if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) { - return $this->setError('Upload fileMine error'); + return $this->setError('不合法的文件类型'); } } $key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension()); From 7f7d25dff074c332dd729bd7d284c39c7726d112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Sat, 18 Feb 2023 18:16:32 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E9=80=80=E6=AC=BE=E9=A1=B5=E9=9D=A2=E5=95=86=E5=93=81?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/goods/goods_return/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/uni-app/pages/goods/goods_return/index.vue b/template/uni-app/pages/goods/goods_return/index.vue index a18ceaad1..67e0ade0c 100644 --- a/template/uni-app/pages/goods/goods_return/index.vue +++ b/template/uni-app/pages/goods/goods_return/index.vue @@ -10,7 +10,7 @@ {{item.productInfo.store_name}} - {{$t(`¥`)}}{{item.truePrice}} + {{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price)).toFixed(2)}} x{{item.cart_num}} From 9e8cccbbd03b46a2cd940d35211ca4bd2b97384e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 20 Feb 2023 10:00:51 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E7=A7=92=E6=9D=80=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=B6=E5=80=99=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E7=94=9F=E6=88=90=E8=AE=A2=E5=8D=95=E6=97=B6?= =?UTF-8?q?=E5=80=99=E7=9A=84=E6=94=AF=E4=BB=98=E7=B1=BB=E5=9E=8B=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E5=88=86=E9=94=80=E7=AD=89=E7=BA=A7=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=99=90=E5=88=B68=E4=B8=AA=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php | 5 +---- crmeb/app/services/agent/AgentLevelServices.php | 4 ++-- crmeb/app/services/order/StoreOrderComputedServices.php | 5 ----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php b/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php index 224484e32..ce01afc52 100644 --- a/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php +++ b/crmeb/app/adminapi/controller/v1/marketing/StoreSeckill.php @@ -106,10 +106,7 @@ class StoreSeckill extends AuthController $storeProductAttrValueServices = app()->make(StoreProductAttrValueServices::class); $unique = $storeProductAttrValueServices->value(['product_id' => $id, 'type' => 1], 'unique'); if ($unique) { - $name = 'seckill_' . $unique . '_1'; - /** @var CacheService $cache */ - $cache = app()->make(CacheService::class); - $cache->del($name); + CacheService::delete('seckill_' . $unique . '_1'); } return app('json')->success(100002); } diff --git a/crmeb/app/services/agent/AgentLevelServices.php b/crmeb/app/services/agent/AgentLevelServices.php index 498d79c1f..ba9258ae0 100644 --- a/crmeb/app/services/agent/AgentLevelServices.php +++ b/crmeb/app/services/agent/AgentLevelServices.php @@ -256,7 +256,7 @@ class AgentLevelServices extends BaseServices */ public function createForm() { - $field[] = Form::input('name', '等级名称')->col(24); + $field[] = Form::input('name', '等级名称')->maxlength(8)->col(24); $field[] = Form::number('grade', '等级', 0)->min(0)->precision(0); $field[] = Form::frameImage('image', '背景图', Url::buildUrl('admin/widget.images/index', array('fodder' => 'image')))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]); $field[] = Form::number('one_brokerage', '一级上浮', 0)->info('在分销一级佣金基础上浮(0-1000之间整数)百分比')->min(0)->max(1000)->precision(0); @@ -278,7 +278,7 @@ class AgentLevelServices extends BaseServices throw new AdminException(100026); $field = []; $field[] = Form::hidden('id', $id); - $field[] = Form::input('name', '等级名称', $levelInfo['name'])->col(24); + $field[] = Form::input('name', '等级名称', $levelInfo['name'])->maxlength(8)->col(24); $field[] = Form::number('grade', '等级', $levelInfo['grade'])->min(0)->precision(0); $field[] = Form::frameImage('image', '背景图', Url::buildUrl('admin/widget.images/index', array('fodder' => 'image')), $levelInfo['image'])->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]); $field[] = Form::number('one_brokerage', '一级上浮', $levelInfo['one_brokerage'])->info('在分销一级佣金基础上浮(0-1000之间整数)百分比')->min(0)->max(1000)->precision(0); diff --git a/crmeb/app/services/order/StoreOrderComputedServices.php b/crmeb/app/services/order/StoreOrderComputedServices.php index bff185d68..a2e1e55dd 100644 --- a/crmeb/app/services/order/StoreOrderComputedServices.php +++ b/crmeb/app/services/order/StoreOrderComputedServices.php @@ -82,11 +82,6 @@ class StoreOrderComputedServices extends BaseServices $offlinePayStatus = (int)sys_config('offline_pay_status') ?? (int)2; $systemPayType = PayServices::PAY_TYPE; if ($offlinePayStatus == 2) unset($systemPayType['offline']); - if (strtolower($payType) != 'pc' && strtolower($payType) != 'friend') { - if (!array_key_exists($payType, $systemPayType)) { - throw new ApiException(410241); - } - } if (!$userInfo) { /** @var UserServices $userServices */ $userServices = app()->make(UserServices::class); From 901c4bdd52140d4a70bd053abb8b33c224d991ec Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:38:46 +0800 Subject: [PATCH 09/29] =?UTF-8?q?fix:=20=E6=8A=BD=E5=A5=96=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8=E6=A0=87=E7=AD=BE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/marketing/lottery/addGoods.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/admin/src/pages/marketing/lottery/addGoods.vue b/template/admin/src/pages/marketing/lottery/addGoods.vue index decf2880e..1ceaccf61 100644 --- a/template/admin/src/pages/marketing/lottery/addGoods.vue +++ b/template/admin/src/pages/marketing/lottery/addGoods.vue @@ -223,7 +223,7 @@ export default { let keys = Object.keys(this.editData); keys.forEach((item) => { this.formValidate[item] = this.editData[item]; - if (item === 'coupon_title') { + if (item === 'coupon_title' && this.editData[item]) { this.couponName.push({ title: this.editData[item], id: this.editData.coupon_id, From b7be6716a5e20a118a2e738bc65aa62ca81e2b10 Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:39:15 +0800 Subject: [PATCH 10/29] =?UTF-8?q?improve:=20=E5=95=86=E5=93=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=89=B9=E9=87=8F=E8=AE=BE=E7=BD=AE=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/product/productAdd/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/admin/src/pages/product/productAdd/index.vue b/template/admin/src/pages/product/productAdd/index.vue index 9c7b14351..1721ff892 100644 --- a/template/admin/src/pages/product/productAdd/index.vue +++ b/template/admin/src/pages/product/productAdd/index.vue @@ -294,7 +294,7 @@ > - +
-
+
From 995cd2c39f27c6056ceb7e93ec00f62dfc853932 Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:40:57 +0800 Subject: [PATCH 13/29] =?UTF-8?q?improve:=20=E6=BB=91=E5=8A=A8=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../annex/components/verify/verifySlider/verifySlider.vue | 4 ++-- .../components/verify/verifySlider/verifySliderPc.vue | 8 ++++---- .../pages/users/components/verify/verifySlider/index.vue | 4 ++-- .../components/verify/verifySlider/verifySliderPc.vue | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/template/uni-app/pages/annex/components/verify/verifySlider/verifySlider.vue b/template/uni-app/pages/annex/components/verify/verifySlider/verifySlider.vue index c7faeaf65..eb289a2bb 100644 --- a/template/uni-app/pages/annex/components/verify/verifySlider/verifySlider.vue +++ b/template/uni-app/pages/annex/components/verify/verifySlider/verifySlider.vue @@ -392,13 +392,13 @@ bottom: 0px; width: 100%; height: 30px; - background-color: rgb(231, 27, 27, .5); + background-color: rgb(197, 150, 63, 0.5); line-height: 30px; color: #fff; } .suc-bg { - background-color: rgba(92, 184, 92, .5); + background-color: rgb(197, 150, 63, 0.5); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C); } diff --git a/template/uni-app/pages/annex/components/verify/verifySlider/verifySliderPc.vue b/template/uni-app/pages/annex/components/verify/verifySlider/verifySliderPc.vue index e1338bc1c..770935571 100644 --- a/template/uni-app/pages/annex/components/verify/verifySlider/verifySliderPc.vue +++ b/template/uni-app/pages/annex/components/verify/verifySlider/verifySliderPc.vue @@ -11,7 +11,7 @@ {{ tipWords }} + :class="passFalg ? 'suc-bg' : 'err-bg'">{{ tipWords }} @@ -123,7 +123,7 @@ export default { data() { return { secretKey: "", // 后端返回的加密秘钥 字段 - passFlag: "", // 是否通过的标识 + passFalg: "", // 是否通过的标识 backImgBase: "", // 验证码背景图片 blockBackImgBase: "", // 验证滑块的背景图片 backToken: "", // 后端返回的唯一token值 @@ -491,13 +491,13 @@ export default { bottom: 0px; width: 100%; height: 30px; - background-color: rgb(231, 27, 27, .5); + background-color: rgb(197, 150, 63, 0.5); line-height: 30px; color: #fff; } .suc-bg { - background-color: rgba(92, 184, 92, .5); + background-color: rgb(197, 150, 63, 0.5); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C); } diff --git a/template/uni-app/pages/users/components/verify/verifySlider/index.vue b/template/uni-app/pages/users/components/verify/verifySlider/index.vue index c7faeaf65..4581bab9f 100644 --- a/template/uni-app/pages/users/components/verify/verifySlider/index.vue +++ b/template/uni-app/pages/users/components/verify/verifySlider/index.vue @@ -392,13 +392,13 @@ bottom: 0px; width: 100%; height: 30px; - background-color: rgb(231, 27, 27, .5); + background-color: rgb(197, 150, 63, 0.5);; line-height: 30px; color: #fff; } .suc-bg { - background-color: rgba(92, 184, 92, .5); + background-color: rgb(197, 150, 63, 0.5);; filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C); } diff --git a/template/uni-app/pages/users/components/verify/verifySlider/verifySliderPc.vue b/template/uni-app/pages/users/components/verify/verifySlider/verifySliderPc.vue index e1338bc1c..39160aeaf 100644 --- a/template/uni-app/pages/users/components/verify/verifySlider/verifySliderPc.vue +++ b/template/uni-app/pages/users/components/verify/verifySlider/verifySliderPc.vue @@ -11,7 +11,7 @@ {{ tipWords }} + :class="passFalg ? 'suc-bg' : 'err-bg'">{{ tipWords }} @@ -123,7 +123,7 @@ export default { data() { return { secretKey: "", // 后端返回的加密秘钥 字段 - passFlag: "", // 是否通过的标识 + passFalg: "", // 是否通过的标识 backImgBase: "", // 验证码背景图片 blockBackImgBase: "", // 验证滑块的背景图片 backToken: "", // 后端返回的唯一token值 @@ -491,13 +491,13 @@ export default { bottom: 0px; width: 100%; height: 30px; - background-color: rgb(231, 27, 27, .5); + background-color: rgb(197, 150, 63, 0.5);; line-height: 30px; color: #fff; } .suc-bg { - background-color: rgba(92, 184, 92, .5); + background-color: rgb(197, 150, 63, 0.5);; filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C); } From 12cb5beaa648b8377b1cc84d1c71f88ba75174f3 Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:41:12 +0800 Subject: [PATCH 14/29] =?UTF-8?q?style:=20=E9=A6=96=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index/diy/components/activeParty.vue | 392 +++++++++--------- 1 file changed, 197 insertions(+), 195 deletions(-) diff --git a/template/uni-app/pages/index/diy/components/activeParty.vue b/template/uni-app/pages/index/diy/components/activeParty.vue index c58474a3e..b74265e68 100644 --- a/template/uni-app/pages/index/diy/components/activeParty.vue +++ b/template/uni-app/pages/index/diy/components/activeParty.vue @@ -1,195 +1,197 @@ - - - - - \ No newline at end of file + + + + + From f00ecc75a632320814fd7ac3f2735b32d7f080a0 Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:41:44 +0800 Subject: [PATCH 15/29] =?UTF-8?q?improve:=20=E7=A7=AF=E5=88=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/users/user_sgin_list/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/uni-app/pages/users/user_sgin_list/index.vue b/template/uni-app/pages/users/user_sgin_list/index.vue index 100ffed19..02625a131 100644 --- a/template/uni-app/pages/users/user_sgin_list/index.vue +++ b/template/uni-app/pages/users/user_sgin_list/index.vue @@ -10,7 +10,7 @@ {{$t(itemn.title)}} {{itemn.add_time}} - +{{itemn.number}} + +{{itemn.number}} From 799e7cec5d963c071ba3a1fab2e0a835756ec01b Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:42:08 +0800 Subject: [PATCH 16/29] =?UTF-8?q?feat:=20=E7=A7=AF=E5=88=86=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=B7=BB=E5=8A=A0=E9=99=90=E5=88=B6=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../points_mall/integral_goods_details.vue | 2363 +++++++++-------- 1 file changed, 1186 insertions(+), 1177 deletions(-) diff --git a/template/uni-app/pages/points_mall/integral_goods_details.vue b/template/uni-app/pages/points_mall/integral_goods_details.vue index 795d816b8..89d3c2441 100644 --- a/template/uni-app/pages/points_mall/integral_goods_details.vue +++ b/template/uni-app/pages/points_mall/integral_goods_details.vue @@ -1,1178 +1,1187 @@ - - - - - From dba9ce48aab9d7681c18e33425254bf3cf0ce86a Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 11:42:25 +0800 Subject: [PATCH 17/29] =?UTF-8?q?fix:=20app=E7=99=BB=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/user/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/uni-app/pages/user/index.vue b/template/uni-app/pages/user/index.vue index 57c2effb7..0eaa34a76 100644 --- a/template/uni-app/pages/user/index.vue +++ b/template/uni-app/pages/user/index.vue @@ -52,7 +52,7 @@ - + {{$t('请点击授权')}} From 9ba5b5332f5fd9a123794857141b842163fafe71 Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 12:22:13 +0800 Subject: [PATCH 18/29] =?UTF-8?q?fix:=20=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/order_addcart/order_addcart.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/template/uni-app/pages/order_addcart/order_addcart.vue b/template/uni-app/pages/order_addcart/order_addcart.vue index 046e54633..bcbd84a81 100644 --- a/template/uni-app/pages/order_addcart/order_addcart.vue +++ b/template/uni-app/pages/order_addcart/order_addcart.vue @@ -706,18 +706,19 @@ addCart: function(index) { let that = this; let item = that.cartList.valid[index]; - item.cart_num = Number(item.cart_num) + 1; + let lastnum = Number(item.cart_num) + 1 let productInfo = item.productInfo; - if (productInfo.hasOwnProperty('attrInfo') && item.cart_num >= item.productInfo.attrInfo.stock) { - item.cart_num = item.productInfo.attrInfo.stock; + if (productInfo.hasOwnProperty('attrInfo') && lastnum >= item.productInfo.attrInfo.stock) { + lastnum = item.productInfo.attrInfo.stock; item.numAdd = true; item.numSub = false; } else { item.numAdd = false; item.numSub = false; } - that.setCartNum(item.id, item.cart_num, function(data) { + that.setCartNum(item.id, lastnum, (data) => { that.cartList.valid[index] = item; + item.cart_num = Number(item.cart_num) + 1; that.getCartNum(); that.switchSelect(); }); From dca65c5610db69e8a3ec9440ec01c1f79d66cb73 Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 20 Feb 2023 12:22:29 +0800 Subject: [PATCH 19/29] =?UTF-8?q?style:=20diy=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/components/mobilePageDiy/home_product.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/admin/src/components/mobilePageDiy/home_product.vue b/template/admin/src/components/mobilePageDiy/home_product.vue index 4f08b641a..0d4ab04ae 100644 --- a/template/admin/src/components/mobilePageDiy/home_product.vue +++ b/template/admin/src/components/mobilePageDiy/home_product.vue @@ -53,7 +53,7 @@ class="label" :style="'border:1px solid ' + labelColor + ';color:' + labelColor" :class="priceShow ? '' : 'on'" - v-if="couponShow && item.checkCoupon" + v-if="couponShow" > 券 @@ -408,6 +408,7 @@ export default { text-align center line-height 18px font-size 11px + border-radius 3px &.on margin-left 0; From 3f1b2edca4e30c1c30d38f77f4612a2347cb8018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 20 Feb 2023 12:24:02 +0800 Subject: [PATCH 20/29] =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E5=8C=85=E9=82=AE=E9=97=AE=E9=A2=98=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/order/StoreOrderController.php | 2 +- .../order/StoreOrderComputedServices.php | 2 +- .../app/services/order/StoreOrderServices.php | 22 +++++++++++- .../uni-app/pages/goods/cashier/index.vue | 35 +++++++++++++------ .../pages/goods/order_confirm/index.vue | 5 +-- 5 files changed, 48 insertions(+), 18 deletions(-) diff --git a/crmeb/app/api/controller/v1/order/StoreOrderController.php b/crmeb/app/api/controller/v1/order/StoreOrderController.php index 6776603ad..784318959 100644 --- a/crmeb/app/api/controller/v1/order/StoreOrderController.php +++ b/crmeb/app/api/controller/v1/order/StoreOrderController.php @@ -125,7 +125,7 @@ class StoreOrderController if ($this->services->be(['order_id|unique' => $key, 'uid' => $uid, 'is_del' => 0])) return app('json')->status('extend_order', 410173, ['orderId' => $key, 'key' => $key]); list($addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $shipping_type) = $request->postMore([ - 'addressId', 'couponId', ['payType', 'yue'], ['useIntegral', 0], 'mark', ['combinationId', 0], ['pinkId', 0], ['seckill_id', 0], ['bargainId', ''], + 'addressId', 'couponId', ['payType', ''], ['useIntegral', 0], 'mark', ['combinationId', 0], ['pinkId', 0], ['seckill_id', 0], ['bargainId', ''], ['shipping_type', 1], ], true); $payType = strtolower($payType); diff --git a/crmeb/app/services/order/StoreOrderComputedServices.php b/crmeb/app/services/order/StoreOrderComputedServices.php index a2e1e55dd..b984487f8 100644 --- a/crmeb/app/services/order/StoreOrderComputedServices.php +++ b/crmeb/app/services/order/StoreOrderComputedServices.php @@ -448,7 +448,7 @@ class StoreOrderComputedServices extends BaseServices } //会员邮费享受折扣 if ($storePostage) { - $express_rule_number = 0; + $express_rule_number = 100; if (!$userInfo) { /** @var UserServices $userService */ $userService = app()->make(UserServices::class); diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php index 5d861817a..c921dcaa9 100644 --- a/crmeb/app/services/order/StoreOrderServices.php +++ b/crmeb/app/services/order/StoreOrderServices.php @@ -1724,6 +1724,24 @@ HTML; */ public function setOrderTypePayOffline(string $orderId) { + if (($count = strpos($orderId, '_')) !== false) { + $orderId = substr($orderId, $count + 1); + } + if (sys_config('offline_postage', 0) == 1) { + $orderInfo = $this->dao->get(['order_id' => $orderId]); + $cartInfoService = app()->make(StoreOrderCartInfoServices::class); + $cartInfo = $cartInfoService->getColumn(['oid' => $orderInfo['id']], 'cart_info', 'id'); + foreach ($cartInfo as $key => &$item) { + $item_arr = json_decode($item, true); + $item_arr['postage_price'] = $item_arr['origin_postage_price'] = 0; + $cartInfoService->update(['id' => $key], ['cart_info' => json_encode($item_arr)]); + } + return $this->dao->update($orderId, [ + 'pay_type' => 'offline', + 'pay_price' => bcsub((string)$orderInfo['pay_price'], (string)$orderInfo['pay_postage'], 2), + 'pay_postage' => 0 + ], 'order_id'); + } return $this->dao->update($orderId, ['pay_type' => 'offline'], 'order_id'); } @@ -2508,7 +2526,7 @@ HTML; switch ($type) { case 'order': - $info = $this->dao->get(['order_id' => $orderId], ['pay_price', 'add_time', 'combination_id', 'seckill_id', 'bargain_id']); + $info = $this->dao->get(['order_id' => $orderId], ['pay_price', 'add_time', 'combination_id', 'seckill_id', 'bargain_id', 'pay_postage']); if (!$info) { throw new PayException('您支付的订单不存在'); } @@ -2529,6 +2547,8 @@ HTML; } $data['pay_price'] = $info['pay_price']; + $data['pay_postage'] = $info['pay_postage']; + $data['offline_postage'] = sys_config('offline_postage', 0); $data['invalid_time'] = $time; break; diff --git a/template/uni-app/pages/goods/cashier/index.vue b/template/uni-app/pages/goods/cashier/index.vue index 269870de7..5119f6eb2 100644 --- a/template/uni-app/pages/goods/cashier/index.vue +++ b/template/uni-app/pages/goods/cashier/index.vue @@ -1,9 +1,9 @@