odc.xiaohui
2023-03-20 73996dd0f37cb2dabc55d0a5e488bdad34fccac7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// index.ts
// 获取应用实例
const user = getApp()
 
Page({
    data: {
        swcurrent: 0,
        isShow: false,
        userInfo: {},
        causeList: [],
        images: []
    },
    // 事件处理函数
    bindViewTap() {
        wx.navigateTo({
            url: '../logs/logs',
        })
    },
 
 
    onLoad() {
        if (wx.getStorageSync('info') == '') {
            wx.redirectTo({
                url: '../user/loginInfo/index'
            })
        }
        wx.request(
            {
                url: user.globalData.url + "/wx/publicity?size=" + "4",
                method: "GET",
                header: { 'token': wx.getStorageSync('token') },
                success: (res) => {
 
                    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
                        }
                    })
                    this.setData({
                        causeList: res.data.data,
                    })
 
 
                }
            })
    },
    getReport() {
        console.log("xxx")
        wx.navigateTo({
            url: '../user/report/index'
        })
    },
    getPublicty() {
        console.log("publicty")
        wx.navigateTo({
            url: '../user/pubulicty/index'
        })
    },
    getGroup() {
        console.log("group")
        wx.navigateTo({
            url: '../user/group/index'
        })
    },
    getCause() {
        console.log("cause")
        wx.navigateTo({
            url: '../manager/cause/index'
        })
    },
    getAudi() {
        console.log("myself")
        wx.navigateTo({
            url: '../user/myself/index'
        })
    },
    more() {
        console.log("myself")
        wx.navigateTo({
            url: '../user/pubulicty/index'
        })
    }
})