diff --git a/weapp/package/inspectionRecord/inspectionRecord.js b/weapp/package/inspectionRecord/inspectionRecord.js index 32d6315..e1234f2 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), }) }, 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 => {