|
|
@ -209,12 +209,45 @@ |
|
|
|
isdisplay: true //是否展示 |
|
|
|
isdisplay: true //是否展示 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.homeCateList = []; |
|
|
|
this.homeCateList = []; |
|
|
|
if (app.globalData.cityName != '') { |
|
|
|
if (app.globalData.cityName != '') { |
|
|
|
this.city = app.globalData.qianzhuCityName; |
|
|
|
this.city = app.globalData.qianzhuCityName; |
|
|
|
this.getCmsContentcmsContent(); |
|
|
|
this.getCmsContentcmsContent(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
|
|
|
|
// uni.getStorage({ |
|
|
|
|
|
|
|
// key: 'accountId', |
|
|
|
|
|
|
|
// success(e) { |
|
|
|
|
|
|
|
// if (e.data) { |
|
|
|
|
|
|
|
// app.globalData.accountId = e.data; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// uni.getStorage({ |
|
|
|
|
|
|
|
// key: 'gasKey', |
|
|
|
|
|
|
|
// success(e) { |
|
|
|
|
|
|
|
// if (e.data) { |
|
|
|
|
|
|
|
// app.globalData.gasKey = e.data; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// uni.getStorage({ |
|
|
|
|
|
|
|
// key: 'staffCode', |
|
|
|
|
|
|
|
// success(e) { |
|
|
|
|
|
|
|
// if (e.data) { |
|
|
|
|
|
|
|
// if (app.globalData.accountId == '000001&key' || app.globalData.accountId == |
|
|
|
|
|
|
|
// '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData |
|
|
|
|
|
|
|
// .accountId == '0000010&key') { |
|
|
|
|
|
|
|
// app.globalData.staffCode = e.data; |
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
|
|
// app.globalData.mchId = e.data; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// #endif |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
onLoad(options) { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
@ -235,45 +268,48 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
// #endif |
|
|
|
|
|
|
|
//定位 |
|
|
|
//定位 |
|
|
|
that.postionIng(); |
|
|
|
that.postionIng(); |
|
|
|
|
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
// #ifdef H5 |
|
|
|
// uni.showLoading({ |
|
|
|
// if (app.globalData.h5code) { |
|
|
|
// title: '加载中' |
|
|
|
// that.getH5AccessToken(); |
|
|
|
// }) |
|
|
|
|
|
|
|
// 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.getCmsContentcmsContent(); |
|
|
|
|
|
|
|
// that.getCmsAactibity(); |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
// ); |
|
|
|
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.getCmsContentcmsContent(); |
|
|
|
|
|
|
|
that.getCmsAactibity(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
// #endif |
|
|
|
// #endif |
|
|
|
uni.getStorage({ |
|
|
|
uni.getStorage({ |
|
|
|
key: "user", |
|
|
|
key: "user", |
|
|
@ -735,7 +771,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
.popImg { |
|
|
|
.popImg { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 430px; |
|
|
|
height: 100%; |
|
|
|
|
|
|
|
min-height: 430px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.h5xfimg { |
|
|
|
.h5xfimg { |
|
|
|