From 9d363bd7d3c7e87b31b465ca3e77bbf44ea4b1c0 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Sat, 1 Apr 2023 10:39:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E7=A0=8D=E4=BB=B7?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/activity/bargain/StoreBargainUserDao.php | 2 +- crmeb/app/dao/order/StoreOrderDao.php | 4 ++-- crmeb/app/services/activity/bargain/StoreBargainServices.php | 4 ++-- .../admin/src/pages/marketing/storeBargain/statistics.vue | 3 +-- .../admin/src/pages/marketing/storeCombination/statistics.vue | 3 +-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/crmeb/app/dao/activity/bargain/StoreBargainUserDao.php b/crmeb/app/dao/activity/bargain/StoreBargainUserDao.php index 78ddda87f..31f48bf64 100644 --- a/crmeb/app/dao/activity/bargain/StoreBargainUserDao.php +++ b/crmeb/app/dao/activity/bargain/StoreBargainUserDao.php @@ -106,7 +106,7 @@ class StoreBargainUserDao extends BaseDao { return $this->search($where)->with(['getBargain', 'getUser']) ->when(isset($where['real_name']) && $where['real_name'] != '', function ($query) use ($where) { - $query->where('uid|nickname', 'like', '%' . $where['keyword'] . '%'); + $query->where('uid', $where['real_name']); })->when($page != 0, function ($query) use ($page, $limit) { $query->page($page, $limit); })->order('add_time desc')->select()->toArray(); diff --git a/crmeb/app/dao/order/StoreOrderDao.php b/crmeb/app/dao/order/StoreOrderDao.php index 6dd4614f3..0dec3588b 100644 --- a/crmeb/app/dao/order/StoreOrderDao.php +++ b/crmeb/app/dao/order/StoreOrderDao.php @@ -932,7 +932,7 @@ class StoreOrderDao extends BaseDao return $this->search($where)->where('seckill_id', $id) ->when($page && $limit, function ($query) use ($page, $limit) { $query->page($page, $limit); - })->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray(); + })->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray(); } /** @@ -951,7 +951,7 @@ class StoreOrderDao extends BaseDao return $this->search($where)->where('bargain_id', $id) ->when($page && $limit, function ($query) use ($page, $limit) { $query->page($page, $limit); - })->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray(); + })->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray(); } /** diff --git a/crmeb/app/services/activity/bargain/StoreBargainServices.php b/crmeb/app/services/activity/bargain/StoreBargainServices.php index 8e62edf35..bf18fcf9e 100644 --- a/crmeb/app/services/activity/bargain/StoreBargainServices.php +++ b/crmeb/app/services/activity/bargain/StoreBargainServices.php @@ -996,8 +996,8 @@ class StoreBargainServices extends BaseServices $spread_count = $bargainUserHelp->count(['bargain_id' => $id, 'type' => 0]); $start_count = $bargainUser->count(['bargain_id' => $id]); $success_count = $bargainUser->count(['bargain_id' => $id, 'status' => 3]); - $pay_price = $orderServices->sum(['bargain_id' => $id, 'paid' => 1], 'pay_price', true); - $pay_count = $orderServices->count(['bargain_id' => $id, 'paid' => 1]); + $pay_price = $orderServices->sum([['bargain_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'pay_price', false); + $pay_count = $orderServices->getDistinctCount([['bargain_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'uid', false); $pay_rate = $start_count > 0 ? bcmul(bcdiv((string)$pay_count, (string)$start_count, 2), '100', 2) : 0; return compact('people_count', 'spread_count', 'start_count', 'success_count', 'pay_price', 'pay_count', 'pay_rate'); } diff --git a/template/admin/src/pages/marketing/storeBargain/statistics.vue b/template/admin/src/pages/marketing/storeBargain/statistics.vue index 2436b9c38..b7d6d54ac 100644 --- a/template/admin/src/pages/marketing/storeBargain/statistics.vue +++ b/template/admin/src/pages/marketing/storeBargain/statistics.vue @@ -26,8 +26,7 @@ - diff --git a/template/admin/src/pages/marketing/storeCombination/statistics.vue b/template/admin/src/pages/marketing/storeCombination/statistics.vue index a3567354e..0d70db925 100644 --- a/template/admin/src/pages/marketing/storeCombination/statistics.vue +++ b/template/admin/src/pages/marketing/storeCombination/statistics.vue @@ -26,8 +26,7 @@ - From 7b9d489092f2087555b7760c1bb90a660c53299a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Sat, 1 Apr 2023 10:54:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=92=8C=E8=87=AA=E5=8A=A8=E8=AF=84=E4=BB=B7=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/activity/live/LiveRoomServices.php | 2 +- crmeb/app/services/order/StoreOrderServices.php | 4 ++-- crmeb/app/services/order/StoreOrderTakeServices.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crmeb/app/services/activity/live/LiveRoomServices.php b/crmeb/app/services/activity/live/LiveRoomServices.php index a5f03b14a..64c23ce29 100644 --- a/crmeb/app/services/activity/live/LiveRoomServices.php +++ b/crmeb/app/services/activity/live/LiveRoomServices.php @@ -242,6 +242,7 @@ class LiveRoomServices extends BaseServices /** * 同步直播间状态 * @return bool + * @throws \Exception */ public function syncRoomStatus() { @@ -249,7 +250,6 @@ class LiveRoomServices extends BaseServices $limit = 50; $data = $dataAll = []; $rooms = $this->dao->getColumn([], 'id,room_id,live_status', 'room_id'); -// if (!$rooms) return true; do { $wxRooms = MiniProgramService::getLiveInfo($start, $limit); foreach ($wxRooms as $room) { diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php index 2872f002c..57e91fb2e 100644 --- a/crmeb/app/services/order/StoreOrderServices.php +++ b/crmeb/app/services/order/StoreOrderServices.php @@ -2566,12 +2566,12 @@ HTML; public function autoComment() { //自动评价天数 - $systemCommentTime = (int)sys_config('system_comment_time', 0); + $systemCommentTime = sys_config('system_comment_time', 0); //0为取消自动默认好评功能 if ($systemCommentTime == 0) { return true; } - $sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemCommentTime . ' day'))); + $sevenDay = bcsub((string)time(), bcmul((string)$systemCommentTime, '86400')); /** @var StoreOrderStoreOrderStatusServices $service */ $service = app()->make(StoreOrderStoreOrderStatusServices::class); $orderList = $service->getTakeOrderIds([ diff --git a/crmeb/app/services/order/StoreOrderTakeServices.php b/crmeb/app/services/order/StoreOrderTakeServices.php index 7e98b8060..e16fc003a 100644 --- a/crmeb/app/services/order/StoreOrderTakeServices.php +++ b/crmeb/app/services/order/StoreOrderTakeServices.php @@ -522,12 +522,12 @@ class StoreOrderTakeServices extends BaseServices public function autoTakeOrder() { //7天前时间戳 - $systemDeliveryTime = (int)sys_config('system_delivery_time', 0); + $systemDeliveryTime = sys_config('system_delivery_time', 0); //0为取消自动收货功能 if ($systemDeliveryTime == 0) { return true; } - $sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemDeliveryTime . ' day'))); + $sevenDay = bcsub((string)time(), bcmul((string)$systemDeliveryTime, '86400')); /** @var StoreOrderStoreOrderStatusServices $service */ $service = app()->make(StoreOrderStoreOrderStatusServices::class); $orderList = $service->getTakeOrderIds([ From 389e3ab5368a72e76ef360ce68e2e528326aa48e Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Sat, 1 Apr 2023 11:06:34 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=92=8C=E8=87=AA=E5=8A=A8=E8=AF=84=E4=BB=B7=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/order/StoreOrderServices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php index 57e91fb2e..bdd04d39e 100644 --- a/crmeb/app/services/order/StoreOrderServices.php +++ b/crmeb/app/services/order/StoreOrderServices.php @@ -2579,7 +2579,7 @@ HTML; 'is_del' => 0, 'paid' => 1, 'status' => 2, - 'change_type' => ['take_delivery'] + 'change_type' => ['take_delivery','user_take_delivery'] ], 30); foreach ($orderList as $item) { AutoCommentJob::dispatch([$item['id'], $item['cart_id']]); From ea06e5bef0d116b4d9f64af7204e69d334d5b581 Mon Sep 17 00:00:00 2001 From: From-wh Date: Sat, 1 Apr 2023 18:39:34 +0800 Subject: [PATCH 4/4] =?UTF-8?q?improve:=20=E5=88=86=E7=B1=BB=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=BA=95=E9=83=A8=E8=8F=9C=E5=8D=95=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/components/pageFooter/index.vue | 15 ++++++++++++--- template/uni-app/pages/goods_cate/goods_cate.vue | 6 ++++-- template/uni-app/pages/goods_cate/goods_cate3.vue | 1 - template/uni-app/pages/index/diy/index.vue | 8 +++++--- template/uni-app/pages/index/index.vue | 1 + 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/template/uni-app/components/pageFooter/index.vue b/template/uni-app/components/pageFooter/index.vue index 25f1a46dd..941668f6c 100644 --- a/template/uni-app/components/pageFooter/index.vue +++ b/template/uni-app/components/pageFooter/index.vue @@ -58,8 +58,7 @@ computed: mapGetters(['isLogin', 'cartNum', 'activityTab']), watch: { activityTab: { - handler(nVal, oVal) { - }, + handler(nVal, oVal) {}, deep: true }, configData: { @@ -83,6 +82,14 @@ let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 let curRoute = routes[routes.length - 1].route //获取当前页面路由 this.$store.commit('ACTIVITYTAB', '/' + curRoute); + uni.$on('uploadFooter', () => { + let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 + let curRoute = routes[routes.length - 1].route //获取当前页面路由 + this.$store.commit('ACTIVITYTAB', '/' + curRoute); + }) + }, + onShow() { + }, mounted() { getNavigation().then(res => { @@ -97,7 +104,9 @@ this.getCartNum() } }, - + onHide() { + uni.$off(['uploadFooter']) + }, methods: { goRouter(item) { var pages = getCurrentPages(); diff --git a/template/uni-app/pages/goods_cate/goods_cate.vue b/template/uni-app/pages/goods_cate/goods_cate.vue index aff54a578..35f2d26b9 100644 --- a/template/uni-app/pages/goods_cate/goods_cate.vue +++ b/template/uni-app/pages/goods_cate/goods_cate.vue @@ -49,7 +49,7 @@ getCategoryVersion().then(res => { if (!uni.getStorageSync('CAT_VERSION') || res.data.version != uni.getStorageSync( 'CAT_VERSION')) { - this.isNew = !this.isNew + this.isNew = !this.isNew uni.setStorageSync('CAT_VERSION', res.data.version) } else { // this.isNew = false @@ -58,7 +58,9 @@ }) }, jumpIndex() { - if (this.is_diy) {} + // uni.reLaunch({ + // url: '/pages/index/index' + // }) }, classStyle() { colorChange('category').then(res => { diff --git a/template/uni-app/pages/goods_cate/goods_cate3.vue b/template/uni-app/pages/goods_cate/goods_cate3.vue index a4a1264da..dc3793cff 100644 --- a/template/uni-app/pages/goods_cate/goods_cate3.vue +++ b/template/uni-app/pages/goods_cate/goods_cate3.vue @@ -564,7 +564,6 @@ title: that.$t(`不能输入0喔`) }); } - console.log(that.attr.productSelect.cart_num, 'that.attr.productSelect.cart_num') let q = { product_id: id, num: duo ? that.attr.productSelect.cart_num : 1, diff --git a/template/uni-app/pages/index/diy/index.vue b/template/uni-app/pages/index/diy/index.vue index 5a30cc41e..cc1be78fe 100644 --- a/template/uni-app/pages/index/diy/index.vue +++ b/template/uni-app/pages/index/diy/index.vue @@ -13,7 +13,8 @@ :isSortType="isSortType" @bindSortId="bindSortId" @bindHeight="bindHeight" :isFixed="isFixed"> - + + @@ -141,7 +142,9 @@ {{ site_config }} + + @@ -460,7 +463,6 @@ uni.showLoading({ title: this.$t(`加载中`) }) - console.log('1111') this.diyData(); this.getIndexData(); getShare().then(res => { @@ -659,7 +661,7 @@ }, diyData() { let that = this; - getDiy(0).then(res => { + getDiy(0).then(res => { uni.hideLoading() uni.setStorageSync('DIY_DATA', res.data) setTimeout(() => { diff --git a/template/uni-app/pages/index/index.vue b/template/uni-app/pages/index/index.vue index 627bbc9fc..b43deb225 100644 --- a/template/uni-app/pages/index/index.vue +++ b/template/uni-app/pages/index/index.vue @@ -39,6 +39,7 @@ }, methods: { getVersion(name) { + uni.$emit('uploadFooter') getVersion(name).then(res => { this.version = res.data.version this.isDiy = res.data.is_diy