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
| // index.ts
| // 获取应用实例
| const userDetailMyself = getApp()
|
| Page({
| data: {
| reportList:{},
| },
| face(){
| wx.previewMedia({
| sources:[{url:this.data.reportList.pic}]
| })
| },
| onLoad() {
| wx.request(
| {
| url:userDetailMyself.globalData.url+ "/wx/user/myself",
| method:"GET",
| data:{
| id:wx.getStorageSync('id')
| },
| header:{'token':wx.getStorageSync('token')},
| success:(res)=>{
| console.log(res)
| if(res.data.data.pic!=null&&res.data.data.pic!=""){
| res.data.data.pic=userDetailMyself.globalData.imageUrl+"/img/"+res.data.data.pic
| }
| this.setData({
| reportList:res.data.data
| })
| }
| })
| }
| })
|
|