odc.xiaohui
2023-04-07 363f12e4530a137566dce431514a49a219caffcf
miniprogram/pages/user/index.ts
@@ -4,7 +4,7 @@
Page({
    data: {
        role:'',
        role:0,
        swcurrent: 0,
        isShow: false,
        userInfo: {},
@@ -20,10 +20,7 @@
    onLoad() {
        this.setData({
            role:wx.getStorageSync('role')
        })
        wx.request({
            url: user.globalData.url+"/wx/login",
            data: {
@@ -42,12 +39,15 @@
                        method: "GET",
                        header: { 'token': wx.getStorageSync('token') },
                        success: (res) => {
                            this.setData({
                                role:wx.getStorageSync('role')
                            })
                            res.data.data.map(i => {
                                if (i.photoStr != null) {
                                    i.photoStr = i.photoStr.split(",").map(i => user.globalData.imageUrl + "/img/" + i),
                                        this.data.images = i.photoStr
                                }
                                i.releaseTime = i.releaseTime.replace(/-/g,"/")
                            })
                            this.setData({
                                causeList: res.data.data,
@@ -62,6 +62,8 @@
                url: "pages/user/index"
            })
        }
       
    },
    toDetailedInformation(){