|
@@ -154,31 +154,28 @@ function getActivityData() {
|
|
|
}
|
|
|
// 获取门店列表接口
|
|
|
function getStoreData(lat, lng) {
|
|
|
- console.log(lat, lng)
|
|
|
+ // console.log(lat, lng)
|
|
|
var obj = JSON.stringify({
|
|
|
"lat": lat, //
|
|
|
"lng": lng //
|
|
|
})
|
|
|
-
|
|
|
- if (lat && lng) {
|
|
|
- $.ajax({
|
|
|
- url: reqUrl + 'active/activeStores/' + activeId,
|
|
|
- type: 'post',
|
|
|
- contentType: 'application/json;charset=UTF-8',
|
|
|
- // 设置的是请求参数
|
|
|
- data: obj,
|
|
|
- dataType: 'json',
|
|
|
- success: function(res) {
|
|
|
- console.log(res, 'rrrrrrr')
|
|
|
- if (res.status == 200) {
|
|
|
- renderStoreList(res.data)
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(err, status, msg) {
|
|
|
- console.log(err, 'jsapi error')
|
|
|
+ $.ajax({
|
|
|
+ url: reqUrl + 'active/activeStores/' + activeId,
|
|
|
+ type: 'post',
|
|
|
+ contentType: 'application/json;charset=UTF-8',
|
|
|
+ // 设置的是请求参数
|
|
|
+ data: lat && lng?obj:JSON.stringify({}),
|
|
|
+ dataType: 'json',
|
|
|
+ success: function(res) {
|
|
|
+ console.log(JSON.stringify(res), 'rrrrrrr')
|
|
|
+ if (res.status == 200) {
|
|
|
+ renderStoreList(res.data)
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ },
|
|
|
+ error: function(err, status, msg) {
|
|
|
+ console.log(err, 'jsapi error')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
// 拼接门店列表
|
|
|
function renderStoreList(storeList) {
|
|
@@ -334,9 +331,15 @@ function onLoading() {
|
|
|
}
|
|
|
|
|
|
window.onload = function() {
|
|
|
+
|
|
|
// 单击查看门店
|
|
|
$("#showStore").click(function() {
|
|
|
var _this = this
|
|
|
+ // 获取门店列表
|
|
|
+ console.log(!browser.versions.weixin,'!browser.versions.weixin')
|
|
|
+ if (!browser.versions.weixin){ // 不是微信端打开的页面
|
|
|
+ getStoreData()
|
|
|
+ }
|
|
|
$(".mask").show()
|
|
|
$(".store-info-list").animate({
|
|
|
bottom: '0em'
|