翻页
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="show">
|
<view v-if="show">
|
||||||
<swiper class="guide_pages_swiper">
|
<swiper class="guide_pages_swiper" indicator-dots="true" indicator-color="#d1d1d1" indicator-active-color="#54a966">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="guide_pages_bg1">
|
<view class="guide_pages_bg1">
|
||||||
疯子读书,
|
疯子读书,
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
和光同尘,普惠人间
|
和光同尘,普惠人间
|
||||||
</view>
|
</view>
|
||||||
<button v-if="screenHeight > 667" class="guide_pages_close close_1624" @click="onClose">开始使用</button>
|
<button v-if="screenHeight > 667" class="guide_pages_close close_1624" @click="onClose">开始使用</button>
|
||||||
<button v-else class="guide_pages_close close_1334" @click="onClose">开始使用</button>
|
<button v-else class="guide_pages_close close_btj" @click="onClose">开始使用</button>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
height: 68rpx;
|
height: 68rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close_1334 {
|
.close_btj {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
"src" : "图片路径"
|
"src" : "图片路径"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versionName" : "1.2.29",
|
"versionName" : "1.2.31",
|
||||||
"versionCode" : 1229,
|
"versionCode" : 1231,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
"ignoreVersion" : true
|
"ignoreVersion" : true
|
||||||
|
|||||||
@@ -537,6 +537,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/prescript/CNMedicineText",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "中药搜索",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/medicaldes/medicaldes",
|
"path": "pages/medicaldes/medicaldes",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -766,6 +766,10 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.header_fixed {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.tanchu {
|
.tanchu {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -508,7 +508,7 @@
|
|||||||
kefu(){
|
kefu(){
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '拨打客服热线:022-24142321',
|
content: '微信号:yilujiankangkefu',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="flexbox yigoumaiList">
|
<view class="flexbox yigoumaiList">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)">
|
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)">
|
||||||
<image v-if="item.images != '' && item.images != null" :src="item.images"
|
<image v-if="item.images != '' && item.images != null" :src="item.images"
|
||||||
mode="scaleToFill"></image>
|
mode="scaleToFill"></image>
|
||||||
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
|
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
|
||||||
@@ -71,7 +71,8 @@
|
|||||||
<image src="../../static/icon/home2.png" mode="aspectFit"></image>
|
<image src="../../static/icon/home2.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-else @click="noOp()">
|
<view v-else @click="noOp()">
|
||||||
<image class="gray" src="../../static/icon/home2.png" mode="aspectFit"></image>
|
<image class="gray" src="../../static/icon/home2.png"
|
||||||
|
mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="v1"><text>听 书</text></view>
|
<view class="v1"><text>听 书</text></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -142,8 +143,12 @@
|
|||||||
status: 3,
|
status: 3,
|
||||||
bookList: [],
|
bookList: [],
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.bookList = []
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -173,11 +178,10 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getData() {
|
getData() {
|
||||||
this.bookList=[]
|
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "book/book/getClassicsBookList",
|
url: "book/book/getClassicsBookList",
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
data:{
|
data: {
|
||||||
'bookType': this.contentShow,
|
'bookType': this.contentShow,
|
||||||
'page': this.page,
|
'page': this.page,
|
||||||
'limit': 10
|
'limit': 10
|
||||||
@@ -189,7 +193,9 @@
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '获取经典查阅书籍')
|
console.log(res, '获取经典查阅书籍')
|
||||||
if (res.page.records.length > 0) {
|
if (res.page.records.length > 0) {
|
||||||
this.bookList = this.bookList.concat(res.page.records)
|
for (var i = 0; i < res.page.records.length; i++) {
|
||||||
|
this.bookList.push(res.page.records[i])
|
||||||
|
}
|
||||||
this.totalPage = res.page.pages
|
this.totalPage = res.page.pages
|
||||||
if (this.page == this.totalPage) {
|
if (this.page == this.totalPage) {
|
||||||
this.status = 1
|
this.status = 1
|
||||||
@@ -264,6 +270,8 @@
|
|||||||
// 切换
|
// 切换
|
||||||
TabData(e) {
|
TabData(e) {
|
||||||
this.contentShow = e
|
this.contentShow = e
|
||||||
|
this.page = 1
|
||||||
|
this.bookList = []
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -293,10 +301,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 点不过去的
|
// 点不过去的
|
||||||
noOp(){
|
noOp() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'该书未开通此功能',
|
title: '该书未开通此功能',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -514,11 +522,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.gray {
|
.gray {
|
||||||
-webkit-filter: grayscale(100%);
|
-webkit-filter: grayscale(100%);
|
||||||
-moz-filter: grayscale(100%);
|
-moz-filter: grayscale(100%);
|
||||||
-ms-filter: grayscale(100%);
|
-ms-filter: grayscale(100%);
|
||||||
-o-filter: grayscale(100%);
|
-o-filter: grayscale(100%);
|
||||||
filter: grayscale(100%);
|
filter: grayscale(100%);
|
||||||
filter: gray;
|
filter: gray;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
45
pages/medicaldes/medurl.vue
Normal file
45
pages/medicaldes/medurl.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
<public-module></public-module>
|
||||||
|
<z-nav-bar></z-nav-bar>
|
||||||
|
<view class="contentBox">
|
||||||
|
|
||||||
|
<web-view :webview-styles="webviewStyles" :src="id"></web-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id: '',
|
||||||
|
webviewStyles: {
|
||||||
|
progress: {
|
||||||
|
color: '#000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.id = uni.getStorageSync('prescriptUrl')
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/style/mixin.scss';
|
||||||
|
</style>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
makeTel(){
|
makeTel(){
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '拨打客服热线:022-24142321',
|
content: '微信号:yilujiankangkefu',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
|
|||||||
@@ -5,14 +5,51 @@
|
|||||||
<z-nav-bar title="中药检索"></z-nav-bar>
|
<z-nav-bar title="中药检索"></z-nav-bar>
|
||||||
<view class="contentBox">
|
<view class="contentBox">
|
||||||
<view class="grid twoCateList" v-if="twoCateList.length > 0">
|
<view class="grid twoCateList" v-if="twoCateList.length > 0">
|
||||||
<u-grid :col="2" border class="u-grid-list">
|
<u-grid :col="2" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in twoCateList" :key="item.id"
|
<u-grid-item v-for="(item, index) in twoCateList" :key="item.id"
|
||||||
@click="setTwoCateIndex(item, index)">
|
@click="setTwoCateIndex(item, index)">
|
||||||
<view :class="['grid-text',false ? 'cur' : '']">{{item.title}}</view>
|
<view :class="['grid-text',false ? 'cur' : '']">
|
||||||
</u-grid-item>
|
{{item.title}}
|
||||||
</u-grid>
|
<b v-if="index==0&&xingweiShow">
|
||||||
</view>
|
<u-icon name="arrow-up-fill" color="#666" size="12"></u-icon>
|
||||||
<!-- <view class="searchList" v-show="showSearchList">
|
</b>
|
||||||
|
<b v-if="index==0&&!xingweiShow">
|
||||||
|
<u-icon name="arrow-down-fill" color="#666" size="12"></u-icon>
|
||||||
|
</b>
|
||||||
|
<b v-if="index==1&&gongxiaoShow">
|
||||||
|
<u-icon name="arrow-up-fill" color="#666" size="12"></u-icon>
|
||||||
|
</b>
|
||||||
|
<b v-if="index==1&&!gongxiaoShow">
|
||||||
|
<u-icon name="arrow-down-fill" color="#666" size="12"></u-icon>
|
||||||
|
</b>
|
||||||
|
</view>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
</view>
|
||||||
|
<view class="marYao" @click="xingweiShow = true"
|
||||||
|
v-if="curXingIndex.length>0||curWeiIndex.length>0||curGuijingIndex.length>0">
|
||||||
|
性味:
|
||||||
|
<span v-for="(item, index) in curXingIndex">
|
||||||
|
{{item}}
|
||||||
|
<font>,</font>
|
||||||
|
</span>
|
||||||
|
<span v-for="(item, index) in curWeiIndex">
|
||||||
|
{{item}}
|
||||||
|
<font>,</font>
|
||||||
|
</span>
|
||||||
|
<span v-for="(item, index) in curGuijingIndex">
|
||||||
|
{{item}}
|
||||||
|
<font>,</font>
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
<view class="marYao" @click="gongxiaoShow = true" v-if="curGongxiaoIndex.length>0">
|
||||||
|
功效:
|
||||||
|
<span v-for="(item, index) in curGongxiaoIndex">
|
||||||
|
{{item}}
|
||||||
|
<font v-if="index+1!=curGongxiaoIndex.length">,</font>
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="searchList" v-show="showSearchList">
|
||||||
<view class="itemBox" v-if="searchList.length > 0">
|
<view class="itemBox" v-if="searchList.length > 0">
|
||||||
<view class="item" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item)">
|
<view class="item" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item)">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
@@ -22,7 +59,7 @@
|
|||||||
<u-divider text="未找到相关中药哦~"></u-divider>
|
<u-divider text="未找到相关中药哦~"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view v-show="!showSearchList">
|
<view v-show="!showSearchList">
|
||||||
<!-- <view class="grid twoCateList" v-if="twoCateList.length > 0 && curOneCateIndex == 1">
|
<!-- <view class="grid twoCateList" v-if="twoCateList.length > 0 && curOneCateIndex == 1">
|
||||||
<u-grid :col="3" border class="u-grid-list">
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
||||||
@@ -43,12 +80,25 @@
|
|||||||
<view class="titleList">
|
<view class="titleList">
|
||||||
<u-grid :col="1" v-if="titleList.length > 0">
|
<u-grid :col="1" v-if="titleList.length > 0">
|
||||||
<!-- <view style="font-size: 15px;padding: 5px;color: red;">大家常看的</view> -->
|
<!-- <view style="font-size: 15px;padding: 5px;color: red;">大家常看的</view> -->
|
||||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id"
|
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
|
||||||
@click="gotoCNDetail(item)" style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||||
<view :class="['titleItem']">{{item.name}}</view>
|
<view :class="['titleItem']">{{item.name}}</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
|
|
||||||
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<view v-if="status==0" style="text-align: center;padding: 20rpx 0;">
|
||||||
|
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||||
|
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>
|
||||||
|
努力加载中
|
||||||
|
</font>
|
||||||
|
</view>
|
||||||
|
<view v-if="status==1" style="padding: 20rpx 0;">
|
||||||
|
<u-divider text="全部加载完成"></u-divider>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -59,7 +109,8 @@
|
|||||||
<u-grid :col="3" border class="u-grid-list">
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in xingSelectionList" :key="item.title"
|
<u-grid-item v-for="(item, index) in xingSelectionList" :key="item.title"
|
||||||
@click="setXingIndex(item, index, curXingIndex)">
|
@click="setXingIndex(item, index, curXingIndex)">
|
||||||
<view :class="['grid-text',curXingIndex.includes(item.title) ? 'cur' : '']">{{item.title}}</view>
|
<view :class="['grid-text',curXingIndex.includes(item.title) ? 'cur' : '']">{{item.title}}
|
||||||
|
</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
@@ -68,7 +119,8 @@
|
|||||||
<u-grid :col="3" border class="u-grid-list">
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in weiSelectionList" :key="item.title"
|
<u-grid-item v-for="(item, index) in weiSelectionList" :key="item.title"
|
||||||
@click="setXingIndex(item, index, curWeiIndex)">
|
@click="setXingIndex(item, index, curWeiIndex)">
|
||||||
<view :class="['grid-text',curWeiIndex.includes(item.title) ? 'cur' : '']">{{item.title}}</view>
|
<view :class="['grid-text',curWeiIndex.includes(item.title) ? 'cur' : '']">{{item.title}}
|
||||||
|
</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
@@ -77,7 +129,9 @@
|
|||||||
<u-grid :col="3" border class="u-grid-list">
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in guijingSelectionList" :key="item.title"
|
<u-grid-item v-for="(item, index) in guijingSelectionList" :key="item.title"
|
||||||
@click="setXingIndex(item, index, curGuijingIndex)">
|
@click="setXingIndex(item, index, curGuijingIndex)">
|
||||||
<view :class="['grid-text',curGuijingIndex.includes(item.title) ? 'cur' : '']">{{item.title}}</view>
|
<view :class="['grid-text',curGuijingIndex.includes(item.title) ? 'cur' : '']">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
@@ -85,7 +139,7 @@
|
|||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
||||||
<view>
|
<view>
|
||||||
<u-button type="success" @click="goToSearch">查询</u-button>
|
<u-button type="success" @click="goNewSearch">查询</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -98,7 +152,9 @@
|
|||||||
<u-grid :col="3" border class="u-grid-list">
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in gongxiaoSelectionList" :key="item.title"
|
<u-grid-item v-for="(item, index) in gongxiaoSelectionList" :key="item.title"
|
||||||
@click="setXingIndex(item, index, curGongxiaoIndex)">
|
@click="setXingIndex(item, index, curGongxiaoIndex)">
|
||||||
<view :class="['grid-text',curGongxiaoIndex.includes(item.title) ? 'cur' : '']">{{item.title}}</view>
|
<view :class="['grid-text',curGongxiaoIndex.includes(item.title) ? 'cur' : '']">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
@@ -106,7 +162,7 @@
|
|||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
||||||
<view>
|
<view>
|
||||||
<u-button type="success" @click="goToSearch">查询</u-button>
|
<u-button type="success" @click="goNewSearch">查询</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -130,66 +186,145 @@
|
|||||||
xingweiShow: false, // 查询条件弹出层,性味
|
xingweiShow: false, // 查询条件弹出层,性味
|
||||||
gongxiaoShow: false, // 查询条件弹出层,功效
|
gongxiaoShow: false, // 查询条件弹出层,功效
|
||||||
sanpinShow: false, // 查询条件弹出层,sanpin
|
sanpinShow: false, // 查询条件弹出层,sanpin
|
||||||
xingSelectionList: [
|
xingSelectionList: [{
|
||||||
{title: "寒"},
|
title: "寒"
|
||||||
{title: "凉"},
|
},
|
||||||
{title: "平"},
|
{
|
||||||
{title: "温"},
|
title: "凉"
|
||||||
{title: "热"},
|
},
|
||||||
|
{
|
||||||
|
title: "平"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "温"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "热"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
weiSelectionList: [
|
weiSelectionList: [{
|
||||||
{title: "酸"},
|
title: "酸"
|
||||||
{title: "涩"},
|
},
|
||||||
{title: "甘"},
|
{
|
||||||
{title: "苦"},
|
title: "涩"
|
||||||
{title: "辛"},
|
},
|
||||||
{title: "咸"},
|
{
|
||||||
{title: "淡"},
|
title: "甘"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "苦"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "辛"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "咸"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "淡"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
guijingSelectionList: [
|
guijingSelectionList: [{
|
||||||
{title: "心"},
|
title: "心"
|
||||||
{title: "肝"},
|
},
|
||||||
{title: "脾"},
|
{
|
||||||
{title: "肺"},
|
title: "肝"
|
||||||
{title: "肾"},
|
},
|
||||||
{title: "肠"},
|
{
|
||||||
{title: "膀胱"},
|
title: "脾"
|
||||||
{title: "胃"},
|
},
|
||||||
|
{
|
||||||
|
title: "肺"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "肾"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "肠"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "膀胱"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "胃"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
curXingIndex: [],
|
curXingIndex: [],
|
||||||
curWeiIndex: [],
|
curWeiIndex: [],
|
||||||
curGuijingIndex: [],
|
curGuijingIndex: [],
|
||||||
gongxiaoSelectionList: [
|
gongxiaoSelectionList: [{
|
||||||
{title: "解表"},
|
title: "解表"
|
||||||
{title: "清热"},
|
},
|
||||||
{title: "泻下"},
|
{
|
||||||
{title: "祛风湿"},
|
title: "清热"
|
||||||
{title: "芳香化湿"},
|
},
|
||||||
{title: "利水渗湿"},
|
{
|
||||||
{title: "温里"},
|
title: "泻下"
|
||||||
{title: "理气"},
|
},
|
||||||
{title: "消食"},
|
{
|
||||||
{title: "驱虫"},
|
title: "祛风湿"
|
||||||
{title: "止血"},
|
},
|
||||||
{title: "活血祛瘀"},
|
{
|
||||||
{title: "化痰止咳平喘"},
|
title: "芳香化湿"
|
||||||
{title: "安神"},
|
},
|
||||||
{title: "平肝息风"},
|
{
|
||||||
{title: "开窍"},
|
title: "利水渗湿"
|
||||||
{title: "补虚"},
|
},
|
||||||
{title: "收涩"},
|
{
|
||||||
{title: "涌吐"},
|
title: "温里"
|
||||||
{title: "外用及其他"},
|
},
|
||||||
|
{
|
||||||
|
title: "理气"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "消食"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "驱虫"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "止血"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活血祛瘀"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "化痰止咳平喘"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "安神"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "平肝息风"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "开窍"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "补虚"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "收涩"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "涌吐"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "外用及其他"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
curGongxiaoIndex: [],
|
curGongxiaoIndex: [],
|
||||||
|
|
||||||
|
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
twoCateList: [
|
twoCateList: [{
|
||||||
{title:"性味", id: 1},
|
title: "性味",
|
||||||
{title:"功效", id: 2},
|
id: 1
|
||||||
// {title:"三品", id: 3}
|
},
|
||||||
], // 二级分类标题
|
{
|
||||||
|
title: "功效",
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
// {title:"三品", id: 3}
|
||||||
|
], // 二级分类标题
|
||||||
titleList: [], // 方剂标题
|
titleList: [], // 方剂标题
|
||||||
curFirstTabIndex: 0, // 20240128需求:在原来一级分类基础上再新加一级分类:方剂检索、药物检索
|
curFirstTabIndex: 0, // 20240128需求:在原来一级分类基础上再新加一级分类:方剂检索、药物检索
|
||||||
curOneCateIndex: 0, // 当前选中的一级分类
|
curOneCateIndex: 0, // 当前选中的一级分类
|
||||||
@@ -200,11 +335,15 @@
|
|||||||
searchDisable: false, // 搜索不可用
|
searchDisable: false, // 搜索不可用
|
||||||
limitShow: false,
|
limitShow: false,
|
||||||
limitTitle: '提示',
|
limitTitle: '提示',
|
||||||
limitContent: ''
|
limitContent: '',
|
||||||
|
status: 3,
|
||||||
|
page: 1,
|
||||||
|
totalPage: 1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.goToSearch()
|
this.goNewSearch()
|
||||||
|
this.titleList = []
|
||||||
// this.getUserInfo()
|
// this.getUserInfo()
|
||||||
// this.getCateList()
|
// this.getCateList()
|
||||||
|
|
||||||
@@ -212,6 +351,25 @@
|
|||||||
onHide() {
|
onHide() {
|
||||||
// this.showSearchList = false
|
// this.showSearchList = false
|
||||||
// this.searchList = []
|
// this.searchList = []
|
||||||
|
this.page = 1
|
||||||
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log('下拉刷新了')
|
||||||
|
// this.contentShow = 1
|
||||||
|
this.page = 1
|
||||||
|
this.goToSearch()
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// this.loadingNow = true
|
||||||
|
console.log('到底了')
|
||||||
|
if (this.page + 1 <= this.totalPage) {
|
||||||
|
this.page++
|
||||||
|
this.goToSearch()
|
||||||
|
} else {
|
||||||
|
this.status = 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userInfo']),
|
...mapState(['userInfo']),
|
||||||
@@ -229,22 +387,34 @@
|
|||||||
// 若不包含,则向数组中添加该值
|
// 若不包含,则向数组中添加该值
|
||||||
arr.push(item.title);
|
arr.push(item.title);
|
||||||
}
|
}
|
||||||
|
this.page = 1
|
||||||
|
this.titleList = []
|
||||||
|
this.goToSearch()
|
||||||
console.log(arr);
|
console.log(arr);
|
||||||
},
|
},
|
||||||
|
goNewSearch() {
|
||||||
|
this.page = 1
|
||||||
|
this.titleList = []
|
||||||
|
this.goToSearch()
|
||||||
|
this.xingweiShow = false
|
||||||
|
this.gongxiaoShow = false
|
||||||
|
this.sanpinShow = false
|
||||||
|
},
|
||||||
|
|
||||||
goToSearch() {
|
goToSearch() {
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "book/materials/getMaterialsList",
|
url: "book/materials/getMaterialsList",
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
data: {
|
data: {
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
"limit": 100,
|
"limit": 20,
|
||||||
"current": 1,
|
"current": this.page,
|
||||||
"name":"",
|
"name": "",
|
||||||
"type": "", // 植物、矿物、动物
|
"type": "", // 植物、矿物、动物
|
||||||
"effect": this.curGongxiaoIndex.join(','),//功效
|
"effect": this.curGongxiaoIndex.join(','), //功效
|
||||||
"taste": this.curWeiIndex.join(','), //味
|
"taste": this.curWeiIndex.join(','), //味
|
||||||
"property": this.curXingIndex.join(','), //性
|
"property": this.curXingIndex.join(','), //性
|
||||||
"tropism":this.curGuijingIndex.join(',') //归经
|
"tropism": this.curGuijingIndex.join(',') //归经
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@@ -252,11 +422,18 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, '内容获取成功')
|
console.log(res, '内容获取成功')
|
||||||
if (res.code == 0 && res.result.records.length > 0) {
|
if (res.code == 0 && res.result.records.length > 0) {
|
||||||
this.titleList = res.result.records
|
for (var i = 0; i < res.result.records.length; i++) {
|
||||||
|
this.titleList.push(res.result.records[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
this.totalPage = res.result.pages
|
||||||
|
if (this.page == this.totalPage) {
|
||||||
|
this.status = 1
|
||||||
|
} else {
|
||||||
|
this.status = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.xingweiShow = false
|
|
||||||
this.gongxiaoShow = false
|
|
||||||
this.sanpinShow = false
|
|
||||||
} else {
|
} else {
|
||||||
this.titleList = []
|
this.titleList = []
|
||||||
}
|
}
|
||||||
@@ -265,6 +442,7 @@
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
gotoCNDetail(item) {
|
gotoCNDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "./CNMedicineSearchDetail?id=" + item.id
|
url: "./CNMedicineSearchDetail?id=" + item.id
|
||||||
@@ -289,17 +467,18 @@
|
|||||||
setTwoCateIndex(item, index) {
|
setTwoCateIndex(item, index) {
|
||||||
let id = item.id
|
let id = item.id
|
||||||
this.curTwoCateIndex = index
|
this.curTwoCateIndex = index
|
||||||
if(id == 1){
|
if (id == 1) {
|
||||||
this.xingweiShow = true
|
this.xingweiShow = true
|
||||||
this.gongxiaoShow = false
|
this.gongxiaoShow = false
|
||||||
this.sanpinShow = false
|
this.sanpinShow = false
|
||||||
}
|
}
|
||||||
if(id == 2){
|
if (id == 2) {
|
||||||
this.xingweiShow = false
|
this.xingweiShow = false
|
||||||
this.gongxiaoShow = true
|
this.gongxiaoShow = true
|
||||||
this.sanpinShow = false
|
this.sanpinShow = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
onBackPress() {
|
onBackPress() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -342,7 +521,8 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.firstTab{
|
|
||||||
|
.firstTab {
|
||||||
text {
|
text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -361,13 +541,21 @@
|
|||||||
.grid-text {
|
.grid-text {
|
||||||
padding: 16rpx 20rpx;
|
padding: 16rpx 20rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-text>b {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
color: #55aa7f;
|
color: #55aa7f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-grid-list{
|
.u-grid-list {
|
||||||
// border-top: 0.5px solid #dadbde;
|
// border-top: 0.5px solid #dadbde;
|
||||||
// border-bottom: 0.5px solid #dadbde;
|
// border-bottom: 0.5px solid #dadbde;
|
||||||
}
|
}
|
||||||
@@ -391,6 +579,32 @@
|
|||||||
border-bottom: 0.5px solid #f8f9fa;
|
border-bottom: 0.5px solid #f8f9fa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.marYao {
|
||||||
|
background-color: #55aa7f1c;
|
||||||
|
padding: 10rpx 20rpx 10rpx 20rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #225f40;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
span {
|
||||||
|
|
||||||
|
color: #55aa7f;
|
||||||
|
|
||||||
|
font {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.marYao:nth-last-child(1) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -400,42 +614,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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 #54a96633;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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 {
|
.flexbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -445,7 +624,7 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.limiTy{
|
.limiTy {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 46rpx;
|
line-height: 46rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item" v-html="prescriptDetail.taste">
|
<view class="item" v-html="prescriptDetail.taste">
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item" v-html="prescriptDetail.effect">
|
||||||
|
</view>
|
||||||
</uni-section>
|
</uni-section>
|
||||||
|
|
||||||
<uni-section class="mb-10" titleFontSize="18px" title="来源产地" type="line" v-if="prescriptDetail.insuranceType && prescriptDetail.insuranceType != ''" >
|
<uni-section class="mb-10" titleFontSize="18px" title="来源产地" type="line" v-if="prescriptDetail.insuranceType && prescriptDetail.insuranceType != ''" >
|
||||||
|
|||||||
191
pages/prescript/CNMedicineText.vue
Normal file
191
pages/prescript/CNMedicineText.vue
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
<public-module></public-module>
|
||||||
|
<z-nav-bar title="中药搜索"></z-nav-bar>
|
||||||
|
<view class="contentBox">
|
||||||
|
<view class="search_box">
|
||||||
|
<u-search :clearabled="true" bgColor="#fff" borderColor="#54a966" focus v-model="keyword"
|
||||||
|
@custom='souYao' @clear="souYao"></u-search>
|
||||||
|
</view>
|
||||||
|
<view class="titleList">
|
||||||
|
<u-grid :col="1" v-if="titleList.length > 0">
|
||||||
|
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
|
||||||
|
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||||
|
<view :class="['titleItem']">{{item.name}}</view>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view v-if="status==0" style="text-align: center;padding: 20rpx 0;">
|
||||||
|
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||||
|
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>
|
||||||
|
努力加载中
|
||||||
|
</font>
|
||||||
|
</view>
|
||||||
|
<view v-if="status==1" style="padding: 20rpx 0;">
|
||||||
|
<u-divider text="全部加载完成"></u-divider>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
keyword: '',
|
||||||
|
titleList: [],
|
||||||
|
status: 3,
|
||||||
|
page: 1,
|
||||||
|
totalPage: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.titleList = []
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
this.page = 1
|
||||||
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log('下拉刷新了')
|
||||||
|
// this.contentShow = 1
|
||||||
|
this.page = 1
|
||||||
|
this.goToSearch()
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// this.loadingNow = true
|
||||||
|
console.log('到底了')
|
||||||
|
if (this.page + 1 <= this.totalPage) {
|
||||||
|
this.page++
|
||||||
|
this.goToSearch()
|
||||||
|
} else {
|
||||||
|
this.status = 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['userInfo']),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 搜索
|
||||||
|
goToSearch() {
|
||||||
|
$http.request({
|
||||||
|
url: "book/materials/getMaterialsList",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
|
"limit": 20,
|
||||||
|
"current": this.page,
|
||||||
|
"name": this.keyword,
|
||||||
|
"type": "", // 植物、矿物、动物
|
||||||
|
"effect": '', //功效
|
||||||
|
"taste": '', //味
|
||||||
|
"property": '', //性
|
||||||
|
"tropism": '' //归经
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res, '内容获取成功')
|
||||||
|
if (res.code == 0 && res.result.records.length > 0) {
|
||||||
|
for (var i = 0; i < res.result.records.length; i++) {
|
||||||
|
this.titleList.push(res.result.records[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
this.totalPage = res.result.pages
|
||||||
|
if (this.page == this.totalPage) {
|
||||||
|
this.status = 1
|
||||||
|
} else {
|
||||||
|
this.status = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.titleList = []
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
this.titleList = []
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 点击搜索
|
||||||
|
souYao() {
|
||||||
|
this.page = 1
|
||||||
|
this.titleList = []
|
||||||
|
this.goToSearch()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 跳转详情
|
||||||
|
gotoCNDetail(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./CNMedicineSearchDetail?id=" + item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.key.hideSoftKeybord();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
padding: 10rpx;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentBox {
|
||||||
|
|
||||||
|
.titleList {
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
|
||||||
|
.titleItem {
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.JFtitleItem {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 0.5px solid #f8f9fa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.search_box {
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
align-items: center;
|
||||||
|
width: calc(100% - 10px);
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,206 +2,243 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="contentBox">
|
<view class="contentBox">
|
||||||
<view class="oneCateList flexbox">
|
<view class="oneCateList flexbox">
|
||||||
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
|
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
|
||||||
v-for="(item, index) in ywTabList" :key="item.prescriptCategoryId">{{item.title}}</text>
|
v-for="(item, index) in ywTabList" :key="item.prescriptCategoryId">{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="search_box" v-if="oneCateList.length > 0 && curOneCateIndex == 0" @click="checkDisable">
|
<view class="search_box" v-if="oneCateList.length > 0 && curOneCateIndex == 0" @click="gotoSousuo()">
|
||||||
<u-search placeholder="请输入药物名" :showAction="false"></u-search>
|
<u-search placeholder="请输入药物名" :showAction="false" disabled></u-search>
|
||||||
</view>
|
</view>
|
||||||
<view class="searchList" v-show="showSearchList">
|
<view class="searchList" v-show="showSearchList">
|
||||||
<view class="itemBox" v-if="searchList.length > 0">
|
<view class="itemBox" v-if="searchList.length > 0">
|
||||||
<view class="item" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item)">
|
<view class="item" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item)">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="">
|
<view v-else class="">
|
||||||
<u-divider text="未找到相关药物哦~"></u-divider>
|
<u-divider text="未找到相关药物哦~"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-show="!showSearchList">
|
<view v-show="!showSearchList">
|
||||||
<view class="grid twoCateList" v-if="twoCateList.length > 0 && curOneCateIndex == 1">
|
<view class="grid twoCateList" v-if="twoCateList.length > 0 && curOneCateIndex == 1">
|
||||||
<u-grid :col="3" border class="u-grid-list">
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
||||||
@click="setTwoCateIndex(item, index)">
|
@click="setTwoCateIndex(item, index)">
|
||||||
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.title}}</view>
|
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.title}}</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
<view class="titleList" v-if="curOneCateIndex == 1">
|
<view class="titleList" v-if="curOneCateIndex == 1">
|
||||||
<u-grid :col="1" v-if="titleList.length > 0">
|
<u-grid :col="1" v-if="titleList.length > 0">
|
||||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id"
|
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||||
@click="gotoDetail(item)" style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||||
<view :class="['titleItem']">{{item.name}}</view>
|
<view :class="['titleItem']">{{item.name}}</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid>
|
</u-grid>
|
||||||
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
<view class="titleList" v-else>
|
<view style="padding: 10rpx 20rpx 0 20rpx;font-size: 30rpx;" v-if="!curOneCateIndex == 1">
|
||||||
<u-grid :col="1" v-if="titleList.length > 0">
|
<b>大家常看的</b>
|
||||||
<view style="font-size: 15px;padding: 5px;color: red;">大家常看的</view>
|
<view style="color: #55aa7f;float: right;font-weight: bold;" @click="gotoFenlei()">
|
||||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id"
|
<img src="../../static/jainsuo.png" alt="" style="width: 36rpx;vertical-align: text-top;margin-right: 8rpx;">
|
||||||
@click="gotoCNDetail(item)" style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
分类检索
|
||||||
<view :class="['titleItem']">{{item.name}}</view>
|
</view>
|
||||||
</u-grid-item>
|
</view>
|
||||||
</u-grid>
|
<view class="titleList" v-if="!curOneCateIndex == 1">
|
||||||
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
<u-grid :col="1" v-if="titleList.length > 0">
|
||||||
</view>
|
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
|
||||||
</view>
|
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||||
|
<view :class="['titleItem']">{{item.name}}</view>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
export default {
|
export default {
|
||||||
// props: {
|
// props: {
|
||||||
// type: Number, // 下拉状态(inOffset:1, outOffset:2, showLoading:3, endDownScroll:4)
|
// type: Number, // 下拉状态(inOffset:1, outOffset:2, showLoading:3, endDownScroll:4)
|
||||||
// rate: Number // 下拉比率 (inOffset: rate<1; outOffset: rate>=1)
|
// rate: Number // 下拉比率 (inOffset: rate<1; outOffset: rate>=1)
|
||||||
// },
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ywTabList:[{
|
ywTabList: [{
|
||||||
prescriptCategoryId: 1,
|
prescriptCategoryId: 1,
|
||||||
title: '中药检索'
|
title: '中药检索'
|
||||||
},{
|
}, {
|
||||||
prescriptCategoryId: 2,
|
prescriptCategoryId: 2,
|
||||||
title: '西药检索'
|
title: '西药检索'
|
||||||
}],
|
}],
|
||||||
playData: {},
|
playData: {},
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
oneCateList: [{
|
oneCateList: [{
|
||||||
prescriptCategoryId: 0
|
prescriptCategoryId: 0
|
||||||
}], // 一级分类标题1
|
}], // 一级分类标题1
|
||||||
twoCateList: [
|
twoCateList: [{
|
||||||
{prescriptCategoryId: 1, title: '抗感染类'},
|
prescriptCategoryId: 1,
|
||||||
{prescriptCategoryId: 2, title: '神经类'},
|
title: '抗感染类'
|
||||||
{prescriptCategoryId: 3, title: '精神类'},
|
},
|
||||||
{prescriptCategoryId: 4, title: '抗肿瘤类'},
|
{
|
||||||
{prescriptCategoryId: 5, title: '心血管类'},
|
prescriptCategoryId: 2,
|
||||||
{prescriptCategoryId: 6, title: '呼吸类'},
|
title: '神经类'
|
||||||
{prescriptCategoryId: 7, title: '泌尿系统类'},
|
},
|
||||||
{prescriptCategoryId: 8, title: '消化类'},
|
{
|
||||||
{prescriptCategoryId: 9, title: '麻醉及其辅助'},
|
prescriptCategoryId: 3,
|
||||||
], // 二级分类标题
|
title: '精神类'
|
||||||
titleList: [], // 药物标题
|
},
|
||||||
curOneCateIndex: 0, // 当前选中的一级分类
|
{
|
||||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
prescriptCategoryId: 4,
|
||||||
searchList: [], // 搜索结果数组
|
title: '抗肿瘤类'
|
||||||
showSearchList: false,
|
},
|
||||||
userMes: {}, // 用户信息
|
{
|
||||||
searchDisable: false, // 搜索不可用
|
prescriptCategoryId: 5,
|
||||||
limitShow: false,
|
title: '心血管类'
|
||||||
limitTitle: '提示',
|
},
|
||||||
limitContent: ''
|
{
|
||||||
}
|
prescriptCategoryId: 6,
|
||||||
},
|
title: '呼吸类'
|
||||||
// onLoad() {
|
},
|
||||||
// this.getCNYao()
|
{
|
||||||
// },
|
prescriptCategoryId: 7,
|
||||||
methods: {
|
title: '泌尿系统类'
|
||||||
setOneCateIndex(item, index) {
|
},
|
||||||
// let id = item.prescriptCategoryId
|
{
|
||||||
this.curOneCateIndex = index
|
prescriptCategoryId: 8,
|
||||||
this.curTwoCateIndex = 0
|
title: '消化类'
|
||||||
this.searchValue = ''
|
},
|
||||||
this.searchList = []
|
{
|
||||||
this.showSearchList = false
|
prescriptCategoryId: 9,
|
||||||
if (index == 1) { // 西药检索
|
title: '麻醉及其辅助'
|
||||||
this.getXiYao('抗感染类',1)
|
},
|
||||||
} else { // 中药检索
|
], // 二级分类标题
|
||||||
// this.getTowCateList(id)
|
titleList: [], // 药物标题
|
||||||
this.getCNYao() // book/materials/getMaterialsList
|
curOneCateIndex: 0, // 当前选中的一级分类
|
||||||
}
|
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||||
},
|
searchList: [], // 搜索结果数组
|
||||||
setTwoCateIndex(item, index) {
|
showSearchList: false,
|
||||||
let id = item.title
|
userMes: {}, // 用户信息
|
||||||
this.curTwoCateIndex = index
|
searchDisable: false, // 搜索不可用
|
||||||
this.getXiYao(id,1)
|
limitShow: false,
|
||||||
},
|
limitTitle: '提示',
|
||||||
// 获取西药
|
limitContent: ''
|
||||||
getXiYao(id, type) {
|
}
|
||||||
$http.request({
|
},
|
||||||
url: "book/materials/getDrugList",
|
// onLoad() {
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
// this.getCNYao()
|
||||||
data: {
|
// },
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
methods: {
|
||||||
"limit": 1000,
|
setOneCateIndex(item, index) {
|
||||||
"current": 1,
|
// let id = item.prescriptCategoryId
|
||||||
"name":"",
|
this.curOneCateIndex = index
|
||||||
"kind": id, // 药品类型 抗病毒药/解热镇痛、非甾体抗炎药.......
|
this.curTwoCateIndex = 0
|
||||||
"prescriptionType":"", // 处方类型 处方药/OTC甲类/OTC乙类
|
this.searchValue = ''
|
||||||
"insuranceType":"", // 医保类型 非医保/医保甲类/医保乙类
|
this.searchList = []
|
||||||
"type": type, // 0中药1西药
|
this.showSearchList = false
|
||||||
},
|
if (index == 1) { // 西药检索
|
||||||
header: { //默认 无 说明:请求头
|
this.getXiYao('抗感染类', 1)
|
||||||
'Content-Type': 'application/json'
|
} else { // 中药检索
|
||||||
},
|
// this.getTowCateList(id)
|
||||||
}).then(res => {
|
this.getCNYao() // book/materials/getMaterialsList
|
||||||
console.log(res, '内容获取成功')
|
}
|
||||||
if (res.code == 0 && res.result.records.length > 0) {
|
},
|
||||||
this.titleList = res.result.records
|
setTwoCateIndex(item, index) {
|
||||||
} else {
|
let id = item.title
|
||||||
this.titleList = []
|
this.curTwoCateIndex = index
|
||||||
}
|
this.getXiYao(id, 1)
|
||||||
}).catch(e => {
|
},
|
||||||
this.titleList = []
|
// 获取西药
|
||||||
console.log(e)
|
getXiYao(id, type) {
|
||||||
})
|
$http.request({
|
||||||
},
|
url: "book/materials/getDrugList",
|
||||||
// 详情
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
gotoDetail(item) {
|
data: {
|
||||||
console.log('111111111111')
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
uni.navigateTo({
|
"limit": 1000,
|
||||||
url: "./medicineSearchDetail?id=" + item.id
|
"current": 1,
|
||||||
})
|
"name": "",
|
||||||
},
|
"kind": id, // 药品类型 抗病毒药/解热镇痛、非甾体抗炎药.......
|
||||||
// 获取中药
|
"prescriptionType": "", // 处方类型 处方药/OTC甲类/OTC乙类
|
||||||
getCNYao(id, type) {
|
"insuranceType": "", // 医保类型 非医保/医保甲类/医保乙类
|
||||||
$http.request({
|
"type": type, // 0中药1西药
|
||||||
url: "book/materials/getMaterialsList",
|
},
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
header: { //默认 无 说明:请求头
|
||||||
data: {
|
'Content-Type': 'application/json'
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
},
|
||||||
"limit": 10,
|
}).then(res => {
|
||||||
"current": 1,
|
console.log(res, '内容获取成功')
|
||||||
"name":"",
|
if (res.code == 0 && res.result.records.length > 0) {
|
||||||
"type": "", // 植物、矿物、动物
|
this.titleList = res.result.records
|
||||||
"effect": "",//功效
|
} else {
|
||||||
"taste": "", //味
|
this.titleList = []
|
||||||
"property": "", //性
|
}
|
||||||
"tropism":"" //归经
|
}).catch(e => {
|
||||||
},
|
this.titleList = []
|
||||||
header: { //默认 无 说明:请求头
|
console.log(e)
|
||||||
'Content-Type': 'application/json'
|
})
|
||||||
},
|
},
|
||||||
}).then(res => {
|
// 详情
|
||||||
console.log(res, '内容获取成功')
|
gotoDetail(item) {
|
||||||
if (res.code == 0 && res.result.records.length > 0) {
|
console.log('111111111111')
|
||||||
this.titleList = res.result.records
|
uni.navigateTo({
|
||||||
} else {
|
url: "./medicineSearchDetail?id=" + item.id
|
||||||
this.titleList = []
|
})
|
||||||
}
|
},
|
||||||
}).catch(e => {
|
// 获取中药
|
||||||
this.titleList = []
|
getCNYao(id, type) {
|
||||||
console.log(e)
|
$http.request({
|
||||||
})
|
url: "book/materials/getMaterialsList",
|
||||||
},
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
gotoCNDetail(item) {
|
data: {
|
||||||
console.log('2222')
|
// loadAnimate: 'none', // 请求加载动画
|
||||||
uni.navigateTo({
|
"limit": 10,
|
||||||
url: "./CNMedicineSearchDetail?id=" + item.id
|
"current": 1,
|
||||||
})
|
"name": "",
|
||||||
},
|
"type": "", // 植物、矿物、动物
|
||||||
checkDisable(){
|
"effect": "", //功效
|
||||||
uni.navigateTo({
|
"taste": "", //味
|
||||||
url: "./CNMedicineSearch"
|
"property": "", //性
|
||||||
})
|
"tropism": "" //归经
|
||||||
}
|
},
|
||||||
}
|
header: { //默认 无 说明:请求头
|
||||||
};
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res, '内容获取成功')
|
||||||
|
if (res.code == 0 && res.result.records.length > 0) {
|
||||||
|
this.titleList = res.result.records
|
||||||
|
} else {
|
||||||
|
this.titleList = []
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
this.titleList = []
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
gotoCNDetail(item) {
|
||||||
|
console.log('2222')
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./CNMedicineSearchDetail?id=" + item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
gotoSousuo() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./CNMedicineText"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
gotoFenlei() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./CNMedicineSearch"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.searchList {
|
.searchList {
|
||||||
.item {
|
.item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
@@ -217,23 +254,26 @@ export default {
|
|||||||
|
|
||||||
.contentBox {
|
.contentBox {
|
||||||
.oneCateList {
|
.oneCateList {
|
||||||
|
margin-top: 15rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
padding: 20rpx 0;
|
padding: 10rpx 0;
|
||||||
font-size: 34rpx;
|
font-size: 30rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
background-color: #55aa7f;
|
background-color: #55aa7f3d;
|
||||||
color: #fff;
|
color: #55aa7f;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.firstTab{
|
|
||||||
|
.firstTab {
|
||||||
text {
|
text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -293,36 +333,10 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: calc(100% - 10px);
|
width: calc(100% - 10px);
|
||||||
margin-top: 20rpx;
|
margin-top: 30rpx;
|
||||||
margin-bottom: 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 #54a96633;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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 {
|
.flexbox {
|
||||||
@@ -333,7 +347,7 @@ export default {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.limiTy{
|
.limiTy {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 46rpx;
|
line-height: 46rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
v-for="(item, index) in firstTabList" :key="item.firstTabId">{{item.title}}</text>
|
v-for="(item, index) in firstTabList" :key="item.firstTabId">{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="curFirstTabIndex==0">
|
<view v-if="curFirstTabIndex==0">
|
||||||
<view class="oneCateList flexbox">
|
<view class="oneCateBot flexbox">
|
||||||
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
|
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
|
||||||
v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId">{{item.title}}</text>
|
v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId">{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -473,19 +473,38 @@
|
|||||||
.contentBox {
|
.contentBox {
|
||||||
.oneCateList {
|
.oneCateList {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 32%;
|
width: 32%;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
font-size: 34rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cur {
|
||||||
|
border-bottom: 5rpx solid #55aa7f;
|
||||||
|
color: #55aa7f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.oneCateBot{
|
||||||
|
margin-top: 15rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
text {
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
width: 32%;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
font-size: 30rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
background-color: #55aa7f;
|
background-color: #55aa7f3d;
|
||||||
color: #fff;
|
color: #55aa7f;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.firstTab{
|
.firstTab{
|
||||||
@@ -495,8 +514,6 @@
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
font-size: 34rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,8 @@
|
|||||||
<!-- <view >
|
<!-- <view >
|
||||||
<uni-tag v-if="item.voices != ''" class="tag" size="small" :inverted="true" text="音频"
|
<uni-tag v-if="item.voices != ''" class="tag" size="small" :inverted="true" text="音频"
|
||||||
type="success" /></view> -->
|
type="success" /></view> -->
|
||||||
<view ><uni-tag v-if="item.content != ''" class="tag" size="small" :inverted="true" text="文字"
|
<view><uni-tag v-if="item.content != ''" class="tag" size="small" :inverted="true" text="文字"
|
||||||
type="primary" /></view>
|
type="primary" /></view>
|
||||||
<!-- <image class="playingFig" src="/static/playingGif.gif" mode="aspectFill"></image> -->
|
<!-- <image class="playingFig" src="/static/playingGif.gif" mode="aspectFill"></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -61,7 +61,8 @@
|
|||||||
<view style="width: 100%;">
|
<view style="width: 100%;">
|
||||||
<view v-if="status==0" style="text-align: center;">
|
<view v-if="status==0" style="text-align: center;">
|
||||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中
|
||||||
|
</font>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="status==1">
|
<view v-if="status==1">
|
||||||
<u-divider text="全部加载完成"></u-divider>
|
<u-divider text="全部加载完成"></u-divider>
|
||||||
@@ -100,17 +101,17 @@
|
|||||||
isBuy: false, // true 已购买,false 未购买
|
isBuy: false, // true 已购买,false 未购买
|
||||||
playData: {},
|
playData: {},
|
||||||
bookInfo: {
|
bookInfo: {
|
||||||
author:{
|
author: {
|
||||||
authorName:''
|
authorName: ''
|
||||||
}
|
}
|
||||||
}, // 书籍详情
|
}, // 书籍详情
|
||||||
bookid: null, // 书籍id
|
bookid: null, // 书籍id
|
||||||
status:3,
|
status: 3,
|
||||||
freeChapterCount: 0, // 免费章节数
|
freeChapterCount: 0, // 免费章节数
|
||||||
yianList: [], // 书籍目录
|
yianList: [], // 书籍目录
|
||||||
videoList: [], //音频文件
|
videoList: [], //音频文件
|
||||||
page:1,
|
page: 1,
|
||||||
totalPage:0,
|
totalPage: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -122,13 +123,13 @@
|
|||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log('到底了',this.page+1 , this.totalPage)
|
console.log('到底了', this.page + 1, this.totalPage)
|
||||||
|
|
||||||
if(this.page+1 <= this.totalPage){
|
if (this.page + 1 <= this.totalPage) {
|
||||||
this.page++
|
this.page++
|
||||||
this.status = 0
|
this.status = 0
|
||||||
this.getyianList()
|
this.getyianList()
|
||||||
}else{
|
} else {
|
||||||
this.status = 1
|
this.status = 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -166,16 +167,16 @@
|
|||||||
'userId': this.userInfo.id,
|
'userId': this.userInfo.id,
|
||||||
'bookId': this.bookid
|
'bookId': this.bookid
|
||||||
}
|
}
|
||||||
checkBookRight(data,res=>{
|
checkBookRight(data, res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../comments/comments?bookid=' + this.bookid,
|
url: '../comments/comments?bookid=' + this.bookid,
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'购买本书后方可查看此内容!',
|
title: '购买本书后方可查看此内容!',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -216,7 +217,7 @@
|
|||||||
// url: './talkBookDetail?teachId=' + item.teachId +"&bookId="+item.bookId
|
// url: './talkBookDetail?teachId=' + item.teachId +"&bookId="+item.bookId
|
||||||
// });
|
// });
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../yian/yianDetail?medicalRecordsId='+item.medicalRecordsId,
|
url: '../yian/yianDetail?medicalRecordsId=' + item.medicalRecordsId,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -226,38 +227,30 @@
|
|||||||
url: '../eBook/bookMessage?Id=' + id + '&typ=' + e
|
url: '../eBook/bookMessage?Id=' + id + '&typ=' + e
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取章节列表
|
// 获取医案列表
|
||||||
getyianList() {
|
getyianList() {
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "book/bookMedicalRecords/listByBookId",
|
url: "book/bookMedicalRecords/listByBookId",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
"page": this.page,
|
"page": this.page,
|
||||||
"limit": 20,
|
"limit": 20,
|
||||||
"bookId": this.bookid
|
"bookId": this.bookid
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
// this.$http
|
|
||||||
// .post('book/teach/getBookTeachItems', {
|
|
||||||
// 'bookId': this.bookid,
|
|
||||||
// 'limit': 20,
|
|
||||||
// 'page': this.page
|
|
||||||
// // 'userid': this.userInfo.id,
|
|
||||||
// // 'bookid':
|
|
||||||
// // 'id': this.playid
|
|
||||||
// })
|
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '章节目录')
|
console.log(res, '章节目录')
|
||||||
if (res.page.records.length > 0) {
|
if (res.page.records.length > 0) {
|
||||||
this.yianList = this.yianList.concat(res.page.records)
|
this.yianList = this.yianList.concat(res.page.records)
|
||||||
this.status = 3
|
|
||||||
this.totalPage = res.page.pages
|
this.totalPage = res.page.pages
|
||||||
if(this.totalPage = res.page.current){
|
if (this.page == this.totalPage) {
|
||||||
this.status = 1
|
this.status = 1
|
||||||
|
} else {
|
||||||
|
this.status = 3
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.yianList = []
|
this.yianList = []
|
||||||
@@ -274,13 +267,14 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.muluitem{
|
.muluitem {
|
||||||
span{
|
span {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.playingFig {
|
.playingFig {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
|||||||
BIN
static/icon/earth.png
Normal file
BIN
static/icon/earth.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
static/jainsuo.png
Normal file
BIN
static/jainsuo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 595 B |
@@ -52,8 +52,10 @@ button::after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
color: #55aa7f;
|
color: #087940;
|
||||||
border: 0.5px solid #55aa7f;
|
border: 0.5px solid #55aa7f;
|
||||||
|
background: #55aa7f1c;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-grid-list{
|
.u-grid-list{
|
||||||
|
|||||||
Reference in New Issue
Block a user