Commit cd8de034 authored by Mac's avatar Mac

缓存处理

parent 1a900fb4
...@@ -177,6 +177,10 @@ ...@@ -177,6 +177,10 @@
this.CategoryIdsList.push(this.CategoryIds1, this.CategoryIds2); this.CategoryIdsList.push(this.CategoryIds1, this.CategoryIds2);
this.msg.CategoryIds = this.CategoryIdsList.join(','); this.msg.CategoryIds = this.CategoryIdsList.join(',');
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
}
this.isover = false; this.isover = false;
this.loading = true; this.loading = true;
let url let url
......
...@@ -108,6 +108,10 @@ ...@@ -108,6 +108,10 @@
this.isover = false; this.isover = false;
this.loading = true; this.loading = true;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
}
let url let url
if (this.IsEducation == 1) { if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList' url = '/api/AppletSchool/GetAppletCoursePageList'
......
...@@ -148,6 +148,10 @@ ...@@ -148,6 +148,10 @@
this.isover = false; this.isover = false;
this.loading = true; this.loading = true;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
}
let url let url
if (this.IsEducation == 1) { if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList' url = '/api/AppletSchool/GetAppletCoursePageList'
......
...@@ -146,6 +146,10 @@ ...@@ -146,6 +146,10 @@
this.isover = false; this.isover = false;
this.loading = true; this.loading = true;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
}
let url let url
if (this.IsEducation == 1) { if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList' url = '/api/AppletSchool/GetAppletCoursePageList'
......
...@@ -178,6 +178,10 @@ ...@@ -178,6 +178,10 @@
this.isover = false; this.isover = false;
this.loading = true; this.loading = true;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
}
let url let url
if (this.IsEducation == 1) { if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList' url = '/api/AppletSchool/GetAppletCoursePageList'
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
}, },
goStorelist(){//门店选择 goStorelist(){//门店选择
uni.navigateTo({ uni.navigateTo({
url:"/pages/reserve/storeList" url:"/pages/reserve/storeList?showtype=1"
}) })
}, },
gostoreDetails() { gostoreDetails() {
......
...@@ -172,6 +172,10 @@ ...@@ -172,6 +172,10 @@
this.showLoading = this.msg.pageIndex != 1; this.showLoading = this.msg.pageIndex != 1;
this.msg.GoodsPageType = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0; this.msg.GoodsPageType = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
}
this.request2({ this.request2({
url: '/api/AppletGoods/GetAppletGoodsPageListForZY', url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
data: this.msg data: this.msg
......
...@@ -463,6 +463,7 @@ ...@@ -463,6 +463,7 @@
}, },
(res) => { (res) => {
console.log(res,'res') console.log(res,'res')
uni.setStorageSync("GetAppConfig",res.data);//方便在分类判断
if (res.resultCode == 1) { if (res.resultCode == 1) {
if(res.data.IsOpenReserve==1){ if(res.data.IsOpenReserve==1){
this.getstore(); this.getstore();
......
...@@ -325,7 +325,10 @@ ...@@ -325,7 +325,10 @@
} }
}, },
gostore(x){ gostore(x){
uni.setStorageSync("storeId", {storeId:x.Id}); let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==1){//如果开启 门店id存储起来
uni.setStorageSync("storeId", {storeId:x.Id});
}
uni.navigateTo({ uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+x.Id, url: "/pages/reserve/storeDetails?id="+x.Id,
}); });
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="choice" @click.stop="radioChange"> <view class="choice" @click.stop="radioChange" v-if="showtype==1">
<u-radio-group v-model="currentChosen" @change='radioChange'> <u-radio-group v-model="currentChosen" @change='radioChange'>
<u-radio <u-radio
shape="circle" shape="circle"
...@@ -102,11 +102,15 @@ ...@@ -102,11 +102,15 @@
CurrentPosition: '', CurrentPosition: '',
OrderByType: 3, OrderByType: 3,
}, },
showtype:0,
}; };
}, },
onLoad(option) { onLoad(option) {
if(option && option.showtype){
this.showtype=option.showtype
}
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.msg.CurrentPosition = uni.getStorageSync("position") && uni.getStorageSync("position").position?uni.getStorageSync("position").position:''; this.msg.CurrentPosition = uni.getStorageSync("position") && uni.getStorageSync("position").position?uni.getStorageSync("position").position:'';
...@@ -185,8 +189,9 @@ ...@@ -185,8 +189,9 @@
} }
}, },
gostoreDetails(item) { gostoreDetails(item) {
if(this.showtype==1){//从组组建过来的缓存起来
uni.setStorageSync("storeId", {storeId:item.Id}); uni.setStorageSync("storeId", {storeId:item.Id});
}
this.currentChosen = item.Id this.currentChosen = item.Id
// let pages = getCurrentPages(); // 当前页面 // let pages = getCurrentPages(); // 当前页面
// let beforePage = pages[pages.length - 2]; // 前一个页面 // let beforePage = pages[pages.length - 2]; // 前一个页面
......
...@@ -183,6 +183,10 @@ ...@@ -183,6 +183,10 @@
var UserPageType = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; var UserPageType = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let url let url
let StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0; let StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
StoreId=0
}
if (this.IsEducation == 1) { if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList'; url = '/api/AppletSchool/GetAppletCoursePageList';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment