hejianhao
2025-02-25 11867f2e61fa8b3db4406bb0edd782bd7c79d876
修改文件上传路径,首页存token
7个文件已修改
65 ■■■■ 已修改文件
H5/config/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/Appeal/Appeal.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/add-progress/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/index/index.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/result-entry/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/work-detail/postpone-apply.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/utils/request.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/config/index.js
@@ -1,5 +1,4 @@
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',
}
H5/pages/Appeal/Appeal.vue
@@ -117,6 +117,7 @@
        save,
        getproblem
    } from './service.js'
    import config from '@/config/index.js'
    export default {
        data() {
@@ -310,11 +311,11 @@
                        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');
@@ -340,11 +341,11 @@
                        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');
H5/pages/add-progress/index.vue
@@ -174,7 +174,7 @@
                                    timeout: 1000 * 45,
                                    name: 'file',
                                    header: {
                                        Authorization: config.uploadToken
                                        Authorization: uni.getStorageSync('token')
                                    },
                                    success: (res) => {
                                        if (JSON.parse(res.data).code == 200) {
@@ -223,7 +223,7 @@
                                timeout: 1000 * 45,
                                name: 'file',
                                header: {
                                    Authorization: config.uploadToken
                                    Authorization: cuni.getStorageSync('token')
                                },
                                success: (res) => {
                                    if (JSON.parse(res.data).code == 200) {
H5/pages/index/index.vue
@@ -23,7 +23,7 @@
                <text class="color2 fs-27" @click="showData =!showData">查看更多</text>
            </view>
            <view class="flex flex-wrap j-between">
                <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==1" @click="onClick()" >
                <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==1" @click="onClick()">
                    <image class="w-94 h-77 ml-38" src="/static/home/img7.png" mode=""></image>
                    <text class="ml-37 font-bold">党员证</text>
                </view>
@@ -39,15 +39,16 @@
                    <image class="w-79 h-77 ml-38" src="/static/home/img1.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"  v-if="member==2">
                <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==2">
                    <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"  v-if="showData&&member==1">
                <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="showData&&member==1">
                    <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>
@@ -146,7 +147,10 @@
            }
        },
        onLoad() {
        onLoad(e) {
            if (e.token) {
                uni.setStorageSync('token', 'Bearer ' + token)
            }
            this.getBanner()
            this.getMessagelist()
            this.getappletcinfo()
@@ -192,7 +196,8 @@
                        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 来处理时间差
@@ -214,9 +219,11 @@
                        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)
@@ -226,11 +233,13 @@
            changeActive(value) {
                this.isactive = value
                if (value == 1) {
                    this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == 2)
                this.noreadlist = this.msgList.filter(item => item.readStatus === 0)
                    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)
                }
H5/pages/result-entry/index.vue
@@ -307,7 +307,7 @@
                                    timeout: 1000 * 45,
                                    name: 'file',
                                    header: {
                                        Authorization: config.uploadToken
                                        Authorization: uni.getStorageSync('token')
                                    },
                                    success: (res) => {
                                        if (JSON.parse(res.data).code == 200) {
@@ -358,7 +358,7 @@
                                timeout: 1000 * 45,
                                name: 'file',
                                header: {
                                    Authorization: config.uploadToken
                                    Authorization: uni.getStorageSync('token')
                                },
                                success: (res) => {
                                    if (JSON.parse(res.data).code == 200) {
H5/pages/work-detail/postpone-apply.vue
@@ -200,7 +200,7 @@
                                    timeout: 1000 * 45,
                                    name: 'file',
                                    header: {
                                        Authorization: config.uploadToken
                                        Authorization: uni.getStorageSync('token')
                                    },
                                    success: (res) => {
                                        if (JSON.parse(res.data).code == 200) {
@@ -249,7 +249,7 @@
                                timeout: 1000 * 45,
                                name: 'file',
                                header: {
                                    Authorization: config.uploadToken
                                    Authorization: uni.getStorageSync('token')
                                },
                                success: (res) => {
                                    if (JSON.parse(res.data).code == 200) {
H5/utils/request.js
@@ -19,16 +19,10 @@
    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({