| | |
| | | userInfo: null, |
| | | pageData: {}, |
| | | // url: 'https://nsjcy.hugeinfo.com.cn/nsjc-charge', |
| | | //url: 'http://192.168.0.31:8085/nsjc-charge', |
| | | //imgUrl: 'https://hugeinfo.com.cn/nsjc-charge', |
| | | // url: 'http://1p885086k1.iok.la/nsjc-charge', |
| | | // url: 'http://localhost:6060/nsjc-charge', |
| | | imgUrl: 'https://nsjcy.hugeinfo.com.cn/nsjc-charge', |
| | | url: 'http://nsjc.vaiwan.com/nsjc-charge', |
| | | imgUrl: 'http://nsjc.vaiwan.com/nsjc-charge' |
| | | // imgUrl: 'http://nsjc.vaiwan.com/nsjc-charge' |
| | | }, |
| | | // 过滤数组 |
| | | where: (collection, source) => { |
| | |
| | | var evalList = these.data.evalList; |
| | | var evalListType = 'evalList' + associateTypeId; |
| | | var data = JSON.parse(res.data) |
| | | console.log(data) |
| | | console.log('path', path) |
| | | console.log('evalList', evalList) |
| | | console.log('associateTypeId', associateTypeId) |
| | | these.setData({ |
| | | evalList: { |
| | | ...evalList, |
| | |
| | | return year + "-" + month + "-" + date + " " + hour + ":" + minute; |
| | | }, |
| | | |
| | | //转换时间戳 |
| | | formatDateday: function(ts) { |
| | | var now = new Date(ts); |
| | | var year = now.getFullYear(); |
| | | var month = now.getMonth() + 1; |
| | | var date = now.getDate(); |
| | | var hour = now.getHours() < 10 ? '0' + now.getHours() : now.getHours(); |
| | | var minute = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes(); |
| | | var second = now.getSeconds(); |
| | | return year + "-" + month + "-" + date; |
| | | }, |
| | | |
| | | // 页面正在开发中 |
| | | developIng: function() { |
| | | wx.navigateTo({ |
| | |
| | | } |
| | | return age; |
| | | } |
| | | }, |
| | | getPermission: function(url) { |
| | | wx.getLocation({ |
| | | success: function(res) { |
| | | wx.navigateTo({ |
| | | url, |
| | | }) |
| | | }, |
| | | fail: function() { |
| | | wx.getSetting({ |
| | | success: function(res) { |
| | | var statu = res.authSetting; |
| | | if (!statu['scope.userLocation']) { |
| | | wx.showModal({ |
| | | title: '是否授权当前位置', |
| | | content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用', |
| | | success: function(tip) { |
| | | if (tip.confirm) { |
| | | wx.openSetting({ |
| | | success: function(data) { |
| | | if (data.authSetting["scope.userLocation"] === true) { |
| | | wx.showToast({ |
| | | title: '授权成功', |
| | | icon: 'success', |
| | | duration: 1000 |
| | | }) |
| | | //授权成功之后,再调用chooseLocation选择地方 |
| | | wx.getLocation({ |
| | | success: function(res) { |
| | | wx.navigateTo({ |
| | | url, |
| | | }) |
| | | }, |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | title: '授权失败', |
| | | icon: 'success', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | fail: function(res) { |
| | | wx.showToast({ |
| | | title: '调用授权窗口失败', |
| | | icon: 'success', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |