diff --git a/api/base1.js b/api/base1.js new file mode 100644 index 0000000..9ab6233 --- /dev/null +++ b/api/base1.js @@ -0,0 +1,6 @@ + +const ENV_URL = 'http://111.198.10.15:11638'; + +const BASE_URL = ENV_URL; + +export default BASE_URL; diff --git a/api/base1.js b/api/base1.js new file mode 100644 index 0000000..9ab6233 --- /dev/null +++ b/api/base1.js @@ -0,0 +1,6 @@ + +const ENV_URL = 'http://111.198.10.15:11638'; + +const BASE_URL = ENV_URL; + +export default BASE_URL; diff --git a/api/rumor.js b/api/rumor.js new file mode 100644 index 0000000..5910e2f --- /dev/null +++ b/api/rumor.js @@ -0,0 +1,21 @@ +// 谣言相关接口 +import fetch from '@/common/fetch.js'; +import BASE_URL from './base1.js'; + +const LIST = BASE_URL + '/businessRumor/list' +const Vote = BASE_URL + '/businessVoteRecord/isVote' +const Add = BASE_URL + '/businessRumor/add' +// 谣言列表 +export function getRumorList(data) { + return fetch.post(LIST, data).then(res => res); +} +// 用户是否投票 +export function isVote(data) { + return fetch.post(Vote, data).then(res => res); +} +// 用户投票 +export function addVote(data) { + return fetch.post(Add, data).then(res => res); +} + + diff --git a/api/base1.js b/api/base1.js new file mode 100644 index 0000000..9ab6233 --- /dev/null +++ b/api/base1.js @@ -0,0 +1,6 @@ + +const ENV_URL = 'http://111.198.10.15:11638'; + +const BASE_URL = ENV_URL; + +export default BASE_URL; diff --git a/api/rumor.js b/api/rumor.js new file mode 100644 index 0000000..5910e2f --- /dev/null +++ b/api/rumor.js @@ -0,0 +1,21 @@ +// 谣言相关接口 +import fetch from '@/common/fetch.js'; +import BASE_URL from './base1.js'; + +const LIST = BASE_URL + '/businessRumor/list' +const Vote = BASE_URL + '/businessVoteRecord/isVote' +const Add = BASE_URL + '/businessRumor/add' +// 谣言列表 +export function getRumorList(data) { + return fetch.post(LIST, data).then(res => res); +} +// 用户是否投票 +export function isVote(data) { + return fetch.post(Vote, data).then(res => res); +} +// 用户投票 +export function addVote(data) { + return fetch.post(Add, data).then(res => res); +} + + diff --git a/api/tort.js b/api/tort.js index ed3eb50..934496e 100644 --- a/api/tort.js +++ b/api/tort.js @@ -5,8 +5,8 @@ const URL_REPEAT = BASE_URL + '/webserver/reportInfos/websiteUrlRepeat.do' const UPLOAD_PICTURE = BASE_URL + 'webserver/fileUploadController/uploadToLocal' const WEB_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' -const OTHER_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' -const SPECIAL_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' +// const OTHER_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' +// const SPECIAL_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' const GET_CODE_URL = BASE_URL + '/webserver/captchaController/generateVerifyCodeOfReport.do' /** * 生成网址、网址转换 @@ -25,14 +25,14 @@ export function webReport(data) { return fetch.get(WEB_REPORT, data).then(res => res); } -// 其他类型举报 -export function otherReport(data) { - return fetch.get(OTHER_REPORT, data).then(res => res); -} -// 专项举报 -export function specialReport(data) { - return fetch.get(SPECIAL_REPORT, data).then(res => res); -} +// // 其他类型举报 +// export function otherReport(data) { +// return fetch.get(OTHER_REPORT, data).then(res => res); +// } +// // 专项举报 +// export function specialReport(data) { +// return fetch.get(SPECIAL_REPORT, data).then(res => res); +// } // 获取验证码 export function getCodeURl() { const data = { diff --git a/api/base1.js b/api/base1.js new file mode 100644 index 0000000..9ab6233 --- /dev/null +++ b/api/base1.js @@ -0,0 +1,6 @@ + +const ENV_URL = 'http://111.198.10.15:11638'; + +const BASE_URL = ENV_URL; + +export default BASE_URL; diff --git a/api/rumor.js b/api/rumor.js new file mode 100644 index 0000000..5910e2f --- /dev/null +++ b/api/rumor.js @@ -0,0 +1,21 @@ +// 谣言相关接口 +import fetch from '@/common/fetch.js'; +import BASE_URL from './base1.js'; + +const LIST = BASE_URL + '/businessRumor/list' +const Vote = BASE_URL + '/businessVoteRecord/isVote' +const Add = BASE_URL + '/businessRumor/add' +// 谣言列表 +export function getRumorList(data) { + return fetch.post(LIST, data).then(res => res); +} +// 用户是否投票 +export function isVote(data) { + return fetch.post(Vote, data).then(res => res); +} +// 用户投票 +export function addVote(data) { + return fetch.post(Add, data).then(res => res); +} + + diff --git a/api/tort.js b/api/tort.js index ed3eb50..934496e 100644 --- a/api/tort.js +++ b/api/tort.js @@ -5,8 +5,8 @@ const URL_REPEAT = BASE_URL + '/webserver/reportInfos/websiteUrlRepeat.do' const UPLOAD_PICTURE = BASE_URL + 'webserver/fileUploadController/uploadToLocal' const WEB_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' -const OTHER_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' -const SPECIAL_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' +// const OTHER_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' +// const SPECIAL_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' const GET_CODE_URL = BASE_URL + '/webserver/captchaController/generateVerifyCodeOfReport.do' /** * 生成网址、网址转换 @@ -25,14 +25,14 @@ export function webReport(data) { return fetch.get(WEB_REPORT, data).then(res => res); } -// 其他类型举报 -export function otherReport(data) { - return fetch.get(OTHER_REPORT, data).then(res => res); -} -// 专项举报 -export function specialReport(data) { - return fetch.get(SPECIAL_REPORT, data).then(res => res); -} +// // 其他类型举报 +// export function otherReport(data) { +// return fetch.get(OTHER_REPORT, data).then(res => res); +// } +// // 专项举报 +// export function specialReport(data) { +// return fetch.get(SPECIAL_REPORT, data).then(res => res); +// } // 获取验证码 export function getCodeURl() { const data = { diff --git a/common/fetch.js b/common/fetch.js index 9add31a..0747653 100644 --- a/common/fetch.js +++ b/common/fetch.js @@ -34,7 +34,7 @@ }, success(data) { if (data.statusCode === 200) { - if (data.data.status === 1) { + if (data.data.status === 1 || data.data.code === 200) { if(data.data.message === '网址未重复') { wx.setStorageSync('isRepeat', 'false') } diff --git a/api/base1.js b/api/base1.js new file mode 100644 index 0000000..9ab6233 --- /dev/null +++ b/api/base1.js @@ -0,0 +1,6 @@ + +const ENV_URL = 'http://111.198.10.15:11638'; + +const BASE_URL = ENV_URL; + +export default BASE_URL; diff --git a/api/rumor.js b/api/rumor.js new file mode 100644 index 0000000..5910e2f --- /dev/null +++ b/api/rumor.js @@ -0,0 +1,21 @@ +// 谣言相关接口 +import fetch from '@/common/fetch.js'; +import BASE_URL from './base1.js'; + +const LIST = BASE_URL + '/businessRumor/list' +const Vote = BASE_URL + '/businessVoteRecord/isVote' +const Add = BASE_URL + '/businessRumor/add' +// 谣言列表 +export function getRumorList(data) { + return fetch.post(LIST, data).then(res => res); +} +// 用户是否投票 +export function isVote(data) { + return fetch.post(Vote, data).then(res => res); +} +// 用户投票 +export function addVote(data) { + return fetch.post(Add, data).then(res => res); +} + + diff --git a/api/tort.js b/api/tort.js index ed3eb50..934496e 100644 --- a/api/tort.js +++ b/api/tort.js @@ -5,8 +5,8 @@ const URL_REPEAT = BASE_URL + '/webserver/reportInfos/websiteUrlRepeat.do' const UPLOAD_PICTURE = BASE_URL + 'webserver/fileUploadController/uploadToLocal' const WEB_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' -const OTHER_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' -const SPECIAL_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' +// const OTHER_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' +// const SPECIAL_REPORT = BASE_URL + '/webserver/reportInfos/submitReportInfos.do' const GET_CODE_URL = BASE_URL + '/webserver/captchaController/generateVerifyCodeOfReport.do' /** * 生成网址、网址转换 @@ -25,14 +25,14 @@ export function webReport(data) { return fetch.get(WEB_REPORT, data).then(res => res); } -// 其他类型举报 -export function otherReport(data) { - return fetch.get(OTHER_REPORT, data).then(res => res); -} -// 专项举报 -export function specialReport(data) { - return fetch.get(SPECIAL_REPORT, data).then(res => res); -} +// // 其他类型举报 +// export function otherReport(data) { +// return fetch.get(OTHER_REPORT, data).then(res => res); +// } +// // 专项举报 +// export function specialReport(data) { +// return fetch.get(SPECIAL_REPORT, data).then(res => res); +// } // 获取验证码 export function getCodeURl() { const data = { diff --git a/common/fetch.js b/common/fetch.js index 9add31a..0747653 100644 --- a/common/fetch.js +++ b/common/fetch.js @@ -34,7 +34,7 @@ }, success(data) { if (data.statusCode === 200) { - if (data.data.status === 1) { + if (data.data.status === 1 || data.data.code === 200) { if(data.data.message === '网址未重复') { wx.setStorageSync('isRepeat', 'false') } diff --git a/components/card.vue b/components/card.vue index bfb088b..36819f3 100644 --- a/components/card.vue +++ b/components/card.vue @@ -6,14 +6,15 @@ 一起来识谣 - 已投票 + {{isVoteFlag ? '已投票' : '未投票'}} 谣言: - 支持公众投票,来区分某条信息是否是谣言,支持公众投票,来区分某条众投票,言,支持公众投票, + + {{currentShow.rumor}} 来源:新疆网络举报 @@ -22,13 +23,13 @@ - + - 30% + {{currentShow.approveRate}} - - 70% + + {{currentShow.againstRate}} @@ -38,6 +39,7 @@