diff --git a/weapp/app.json b/weapp/app.json index 2a31459..5443628 100644 --- a/weapp/app.json +++ b/weapp/app.json @@ -49,5 +49,8 @@ "desc": "你的位置信息将用于小程序位置接口的效果展示" } }, + "requiredPrivateInfos": [ + "getLocation" + ], "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/weapp/package/inspectionRecord/inspectionRecord.js b/weapp/package/inspectionRecord/inspectionRecord.js index 32d6315..3f83ba9 100644 --- a/weapp/package/inspectionRecord/inspectionRecord.js +++ b/weapp/package/inspectionRecord/inspectionRecord.js @@ -88,9 +88,9 @@ Page({ // 查看详情 bindDetail(e) { - let data = e.currentTarget.dataset.item; + let data = JSON.stringify(e.currentTarget.dataset.item); wx.navigateTo({ - url: '/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail?data=' + JSON.stringify(data), + url: '/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail?data=' + encodeURIComponent(data), }) }, @@ -100,7 +100,6 @@ Page({ let { endTime, startTime, ResList, ResIndex } = that.data; let sevenYearAgo = moment().subtract(7, 'days').format('YYYY-MM-DD 00:00:00'); let currentData = moment().startOf('days').format('YYYY-MM-DD 23:59:59'); - console.log(currentData, 'currentData'); let alarm = ResList[ResIndex].value == 'all' ? 'null' : ResList[ResIndex].value == 'normal' ? false : true; wx.showLoading({ title: '加载中' diff --git a/weapp/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail.js b/weapp/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail.js index 7135107..de30c5a 100644 --- a/weapp/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail.js +++ b/weapp/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail.js @@ -28,7 +28,7 @@ Page({ */ onLoad(options) { let that = this; - let data = JSON.parse(options.data) + let data = JSON.parse(decodeURIComponent(options.data)) if (data.points.imgs != undefined) { let newArr = data.points.imgs.map(e => { e = that.data.imgUrl + e; diff --git a/weapp/package/startInspection/startInspection.js b/weapp/package/startInspection/startInspection.js index 0efdee7..b2aef98 100644 --- a/weapp/package/startInspection/startInspection.js +++ b/weapp/package/startInspection/startInspection.js @@ -358,7 +358,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - console.log(options, '-------'); let that = this; let data = JSON.parse(decodeURIComponent(options.data)); let points = data.points.map(e => {