From 054e739905b4e527760cdc8a48cb9135f0193633 Mon Sep 17 00:00:00 2001 From: zcxee <495141071@qq.com> Date: Fri, 5 May 2023 09:40:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- public/index.html | 1 + src/api/login.js | 11 + src/api/zs/office.js | 44 ++ src/api/zs/officeSign.js | 53 ++ src/assets/styles/index.scss | 5 + src/assets/styles/wx.scss | 5 + src/store/modules/user.js | 48 +- src/views/login.vue | 159 ++--- src/views/password.vue | 217 ++++++ src/views/wxCode.vue | 75 +++ src/views/zs/components/batchUpdateForm.vue | 61 -- src/views/zs/components/clueForm.vue | 632 ------------------ src/views/zs/components/distributeForm.vue | 106 --- src/views/zs/components/filterForm.vue | 72 -- src/views/zs/components/publicTable.vue | 84 --- src/views/zs/components/signForm.vue | 416 ------------ .../zs/office/components/OfiiceDialogForm.vue | 129 ++++ src/views/zs/office/components/SearchForm.vue | 42 ++ src/views/zs/office/index.vue | 125 ++++ src/views/zs/officeSign/columns.js | 252 +++++++ .../components/OfiiceSignDialogForm.vue | 406 +++++++++++ .../zs/officeSign/components/SearchForm.vue | 59 ++ src/views/zs/officeSign/index.vue | 143 ++++ vue.config.js | 16 +- 25 files changed, 1684 insertions(+), 1480 deletions(-) create mode 100644 src/api/zs/office.js create mode 100644 src/api/zs/officeSign.js create mode 100644 src/assets/styles/wx.scss create mode 100644 src/views/password.vue create mode 100644 src/views/wxCode.vue delete mode 100644 src/views/zs/components/batchUpdateForm.vue delete mode 100644 src/views/zs/components/clueForm.vue delete mode 100644 src/views/zs/components/distributeForm.vue delete mode 100644 src/views/zs/components/filterForm.vue delete mode 100644 src/views/zs/components/publicTable.vue delete mode 100644 src/views/zs/components/signForm.vue create mode 100644 src/views/zs/office/components/OfiiceDialogForm.vue create mode 100644 src/views/zs/office/components/SearchForm.vue create mode 100644 src/views/zs/office/index.vue create mode 100644 src/views/zs/officeSign/columns.js create mode 100644 src/views/zs/officeSign/components/OfiiceSignDialogForm.vue create mode 100644 src/views/zs/officeSign/components/SearchForm.vue create mode 100644 src/views/zs/officeSign/index.vue diff --git a/package.json b/package.json index 8a77d71..ba1e881 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,8 @@ "sass-loader": "10.1.1", "script-ext-html-webpack-plugin": "2.1.5", "svg-sprite-loader": "5.1.1", - "vue-template-compiler": "2.6.12" + "vue-template-compiler": "2.6.12", + "vue-wxlogin": "^1.0.4" }, "engines": { "node": ">=8.9", diff --git a/public/index.html b/public/index.html index 64becb8..c1b5d7d 100644 --- a/public/index.html +++ b/public/index.html @@ -93,6 +93,7 @@ securityJsCode:'420463f2f8c849ab78b9d29548aff7d3', } + diff --git a/src/api/login.js b/src/api/login.js index 8c24dc9..dfb52e0 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -18,6 +18,17 @@ export function login(username, password, code, uuid) { }); } +export function wxLogin(data) { + return request({ + url: '/wx/login', + headers: { + isToken: false + }, + method: 'post', + data: data + }); +} + // 注册方法 export function register(data) { return request({ diff --git a/src/api/zs/office.js b/src/api/zs/office.js new file mode 100644 index 0000000..e4dcc20 --- /dev/null +++ b/src/api/zs/office.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询报名点列表 +export function listOffice(query) { + return request({ + url: '/zs/office/list', + method: 'get', + params: query + }) +} + +// 查询报名点详细 +export function getOffice(officeId) { + return request({ + url: '/zs/office/' + officeId, + method: 'get' + }) +} + +// 新增报名点 +export function addOffice(data) { + return request({ + url: '/zs/office', + method: 'post', + data: data + }) +} + +// 修改报名点 +export function updateOffice(data) { + return request({ + url: '/zs/office', + method: 'put', + data: data + }) +} + +// 删除报名点 +export function delOffice(officeId) { + return request({ + url: '/zs/office/' + officeId, + method: 'delete' + }) +} diff --git a/src/api/zs/officeSign.js b/src/api/zs/officeSign.js new file mode 100644 index 0000000..ca2d01b --- /dev/null +++ b/src/api/zs/officeSign.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询报名点成交登记列表 +export function listSign(query) { + return request({ + url: '/zs/officesign/list', + method: 'get', + params: query + }) +} + +// 查询报名点成交登记详细 +export function getSign(officesignId) { + return request({ + url: '/zs/officesign/' + officesignId, + method: 'get' + }) +} + +// 新增报名点成交登记 +export function addSign(data) { + return request({ + url: '/zs/officesign', + method: 'post', + data: data + }) +} + +// 修改报名点成交登记 +export function updateSign(data) { + return request({ + url: '/zs/officesign', + method: 'put', + data: data + }) +} + +// 删除报名点成交登记 +export function delSign(officesignId) { + return request({ + url: '/zs/officesign/' + officesignId, + method: 'delete' + }) +} + +//审核登记 +export function checkSign(data) { + return request({ + url: '/zs/officesign/check', + method: 'put', + data: data + }) +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 0b52bad..b8b4c8d 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -238,3 +238,8 @@ aside { z-index: 9999; } +.impowerBox .qrcode { + width: 80px; + margin-top: 15px; + border: 1px solid #e2e2e2; +} \ No newline at end of file diff --git a/src/assets/styles/wx.scss b/src/assets/styles/wx.scss new file mode 100644 index 0000000..5a97fa1 --- /dev/null +++ b/src/assets/styles/wx.scss @@ -0,0 +1,5 @@ +.impowerBox .qrcode {width: 200px;} +.impowerBox .title {display: none;} +.impowerBox .info {width: 200px;} +.status_icon {display: none} +.impowerBox .status {text-align: center;} \ No newline at end of file diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 83f6b01..9c64792 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,5 +1,14 @@ -import { login, logout, getInfo } from '@/api/login'; -import { getToken, setToken, removeToken } from '@/utils/auth'; +import { + login, + logout, + getInfo, + wxLogin +} from '@/api/login'; +import { + getToken, + setToken, + removeToken +} from '@/utils/auth'; const user = { state: { @@ -30,7 +39,9 @@ const user = { actions: { // 登录 - Login({ commit }, userInfo) { + Login({ + commit + }, userInfo) { const username = userInfo.username.trim(); const password = userInfo.password; const code = userInfo.code; @@ -47,9 +58,29 @@ const user = { }); }); }, + // 登录 + WXLogin({ + commit + }, userInfo) { + return new Promise((resolve, reject) => { + wxLogin(userInfo) + .then((res) => { + setToken(res.token); + commit('SET_TOKEN', res.token); + resolve(); + }) + .catch((error) => { + reject(error); + }); + }); + }, + // 获取用户信息 - GetInfo({ commit, state }) { + GetInfo({ + commit, + state + }) { return new Promise((resolve, reject) => { getInfo() .then((res) => { @@ -74,7 +105,10 @@ const user = { }, // 退出系统 - LogOut({ commit, state }) { + LogOut({ + commit, + state + }) { return new Promise((resolve, reject) => { logout(state.token) .then(() => { @@ -91,7 +125,9 @@ const user = { }, // 前端 登出 - FedLogOut({ commit }) { + FedLogOut({ + commit + }) { return new Promise((resolve) => { commit('SET_TOKEN', ''); removeToken(); diff --git a/src/views/login.vue b/src/views/login.vue index 778ea29..b39c4fc 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,36 +1,23 @@