|
...
|
...
|
@@ -19,6 +19,8 @@ Page({ |
|
|
|
sid:'',
|
|
|
|
time:'',
|
|
|
|
image:'',
|
|
|
|
latitude:'',
|
|
|
|
longitude:'',
|
|
|
|
},
|
|
|
|
defImage:'http://qn.colorcun.com/manager-invitation/wx/upload2.jpg',
|
|
|
|
tpl:{},
|
|
...
|
...
|
@@ -54,6 +56,8 @@ Page({ |
|
|
|
sid:res.data.sid,
|
|
|
|
time:res.data.arrival_time,
|
|
|
|
image:res.data.image_url,
|
|
|
|
latitude:res.data.lat,
|
|
|
|
longitude:res.data.long,
|
|
|
|
},
|
|
|
|
timeStr:util.unixtoTime(res.data.arrival_time,'MM-DD 星期WW HH:II')
|
|
|
|
})
|
|
...
|
...
|
@@ -146,6 +150,7 @@ Page({ |
|
|
|
&& (this.data.pickerValue[0]>-1 || form.time>0)
|
|
|
|
&& form.room
|
|
|
|
&& form.addr
|
|
|
|
&& form.latitude>0
|
|
|
|
&& (!this.tpl.hasImage || (this.tpl.hasImage && form.image))//带图模板
|
|
|
|
){
|
|
|
|
flag=true;
|
|
...
|
...
|
@@ -157,6 +162,9 @@ Page({ |
|
|
|
},
|
|
|
|
input(e){
|
|
|
|
let key=util.attr(e,'key');
|
|
|
|
if(key=='addr' && !(this.data.form.latitude>0)){
|
|
|
|
return this.onChangeAddress()
|
|
|
|
}
|
|
|
|
let val=util.val(e).trim();
|
|
|
|
let form=this.data.form;
|
|
|
|
form[key]=val;
|
|
...
|
...
|
@@ -189,6 +197,8 @@ Page({ |
|
|
|
seller_address:this.data.form.addr,
|
|
|
|
room_name:this.data.form.room,
|
|
|
|
arrival_time:this.getTimeStr(),
|
|
|
|
lat:this.data.form.latitude,
|
|
|
|
long:this.data.form.longitude,
|
|
|
|
}
|
|
|
|
if(opt.rid){
|
|
|
|
param.id=opt.rid
|
|
...
|
...
|
@@ -240,4 +250,20 @@ Page({ |
|
|
|
},
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onChangeAddress(){
|
|
|
|
wx.chooseLocation({
|
|
|
|
success: (res)=> {
|
|
|
|
console.log(res);
|
|
|
|
this.setData({
|
|
|
|
[`form.latitude`]:res.latitude,
|
|
|
|
[`form.longitude`]:res.longitude,
|
|
|
|
[`form.addr`]:res.name,
|
|
|
|
})
|
|
|
|
this.checkHasSubmit()
|
|
|
|
},
|
|
|
|
fail: function (err) {
|
|
|
|
console.log(err)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|