|
@@ -135,7 +135,6 @@ Page({
|
|
|
console.log(params);
|
|
|
console.log(this.data.visitPhoto, "照片");
|
|
|
console.log(this.data.infoId);
|
|
|
-
|
|
|
if (this.data.visitPhoto.length > 0) {
|
|
|
let obj = {};
|
|
|
obj = {
|
|
@@ -146,41 +145,54 @@ Page({
|
|
|
lng: this.data.lng,
|
|
|
visitLocation: this.data.visitLocation
|
|
|
}
|
|
|
+
|
|
|
wx.request({
|
|
|
- url: app.globalData.publicUrl + '/visit/add',
|
|
|
+ url: app.globalData.publicUrl + '/visit/doFace3',
|
|
|
method: "POST",
|
|
|
header: {
|
|
|
appletsId: wx.getStorageSync('openId')
|
|
|
},
|
|
|
- data: obj,
|
|
|
+ data: {
|
|
|
+ infoId: this.data.infoId,
|
|
|
+ visitPhoto: this.data.visitPhoto,
|
|
|
+ },
|
|
|
success: (res) => {
|
|
|
- console.log(res, "打印锕");
|
|
|
- console.log(res.data.code, "打印锕000000");
|
|
|
- if (res.data.code == 0) {
|
|
|
- wx.showModal({
|
|
|
- showCancel: false,
|
|
|
- content: '提交成功',
|
|
|
- success() {
|
|
|
- wx.switchTab({
|
|
|
- url: '/pages/index/index',
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (res.data.code == 1) {
|
|
|
- console.log("进来了啊");
|
|
|
-
|
|
|
- wx.showModal({
|
|
|
- showCancel: false,
|
|
|
- content: res.data.message,
|
|
|
- success() {
|
|
|
- wx.switchTab({
|
|
|
- url: '/pages/index/index',
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ console.log(res);
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+ // wx.request({
|
|
|
+ // url: app.globalData.publicUrl + '/visit/add',
|
|
|
+ // method: "POST",
|
|
|
+ // header: {
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
+ // },
|
|
|
+ // data: obj,
|
|
|
+ // success: (res) => {
|
|
|
+ // if (res.data.code == 0) {
|
|
|
+ // wx.showModal({
|
|
|
+ // showCancel: false,
|
|
|
+ // content: '提交成功',
|
|
|
+ // success() {
|
|
|
+ // wx.switchTab({
|
|
|
+ // url: '/pages/index/index',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else if (res.data.code == 1) {
|
|
|
+ // wx.showModal({
|
|
|
+ // showCancel: false,
|
|
|
+ // content: res.data.message,
|
|
|
+ // success() {
|
|
|
+ // wx.switchTab({
|
|
|
+ // url: '/pages/index/index',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: '请上传现场照片',
|