提交
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 应对华为审核,去掉app跳转 -->
|
||||
<view class="appJump" v-if="$platform=='android'">
|
||||
<view class="appJump">
|
||||
<view class="app_item wumen" @click="appjumpfun('wumen')">
|
||||
<view class="img">
|
||||
<image src="@/static/logo_wumen.png"></image>
|
||||
@@ -37,17 +37,7 @@
|
||||
</view>
|
||||
<view class="cate_box">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="cate_list" v-if="$platform!='android'&&cateList.length>0">
|
||||
<view class="cate_item_box" v-if="item.id!=75" v-for="(item, index) in cateList" @click="handleClickCate(item)">
|
||||
<view class="cate_item_border">
|
||||
<image :src="item.icon"></image>
|
||||
</view>
|
||||
<view class="cate_item_name" v-if="index==2">心身健康科学</view>
|
||||
<view class="cate_item_name" v-else>{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cate_list" v-if="$platform=='android'&&cateList.length>0">
|
||||
<view class="cate_list" v-if="cateList.length>0">
|
||||
<view class="cate_item_box" v-for="(item, index) in cateList" @click="handleClickCate(item)">
|
||||
<view class="cate_item_border">
|
||||
<image :src="item.icon"></image>
|
||||
@@ -128,35 +118,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
curriculumList: [],
|
||||
// curriculumList: [
|
||||
// {
|
||||
// name: "我的课程",
|
||||
// url: "/pages/curriculum/index/index",
|
||||
// imgUrl: require("@/static/icon/home_bg1.png")
|
||||
// },
|
||||
// {
|
||||
// name: "免费课程",
|
||||
// url: "/pages/curriculum/index/free",
|
||||
// imgUrl: require("@/static/icon/home_bg2.png")
|
||||
// },
|
||||
// {
|
||||
// name: "VIP办理",
|
||||
// url: "/pages/vip/index",
|
||||
// imgUrl: require("@/static/icon/home_bg3.png")
|
||||
// },
|
||||
// ],
|
||||
cateList: [],
|
||||
noticeList: [], //通知消息
|
||||
seckillLst: [], //秒杀列表
|
||||
studyList: [], //正在学习
|
||||
flashSaleList: [], //欢迎试听
|
||||
subList: [],
|
||||
cateIndex: 0 //分类默认选中第一个
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
if(this.$platform=='android'){
|
||||
this.curriculumList = [
|
||||
curriculumList: [
|
||||
{
|
||||
name: "我的课程",
|
||||
url: "/pages/curriculum/index/index",
|
||||
@@ -172,27 +134,23 @@ export default {
|
||||
url: "/pages/vip/index",
|
||||
imgUrl: require("@/static/icon/home_bg3.png")
|
||||
},
|
||||
]
|
||||
}else{
|
||||
this.curriculumList = [
|
||||
{
|
||||
name: "我的课程",
|
||||
url: "/pages/curriculum/index/index",
|
||||
imgUrl: require("@/static/icon/home_bg1.png")
|
||||
},
|
||||
{
|
||||
name: "免费课程",
|
||||
url: "/pages/curriculum/index/free",
|
||||
imgUrl: require("@/static/icon/home_bg2.png")
|
||||
}
|
||||
]
|
||||
],
|
||||
cateList: [],
|
||||
noticeList: [], //通知消息
|
||||
seckillLst: [], //秒杀列表
|
||||
studyList: [], //正在学习
|
||||
flashSaleList: [], //欢迎试听
|
||||
subList: [],
|
||||
cateIndex: 0 //分类默认选中第一个
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList();
|
||||
},
|
||||
onShow() {
|
||||
let cateIndex = uni.getStorageSync('cateIndex');
|
||||
this.cateIndex = cateIndex;
|
||||
this.getCourseList();
|
||||
this.getCateList();
|
||||
this.getNotice();
|
||||
this.getMarketProductList();
|
||||
this.getMarketCourseList();
|
||||
@@ -200,6 +158,9 @@ export default {
|
||||
methods: {
|
||||
//获取列表数据
|
||||
getCateList(){
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.$http.request({
|
||||
url: 'psyche/home/getPsycheLabels',
|
||||
method: "POST",
|
||||
@@ -211,6 +172,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
uni.hideLoading();
|
||||
if (res.labels&&res.labels.length>0) {
|
||||
this.cateList = res.labels;
|
||||
//默认获取第一个id 请求二级列表
|
||||
@@ -218,6 +180,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch(e=>{
|
||||
uni.hideLoading();
|
||||
uni.setStorageSync("guidePages", 2);
|
||||
});
|
||||
},
|
||||
@@ -238,12 +201,6 @@ export default {
|
||||
this.subList = res.labels;
|
||||
}
|
||||
})
|
||||
.catch(e=>{
|
||||
uni.setStorageSync("guidePages", 2);
|
||||
uni.redirectTo({
|
||||
url: "/pages/user/login",
|
||||
});
|
||||
});
|
||||
},
|
||||
//获取通知数据
|
||||
getNotice() {
|
||||
|
||||
Reference in New Issue
Block a user