Commit 1eae4255 by wenyang

轮播图在缓存中没有时重新获取

parent ae4881ee
......@@ -24,6 +24,7 @@
import tabBar from '../../components/tabBar/tabBar.vue';
import carousel from '@/components/carousel/carousel.vue';
import search from '@/components/search/search.vue';
import {companyInfo} from "@/environments/environment";
export default{
props:['tagIds'],
data(){
......@@ -58,12 +59,6 @@
api.courseList(param).then(res=>{
if(res['success']){
this.cffpCourseInfos = res['data']['data'];
// }else{
// uni.showToast({
// title: res['message'],
// duration: 2000,
// icon: 'none'
// })
}
})
},
......@@ -77,10 +72,29 @@
getCourseList(res){
this.queryName = res;
this.courseList()
}
},
queryAreaCenterInfo() {
api.queryAreaCenterInfo({
userId: uni.getStorageSync('cffp_userId'),
companyType: `${companyInfo.companyType}`
}).then((res) => {
if (res['success']) {
uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList'])
const cffp_userInfo = {
name: res['data']['userReName'],
mobile: res['data']['mobile']
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList');
}
})
},
},
mounted() {
this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList');
if(!this.fileUploadItemCFFPList){
this.queryAreaCenterInfo();
}
this.courseList();
},
onHide() {
......
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