我的课程-购买 未完成

This commit is contained in:
@fawn-nine
2024-06-21 17:33:11 +08:00
parent c8d7b5f271
commit ccc4e5d72a
7 changed files with 618 additions and 233 deletions

View File

@@ -11,16 +11,20 @@
@click="onPageJump('/pages/peanut/searchFor')"></image>
</view>
</view>
</view>
</view>
<view class="fourBox">
<view class="fourIcon flexbox" style="justify-content: space-around;">
<view class="fourIcon flexbox" style="justify-content: space-around;">
<div class="item flexbox" @click="onPageJump('/pages/course/outline')">
<image src="../../static/my_01.png" mode="aspectFit"></image>
<text>学习大纲</text>
</div>
<div class="item flexbox" @click="onPageJump('/pages/course/myCourse')">
<image src="../../static/my_02.png" mode="aspectFit"></image>
<text>我的课程</text>
</div>
<div class="item flexbox" @click="onPageJump('/pages/course/outline')">
<image src="../../static/my_01.png" mode="aspectFit"></image>
<text>学习大纲</text>
<div class="item flexbox" @click="onPageJump('/pages/taihu/index')">
<image src="../../static/my_05.png" mode="aspectFit"></image>
<text>太湖公益</text>
</div>
<!-- <div class="item flexbox" @click="onPageJump()">
<image src="../../static/my_03.png" mode="aspectFit"></image>
@@ -29,7 +33,7 @@
<div class="item flexbox" @click="onPageJump()">
<image src="../../static/my_04.png" mode="aspectFit"></image>
<text>吴门医述</text>
</div>
</div>
</view>
</view>
<view class="home_nar ">
@@ -103,7 +107,8 @@
<view class="borderbb">
<view class=" main">
<view class="flexbox">
<view class="item" v-for="(item, index) in tjProList" :key="index" @click="onPageJump('/pages/bookShop/commodityDetail',item.productId)">
<view class="item" v-for="(item, index) in tjProList" :key="index"
@click="onPageJump('/pages/bookShop/commodityDetail',item.productId)">
<view class="imgcontainer">
<image :src="item.productImages" mode="aspectFit"></image>
</view>
@@ -141,7 +146,8 @@
</view>
<scroll-view class="scroll-view_H" scroll-x="true">
<!-- <view class=""> -->
<view class="item" v-for="(item, index) in seckillList" :key="index" @click="onPageJump('/pages/bookShop/commodityDetail',item.productId)">
<view class="item" v-for="(item, index) in seckillList" :key="index"
@click="onPageJump('/pages/bookShop/commodityDetail',item.productId)">
<view class="imgcontainer">
<image :src="item.productImages" mode="aspectFit"></image>
</view>
@@ -167,34 +173,35 @@
</view>
</view>
</view>
<view class="fourBox" v-if="tryListenList.length > 0">
<view class="learnBox" >
<view class="titleBox flexbox">
<image src="../../static/try_listen.png" mode="aspectFit"></image>
<text>精彩试听</text>
</view>
<view class="learn flexbox shiting">
<view class="item" v-for="(item, index) in tryListenList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id, item.title)">
<view class="imgcontainer">
<image v-if="item.image==''" src="@/static/nobg.jpg" mode="aspectFit"></image>
<image v-else :src="item.image" mode="aspectFit"></image>
</view>
<view class="buyItems flexbox">
<view class="txt555">
{{item.title}}
<view class="fourBox" v-if="tryListenList.length > 0">
<view class="learnBox">
<view class="titleBox flexbox">
<image src="../../static/try_listen.png" mode="aspectFit"></image>
<text>精彩试听</text>
</view>
<view class="learn flexbox shiting">
<view class="item" v-for="(item, index) in tryListenList" :key="index"
@click="onPageJump('/pages/course/courseDetail',item.id, item.title)">
<view class="imgcontainer">
<image v-if="item.image==''" src="@/static/nobg.jpg" mode="aspectFit"></image>
<image v-else :src="item.image" mode="aspectFit"></image>
</view>
<view class="buybtn" @click.stop="onPageJump()">
<span>购买</span>
<view class="buyItems flexbox">
<view class="txt555">
{{item.title}}
</view>
<view class="buybtn" @click.stop="onPageJump()">
<span>购买</span>
</view>
</view>
</view>
</view>
</view>
<view class="moreBox shiting">
<text @click="onPageJump('/pages/course/tryListen',1,'精彩试听')">更多试听</text>
</view>
</view>
<view class="moreBox shiting">
<text @click="onPageJump('/pages/course/tryListen',1,'精彩试听')">更多试听</text>
</view>
</view>
</view>
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
@@ -215,8 +222,8 @@
<text>众妙之门</text>
</view>
</view>
</view>
<!-- 公共组件-每个页面必须引入 -->
</view>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-navigation></z-navigation>
<music-play :playList="myList"></music-play>
@@ -248,7 +255,7 @@
data() {
return {
myList: [],
showEbook: false, // 显示电子书相关
transaction: { // 成功回调
@@ -372,28 +379,28 @@
id ? ftag = id : ftag = 0
this.$http
.post('medical/home/getCourseMedicalTree')
.then(res => {
console.log(res)
if (res.code == 0) {
if (res.labels.length > 0) {
this.curseTagList = res.labels
this.tabsid = res.labels[0].id
// this.curseClick(res.labels[0])
if (res.labels[0].isLast == 0) { // 非终极
if (res.labels[0].children && res.labels[0].children.length > 0) {
this.sbuMedicalTagsList = res.labels[0].children
} else {
this.sbuMedicalTagsList = []
.then(res => {
console.log(res)
if (res.code == 0) {
if (res.labels.length > 0) {
this.curseTagList = res.labels
this.tabsid = res.labels[0].id
// this.curseClick(res.labels[0])
if (res.labels[0].isLast == 0) { // 非终极
if (res.labels[0].children && res.labels[0].children.length > 0) {
this.sbuMedicalTagsList = res.labels[0].children
} else {
this.sbuMedicalTagsList = []
}
}
} else {
this.tabsid = null
this.curseTagList = []
}
} else {
this.tabsid = null
this.curseTagList = []
}
}
}).catch(e => {
console.log(e, '获取医学标签列表报错')
});
}).catch(e => {
console.log(e, '获取医学标签列表报错')
});
},
// 获取精彩试听课程列表
getTryListenList() {
@@ -511,11 +518,11 @@
});
},
newsClick(item) {
console.log('item',item)
uni.navigateTo({
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`
})
newsClick(item) {
console.log('item', item)
uni.navigateTo({
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`
})
// }
},
openURL(url) {
@@ -540,7 +547,7 @@
});
}
},
curseClickJump(item){
curseClickJump(item) {
uni.navigateTo({
// url: `/pages/course/index?id=${item.id}&title=中医学`
url: `/pages/course/index?id=${item.id}&title=${item.title}&pid=${item.pid}`
@@ -559,11 +566,11 @@
},
// 跳转
onPageJump(url,thatId,title) {
onPageJump(url, thatId, title) {
uni.navigateTo({
url: `${url}?id=${thatId}&title=${title}`
});
},
},
onPageJumpData(url, data) {
uni.navigateTo({
@@ -603,58 +610,58 @@
url: '../bookShop/bookShopType?type=' + e
});
},
appjumpfun(name){
let bagName = ''
let schemes = ''
if(name == 'zmzm'){
bagName = 'com.cn.zmzm'
schemes = 'zmzm'
}
if(name == 'nuttyreading'){
bagName = 'com.cn.nuttyreading'
schemes = 'nuttyreading'
}
appjumpfun(name) {
let bagName = ''
let schemes = ''
if (name == 'zmzm') {
bagName = 'com.cn.zmzm'
schemes = 'zmzm'
}
if (name == 'nuttyreading') {
bagName = 'com.cn.nuttyreading'
schemes = 'nuttyreading'
}
// if(name == 'everhealth'){
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: bagName, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: bagName, //B款app云打包的包名
extra: {
url: `${schemes}://${bagName}` //B款app配置的schemes+云打包的包名
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
}
else { //未安装app
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
//进入后台小哥哥给我的应用宝下载链接,让你们后台给你
//这链接会判断你手机是ios还是AndroidAndroid进入应用宝下载app
//跟下面的是一个链接
console.log(res);
});
}
} else if (plus.os.name == "iOS") { //苹果
//因为ios查不到B款app在ios系统手机里面其实下载了也是检测不到所以就不检测了
//直接打开B款appB款app没有的话会进入回调报错我们在回调去打开下载链接
plus.runtime.launchApplication({
action: "${schemes}://"
}, function(e) {
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
//进入后台小哥哥给我的appStore下载app链接让你们后台给你
//这链接会判断你手机是ios还是Androidios进入应用宝下载app
//跟上面的是一个链接
console.log(res);
});
});
// }
}
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: bagName, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: bagName, //B款app云打包的包名
extra: {
url: `${schemes}://${bagName}` //B款app配置的schemes+云打包的包名
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
} else { //未安装app
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
//进入后台小哥哥给我的应用宝下载链接,让你们后台给你
//这链接会判断你手机是ios还是AndroidAndroid进入应用宝下载app
//跟下面的是一个链接
console.log(res);
});
}
} else if (plus.os.name == "iOS") { //苹果
//因为ios查不到B款app在ios系统手机里面其实下载了也是检测不到所以就不检测了
//直接打开B款appB款app没有的话会进入回调报错我们在回调去打开下载链接
plus.runtime.launchApplication({
action: "${schemes}://"
}, function(e) {
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(
res) {
//进入后台小哥哥给我的appStore下载app链接让你们后台给你
//这链接会判断你手机是ios还是Androidios进入应用宝下载app
//跟上面的是一个链接
console.log(res);
});
});
// }
}
},
// 三个列表跳页
onBookMore(e) {
uni.navigateTo({
@@ -670,16 +677,36 @@
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.appJump{position: fixed; right: 0; top: 8%; z-index: 1;
.item{background: rgba(255, 255, 255, .6); margin-bottom: 20rpx; border: 1px solid #fff;
align-items: center; padding-right: 10rpx;
overflow: hidden; border-radius: 50rpx 0 0 50rpx;
text{font-size: 20rpx;}
.img{
.appJump {
position: fixed;
right: 0;
top: 8%;
z-index: 1;
.item {
background: rgba(255, 255, 255, .6);
margin-bottom: 20rpx;
border: 1px solid #fff;
align-items: center;
padding-right: 10rpx;
overflow: hidden;
border-radius: 50rpx 0 0 50rpx;
text {
font-size: 20rpx;
}
.img {
// width: 60rpx; height: 60rpx;
padding: 6rpx; overflow: hidden;
image{width: 36rpx; height: 36rpx; border-radius: 100%;}
padding: 6rpx;
overflow: hidden;
image {
width: 36rpx;
height: 36rpx;
border-radius: 100%;
}
}
}
}
@@ -958,10 +985,12 @@
.learnBox {
background-color: #fff;
margin-top: 10px; border-radius: 20rpx;
margin-top: 10px;
border-radius: 20rpx;
@include ptop_bottm(10px);
@include pleft_right(10px);
@include mshadow(10px, 1);margin-bottom: 10px;
@include mshadow(10px, 1);
margin-bottom: 10px;
.learn {
justify-content: space-between;
@@ -1204,7 +1233,7 @@
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
padding: 20rpx;
padding:30rpx 20rpx;
position: relative;
// margin-bottom:60rpx;