wenlele 2 years ago
parent
commit
f2edf9d4ef
  1. 3
      weapp/app.json
  2. 5
      weapp/package/inspectionRecord/inspectionRecord.js
  3. 2
      weapp/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail.js
  4. 1
      weapp/package/startInspection/startInspection.js

3
weapp/app.json

@ -49,5 +49,8 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示" "desc": "你的位置信息将用于小程序位置接口的效果展示"
} }
}, },
"requiredPrivateInfos": [
"getLocation"
],
"sitemapLocation": "sitemap.json" "sitemapLocation": "sitemap.json"
} }

5
weapp/package/inspectionRecord/inspectionRecord.js

@ -88,9 +88,9 @@ Page({
// 查看详情 // 查看详情
bindDetail(e) { bindDetail(e) {
let data = e.currentTarget.dataset.item; let data = JSON.stringify(e.currentTarget.dataset.item);
wx.navigateTo({ 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 { endTime, startTime, ResList, ResIndex } = that.data;
let sevenYearAgo = moment().subtract(7, 'days').format('YYYY-MM-DD 00:00:00'); 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'); 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; let alarm = ResList[ResIndex].value == 'all' ? 'null' : ResList[ResIndex].value == 'normal' ? false : true;
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'

2
weapp/package/inspectionRecord/inspectionRecordDetail/inspectionRecordDetail.js

@ -28,7 +28,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
let that = this; let that = this;
let data = JSON.parse(options.data) let data = JSON.parse(decodeURIComponent(options.data))
if (data.points.imgs != undefined) { if (data.points.imgs != undefined) {
let newArr = data.points.imgs.map(e => { let newArr = data.points.imgs.map(e => {
e = that.data.imgUrl + e; e = that.data.imgUrl + e;

1
weapp/package/startInspection/startInspection.js

@ -358,7 +358,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options, '-------');
let that = this; let that = this;
let data = JSON.parse(decodeURIComponent(options.data)); let data = JSON.parse(decodeURIComponent(options.data));
let points = data.points.map(e => { let points = data.points.map(e => {

Loading…
Cancel
Save