|
|
@ -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', "嗨森逛"); |
|
|
|
uni.showLoading({ |
|
|
|
// // 回调的第一次参数为成功后具体的位置信息 |
|
|
|
title: '加载中' |
|
|
|
// geolocation.getLocation( |
|
|
|
}) |
|
|
|
// res => { |
|
|
|
var geolocation = new qq.maps.Geolocation('7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', "嗨森逛"); |
|
|
|
// uni.hideLoading(); |
|
|
|
// 回调的第一次参数为成功后具体的位置信息 |
|
|
|
// app.globalData.latitude = res.lat; |
|
|
|
geolocation.getLocation( |
|
|
|
// app.globalData.longitude = res.lng; |
|
|
|
res => { |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
// uni.setStorage({ |
|
|
|
app.globalData.latitude = res.lat; |
|
|
|
// key: "latitude", |
|
|
|
app.globalData.longitude = res.lng; |
|
|
|
// data: res.lat |
|
|
|
|
|
|
|
// }) |
|
|
|
uni.setStorage({ |
|
|
|
|
|
|
|
key: "latitude", |
|
|
|
// uni.setStorage({ |
|
|
|
data: res.lat |
|
|
|
// key: "longitude", |
|
|
|
}) |
|
|
|
// data: res.lng |
|
|
|
|
|
|
|
// }) |
|
|
|
uni.setStorage({ |
|
|
|
// that.findByLatAndLng(res.lng, res.lat); |
|
|
|
key: "longitude", |
|
|
|
// }, |
|
|
|
data: res.lng |
|
|
|
// err => { |
|
|
|
}) |
|
|
|
// uni.hideLoading(); |
|
|
|
that.findByLatAndLng(res.lng, res.lat); |
|
|
|
// uni.showModal({ |
|
|
|
}, |
|
|
|
// title: '获取定位权限失败,默认城市重庆市', |
|
|
|
err => { |
|
|
|
// content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' |
|
|
|
uni.hideLoading(); |
|
|
|
// }) |
|
|
|
uni.showModal({ |
|
|
|
// that.city = '重庆市'; |
|
|
|
title: '获取定位权限失败,默认城市重庆市', |
|
|
|
// app.globalData.cityName = '重庆市'; |
|
|
|
content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' |
|
|
|
// app.globalData.cityId = '500000'; |
|
|
|
}) |
|
|
|
// that.getCmsContentcmsContent(); |
|
|
|
that.city = '重庆市'; |
|
|
|
// that.getCmsAactibity(); |
|
|
|
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 { |
|
|
|