vip功能
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<template><page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<template>
|
||||
<view class="container commonPageBox commonDetailPage">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<template v-show="!screenLoading">
|
||||
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
|
||||
|
||||
|
||||
@@ -65,8 +65,6 @@
|
||||
<text class="courseTitle title">{{
|
||||
curriculumData.title
|
||||
}}</text>
|
||||
|
||||
<!-- <view class="start_learn_btn PM_font">进入学习</view> -->
|
||||
</view>
|
||||
<view style="color: #b0b0b0; padding: 0 20rpx">
|
||||
{{
|
||||
@@ -159,17 +157,11 @@
|
||||
slotProps.row.viewFlg == 1 ? 'aui-text-success' : ''
|
||||
}`">{{ slotProps.row.title }}</text>
|
||||
</view>
|
||||
|
||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||
</template>
|
||||
|
||||
<template slot="leftSlot" slot-scope="slotProps">
|
||||
<!-- {{ slotProps.row.bxType }} -->
|
||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||
</template>
|
||||
<template slot="rightSlot" slot-scope="slotProps">
|
||||
<!-- {{ slotProps.row.bxType }} -->
|
||||
|
||||
<text class="fdButtonBox aui-text-success" style="background: none"
|
||||
v-if="slotProps.row.isAudition == 1">试听</text>
|
||||
|
||||
@@ -178,26 +170,7 @@
|
||||
</courseDescription>
|
||||
</view>
|
||||
<view class="small_class_teaching_box">
|
||||
<!-- <view class="small_class_teaching_top">
|
||||
<view class="small_class_teaching_top_left">
|
||||
<image src="@/static/icon/course_ic.png" mode="aspectFil" class="icon1"></image>
|
||||
<text>小班教学</text>
|
||||
</view>
|
||||
<text>{{ curriculumInfo.remainingDays }}</text>
|
||||
|
||||
|
||||
</view> -->
|
||||
<view class="small_class_teaching_content">
|
||||
<!-- <view class="top">
|
||||
<view class="top_item" v-for="(v, i) in teachingList">
|
||||
{{ v.title }}
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view> -->
|
||||
|
||||
<view class="schedule">
|
||||
<view class="icon_box">
|
||||
<image src="@/static/icon/course_07.png" mode="aspectFil" class="icon1">学习进度
|
||||
@@ -224,15 +197,6 @@
|
||||
</view>
|
||||
</template>
|
||||
</common-anchor-link>
|
||||
|
||||
<!-- <u-modal
|
||||
:show="show"
|
||||
:title="modalInfo.title"
|
||||
:content="modalInfo.content"
|
||||
showCancelButton
|
||||
@confirm="hancleModalConfirm"
|
||||
@cancel="hancleModalCancel"
|
||||
></u-modal> -->
|
||||
<common-select-goods ref="commonSelectGoods" :selectGoodsData="selectGoodsData" :goodsList="goodsList"
|
||||
:buyOptions="buyOptions" :customButtonGroup1="customButtonGroup1" @selectGoods="handleClickSelectGoods"
|
||||
@onHandleClickBuy="
|
||||
@@ -297,24 +261,7 @@
|
||||
options: {},
|
||||
percentage: 0,
|
||||
selectGoodsData: {},
|
||||
buyOptions: [
|
||||
// {
|
||||
// icon: 'chat',
|
||||
// text: '客服'
|
||||
// },
|
||||
// {
|
||||
// icon: 'shop',
|
||||
// text: '店铺',
|
||||
// // info: 2,
|
||||
// infoBackgroundColor: '#007aff',
|
||||
// infoColor: "#f5f5f5"
|
||||
// },
|
||||
// {
|
||||
// icon: 'cart',
|
||||
// text: '购物车',
|
||||
// info: 2
|
||||
// }
|
||||
],
|
||||
buyOptions: [],
|
||||
customButtonGroup1: [{
|
||||
with: 200,
|
||||
text: "立即购买",
|
||||
@@ -391,24 +338,17 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
this.options = options;
|
||||
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
},
|
||||
onHide() {
|
||||
this.selectGoodsData = {};
|
||||
this.protocolShow = false;
|
||||
this.handleClickClose();
|
||||
this.$refs.commonSelectGoods.close();
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
onUnload() {
|
||||
this.selectGoodsData = {};
|
||||
this.protocolShow = false;
|
||||
this.$refs.commonSelectGoods.close();
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
@@ -420,11 +360,6 @@
|
||||
this.$nextTick(() => {
|
||||
this.getCourseDescriptionData();
|
||||
});
|
||||
|
||||
// 也可以通过主题形式调用,如:
|
||||
// this.$refs.uNotify.primary('Primary主题')
|
||||
// 关闭 notify
|
||||
// this.$refs.uNotify.close()
|
||||
},
|
||||
methods: {
|
||||
handleClickGetVip() {
|
||||
@@ -432,10 +367,9 @@
|
||||
url: "/pages/mine/vip/index",
|
||||
});
|
||||
},
|
||||
//获取vip信息数据
|
||||
getUserInfo() {
|
||||
console.log("111111111111111111111111111");
|
||||
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||
console.log(res, "111111111111111111111111111");
|
||||
if (res.result.userVip) {
|
||||
this.vip = res.result.userVip;
|
||||
} else {
|
||||
@@ -502,11 +436,6 @@
|
||||
this.$forceUpdate();
|
||||
},
|
||||
onHandleClickBuy(e) {
|
||||
console.log("e at line 387:", e);
|
||||
// if (e.index == 0) {
|
||||
// this.handleClickClose();
|
||||
// }
|
||||
// if (e.index == 0) {
|
||||
var mynavData = JSON.stringify({
|
||||
goods: [this.selectGoodsData],
|
||||
typeId: 0,
|
||||
@@ -517,7 +446,6 @@
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/order/index?data=${mynavData}`,
|
||||
});
|
||||
// }
|
||||
},
|
||||
handleClickGoBuy() {},
|
||||
handleClickClose() {
|
||||
@@ -528,11 +456,8 @@
|
||||
//获取相关关联课程商品
|
||||
//获取相关关联课程商品
|
||||
handleClickGetGoodsList(v) {
|
||||
// console.log("data at line 313:", data);
|
||||
|
||||
if (v.type == 0) {
|
||||
//免费
|
||||
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.startStudyForMF,
|
||||
@@ -541,25 +466,13 @@
|
||||
catalogueId: v.id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log("res at line 493:", res);
|
||||
if (res.code == 0) {
|
||||
this.getCourseDescriptionData();
|
||||
// this.$commonJS.showToast("");
|
||||
}
|
||||
// if (res.productList.length > 0) {
|
||||
// this.goodsList = res.productList;
|
||||
// this.selectGoodsData = this.goodsList[0];
|
||||
// this.$refs.commonSelectGoods.open();
|
||||
// this.show = true;
|
||||
// } else {
|
||||
// this.$commonJS.showToast("此课程暂无购买方式");
|
||||
// }
|
||||
|
||||
this.$forceUpdate();
|
||||
});
|
||||
} else {
|
||||
@@ -585,7 +498,6 @@
|
||||
id: v.id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
@@ -613,12 +525,6 @@
|
||||
...this.taiHuClassInfo,
|
||||
},
|
||||
};
|
||||
// $mars.progressBegin('申请中...');
|
||||
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
|
||||
// api.hideProgress();
|
||||
|
||||
// fnLoadDataGrid();
|
||||
// });
|
||||
},
|
||||
fnRelearn(oid, days, courseFee) {
|
||||
//99和199课程复读一个月60三个月120; 299和399课程复读一个月80三个月180
|
||||
@@ -654,33 +560,9 @@
|
||||
fee: fee,
|
||||
};
|
||||
this.show = true;
|
||||
// $aui.alert({
|
||||
// title: ,
|
||||
// content: '用户您好,该课程已到期,通过支付' + fee + '元,本门课程可获得' + days + '天延期学习时间,点击确认即完成自动扣费,感谢配合!',
|
||||
// buttons: ['取消', '确认'],
|
||||
// radius: 6,
|
||||
// titleColor: '#ff3300',
|
||||
// contColor: '#333',
|
||||
// btnColor: ''
|
||||
},
|
||||
//课程详情
|
||||
async gotoDetail(v, index) {
|
||||
console.log('v at line 664:', v)
|
||||
console.log(
|
||||
this.cateList[this.currentCateIndex],
|
||||
8888888888888888888888888
|
||||
);
|
||||
|
||||
// var result = await this.$commonJS.getCheckCourseStatus({
|
||||
// oid: v.courseOid,
|
||||
// });
|
||||
// console.log("result at line 364:", result);
|
||||
|
||||
// if (result.buyFlg == 0 && v.conditions != "01") {
|
||||
// this.$commonJS.showToast("请先购买课程");
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (
|
||||
this.cateList[this.currentCateIndex].isBuy == 1 ||
|
||||
v.isAudition == 1 ||
|
||||
@@ -688,7 +570,6 @@
|
||||
this.vip.type == "3"
|
||||
) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/curriculum/order/curriculum/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
|
||||
});
|
||||
} else {
|
||||
@@ -697,9 +578,7 @@
|
||||
},
|
||||
//相关课程
|
||||
goCourseDescription(v) {
|
||||
console.log(v);
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
|
||||
});
|
||||
},
|
||||
@@ -710,25 +589,17 @@
|
||||
await $http
|
||||
.request({
|
||||
url: this.urlList.curriculumInfo,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
method: "POST",
|
||||
data: {
|
||||
id: v.id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0 && res.chapterList.length > 0) {
|
||||
// res.chapterList.map((item) => {
|
||||
// item.tryListen = [];
|
||||
// });
|
||||
|
||||
list = JSON.parse(JSON.stringify(res.chapterList));
|
||||
|
||||
console.log("at line 1343:", list);
|
||||
// console.log('status', res)
|
||||
} else {
|
||||
list = [];
|
||||
}
|
||||
@@ -741,8 +612,6 @@
|
||||
getCourseDescriptionData() {
|
||||
var data = {};
|
||||
var that = this;
|
||||
console.log(this.$store.state, "11111111111");
|
||||
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.list,
|
||||
@@ -751,17 +620,12 @@
|
||||
id: this.options.id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
that.curriculumData = res.data.course;
|
||||
that.cateList = [...res.data.catalogues];
|
||||
|
||||
console.log("that.allDataList at line 1068:", that.allDataList);
|
||||
// this..getPercentage();
|
||||
|
||||
for (let i = 0; i < that.cateList.length; i++) {
|
||||
var list = await that.getChapterList(that.cateList[i]);
|
||||
|
||||
@@ -769,18 +633,12 @@
|
||||
...that.cateList[i],
|
||||
courseList: [...list],
|
||||
};
|
||||
// that.allDataList[i].courseList = [];
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
that.$refs.commonAnchorLink.getDistanceArr();
|
||||
}, 200);
|
||||
console.log("that.courseList at line 1238:", that.allDataList);
|
||||
this.$forceUpdate(); // that.relatedCoursesList = res.data.correlatedList
|
||||
// ? res.data.correlatedList
|
||||
// : [];
|
||||
// await that.handleselectCate(this.cateList[0], 0);
|
||||
// socket.init();
|
||||
this.$forceUpdate();
|
||||
});
|
||||
},
|
||||
getPriceData() {
|
||||
@@ -795,115 +653,12 @@
|
||||
checkDisable() {
|
||||
console.log("点击了");
|
||||
},
|
||||
// 显示无权限弹窗
|
||||
// showNoRights() {
|
||||
// let that = this
|
||||
// uni.showModal({
|
||||
// content: "",
|
||||
// confirmText: '好的',
|
||||
// showCancel: false,
|
||||
// success: function(res) {
|
||||
// if (res.confirm) {
|
||||
// // console.log('用户点击确定');
|
||||
// that.clear()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// // 获取用户详情
|
||||
// getUserInfo() {
|
||||
// // 用户详情
|
||||
// if (this.userInfo.id != undefined) {
|
||||
// this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
|
||||
// this.userMes = res.user;
|
||||
// this.getCateList();
|
||||
// console.log(this.userMes, "呼呼");
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
|
||||
async handleselectCate(item, index) {
|
||||
console.log("item at line 662:", item);
|
||||
console.log("index at line 637:", index);
|
||||
// this.description=`您还未购买当前【${item.title}】课程,`
|
||||
var title1 = "";
|
||||
this.currentCateIndex = index;
|
||||
switch (this.vip.type) {
|
||||
case 0:
|
||||
this.goBuyTitle = "购买VIP,即可免费观看吴门医述所有课程";
|
||||
this.goBuyType = 0;
|
||||
break;
|
||||
case 1 || 2:
|
||||
var vipName = "";
|
||||
if (this.vip.type == 1) {
|
||||
vipName = "超级VIP";
|
||||
}
|
||||
if (this.vip.type == 2) {
|
||||
vipName = "吴门医述VIP";
|
||||
}
|
||||
//超级VIP
|
||||
this.goBuyTitle = `尊贵的${vipName},您的有效期到 ${
|
||||
this.vip.endTime && this.vip.endTime.split(" ")[0]
|
||||
}`;
|
||||
this.goBuyType = 1;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
//众妙之门
|
||||
this.goBuyTitle =
|
||||
"尊贵的众妙之门VIP,升级至超级VIP,即可免费观看吴门医述所有课程";
|
||||
|
||||
this.goBuyType = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
// this.currentCateIndex = index;
|
||||
this.dataList = [];
|
||||
var data = [];
|
||||
console.log(item, index, 99999);
|
||||
var that = this;
|
||||
|
||||
// curriculumInfo
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.curriculumInfo,
|
||||
method: "POST",
|
||||
data: {
|
||||
id: item.id,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
|
||||
.then(async (res) => {
|
||||
// that.curriculumInfo = res.obj;
|
||||
// that.currentCateIndex = index;
|
||||
that.percentage = item.completion;
|
||||
that.dataList = res.chapterList;
|
||||
// that.getPercentage();
|
||||
that.$forceUpdate();
|
||||
|
||||
// socket.init();
|
||||
});
|
||||
|
||||
console.log(this.allDataList, this.dataList, "1688");
|
||||
|
||||
this.searchValue = "";
|
||||
this.searchList = [];
|
||||
this.showSearchList = false;
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
async setOneCateIndex(item, index) {
|
||||
this.allDataList = [];
|
||||
console.log(index, 99999);
|
||||
var that = this;
|
||||
|
||||
this.currentStatusIndex = index;
|
||||
// this.currentCateIndex = 0
|
||||
|
||||
this.searchValue = "";
|
||||
this.searchList = [];
|
||||
this.showSearchList = false;
|
||||
@@ -912,19 +667,6 @@
|
||||
|
||||
this.$forceUpdate();
|
||||
});
|
||||
|
||||
// this.handleselectCate(this.cateList[this.currentCateIndex])
|
||||
// if (index != 2) {
|
||||
|
||||
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
|
||||
// var height = rect.height
|
||||
// console.log('元素高度:',);
|
||||
|
||||
// }).exec();
|
||||
|
||||
// } else {
|
||||
// this.getJFList(dictType)
|
||||
// }
|
||||
},
|
||||
|
||||
transformData(inputData) {
|
||||
@@ -938,23 +680,8 @@
|
||||
}
|
||||
result[letter].push(item);
|
||||
});
|
||||
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
|
||||
return result;
|
||||
},
|
||||
|
||||
// 放大图片
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function(res) {
|
||||
// console.log(res,'+++++')
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
@@ -966,11 +693,6 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.u-grid-list {
|
||||
// height: 40rpx;
|
||||
}
|
||||
|
||||
.searchList {
|
||||
.item {
|
||||
font-size: 28rpx;
|
||||
|
||||
@@ -1,27 +1,9 @@
|
||||
<template><page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<template>
|
||||
<view
|
||||
class="container commonPageBox commonDetailPage"
|
||||
style="position: relative; height: auto"
|
||||
>
|
||||
<!-- <cover-view class="image_box">
|
||||
|
||||
|
||||
<image
|
||||
|
||||
src="http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170411123240222.png"
|
||||
mode="aspectFit"
|
||||
class="headImage"
|
||||
style="background-color: #f5f5f5"
|
||||
|
||||
>
|
||||
</image>
|
||||
|
||||
|
||||
|
||||
</cover-view> -->
|
||||
<video
|
||||
@timeupdate="videoTimeUpdateEvent($event)"
|
||||
ref="videos"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// importScripts('@/static/aliplayer/aliplayer-min.js')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
<template><page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<template>
|
||||
<view class="container commonPageBox commonDetailPage" style="position: relative;">
|
||||
<!-- <cover-view class="image_box">
|
||||
|
||||
|
||||
<image
|
||||
|
||||
src="http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170411123240222.png"
|
||||
mode="aspectFit"
|
||||
class="headImage"
|
||||
style="background-color: #f5f5f5"
|
||||
|
||||
>
|
||||
</image>
|
||||
|
||||
|
||||
|
||||
</cover-view> -->
|
||||
<video
|
||||
@fullscreenchange="fullscreenchange"
|
||||
@timeupdate="videoTimeUpdateEvent($event)"
|
||||
@@ -33,9 +14,6 @@
|
||||
:poster="`${videoUrl}?x-oss-process=video/snapshot,t_${1},f_jpg`"
|
||||
@play="playVideo"
|
||||
>
|
||||
<!-- <cover-image class="controls-play img" src="http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170411123240222.png"></cover-image>
|
||||
|
||||
-->
|
||||
</video>
|
||||
|
||||
</view>
|
||||
@@ -43,14 +21,11 @@
|
||||
|
||||
<script>
|
||||
import courseDescription from "@/pages/component/commonComponents/list";
|
||||
import price from "../price/index.vue";
|
||||
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
courseDescription, //课程说明
|
||||
price, //课程价格
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<template><page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<template>
|
||||
<view class="container" style="background-color: #000; position: relative">
|
||||
<u-icon
|
||||
@click="goBack"
|
||||
|
||||
Reference in New Issue
Block a user