This commit is contained in:
Mr.jiang 2024-08-02 22:09:13 +08:00
commit a1b700b025
3 changed files with 48 additions and 33 deletions

View File

@ -525,12 +525,14 @@
}, },
liliaoshi(){ liliaoshi(){
let massageTypeId = this.orderXm.massageTypeId; let massageTypeId = this.orderXm.massageTypeId;
let longitude = this.longitude;
let latitude = this.latitude;
uni.setStorage({ uni.setStorage({
key: 'taocanDd', key: 'taocanDd',
data: '支付', data: '支付',
success: function () { success: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pages/therapist/therapistDingdan?massageTypeId='+massageTypeId url: '/pages/therapist/therapistDingdan?massageTypeId='+massageTypeId+'&latitude='+latitude+'&longitude='+longitude
}) })
} }
}); });
@ -558,7 +560,6 @@
}, },
addressMy() { addressMy() {
this.$Request.getT('/app/address/selectAddressById').then(res => { this.$Request.getT('/app/address/selectAddressById').then(res => {
console.log(res)
if (res.code == 0) { if (res.code == 0) {
this.name = res.data.name; this.name = res.data.name;
this.mobile = res.data.phone; this.mobile = res.data.phone;
@ -607,7 +608,6 @@
}, },
changeLog(e){// changeLog(e){//
console.log("11111",e)
this.single=e; this.single=e;
}, },
goChat() { goChat() {

View File

@ -495,12 +495,14 @@
liliaoshi(){ liliaoshi(){
var that=this var that=this
let massageTypeId = that.orderXm.massageTypeId; let massageTypeId = that.orderXm.massageTypeId;
let longitude = that.longitude;
let latitude = that.latitude;
uni.setStorage({ uni.setStorage({
key: 'taocanDd', key: 'taocanDd',
data: '我的套餐', data: '我的套餐',
success: function () { success: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level+'&massageTypeId='+massageTypeId url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level+'&massageTypeId='+massageTypeId+'&latitude='+latitude+'&longitude='+longitude
}) })
} }
}); });

View File

@ -224,6 +224,8 @@
let that = this let that = this
that.technicianType=e.technicianType that.technicianType=e.technicianType
that.massageTypeId=e.massageTypeId that.massageTypeId=e.massageTypeId
that.longitude=e.longitude
that.latitude=e.latitude
// that.getLocation();// // that.getLocation();//
// that.getLocation(true);// // that.getLocation(true);//
uni.getStorage({ uni.getStorage({
@ -233,34 +235,46 @@
} }
}); });
that.getTypeList(); that.getTypeList();
uni.getLocation({ if(that.latitude!='' && that.longitude!=''){
type: 'gcj02', uni.setStorageSync('latitude', that.latitude)
geocode: true, //true uni.setStorageSync('longitude', that.longitude)
highAccuracyExpireTime: 500, if (that.amap) {
success: function(res) { that.amap.setCenter(new AMap.LngLat(that.latitude, that.longitude));
console.log(res, '地理位置-----------------------》')
that.latitude = res.latitude
that.longitude = res.longitude
uni.setStorageSync('latitude', res.latitude)
uni.setStorageSync('longitude', res.longitude)
if (that.amap) {
that.amap.setCenter(new AMap.LngLat(res.latitude, res.longitude));
}
if (that.infoWindow) {
that.infoWindow.setPosition(new TMap.LatLng(res.latitude, res.longitude));
}
that.page = 1
that.getTypeList();
},
fail: function(e) {
console.log('获取地址失败1', e)
// #ifdef APP-PLUS
that.checkPermission();
// #endif
} }
}) if (that.infoWindow) {
that.infoWindow.setPosition(new TMap.LatLng(that.latitude, that.longitude));
}
that.page = 1
that.getTypeList();
}else{
uni.getLocation({
type: 'gcj02',
geocode: true, //true
highAccuracyExpireTime: 500,
success: function(res) {
console.log(res, '地理位置-----------------------》')
that.latitude = res.latitude
that.longitude = res.longitude
uni.setStorageSync('latitude', res.latitude)
uni.setStorageSync('longitude', res.longitude)
if (that.amap) {
that.amap.setCenter(new AMap.LngLat(res.latitude, res.longitude));
}
if (that.infoWindow) {
that.infoWindow.setPosition(new TMap.LatLng(res.latitude, res.longitude));
}
that.page = 1
that.getTypeList();
},
fail: function(e) {
console.log('获取地址失败1', e)
// #ifdef APP-PLUS
that.checkPermission();
// #endif
}
})
}
// //
if (e.invitation) { if (e.invitation) {
that.$queue.setData('inviterCode', e.invitation); that.$queue.setData('inviterCode', e.invitation);
@ -341,7 +355,6 @@
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: this.arr, tmplIds: this.arr,
success(re) { success(re) {
console.log(JSON.stringify(re), 111111111111)
var datas = JSON.stringify(re); var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) { if (datas.indexOf("accept") != -1) {
console.log(re) console.log(re)
@ -660,7 +673,7 @@
city: this.city, city: this.city,
technicianType:this.technicianType technicianType:this.technicianType
} }
// console.log(data) console.log(data)
this.$Request.get("/app/artificer/selectArtificerList", data).then(res => { this.$Request.get("/app/artificer/selectArtificerList", data).then(res => {
this.loading = false; this.loading = false;
if (res.code == 0) { if (res.code == 0) {