|
@@ -2125,7 +2125,6 @@ Page({
|
|
|
},
|
|
|
goPhoto() {
|
|
|
console.log('我走')
|
|
|
- let that = this;
|
|
|
isTwoOnshow = true;
|
|
|
wx.setStorageSync('isTwoOnshow', true)
|
|
|
wx.showLoading({
|
|
@@ -2135,7 +2134,7 @@ Page({
|
|
|
count: 1,
|
|
|
sizeType: ['compressed'],
|
|
|
sourceType: ['camera'],
|
|
|
- success: function (res) {
|
|
|
+ success: (res) =>{
|
|
|
const app = getApp()
|
|
|
app.globalData.id = '-1'
|
|
|
let tempFilePaths = res.tempFilePaths
|
|
@@ -2149,19 +2148,18 @@ Page({
|
|
|
header: {
|
|
|
appletsId: wx.getStorageSync('openId'),
|
|
|
},
|
|
|
- success: function (res) {
|
|
|
+ success: (res)=> {
|
|
|
const app = getApp()
|
|
|
app.globalData.id = '-2'
|
|
|
let datas = JSON.parse(res.data)
|
|
|
- let imgPath = 'oldInfo[' + that.data.activeIndex + '].imgPath'
|
|
|
- let isHavePhoto = 'oldInfo[' + that.data.activeIndex + '].isHavePhoto'
|
|
|
- that.setData({
|
|
|
+ let imgPath = 'oldInfo[' + this.data.activeIndex + '].imgPath'
|
|
|
+ let isHavePhoto = 'oldInfo[' + this.data.activeIndex + '].isHavePhoto'
|
|
|
+ this.setData({
|
|
|
[imgPath]: datas.data,
|
|
|
[isHavePhoto]: true,
|
|
|
})
|
|
|
- // that.getSelfLocation();
|
|
|
- that.SubmitOldmanInfo({
|
|
|
- id: that.data.nameArr[that.data.activeIndex]._id,
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
photo: datas.data,
|
|
|
})
|
|
|
}
|
|
@@ -3152,7 +3150,6 @@ Page({
|
|
|
familyFid: id,
|
|
|
color: 'transparent',
|
|
|
})
|
|
|
- var that = this;
|
|
|
wx.request({
|
|
|
url: util.globalData.publicUrl + '/wxinfo/listByFid',
|
|
|
method: "GET",
|
|
@@ -3165,7 +3162,7 @@ Page({
|
|
|
success: (res) => {
|
|
|
wx.hideLoading()
|
|
|
console.log(res.data.data, "单查赋值锕")
|
|
|
- that.setData({
|
|
|
+ this.setData({
|
|
|
oldInfo: res.data.data
|
|
|
})
|
|
|
let datass = res.data.data;
|
|
@@ -3177,10 +3174,10 @@ Page({
|
|
|
});
|
|
|
datass.splice(fristIndex, 1);
|
|
|
datass.unshift(fristArray[0]);
|
|
|
- that.setData({
|
|
|
+ this.setData({
|
|
|
nameArr: datass
|
|
|
})
|
|
|
- console.log(that.data.regularsInfo, "赋值是么");
|
|
|
+ console.log(this.data.regularsInfo, "赋值是么");
|
|
|
let oldSex = [{
|
|
|
name: '男',
|
|
|
checked: false
|
|
@@ -3831,18 +3828,13 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- that.setData({
|
|
|
+ this.setData({
|
|
|
oldInfo: abc,
|
|
|
otherInfo: def,
|
|
|
childInfo: ghi,
|
|
|
regularsInfos: zzz,
|
|
|
regularsInfo: mmm,
|
|
|
})
|
|
|
- console.log(that.data.oldInfo, "老人的返现数组")
|
|
|
- console.log(that.data.otherInfo, "其他的返现数组")
|
|
|
- console.log(that.data.childInfo, "孩子的返现数组")
|
|
|
- console.log(that.data.regularsInfos, "q巡访的返现数组")
|
|
|
- console.log(that.data.regularsInfo, "巡访传值的返回")
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -3920,11 +3912,10 @@ Page({
|
|
|
var qqmapsdk = new QQMapWX({
|
|
|
key: 'B5DBZ-NGIHP-SQMD4-LHMG3-NJ72Z-7KFOV' //申请的开发者秘钥key
|
|
|
});
|
|
|
- var that = this; //用户授权过可以直接获取位置
|
|
|
wx.getLocation({
|
|
|
//type: 'wgs84',
|
|
|
type: 'gcj02',
|
|
|
- success: function (res) {
|
|
|
+ success: (res) =>{
|
|
|
console.log(res, "00我调用位置接口成功了");
|
|
|
// 返回当前定位的经纬度
|
|
|
var latitude = parseFloat(res.latitude).toFixed(5);
|
|
@@ -3934,18 +3925,18 @@ Page({
|
|
|
latitude: res.latitude,
|
|
|
longitude: res.longitude
|
|
|
},
|
|
|
- success: function (res) {
|
|
|
- let photoAndLocation = 'oldInfo[' + that.data.activeIndex + '].photoAndLocation'
|
|
|
+ success: (res)=> {
|
|
|
+ let photoAndLocation = 'oldInfo[' + this.data.activeIndex + '].photoAndLocation'
|
|
|
let gps = longitude + '/' + latitude + '/' + res.result.address
|
|
|
- that.setData({
|
|
|
+ this.setData({
|
|
|
[photoAndLocation]: gps
|
|
|
})
|
|
|
- console.log(that.data.nameArr[that.data.activeIndex], "定位的问题");
|
|
|
- that.SubmitOldmanInfo({
|
|
|
- id: that.data.nameArr[that.data.activeIndex]._id,
|
|
|
+ console.log(this.data.nameArr[this.data.activeIndex], "定位的问题");
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
photoAndLocation: gps
|
|
|
})
|
|
|
- that.goPhoto();
|
|
|
+ this.goPhoto();
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log('获取当前地址失败');
|