diff --git a/crmeb/app/api/controller/v1/PublicController.php b/crmeb/app/api/controller/v1/PublicController.php index 42982af31..377c6c25e 100644 --- a/crmeb/app/api/controller/v1/PublicController.php +++ b/crmeb/app/api/controller/v1/PublicController.php @@ -681,7 +681,7 @@ class PublicController $data['member_card_status'] = sys_config('member_card_status');//是否开启付费会员 $data['member_price_status'] = sys_config('member_price_status');//商品会员折扣价展示启用 $data['ali_pay_status'] = sys_config('ali_pay_status') != '0';//支付宝是否启用 - $data['wechat_pay_status'] = sys_config('pay_weixin_open') != '0';//微信是否启用 + $data['pay_weixin_open'] = sys_config('pay_weixin_open') != '0';//微信是否启用 $data['yue_pay_status'] = sys_config('yue_pay_status') == 1 && sys_config('balance_func_status') != 0;//余额是否启用 $data['offline_pay_status'] = sys_config('offline_pay_status') == 1;//线下是否启用 $data['friend_pay_status'] = sys_config('friend_pay_status') == 1;//好友是否启用 diff --git a/crmeb/app/api/controller/v1/store/StoreCartController.php b/crmeb/app/api/controller/v1/store/StoreCartController.php index 7185f886c..28ef489d9 100644 --- a/crmeb/app/api/controller/v1/store/StoreCartController.php +++ b/crmeb/app/api/controller/v1/store/StoreCartController.php @@ -124,7 +124,8 @@ class StoreCartController ['id', 0],//购物车编号 ['number', 0],//购物车编号 ]); - if (!$where['id'] || !$where['number'] || !is_numeric($where['id']) || !is_numeric($where['number'])) return app('json')->fail(100100); + if (!$where['id'] || !is_numeric($where['id'])) return app('json')->fail(100100); + if (!$where['number'] || !is_numeric($where['number'])) return app('json')->fail(100007); $res = $this->services->changeUserCartNum($where['id'], $where['number'], $request->uid()); if ($res) return app('json')->success(100001); else return app('json')->fail(100007); diff --git a/crmeb/app/dao/activity/combination/StoreCombinationDao.php b/crmeb/app/dao/activity/combination/StoreCombinationDao.php index f8f14349a..143f9f725 100644 --- a/crmeb/app/dao/activity/combination/StoreCombinationDao.php +++ b/crmeb/app/dao/activity/combination/StoreCombinationDao.php @@ -59,6 +59,8 @@ class StoreCombinationDao extends BaseDao $query->name('store_category')->where('pid', $where['cid'])->field('id')->select(); })->field('product_id')->select(); }); + })->when(isset($where['id']) && $where['id'], function ($query) use ($where) { + $query->where('id', $where['id']); }); } diff --git a/crmeb/app/dao/order/StoreOrderInvoiceDao.php b/crmeb/app/dao/order/StoreOrderInvoiceDao.php index 21c80f97b..1b98b75fb 100644 --- a/crmeb/app/dao/order/StoreOrderInvoiceDao.php +++ b/crmeb/app/dao/order/StoreOrderInvoiceDao.php @@ -53,7 +53,7 @@ class StoreOrderInvoiceDao extends BaseDao return parent::search($where, $search)->when($type, function ($query) use ($type) { switch ($type) { case 1://待开 - $query->where('is_invoice', 0)->where('invoice_time', 0)->where('is_refund', 0); + $query->where('is_invoice', 0)->where('is_refund', 0); break; case 2://已开 $query->where('is_invoice', 1); diff --git a/crmeb/app/services/activity/bargain/StoreBargainUserServices.php b/crmeb/app/services/activity/bargain/StoreBargainUserServices.php index 570e6167a..acd472493 100644 --- a/crmeb/app/services/activity/bargain/StoreBargainUserServices.php +++ b/crmeb/app/services/activity/bargain/StoreBargainUserServices.php @@ -220,7 +220,7 @@ class StoreBargainUserServices extends BaseServices public function userBargainStatusFail($bargain_id, $is_true) { if ($is_true) { - $this->dao->delete(['bargain_id' => $bargain_id, 'status' => 1]); + $this->dao->delete(['bargain_id' => $bargain_id]); /** @var StoreBargainUserHelpServices $service */ $service = app()->make(StoreBargainUserHelpServices::class); $service->delete(['bargain_id' => $bargain_id]); diff --git a/crmeb/app/services/order/StoreOrderComputedServices.php b/crmeb/app/services/order/StoreOrderComputedServices.php index a9aad3db2..408ac791a 100644 --- a/crmeb/app/services/order/StoreOrderComputedServices.php +++ b/crmeb/app/services/order/StoreOrderComputedServices.php @@ -226,8 +226,8 @@ class StoreOrderComputedServices extends BaseServices // 可用积分 $usable = bcsub((string)$userInfo['integral'], (string)$userBillServices->getBillSum(['uid' => $userInfo['uid'], 'is_frozen' => 1]), 0); - $SurplusIntegral = 0; - if ($useIntegral && $userInfo['integral'] > 0) { + $SurplusIntegral = $usable; + if ($useIntegral && $userInfo['integral'] > 0 && $other['integralRatio'] > 0) { //积分抵扣上限 $integralMaxNum = sys_config('integral_max_num', 200); if ($integralMaxNum > 0 && $usable > $integralMaxNum) { diff --git a/template/admin/src/layout/index.vue b/template/admin/src/layout/index.vue index 1ae954a3b..4aaf0c232 100644 --- a/template/admin/src/layout/index.vue +++ b/template/admin/src/layout/index.vue @@ -31,6 +31,9 @@ export default { getThemeConfig() { return this.$store.state.themeConfig.themeConfig; }, + tagNavList() { + return this.$store.state.app.tagNavList; + }, }, watch: { $route(newRoute) { diff --git a/template/admin/src/layout/navBars/tagsView/tagsView.vue b/template/admin/src/layout/navBars/tagsView/tagsView.vue index 9ae9bdcdf..ba45c569d 100644 --- a/template/admin/src/layout/navBars/tagsView/tagsView.vue +++ b/template/admin/src/layout/navBars/tagsView/tagsView.vue @@ -40,6 +40,8 @@ import Contextmenu from '@/layout/navBars/tagsView/contextmenu'; import { Session } from '@/utils/storage.js'; import { mapMutations } from 'vuex'; +import setting from '@/setting'; + export default { name: 'tagsView', components: { Contextmenu }, @@ -77,7 +79,9 @@ export default { this.tagsViewRoutesList = this.$store.state.app.tagNavList; }, mounted() { - // this.getTagsViewRoutes(); + if (!this.$store.state.app.tagNavList.length) { + this.getTagsViewRoutes(); + } }, methods: { ...mapMutations(['setBreadCrumb', 'setTagNavList', 'addTag', 'setLocal', 'setHomeRoute', 'closeTag']), @@ -90,7 +94,15 @@ export default { onTagsClick(v, k) { this.tagsRoutePath = v.path; this.tagsRefsIndex = k; - this.$router.push(v); + try { + if (v.name == 'home_index') { + this.$router.replace(`${setting.routePre}/home/`); + } else { + this.$router.push(v); + } + } catch (error) { + console.log(error); + } }, // 获取 tagsView 的下标:用于处理 tagsView 点击时的横向滚动 getTagsRefsIndex(path) { @@ -184,9 +196,8 @@ export default { // 获取 vuex 中的 tagsViewRoutes 列表 getTagsViewRoutes() { this.tagsRoutePath = this.$route.path; - this.tagsViewList = []; - if (!this.$store.state.themeConfig.themeConfig.isCacheTagsView) Session.remove('tagsViewList'); - this.tagsViewRoutesList = this.$store.state.tagsViewRoutes.tagsViewRoutes; + // if (!this.$store.state.themeConfig.themeConfig.isCacheTagsView) Session.remove('tagsViewList'); + this.tagsViewRoutesList = this.$store.state.menus.oneLvMenus; this.initTagsViewList(); }, // 存储 tagsViewList 到浏览器临时缓存中,页面刷新时,保留记录 @@ -195,14 +206,17 @@ export default { }, // 初始化设置了 tagsView 数据 initTagsViewList() { - if (Session.get('tagsViewList') && this.$store.state.themeConfig.themeConfig.isCacheTagsView) { - this.tagsViewList = Session.get('tagsViewList'); - } else { - this.tagsViewRoutesList.map((v) => { - if (v.isAffix && !v.isHide) this.tagsViewList.push({ ...v }); - }); - this.addTagsView(this.$route.path); - } + // if (Session.get('tagsViewList') && this.$store.state.themeConfig.themeConfig.isCacheTagsView) { + // this.tagsViewList = Session.get('tagsViewList'); + // } else { + let arr = []; + console.log(this.tagsViewRoutesList); + this.tagsViewRoutesList.map((v) => { + if (v.meta && v.meta.isAffix) arr.push({ ...v }); + }); + // } + console.log(arr); + this.setTagNavList(arr); // 初始化当前元素(li)的下标 this.getTagsRefsIndex(this.$route.path); // 添加初始化横向滚动条移动到对应位置 @@ -224,8 +238,7 @@ export default { this.tagsDropdown.y = clientY; this.$refs.tagsContextmenu.openContextmenu(v); }, - onContextmenuIcon(e) { - }, + onContextmenuIcon(e) {}, // 当前项右键菜单点击 onCurrentContextmenuClick(data) { let { id, path } = data; @@ -417,6 +430,13 @@ export default { // .tags-style-three { // } // // 风格4 + // 风格1 + .tags-style-one { + .is-active { + background: none !important; + color: #fff !important; + } + } // 风格4 .tags-style-four { .layout-navbars-tagsview-ul-li { @@ -436,7 +456,7 @@ export default { } .is-active { background: none !important; - color: var(--prev-bg-menu-hover-ba-color) !important; + color: #fff !important; } } // 风格5 diff --git a/template/admin/src/libs/util.js b/template/admin/src/libs/util.js index 08b97936d..f19d208e4 100644 --- a/template/admin/src/libs/util.js +++ b/template/admin/src/libs/util.js @@ -163,7 +163,7 @@ export const getHomeRoute = (routers, homeName = 'home') => { export const getNewTagList = (list, newRoute) => { const { name, path, meta } = newRoute; let newList = [...list]; - if (newList.findIndex((item) => item.name === name) >= 0) return newList; + if (newList.findIndex((item) => item.path === path) >= 0) return newList; else newList.push({ name, path, meta }); return newList; }; diff --git a/template/admin/src/pages/account/login/index.vue b/template/admin/src/pages/account/login/index.vue index bacf901c9..2caad821c 100644 --- a/template/admin/src/pages/account/login/index.vue +++ b/template/admin/src/pages/account/login/index.vue @@ -213,6 +213,8 @@ export default { this.$store.dispatch('routesList/setRoutesList', data.menus); let arr = formatFlatteningRoutes(this.$router.options.routes); this.formatTwoStageRoutes(arr); + this.$store.commit('menus/setOneLvMenus', arr); + // 记录用户信息 this.$store.commit('userInfo/name', data.user_info.account); this.$store.commit('userInfo/avatar', data.user_info.head_pic); @@ -241,8 +243,7 @@ export default { this.checkSocket(); } catch (e) {} PrevLoading.start(); - - return this.$router.replace({ + return this.$router.push({ path: findFirstNonNullChildren(res.data.menus).path || this.$routeProStr + '/', }); }) diff --git a/template/admin/src/pages/kefu/pc/components/chatList.vue b/template/admin/src/pages/kefu/pc/components/chatList.vue index eaad39085..60104e336 100644 --- a/template/admin/src/pages/kefu/pc/components/chatList.vue +++ b/template/admin/src/pages/kefu/pc/components/chatList.vue @@ -21,7 +21,7 @@ @click="selectUser(item)" >