提交最新项目

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

View File

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

View File

@@ -8,18 +8,53 @@
<text class="curriculum_item_name">{{ item.name }}</text> <text class="curriculum_item_name">{{ item.name }}</text>
</view> </view>
</view> </view>
<!-- 应对华为审核去掉app跳转 -->
<view class="cate_box"> <view class="appJump" v-if="$platform=='android'">
<scroll-view scroll-x="true"> <view class="app_item wumen" @click="appjumpfun('wumen')">
<view class="cate_list" v-if="cateList.length>0"> <view class="img">
<view class="cate_item_box" v-for="(item, index) in cateList" @click="handleClickCate(item)"> <image src="@/static/logo_wumen.png" mode="widthFix"></image>
<view class="cate_item_border">
<image :src="item.icon"></image>
</view>
<view class="cate_item_name">{{ item.title }}</view>
</view>
</view> </view>
</scroll-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">
<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>
<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>
<view class="notice_box" v-if="noticeList.length>0"> <view class="notice_box" v-if="noticeList.length>0">
<view class="flash_sale_top"> <view class="flash_sale_top">
@@ -113,6 +148,8 @@ export default {
seckillLst: [], //秒杀列表 seckillLst: [], //秒杀列表
studyList: [], //正在学习 studyList: [], //正在学习
flashSaleList: [], //欢迎试听 flashSaleList: [], //欢迎试听
subList: [],
cateIndex: 0 //分类默认选中第一个
} }
}, },
onLoad() { onLoad() {
@@ -127,7 +164,12 @@ export default {
name: "免费课程", name: "免费课程",
url: "/pages/curriculum/index/free", url: "/pages/curriculum/index/free",
imgUrl: require("@/static/icon/home_bg2.png") imgUrl: require("@/static/icon/home_bg2.png")
} },
{
name: "VIP情况",
url: "/pages/vip/index",
imgUrl: require("@/static/icon/home_bg3.png")
},
] ]
}else{ }else{
this.curriculumList = [ this.curriculumList = [
@@ -145,6 +187,8 @@ export default {
} }
}, },
onShow() { onShow() {
let cateIndex = uni.getStorageSync('cateIndex');
this.cateIndex = cateIndex;
this.getCourseList(); this.getCourseList();
this.getCateList(); this.getCateList();
this.getNotice(); this.getNotice();
@@ -167,12 +211,38 @@ export default {
.then(res=> { .then(res=> {
if (res.labels&&res.labels.length>0) { if (res.labels&&res.labels.length>0) {
this.cateList = res.labels; this.cateList = res.labels;
//默认获取第一个id 请求二级列表
this.getSubList(res.labels[this.cateIndex].id);
} }
}) })
.catch(e=>{ .catch(e=>{
uni.setStorageSync("guidePages", 2); uni.setStorageSync("guidePages", 2);
uni.redirectTo({ uni.redirectTo({
url: "/pages/user/login", 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=>{
uni.setStorageSync("guidePages", 2);
uni.redirectTo({
url: "/pages/user/login",
}); });
}); });
}, },
@@ -275,8 +345,14 @@ export default {
url: url, url: url,
}); });
}, },
//课程列表 //分类点击切换
handleClickCate(item){ handleClickCate(item,index){
this.cateIndex = index;
this.getSubList(item.id);
uni.setStorageSync('cateIndex', this.cateIndex);
},
//二级点击-课程列表
handleClickSub(item){
uni.navigateTo({ uni.navigateTo({
url: `/pages/curriculum/list/index?title=${item.title}&id=${item.id}`, url: `/pages/curriculum/list/index?title=${item.title}&id=${item.id}`,
}); });
@@ -403,45 +479,55 @@ export default {
} }
.cate_box { .cate_box {
background: #7dc1f0; border: 1rpx solid #7dc1f0;
box-shadow: 0rpx 0rpx 6rpx 0rpx #f9f6ea;
border-radius: 10rpx; border-radius: 10rpx;
.cate_list{ .cate_list{
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 0.5px solid #fff;
.cate_item_box { .cate_item_box {
width: 20%; padding: 25rpx 0;
padding: 40rpx 0 30rpx; display: flex;
text-align: center; align-items: center;
justify-content: center;
.cate_item_border { .cate_item_border {
width: 60rpx; width: 56rpx;
height: 60rpx; height: 56rpx;
background-size: 100% 100%; background: #7dc1f0;
background-image: url("@/static/cate_bg.png"); border-radius: 10rpx;
border-radius: 4rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 0 auto; margin-right: 12rpx;
image{ image{
width: 46rpx; width: 40rpx;
height: 46rpx; height: 40rpx;
} }
} }
.cate_item_name { .cate_item_name {
margin-top: 15rpx; font-size: 28rpx;
font-size: 26rpx;
line-height: 34rpx; line-height: 34rpx;
text-align: center; text-align: center;
color: #fff; color: #294a97;
font-weight: bold; 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 { .notice_box {
@@ -586,7 +672,7 @@ export default {
.appJump { .appJump {
position: fixed; position: fixed;
right: 0; right: 0;
top: 100rpx; top: 120rpx;
z-index: 1; z-index: 1;
.app_item { .app_item {
@@ -628,4 +714,16 @@ export default {
font-size: 20rpx; font-size: 20rpx;
color: #fff; 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> </style>

View File

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