Commit 1eae4255 by wenyang

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

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