From 3690773857d219e4ac06e260cb2a11044a0b4623 Mon Sep 17 00:00:00 2001 From: xinzirun Date: Tue, 13 Aug 2024 09:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay/customer.js | 44 +++++ src/store/modules/user.js | 8 +- src/views/pay/customer/index.vue | 316 +++++++++++++++++++++++++++++++ vue.config.js | 2 +- 4 files changed, 365 insertions(+), 5 deletions(-) create mode 100644 src/api/pay/customer.js create mode 100644 src/views/pay/customer/index.vue diff --git a/src/api/pay/customer.js b/src/api/pay/customer.js new file mode 100644 index 0000000..e7ebc50 --- /dev/null +++ b/src/api/pay/customer.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查看所有客户列表 +export function selectList(data) { + return request({ + url: '/pay/customer/list', + method: 'POST', + data: data + }); +} + +// 请求未入住的服务code +export function customerAll() { + return request({ + url: '/pay/customer/all', + method: 'GET' + }); +} + +// 添加 +export function save(data) { + return request({ + url: '/pay/customer', + method: 'POST', + data: data + }); +} + +// 修改 +export function update(data) { + return request({ + url: `/pay/customer/${data.id}`, + method: 'PUT', + data: data + }); +} + +// 获取单挑 +export function get(id) { + return request({ + url: '/pay/customer/' + id, + method: 'GET' + }); +} diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c109a6..2f54098 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -45,10 +45,10 @@ const user = { return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { let data = res.data - setToken(data.access_token) - commit('SET_TOKEN', data.access_token) - setExpiresIn(data.expires_in) - commit('SET_EXPIRES_IN', data.expires_in) + setToken(data.accessToken) + commit('SET_TOKEN', data.accessToken) + setExpiresIn(data.expiresIn) + commit('SET_EXPIRES_IN', data.expiresIn) resolve() }).catch(error => { reject(error) diff --git a/src/views/pay/customer/index.vue b/src/views/pay/customer/index.vue new file mode 100644 index 0000000..9e32952 --- /dev/null +++ b/src/views/pay/customer/index.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/vue.config.js b/vue.config.js index dd8b15d..e541778 100644 --- a/vue.config.js +++ b/vue.config.js @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, + target: `http://47.116.185.207/prod-api`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''