odc.xiaohui
2023-05-12 4b48bacef8646cee8b66f5e10b0ed7124534e93e
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
85
86
87
88
89
90
91
// index.ts
// 获取应用实例
const managerCauseDetail = getApp()
 
Page({
    data: {
        causeDetail: {},
        isShow: false,
        images:[]
    },
    // 事件处理函数
    bindViewTap() {
        wx.navigateTo({
            url: '../logs/logs',
        })
    },
//查看图片
face(){
    // wx.previewMedia({
    //     sources:[{url:"http://119.28.5.249:9000/img/"+this.data.reportDetail.pic}]
    // })
},
    //选择案件
    // pickCause(e) {
    //     this.data.reportDetail.causeId = this.data.causeList[e.detail.value].id
    //     console.log(this.data.reportDetail)
    // },
    //通过
//     pass(){
//         wx.request(
//             {
//                 url: "http://42.193.1.25:8081/report/audit" ,
//                 method:"POST",
//                 data:this.data.reportDetail,
//                 header: { 'token': ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NDcyMDUzMzEsInVzZXJuYW1lIjoiYWRtaW4ifQ.2PGgyFb4GJyJnn22smQvbdl4MkXaY-bkWrV2oomzH7A' ,
//                 'content-type': 'application/json'
//             } ,success:(res)=>{
//                  wx.reLaunch({
//                     url:'../../cause/index'
//                 })
//             }   
//     })   
   
 
// },
    onLoad(e) {
       console.log(e)
        this.setData({
            causeDetail:e
        })
        // this.data.causeDetail=e
        console.log(this.data.causeDetail)
        // wx.request(
        //     {
        //         url: "http://42.193.1.25:8081/report/" + e.id,
        //         method: "GET",
        //         header: { 'token': ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NDcyMDUzMzEsInVzZXJuYW1lIjoiYWRtaW4ifQ.2PGgyFb4GJyJnn22smQvbdl4MkXaY-bkWrV2oomzH7A' },
        //         success: (res) => {
        //             this.setData({
        //                 reportDetail: res.data.data,
        //                 images:res.data.data.reportMaterials.split(",")
        //             })
        //             console.log(this.data.images[0])
        //             for (let index = 0; index < this.data.images.length; index++) {
        //                 if(this.data.images!=null&&this.data.images[index]!=""&&this.data.images!=undefined){
        //                     this.data.images[index]="http://119.28.5.249:9000/img/"+this.data.images[index]
        //                 }  else{
        //                     this.data.images=[]
        //                 } 
        //             }
        //             this.setData({
        //                 images:this.data.images
        //             })
        //           console.log(this.data.images)
        //         }
        //     })
        // wx.request(
        //     {
        //         url: "http://42.193.1.25:8081/cause/getCauseList",
        //         method: "GET",
        //         header: { 'token': ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NDcyMDUzMzEsInVzZXJuYW1lIjoiYWRtaW4ifQ.2PGgyFb4GJyJnn22smQvbdl4MkXaY-bkWrV2oomzH7A' },
        //         success: (res) => {
        //             this.setData({
        //                 causeList: res.data.data.records
        //             })
        //         }
        //     })
 
    }
    
})