diff --git a/src/api/modules/mer_admin.js b/src/api/modules/mer_admin.js index 6948e3a..37cbd51 100644 --- a/src/api/modules/mer_admin.js +++ b/src/api/modules/mer_admin.js @@ -3,124 +3,148 @@ import city_data from "@/utils/country-level2-data.js"; import qs from "qs"; export const mer_admin = { - /** - * 登录 - * @param {object} params LoginParam - * @param {number} params.type - * @param {string} params.role - * @param {string} params.username - * @param {string} params.password - * @param {string} params.mobile - * @param {string} params.code - * @returns - */ - loginByAccount: (params) => { - return $http.post(`/auth/login`, { - ...params, - type: 1 - }) - }, - loginByMobile: (params) => { - return $http.post(`/merchant-api/auth/sms/login`, { - ...params, - type: 2 - }) - }, - getYZM(mobile) { - return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`); - }, - getInfo() { - return $http.get(`/merchant-api/auth/info`); - }, - //商品管理 - //保存商品信息 - saveProduct: (data) => { - return $http.post(`/merchant-api/product/save`, data); - }, - //保存商品基本信息 - saveProductBase: (data) => { - return $http.post(`/merchant-api/product/save/basic`, data); - }, - //返回商品分类以及列表(聚合) - getPolyProduct: (data) => { - return $http.post(`/merchant-api/product/polymerization/list`, data); - }, - //商品分页 - getProductPage: (data) => { - return $http.post(`/merchant-api/product/page`, data); - }, - //商户商品分类 - getProductCategory: () => { - return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`); - }, - //上架或下架 - putOnShelvesProducts: (data) => { - return $http.post(`/merchant-api/product/batch/update/status`, data); - }, - //批量删除商品 - BatchDeleteProducts: (data) => { - return $http.post(`/merchant-api/product/batch/delete`, data); - }, - //打折扣 - setDiscounts: (data) => { - return $http.post(`merchant-api/activity/save`, data); - }, - //获取销售单位 - getSaleUnit: (data) => { - return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data }); - }, - //文件上传 - uploadFile: () => { - return `${window.SITE_CONFIG['baseUrl']}/merchant-api/file/upload` - }, - //直接获取城市数据 - getCityOptions: () => { - return city_data; - }, - //省市县数据 - getCity: () => { - return $http.get(`/merchant-api/common/pca`); - }, - //添加运费模板 - addShippingTemplate: (data) => { - return $http.post(`/merchant-api/shippingTemplates/add`, data); - }, - //删除模板 - removeShippingTemplate: (id) => { - return $http.post(`/merchant-api/shippingTemplates/delete`, qs.stringify({ - id - }), { - headers: { - 'Content-Type': 'application/x-www-form-urlencoded' - } - }) - }, - //更新模板 - updateShippingTemplate: (data) => { - return $http.post(`/merchant-api/shippingTemplates/update`, data); - }, - //获取模板分页 - getShippingTemplatePage: (data) => { - return $http.request({ - method: 'get', - url: '/merchant-api/shippingTemplates/page', - params: data - }) - }, - //获取配送模板列表 - getShippingTemplateList: (data) => { - return $http.request({ - method: 'get', - url: '/merchant-api/shippingTemplates/list', - params: data - }) - }, - //获取模板详情 - getShippingTemplateInfo: (id) => { - return $http.request({ - method: 'get', - url: '/merchant-api/shippingTemplates/detail', - params: { id } - }) - } -} \ No newline at end of file + /** + * 登录 + * @param {object} params LoginParam + * @param {number} params.type + * @param {string} params.role + * @param {string} params.username + * @param {string} params.password + * @param {string} params.mobile + * @param {string} params.code + * @returns + */ + loginByAccount: (params) => { + return $http.post(`/auth/login`, { + ...params, + type: 1, + }); + }, + loginByMobile: (params) => { + return $http.post(`/merchant-api/auth/sms/login`, { + ...params, + type: 2, + }); + }, + getYZM(mobile) { + return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`); + }, + getInfo() { + return $http.get(`/merchant-api/auth/info`); + }, + //商品管理 + //保存商品信息 + saveProduct: (data) => { + return $http.post(`/merchant-api/product/save`, data); + }, + //保存商品基本信息 + saveProductBase: (data) => { + return $http.post(`/merchant-api/product/save/basic`, data); + }, + //返回商品分类以及列表(聚合) + getPolyProduct: (data) => { + return $http.post(`/merchant-api/product/polymerization/list`, data); + }, + //商品分页 + getProductPage: (data) => { + return $http.post(`/merchant-api/product/page`, data); + }, + //商户商品分类 + getProductCategory: () => { + return $http.get( + `/merchant-api/product/category/list?shopId=${ + JSON.parse(sessionStorage.getItem("userInfo")).shopId + }` + ); + }, + //上架或下架 + putOnShelvesProducts: (data) => { + return $http.post(`/merchant-api/product/batch/update/status`, data); + }, + //批量删除商品 + BatchDeleteProducts: (data) => { + return $http.post(`/merchant-api/product/batch/delete`, data); + }, + //打折扣 + setDiscounts: (data) => { + return $http.post(`merchant-api/activity/save`, data); + }, + //获取销售单位 + getSaleUnit: (data) => { + return $http.request({ + url: `/merchant-api/product/unit/list`, + method: "get", + params: data, + }); + }, + //文件上传 + uploadFile: () => { + return `${window.SITE_CONFIG["baseUrl"]}/merchant-api/file/upload`; + }, + //直接获取城市数据 + getCityOptions: () => { + return city_data; + }, + //省市县数据 + getCity: () => { + return $http.get(`/merchant-api/common/pca`); + }, + //添加运费模板 + addShippingTemplate: (data) => { + return $http.post(`/merchant-api/shippingTemplates/add`, data); + }, + //删除模板 + removeShippingTemplate: (id) => { + return $http.post( + `/merchant-api/shippingTemplates/delete`, + qs.stringify({ + id, + }), + { + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + } + ); + }, + //更新模板 + updateShippingTemplate: (data) => { + return $http.post(`/merchant-api/shippingTemplates/update`, data); + }, + //获取模板分页 + getShippingTemplatePage: (data) => { + return $http.request({ + method: "get", + url: "/merchant-api/shippingTemplates/page", + params: data, + }); + }, + //获取配送模板列表 + getShippingTemplateList: (data) => { + return $http.request({ + method: "get", + url: "/merchant-api/shippingTemplates/list", + params: data, + }); + }, + //获取模板详情 + getShippingTemplateInfo: (id) => { + return $http.request({ + method: "get", + url: "/merchant-api/shippingTemplates/detail", + params: { id }, + }); + }, + //银行卡分页 + bankCardPage: (data) => { + return $http.request({ + method: "get", + url: "/merchant-api/bank/page", + params: data, + }); + }, + //添加商家端银行卡 + bankCardAdd: (data) => { + return $http.post(`/merchant-api/bank/com-create`, data); + }, +}; diff --git a/src/router/full-routers.js b/src/router/full-routers.js index 1d24baa..b63962a 100644 --- a/src/router/full-routers.js +++ b/src/router/full-routers.js @@ -1,148 +1,165 @@ import { getUUID } from "@/utils"; export default { - "msg": "success", - "menuList": [ - // { - // "menuId": 999, - // url: 'http://localhost:8082/', - // type: 'iframe', - // // isMicroApp: true, - // name: '大屏展示', - // icon: 's-data', - // "type": 1, - // }, - // new=== - //放到首页 - // { - // "menuId": getUUID(), - // "parentId": 0, - // "parentName": null, - // "name": "数据看板", - // "url": "local-dashboard/dashboard", - // "perms": "", - // "type": 1, - // "elIcon": "el-icon-data-analysis", - // "orderNum": 0, - // "open": null, - // list: [] - // }, + msg: "success", + menuList: [ + // { + // "menuId": 999, + // url: 'http://localhost:8082/', + // type: 'iframe', + // // isMicroApp: true, + // name: '大屏展示', + // icon: 's-data', + // "type": 1, + // }, + // new=== + //放到首页 + // { + // "menuId": getUUID(), + // "parentId": 0, + // "parentName": null, + // "name": "数据看板", + // "url": "local-dashboard/dashboard", + // "perms": "", + // "type": 1, + // "elIcon": "el-icon-data-analysis", + // "orderNum": 0, + // "open": null, + // list: [] + // }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "商品", + url: "local-course/resources", + perms: "", + type: 0, + elIcon: "el-icon-menu", + orderNum: 0, + open: null, + list: [ { - "menuId": getUUID(), - "parentId": 0, - "parentName": null, - "name": "商品", - "url": "local-course/resources", - "perms": "", - "type": 0, - "elIcon": "el-icon-menu", - "orderNum": 0, - "open": null, - list: [{ - "menuId": getUUID(), - "parentId": 0, - "parentName": null, - "name": "商品管理", - "url": "product/index", - "perms": "", - "type": 1, - "elIcon": "el-icon-menu", - "orderNum": 0, - "open": null, - list: [] - }] + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "商品管理", + url: "product/index", + perms: "", + type: 1, + elIcon: "el-icon-menu", + orderNum: 0, + open: null, + list: [], }, + ], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "运费管理", + url: "", + perms: "", + type: 0, + elIcon: "el-icon-money", + orderNum: 0, + open: null, + list: [ { - "menuId": getUUID(), - "parentId": 0, - "parentName": null, - "name": "运费管理", - "url": "", - "perms": "", - "type": 0, - "elIcon": "el-icon-money", - "orderNum": 0, - "open": null, - list: [{ - "menuId": getUUID(), - "parentId": 0, - "parentName": null, - "name": "运费模板", - "url": "logistics-fare/logistics-template/index", - "perms": "", - "type": 1, - "elIcon": "el-icon-postcard", - "orderNum": 0, - "open": null, - list: [] - }] + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "运费模板", + url: "logistics-fare/logistics-template/index", + perms: "", + type: 1, + elIcon: "el-icon-postcard", + orderNum: 0, + open: null, + list: [], }, - // { - // "menuId": getUUID(), - // "parentId": 0, - // "parentName": null, - // "name": "教务管理", - // "url": "local-affairs", - // "perms": "", - // "type": 0, - // "elIcon": "el-icon-office-building", - // "orderNum": 0, - // "open": null, - // list: [ - // { - // "menuId": getUUID(), - // "parentId": 2, - // "parentName": null, - // "name": "年级管理", - // "url": "local-affairs/grade", - // "perms": "", - // "type": 1, - // "icon": "log", - // "orderNum": 0, - // "open": null, - // "list": [] - // }, - // { - // "menuId": getUUID(), - // "parentId": 2, - // "parentName": null, - // "name": "班级管理", - // "url": "local-affairs/class", - // "perms": "", - // "type": 1, - // "icon": "log", - // "orderNum": 0, - // "open": null, - // "list": [] - // }, - // { - // "menuId": getUUID(), - // "parentId": 2, - // "parentName": null, - // "name": "教师管理", - // "url": "local-teacher/teacher", - // "perms": "", - // "type": 1, - // "icon": "log", - // "orderNum": 0, - // "open": null, - // "list": [] - // }, - // { - // "menuId": getUUID(), - // "parentId": 0, - // "parentName": null, - // "name": "学校管理", - // "url": "local-school/school", - // "perms": "", - // "type": 1, - // "elIcon": "el-icon-school", - // "orderNum": 0, - // "open": null, - // list: [] - // }, - // ] - // }, - ], - "code": 0, - "permissions": [] -} \ No newline at end of file + ], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "银行卡管理", + url: "bank-card/index", + perms: "", + type: 0, + elIcon: "el-icon-menu", + orderNum: 0, + open: null, + list: [], + }, + // { + // "menuId": getUUID(), + // "parentId": 0, + // "parentName": null, + // "name": "教务管理", + // "url": "local-affairs", + // "perms": "", + // "type": 0, + // "elIcon": "el-icon-office-building", + // "orderNum": 0, + // "open": null, + // list: [ + // { + // "menuId": getUUID(), + // "parentId": 2, + // "parentName": null, + // "name": "年级管理", + // "url": "local-affairs/grade", + // "perms": "", + // "type": 1, + // "icon": "log", + // "orderNum": 0, + // "open": null, + // "list": [] + // }, + // { + // "menuId": getUUID(), + // "parentId": 2, + // "parentName": null, + // "name": "班级管理", + // "url": "local-affairs/class", + // "perms": "", + // "type": 1, + // "icon": "log", + // "orderNum": 0, + // "open": null, + // "list": [] + // }, + // { + // "menuId": getUUID(), + // "parentId": 2, + // "parentName": null, + // "name": "教师管理", + // "url": "local-teacher/teacher", + // "perms": "", + // "type": 1, + // "icon": "log", + // "orderNum": 0, + // "open": null, + // "list": [] + // }, + // { + // "menuId": getUUID(), + // "parentId": 0, + // "parentName": null, + // "name": "学校管理", + // "url": "local-school/school", + // "perms": "", + // "type": 1, + // "elIcon": "el-icon-school", + // "orderNum": 0, + // "open": null, + // list: [] + // }, + // ] + // }, + ], + code: 0, + permissions: [], +}; diff --git a/src/views/modules/bank-card/index.vue b/src/views/modules/bank-card/index.vue new file mode 100644 index 0000000..67f4b60 --- /dev/null +++ b/src/views/modules/bank-card/index.vue @@ -0,0 +1,199 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/bank-card/popup/add-or-update.vue b/src/views/modules/bank-card/popup/add-or-update.vue new file mode 100644 index 0000000..c7aef1e --- /dev/null +++ b/src/views/modules/bank-card/popup/add-or-update.vue @@ -0,0 +1,452 @@ + + + \ No newline at end of file