diff --git a/src/api/orderPush/orderPush.js b/src/api/orderPush/orderPush.js new file mode 100644 index 0000000..b7d6db5 --- /dev/null +++ b/src/api/orderPush/orderPush.js @@ -0,0 +1,29 @@ +import request from '@/utils/request' +import { URL } from '@/config' + +/** + * 个推测试接口 + * @author Seven + * @data 2025-1-6 + * @param { + * + * "cid": "13128997057", // 终端id + "title": "小发同城", // 标题 + "message": "尊敬的商家,你有一条新的订单,请及时处理!", // 推送内容 + "clickType":"url", // 点击类型 + "clickContent":"https://mall.gpxscs.cn"// 跳转地址 + * } + * @returns { } + * @see https://mall.gpxscs.cn/mobile/account/login/push/testcase + */ + +export function orderPushTest(params) { + return request({ + url: URL.orderPush.orderPushTest, + method: 'post', + headers: { + 'Content-Type': 'application/json', + }, + data: params, + }) +} diff --git a/src/config/net.config.js b/src/config/net.config.js index c47399f..633da1d 100644 --- a/src/config/net.config.js +++ b/src/config/net.config.js @@ -29,6 +29,9 @@ let url = { disableUpdateShopApp: api_url + '/admin/admin/app-market-update/enable-or-disable', }, + orderPush: { + orderPushTest: api_url + '/mobile/account/login/push/testcase', + }, city: { user: { paotuier: { diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 2b0b3bd..dfe964c 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -15,6 +15,7 @@ const state = () => ({ avatar: 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif', rid: 0, site_id: 0, + isAdmin: localStorage.getItem('isAdmin') || 0, }) const getters = { token: (state) => state.token, @@ -61,6 +62,9 @@ const mutations = { setSiteId(state, site_id) { state.site_id = site_id }, + setIsAdmin(state, isAdmin) { + state.isAdmin = isAdmin + }, } const actions = { /** @@ -79,6 +83,13 @@ const actions = { */ async login({ commit }, userInfo) { const { data, msg, status, code } = await login(userInfo) + if (data && data.user_account == 'admin') { + commit('setIsAdmin', 1) + localStorage.setItem('isAdmin', 1) + } else { + commit('setIsAdmin', 0) + localStorage.setItem('isAdmin', 0) + } if (status != 200) { Vue.prototype.$baseMessage(msg, 'error', 'vab-hey-message-error') @@ -199,6 +210,7 @@ const actions = { * @param {*} { dispatch } */ async logout({ dispatch }) { + localStorage.setItem('isAdmin', 0) await logout() await dispatch('resetAll') }, diff --git a/src/utils/routes.js b/src/utils/routes.js index caba3aa..a1f7320 100644 --- a/src/utils/routes.js +++ b/src/utils/routes.js @@ -4,7 +4,7 @@ import { isExternal } from 'vue-plugin-utils' import { recordRoute } from '@/config' import qs from 'qs' -import icon from "../views/403.vue" +import icon from '../views/403.vue' /** * @description all模式渲染后端返回路由,支持包含views路径的所有页面 @@ -13,267 +13,281 @@ import icon from "../views/403.vue" */ export function convertRouter(asyncRoutes) { return asyncRoutes.map((route) => { - - - if(route.meta.title == '店铺' && route.name == 'Vab330'){ + if (route.meta.title == '店铺' && route.name == 'Vab330') { const obj = { - path:"/shopAudit", - "component":"@/views/store/shopAudit/shopAudit", - name: "Vab83000", + path: '/shopAudit', + component: '@/views/store/shopAudit/shopAudit', + name: 'Vab83000', redirect: null, meta: { - title: "商家入驻审批", - icon: "", - noClosable: 0, - hidden: null + title: '商家入驻审批', + icon: '', + noClosable: 0, + hidden: null, }, - menuHidden: false + menuHidden: false, } - route.children.splice(0,0,obj) - + route.children.splice(0, 0, obj) } - if(route.meta.title == '设置'){ - - const obj = { - path: "/receiptMachine", - "component":"@/views/settings/config/receiptMachine", - name: "Vab86001", + if (route.meta.title == '设置') { + const obj = { + path: '/receiptMachine', + component: '@/views/settings/config/receiptMachine', + name: 'Vab86001', redirect: null, meta: { - title: "小票机品牌", - icon: "", - noClosable: 0, - hidden: null + title: '小票机品牌', + icon: '', + noClosable: 0, + hidden: null, }, - menuHidden: false + menuHidden: false, } - route.children.push(obj); - } + route.children.push(obj) + } - if(route.meta.title == "基础"){ - + if (route.meta.title == '基础') { const cloudPrintRoute = { - path: "/cloudPrint", - name: "Vab81000", - "component":"@/views/vab/icon", + path: '/cloudPrint', + name: 'Vab81000', + component: '@/views/vab/icon', redirect: null, - + meta: { - "title": "云打印", - "icon": "", - "noClosable": 0, - "hidden": null + title: '云打印', + icon: '', + noClosable: 0, + hidden: null, }, menuHidden: false, children: [ - { - path: "/plotterManager", - "component":"@/views/store/base/cloudPrint/plotterManager", - name: "Vab81001", - redirect: null, - meta: { - title: "打印机管理", - icon: "", - noClosable: 0, - hidden: null - }, - menuHidden: false + { + path: '/plotterManager', + component: '@/views/store/base/cloudPrint/plotterManager', + name: 'Vab81001', + redirect: null, + meta: { + title: '打印机管理', + icon: '', + noClosable: 0, + hidden: null, }, - { - path: "/addCloudPrint", - "component":"@/views/store/base/cloudPrint/editCloudPrint", - name: "Vab81002", - redirect: null, - meta: { - title: "添加打印机", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/addCloudPrint', + component: '@/views/store/base/cloudPrint/editCloudPrint', + name: 'Vab81002', + redirect: null, + meta: { + title: '添加打印机', + icon: '', + noClosable: 0, + hidden: true, }, - { - path: "/editCloudPrint", - "component":"@/views/store/base/cloudPrint/editCloudPrint", - name: "Vab81003", - redirect: null, - meta: { - title: "编辑打印机", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/editCloudPrint', + component: '@/views/store/base/cloudPrint/editCloudPrint', + name: 'Vab81003', + redirect: null, + meta: { + title: '编辑打印机', + icon: '', + noClosable: 0, + hidden: true, }, - { - path: "/templateManagement", - "component":"@/views/store/base/cloudPrint/templateManagement", - name: "Vab81004", - redirect: null, - meta: { - title: "模板管理", - icon: "", - noClosable: 0, - hidden: null - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/templateManagement', + component: '@/views/store/base/cloudPrint/templateManagement', + name: 'Vab81004', + redirect: null, + meta: { + title: '模板管理', + icon: '', + noClosable: 0, + hidden: null, }, - { - path: "/templateManagementAdd", - "component":"@/views/store/base/cloudPrint/editTemplateManagement", - name: "Vab81005", - redirect: null, - meta: { - title: "添加模板", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/templateManagementAdd', + component: '@/views/store/base/cloudPrint/editTemplateManagement', + name: 'Vab81005', + redirect: null, + meta: { + title: '添加模板', + icon: '', + noClosable: 0, + hidden: true, }, - { - path: "/templateManagementEdit", - "component":"@/views/store/base/cloudPrint/editTemplateManagement", - name: "Vab81006", - redirect: null, - meta: { - title: "编辑模板", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false - } - ] - + menuHidden: false, + }, + { + path: '/templateManagementEdit', + component: '@/views/store/base/cloudPrint/editTemplateManagement', + name: 'Vab81006', + redirect: null, + meta: { + title: '编辑模板', + icon: '', + noClosable: 0, + hidden: true, + }, + menuHidden: false, + }, + ], } const distributionSetup = { - path: "/distributionSetup", - name: "Vab82000", - "component":"@/views/vab/icon", + path: '/distributionSetup', + name: 'Vab82000', + component: '@/views/vab/icon', redirect: null, - + meta: { - "title": "配送设置", - "icon": "", - "noClosable": 0, - "hidden": null + title: '配送设置', + icon: '', + noClosable: 0, + hidden: null, }, menuHidden: false, children: [ - { - path: "/distributionMode", - "component":"@/views/store/base/distributionSetup/distributionMode", - name: "Vab82001", - redirect: null, - meta: { - title: "配送方式", - icon: "", - noClosable: 0, - hidden: null - }, - menuHidden: false + { + path: '/distributionMode', + component: '@/views/store/base/distributionSetup/distributionMode', + name: 'Vab82001', + redirect: null, + meta: { + title: '配送方式', + icon: '', + noClosable: 0, + hidden: null, }, - { - path: "/logisticsInterface", - "component":"@/views/store/base/distributionSetup/logisticsInterface", - name: "Vab82002", - redirect: null, - meta: { - title: "物流接口", - icon: "", - noClosable: 0, - hidden: null - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/logisticsInterface', + component: + '@/views/store/base/distributionSetup/logisticsInterface', + name: 'Vab82002', + redirect: null, + meta: { + title: '物流接口', + icon: '', + noClosable: 0, + hidden: null, }, - { - path: "/localDelivery", - "component":"@/views/store/base/distributionSetup/localDelivery", - name: "Vab82003", - redirect: null, - meta: { - title: "同城配送", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/localDelivery', + component: '@/views/store/base/distributionSetup/localDelivery', + name: 'Vab82003', + redirect: null, + meta: { + title: '同城配送', + icon: '', + noClosable: 0, + hidden: true, }, - { - path: "/selfPickUpSite", - "component":"@/views/store/base/distributionSetup/selfPickUpSite", - name: "Vab82004", - redirect: null, - meta: { - title: "自提点列表", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/selfPickUpSite', + component: '@/views/store/base/distributionSetup/selfPickUpSite', + name: 'Vab82004', + redirect: null, + meta: { + title: '自提点列表', + icon: '', + noClosable: 0, + hidden: true, }, - { - path: "/selfPickUpSiteAdd", - "component":"@/views/store/base/distributionSetup/editSelfPickUpSite", - name: "Vab82005", - redirect: null, - meta: { - title: "编辑自提点", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/selfPickUpSiteAdd', + component: + '@/views/store/base/distributionSetup/editSelfPickUpSite', + name: 'Vab82005', + redirect: null, + meta: { + title: '编辑自提点', + icon: '', + noClosable: 0, + hidden: true, }, - { - path: "/selfPickUpSiteEdit", - "component":"@/views/store/base/distributionSetup/editSelfPickUpSite", - name: "Vab82006", - redirect: null, - meta: { - title: "编辑自提点", - icon: "", - noClosable: 0, - hidden: true - }, - menuHidden: false + menuHidden: false, + }, + { + path: '/selfPickUpSiteEdit', + component: + '@/views/store/base/distributionSetup/editSelfPickUpSite', + name: 'Vab82006', + redirect: null, + meta: { + title: '编辑自提点', + icon: '', + noClosable: 0, + hidden: true, }, - ] - + menuHidden: false, + }, + ], } - route.children.push(...[cloudPrintRoute,distributionSetup]); - route.children = route.children.filter(item=>item.name != 'Vab8083') + route.children.push(...[cloudPrintRoute, distributionSetup]) + route.children = route.children.filter((item) => item.name != 'Vab8083') } - if(route.meta.title == '设置' && route.name == 'Settings'){ + if (route.meta.title == '设置' && route.name == 'Settings') { const obj = { - path: "/appVersion", - "component":"@/views/settings/config/appVersion", - name: "Vab9019", + path: '/appVersion', + component: '@/views/settings/config/appVersion', + name: 'Vab9019', redirect: null, meta: { - title: "商家APP设置", - icon: "", - noClosable: 0, - hidden: null + title: '商家APP设置', + icon: '', + noClosable: 0, + hidden: null, }, - menuHidden: false + menuHidden: false, } - route.children.splice(0,0,obj) + route.children.splice(0, 0, obj) + } + + if (route.meta.title == '订单' && route.name == 'Vab350') { + const obj = { + path: '/orderPush', + component: '@/views/order/orderPush/orderPush', + name: 'Vab8088', + redirect: null, + meta: { + title: '个推订单测试', + icon: '', + noClosable: 0, + hidden: null, + }, + menuHidden: false, + } + route.children.splice(0, 0, obj) } if (route.component) { if (route.component === 'Layout') { - route.component = (resolve) => require(['@/vab/layouts'], resolve); + route.component = (resolve) => require(['@/vab/layouts'], resolve) } else { const index = route.component.indexOf('views') - const path = index > 0 ? route.component.slice(index) : `views/${route.component}`; + const path = + index > 0 ? route.component.slice(index) : `views/${route.component}` route.component = (resolve) => require([`@/${path}`], resolve) } } diff --git a/src/vab/components/VabColumnBar/index.vue b/src/vab/components/VabColumnBar/index.vue index 36abc2a..82e09fd 100644 --- a/src/vab/components/VabColumnBar/index.vue +++ b/src/vab/components/VabColumnBar/index.vue @@ -313,7 +313,7 @@ &-horizontal { justify-content: left; width: $base-left-menu-width-min * 1.3; - height: #{math.div($base-left-menu-width-min, 1.3)}; + height: calc(#{math.div($base-left-menu-width-min, 1.3)}); padding-left: #{math.div($base-padding, 2)}; } } diff --git a/src/views/base/product/brand/index.vue b/src/views/base/product/brand/index.vue index 6d8ae49..abb5c68 100644 --- a/src/views/base/product/brand/index.vue +++ b/src/views/base/product/brand/index.vue @@ -60,6 +60,15 @@ + + + + 0){ + this.list = data.items + this.total = data.records + } + this.listLoading = false }, }, diff --git a/src/views/base/product/type/index.vue b/src/views/base/product/type/index.vue index 73dbdec..cbc5540 100644 --- a/src/views/base/product/type/index.vue +++ b/src/views/base/product/type/index.vue @@ -51,6 +51,14 @@ prop="type_id" show-overflow-tooltip /> + item.curr_date) this.polylineOption.series[0].data = data.map( (item) => item.effective_count diff --git a/src/views/order/orderPush/orderPush.vue b/src/views/order/orderPush/orderPush.vue new file mode 100644 index 0000000..8fe7ff3 --- /dev/null +++ b/src/views/order/orderPush/orderPush.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/views/store/setupshop/index.vue b/src/views/store/setupshop/index.vue index 2e4bb52..fd59d31 100644 --- a/src/views/store/setupshop/index.vue +++ b/src/views/store/setupshop/index.vue @@ -86,7 +86,28 @@ - + + +
+ + + + +
+
+
@@ -431,6 +452,7 @@ import tree from '@/components/universalTreeSelect.vue' import keyword from '@/components/baiduMap/keyword' import { get, storeSetUp } from '@/api/store/base' import { getTree } from '@/api/base/market/category' +import { handleMatched } from '@/utils/routes' export default { name: 'SetUpShop', @@ -483,6 +505,7 @@ export default { }, placeholder: '', readOnly: false, + isRest:false }, defaultProps: { label: 'category_name', @@ -570,6 +593,7 @@ export default { store_qq: form.store_qq, store_ww: form.store_ww, company_description: form.company_description, + store_biz_state:form.store_biz_state } if (this.queryArea.province.name) { @@ -594,6 +618,9 @@ export default { return params }, + handleStoreStatus(e){ + this.storeForm.store_biz_state = e; + }, getSlideShowForm() { const form = this.slideShowForm let params = { @@ -671,6 +698,7 @@ export default { store_ww: data.info.store_ww, company_description: data.company.company_description, wx_qrcode: data.wx_qrcode, + store_biz_state:data.store_biz_state } this.srcList.push(data.wx_qrcode) diff --git a/src/views/store/shopAudit/shopAuditDetails.vue b/src/views/store/shopAudit/shopAuditDetails.vue index 31decf7..7e6601c 100644 --- a/src/views/store/shopAudit/shopAuditDetails.vue +++ b/src/views/store/shopAudit/shopAuditDetails.vue @@ -597,7 +597,7 @@ 驳回审核 @@ -940,7 +940,7 @@ export default { approvalRemark: this.form.approval_remark, approvalInvalidCol: this.checkboxList.filter(item => !['businessLicenseOCR', 'legalPersonOCR','personOCR','bankOCR'].includes(item)), } - + let res = await getMerchApproval(parems) if (res && res.status == 200) { this.$message({ @@ -1010,7 +1010,7 @@ export default { handlecheckbox(e) { // 企业身份证驳回 - if(e.includes('legalPersonOCR')){ + if(e.includes('legalPersonOCR') && !this.checkboxList.some(item => item === 'legal_person_id_number')){ let arr = [ 'legal_person_id_number', @@ -1024,7 +1024,7 @@ export default { this.checkboxList = [...arr,...this.checkboxList ] } // 个人身份证驳回 - if(e.includes('personOCR')){ + if(e.includes('personOCR')&& !this.checkboxList.some(item => item === 'individual_id_number')){ let arr = [ 'individual_id_number', @@ -1039,7 +1039,7 @@ export default { this.checkboxList = [...arr,...this.checkboxList] } //银行卡驳回 - if(e.includes('bankOCR')){ + if(e.includes('bankOCR')&& !this.checkboxList.some(item => item === 'bankcard_item')){ let arr = [ 'bankcard_item', @@ -1051,7 +1051,7 @@ export default { this.checkboxList = [...arr,...this.checkboxList] } // 企业营业执照驳回 - if(e.includes('businessLicenseOCR')){ + if(e.includes('businessLicenseOCR')&& !this.checkboxList.some(item => item === 'biz_license_image')){ let arr = [ 'biz_license_image', @@ -1065,10 +1065,12 @@ export default { this.checkboxList = [...arr,...this.checkboxList] } - if(e.includes("mapAddress")){ + if(e.includes("mapAddress") && !this.checkboxList.some(item => item === 'store_address')){ this.checkboxList = ['store_address',...this.checkboxList]; + } + console.log(this.checkboxList) }, handleCheckAllChange(val) { if (this.form.entity_type == 1) {