268 lines
7.1 KiB
Vue
268 lines
7.1 KiB
Vue
<template>
|
||
<view class="container commonPageBox commonDetailPage">
|
||
<!-- 公共组件-每个页面必须引入 -->
|
||
<public-module></public-module>
|
||
<z-nav-bar :title="options.navTitle" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
||
|
||
|
||
<view class="contentBox commonPageWhiteBox">
|
||
<common-rich-detail :detailInfo="detailInfo">
|
||
|
||
<template #richHeadImg>
|
||
<image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="aspectFit" class="headImage"></image>
|
||
<image src="@/static/image/headImg/07.png" v-if="detailInfo.imgUrl == ''" mode="aspectFit"
|
||
class="headImage"></image>
|
||
|
||
</template>
|
||
</common-rich-detail>
|
||
|
||
|
||
<!-- <view>{{ detailInfo.content }}</view> -->
|
||
</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 {
|
||
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()
|
||
|
||
},
|
||
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, '11111111111')
|
||
|
||
this.$http
|
||
|
||
.post('app/phoneDoctor.do?getTHTSDetail', {
|
||
|
||
customerType
|
||
:
|
||
"D",
|
||
token
|
||
:uni.getStorageSync("token")
|
||
,
|
||
customerOid
|
||
:uni.getStorageSync("customerOid"),
|
||
oid: this.options.oid,
|
||
|
||
|
||
|
||
})
|
||
.then(res => {
|
||
|
||
this.detailInfo = res.obj
|
||
|
||
// if (res.obj.imgUrl) {
|
||
// $mars.getCacheImgUrl(ret.imgUrl, function(ret) {
|
||
// $api.attr($api.byId('img'), 'src', ret);
|
||
// }, 'F');
|
||
// } else {
|
||
// $api.attr($api.byId('img'), 'src', '../../../../image/headImg/07.png');
|
||
// }
|
||
|
||
// 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 {
|
||
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.detail_title {
|
||
padding: 0 40rpx;
|
||
font-size: 38rpx;
|
||
line-height: 64rpx;
|
||
font-weight: bold;
|
||
text-align: center;
|
||
box-sizing: border-box;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.rich_box {
|
||
padding: 20rpx;
|
||
box-sizing: border-box;
|
||
|
||
p {
|
||
display: block;
|
||
text-indent: 2em;
|
||
letter-spacing: 2px !important;
|
||
line-height: 46rpx;
|
||
|
||
|
||
}
|
||
}
|
||
}
|
||
</style> |