|
|
@ -25,6 +25,7 @@ Page({ |
|
|
pageSize: 20, |
|
|
pageSize: 20, |
|
|
hasMoreData: true, |
|
|
hasMoreData: true, |
|
|
img1: '/images/u40.png', |
|
|
img1: '/images/u40.png', |
|
|
|
|
|
|
|
|
// cityId: 440100000,
|
|
|
// cityId: 440100000,
|
|
|
// typeNum: 10,
|
|
|
// typeNum: 10,
|
|
|
// addrArray: { id: [440100000, 430426000], name: ['长沙', '深圳', '上海', '长沙', '武汉', '杭州', '北京'] },
|
|
|
// addrArray: { id: [440100000, 430426000], name: ['长沙', '深圳', '上海', '长沙', '武汉', '杭州', '北京'] },
|
|
|
@ -46,6 +47,7 @@ Page({ |
|
|
*/ |
|
|
*/ |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
|
|
|
|
|
|
//获取本地数据
|
|
|
//获取本地数据
|
|
|
// 获取地址
|
|
|
// 获取地址
|
|
|
wx.getStorage({ |
|
|
wx.getStorage({ |
|
|
@ -60,11 +62,22 @@ Page({ |
|
|
wx.getStorage({ |
|
|
wx.getStorage({ |
|
|
key: 'merchantNo', |
|
|
key: 'merchantNo', |
|
|
success: function (res) { |
|
|
success: function (res) { |
|
|
|
|
|
console.log(1) |
|
|
|
|
|
console.log(res.data) |
|
|
|
|
|
console.log(1) |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
merchantNo: res.data |
|
|
merchantNo: res.data |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
wx.getStorage({ |
|
|
|
|
|
key: 'cityName', |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
cityName: res.data |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
wx.request({ |
|
|
wx.request({ |
|
|
url: app.gw.hostUrl + '/mall/wxa/activity/banner', |
|
|
url: app.gw.hostUrl + '/mall/wxa/activity/banner', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
@ -77,6 +90,7 @@ Page({ |
|
|
success: function (res) { |
|
|
success: function (res) { |
|
|
var data = res.data; |
|
|
var data = res.data; |
|
|
var status = data.code; |
|
|
var status = data.code; |
|
|
|
|
|
console.log(data.msg) |
|
|
if (status == 0) { |
|
|
if (status == 0) { |
|
|
var data = res.data; |
|
|
var data = res.data; |
|
|
var status = data.code; |
|
|
var status = data.code; |
|
|
@ -86,7 +100,7 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: data.msg, |
|
|
|
|
|
|
|
|
title: data.msg, |
|
|
icon: 'none', |
|
|
icon: 'none', |
|
|
duration: 3000 |
|
|
duration: 3000 |
|
|
}); |
|
|
}); |
|
|
@ -154,6 +168,7 @@ Page({ |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '加载数据失败', |
|
|
title: '加载数据失败', |
|
|
}); |
|
|
}); |
|
|
|
|
|
console.log(res) |
|
|
}, |
|
|
}, |
|
|
complete: function (res) { |
|
|
complete: function (res) { |
|
|
// complete
|
|
|
// complete
|
|
|
@ -163,6 +178,7 @@ Page({ |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 点击去开团 |
|
|
* 点击去开团 |
|
|
*/ |
|
|
*/ |
|
|
|