| | |
| | | export default { |
| | | BASE_URL: 'http://192.168.110.188:6194', |
| | | imageUrl: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | uploadToken: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | imageUrl: 'https://huacheng.psciio.com/api/huacheng-applets/common/uploadimages', |
| | | } |
| | |
| | | save, |
| | | getproblem |
| | | } from './service.js' |
| | | import config from '@/config/index.js' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | url: config.imageUrl, |
| | | filePath: res.tempFilePaths[0], |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes'); |
| | |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | url: config.imageUrl, |
| | | filePath: res.tempFilePath, |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data).data, 'uploadFileRes'); |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: cuni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | <image class="w-81 h-77 ml-38" src="/static/home/img8.png" mode=""></image> |
| | | <text class="ml-37 font-bold">统计分析</text> |
| | | </view> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" @click="onClick()" v-if="showData&&member==2"> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" @click="onClick()" |
| | | v-if="showData&&member==2"> |
| | | <image class="w-94 h-77 ml-38" src="/static/home/img7.png" mode=""></image> |
| | | <text class="ml-37 font-bold">党员证</text> |
| | | </view> |
| | |
| | | } |
| | | |
| | | }, |
| | | onLoad() { |
| | | onLoad(e) { |
| | | if (e.token) { |
| | | uni.setStorageSync('token', 'Bearer ' + token) |
| | | } |
| | | this.getBanner() |
| | | this.getMessagelist() |
| | | this.getappletcinfo() |
| | |
| | | this.isLoading = false |
| | | } |
| | | this.msgListTotal = this.msgListTotal.map(item => { |
| | | const timeDifference = new Date().getTime() - new Date(item.createTime).getTime() |
| | | const timeDifference = new Date().getTime() - new Date(item.createTime) |
| | | .getTime() |
| | | // 使用 dayjs 的 duration 来处理时间差 |
| | | |
| | | |
| | |
| | | |
| | | return item |
| | | }) |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item |
| | | .promptType == |
| | | 2) |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item |
| | | .promptType == |
| | | 1) |
| | | this.noreadlists = this.msgLists.filter(item => item.readStatus === 0) |
| | | this.noreadlist = this.msgList.filter(item => item.readStatus === 0) |
| | |
| | | changeActive(value) { |
| | | this.isactive = value |
| | | if (value == 1) { |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == 2) |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | 2) |
| | | this.noreadlist = this.msgList.filter(item => item.readStatus === 0) |
| | | } else { |
| | | |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == 1) |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | 1) |
| | | this.noreadlists = this.msgLists.filter(item => item.readStatus === 0) |
| | | } |
| | | |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | |
| | | return new Promise(function(resolve, reject) { |
| | | |
| | | let token = |
| | | 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0MjE4MjgwODU4Mzc4MjYsInR5cGUiOjEsImV4cCI6MTc0MTY5ODg0OCwiY3JlYXRlZCI6MTc0MDQwMjg0ODMzN30.7IYRD37yTkhqcnKyXWcqKk_iTisMp3ar_ByfuVR7Go9rK8ZnGJrlwC3z4NF_ly7IIoBHgE2E4IAvfm3ccam8wg' |
| | | //党员 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0ODk0OTc5Nzk5NDA4NjUsInR5cGUiOjEsImV4cCI6MTc0MDQ2NjQ3MCwiY3JlYXRlZCI6MTc0MDM4MDA3MDQzN30.oOlB8GBE50WmV4Kw-Uuy33rQpQ-homoJQ61QXs34rkQIr-jFlAn9dUOgebitI9bz5PUaFImSldhY6vokRjmYlg |
| | | // 社区 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE1OTAxNzYwNTgxNTY1NDgwOTgsInR5cGUiOjEsImV4cCI6MTc0MTcwNTE1OSwiY3JlYXRlZCI6MTc0MDQwOTE1OTEwMH0.AmeZFq2Pj2y2bRF1AolsRWHA4ehobBdx1-LtQHIJzub8WjEh_TxZ-PTEI7uiujlLWKhJE07PCVCggAdeuF3UIA |
| | | // 市 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0MjE4MjgwODU4Mzc4MjYsInR5cGUiOjEsImV4cCI6MTc0MTY5ODg0OCwiY3JlYXRlZCI6MTc0MDQwMjg0ODMzN30.7IYRD37yTkhqcnKyXWcqKk_iTisMp3ar_ByfuVR7Go9rK8ZnGJrlwC3z4NF_ly7IIoBHgE2E4IAvfm3ccam8wg |
| | | //街道 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjY2OTc5LCJ0eXBlIjoxLCJleHAiOjE3NDE3MDU4NDMsImNyZWF0ZWQiOjE3NDA0MDk4NDMyNTZ9.MOPT3X3Cw9AUmeuIpqDA1a1xZd7V85NSraJddxCrPHvOkaZ8dMI-aUB9gqninzqsMzwmMx6phbD8aBpTlYcWwA |
| | | // 县级 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjU2MDYyLCJ0eXBlIjoxLCJleHAiOjE3NDE3MDU5MTgsImNyZWF0ZWQiOjE3NDA0MDk5MTg3MDF9.k9ck3gWfVElSCl1uUI_5fZ3lEbFgtbQs_OaJku4I4bXoUO77kUnHsghkPBFdRknFHa49fTdAEdHn0wsb_XN5tg |
| | | let token = uni.getStorageSync('token') |
| | | let header = { |
| | | 'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json', |
| | | 'Authorization': 'Bearer ' + token, |
| | | 'Authorization': token, |
| | | 'lang': uni.getStorageSync('locale') === 'zh-Hans' ? 'zh_CN' : 'zh-tw', |
| | | } |
| | | const requestTask = uni.request({ |