Commit cd8de034 authored by Mac's avatar Mac

缓存处理

parent 1a900fb4
......@@ -177,6 +177,10 @@
this.CategoryIdsList.push(this.CategoryIds1, this.CategoryIds2);
this.msg.CategoryIds = this.CategoryIdsList.join(',');
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.loading = true;
let url
......
......@@ -108,6 +108,10 @@
this.isover = false;
this.loading = true;
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
if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList'
......
......@@ -148,6 +148,10 @@
this.isover = false;
this.loading = true;
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
if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList'
......
......@@ -146,6 +146,10 @@
this.isover = false;
this.loading = true;
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
if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList'
......
......@@ -178,6 +178,10 @@
this.isover = false;
this.loading = true;
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
if (this.IsEducation == 1) {
url = '/api/AppletSchool/GetAppletCoursePageList'
......
......@@ -95,7 +95,7 @@
},
goStorelist(){//门店选择
uni.navigateTo({
url:"/pages/reserve/storeList"
url:"/pages/reserve/storeList?showtype=1"
})
},
gostoreDetails() {
......
......@@ -172,6 +172,10 @@
this.showLoading = this.msg.pageIndex != 1;
this.msg.GoodsPageType = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType: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({
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
data: this.msg
......
......@@ -463,6 +463,7 @@
},
(res) => {
console.log(res,'res')
uni.setStorageSync("GetAppConfig",res.data);//方便在分类判断
if (res.resultCode == 1) {
if(res.data.IsOpenReserve==1){
this.getstore();
......
......@@ -325,7 +325,10 @@
}
},
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({
url: "/pages/reserve/storeDetails?id="+x.Id,
});
......
......@@ -37,7 +37,7 @@
</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
shape="circle"
......@@ -102,11 +102,15 @@
CurrentPosition: '',
OrderByType: 3,
},
showtype:0,
};
},
onLoad(option) {
if(option && option.showtype){
this.showtype=option.showtype
}
this.mainColor = this.$uiConfig.mainColor;
this.msg.CurrentPosition = uni.getStorageSync("position") && uni.getStorageSync("position").position?uni.getStorageSync("position").position:'';
......@@ -185,8 +189,9 @@
}
},
gostoreDetails(item) {
uni.setStorageSync("storeId", {storeId:item.Id});
if(this.showtype==1){//从组组建过来的缓存起来
uni.setStorageSync("storeId", {storeId:item.Id});
}
this.currentChosen = item.Id
// let pages = getCurrentPages(); // 当前页面
// let beforePage = pages[pages.length - 2]; // 前一个页面
......
......@@ -183,6 +183,10 @@
var UserPageType = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let url
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) {
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