课程指引+课程价格
This commit is contained in:
@@ -5,13 +5,13 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// baseUrl = "http://localhost:7001/";
|
// baseUrl = "http://localhost:7001/";
|
||||||
// socketUrl = "ws://localhost:6001/";
|
// socketUrl = "ws://localhost:6001/";
|
||||||
// baseUrl = "https://twin-ui.com/demo/";
|
// baseUrl = "https://twin-ui.com/demo/";
|
||||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||||
|
|
||||||
|
|
||||||
// baseUrl = "http://101.201.146.165:8088/App-EH/"; // 一路健康APP线上正式
|
// baseUrl = "http://101.201.146.165:8088/App-EH/"; // 一路健康APP线上正式
|
||||||
@@ -33,8 +33,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
|
|
||||||
// baseUrl = "http://192.168.110.110:9200/pb/"; //磊哥
|
// baseUrl = "http://192.168.110.110:9200/pb/"; //磊哥
|
||||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
baseUrl = "https://testapi.nuttyreading.com/";
|
||||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
// baseUrl = "https://api.nuttyreading.com/"; //1
|
||||||
// baseUrl = "ws://twin-ui.com:6001/";
|
// baseUrl = "ws://twin-ui.com:6001/";
|
||||||
// socketUrl = "ws://twin-ui.com:6001/";
|
// socketUrl = "ws://twin-ui.com:6001/";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,15 +50,15 @@
|
|||||||
|
|
||||||
<view :class="`dataList priceDetail`" v-else>
|
<view :class="`dataList priceDetail`" v-else>
|
||||||
|
|
||||||
<image src="@/static/image/headImg/top.png" mode="aspectFit" class="headImage"></image>
|
<!-- <image src="@/static/image/headImg/top.png" mode="aspectFit" class="headImage"></image> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view v-if="this.cateList[this.currentCateIndex].type == 'courseDescription'"
|
<view v-if="this.cateList[this.currentCateIndex].type == 'courseDescription'"
|
||||||
style="height: calc(100% - 300rpx);">
|
>
|
||||||
|
|
||||||
<courseDescription :dataList="dataList" @hancleClick="goCourseDescription" label="nameCN">
|
<courseDescription ref="courseDescription" :dataList="dataList" @hancleClick="goCourseDescription" label="nameCN">
|
||||||
</courseDescription>
|
</courseDescription>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import courseDescription from "@/pages/component/commonComponents/list";
|
import courseDescription from "../price/courseDescription.vue";
|
||||||
import price from "../price/index.vue";
|
import price from "../price/index.vue";
|
||||||
import purchaseNotice from "../purchaseNotice/index.vue";
|
import purchaseNotice from "../purchaseNotice/index.vue";
|
||||||
import instructionsForUse from "../instructionsForUse/index.vue";
|
import instructionsForUse from "../instructionsForUse/index.vue";
|
||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
playData: {},
|
playData: {},
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
cateList: [{
|
cateList: [{
|
||||||
title: "课程价格",
|
title: "课程价格(半年/一年)",
|
||||||
type: 'price',
|
type: 'price',
|
||||||
oid: '8a9fb99809e4428888aad6b56a3096a6',
|
oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||||
}, {
|
}, {
|
||||||
@@ -402,7 +402,11 @@ export default {
|
|||||||
var that = this
|
var that = this
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case 'courseDescription':
|
case 'courseDescription':
|
||||||
that.getCourseDescriptionData()
|
setTimeout(() => {
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.courseDescription.getData()
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'price':
|
case 'price':
|
||||||
@@ -675,16 +679,17 @@ export default {
|
|||||||
text {
|
text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 32%;
|
width: 49%;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
border-radius: 10rpx;
|
// border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
background-color: #3AB3AE;
|
// background-color: #3AB3AE;
|
||||||
color: #fff;
|
color: rgb(58, 179, 174);
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
border-bottom: 2px solid rgb(58, 179, 174);
|
||||||
|
// box-shadow: 0 2px 12px 0 rgba(58, 179, 174, .5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -699,6 +704,7 @@ export default {
|
|||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
color: #3AB3AE;
|
color: #3AB3AE;
|
||||||
|
font-weight: 600 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .u-grid-list{border: 0.5px solid #dadbde;}
|
// .u-grid-list{border: 0.5px solid #dadbde;}
|
||||||
|
|||||||
@@ -1,622 +1,394 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="instructionsForUseBox">
|
<view class="componentPage">
|
||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<image src="@/static/image/headImg/top.png" mode="aspectFit" class="headImage"></image>
|
|
||||||
|
|
||||||
<!-- <scroll-view class="scroll-view_H cateList" scroll-x="true" scroll-left="0"> -->
|
|
||||||
<view class="cateList flexbox">
|
|
||||||
<common-sticky itemStyle="width:50%;padding-left: 15px; padding-right: 15px; height: 68rpx;" :list="cateList" label="title" :currentCateIndex="currentCateIndex" @handleselectCate="setOneCateIndex"></common-sticky>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<view class="fixed">
|
||||||
<view :class="`instructionsForUse`"
|
<block v-for="(v, index) in cateIconList" :key="index">
|
||||||
>
|
<view :class="`bg${index} PM_font rightButton`" :data-index="index" @click="getViewId"
|
||||||
|
>{{ v.title }}</view
|
||||||
<scroll-view scroll-y="true" class="scroll-Y">
|
>
|
||||||
<rich-text :nodes="detailInfo.guide" v-if="currentCateIndex==0"></rich-text>
|
</block>
|
||||||
<rich-text :nodes="detailInfo.supervip" v-if="currentCateIndex==1"></rich-text>
|
|
||||||
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<z-navigation></z-navigation>
|
|
||||||
</view>
|
</view>
|
||||||
|
<scroll-view
|
||||||
|
scroll-y
|
||||||
|
class="scroll"
|
||||||
|
:scroll-into-view="viewid"
|
||||||
|
scroll-with-animation
|
||||||
|
>
|
||||||
|
<block v-for="(v, index) in cateIconList" :key="index">
|
||||||
|
|
||||||
|
|
||||||
|
<view :id="`cont${index}`" :class="`bg${index}`">
|
||||||
|
|
||||||
|
<view class="cate_item_box">
|
||||||
|
<view class="cate_item_border">
|
||||||
|
<image
|
||||||
|
:src="
|
||||||
|
cateIconList.find((e) => v.title == e.title)
|
||||||
|
.imgUrl
|
||||||
|
"
|
||||||
|
mode="aspectFill"
|
||||||
|
:style="
|
||||||
|
cateIconList.find((e) => v.title == e.title)
|
||||||
|
.style
|
||||||
|
"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view class="cate_item_name">{{ v.title }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- <richDetail :detailInfo="detailInfo">
|
||||||
|
|
||||||
|
<template #richHeadImg>
|
||||||
|
<image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</richDetail>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- <view>{{ detailInfo.content }}</view> -->
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import courseDescription from "@/pages/component/commonComponents/list";
|
||||||
import $http from '@/config/requestConfig.js';
|
import richDetail from "@/pages/component/commonComponents/richDetail.vue";
|
||||||
import {
|
import $http from "@/config/requestConfig.js";
|
||||||
mapState
|
import { mapState } from "vuex";
|
||||||
} from 'vuex';
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
props: ["type", "oid"],
|
||||||
|
components: {
|
||||||
|
courseDescription, //课程说明
|
||||||
|
richDetail,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewid: "",
|
||||||
|
cateIconList: [
|
||||||
|
{
|
||||||
|
title: "儒",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_ru.png"),
|
||||||
|
style: {
|
||||||
|
width: "62rpx",
|
||||||
|
height: "56rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "释",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_shi.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "49rpx",
|
||||||
|
height: "61rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "道",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_dao.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "59rpx",
|
||||||
|
height: "59rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "医",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_yi.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "61rpx",
|
||||||
|
height: "61rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "美",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_mei.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "59rpx",
|
||||||
|
height: "59rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "文",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_wen.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "61rpx",
|
||||||
|
height: "60rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options: {},
|
||||||
|
detailInfo: {},
|
||||||
|
playData: {},
|
||||||
|
searchValue: "",
|
||||||
|
|
||||||
|
twoCateList: [], // 二级分类标题
|
||||||
|
dataList: [{}, {}], // 方剂标题
|
||||||
|
currentCateIndex: 0, // 当前选中的一级分类
|
||||||
|
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||||
|
searchList: [], // 搜索结果数组
|
||||||
|
showSearchList: false,
|
||||||
|
userMes: {}, // 用户信息
|
||||||
|
searchDisable: false, // 搜索不可用
|
||||||
|
limitShow: false,
|
||||||
|
limitTitle: "提示",
|
||||||
|
limitContent: "",
|
||||||
|
scrollViewHeight: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.options = options;
|
||||||
|
// this.getData()
|
||||||
|
// this.getUserInfo()
|
||||||
|
// this.getCateList()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// this.getData()
|
||||||
|
// this.getUserInfo()
|
||||||
|
// this.getCateList()
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
// this.showSearchList = false
|
||||||
|
// this.searchList = []
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["userInfo"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getViewId(e) {
|
||||||
|
console.log('e at line 88:', e)
|
||||||
|
this.viewid = "cont" + e.currentTarget.dataset.index;
|
||||||
},
|
},
|
||||||
data() {
|
goCourseDescription(v) {
|
||||||
return {
|
uni.navigateTo({
|
||||||
|
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||||
detailInfo: {},
|
url: `/pages/courseInformation/courseDescription/detail?title=${v.nameCN}&oid=${v.oid}`,
|
||||||
playData: {},
|
});
|
||||||
searchValue: '',
|
|
||||||
cateList: [
|
|
||||||
{
|
|
||||||
title: "使用须知",
|
|
||||||
type: 'instructionsForUse',
|
|
||||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "超级VIP",
|
|
||||||
type: 'vip',
|
|
||||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
], // 一级分类标题1
|
|
||||||
twoCateList: [], // 二级分类标题
|
|
||||||
dataList: [{}, {}], // 方剂标题
|
|
||||||
currentCateIndex: 0, // 当前选中的一级分类
|
|
||||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
|
||||||
searchList: [], // 搜索结果数组
|
|
||||||
showSearchList: false,
|
|
||||||
userMes: {}, // 用户信息
|
|
||||||
searchDisable: false, // 搜索不可用
|
|
||||||
limitShow: false,
|
|
||||||
limitTitle: '提示',
|
|
||||||
limitContent: '',
|
|
||||||
scrollViewHeight: 0,
|
|
||||||
urlList:{
|
|
||||||
instructionsForUse:'app/phone.do?getMembershipGuide',
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
getData() {
|
||||||
this.getCourseDescriptionData()
|
console.log(this.$store.state, "88888");
|
||||||
// this.getUserInfo()
|
this.$http
|
||||||
// this.getCateList()
|
.post("app/phoneDoctor.do?getTHTSDetail", {
|
||||||
|
customerType: "D",
|
||||||
|
token: uni.getStorageSync("token"),
|
||||||
|
customerOid: uni.getStorageSync("customerOid"),
|
||||||
|
// oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||||
|
oid: this.oid,
|
||||||
|
|
||||||
},
|
step: 0,
|
||||||
onHide() {
|
limit: 100,
|
||||||
// this.showSearchList = false
|
})
|
||||||
// this.searchList = []
|
.then((res) => {
|
||||||
},
|
console.log(res.obj.dataLst, "7777777777777777777");
|
||||||
computed: {
|
this.detailInfo = res.obj;
|
||||||
...mapState(['userInfo']),
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goCourseDescription(v) {
|
|
||||||
console.log(v)
|
|
||||||
uni.navigateTo({
|
|
||||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
|
||||||
url: `/pages/courseInformation/courseDescription/index?navTitle=${v.nameCN}&title=${v.nameCN}&oid=${v.oid}`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getData() {
|
|
||||||
console.log(this.$store.state, '11111111111')
|
|
||||||
this.$http
|
|
||||||
.post(this.urlList.instructionsForUse, {
|
|
||||||
customerType
|
|
||||||
:
|
|
||||||
"D",
|
|
||||||
token
|
|
||||||
:uni.getStorageSync("token")
|
|
||||||
,
|
|
||||||
customerOid
|
|
||||||
:uni.getStorageSync("customerOid"),
|
|
||||||
oid: 'b07e45f6a5f3491db9854b16f3fd8b19',
|
|
||||||
|
|
||||||
|
// socket.init();
|
||||||
step: 0,
|
});
|
||||||
limit: 100
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
|
|
||||||
this.detailInfo = res.obj
|
|
||||||
|
|
||||||
// socket.init();
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getPriceData() {
|
|
||||||
var that = this;
|
|
||||||
setTimeout(() => {
|
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.priceDetail.getData()
|
|
||||||
})
|
|
||||||
}, 100)
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
// 检查是有权限使用搜索功能
|
|
||||||
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, '呼呼')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 详情
|
|
||||||
gotoDetail(item) {
|
|
||||||
console.log('111', item)
|
|
||||||
console.log('this.currentCateIndex', this.currentCateIndex)
|
|
||||||
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
|
|
||||||
if (this.currentCateIndex == 0) {
|
|
||||||
uni.navigateTo({
|
|
||||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
|
||||||
url: './xueshugongxianDetail?id=' + item.id
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.currentCateIndex == 1) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "./medicaldesDetail?id=" + item.id
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.currentCateIndex == 2) {
|
|
||||||
console.log('111', item)
|
|
||||||
uni.navigateTo({
|
|
||||||
url: './video?title=' + item.name + '&src=' + item.url
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.currentCateIndex == 3) {
|
|
||||||
console.log('111', item)
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "./recordDetail?id=" + item.id
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 获取名称
|
|
||||||
getTitles(dictType) {
|
|
||||||
console.log('dictType', dictType)
|
|
||||||
if (this.currentCateIndex == 0) {
|
|
||||||
if (dictType == 2) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: './zhuanzhuchuban'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
$http.request({
|
|
||||||
url: "book/generalArticle/articleByPage",
|
|
||||||
method: "POST",
|
|
||||||
data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
"type": dictType == 1 ? '1' : '2',
|
|
||||||
"limit": 1000,
|
|
||||||
"current": 1,
|
|
||||||
},
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res, '内容获取成功')
|
|
||||||
if (res.code == 0 && res.result && res.result.records.length > 0) {
|
|
||||||
this.dataList = res.result.records
|
|
||||||
} else {
|
|
||||||
this.dataList = []
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
this.dataList = []
|
|
||||||
console.log(e)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.currentCateIndex == 1) {
|
|
||||||
$http.request({
|
|
||||||
url: "book/medicaldes/inheritListByPage",
|
|
||||||
method: "POST",
|
|
||||||
data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
'dictType': dictType,
|
|
||||||
"limit": 1000,
|
|
||||||
"current": 1
|
|
||||||
},
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res, '内容获取成功')
|
|
||||||
if (res.code == 0 && res.result.records.length > 0) {
|
|
||||||
this.dataList = res.result.records
|
|
||||||
for (let i = 0; i < this.dataList.length; i++) {
|
|
||||||
this.dataList[i].imageslist = [];
|
|
||||||
this.dataList[i].imageslist = this.dataList[i].img.split(";");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.dataList = []
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
this.dataList = []
|
|
||||||
console.log(e)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.currentCateIndex == 2) {
|
|
||||||
$http.request({
|
|
||||||
url: "book/medicaldes/lightListByType?type=" + dictType,
|
|
||||||
method: "POST",
|
|
||||||
data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
"limit": 1000,
|
|
||||||
"page": 1,
|
|
||||||
},
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res, '内容获取成功')
|
|
||||||
if (res.code == 0 && res.result.length > 0) {
|
|
||||||
this.dataList = res.result
|
|
||||||
} else {
|
|
||||||
this.dataList = []
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
this.dataList = []
|
|
||||||
console.log(e)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.currentCateIndex == 3) {
|
|
||||||
$http.request({
|
|
||||||
url: "book/medicaldes/recordByType?type=" + dictType,
|
|
||||||
method: "POST",
|
|
||||||
data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
"limit": 1000,
|
|
||||||
"page": 1,
|
|
||||||
},
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res, '内容获取成功')
|
|
||||||
if (res.code == 0 && res.result.length > 0) {
|
|
||||||
this.dataList = res.result
|
|
||||||
} else {
|
|
||||||
this.dataList = []
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
this.dataList = []
|
|
||||||
console.log(e)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
setTwoCateIndex(item, index) {
|
|
||||||
let dictType = item.dictType
|
|
||||||
this.curTwoCateIndex = index
|
|
||||||
this.getTitles(dictType)
|
|
||||||
},
|
|
||||||
async setOneCateIndex(e) {
|
|
||||||
|
|
||||||
var that = this
|
|
||||||
switch (e.type) {
|
|
||||||
case 'courseDescription':
|
|
||||||
that.getCourseDescriptionData()
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'price':
|
|
||||||
setTimeout(() => {
|
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.priceDetail.getData()
|
|
||||||
})
|
|
||||||
}, 100)
|
|
||||||
break;
|
|
||||||
case 'instructionsForUse':
|
|
||||||
setTimeout(() => {
|
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.instructionsForUse.getData()
|
|
||||||
})
|
|
||||||
}, 100)
|
|
||||||
// that.getPriceData()
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// if(this.userMes.tgdzPower == 0){
|
|
||||||
// let that = this
|
|
||||||
// uni.showModal({
|
|
||||||
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
|
|
||||||
// confirmText: '好的',
|
|
||||||
// showCancel: false,
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// // console.log('用户点击确定');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// if(item.title == "时辰取穴"){
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: "../timeAcupoint/timeAcupoint"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
let type = e.type
|
|
||||||
this.currentCateIndex = e.index
|
|
||||||
|
|
||||||
this.searchValue = ''
|
|
||||||
this.searchList = []
|
|
||||||
this.showSearchList = false
|
|
||||||
// if (index != 2) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// uni.createSelectorQuery().select('.cateList').boundingClientRect(function (rect) {
|
|
||||||
// var height = rect.height
|
|
||||||
// console.log('元素高度:',);
|
|
||||||
|
|
||||||
// }).exec();
|
|
||||||
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// this.getJFList(dictType)
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
|
|
||||||
transformData(inputData) {
|
|
||||||
const result = {};
|
|
||||||
inputData.forEach(item => {
|
|
||||||
const {
|
|
||||||
letter
|
|
||||||
} = item;
|
|
||||||
if (!result[letter]) {
|
|
||||||
result[letter] = [];
|
|
||||||
}
|
|
||||||
result[letter].push(item);
|
|
||||||
});
|
|
||||||
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
// getJFList(id) {
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/prescriptListForJF",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'categoryId': id
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// if (res.code == 0 && res.list.length > 0) {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.dataList = this.transformData(res.list)
|
|
||||||
// console.log('JF经方', this.dataList)
|
|
||||||
// } else {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.dataList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.dataList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
getCateList(id) {
|
|
||||||
id ? '' : id = 0
|
|
||||||
this.twoCateList = []
|
|
||||||
this.curTwoCateIndex = 0
|
|
||||||
// 0为获取顶级分类,其他为搜索下级分类,目前的逻辑,顶级是写死的,所以可能只会涉及到搜索第二级
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/prescriptCategoryList",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'categoryId': id
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '脉穴分类获取成功')
|
|
||||||
// if (res.code == 0 && res.list.length > 0) {
|
|
||||||
// this.cateList = res.list
|
|
||||||
this.getTowCateList(this.cateList[0].type)
|
|
||||||
// } else {
|
|
||||||
// this.cateList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// this.cateList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 放大图片
|
|
||||||
previewImage(url) {
|
|
||||||
console.log(url)
|
|
||||||
uni.previewImage({
|
|
||||||
urls: [url],
|
|
||||||
longPressActions: {
|
|
||||||
itemList: ['很抱歉,暂不支持保存图片到本地'],
|
|
||||||
success: function (res) {
|
|
||||||
// console.log(res,'+++++')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// getSearch() {
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/searchPrescript",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'keywords': this.searchValue,
|
|
||||||
// type: this.currentCateIndex + 1
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '搜索结果')
|
|
||||||
// if (res.code == 0 && res.list.length >= 0) {
|
|
||||||
// this.showSearchList = true
|
|
||||||
// this.searchList = res.list
|
|
||||||
// } else {
|
|
||||||
// this.searchList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// // this.dataList = []
|
|
||||||
// this.searchList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// search(res) {
|
|
||||||
// console.log(res, 'res')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: '搜索:' + res,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// if (res == '') {
|
|
||||||
// this.showSearchList = false
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// },
|
|
||||||
// input(res) {
|
|
||||||
// console.log('----input:', res)
|
|
||||||
// if (res == '') {
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// clear(res) {
|
|
||||||
// console.log('----clear:', res)
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'clear事件,清除值为:',
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// this.searchValue = ''
|
|
||||||
// this.showSearchList = false
|
|
||||||
// },
|
|
||||||
// blur(res) {
|
|
||||||
// // console.log('----blur:', res)
|
|
||||||
// // if (res == '') {
|
|
||||||
// // this.showSearchList = false
|
|
||||||
// // this.searchList = []
|
|
||||||
// // } else {
|
|
||||||
// // this.getSearch()
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
// focus(e) {
|
|
||||||
// console.log('----focus:')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'focus事件,输出值为:' + e.value,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// // 等于1 就是有权限
|
|
||||||
// // this.showSearchList = true
|
|
||||||
|
|
||||||
// },
|
|
||||||
// cancel(res) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '点击取消,输入值为:' + res.value,
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
onBackPress() {
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
plus.key.hideSoftKeybord();
|
|
||||||
// #endif
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
// 放大图片
|
||||||
|
previewImage(url) {
|
||||||
|
console.log(url);
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url],
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||||
|
success: function (res) {
|
||||||
|
// console.log(res,'+++++')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// getSearch() {
|
||||||
|
// $http.request({
|
||||||
|
// url: "book/prescript/searchPrescript",
|
||||||
|
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
// data: {
|
||||||
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
|
// 'keywords': this.searchValue,
|
||||||
|
// type: this.currentCateIndex + 1
|
||||||
|
// },
|
||||||
|
// header: { //默认 无 说明:请求头
|
||||||
|
// 'Content-Type': 'application/json'
|
||||||
|
// },
|
||||||
|
// }).then(res => {
|
||||||
|
// console.log(res, '搜索结果')
|
||||||
|
// if (res.code == 0 && res.list.length >= 0) {
|
||||||
|
// this.showSearchList = true
|
||||||
|
// this.searchList = res.list
|
||||||
|
// } else {
|
||||||
|
// this.searchList = []
|
||||||
|
// }
|
||||||
|
// }).catch(e => {
|
||||||
|
// // this.dataList = []
|
||||||
|
// this.searchList = []
|
||||||
|
// console.log(e)
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// search(res) {
|
||||||
|
// console.log(res, 'res')
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: '搜索:' + res,
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// if (res == '') {
|
||||||
|
// this.showSearchList = false
|
||||||
|
// this.searchList = []
|
||||||
|
// } else {
|
||||||
|
// this.getSearch()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// },
|
||||||
|
// input(res) {
|
||||||
|
// console.log('----input:', res)
|
||||||
|
// if (res == '') {
|
||||||
|
// this.searchList = []
|
||||||
|
// } else {
|
||||||
|
// this.getSearch()
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// clear(res) {
|
||||||
|
// console.log('----clear:', res)
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: 'clear事件,清除值为:',
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// this.searchValue = ''
|
||||||
|
// this.showSearchList = false
|
||||||
|
// },
|
||||||
|
// blur(res) {
|
||||||
|
// // console.log('----blur:', res)
|
||||||
|
// // if (res == '') {
|
||||||
|
// // this.showSearchList = false
|
||||||
|
// // this.searchList = []
|
||||||
|
// // } else {
|
||||||
|
// // this.getSearch()
|
||||||
|
// // }
|
||||||
|
// },
|
||||||
|
// focus(e) {
|
||||||
|
// console.log('----focus:')
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: 'focus事件,输出值为:' + e.value,
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// // 等于1 就是有权限
|
||||||
|
// // this.showSearchList = true
|
||||||
|
|
||||||
|
// },
|
||||||
|
// cancel(res) {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '点击取消,输入值为:' + res.value,
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.key.hideSoftKeybord();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.headImage {
|
.commonPageBox {
|
||||||
width: 100%;
|
padding: 40rpx 0;
|
||||||
height: 300rpx;
|
|
||||||
// margin-bottom: 20rpx;
|
|
||||||
}
|
}
|
||||||
|
.contentBox {
|
||||||
|
.headImage {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.scroll-Y {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
.scroll-view_H {
|
.detail_title {
|
||||||
white-space: nowrap;
|
padding: 0 20rpx !important;
|
||||||
width: 100%;
|
}
|
||||||
}
|
.rich_box {
|
||||||
|
padding: 20rpx;
|
||||||
.scroll-view-item {
|
|
||||||
// height: 300rpx;
|
|
||||||
// line-height: 300rpx;
|
|
||||||
// text-align: center;
|
|
||||||
// font-size: 36rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-view-item_H {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
// height: 300rpx;
|
|
||||||
// line-height: 300rpx;
|
|
||||||
// text-align: center;
|
|
||||||
// font-size: 36rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataList {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleList2 {
|
|
||||||
height: calc(100% - 170rpx);
|
|
||||||
}
|
|
||||||
|
|
||||||
.instructionsForUse {
|
|
||||||
height: calc(100% - 380rpx);
|
|
||||||
padding: 30rpx 30rpx 0;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
p {
|
||||||
|
display: block;
|
||||||
|
text-indent: 2em;
|
||||||
|
letter-spacing: 2px !important;
|
||||||
|
line-height: 46rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cateList {
|
.fixed {
|
||||||
|
border: 3rpx solid #eee;
|
||||||
|
width: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 10%;
|
||||||
|
right: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed view {
|
||||||
|
width: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll view {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 1000rpx;
|
||||||
|
}.rightButton{
|
||||||
|
font-size: 48rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #3ab3ae;
|
||||||
|
}
|
||||||
|
.cate_item_box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 15rpx;
|
height: auto;
|
||||||
}
|
display: flex;
|
||||||
.instructionsForUseBox{
|
align-items: center;
|
||||||
height: calc(100%);
|
background-color: #3ab3ae; padding: 0 20rpx;
|
||||||
}
|
.cate_item_border {
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
|
width: 60rpx;
|
||||||
|
height: 78rpx;
|
||||||
|
// padding: 10rpx;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
// background-image: url("@/static/icon/homePage/cate_bg.png");
|
||||||
|
border-radius: 4rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
// height: 56rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cate_item_name {
|
||||||
|
margin-left: 21rpx;
|
||||||
|
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||||
|
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 42rpx;
|
||||||
|
color: #000000;
|
||||||
|
// line-height: 46rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
513
pages/courseInformation/price/courseDescription.vue
Normal file
513
pages/courseInformation/price/courseDescription.vue
Normal file
@@ -0,0 +1,513 @@
|
|||||||
|
<template>
|
||||||
|
<view class="componentPage">
|
||||||
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
|
||||||
|
<view class="fixed">
|
||||||
|
<view v-if="isOpenRightButton">
|
||||||
|
<view class="openBox">
|
||||||
|
<block v-for="(v, index) in cateIconList" :key="index">
|
||||||
|
<view
|
||||||
|
:class="`bg${index} PM_font rightButton ${
|
||||||
|
viewid == 'cont' + index ? 'hotButton' : ''
|
||||||
|
}`"
|
||||||
|
:data-index="index"
|
||||||
|
@click="getViewId"
|
||||||
|
>{{ v.title }}</view
|
||||||
|
>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
@click="close"
|
||||||
|
class="closeBox"
|
||||||
|
style="background-color: #fff; margin-top: 20rpx; width: 100%"
|
||||||
|
>
|
||||||
|
<image src="@/static/icon/close.png" mode="widthFix"></image
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
<view class="closeBox" v-else @click="isOpenRightButton = true">
|
||||||
|
<image src="@/static/icon/open.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view
|
||||||
|
scroll-y
|
||||||
|
class="scroll"
|
||||||
|
:scroll-into-view="viewid"
|
||||||
|
scroll-with-animation
|
||||||
|
@scroll="scrollEvt"
|
||||||
|
>
|
||||||
|
<view v-for="(v, index) in cateIconList" :key="index" class="right-item">
|
||||||
|
<view :id="`cont${index}`" :class="`bg${index} `">
|
||||||
|
<view class="cate_item_box">
|
||||||
|
<!-- <view class="cate_item_border">
|
||||||
|
<image
|
||||||
|
:src="
|
||||||
|
cateIconList.find((e) => v.title == e.title)
|
||||||
|
.imgUrl
|
||||||
|
"
|
||||||
|
mode="aspectFill"
|
||||||
|
:style="
|
||||||
|
cateIconList.find((e) => v.title == e.title)
|
||||||
|
.style
|
||||||
|
"
|
||||||
|
></image>
|
||||||
|
</view> -->
|
||||||
|
<view
|
||||||
|
:class="`cate_item_name ${viewid == 'cont' + index ? 'hot' : ''}`"
|
||||||
|
>{{ v.title }}</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<richDetail :detailInfo="{ content: detailInfo[v.valueName] }">
|
||||||
|
<template #richHeadImg>
|
||||||
|
<!-- <image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image> -->
|
||||||
|
</template>
|
||||||
|
</richDetail>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- <richDetail :detailInfo="detailInfo">
|
||||||
|
|
||||||
|
<template #richHeadImg>
|
||||||
|
<image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</richDetail>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- <view>{{ detailInfo.content }}</view> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import courseDescription from "@/pages/component/commonComponents/list";
|
||||||
|
import richDetail from "@/pages/component/commonComponents/richDetail.vue";
|
||||||
|
import $http from "@/config/requestConfig.js";
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
export default {
|
||||||
|
props: ["type", "oid"],
|
||||||
|
components: {
|
||||||
|
courseDescription, //课程说明
|
||||||
|
richDetail,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
timer: null,
|
||||||
|
isLeftClick: false,
|
||||||
|
isOpenRightButton: true,
|
||||||
|
viewid: "cont0",
|
||||||
|
viewidIndex: 0,
|
||||||
|
cateIconList: [
|
||||||
|
{
|
||||||
|
title: "购买须知",
|
||||||
|
valueName: "buyRecord",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
// imgUrl: require("@/static/icon/homePage/cate_ru.png"),
|
||||||
|
// style: {
|
||||||
|
// width: "62rpx",
|
||||||
|
// height: "56rpx",
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "使用须知",
|
||||||
|
valueName: "useRecord",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
// imgUrl: require("@/static/icon/homePage/cate_shi.png"),
|
||||||
|
|
||||||
|
// style: {
|
||||||
|
// width: "49rpx",
|
||||||
|
// height: "61rpx",
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "学习次序",
|
||||||
|
valueName: "studyRecord",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
// imgUrl: require("@/static/icon/homePage/cate_dao.png"),
|
||||||
|
|
||||||
|
// style: {
|
||||||
|
// width: "59rpx",
|
||||||
|
// height: "59rpx",
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "超 v",
|
||||||
|
valueName: "vipRecord",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
// imgUrl: require("@/static/icon/homePage/cate_yi.png"),
|
||||||
|
|
||||||
|
// style: {
|
||||||
|
// width: "61rpx",
|
||||||
|
// height: "61rpx",
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options: {},
|
||||||
|
detailInfo: {},
|
||||||
|
playData: {},
|
||||||
|
searchValue: "",
|
||||||
|
|
||||||
|
distanceList: [], // 二级分类标题
|
||||||
|
twoCateList: [], // 二级分类标题
|
||||||
|
dataList: [{}, {}], // 方剂标题
|
||||||
|
currentCateIndex: 0, // 当前选中的一级分类
|
||||||
|
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||||
|
searchList: [], // 搜索结果数组
|
||||||
|
showSearchList: false,
|
||||||
|
userMes: {}, // 用户信息
|
||||||
|
searchDisable: false, // 搜索不可用
|
||||||
|
limitShow: false,
|
||||||
|
limitTitle: "提示",
|
||||||
|
limitContent: "",
|
||||||
|
scrollViewHeight: 0,
|
||||||
|
urlList: {
|
||||||
|
list: "/sociology/course/getSociologyCourseRecord",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
|
// this.getUserInfo()
|
||||||
|
// this.getCateList()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.viewid = "cont0";
|
||||||
|
this.viewidIndex = 0;
|
||||||
|
this.getData();
|
||||||
|
|
||||||
|
// this.getData()
|
||||||
|
// this.getUserInfo()
|
||||||
|
// this.getCateList()
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
// this.showSearchList = false
|
||||||
|
// this.searchList = []
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["userInfo"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.isOpenRightButton = false;
|
||||||
|
},
|
||||||
|
getDistanceToTop() {
|
||||||
|
//获取右侧各部分距离顶部的距离
|
||||||
|
let that = this;
|
||||||
|
that.distanceList = [];
|
||||||
|
let selectorQuery = uni.createSelectorQuery().in(this);
|
||||||
|
const query = uni.createSelectorQuery().in(this);
|
||||||
|
query
|
||||||
|
.selectAll(".right-item")
|
||||||
|
.boundingClientRect((data) => {
|
||||||
|
data.forEach(function (rect) {
|
||||||
|
that.distanceList.push(rect.top);
|
||||||
|
});
|
||||||
|
console.log("data at line 180:", data);
|
||||||
|
// this.h = data.top+69
|
||||||
|
})
|
||||||
|
.exec();
|
||||||
|
|
||||||
|
// selectorQuery
|
||||||
|
// .selectAll(".right-item")
|
||||||
|
// .boundingClientRect(function (rects) {
|
||||||
|
// console.log("rects at line 182:", rects);
|
||||||
|
// rects.forEach(function (rect) {
|
||||||
|
// that.distanceList.push(rect.top);
|
||||||
|
// });
|
||||||
|
// console.log("that.distanceList", that.distanceList);
|
||||||
|
// })
|
||||||
|
// .exec();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 元素滚动到顶部时,对应的左侧导航栏变为选中状态
|
||||||
|
scrollEvt(e) {
|
||||||
|
console.log("e at line 204:", e);
|
||||||
|
// 点击左侧导航栏引起的滚动不做判断
|
||||||
|
// if(this.isLeftClick){
|
||||||
|
// this.isLeftClick = false
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// // 防抖
|
||||||
|
if (this.timer) {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
}
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
let scrollTop = e.detail.scrollTop; //滚动的高度
|
||||||
|
// 找到位于顶部元素的索引,距离大于滚动高度的第一个元素的上一个元素就是此时位于顶部的元素
|
||||||
|
let index = this.distanceList.findIndex((it) => {
|
||||||
|
// 滚动条的位置大于元素距离顶部位置的距离时,说明元素已经滑过了顶部
|
||||||
|
return it > scrollTop;
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("index at line 218:", index);
|
||||||
|
if (index == this.viewidIndex) return;
|
||||||
|
this.viewidIndex = index;
|
||||||
|
this.viewid = "cont" + index;
|
||||||
|
}, 100);
|
||||||
|
},
|
||||||
|
|
||||||
|
getViewId(e) {
|
||||||
|
this.isLeftClick = true;
|
||||||
|
|
||||||
|
console.log("e at line 88:", e);
|
||||||
|
this.viewid = "cont" + e.currentTarget.dataset.index;
|
||||||
|
this.viewidIndex = e.currentTarget.dataset.index;
|
||||||
|
},
|
||||||
|
goCourseDescription(v) {
|
||||||
|
uni.navigateTo({
|
||||||
|
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||||
|
url: `/pages/courseInformation/courseDescription/detail?title=${v.nameCN}&oid=${v.oid}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getData() {
|
||||||
|
console.log(this.$store.state, "88888");
|
||||||
|
this.$http
|
||||||
|
.request({
|
||||||
|
url: this.urlList.list,
|
||||||
|
method: "POST",
|
||||||
|
data: {},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
console.log("res at line 178:", res);
|
||||||
|
|
||||||
|
this.detailInfo = res.result;
|
||||||
|
await setTimeout(() => {
|
||||||
|
this.getDistanceToTop();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
// socket.init();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 放大图片
|
||||||
|
previewImage(url) {
|
||||||
|
console.log(url);
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url],
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||||
|
success: function (res) {
|
||||||
|
// console.log(res,'+++++')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// getSearch() {
|
||||||
|
// $http.request({
|
||||||
|
// url: "book/prescript/searchPrescript",
|
||||||
|
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
// data: {
|
||||||
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
|
// 'keywords': this.searchValue,
|
||||||
|
// type: this.currentCateIndex + 1
|
||||||
|
// },
|
||||||
|
// header: { //默认 无 说明:请求头
|
||||||
|
// 'Content-Type': 'application/json'
|
||||||
|
// },
|
||||||
|
// }).then(res => {
|
||||||
|
// console.log(res, '搜索结果')
|
||||||
|
// if (res.code == 0 && res.list.length >= 0) {
|
||||||
|
// this.showSearchList = true
|
||||||
|
// this.searchList = res.list
|
||||||
|
// } else {
|
||||||
|
// this.searchList = []
|
||||||
|
// }
|
||||||
|
// }).catch(e => {
|
||||||
|
// // this.dataList = []
|
||||||
|
// this.searchList = []
|
||||||
|
// console.log(e)
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// search(res) {
|
||||||
|
// console.log(res, 'res')
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: '搜索:' + res,
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// if (res == '') {
|
||||||
|
// this.showSearchList = false
|
||||||
|
// this.searchList = []
|
||||||
|
// } else {
|
||||||
|
// this.getSearch()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// },
|
||||||
|
// input(res) {
|
||||||
|
// console.log('----input:', res)
|
||||||
|
// if (res == '') {
|
||||||
|
// this.searchList = []
|
||||||
|
// } else {
|
||||||
|
// this.getSearch()
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// clear(res) {
|
||||||
|
// console.log('----clear:', res)
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: 'clear事件,清除值为:',
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// this.searchValue = ''
|
||||||
|
// this.showSearchList = false
|
||||||
|
// },
|
||||||
|
// blur(res) {
|
||||||
|
// // console.log('----blur:', res)
|
||||||
|
// // if (res == '') {
|
||||||
|
// // this.showSearchList = false
|
||||||
|
// // this.searchList = []
|
||||||
|
// // } else {
|
||||||
|
// // this.getSearch()
|
||||||
|
// // }
|
||||||
|
// },
|
||||||
|
// focus(e) {
|
||||||
|
// console.log('----focus:')
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: 'focus事件,输出值为:' + e.value,
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// // 等于1 就是有权限
|
||||||
|
// // this.showSearchList = true
|
||||||
|
|
||||||
|
// },
|
||||||
|
// cancel(res) {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '点击取消,输入值为:' + res.value,
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.key.hideSoftKeybord();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.commonPageBox {
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
.contentBox {
|
||||||
|
.headImage {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.detail_title {
|
||||||
|
padding: 0 20rpx !important;
|
||||||
|
}
|
||||||
|
.rich_box {
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
p {
|
||||||
|
display: block;
|
||||||
|
text-indent: 2em;
|
||||||
|
letter-spacing: 2px !important;
|
||||||
|
line-height: 46rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 10%;
|
||||||
|
right: 10rpx;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openBox view {
|
||||||
|
width: 160rpx;
|
||||||
|
border-bottom: 1rpx solid #309995;
|
||||||
|
}
|
||||||
|
.openBox view:nth-last-child(1) {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
.openBox {
|
||||||
|
background-color: #edfcf7;
|
||||||
|
border: 2rpx solid #eee;
|
||||||
|
width: 160rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
box-shadow: 0 0px 10rpx 2px #3ab3ae33;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.scroll {
|
||||||
|
height: calc(100vh - 200rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll view {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 1000rpx;
|
||||||
|
}
|
||||||
|
.rightButton {
|
||||||
|
// background-color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
// color: #3ab3ae;
|
||||||
|
}
|
||||||
|
.cate_item_box {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// background-color: #d8f8e4 ;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
.cate_item_border {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 78rpx;
|
||||||
|
// padding: 10rpx;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
// background-image: url("@/static/icon/homePage/cate_bg.png");
|
||||||
|
border-radius: 4rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
// height: 56rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cate_item_name {
|
||||||
|
padding-top: 60rpx;
|
||||||
|
width: 100%;
|
||||||
|
// margin-left: 21rpx;
|
||||||
|
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||||
|
font-weight: 500;
|
||||||
|
// font-weight: normal;
|
||||||
|
font-size: 52rpx;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hot {
|
||||||
|
color: #3ab3ae !important;
|
||||||
|
}
|
||||||
|
.hotButton {
|
||||||
|
background-color: #3ab3ae;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.closeBox {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: 0 0px 10rpx 1px #3ab3ae33;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
image {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,254 +1,662 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="componentPage">
|
<view class="componentPage">
|
||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
|
||||||
|
<view class="fixed">
|
||||||
|
<view v-if="isOpenRightButton">
|
||||||
|
<view class="openBox">
|
||||||
|
<block v-for="(v, index) in cateIconList" :key="index">
|
||||||
|
<view
|
||||||
|
:class="`bg${index} PM_font rightButton ${
|
||||||
|
viewid == 'cont' + index ? 'hotButton' : ''
|
||||||
|
}`"
|
||||||
|
:data-index="index"
|
||||||
|
@click="getViewId"
|
||||||
|
>{{ v.sociology.title }}</view
|
||||||
|
>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
@click="close"
|
||||||
<richDetail :detailInfo="detailInfo">
|
class="closeBox"
|
||||||
|
style="background-color: #fff; margin-top: 20rpx; width: 100%"
|
||||||
<template #richHeadImg>
|
>
|
||||||
<image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image>
|
<image src="@/static/icon/close.png" mode="widthFix"></image
|
||||||
|
></view>
|
||||||
</template>
|
</view>
|
||||||
</richDetail>
|
<view class="closeBox" v-else @click="isOpenRightButton = true">
|
||||||
|
<image src="@/static/icon/open.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
<!-- <view>{{ detailInfo.content }}</view> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<scroll-view
|
||||||
|
scroll-y
|
||||||
|
class="scroll"
|
||||||
|
:scroll-into-view="viewid"
|
||||||
|
scroll-with-animation
|
||||||
|
@scroll="scrollEvt"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-for="(v, index) in cateIconList"
|
||||||
|
:key="index"
|
||||||
|
class="right-item"
|
||||||
|
style="margin-bottom: 40rpx"
|
||||||
|
>
|
||||||
|
<view :id="`cont${index}`" :class="`bg${index} `">
|
||||||
|
<view class="cate_item_box">
|
||||||
|
<!-- <view class="cate_item_border">
|
||||||
|
<image
|
||||||
|
:src="
|
||||||
|
cateIconList.find((e) => v.title == e.title)
|
||||||
|
.imgUrl
|
||||||
|
"
|
||||||
|
mode="aspectFill"
|
||||||
|
:style="
|
||||||
|
cateIconList.find((e) => v.title == e.title)
|
||||||
|
.style
|
||||||
|
"
|
||||||
|
></image>
|
||||||
|
</view> -->
|
||||||
|
<view
|
||||||
|
:class="`cate_item_name ${viewid == 'cont' + index ? 'hot' : ''}`"
|
||||||
|
>{{ v.sociology.title }}</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<common-list
|
||||||
|
noDataIcon="data"
|
||||||
|
:isCondition="true"
|
||||||
|
:isNoIcon="true"
|
||||||
|
|
||||||
|
@lower="onReachBottom1"
|
||||||
|
:dataList="v.courseList"
|
||||||
|
label="title"
|
||||||
|
>
|
||||||
|
<template slot="labelSlot" slot-scope="slotProps">
|
||||||
|
<image
|
||||||
|
v-if="slotProps.row.image"
|
||||||
|
:src="slotProps.row.image"
|
||||||
|
mode="aspectFil"
|
||||||
|
class="book_image"
|
||||||
|
></image>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
src="@/static/icon/videoIcon.png"
|
||||||
|
mode="aspectFil"
|
||||||
|
class="book_image"
|
||||||
|
></image>
|
||||||
|
|
||||||
|
<view class="related_courses_name">
|
||||||
|
<view class="">
|
||||||
|
{{ slotProps.row.title }}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="margin-top: 10rpx">
|
||||||
|
<view
|
||||||
|
v-for="item in slotProps.row.courseCatalogueEntityList"
|
||||||
|
style="float: left; margin-right: 20rpx"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
slotProps.row.courseCatalogueEntityList.length > 1
|
||||||
|
? item.title
|
||||||
|
: "整部"
|
||||||
|
}}:
|
||||||
|
|
||||||
|
<text v-if="item.halfFee == 0 && item.fee == 0">免费</text>
|
||||||
|
<text v-else-if="item.halfFee == 0 || item.fee == 0">
|
||||||
|
{{ item.halfFee != 0 ? item.halfFee : "免费" }}/{{
|
||||||
|
item.fee != 0 ? item.fee : "免费"
|
||||||
|
}}</text
|
||||||
|
>
|
||||||
|
<text v-else-if="item.halfFee != 0 || item.fee != 0">
|
||||||
|
{{ item.halfFee }}/{{ item.fee }}</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||||
|
</template>
|
||||||
|
</common-list>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- <richDetail :detailInfo="detailInfo">
|
||||||
|
|
||||||
|
<template #richHeadImg>
|
||||||
|
<image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</richDetail>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- <view>{{ detailInfo.content }}</view> -->
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import courseDescription from "@/pages/component/commonComponents/list";
|
import courseDescription from "@/pages/component/commonComponents/list";
|
||||||
import richDetail from "@/pages/component/commonComponents/richDetail.vue";
|
import richDetail from "@/pages/component/commonComponents/richDetail.vue";
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from "@/config/requestConfig.js";
|
||||||
import {
|
import { mapState } from "vuex";
|
||||||
mapState
|
|
||||||
} from 'vuex';
|
|
||||||
export default {
|
export default {
|
||||||
props:['type','oid'],
|
props: ["type", "oid"],
|
||||||
components: {
|
components: {
|
||||||
courseDescription,//课程说明
|
courseDescription, //课程说明
|
||||||
richDetail,
|
richDetail,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options:{},
|
timer: null,
|
||||||
detailInfo:{},
|
isLeftClick: false,
|
||||||
playData: {},
|
isOpenRightButton: true,
|
||||||
searchValue: '',
|
viewid: "cont0",
|
||||||
|
viewidIndex: 0,
|
||||||
|
|
||||||
|
cateIconList: [
|
||||||
|
{
|
||||||
|
title: "儒",
|
||||||
twoCateList: [], // 二级分类标题
|
url: "/pages/curriculum/cate/index",
|
||||||
dataList: [{}, {}], // 方剂标题
|
imgUrl: require("@/static/icon/homePage/cate_ru.png"),
|
||||||
currentCateIndex: 0, // 当前选中的一级分类
|
style: {
|
||||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
width: "62rpx",
|
||||||
searchList: [], // 搜索结果数组
|
height: "56rpx",
|
||||||
showSearchList: false,
|
},
|
||||||
userMes: {}, // 用户信息
|
|
||||||
searchDisable: false, // 搜索不可用
|
|
||||||
limitShow: false,
|
|
||||||
limitTitle: '提示',
|
|
||||||
limitContent: '',
|
|
||||||
scrollViewHeight: 0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
this.options=options
|
|
||||||
// this.getData()
|
|
||||||
// this.getUserInfo()
|
|
||||||
// this.getCateList()
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
// this.getData()
|
|
||||||
// this.getUserInfo()
|
|
||||||
// this.getCateList()
|
|
||||||
|
|
||||||
},
|
|
||||||
onHide() {
|
|
||||||
// this.showSearchList = false
|
|
||||||
// this.searchList = []
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(['userInfo']),
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goCourseDescription(v){
|
|
||||||
uni.navigateTo({
|
|
||||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
|
||||||
url: `/pages/courseInformation/courseDescription/detail?title=${v.nameCN}&oid=${v.oid}`
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getData() {
|
{
|
||||||
console.log(this.$store.state, '88888')
|
title: "释",
|
||||||
this.$http
|
url: "/pages/curriculum/cate/index",
|
||||||
.post('app/phoneDoctor.do?getTHTSDetail', {
|
imgUrl: require("@/static/icon/homePage/cate_shi.png"),
|
||||||
customerType
|
|
||||||
:
|
|
||||||
"D",
|
|
||||||
token
|
|
||||||
:uni.getStorageSync("token")
|
|
||||||
,
|
|
||||||
customerOid
|
|
||||||
:uni.getStorageSync("customerOid"),
|
|
||||||
// oid: '8a9fb99809e4428888aad6b56a3096a6',
|
|
||||||
oid: this.oid,
|
|
||||||
|
|
||||||
|
style: {
|
||||||
step: 0,
|
width: "49rpx",
|
||||||
limit: 100
|
height: "61rpx",
|
||||||
})
|
},
|
||||||
.then(res => {
|
|
||||||
console.log(res.obj.dataLst
|
|
||||||
, '7777777777777777777')
|
|
||||||
this.detailInfo = res.obj
|
|
||||||
|
|
||||||
// socket.init();
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "道",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_dao.png"),
|
||||||
|
|
||||||
// 放大图片
|
style: {
|
||||||
previewImage(url) {
|
width: "59rpx",
|
||||||
console.log(url)
|
height: "59rpx",
|
||||||
uni.previewImage({
|
},
|
||||||
urls: [url],
|
|
||||||
longPressActions: {
|
|
||||||
itemList: ['很抱歉,暂不支持保存图片到本地'],
|
|
||||||
success: function (res) {
|
|
||||||
// console.log(res,'+++++')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// getSearch() {
|
{
|
||||||
// $http.request({
|
title: "医",
|
||||||
// url: "book/prescript/searchPrescript",
|
url: "/pages/curriculum/cate/index",
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
imgUrl: require("@/static/icon/homePage/cate_yi.png"),
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'keywords': this.searchValue,
|
|
||||||
// type: this.currentCateIndex + 1
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '搜索结果')
|
|
||||||
// if (res.code == 0 && res.list.length >= 0) {
|
|
||||||
// this.showSearchList = true
|
|
||||||
// this.searchList = res.list
|
|
||||||
// } else {
|
|
||||||
// this.searchList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// // this.dataList = []
|
|
||||||
// this.searchList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// search(res) {
|
|
||||||
// console.log(res, 'res')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: '搜索:' + res,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// if (res == '') {
|
|
||||||
// this.showSearchList = false
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// },
|
style: {
|
||||||
// input(res) {
|
width: "61rpx",
|
||||||
// console.log('----input:', res)
|
height: "61rpx",
|
||||||
// if (res == '') {
|
},
|
||||||
// this.searchList = []
|
},
|
||||||
// } else {
|
{
|
||||||
// this.getSearch()
|
title: "美",
|
||||||
// }
|
url: "/pages/curriculum/cate/index",
|
||||||
// },
|
imgUrl: require("@/static/icon/homePage/cate_mei.png"),
|
||||||
// clear(res) {
|
|
||||||
// console.log('----clear:', res)
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'clear事件,清除值为:',
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// this.searchValue = ''
|
|
||||||
// this.showSearchList = false
|
|
||||||
// },
|
|
||||||
// blur(res) {
|
|
||||||
// // console.log('----blur:', res)
|
|
||||||
// // if (res == '') {
|
|
||||||
// // this.showSearchList = false
|
|
||||||
// // this.searchList = []
|
|
||||||
// // } else {
|
|
||||||
// // this.getSearch()
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
// focus(e) {
|
|
||||||
// console.log('----focus:')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'focus事件,输出值为:' + e.value,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// // 等于1 就是有权限
|
|
||||||
// // this.showSearchList = true
|
|
||||||
|
|
||||||
// },
|
style: {
|
||||||
// cancel(res) {
|
width: "59rpx",
|
||||||
// uni.showToast({
|
height: "59rpx",
|
||||||
// title: '点击取消,输入值为:' + res.value,
|
},
|
||||||
// icon: 'none'
|
},
|
||||||
// })
|
{
|
||||||
// }
|
title: "文",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_wen.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "61rpx",
|
||||||
|
height: "60rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
cateIconList1: [
|
||||||
|
{
|
||||||
|
title: "儒",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_ru.png"),
|
||||||
|
style: {
|
||||||
|
width: "62rpx",
|
||||||
|
height: "56rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "释",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_shi.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "49rpx",
|
||||||
|
height: "61rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "道",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_dao.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "59rpx",
|
||||||
|
height: "59rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "医",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_yi.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "61rpx",
|
||||||
|
height: "61rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "美",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_mei.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "59rpx",
|
||||||
|
height: "59rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "文",
|
||||||
|
url: "/pages/curriculum/cate/index",
|
||||||
|
imgUrl: require("@/static/icon/homePage/cate_wen.png"),
|
||||||
|
|
||||||
|
style: {
|
||||||
|
width: "61rpx",
|
||||||
|
height: "60rpx",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
options: {},
|
||||||
|
detailInfo: {},
|
||||||
|
playData: {},
|
||||||
|
searchValue: "",
|
||||||
|
|
||||||
|
distanceList: [], // 二级分类标题
|
||||||
|
twoCateList: [], // 二级分类标题
|
||||||
|
dataList: [{}, {}], // 方剂标题
|
||||||
|
currentCateIndex: 0, // 当前选中的一级分类
|
||||||
|
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||||
|
searchList: [], // 搜索结果数组
|
||||||
|
showSearchList: false,
|
||||||
|
userMes: {}, // 用户信息
|
||||||
|
searchDisable: false, // 搜索不可用
|
||||||
|
limitShow: false,
|
||||||
|
limitTitle: "提示",
|
||||||
|
limitContent: "",
|
||||||
|
scrollViewHeight: 0,
|
||||||
|
urlList: {
|
||||||
|
list: "/sociology/course/getCoursePrice",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.options = options;
|
||||||
|
|
||||||
|
// this.getUserInfo()
|
||||||
|
// this.getCateList()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.viewid = "cont0";
|
||||||
|
this.viewidIndex = 0;
|
||||||
|
this.getData();
|
||||||
|
|
||||||
|
// this.getData()
|
||||||
|
// this.getUserInfo()
|
||||||
|
// this.getCateList()
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
// this.showSearchList = false
|
||||||
|
// this.searchList = []
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["userInfo"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.isOpenRightButton = false;
|
||||||
},
|
},
|
||||||
onBackPress() {
|
getDistanceToTop() {
|
||||||
// #ifdef APP-PLUS
|
//获取右侧各部分距离顶部的距离
|
||||||
plus.key.hideSoftKeybord();
|
let that = this;
|
||||||
// #endif
|
that.distanceList = [];
|
||||||
|
let selectorQuery = uni.createSelectorQuery().in(this);
|
||||||
|
const query = uni.createSelectorQuery().in(this);
|
||||||
|
query
|
||||||
|
.selectAll(".right-item")
|
||||||
|
.boundingClientRect((data) => {
|
||||||
|
data.forEach(function (rect) {
|
||||||
|
that.distanceList.push(rect.top);
|
||||||
|
});
|
||||||
|
console.log("data at line 180:", data);
|
||||||
|
// this.h = data.top+69
|
||||||
|
})
|
||||||
|
.exec();
|
||||||
|
|
||||||
|
// selectorQuery
|
||||||
|
// .selectAll(".right-item")
|
||||||
|
// .boundingClientRect(function (rects) {
|
||||||
|
// console.log("rects at line 182:", rects);
|
||||||
|
// rects.forEach(function (rect) {
|
||||||
|
// that.distanceList.push(rect.top);
|
||||||
|
// });
|
||||||
|
// console.log("that.distanceList", that.distanceList);
|
||||||
|
// })
|
||||||
|
// .exec();
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
// 元素滚动到顶部时,对应的左侧导航栏变为选中状态
|
||||||
|
scrollEvt(e) {
|
||||||
|
console.log("e at line 204:", e);
|
||||||
|
// 点击左侧导航栏引起的滚动不做判断
|
||||||
|
// if(this.isLeftClick){
|
||||||
|
// this.isLeftClick = false
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// // 防抖
|
||||||
|
if (this.timer) {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
}
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
let scrollTop = e.detail.scrollTop; //滚动的高度
|
||||||
|
// 找到位于顶部元素的索引,距离大于滚动高度的第一个元素的上一个元素就是此时位于顶部的元素
|
||||||
|
let index = this.distanceList.findIndex((it) => {
|
||||||
|
// 滚动条的位置大于元素距离顶部位置的距离时,说明元素已经滑过了顶部
|
||||||
|
return it > scrollTop;
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("index at line 218:", index);
|
||||||
|
if (index == this.viewidIndex) return;
|
||||||
|
this.viewidIndex = index;
|
||||||
|
this.viewid = "cont" + index;
|
||||||
|
}, 100);
|
||||||
|
},
|
||||||
|
|
||||||
|
getViewId(e) {
|
||||||
|
this.isLeftClick = true;
|
||||||
|
|
||||||
|
console.log("e at line 88:", e);
|
||||||
|
this.viewid = "cont" + e.currentTarget.dataset.index;
|
||||||
|
this.viewidIndex = e.currentTarget.dataset.index;
|
||||||
|
},
|
||||||
|
goCourseDescription(v) {
|
||||||
|
uni.navigateTo({
|
||||||
|
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||||
|
url: `/pages/courseInformation/courseDescription/detail?title=${v.nameCN}&oid=${v.oid}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getData() {
|
||||||
|
console.log(this.$store.state, "88888");
|
||||||
|
this.$http
|
||||||
|
.request({
|
||||||
|
url: this.urlList.list,
|
||||||
|
method: "POST",
|
||||||
|
data: {},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
console.log("res at line 178:", res);
|
||||||
|
|
||||||
|
this.cateIconList = res.list;
|
||||||
|
await setTimeout(() => {
|
||||||
|
this.getDistanceToTop();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
// socket.init();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 放大图片
|
||||||
|
previewImage(url) {
|
||||||
|
console.log(url);
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url],
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||||
|
success: function (res) {
|
||||||
|
// console.log(res,'+++++')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// getSearch() {
|
||||||
|
// $http.request({
|
||||||
|
// url: "book/prescript/searchPrescript",
|
||||||
|
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
// data: {
|
||||||
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
|
// 'keywords': this.searchValue,
|
||||||
|
// type: this.currentCateIndex + 1
|
||||||
|
// },
|
||||||
|
// header: { //默认 无 说明:请求头
|
||||||
|
// 'Content-Type': 'application/json'
|
||||||
|
// },
|
||||||
|
// }).then(res => {
|
||||||
|
// console.log(res, '搜索结果')
|
||||||
|
// if (res.code == 0 && res.list.length >= 0) {
|
||||||
|
// this.showSearchList = true
|
||||||
|
// this.searchList = res.list
|
||||||
|
// } else {
|
||||||
|
// this.searchList = []
|
||||||
|
// }
|
||||||
|
// }).catch(e => {
|
||||||
|
// // this.dataList = []
|
||||||
|
// this.searchList = []
|
||||||
|
// console.log(e)
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// search(res) {
|
||||||
|
// console.log(res, 'res')
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: '搜索:' + res,
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// if (res == '') {
|
||||||
|
// this.showSearchList = false
|
||||||
|
// this.searchList = []
|
||||||
|
// } else {
|
||||||
|
// this.getSearch()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// },
|
||||||
|
// input(res) {
|
||||||
|
// console.log('----input:', res)
|
||||||
|
// if (res == '') {
|
||||||
|
// this.searchList = []
|
||||||
|
// } else {
|
||||||
|
// this.getSearch()
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// clear(res) {
|
||||||
|
// console.log('----clear:', res)
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: 'clear事件,清除值为:',
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// this.searchValue = ''
|
||||||
|
// this.showSearchList = false
|
||||||
|
// },
|
||||||
|
// blur(res) {
|
||||||
|
// // console.log('----blur:', res)
|
||||||
|
// // if (res == '') {
|
||||||
|
// // this.showSearchList = false
|
||||||
|
// // this.searchList = []
|
||||||
|
// // } else {
|
||||||
|
// // this.getSearch()
|
||||||
|
// // }
|
||||||
|
// },
|
||||||
|
// focus(e) {
|
||||||
|
// console.log('----focus:')
|
||||||
|
// // uni.showToast({
|
||||||
|
// // title: 'focus事件,输出值为:' + e.value,
|
||||||
|
// // icon: 'none'
|
||||||
|
// // })
|
||||||
|
// // 等于1 就是有权限
|
||||||
|
// // this.showSearchList = true
|
||||||
|
|
||||||
|
// },
|
||||||
|
// cancel(res) {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '点击取消,输入值为:' + res.value,
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.key.hideSoftKeybord();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.commonPageBox{
|
.commonPageBox {
|
||||||
padding:40rpx 0;
|
padding: 40rpx 0;
|
||||||
}
|
}
|
||||||
.contentBox{
|
.contentBox {
|
||||||
|
.headImage {
|
||||||
|
width: 100%;
|
||||||
.headImage{
|
height: 100%;
|
||||||
width: 100%;
|
margin-bottom: 20rpx;
|
||||||
height: 100%;
|
}
|
||||||
margin-bottom: 20rpx;
|
.detail_title {
|
||||||
|
padding: 0 20rpx !important;
|
||||||
|
}
|
||||||
|
.rich_box {
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
p {
|
||||||
|
display: block;
|
||||||
|
text-indent: 2em;
|
||||||
|
letter-spacing: 2px !important;
|
||||||
|
line-height: 46rpx;
|
||||||
}
|
}
|
||||||
.detail_title{
|
}
|
||||||
padding:0 20rpx !important;
|
}
|
||||||
|
|
||||||
}
|
|
||||||
.rich_box{
|
|
||||||
padding: 20rpx; box-sizing: border-box;
|
|
||||||
p{
|
|
||||||
display: block;text-indent: 2em;
|
|
||||||
letter-spacing: 2px !important;
|
|
||||||
line-height: 46rpx;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
.fixed {
|
||||||
}
|
position: fixed;
|
||||||
|
bottom: 10%;
|
||||||
|
right: 10rpx;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.openBox view {
|
||||||
|
width: 80rpx;
|
||||||
|
border-bottom: 1rpx solid #309995;
|
||||||
|
}
|
||||||
|
.openBox view:nth-last-child(1) {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
.openBox {
|
||||||
|
background-color: #edfcf7;
|
||||||
|
border: 2rpx solid #eee;
|
||||||
|
width: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
box-shadow: 0 0px 10rpx 2px #3ab3ae33;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.scroll {
|
||||||
|
height: calc(100vh - 200rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll view {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 1000rpx;
|
||||||
|
}
|
||||||
|
.rightButton {
|
||||||
|
// background-color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
// color: #3ab3ae;
|
||||||
|
}
|
||||||
|
.cate_item_box {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// background-color: #d8f8e4 ;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
.cate_item_border {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 78rpx;
|
||||||
|
// padding: 10rpx;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
// background-image: url("@/static/icon/homePage/cate_bg.png");
|
||||||
|
border-radius: 4rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
// height: 56rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cate_item_name {
|
||||||
|
padding-top: 60rpx;
|
||||||
|
width: 100%;
|
||||||
|
// margin-left: 21rpx;
|
||||||
|
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||||
|
font-weight: 500;
|
||||||
|
// font-weight: normal;
|
||||||
|
font-size: 52rpx;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hot {
|
||||||
|
color: #3ab3ae !important;
|
||||||
|
}
|
||||||
|
.hotButton {
|
||||||
|
background-color: #3ab3ae;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.closeBox {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: 0 0px 10rpx 1px #3ab3ae33;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
image {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.book_image {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
/deep/.list_item {
|
||||||
|
padding-left: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-color: #efeef4 !important;
|
||||||
|
// .rightArrow {
|
||||||
|
// margin-top: 10rpx !important;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
<template slot="rightSlot" slot-scope="slotProps">
|
<template slot="rightSlot" slot-scope="slotProps">
|
||||||
<!-- {{ slotProps.row.bxType }} -->
|
<!-- {{ slotProps.row.bxType }} -->
|
||||||
|
|
||||||
<text class="fdButtonBox aui-text-danger fdButtonBoxRed"
|
<text :class="`fdButtonBox ${cateList[currentCateIndex].type == 0 ?'':'aui-text-danger fdButtonBoxRed'} `">{{
|
||||||
>立即购买</text
|
cateList[currentCateIndex].type == 0 ? "开始学习" : "立即购买"
|
||||||
>
|
}}</text>
|
||||||
|
|
||||||
<view> </view>
|
<view> </view>
|
||||||
</template>
|
</template>
|
||||||
@@ -396,6 +396,7 @@ export default {
|
|||||||
curriculumInfo: "sociology/course/getCourseCatalogueChapterList",
|
curriculumInfo: "sociology/course/getCourseCatalogueChapterList",
|
||||||
list: "sociology/course/getCourseDetail",
|
list: "sociology/course/getCourseDetail",
|
||||||
goodsList: "sociology/product/getProductListForCourse",
|
goodsList: "sociology/product/getProductListForCourse",
|
||||||
|
startStudyForMF: "sociology/course/startStudyForMF",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -473,30 +474,65 @@ export default {
|
|||||||
//获取相关关联课程商品
|
//获取相关关联课程商品
|
||||||
handleClickGetGoodsList(data) {
|
handleClickGetGoodsList(data) {
|
||||||
// console.log("data at line 313:", data);
|
// console.log("data at line 313:", data);
|
||||||
this.$http
|
|
||||||
.request({
|
|
||||||
url: this.urlList.goodsList,
|
|
||||||
method: "POST",
|
|
||||||
data: {
|
|
||||||
id: this.cateList[this.currentCateIndex].id,
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
//默认 无 说明:请求头
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(async (res) => {
|
|
||||||
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();
|
if (this.cateList[this.currentCateIndex].type == 0) {
|
||||||
});
|
//免费
|
||||||
|
|
||||||
|
this.$http
|
||||||
|
.request({
|
||||||
|
url: this.urlList.startStudyForMF,
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
catalogueId: this.cateList[this.currentCateIndex].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 {
|
||||||
|
this.$http
|
||||||
|
.request({
|
||||||
|
url: this.urlList.goodsList,
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
id: this.cateList[this.currentCateIndex].id,
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hancleModalConfirm() {
|
hancleModalConfirm() {
|
||||||
var data = {
|
var data = {
|
||||||
@@ -660,15 +696,25 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async handleselectCate(item, index) {
|
async handleselectCate(item, index) {
|
||||||
|
console.log("item at line 662:", item);
|
||||||
console.log("index at line 637:", index);
|
console.log("index at line 637:", index);
|
||||||
// this.description=`您还未购买当前【${item.title}】课程,`
|
// this.description=`您还未购买当前【${item.title}】课程,`
|
||||||
var title1 = "";
|
var title1 = "";
|
||||||
this.currentCateIndex = index;
|
this.currentCateIndex = index;
|
||||||
if (this.cateList.length > 1) {
|
if (item.type == 0) {
|
||||||
this.goBuyTitle = `您还未购买当前【${item.title}】课程`;
|
if (this.cateList.length > 1) {
|
||||||
} else if (this.cateList.length == 1) {
|
this.goBuyTitle = `【${item.title}】课程为免费课程`;
|
||||||
this.goBuyTitle = `您还未购买当前课程`;
|
} else if (this.cateList.length == 1) {
|
||||||
|
this.goBuyTitle = `为免费课程`;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.cateList.length > 1) {
|
||||||
|
this.goBuyTitle = `您还未购买当前【${item.title}】课程`;
|
||||||
|
} else if (this.cateList.length == 1) {
|
||||||
|
this.goBuyTitle = `您还未购买当前课程`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.currentCateIndex = index;
|
// this.currentCateIndex = index;
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
var data = [];
|
var data = [];
|
||||||
@@ -959,7 +1005,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.headImage {
|
.headImage {
|
||||||
height: 600rpx !important;
|
// height: 600rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commonDetailPage {
|
.commonDetailPage {
|
||||||
|
|||||||
@@ -210,8 +210,8 @@
|
|||||||
],
|
],
|
||||||
curriculumList: [{
|
curriculumList: [{
|
||||||
name: "课程设置",
|
name: "课程设置",
|
||||||
// url: "/pages/courseInformation/index/index",
|
url: "/pages/courseInformation/index/index",
|
||||||
url: "",
|
// url: "",
|
||||||
imgUrl: require("@/static/icon/homePage/kcjg.png"),
|
imgUrl: require("@/static/icon/homePage/kcjg.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<z-nav-bar :title="prescriptDetail.title" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
<z-nav-bar :title="prescriptDetail.title" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
||||||
<view
|
<view
|
||||||
class="contentBox"
|
class="contentBox"
|
||||||
v-if="prescriptDetail.content && prescriptDetail.type == 0"
|
v-if="prescriptDetail.type == 0"
|
||||||
>
|
>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- <uni-section class="mb-10" titleFontSize="18px" title="标题" type="line"> -->
|
<!-- <uni-section class="mb-10" titleFontSize="18px" title="标题" type="line"> -->
|
||||||
|
|||||||
BIN
static/icon/close.png
Normal file
BIN
static/icon/close.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/icon/open.png
Normal file
BIN
static/icon/open.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
8
unpackage/dist/build/app-plus/app-service.js
vendored
8
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app-view.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user