|
@@ -76,16 +76,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad({store}) {
|
|
onLoad({store}) {
|
|
|
- app = this;
|
|
|
|
|
- app.storeId = store?store:"7644106137976965139";
|
|
|
|
|
|
|
+ app = this;
|
|
|
|
|
+ var poiId = uni.getStorageSync("poiId");
|
|
|
|
|
+ if (!poiId && !store) {
|
|
|
|
|
+ app.storeId = "7644106137976965139";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ app.storeId = poiId;
|
|
|
|
|
+ }
|
|
|
app.getData()
|
|
app.getData()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getData(){
|
|
|
|
|
|
|
+ getData(){
|
|
|
|
|
+ if (!app.storeId) return ;
|
|
|
Api.data({"store":app.storeId}).then((res)=>{
|
|
Api.data({"store":app.storeId}).then((res)=>{
|
|
|
if (res.code !== 1) {
|
|
if (res.code !== 1) {
|
|
|
return app.$dialog.showSuccess(res.msg)
|
|
return app.$dialog.showSuccess(res.msg)
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ uni.setStorageSync("poiId",res.data.store.poi_id);
|
|
|
app.storeData = res.data.store;
|
|
app.storeData = res.data.store;
|
|
|
app.goodsData = res.data.goods;
|
|
app.goodsData = res.data.goods;
|
|
|
uni.setStorageSync("contact",res.data.store);
|
|
uni.setStorageSync("contact",res.data.store);
|