|
|
|
@ -253,53 +253,53 @@ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
//定位 |
|
|
|
|
that.postionIng(); |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef H5 |
|
|
|
|
// if (app.globalData.h5code) { |
|
|
|
|
// that.getH5AccessToken(); |
|
|
|
|
// } |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中' |
|
|
|
|
}) |
|
|
|
|
var geolocation = new qq.maps.Geolocation('7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', "嗨森逛"); |
|
|
|
|
// uni.showLoading({ |
|
|
|
|
// title: '加载中' |
|
|
|
|
// }) |
|
|
|
|
// var geolocation = new qq.maps.Geolocation('7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', "嗨森逛"); |
|
|
|
|
// 回调的第一次参数为成功后具体的位置信息 |
|
|
|
|
geolocation.getLocation( |
|
|
|
|
res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
app.globalData.latitude = res.lat; |
|
|
|
|
app.globalData.longitude = res.lng; |
|
|
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "latitude", |
|
|
|
|
data: res.lat |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "longitude", |
|
|
|
|
data: res.lng |
|
|
|
|
}) |
|
|
|
|
that.findByLatAndLng(res.lng, res.lat); |
|
|
|
|
}, |
|
|
|
|
err => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '获取定位权限失败,默认城市重庆市', |
|
|
|
|
content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' |
|
|
|
|
}) |
|
|
|
|
that.city = '重庆市'; |
|
|
|
|
app.globalData.cityName = '重庆市'; |
|
|
|
|
app.globalData.cityId = '500000'; |
|
|
|
|
that.getCouponListArea(); |
|
|
|
|
that.getCouponListgold(); |
|
|
|
|
that.getunioncardCouponListgold(); |
|
|
|
|
that.getCmsContent(); |
|
|
|
|
that.getCmsAactibity(); |
|
|
|
|
that.getCmsContentcmshome(); |
|
|
|
|
that.getCmsContentcmsContent(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
// geolocation.getLocation( |
|
|
|
|
// res => { |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// app.globalData.latitude = res.lat; |
|
|
|
|
// app.globalData.longitude = res.lng; |
|
|
|
|
|
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: "latitude", |
|
|
|
|
// data: res.lat |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: "longitude", |
|
|
|
|
// data: res.lng |
|
|
|
|
// }) |
|
|
|
|
// that.findByLatAndLng(res.lng, res.lat); |
|
|
|
|
// }, |
|
|
|
|
// err => { |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// uni.showModal({ |
|
|
|
|
// title: '获取定位权限失败,默认城市重庆市', |
|
|
|
|
// content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' |
|
|
|
|
// }) |
|
|
|
|
// that.city = '重庆市'; |
|
|
|
|
// app.globalData.cityName = '重庆市'; |
|
|
|
|
// app.globalData.cityId = '500000'; |
|
|
|
|
// that.getCouponListArea(); |
|
|
|
|
// that.getCouponListgold(); |
|
|
|
|
// that.getunioncardCouponListgold(); |
|
|
|
|
// that.getCmsContent(); |
|
|
|
|
// that.getCmsAactibity(); |
|
|
|
|
// that.getCmsContentcmshome(); |
|
|
|
|
// that.getCmsContentcmsContent(); |
|
|
|
|
// } |
|
|
|
|
// ); |
|
|
|
|
// #endif |
|
|
|
|
uni.getStorage({ |
|
|
|
|
key: "user", |
|
|
|
@ -456,10 +456,21 @@ |
|
|
|
|
success: function(res) { |
|
|
|
|
app.globalData.latitude = res.latitude; |
|
|
|
|
app.globalData.longitude = res.longitude; |
|
|
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "latitude", |
|
|
|
|
data: res.latitude |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "longitude", |
|
|
|
|
data: res.longitude |
|
|
|
|
}) |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
that.findByLatAndLng(res.longitude, res.latitude); |
|
|
|
|
}, |
|
|
|
|
fail: (err) => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (err.errCode == 2) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请开启系统定位', |
|
|
|
@ -467,6 +478,16 @@ |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
that.city = '重庆市'; |
|
|
|
|
app.globalData.cityName = '重庆市'; |
|
|
|
|
app.globalData.cityId = '500000'; |
|
|
|
|
that.getCouponListArea(); |
|
|
|
|
that.getCouponListgold(); |
|
|
|
|
that.getunioncardCouponListgold(); |
|
|
|
|
that.getCmsContent(); |
|
|
|
|
that.getCmsAactibity(); |
|
|
|
|
that.getCmsContentcmshome(); |
|
|
|
|
that.getCmsContentcmsContent(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
@ -502,14 +523,14 @@ |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "cityId", |
|
|
|
|
data: res.return_data.regionId |
|
|
|
|
}) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "cityName", |
|
|
|
|
data: res.return_data.provinceName |
|
|
|
|
}) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "qianzhuCityName", |
|
|
|
|
data: res.return_data.cityName |
|
|
|
|
}) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "cityName", |
|
|
|
|
data: res.return_data.provinceName |
|
|
|
|
}) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "qianzhuCityName", |
|
|
|
|
data: res.return_data.cityName |
|
|
|
|
}) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "companyId", |
|
|
|
@ -914,9 +935,11 @@ |
|
|
|
|
}, |
|
|
|
|
//拨打客服电话 |
|
|
|
|
playPhone() { |
|
|
|
|
let cont = "本服务由惠兑礼品提供\n400-678-738"; |
|
|
|
|
let content = cont.replace(/<br>/g, "\n"); |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '客服', |
|
|
|
|
content: '4006780738', |
|
|
|
|
content: content, |
|
|
|
|
success: function(res) { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
uni.makePhoneCall({ |
|
|
|
|