diff --git a/src/api/modules/common.js b/src/api/modules/common.js index 0d5c907..805091c 100644 --- a/src/api/modules/common.js +++ b/src/api/modules/common.js @@ -2,45 +2,105 @@ import $http from '../../utils/httpRequest' // 修改密码 export const password = (password, newPassword) => { - return $http({ - url: '/sys/user/password', - method: 'post', - data: $http.adornData({ - 'password': password, - 'newPassword': newPassword - }) + return $http({ + url: '/sys/user/password', + method: 'post', + data: $http.adornData({ + password: password, + newPassword: newPassword }) + }) } // 退出登录 export const logout = () => { - return $http({ - url: '/merchant-api/auth/logout', - method: 'post', - data: $http.adornData() - }) + return $http({ + url: '/merchant-api/auth/logout', + method: 'post', + data: $http.adornData() + }) } // 获取用户信息 -export const getUserInfo=()=>{ - return $http({ - url: '/merchant-api/auth/info', - method: 'get', - params: $http.adornParams() - }) +export const getUserInfo = () => { + return $http({ + url: '/merchant-api/auth/info', + method: 'get', + params: $http.adornParams() + }) } //登录接口 -export const login=(username,password,uuid,captcha)=>{ - return $http({ - url: '/auth/login', - method: 'post', - data: $http.adornData({ - 'username': username, - 'password': password, - 'code':captcha, - 'uuid': uuid, - // 'captcha': captcha - }) - }) +export const login = (username, password, uuid, captcha) => { + return $http({ + url: '/auth/login', + method: 'post', + data: $http.adornData({ + username: username, + password: password, + code: captcha, + uuid: uuid + // 'captcha': captcha + }) + }) +} + +// 获取市场购物须知 +export const getMarketPayNotice = marketId => { + return $http({ + url: '/merchant-api/pay-notice/market/' + marketId, + method: 'get' + }) +} + +// 获取店铺购物须知 +export const getShopPayNotice = shopId => { + return $http({ + url: '/merchant-api/pay-notice/shop/' + shopId, + method: 'get' + }) +} + +// 修改菜市场须知 +export const updateMarketPayNotice = data => { + return $http({ + url: '/merchant-api/pay-notice/market', + method: 'put', + data: $http.adornData({ + ...data + }) + }) +} + +// 创建菜市场须知 +export const createMarketPayNotice = data => { + return $http({ + url: '/merchant-api/pay-notice/market', + method: 'post', + data: $http.adornData({ + ...data + }) + }) +} + +// 修改店铺须知 +export const updateShopPayNotice = data => { + return $http({ + url: '/merchant-api/pay-notice/shop', + method: 'put', + data: $http.adornData({ + ...data + }) + }) +} + +// 创建店铺须知 +export const createShopPayNotice = data => { + return $http({ + url: '/merchant-api/pay-notice/shop', + method: 'post', + data: $http.adornData({ + ...data + }) + }) } diff --git a/src/router/full-routers.js b/src/router/full-routers.js index bc15d8e..1bbc1ec 100644 --- a/src/router/full-routers.js +++ b/src/router/full-routers.js @@ -169,6 +169,19 @@ export default { open: null, list: [], }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "购物须知管理", + url: "operation-management/paynotice/index", + perms: "", + type: 1, + elIcon: "el-icon-menu", + orderNum: 0, + open: null, + list: [], + }, { menuId: getUUID(), parentId: 0, diff --git a/src/utils/index.js b/src/utils/index.js index a9d1351..256c670 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -149,6 +149,7 @@ export function getMenu(role) { "operation-management/order/index", "operation-management/banner/index", "operation-management/notice/index", + "operation-management/paynotice/index", "operation-management/role/index", "datacenter", "datacenter/customer-analysis/index", diff --git a/src/views/modules/operation-management/commodity/index.vue b/src/views/modules/operation-management/commodity/index.vue index 226847a..962cac0 100644 --- a/src/views/modules/operation-management/commodity/index.vue +++ b/src/views/modules/operation-management/commodity/index.vue @@ -149,43 +149,43 @@ \ No newline at end of file + + diff --git a/src/views/modules/operation-management/paynotice/index.vue b/src/views/modules/operation-management/paynotice/index.vue new file mode 100644 index 0000000..a0e63a1 --- /dev/null +++ b/src/views/modules/operation-management/paynotice/index.vue @@ -0,0 +1,199 @@ + + + + +