From e1580de161434cc90934b5d66b7dc6a311eab0ce Mon Sep 17 00:00:00 2001 From: Apcallover <1503963513@qq.com> Date: Sun, 28 Apr 2024 22:18:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?flat:=20=E5=92=A8=E8=AF=A2=E4=BF=A1?= =?UTF-8?q?=E7=AE=B1=E7=AD=89=2070%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/content.js | 30 +-- api/help.js | 13 ++ pageMy/help/applicationsRecord.vue | 94 ++++++++ pageMy/help/mailbox.vue | 189 +++++++++++++++ pageMy/setUserBase/complain.vue | 353 ++++++++++++++--------------- pageMy/setUserBase/mailbox.vue | 279 +++++++++++------------ pages.json | 8 + pages/my/my.vue | 2 +- vue.config.js | 4 +- 9 files changed, 625 insertions(+), 347 deletions(-) create mode 100644 api/help.js create mode 100644 pageMy/help/applicationsRecord.vue create mode 100644 pageMy/help/mailbox.vue diff --git a/api/content.js b/api/content.js index 4731f0a..cf5b010 100644 --- a/api/content.js +++ b/api/content.js @@ -1,15 +1,15 @@ -import { - request -} from '@/untils/AxiosUtils.js'; - -export const addConsultMailboxInfo = (data) => request({ - url: 'api/jobslink-api/content/consultMailboxInfo/add', - method: 'post', - data -}); - -export const addSuperviseComplaintInfo = (data) => request({ - url: 'api/jobslink-api/content/superviseComplaintInfo/add', - method: 'post', - data -}); +import { + request +} from '@/untils/AxiosUtils.js'; + +export const addConsultMailboxInfo = (data) => request({ + url: 'api/jobslink-api/content/consultMailboxInfo/add', + method: 'post', + data +}); + +export const addSuperviseComplaintInfo = (data) => request({ + url: 'api/jobslink-api/content/superviseComplaintInfo/add', + method: 'post', + data +}); \ No newline at end of file diff --git a/api/help.js b/api/help.js new file mode 100644 index 0000000..4ae8492 --- /dev/null +++ b/api/help.js @@ -0,0 +1,13 @@ +import { + request +} from '@/untils/AxiosUtils.js'; +import { + getStore +} from '@/untils/store.js' + +//轮播图 +export const getEmploymentSurveyManage = (params) => request({ + url: '/api/jobslink-api/content/employmentSurveyManage/list', + method: 'get', + params +}); \ No newline at end of file diff --git a/pageMy/help/applicationsRecord.vue b/pageMy/help/applicationsRecord.vue new file mode 100644 index 0000000..0e3d03c --- /dev/null +++ b/pageMy/help/applicationsRecord.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/pageMy/help/mailbox.vue b/pageMy/help/mailbox.vue new file mode 100644 index 0000000..d1e44e3 --- /dev/null +++ b/pageMy/help/mailbox.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file diff --git a/pageMy/setUserBase/complain.vue b/pageMy/setUserBase/complain.vue index 7358db8..50b46b6 100644 --- a/pageMy/setUserBase/complain.vue +++ b/pageMy/setUserBase/complain.vue @@ -1,185 +1,168 @@ - - - - - + + + + + \ No newline at end of file diff --git a/pageMy/setUserBase/mailbox.vue b/pageMy/setUserBase/mailbox.vue index e98d835..046f7a6 100644 --- a/pageMy/setUserBase/mailbox.vue +++ b/pageMy/setUserBase/mailbox.vue @@ -1,144 +1,135 @@ - - - - - + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 95e07f3..a74a05c 100644 --- a/pages.json +++ b/pages.json @@ -706,6 +706,14 @@ "enablePullDownRefresh": true } }, + { + "path": "help/mailbox", + "style": { + "navigationBarTitleText": "咨询信箱列表", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true + } + }, { "path": "help/questions/questionDetail", "style": { diff --git a/pages/my/my.vue b/pages/my/my.vue index d3260ea..cabe848 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -62,7 +62,7 @@ 咨询信箱 - + 问卷调查 diff --git a/vue.config.js b/vue.config.js index 5771477..df48091 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,10 +3,10 @@ module.exports = { port: 1887, proxy: { '/api': { - target: 'http://10.165.0.173:8000', + target: 'http://192.168.1.101:8200', ws: true, pathRewrite: { - '^/api': '/' + '^/api/jobslink-api': '/' } }, '/qq/map': { From 4d8d0335fb29ec4b6a39244cf1da9584de247bb4 Mon Sep 17 00:00:00 2001 From: Apcallover <1503963513@qq.com> Date: Mon, 29 Apr 2024 11:01:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?falt:=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/help.js | 12 +- .../applicationsRecord.vue | 36 +- pageMy/setUserBase/complain.vue | 2 + pageMy/setUserBase/mailbox.vue | 5 +- pageMy/setUserBase/sub/appliRecordsDeatil.vue | 101 +++ pages.json | 12 +- pages/my/my.vue | 2 +- pages/news/news.vue | 366 ++++----- store/models/news.js | 748 +++++++++--------- vue.config.js | 4 +- 10 files changed, 710 insertions(+), 578 deletions(-) rename pageMy/{help => setUserBase}/applicationsRecord.vue (65%) create mode 100644 pageMy/setUserBase/sub/appliRecordsDeatil.vue diff --git a/api/help.js b/api/help.js index 4ae8492..3131fae 100644 --- a/api/help.js +++ b/api/help.js @@ -7,7 +7,17 @@ import { //轮播图 export const getEmploymentSurveyManage = (params) => request({ - url: '/api/jobslink-api/content/employmentSurveyManage/list', + url: '/api/jobslink-api/content/questionnaireSurveyInfo/list', method: 'get', params +}); +export const queryByIdQuestionnaireSurveyInfo = (params) => request({ + url: '/api/jobslink-api/content/questionnaireSurveyInfo/queryById', + method: 'get', + params +}); +export const replyQuestionnaireSurveyInfo = (params) => request({ + url: '/api/jobslink-api/content/questionnaireSurveyInfo/reply', + method: 'post', + data: params }); \ No newline at end of file diff --git a/pageMy/help/applicationsRecord.vue b/pageMy/setUserBase/applicationsRecord.vue similarity index 65% rename from pageMy/help/applicationsRecord.vue rename to pageMy/setUserBase/applicationsRecord.vue index 0e3d03c..8f06c86 100644 --- a/pageMy/help/applicationsRecord.vue +++ b/pageMy/setUserBase/applicationsRecord.vue @@ -1,16 +1,19 @@ @@ -28,9 +31,15 @@ created() { this.getList("refresh"); }, + onReachBottom() { + this.getList(); + }, + onPullDownRefresh() { + this.getList("refresh"); + }, methods: { - toDetail() { - + toDetail(row) { + this.navTo(`/pageMy/setUserBase/sub/appliRecordsDeatil?id=${row.id}`) }, async getList(type = 'add') { if (type === "refresh") { @@ -41,6 +50,7 @@ page: this.pageNumber } let resData = await getEmploymentSurveyManage(params) + uni.stopPullDownRefresh() if (resData.data.code === 200) { const { current, diff --git a/pageMy/setUserBase/complain.vue b/pageMy/setUserBase/complain.vue index 50b46b6..19bdf21 100644 --- a/pageMy/setUserBase/complain.vue +++ b/pageMy/setUserBase/complain.vue @@ -113,6 +113,8 @@ addComplaint() { if (this.isNext) { this.isNext = false + } else { + return } this.$refs.uForm.validate().then(async (res) => { let params = { diff --git a/pageMy/setUserBase/mailbox.vue b/pageMy/setUserBase/mailbox.vue index 046f7a6..5a1f2fd 100644 --- a/pageMy/setUserBase/mailbox.vue +++ b/pageMy/setUserBase/mailbox.vue @@ -15,8 +15,6 @@ - - @@ -84,7 +82,10 @@ addConsult() { if (this.isNext) { this.isNext = false + } else { + return } + this.$refs.uForm.validate().then(async (res) => { uni.showLoading({ title: '请求中' diff --git a/pageMy/setUserBase/sub/appliRecordsDeatil.vue b/pageMy/setUserBase/sub/appliRecordsDeatil.vue new file mode 100644 index 0000000..d4f3c74 --- /dev/null +++ b/pageMy/setUserBase/sub/appliRecordsDeatil.vue @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index a74a05c..9c29e0d 100644 --- a/pages.json +++ b/pages.json @@ -707,13 +707,21 @@ } }, { - "path": "help/mailbox", + "path": "setUserBase/applicationsRecord", "style": { - "navigationBarTitleText": "咨询信箱列表", + "navigationBarTitleText": "问卷调查列表", "navigationBarBackgroundColor": "#FFFFFF", "enablePullDownRefresh": true } }, + { + "path": "setUserBase/sub/appliRecordsDeatil", + "style": { + "navigationBarTitleText": "问卷调查", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": false + } + }, { "path": "help/questions/questionDetail", "style": { diff --git a/pages/my/my.vue b/pages/my/my.vue index cabe848..a0a9199 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -62,7 +62,7 @@ 咨询信箱 - + 问卷调查 diff --git a/pages/news/news.vue b/pages/news/news.vue index 3f61746..d801a0d 100644 --- a/pages/news/news.vue +++ b/pages/news/news.vue @@ -1,183 +1,183 @@ - - - - - + + + + + \ No newline at end of file diff --git a/store/models/news.js b/store/models/news.js index 5c241c5..2111e31 100644 --- a/store/models/news.js +++ b/store/models/news.js @@ -1,374 +1,374 @@ -import { - inviteCount, - inviteList, - inviteRead, - inviteRemove, - noticeCount, - noticeList, - noticeRead, - noticeRemove -} from '@/api/news.js' -import website from '@/config/website.js' -const size = 20 -const handler = { - '0': { - count: noticeCount, - getList: noticeList, - read: noticeRead, - remove: noticeRemove - }, - '1': { - count: inviteCount, - getList: inviteList, - read: inviteRead, - remove: inviteRemove - } -} - -function getCount(data) { - let sum = 0 - for (let key in data) { - sum += data[key] - } - return sum -} - -let refreshTimer = null; - -function startRefreshToken(dispatch) { - refreshTimer = setInterval(() => { - dispatch("newsInit"); - }, website.newsRefreshTime); -} - -function stopRefreshToken() { - clearInterval(refreshTimer) -} - -const news = { - state: { - count: 0, - data: { - "0": { - id: "0", - title: "消息通知", - icon: "../../static/img/notice.svg", - page: { - current: 0, - size, - total: size - }, - data: [], - prop: { - title: 'title', - desc: (value) => { - if (value.data[0]) - return value.data[0][0]['desc'] - }, - time: 'createTime', - isRead: 'isRead', - listDesc: 'desc', - }, - navigateTo(item) { - uni.$once('getNewsDetail', (cb) => { - cb(item) - }) - uni.navigateTo({ - url: "/pages/news/newsDetail?type=0" - }) - } - }, - "1": { - id: "1", - title: "岗位推送", - icon: "../../static/img/renwu.png", - page: { - current: 0, - size, - total: size - }, - data: [], - prop: { - title: 'missionTitle', - desc: (value) => { - if (value.data[0]) - return `您收到${value.data[0][0]['companyName']}岗位` - }, - time: 'createTime', - isRead: 'status', - listDesc: 'companyName', - }, - navigateTo(item, dispatch) { - dispatch('readNew', { - key: '1', - id: item.id - }) - uni.navigateTo({ - url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` - }) - } - }, - "2": { - id: "1", - title: "岗位推送", - icon: "../../static/img/gangwei.svg", - page: { - current: 0, - size, - total: size - }, - data: [], - prop: { - title: 'missionTitle', - desc: (value) => { - if (value.data[0]) - return `您收到${value.data[0][0]['companyName']}的岗位` - }, - time: 'createTime', - isRead: 'status', - listDesc: 'companyName', - }, - navigateTo(item, dispatch) { - dispatch('readNew', { - key: '1', - id: item.id - }) - uni.navigateTo({ - url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` - }) - } - }, - // "3": { - // id: "1", - // title: "技能推送", - // icon: "../../static/img/jineng.svg", - // page: { - // current: 0, - // size, - // total: size - // }, - // data: [], - // prop: { - // title: 'missionTitle', - // desc: (value) => { - // if (value.data[0]) - // return `您收到${value.data[0][0]['companyName']}的任务` - // }, - // time: 'createTime', - // isRead: 'status', - // listDesc: 'companyName', - // }, - // navigateTo(item, dispatch) { - // dispatch('readNew', { - // key: '1', - // id: item.id - // }) - // uni.navigateTo({ - // url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` - // }) - // } - // }, - "4": { - id: "1", - title: "政策推送", - icon: "../../static/img/zhengce.svg", - page: { - current: 0, - size, - total: size - }, - data: [], - prop: { - title: 'missionTitle', - desc: (value) => { - if (value.data[0]) - return `您收到${value.data[0][0]['companyName']}的岗位` - }, - time: 'createTime', - isRead: 'status', - listDesc: 'companyName', - }, - navigateTo(item, dispatch) { - dispatch('readNew', { - key: '1', - id: item.id - }) - uni.navigateTo({ - url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` - }) - } - } - }, - unread: { - "0": 0, - "1": 0 - }, - allUnread: 0, - dic: {} - }, - actions: { - newsInit({ - dispatch - }) { - const ps = [] - ps.push(dispatch('getUnreadNum')) - - for (let key in handler) { - ps.push(dispatch('newsReload', key)) - } - return Promise.all(ps) - }, - newsReload({ - dispatch, - commit - }, id) { - commit('CLEAR_NEWS_DATA', id) - return dispatch('newsGetNextPage', id) - }, - getUnreadNum({ - commit - }) { - for (let key in handler) { - handler[key].count().then((result) => { - commit('SET_UNREADNUM', { - id: key, - count: result - }) - }) - } - }, - newsGetNextPage({ - state, - commit - }, id) { - const item = state.data[id] - const page = item.page - const current = page.current + 1 - return new Promise((resolve, reject) => { - if (parseInt(page.total / page.size) + 1 < current) { - resolve() - return - } - handler[id].getList(current, page.size).then(res => { - const data = res.data.data; - commit('ADD_NEWS_DATA', { - id, - data: data.records, - current, - total: data.total - }) - resolve(res) - }).catch(reject) - }) - }, - removeNew({ - commit - }, { - id, - key, - group, - index - }) { - return new Promise((resolve, reject) => { - commit('REMOVE_NEWS', { - id, - key, - group, - index - }) - handler[key].remove(id).then(resolve, reject) - }) - }, - readNew({ - commit - }, { - key, - id - }) { - return new Promise((resolve, reject) => { - commit('READ_NEWS', { - key, - id - }) - handler[key].read(id).then(resolve, reject) - }) - }, - endRefreshNewsTimer(){ - stopRefreshToken() - }, - startRefreshNewsTimer({ - state, - commit, - dispatch - }) { - console.log('触发2') - dispatch('newsInit').then(() => { - startRefreshToken(dispatch); - }) - } - }, - mutations: { - SET_UNREADNUM: (state, { - id, - count - }) => { - state.unread[id] = count - state.allUnread = getCount(state.unread) - }, - CLEAR_NEWS_DATA: (state, id) => { - state.data[id].page = { - current: 0, - size - } - state.data[id].data = [] - }, - ADD_NEWS_DATA: (state, { - id, - data, - current, - total - }) => { - data.forEach(item => { - state.dic[item.id] = item - }) - state.data[id].page.total = total - state.data[id].page.current = current - if (data.length > 0) { - state.data[id].data.push(data) - } - }, - REMOVE_NEWS: (state, { - id, - key, - group, - index - }) => { - const readProp = state.data[key].prop['isRead'] - if (state.dic[id][readProp] === 0) { - state.unread[key]-- - state.allUnread-- - } - state.dic[id] = undefined - const data = state.data[key].data - data[group].splice(index, 1) - if (data[group].length === 0) { - data.splice(group, 1) - } - }, - READ_NEWS: (state, { - key, - id - }) => { - const readProp = state.data[key].prop['isRead'] - if (state.dic[id][readProp] === 0) { - state.dic[id][readProp] = 1 - state.unread[key]-- - state.allUnread-- - } - } - }, - getters: { - - } -}; -export default news; +import { + inviteCount, + inviteList, + inviteRead, + inviteRemove, + noticeCount, + noticeList, + noticeRead, + noticeRemove +} from '@/api/news.js' +import website from '@/config/website.js' +const size = 20 +const handler = { + '0': { + count: noticeCount, + getList: noticeList, + read: noticeRead, + remove: noticeRemove + }, + '1': { + count: inviteCount, + getList: inviteList, + read: inviteRead, + remove: inviteRemove + } +} + +function getCount(data) { + let sum = 0 + for (let key in data) { + sum += data[key] + } + return sum +} + +let refreshTimer = null; + +function startRefreshToken(dispatch) { + refreshTimer = setInterval(() => { + dispatch("newsInit"); + }, website.newsRefreshTime); +} + +function stopRefreshToken() { + clearInterval(refreshTimer) +} + +const news = { + state: { + count: 0, + data: { + "0": { + id: "0", + title: "消息通知", + icon: "../../static/img/notice.svg", + page: { + current: 0, + size, + total: size + }, + data: [], + prop: { + title: 'title', + desc: (value) => { + if (value.data[0]) + return value.data[0][0]['desc'] + }, + time: 'createTime', + isRead: 'isRead', + listDesc: 'desc', + }, + navigateTo(item) { + uni.$once('getNewsDetail', (cb) => { + cb(item) + }) + uni.navigateTo({ + url: "/pages/news/newsDetail?type=0" + }) + } + }, + "1": { + id: "1", + title: "岗位推送", + icon: "../../static/img/renwu.png", + page: { + current: 0, + size, + total: size + }, + data: [], + prop: { + title: 'missionTitle', + desc: (value) => { + if (value.data[0]) + return `您收到${value.data[0][0]['companyName']}岗位` + }, + time: 'createTime', + isRead: 'status', + listDesc: 'companyName', + }, + navigateTo(item, dispatch) { + dispatch('readNew', { + key: '1', + id: item.id + }) + uni.navigateTo({ + url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` + }) + } + }, + "2": { + id: "1", + title: "岗位推送", + icon: "../../static/img/gangwei.svg", + page: { + current: 0, + size, + total: size + }, + data: [], + prop: { + title: 'missionTitle', + desc: (value) => { + if (value.data[0]) + return `您收到${value.data[0][0]['companyName']}的岗位` + }, + time: 'createTime', + isRead: 'status', + listDesc: 'companyName', + }, + navigateTo(item, dispatch) { + dispatch('readNew', { + key: '1', + id: item.id + }) + uni.navigateTo({ + url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` + }) + } + }, + // "3": { + // id: "1", + // title: "技能推送", + // icon: "../../static/img/jineng.svg", + // page: { + // current: 0, + // size, + // total: size + // }, + // data: [], + // prop: { + // title: 'missionTitle', + // desc: (value) => { + // if (value.data[0]) + // return `您收到${value.data[0][0]['companyName']}的任务` + // }, + // time: 'createTime', + // isRead: 'status', + // listDesc: 'companyName', + // }, + // navigateTo(item, dispatch) { + // dispatch('readNew', { + // key: '1', + // id: item.id + // }) + // uni.navigateTo({ + // url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` + // }) + // } + // }, + "4": { + id: "1", + title: "政策推送", + icon: "../../static/img/zhengce.svg", + page: { + current: 0, + size, + total: size + }, + data: [], + prop: { + title: 'missionTitle', + desc: (value) => { + if (value.data[0]) + return `您收到${value.data[0][0]['companyName']}的岗位` + }, + time: 'createTime', + isRead: 'status', + listDesc: 'companyName', + }, + navigateTo(item, dispatch) { + dispatch('readNew', { + key: '1', + id: item.id + }) + uni.navigateTo({ + url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}` + }) + } + } + }, + unread: { + "0": 0, + "1": 0 + }, + allUnread: 0, + dic: {} + }, + actions: { + newsInit({ + dispatch + }) { + const ps = [] + ps.push(dispatch('getUnreadNum')) + + for (let key in handler) { + ps.push(dispatch('newsReload', key)) + } + return Promise.all(ps) + }, + newsReload({ + dispatch, + commit + }, id) { + commit('CLEAR_NEWS_DATA', id) + return dispatch('newsGetNextPage', id) + }, + getUnreadNum({ + commit + }) { + for (let key in handler) { + handler[key].count().then((result) => { + commit('SET_UNREADNUM', { + id: key, + count: result + }) + }) + } + }, + newsGetNextPage({ + state, + commit + }, id) { + const item = state.data[id] + const page = item.page + const current = page.current + 1 + return new Promise((resolve, reject) => { + if (parseInt(page.total / page.size) + 1 < current) { + resolve() + return + } + handler[id].getList(current, page.size).then(res => { + const data = res.data.data; + commit('ADD_NEWS_DATA', { + id, + data: data.records, + current, + total: data.total + }) + resolve(res) + }).catch(reject) + }) + }, + removeNew({ + commit + }, { + id, + key, + group, + index + }) { + return new Promise((resolve, reject) => { + commit('REMOVE_NEWS', { + id, + key, + group, + index + }) + handler[key].remove(id).then(resolve, reject) + }) + }, + readNew({ + commit + }, { + key, + id + }) { + return new Promise((resolve, reject) => { + commit('READ_NEWS', { + key, + id + }) + handler[key].read(id).then(resolve, reject) + }) + }, + endRefreshNewsTimer() { + stopRefreshToken() + }, + startRefreshNewsTimer({ + state, + commit, + dispatch + }) { + console.log('触发2') + dispatch('newsInit').then(() => { + startRefreshToken(dispatch); + }) + } + }, + mutations: { + SET_UNREADNUM: (state, { + id, + count + }) => { + state.unread[id] = count + state.allUnread = getCount(state.unread) + }, + CLEAR_NEWS_DATA: (state, id) => { + state.data[id].page = { + current: 0, + size + } + state.data[id].data = [] + }, + ADD_NEWS_DATA: (state, { + id, + data, + current, + total + }) => { + data.forEach(item => { + state.dic[item.id] = item + }) + state.data[id].page.total = total + state.data[id].page.current = current + if (data.length > 0) { + state.data[id].data.push(data) + } + }, + REMOVE_NEWS: (state, { + id, + key, + group, + index + }) => { + const readProp = state.data[key].prop['isRead'] + if (state.dic[id][readProp] === 0) { + state.unread[key]-- + state.allUnread-- + } + state.dic[id] = undefined + const data = state.data[key].data + data[group].splice(index, 1) + if (data[group].length === 0) { + data.splice(group, 1) + } + }, + READ_NEWS: (state, { + key, + id + }) => { + const readProp = state.data[key].prop['isRead'] + if (state.dic[id][readProp] === 0) { + state.dic[id][readProp] = 1 + state.unread[key]-- + state.allUnread-- + } + } + }, + getters: { + + } +}; +export default news; \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index df48091..5771477 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,10 +3,10 @@ module.exports = { port: 1887, proxy: { '/api': { - target: 'http://192.168.1.101:8200', + target: 'http://10.165.0.173:8000', ws: true, pathRewrite: { - '^/api/jobslink-api': '/' + '^/api': '/' } }, '/qq/map': {