| | |
| | | // url:'https://qyqjzdd.cdqingyang.gov.cn/qyjz', |
| | | url:'http://192.168.3.220:8080', |
| | | // url:'http://221.237.182.28:8443/api', |
| | | // imageUrl:'https://qyqjzdd.cdqingyang.gov.cn/minio' |
| | | imageUrl:'http://192.168.3.220:8080/minio' |
| | | imageUrl:'https://qyqjzdd.cdqingyang.gov.cn/minio' |
| | | // imageUrl:'http://192.168.3.220:8080/minio' |
| | | }, |
| | | onLaunch() { |
| | | // 展示本地存储能力 |
| | |
| | | wx.login({ |
| | | success: (res) => { |
| | | console.log("code", res.code) |
| | | wx.setStorageSync('uesrCode', res.code) |
| | | wx.setStorageSync('userPhoneNumberCode',e.detail.code) |
| | | |
| | | wx.request({ |
| | | url:app.globalData.url+"/wx/checkIdentity", |
| | | data: { |
| | |
| | | }) |
| | | return |
| | | } |
| | | wx.request({ |
| | | url: loginInfo.globalData.url+"/wx/login", |
| | | data: { |
| | | "code": wx.getStorageSync('uesrCode'), |
| | | "phoneNumberCode": wx.getStorageSync('userPhoneNumberCode') |
| | | }, |
| | | method: "GET", |
| | | success: (res) => { |
| | | console.log(res); |
| | | wx.setStorageSync('token', res.data.data.token) |
| | | wx.setStorageSync('role', res.data.data.role) |
| | | wx.setStorageSync('id', res.data.data.id) |
| | | wx.setStorageSync('card',res.data.data.time) |
| | | console.log(res.data.data.id) |
| | | } |
| | | |
| | | }) |
| | | wx.request({ |
| | | url:loginInfo.globalData.url+"/wx/user/add", |
| | | method:"POST", |
| | |
| | | filePath: res.tempFiles[0].tempFilePath, |
| | | name: "file", |
| | | header: { |
| | | 'token': wx.getStorageSync('token'), |
| | | // 'token': wx.getStorageSync('token'), |
| | | 'content-type': 'application/json' |
| | | }, |
| | | success:(res)=>{ |
| | |
| | | }, |
| | | // 事件处理函数 |
| | | onLoad() { |
| | | this.getMobile() |
| | | let info=wx.getStorageSync('card') |
| | | console.log(info); |
| | | // this.getMobile() |
| | | // let info=wx.getStorageSync('card') |
| | | // console.log(info); |
| | | |
| | | if (info) { |
| | | this.setData({ |
| | | cardFig :false |
| | | }) |
| | | }else{ |
| | | this.setData({ |
| | | cardFig :true |
| | | }) |
| | | } |
| | | // if (info) { |
| | | // this.setData({ |
| | | // cardFig :false |
| | | // }) |
| | | // }else{ |
| | | // this.setData({ |
| | | // cardFig :true |
| | | // }) |
| | | // } |
| | | wx.request( |
| | | { |
| | | url: userCause.globalData.url + "/wx/publicity", |
| | | method: "GET", |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | // header: { 'token': wx.getStorageSync('token') }, |
| | | success: (res) => { |
| | | |
| | | res.data.data.map(i => { |
| | | if (i.photoStr != null) { |
| | | i.photoStr = i.photoStr.split(",").map(i => userCause.globalData.imageUrl + "/img/" + i), |