提交最新项目

This commit is contained in:
liuyuan
2025-03-19 09:17:47 +08:00
parent 2e63c85114
commit 37829438bc
4 changed files with 142 additions and 39 deletions

View File

@@ -2,8 +2,8 @@
"name" : "心灵空间",
"appid" : "__UNI__BBBDFD2",
"description" : "心灵空间",
"versionName" : "1.0.02",
"versionCode" : 1002,
"versionName" : "1.0.03",
"versionCode" : 1003,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@@ -21,7 +21,10 @@
"Camera" : {},
"VideoPlayer" : {},
"Payment" : {},
"Share" : {}
"Share" : {},
"push" : false,
"ad" : false,
"statistics" : false
},
"privacy" : {
"prompt" : "template",
@@ -35,7 +38,8 @@
/* */
"distribute" : {
"apple" : {
"devices" : "universal"
"devices" : "universal",
"NSUserTrackingUsageDescription" : ""
},
/* android */
"android" : {

View File

@@ -128,7 +128,7 @@ export default {
this.title = options.title;
this.id = options.id;
//如果是心理评测
if(this.id==75){
if(this.id==87){
this.statusXLCP = true;
this.getFormList();
}
@@ -205,7 +205,7 @@ export default {
this.labelsList = res.labels;
//如果是心理测评
if(this.id == 75){
if(this.id == 87){
this.XL_id = this.labelsList[0].id;
}
//判断是否有子级
@@ -238,7 +238,7 @@ export default {
this.statusNull = null;
this.activeTab = index;
//如果是心理测评
if(this.id == 75){
if(this.id == 87){
this.XL_id = item.id;
}
if(item.isLast == 1) {

View File

@@ -8,18 +8,53 @@
<text class="curriculum_item_name">{{ item.name }}</text>
</view>
</view>
<!-- 应对华为审核去掉app跳转 -->
<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>
</view>
<view class="text">
<text>吴门医述</text>
</view>
</view>
<view class="app_item zmzm" @click="appjumpfun('zmzm')">
<view class="img">
<image src="@/static/logo_zmzm.png" mode="widthFix"></image>
</view>
<view class="text">
<text>众妙之门</text>
</view>
</view>
<view class="app_item fzds" @click="appjumpfun('nuttyreading')">
<view class="img">
<image src="@/static/logo_fzds.png" mode="widthFix"></image>
</view>
<view class="text">
<text>疯子读书</text>
</view>
</view>
</view>
<view class="cate_box">
<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_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>
</view>
<view class="cate_item_name">{{ item.title }}</view>
</view>
</view>
</scroll-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>
</view>
<view class="notice_box" v-if="noticeList.length>0">
<view class="flash_sale_top">
@@ -113,6 +148,8 @@ export default {
seckillLst: [], //秒杀列表
studyList: [], //正在学习
flashSaleList: [], //欢迎试听
subList: [],
cateIndex: 0 //分类默认选中第一个
}
},
onLoad() {
@@ -127,7 +164,12 @@ export default {
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")
},
]
}else{
this.curriculumList = [
@@ -145,6 +187,8 @@ export default {
}
},
onShow() {
let cateIndex = uni.getStorageSync('cateIndex');
this.cateIndex = cateIndex;
this.getCourseList();
this.getCateList();
this.getNotice();
@@ -167,6 +211,32 @@ export default {
.then(res=> {
if (res.labels&&res.labels.length>0) {
this.cateList = res.labels;
//默认获取第一个id 请求二级列表
this.getSubList(res.labels[this.cateIndex].id);
}
})
.catch(e=>{
uni.setStorageSync("guidePages", 2);
uni.redirectTo({
url: "/pages/user/login",
});
});
},
//获取二级列表数据
getSubList(id){
this.$http.request({
url: 'psyche/home/getChildCoursePsycheTree',
method: "POST",
data: {
id: id,
},
header: {
"Content-Type": "application/json",
},
})
.then(res=> {
if (res.labels&&res.labels.length>0) {
this.subList = res.labels;
}
})
.catch(e=>{
@@ -275,8 +345,14 @@ export default {
url: url,
});
},
//课程列表
handleClickCate(item){
//分类点击切换
handleClickCate(item,index){
this.cateIndex = index;
this.getSubList(item.id);
uni.setStorageSync('cateIndex', this.cateIndex);
},
//二级点击-课程列表
handleClickSub(item){
uni.navigateTo({
url: `/pages/curriculum/list/index?title=${item.title}&id=${item.id}`,
});
@@ -403,45 +479,55 @@ export default {
}
.cate_box {
background: #7dc1f0;
box-shadow: 0rpx 0rpx 6rpx 0rpx #f9f6ea;
border: 1rpx solid #7dc1f0;
border-radius: 10rpx;
.cate_list{
display: flex;
align-items: center;
border-bottom: 0.5px solid #fff;
.cate_item_box {
width: 20%;
padding: 40rpx 0 30rpx;
text-align: center;
.cate_item_border {
width: 60rpx;
height: 60rpx;
background-size: 100% 100%;
background-image: url("@/static/cate_bg.png");
border-radius: 4rpx;
padding: 25rpx 0;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
.cate_item_border {
width: 56rpx;
height: 56rpx;
background: #7dc1f0;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
image{
width: 46rpx;
height: 46rpx;
width: 40rpx;
height: 40rpx;
}
}
.cate_item_name {
margin-top: 15rpx;
font-size: 26rpx;
font-size: 28rpx;
line-height: 34rpx;
text-align: center;
color: #fff;
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;
}
}
}
}
.notice_box {
@@ -586,7 +672,7 @@ export default {
.appJump {
position: fixed;
right: 0;
top: 100rpx;
top: 120rpx;
z-index: 1;
.app_item {
@@ -628,4 +714,16 @@ export default {
font-size: 20rpx;
color: #fff;
}
.sub_list{
height: 110rpx;
display: flex;
align-items: center;
justify-content: space-around;
background: #7dc1f0;
}
.sub_item_name{
color: #fff;
padding: 0 10rpx;
}
</style>

View File

@@ -23,6 +23,7 @@
</view>
<view class="userInfoBox">
<view class="name">{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
<view class="phone" v-if="userMes.tel">手机号({{ userMes.tel }})</view>
<view class="vip_type" v-if="$platform=='android'&&textList.length>0">
<view class="vip_type_item" v-for="(item,index) in textList" :key="index">
{{item}}<image src="@/static/icon/chao_vip.png"></image>