更新项目

This commit is contained in:
liuyuan
2025-03-20 16:14:57 +08:00
parent 37829438bc
commit fbce03f09f
6 changed files with 86 additions and 82 deletions

View File

@@ -12,7 +12,7 @@
<view class="appJump" v-if="$platform=='android'">
<view class="app_item wumen" @click="appjumpfun('wumen')">
<view class="img">
<image src="@/static/logo_wumen.png" mode="widthFix"></image>
<image src="@/static/logo_wumen.png"></image>
</view>
<view class="text">
<text>吴门医述</text>
@@ -20,7 +20,7 @@
</view>
<view class="app_item zmzm" @click="appjumpfun('zmzm')">
<view class="img">
<image src="@/static/logo_zmzm.png" mode="widthFix"></image>
<image src="@/static/logo_zmzm.png"></image>
</view>
<view class="text">
<text>众妙之门</text>
@@ -28,7 +28,7 @@
</view>
<view class="app_item fzds" @click="appjumpfun('nuttyreading')">
<view class="img">
<image src="@/static/logo_fzds.png" mode="widthFix"></image>
<image src="@/static/logo_fzds.png"></image>
</view>
<view class="text">
<text>疯子读书</text>
@@ -36,25 +36,16 @@
</view>
</view>
<view class="cate_box">
<view class="cate_list">
<view class="cate_item_box"
:class="cateIndex==index?'cate_item_box_active':''"
:style="`width: ${(100/cateList.length)}%`"
v-for="(item, index) in cateList" :key="index"
@click="handleClickCate(item,index)"
>
<view class="cate_item_border">
<image :src="item.icon"></image>
<scroll-view scroll-x="true">
<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>
</view>
<view class="cate_item_name">{{ item.title }}</view>
</view>
<view class="cate_item_name">{{ item.title }}</view>
</view>
</view>
<view class="sub_list">
<view class="sub_item_box" v-for="(item,index) in subList" :key="index"
@click="handleClickSub(item)">
<view class="sub_item_name">{{ item.title }}</view>
</view>
</view>
</scroll-view>
</view>
<view class="notice_box" v-if="noticeList.length>0">
<view class="flash_sale_top">
@@ -122,6 +113,7 @@
</template>
<script>
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
@@ -217,9 +209,6 @@ export default {
})
.catch(e=>{
uni.setStorageSync("guidePages", 2);
uni.redirectTo({
url: "/pages/user/login",
});
});
},
//获取二级列表数据
@@ -345,14 +334,8 @@ export default {
url: url,
});
},
//分类点击切换
handleClickCate(item,index){
this.cateIndex = index;
this.getSubList(item.id);
uni.setStorageSync('cateIndex', this.cateIndex);
},
//二级点击-课程列表
handleClickSub(item){
//课程列表
handleClickCate(item){
uni.navigateTo({
url: `/pages/curriculum/list/index?title=${item.title}&id=${item.id}`,
});
@@ -479,53 +462,44 @@ export default {
}
.cate_box {
border: 1rpx solid #7dc1f0;
background: #7dc1f0;
box-shadow: 0rpx 0rpx 6rpx 0rpx #f9f6ea;
border-radius: 10rpx;
.cate_list{
display: flex;
align-items: center;
border-bottom: 0.5px solid #fff;
justify-content: space-around;
.cate_item_box {
padding: 25rpx 0;
display: flex;
align-items: center;
justify-content: center;
width: 20%;
padding: 40rpx 0 30rpx;
text-align: center;
.cate_item_border {
width: 56rpx;
height: 56rpx;
background: #7dc1f0;
border-radius: 10rpx;
width: 60rpx;
height: 60rpx;
background-size: 100% 100%;
background-image: url("@/static/cate_bg.png");
border-radius: 4rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
margin: 0 auto;
image{
width: 40rpx;
height: 40rpx;
width: 46rpx;
height: 46rpx;
}
}
.cate_item_name {
font-size: 28rpx;
margin-top: 15rpx;
font-size: 26rpx;
line-height: 34rpx;
text-align: center;
color: #294a97;
font-weight: bold;
}
}
.cate_item_box_active{
background: #7dc1f0;
.cate_item_border{
background-size: 100% 100%;
background-image: url("@/static/cate_bg.png");
}
.cate_item_name{
color: #fff;
font-weight: bold;
}
}
}