首页+我的
This commit is contained in:
642
pages/curriculum/cate/index.vue
Normal file
642
pages/curriculum/cate/index.vue
Normal file
@@ -0,0 +1,642 @@
|
||||
<template>
|
||||
<view class="container commonPageBox">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar
|
||||
:title="options.navTitle"
|
||||
bgColor="#3AB3AE"
|
||||
fontColor="#fff"
|
||||
></z-nav-bar>
|
||||
|
||||
<view class="contentBox commonPageContentBox">
|
||||
<common-list @lower="onReachBottom1" :pagination="pagination" :dataList="dataList" @hancleClick="gotoDetail" label="title">
|
||||
</common-list>
|
||||
</view>
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from "@/pages/component/commonComponents/list";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
list,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
options: {},
|
||||
searchValue: "",
|
||||
pagination: {// 请求参数
|
||||
page: 1,//页码
|
||||
limit: 20,//每页显示
|
||||
total: 0,//总条数
|
||||
},
|
||||
twoCateList: [], // 二级分类标题
|
||||
titleList: [], // 方剂标题
|
||||
curOneCateIndex: 0, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: "提示",
|
||||
limitContent: "",
|
||||
scrollViewHeight: 0,
|
||||
dataList: [],
|
||||
urlList: {
|
||||
list: "sociology/course/getSociologyCourseList",
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options, "989");
|
||||
this.options = options;
|
||||
this.getUserInfo();
|
||||
this.getData();
|
||||
},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: { onReachBottom1() {// 上拉加载
|
||||
// 当列表数量不大于或等于总数量,则再次调用接口请求数据
|
||||
if (this.dataList.length >= this.pagination.total) return;
|
||||
this.pagination.page++;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
|
||||
// 检查是有权限使用搜索功能
|
||||
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(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}`,
|
||||
});
|
||||
},
|
||||
|
||||
getData() {
|
||||
this.$http
|
||||
.request({
|
||||
url: this.urlList.list,
|
||||
method: "POST",
|
||||
data: {
|
||||
id: Number(this.options.id), //分类id
|
||||
...this.pagination
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("res at line 289:", res);
|
||||
this.pagination.total=res.courses.total
|
||||
this.dataList=[...this.dataList,...res.courses.records]
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
// 获取名称
|
||||
getTitles(dictType) {
|
||||
console.log("dictType", dictType);
|
||||
if (this.curOneCateIndex == 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.titleList = res.result.records;
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.curOneCateIndex == 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.titleList = res.result.records;
|
||||
for (let i = 0; i < this.titleList.length; i++) {
|
||||
this.titleList[i].imageslist = [];
|
||||
this.titleList[i].imageslist = this.titleList[i].img.split(";");
|
||||
}
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.curOneCateIndex == 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.titleList = res.result;
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.curOneCateIndex == 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.titleList = res.result;
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
},
|
||||
setTwoCateIndex(item, index) {
|
||||
let dictType = item.dictType;
|
||||
this.curTwoCateIndex = index;
|
||||
this.getTitles(dictType);
|
||||
},
|
||||
async setOneCateIndex(item, index) {
|
||||
console.log(index, 99999);
|
||||
var that = this;
|
||||
|
||||
// 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 = item.type;
|
||||
this.curOneCateIndex = index;
|
||||
this.curTwoCateIndex = 0;
|
||||
this.searchValue = "";
|
||||
this.searchList = [];
|
||||
this.showSearchList = false;
|
||||
// if (index != 2) {
|
||||
await this.getTowCateList(type);
|
||||
|
||||
// uni.createSelectorQuery().select('.oneCateList').boundingClientRect(function (rect) {
|
||||
// var height = rect.height
|
||||
// console.log('元素高度:',);
|
||||
|
||||
// }).exec();
|
||||
|
||||
// } else {
|
||||
// this.getJFList(dictType)
|
||||
// }
|
||||
},
|
||||
async getTowCateList(type) {
|
||||
var that = this;
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/typeList?label=" + type,
|
||||
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.result.length >= 0) {
|
||||
this.twoCateList = res.result;
|
||||
if (this.curOneCateIndex == 0) {
|
||||
this.twoCateList = [
|
||||
{
|
||||
dictType: "1",
|
||||
dictValue: "学术思想",
|
||||
},
|
||||
{
|
||||
dictType: "2",
|
||||
dictValue: "出版专著",
|
||||
},
|
||||
{
|
||||
dictType: "3",
|
||||
dictValue: "学术平台",
|
||||
},
|
||||
];
|
||||
}
|
||||
if (this.curOneCateIndex == 2) {
|
||||
this.twoCateList = [
|
||||
{
|
||||
dictType: "1",
|
||||
dictValue: "吴门之歌",
|
||||
},
|
||||
{
|
||||
dictType: "2",
|
||||
dictValue: "巴山夜语",
|
||||
},
|
||||
{
|
||||
dictType: "3",
|
||||
dictValue: "吴门之徽",
|
||||
},
|
||||
];
|
||||
}
|
||||
if (this.curOneCateIndex == 3) {
|
||||
this.twoCateList = [
|
||||
{
|
||||
dictType: "1",
|
||||
dictValue: "学术贡献",
|
||||
},
|
||||
{
|
||||
dictType: "2",
|
||||
dictValue: "抗疫纪实",
|
||||
},
|
||||
{
|
||||
dictType: "3",
|
||||
dictValue: "吴门公益",
|
||||
},
|
||||
];
|
||||
}
|
||||
this.getTitles(this.twoCateList[0].dictType);
|
||||
|
||||
this.$nextTick(async () => {
|
||||
// await uni.createSelectorQuery().select('.uni-tabbar').boundingClientRect(function (rect) {
|
||||
// console.log(rect.height, '3333')
|
||||
|
||||
// // var height = 42 + rect.height + 10;
|
||||
// // that.scrollViewHeight = height;
|
||||
// // console.log(that.scrollViewHeight, '111111')
|
||||
// // that.$forceUpdate()
|
||||
// // console.log('元素高度2:', height);
|
||||
// }).exec();
|
||||
await uni
|
||||
.createSelectorQuery()
|
||||
.select(".cateList")
|
||||
.boundingClientRect(function (rect) {
|
||||
console.log(rect.height, "22222");
|
||||
|
||||
var height = 42 + rect.height + 20;
|
||||
that.scrollViewHeight = height;
|
||||
console.log(that.scrollViewHeight, "111111");
|
||||
that.$forceUpdate();
|
||||
console.log("元素高度2:", height);
|
||||
})
|
||||
.exec();
|
||||
});
|
||||
} else {
|
||||
this.twoCateList = [];
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.twoCateList = [];
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
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.titleList = this.transformData(res.list)
|
||||
// console.log('JF经方', this.titleList)
|
||||
// } else {
|
||||
// this.twoCateList = []
|
||||
// this.titleList = []
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// this.twoCateList = []
|
||||
// this.titleList = []
|
||||
// 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.oneCateList = res.list
|
||||
this.getTowCateList(this.oneCateList[0].type);
|
||||
// } else {
|
||||
// this.oneCateList = []
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// this.oneCateList = []
|
||||
// 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.curOneCateIndex + 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.titleList = []
|
||||
// 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>
|
||||
.u-grid-list {
|
||||
// height: 40rpx;
|
||||
}
|
||||
|
||||
.searchList {
|
||||
.item {
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #dadbde;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.titleList {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.titleList2 {
|
||||
height: calc(100% - 170rpx);
|
||||
}
|
||||
.commonPageContentBox{
|
||||
// min-height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
1334
pages/curriculum/order/curriculum/detail copy.vue
Normal file
1334
pages/curriculum/order/curriculum/detail copy.vue
Normal file
File diff suppressed because it is too large
Load Diff
1384
pages/curriculum/order/curriculum/detail.vue
Normal file
1384
pages/curriculum/order/curriculum/detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
1174
pages/curriculum/order/curriculum/index.vue
Normal file
1174
pages/curriculum/order/curriculum/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
981
pages/curriculum/order/index/index.vue
Normal file
981
pages/curriculum/order/index/index.vue
Normal file
@@ -0,0 +1,981 @@
|
||||
<template>
|
||||
<view class="container commonPageBox commonDetailPage">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="我的课程" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
||||
|
||||
|
||||
<view class="contentBox commonPageContentBox">
|
||||
<!-- <scroll-view class="scroll-view_H statusList" scroll-x="true" scroll-left="0"> -->
|
||||
<!-- <view class="statusList flexbox" >
|
||||
<text :class="[currentStatusIndex == index ? 'cur' : '']" @click="setOneCateIndex(item, index)"
|
||||
v-for="(item, index) in statusList" :key="item.type">{{ item.title }}</text>
|
||||
</view> -->
|
||||
|
||||
<!-- <common-sticky label="title" itemStyle="width:25%;padding-left: 15px; padding-right: 15px; height: 68rpx;"
|
||||
:list="cateList" :currentCateIndex="currentCateIndex"
|
||||
@handleselectCate="handleselectCate"></common-sticky> -->
|
||||
|
||||
|
||||
<view :class="`priceDetail`" v-if="this.statusList[this.currentStatusIndex].type == 'price'">
|
||||
|
||||
<scroll-view scroll-y="true" class="scroll-Y">
|
||||
<price ref="priceDetail" type="price" :oid="this.statusList[this.currentStatusIndex].oid"></price>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view :class="`priceDetail`" v-else-if="this.statusList[this.currentStatusIndex].type == 'purchaseNotice'">
|
||||
|
||||
<scroll-view scroll-y="true" class="scroll-Y">
|
||||
<price ref="purchaseNotice" :oid="this.statusList[this.currentStatusIndex].oid"></price>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view :class="`priceDetail`"
|
||||
v-else-if="this.statusList[this.currentStatusIndex].type == 'instructionsForUse'">
|
||||
<!-- <instructionsForUse ref="instructionsForUse"></instructionsForUse> -->
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<view :class="`dataList priceDetail`" v-else>
|
||||
|
||||
<!-- <image src="@/static/image/headImg/top.png" mode="aspectFit" class="headImage"></image> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
|
||||
|
||||
<common-curriculum-list imgUrl="url"
|
||||
defaultUrl="http://oss.taihumed.com/other/null_20210528102528870.jpg" :isCondition="true"
|
||||
:dataList="dataList" @hancleClick="goCourseDescription" label="title">
|
||||
<template slot="leftSlot" slot-scope="slotProps">
|
||||
<!-- {{ slotProps.row.bxType }} -->
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<view class="related_courses_name ">
|
||||
|
||||
<!-- <text v-html="slotProps.row.bxType"></text> -->
|
||||
|
||||
|
||||
{{ slotProps.row.title
|
||||
}}</view>
|
||||
|
||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template slot="rightSlot" slot-scope="slotProps">
|
||||
<!-- {{ slotProps.row.bxType }} -->
|
||||
<view v-if="slotProps.row.surplusNum" class="related_courses_right">
|
||||
|
||||
|
||||
<view class="progress_icon" style=""><u-line-progress activeColor="#3AB3AE" height="14"
|
||||
:percentage="30" :showText="false" showText></u-line-progress></view>
|
||||
<!-- <view
|
||||
:class="slotProps.row.surplusNum < 30 ? 'aui-text-danger dateReminder' : 'dateReminder'">
|
||||
距 {{ slotProps.row.surplusNum }} 天到期</view> -->
|
||||
|
||||
</view>
|
||||
<view v-if="slotProps.row.inType == '03'" class="fdButtonBox">
|
||||
|
||||
|
||||
<u-button type="primary" :plain="true" text="复读一月" :customStyle="fdButtonStyle"
|
||||
size="small"
|
||||
@click.native.stop="fnRelearn(slotProps.row.inType, 30, slotProps.row.courseFee)"></u-button>
|
||||
<u-button type="primary" :plain="true" text="复读三月" :customStyle="fdButtonStyle"
|
||||
size="small"
|
||||
@click.native.stop="fnRelearn(slotProps.row.inType, 90, slotProps.row.courseFee)"></u-button>
|
||||
|
||||
</view>
|
||||
|
||||
<view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
</common-curriculum-list>
|
||||
|
||||
<!-- <courseDescription :dataList="dataList" @hancleClick="goCourseDescription" label="title">
|
||||
<template slot="leftSlot" slot-scope="slotProps">
|
||||
|
||||
<text v-html="slotProps.row.bxType"></text>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
</courseDescription> -->
|
||||
</template>
|
||||
|
||||
|
||||
<!-- <template v-if="currentStatusIndex == 2 && curTwoCateIndex == 2">
|
||||
|
||||
|
||||
<u-grid :col="3">
|
||||
<u-grid-item class="scroll-view-item " v-for="(item, index) in dataList" :key="item.id"
|
||||
@click="previewImage(item.url)" style="align-items: flex-start;">
|
||||
|
||||
<img :src="item.url" alt="" class="wmzhimg" mode="aspectFit">
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
|
||||
</template> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-modal :show="show" :title="modalInfo.title" :content='modalInfo.content' showCancelButton
|
||||
@confirm="hancleModalConfirm" @cancel="hancleModalCancel"></u-modal>
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
fdButtonStyle: {
|
||||
width: '120rpx',
|
||||
'border-color': '#3AB3AE',
|
||||
'color': '#3AB3AE',
|
||||
'float': 'right',
|
||||
'margin-right': "20rpx",
|
||||
'margin-left': "30rpx"
|
||||
},
|
||||
modalInfo: {
|
||||
|
||||
},
|
||||
|
||||
show: false,
|
||||
playData: {},
|
||||
taiHuClassInfo: {},
|
||||
searchValue: '',
|
||||
statusList: [{
|
||||
title: "学习中",
|
||||
|
||||
type: '02',
|
||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
||||
}, {
|
||||
title: "已完成",
|
||||
type: '03',
|
||||
oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||
}, {
|
||||
title: "未开始",
|
||||
|
||||
type: '01',
|
||||
|
||||
}, {
|
||||
title: "未购买",
|
||||
|
||||
type: '04',
|
||||
oid: 'd0f47071c2194e94845fbb373d06f59d',
|
||||
|
||||
}
|
||||
|
||||
], // 一级分类标题1
|
||||
cateList: [{
|
||||
title: "学士班",
|
||||
type: 1,
|
||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
||||
}, {
|
||||
title: "硕士班",
|
||||
type: 2,
|
||||
oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||
}, {
|
||||
title: "博士班", type: 3,
|
||||
|
||||
|
||||
}, {
|
||||
title: "其他",
|
||||
type: 4,
|
||||
oid: 'd0f47071c2194e94845fbb373d06f59d',
|
||||
|
||||
}
|
||||
|
||||
], // 一级分类标题1
|
||||
twoCateList: [], // 二级分类标题
|
||||
dataList: [], // 方剂标题
|
||||
allDataList: [], // 方剂标题
|
||||
currentStatusIndex: 0, // 当前选中的一级分类
|
||||
currentCateIndex: 0, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: '提示',
|
||||
limitContent: '',
|
||||
scrollViewHeight: 0,
|
||||
urlList: {
|
||||
list: 'app/phone.do?getMyCourseList',
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCourseDescriptionData()
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
|
||||
},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
methods: {
|
||||
hancleModalConfirm() {
|
||||
var data = {
|
||||
values: {
|
||||
customerType
|
||||
:
|
||||
"D",
|
||||
token
|
||||
: uni.getStorageSync("token")
|
||||
,
|
||||
customerOid
|
||||
: uni.getStorageSync("customerOid"),
|
||||
...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
|
||||
//499和599课程复读一个月90三个月220; 699和799课程复读一个月100三个月248
|
||||
var feeAs = [
|
||||
[60, 120],
|
||||
[80, 180],
|
||||
[90, 220],
|
||||
[100, 248]
|
||||
];
|
||||
var fee = 0;
|
||||
if (courseFee < 206) {
|
||||
fee = feeAs[0][days == 30 ? 0 : 1];
|
||||
} else if (courseFee < 406) {
|
||||
fee = feeAs[1][days == 30 ? 0 : 1];
|
||||
} else if (courseFee < 606) {
|
||||
fee = feeAs[2][days == 30 ? 0 : 1];
|
||||
} else {
|
||||
fee = feeAs[3][days == 30 ? 0 : 1];
|
||||
}
|
||||
this.modalInfo = { title: '提示信息', content: '用户您好,该课程已到期,通过支付' + fee + '元,本门课程可获得' + days + '天延期学习时间,点击确认即完成自动扣费,感谢配合!', }
|
||||
|
||||
this.taiHuClassInfo = {
|
||||
taiHuClassOid: oid,
|
||||
days: days,
|
||||
fee: fee
|
||||
}
|
||||
this.show = true
|
||||
// $aui.alert({
|
||||
// title: ,
|
||||
// content: '用户您好,该课程已到期,通过支付' + fee + '元,本门课程可获得' + days + '天延期学习时间,点击确认即完成自动扣费,感谢配合!',
|
||||
// buttons: ['取消', '确认'],
|
||||
// radius: 6,
|
||||
// titleColor: '#ff3300',
|
||||
// contColor: '#333',
|
||||
// btnColor: ''
|
||||
|
||||
},
|
||||
|
||||
goCourseDescription(v) {
|
||||
console.log(v)
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.btitle}&title=${v.btitle}&oid=${v.oid}`
|
||||
})
|
||||
},
|
||||
getCourseDescriptionData() {
|
||||
var data = {}
|
||||
var that = this
|
||||
console.log(this.$store.state, '11111111111')
|
||||
this.$http
|
||||
.post(this.urlList.list, {
|
||||
customerType
|
||||
:
|
||||
"D",
|
||||
token
|
||||
: uni.getStorageSync("token")
|
||||
,
|
||||
customerOid
|
||||
: uni.getStorageSync("customerOid"),
|
||||
oid: 'b07e45f6a5f3491db9854b16f3fd8b19',
|
||||
|
||||
|
||||
type: this.statusList[this.currentStatusIndex].type
|
||||
})
|
||||
.then(async res => {
|
||||
console.log(res.obj
|
||||
, '7777777777777777777')
|
||||
that.allDataList = res.obj
|
||||
await that.handleselectCate({ ...this.cateList[0], index: 0 })
|
||||
|
||||
|
||||
// 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.currentStatusIndex', this.currentStatusIndex)
|
||||
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
|
||||
if (this.currentStatusIndex == 0) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: './xueshugongxianDetail?id=' + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.currentStatusIndex == 1) {
|
||||
uni.navigateTo({
|
||||
url: "./medicaldesDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.currentStatusIndex == 2) {
|
||||
console.log('111', item)
|
||||
uni.navigateTo({
|
||||
url: './video?title=' + item.name + '&src=' + item.url
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.currentStatusIndex == 3) {
|
||||
console.log('111', item)
|
||||
uni.navigateTo({
|
||||
url: "./recordDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
async handleselectCate(item, index) {
|
||||
this.dataList = []
|
||||
var data = []
|
||||
console.log(item, index, 99999)
|
||||
var that = this
|
||||
this.$nextTick(() => {
|
||||
switch (item.type) {
|
||||
case 1:
|
||||
// allDataList
|
||||
this.dataList = that.allDataList.result1Lst
|
||||
break;
|
||||
case 2:
|
||||
this.dataList = that.allDataList.result2Lst
|
||||
break;
|
||||
case 3:
|
||||
this.dataList = that.allDataList.result3Lst
|
||||
break;
|
||||
case 4:
|
||||
this.dataList = that.allDataList.result4Lst.filter(e =>
|
||||
e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
|
||||
|
||||
)
|
||||
|
||||
console.log(this.dataList.length, 6666666)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.currentCateIndex = item.index
|
||||
})
|
||||
console.log(this.allDataList, this.dataList, '1688')
|
||||
// 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
|
||||
// }
|
||||
|
||||
// this.currentStatusIndex = index
|
||||
|
||||
|
||||
this.searchValue = ''
|
||||
this.searchList = []
|
||||
this.showSearchList = false
|
||||
// if (index != 2) {
|
||||
|
||||
|
||||
|
||||
|
||||
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
|
||||
// var height = rect.height
|
||||
// console.log('元素高度:',);
|
||||
|
||||
// }).exec();
|
||||
|
||||
|
||||
// } else {
|
||||
// this.getJFList(dictType)
|
||||
// }
|
||||
|
||||
|
||||
return data
|
||||
},
|
||||
async setOneCateIndex(item, index) {
|
||||
this.allDataList = []
|
||||
console.log(index, 99999)
|
||||
var that = this
|
||||
|
||||
// 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
|
||||
// }
|
||||
|
||||
this.currentStatusIndex = index
|
||||
// this.currentCateIndex = 0
|
||||
|
||||
this.searchValue = ''
|
||||
this.searchList = []
|
||||
this.showSearchList = false
|
||||
this.$nextTick(async () => {
|
||||
await that.getCourseDescriptionData()
|
||||
|
||||
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) {
|
||||
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.statusList = res.list
|
||||
this.getTowCateList(this.statusList[0].type)
|
||||
// } else {
|
||||
// this.statusList = []
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// this.statusList = []
|
||||
// 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.currentStatusIndex + 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>
|
||||
.u-grid-list {
|
||||
// height: 40rpx;
|
||||
}
|
||||
|
||||
.searchList {
|
||||
.item {
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #dadbde;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
height: calc(100% - 50px);
|
||||
|
||||
.statusList {
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 32%;
|
||||
padding: 20rpx 0;
|
||||
font-size: 34rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.cur {
|
||||
background-color: #3AB3AE;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
}
|
||||
|
||||
.twoCateList {
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.grid-text {
|
||||
padding: 10rpx 0rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cur {
|
||||
color: #3AB3AE;
|
||||
}
|
||||
|
||||
// .u-grid-list{border: 0.5px solid #dadbde;}
|
||||
}
|
||||
|
||||
.dataList {
|
||||
font-size: 26rpx;
|
||||
// margin-top: 20rpx;
|
||||
// padding: 32rpx 0rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #f8f9fa;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
|
||||
.JFtitleItem {
|
||||
background-color: #ffffff;
|
||||
padding: 20rpx 10rpx;
|
||||
width: 100%;
|
||||
border-bottom: 0.5px solid #f8f9fa;
|
||||
}
|
||||
|
||||
.wmzhimg {
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search_box {
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
width: calc(100% - 10px);
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.search {
|
||||
height: 56upx;
|
||||
display: flex;
|
||||
width: 86%;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
padding: 0upx 40upx;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
box-shadow: 0 0px 10px 1px #3AB3AE33;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #838383;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.icon_search {
|
||||
background-image: url('@/static/icon/map_ic_search.png');
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
width: 36upx;
|
||||
height: 36upx;
|
||||
margin-right: 20upx;
|
||||
}
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.uni-modal .uni-modal__bd {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.limiTy {
|
||||
font-size: 28rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.chImage {
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.dataList {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.titleList2 {
|
||||
height: calc(100% - 150rpx);
|
||||
}
|
||||
|
||||
.priceDetail {
|
||||
height: calc(100% - 0) !important;
|
||||
// height: calc(100% - 180rpx) !important;
|
||||
padding: 0rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.componentPage {
|
||||
height: calc(100% - 90rpx) !important;
|
||||
}
|
||||
|
||||
.dateReminder {
|
||||
width: 200rpx;
|
||||
font-size: 24rpx;
|
||||
text-align: right;
|
||||
line-height: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.related_courses_right{
|
||||
width: calc(100% );
|
||||
margin-top: 30rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.progress_icon{
|
||||
// width: calc(100% - 220rpx);
|
||||
width: calc(100%);
|
||||
float: left;
|
||||
}
|
||||
// position: absolute;
|
||||
// top: 100rpx;
|
||||
// right: 0;
|
||||
|
||||
}
|
||||
.fdButtonBox {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
|
||||
}
|
||||
|
||||
/deep/.common_curriculum_list {
|
||||
padding: 20rpx;
|
||||
.content_item {
|
||||
width: 100% !important;
|
||||
height: 160rpx;
|
||||
|
||||
.book_image {
|
||||
width: 200rpx !important;
|
||||
height: 120rpx !important;
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
|
||||
.common_curriculum_item{
|
||||
width: calc(100% - 220rpx);
|
||||
float: right;
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
254
pages/curriculum/order/price/index.vue
Normal file
254
pages/curriculum/order/price/index.vue
Normal file
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view class="componentPage">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
|
||||
|
||||
|
||||
|
||||
<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 {
|
||||
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: {
|
||||
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')
|
||||
this.$http
|
||||
.post('app/phoneDoctor.do?getTHTSDetail', {
|
||||
customerType
|
||||
:
|
||||
"D",
|
||||
token
|
||||
:uni.getStorageSync("token")
|
||||
,
|
||||
customerOid
|
||||
:uni.getStorageSync("customerOid"),
|
||||
// oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||
oid: this.oid,
|
||||
|
||||
|
||||
step: 0,
|
||||
limit: 100
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res.obj.dataLst
|
||||
, '7777777777777777777')
|
||||
this.detailInfo = res.obj
|
||||
|
||||
// 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;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user