This commit is contained in:
@fawn-nine
2024-06-26 14:18:03 +08:00
19 changed files with 537 additions and 183 deletions

View File

@@ -5,7 +5,12 @@
>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"></z-nav-bar>
<!-- <z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"> -->
<z-nav-bar title="课程介绍">
<view class="curseSet" slot="right" @click="newOnShare">
<uni-icons type="redo" size="26"></uni-icons><text style="font-size: 26rpx;"></text> 分享课程</view>
</z-nav-bar>
<view class="contentBox commonPageContentBox">
<u-alert
@@ -494,6 +499,10 @@
</view>
</view>
</u-popup>
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
<uni-popup-share @select="haveSelected"></uni-popup-share>
</uni-popup>
<z-navigation></z-navigation>
</view>
</template>
@@ -639,7 +648,7 @@ export default {
},
computed: {
...mapState(["userInfo"]),
},
},
//页面显示
onShow() {
// 隐藏原生的tabbar
@@ -674,6 +683,47 @@ export default {
},
//方法
methods: {
haveSelected(data) {
console.log(data, " 选择的是");
if (data.index == 0) {
// 分享到好友
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: this.$apkUrl,
title: "吴门医述",
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
imageUrl: "static/icon/home_icon_logo.png",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
},
});
} else if (data.index == 1) {
// 分享到朋友圈
uni.share({
provider: "weixin",
scene: "WXSceneTimeline",
type: 0,
href: this.$apkUrl,
title: "吴门医述",
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
imageUrl: "static/icon/home_icon_logo.png",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
},
});
}
},
newOnShare() {
this.$refs.share.open();
},
goToGoodsList(data) {
if (data.delFlag == -1) {
this.$commonJS.showToast("商品已下架");
@@ -698,19 +748,11 @@ export default {
},
//课程详情
async gotoDetail(v, videoIndex) {
console.log("v at line 668:", v);
// if (
// this.cateList[this.currentCateIndex].isBuy == 1 ||
// v.isAudition == 1 ||
// this.vip.type != "0"
// ) {
console.log("v at line 668:", v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&videoIndex=${videoIndex}`,
});
// } else {
// this.$commonJS.showToast("请先购买课程");
// }
});
},
handleClickSelectGoods(data) {
this.selectGoodsData = data;
@@ -2130,6 +2172,7 @@ export default {
}
}
}
.curseSet{margin-right: 10px;}
.shitingLIst {
background-color: #fff;
padding: 20rpx;