苹果审核,bug恢复
This commit is contained in:
@@ -26,27 +26,18 @@
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="marYao" @click="xingweiShow = true"
|
||||
v-if="curXingIndex.length>0||curWeiIndex.length>0||curGuijingIndex.length>0">
|
||||
<view class="marYao" @click="xingweiShow = true" v-if="curXWGMark.length>0">
|
||||
性味:
|
||||
<span v-for="(item, index) in curXingIndex">
|
||||
<span v-for="(item, index) in curXWGMark">
|
||||
{{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>
|
||||
<font v-if="index+1!=curXWGMark.length">,</font>
|
||||
</span>
|
||||
</view>
|
||||
<view class="marYao" @click="gongxiaoShow = true" v-if="curGongxiaoIndex.length>0">
|
||||
<view class="marYao" @click="gongxiaoShow = true" v-if="curGongxiaoMark.length>0">
|
||||
功效:
|
||||
<span v-for="(item, index) in curGongxiaoIndex">
|
||||
<span v-for="(item, index) in curGongxiaoMark">
|
||||
{{item}}
|
||||
<font v-if="index+1!=curGongxiaoIndex.length">,</font>
|
||||
<font v-if="index+1!=curGongxiaoMark.length">,</font>
|
||||
</span>
|
||||
</view>
|
||||
<!-- <view class="searchList" v-show="showSearchList">
|
||||
@@ -339,6 +330,8 @@
|
||||
status: 3,
|
||||
page: 1,
|
||||
totalPage: 1,
|
||||
curXWGMark: [],
|
||||
curGongxiaoMark: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -387,10 +380,9 @@
|
||||
// 若不包含,则向数组中添加该值
|
||||
arr.push(item.title);
|
||||
}
|
||||
this.page = 1
|
||||
this.titleList = []
|
||||
this.goToSearch()
|
||||
console.log(arr);
|
||||
|
||||
console.log(this.curGongxiaoMark)
|
||||
console.log(this.curXWGMark)
|
||||
},
|
||||
goNewSearch() {
|
||||
this.page = 1
|
||||
@@ -407,7 +399,7 @@
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 20,
|
||||
"limit": 50,
|
||||
"current": this.page,
|
||||
"name": "",
|
||||
"type": "", // 植物、矿物、动物
|
||||
@@ -433,7 +425,11 @@
|
||||
this.status = 3
|
||||
}
|
||||
|
||||
|
||||
// 标记
|
||||
this.curGongxiaoMark = JSON.parse(JSON.stringify(this.curGongxiaoIndex))
|
||||
this.curXWGMark = JSON.parse(JSON.stringify(this.curXingIndex.concat(this.curWeiIndex).concat(this.curGuijingIndex)))
|
||||
|
||||
|
||||
} else {
|
||||
this.titleList = []
|
||||
}
|
||||
@@ -602,9 +598,7 @@
|
||||
|
||||
}
|
||||
|
||||
.marYao:nth-last-child(1) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<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>
|
||||
@custom='souYao' @clear="souYao" @search="souYao"></u-search>
|
||||
</view>
|
||||
<view class="titleList">
|
||||
<u-grid :col="1" v-if="titleList.length > 0">
|
||||
@@ -17,7 +17,6 @@
|
||||
</u-grid>
|
||||
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view>
|
||||
<view v-if="status==0" style="text-align: center;padding: 20rpx 0;">
|
||||
@@ -51,9 +50,11 @@
|
||||
totalPage: 1,
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.titleList = []
|
||||
this.souYao()
|
||||
},
|
||||
|
||||
onHide() {
|
||||
this.page = 1
|
||||
},
|
||||
@@ -65,6 +66,7 @@
|
||||
this.goToSearch()
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
// this.loadingNow = true
|
||||
console.log('到底了')
|
||||
@@ -75,9 +77,11 @@
|
||||
this.status = 1
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 搜索
|
||||
goToSearch() {
|
||||
@@ -86,7 +90,7 @@
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 20,
|
||||
"limit": 50,
|
||||
"current": this.page,
|
||||
"name": this.keyword,
|
||||
"type": "", // 植物、矿物、动物
|
||||
@@ -104,15 +108,12 @@
|
||||
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 = []
|
||||
}
|
||||
@@ -135,8 +136,8 @@
|
||||
url: "./CNMedicineSearchDetail?id=" + item.id
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.key.hideSoftKeybord();
|
||||
|
||||
@@ -28,31 +28,143 @@
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="titleList" v-if="curOneCateIndex == 1">
|
||||
<u-grid :col="1" v-if="titleList.length > 0">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||
<view v-if="titleList.length > 0">
|
||||
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{item.name}}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||
</view>
|
||||
<view style="padding: 10rpx 20rpx 0 20rpx;font-size: 30rpx;" v-if="!curOneCateIndex == 1">
|
||||
<b>大家常看的</b>
|
||||
<view style="color: #55aa7f;float: right;font-weight: bold;" @click="gotoFenlei()">
|
||||
<img src="../../static/jainsuo.png" alt="" style="width: 36rpx;vertical-align: text-top;margin-right: 8rpx;">
|
||||
分类检索
|
||||
<view v-if="!curOneCateIndex == 1">
|
||||
<view class="grid CNCateList">
|
||||
<u-grid :col="2" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in CNateList" :key="item.id" @click="setCNIndex(item, index)">
|
||||
<view :class="['grid-text',false ? 'cur' : '']">
|
||||
{{item.title}}
|
||||
<b v-if="index==1&&xingweiShow">
|
||||
<u-icon name="arrow-up-fill" color="#666" size="12"></u-icon>
|
||||
</b>
|
||||
<b v-if="index==1&&!xingweiShow">
|
||||
<u-icon name="arrow-down-fill" color="#666" size="12"></u-icon>
|
||||
</b>
|
||||
<b v-if="index==0&&gongxiaoShow">
|
||||
<u-icon name="arrow-up-fill" color="#666" size="12"></u-icon>
|
||||
</b>
|
||||
<b v-if="index==0&&!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="gongxiaoShow = true" v-if="curGongxiaoMark.length>0">
|
||||
功效:
|
||||
<span v-for="(item, index) in curGongxiaoMark">
|
||||
{{item}}
|
||||
<font v-if="index+1!=curGongxiaoMark.length">,</font>
|
||||
</span>
|
||||
</view>
|
||||
<view class="marYao" @click="xingweiShow = true" v-if="curXWGMark.length>0">
|
||||
性味:
|
||||
<span v-for="(item, index) in curXWGMark">
|
||||
{{item}}
|
||||
<font v-if="index+1!=curXWGMark.length">,</font>
|
||||
</span>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="titleList" v-if="!curOneCateIndex == 1">
|
||||
<u-grid :col="1" v-if="titleList.length > 0">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
|
||||
<view v-if="titleList.length > 0">
|
||||
<view 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>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无药物数据哦~"></u-divider>
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="!curOneCateIndex == 1">
|
||||
<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>
|
||||
|
||||
<u-popup mode="bottom" :show="xingweiShow" :round="10" @close="xingweiShow=false">
|
||||
<view class="CNMedicineSearchPopup">
|
||||
<view class="dp_title">性</view>
|
||||
<view class="grid twoCateList" v-if="xingSelectionList.length > 0">
|
||||
<u-grid :col="3" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in xingSelectionList" :key="item.title"
|
||||
@click="setXingIndex(item, index, curXingIndex)">
|
||||
<view :class="['grid-text',curXingIndex.includes(item.title) ? 'cur' : '']">{{item.title}}
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="dp_title">味</view>
|
||||
<view class="grid twoCateList" v-if="weiSelectionList.length > 0">
|
||||
<u-grid :col="3" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in weiSelectionList" :key="item.title"
|
||||
@click="setXingIndex(item, index, curWeiIndex)">
|
||||
<view :class="['grid-text',curWeiIndex.includes(item.title) ? 'cur' : '']">{{item.title}}
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="dp_title">归经</view>
|
||||
<view class="grid twoCateList" v-if="guijingSelectionList.length > 0">
|
||||
<u-grid :col="3" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in guijingSelectionList" :key="item.title"
|
||||
@click="setXingIndex(item, index, curGuijingIndex)">
|
||||
<view :class="['grid-text',curGuijingIndex.includes(item.title) ? 'cur' : '']">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view style="max-height: 1000rpx;overflow-y: scroll;margin-top: 28px;">
|
||||
<!-- 提交 -->
|
||||
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
||||
<view>
|
||||
<u-button type="success" @click="goNewSearch">查询</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup mode="bottom" :show="gongxiaoShow" :round="10" @close="gongxiaoShow=false">
|
||||
<view class="CNMedicineSearchPopup">
|
||||
<view class="dp_title">功效</view>
|
||||
<view class="grid twoCateList" v-if="gongxiaoSelectionList.length > 0">
|
||||
<u-grid :col="3" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in gongxiaoSelectionList" :key="item.title"
|
||||
@click="setXingIndex(item, index, curGongxiaoIndex)">
|
||||
<view :class="['grid-text',curGongxiaoIndex.includes(item.title) ? 'cur' : '']">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view style="max-height: 1000rpx;overflow-y: scroll;margin-top: 28px;">
|
||||
<!-- 提交 -->
|
||||
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
||||
<view>
|
||||
<u-button type="success" @click="goNewSearch">查询</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -117,6 +229,150 @@
|
||||
titleList: [], // 药物标题
|
||||
curOneCateIndex: 0, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
CNateList: [{
|
||||
title: "功效",
|
||||
id: 1
|
||||
}, {
|
||||
title: "性味",
|
||||
id: 2
|
||||
}, ],
|
||||
CNCateIndex: 0,
|
||||
page: 1,
|
||||
status: 3,
|
||||
totalPage: 1,
|
||||
xingweiShow: false, // 查询条件弹出层,性味
|
||||
gongxiaoShow: false, // 查询条件弹出层,功效
|
||||
sanpinShow: false, // 查询条件弹出层,sanpin
|
||||
curXWGMark: [],
|
||||
curGongxiaoMark: [],
|
||||
curXingIndex: [],
|
||||
curWeiIndex: [],
|
||||
curGuijingIndex: [],
|
||||
curGongxiaoIndex: [],
|
||||
gongxiaoSelectionList: [{
|
||||
title: "解表"
|
||||
},
|
||||
{
|
||||
title: "清热"
|
||||
},
|
||||
{
|
||||
title: "泻下"
|
||||
},
|
||||
{
|
||||
title: "祛风湿"
|
||||
},
|
||||
{
|
||||
title: "芳香化湿"
|
||||
},
|
||||
{
|
||||
title: "利水渗湿"
|
||||
},
|
||||
{
|
||||
title: "温里"
|
||||
},
|
||||
{
|
||||
title: "理气"
|
||||
},
|
||||
{
|
||||
title: "消食"
|
||||
},
|
||||
{
|
||||
title: "驱虫"
|
||||
},
|
||||
{
|
||||
title: "止血"
|
||||
},
|
||||
{
|
||||
title: "活血祛瘀"
|
||||
},
|
||||
{
|
||||
title: "化痰止咳平喘"
|
||||
},
|
||||
{
|
||||
title: "安神"
|
||||
},
|
||||
{
|
||||
title: "平肝息风"
|
||||
},
|
||||
{
|
||||
title: "开窍"
|
||||
},
|
||||
{
|
||||
title: "补虚"
|
||||
},
|
||||
{
|
||||
title: "收涩"
|
||||
},
|
||||
{
|
||||
title: "涌吐"
|
||||
},
|
||||
{
|
||||
title: "外用及其他"
|
||||
},
|
||||
],
|
||||
xingSelectionList: [{
|
||||
title: "寒"
|
||||
},
|
||||
{
|
||||
title: "凉"
|
||||
},
|
||||
{
|
||||
title: "平"
|
||||
},
|
||||
{
|
||||
title: "温"
|
||||
},
|
||||
{
|
||||
title: "热"
|
||||
},
|
||||
],
|
||||
weiSelectionList: [{
|
||||
title: "酸"
|
||||
},
|
||||
{
|
||||
title: "涩"
|
||||
},
|
||||
{
|
||||
title: "甘"
|
||||
},
|
||||
{
|
||||
title: "苦"
|
||||
},
|
||||
{
|
||||
title: "辛"
|
||||
},
|
||||
{
|
||||
title: "咸"
|
||||
},
|
||||
{
|
||||
title: "淡"
|
||||
},
|
||||
],
|
||||
guijingSelectionList: [{
|
||||
title: "心"
|
||||
},
|
||||
{
|
||||
title: "肝"
|
||||
},
|
||||
{
|
||||
title: "脾"
|
||||
},
|
||||
{
|
||||
title: "肺"
|
||||
},
|
||||
{
|
||||
title: "肾"
|
||||
},
|
||||
{
|
||||
title: "肠"
|
||||
},
|
||||
{
|
||||
title: "膀胱"
|
||||
},
|
||||
{
|
||||
title: "胃"
|
||||
},
|
||||
],
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
userMes: {}, // 用户信息
|
||||
@@ -129,6 +385,8 @@
|
||||
// onLoad() {
|
||||
// this.getCNYao()
|
||||
// },
|
||||
|
||||
|
||||
methods: {
|
||||
setOneCateIndex(item, index) {
|
||||
// let id = item.prescriptCategoryId
|
||||
@@ -141,7 +399,7 @@
|
||||
this.getXiYao('抗感染类', 1)
|
||||
} else { // 中药检索
|
||||
// this.getTowCateList(id)
|
||||
this.getCNYao() // book/materials/getMaterialsList
|
||||
this.goNewSearch() // book/materials/getMaterialsList
|
||||
}
|
||||
},
|
||||
setTwoCateIndex(item, index) {
|
||||
@@ -187,20 +445,69 @@
|
||||
})
|
||||
},
|
||||
// 获取中药
|
||||
getCNYao(id, type) {
|
||||
|
||||
gotoCNDetail(item) {
|
||||
console.log('2222')
|
||||
uni.navigateTo({
|
||||
url: "./CNMedicineSearchDetail?id=" + item.id
|
||||
})
|
||||
},
|
||||
|
||||
gotoSousuo() {
|
||||
uni.navigateTo({
|
||||
url: "./CNMedicineText"
|
||||
})
|
||||
},
|
||||
|
||||
setXingIndex(item, index, arr) {
|
||||
// let arr = this.curXingIndex
|
||||
if (arr.includes(item.title)) {
|
||||
// 若包含,则从数组中删除该值
|
||||
var index = arr.indexOf(item.title);
|
||||
if (index > -1) {
|
||||
arr.splice(index, 1);
|
||||
}
|
||||
} else {
|
||||
// 若不包含,则向数组中添加该值
|
||||
arr.push(item.title);
|
||||
}
|
||||
},
|
||||
|
||||
setCNIndex(item, index) {
|
||||
let id = item.id
|
||||
this.CNCateIndex = index
|
||||
if (id == 2) {
|
||||
this.xingweiShow = true
|
||||
this.gongxiaoShow = false
|
||||
this.sanpinShow = false
|
||||
}
|
||||
if (id == 1) {
|
||||
this.xingweiShow = false
|
||||
this.gongxiaoShow = true
|
||||
this.sanpinShow = false
|
||||
}
|
||||
},
|
||||
|
||||
goNewSearch() {
|
||||
this.page = 1
|
||||
this.titleList = []
|
||||
this.goToSearch()
|
||||
},
|
||||
|
||||
goToSearch() {
|
||||
$http.request({
|
||||
url: "book/materials/getMaterialsList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 10,
|
||||
"current": 1,
|
||||
"limit": 20,
|
||||
"current": this.page,
|
||||
"name": "",
|
||||
"type": "", // 植物、矿物、动物
|
||||
"effect": "", //功效
|
||||
"taste": "", //味
|
||||
"property": "", //性
|
||||
"tropism": "" //归经
|
||||
"effect": this.curGongxiaoIndex.join(','), //功效
|
||||
"taste": this.curWeiIndex.join(','), //味
|
||||
"property": this.curXingIndex.join(','), //性
|
||||
"tropism": this.curGuijingIndex.join(',') //归经
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
@@ -208,31 +515,51 @@
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
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])
|
||||
}
|
||||
|
||||
} else {
|
||||
this.titleList = []
|
||||
}
|
||||
|
||||
this.xingweiShow = false
|
||||
this.gongxiaoShow = false
|
||||
this.sanpinShow = false
|
||||
|
||||
this.totalPage = res.result.pages
|
||||
if (this.page == this.totalPage) {
|
||||
this.status = 1
|
||||
} else {
|
||||
this.status = 3
|
||||
}
|
||||
|
||||
// 标记
|
||||
this.curGongxiaoMark = JSON.parse(JSON.stringify(this.curGongxiaoIndex))
|
||||
this.curXWGMark = JSON.parse(JSON.stringify(this.curXingIndex.concat(this.curWeiIndex)
|
||||
.concat(this.curGuijingIndex)))
|
||||
|
||||
}).catch(e => {
|
||||
this.titleList = []
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
gotoCNDetail(item) {
|
||||
console.log('2222')
|
||||
uni.navigateTo({
|
||||
url: "./CNMedicineSearchDetail?id=" + item.id
|
||||
})
|
||||
|
||||
|
||||
goToBottom() {
|
||||
console.log(this.curOneCateIndex)
|
||||
// this.loadingNow = true
|
||||
if (this.curOneCateIndex != 1) {
|
||||
console.log('到底了')
|
||||
if (this.page + 1 <= this.totalPage) {
|
||||
this.page++
|
||||
this.goToSearch()
|
||||
} else {
|
||||
this.status = 1
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
gotoSousuo() {
|
||||
uni.navigateTo({
|
||||
url: "./CNMedicineText"
|
||||
})
|
||||
},
|
||||
gotoFenlei() {
|
||||
uni.navigateTo({
|
||||
url: "./CNMedicineSearch"
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -246,11 +573,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
.oneCateList {
|
||||
@@ -298,6 +620,8 @@
|
||||
color: #55aa7f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// .u-grid-list{border: 0.5px solid #dadbde;}
|
||||
}
|
||||
|
||||
@@ -336,7 +660,7 @@
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
@@ -351,4 +675,74 @@
|
||||
font-size: 28rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.CNCateList {
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.grid-text {
|
||||
padding: 16rpx 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.grid-text>b {
|
||||
margin-left: 10rpx;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cur {
|
||||
color: #55aa7f;
|
||||
}
|
||||
|
||||
.u-grid-list {
|
||||
// border-top: 0.5px solid #dadbde;
|
||||
// border-bottom: 0.5px solid #dadbde;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.CNMedicineSearchPopup {
|
||||
.grid-text {
|
||||
padding: 16rpx 20rpx !important;
|
||||
}
|
||||
|
||||
.grid-text>b {
|
||||
margin-left: 10rpx;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.cur {
|
||||
color: #55aa7f;
|
||||
}
|
||||
|
||||
.u-grid-list {
|
||||
// border-top: 0.5px solid #dadbde;
|
||||
// border-bottom: 0.5px solid #dadbde;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,11 +11,11 @@
|
||||
<view v-if="curFirstTabIndex==0">
|
||||
<view class="oneCateBot flexbox">
|
||||
<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" v-show="!iosHide&&index!=0">{{item.title}}</text>
|
||||
</view>
|
||||
<view class="search_box" v-if="oneCateList.length > 0">
|
||||
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear" v-model="searchValue"
|
||||
@input="input" @blur="blur" @search="search" @custom="search"></u-search>
|
||||
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear"
|
||||
v-model="searchValue" @input="input" @blur="blur" @search="search" @custom="search"></u-search>
|
||||
</view>
|
||||
<view class="searchList" v-show="showSearchList">
|
||||
<view class="itemBox" v-if="searchList.length > 0">
|
||||
@@ -27,7 +27,7 @@
|
||||
<u-divider text="未找到相关方剂哦~"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="!showSearchList">
|
||||
<view v-show="!showSearchList&&!iosHide&&curOneCateIndex!=0">
|
||||
<view class="grid twoCateList" v-if="twoCateList.length > 0">
|
||||
<u-grid :col="3" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
||||
@@ -39,7 +39,8 @@
|
||||
<view class="titleList" v-if="curOneCateIndex != 2">
|
||||
<u-grid :col="1" v-if="titleList.length > 0">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.prescriptId"
|
||||
@click="gotoDetail(item)" style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
@click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{item.title}}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
@@ -93,10 +94,10 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
firstTabList:[{
|
||||
firstTabList: [{
|
||||
firstTabId: 1,
|
||||
title: '方剂检索'
|
||||
},{
|
||||
}, {
|
||||
firstTabId: 2,
|
||||
title: '药物检索'
|
||||
}],
|
||||
@@ -218,18 +219,18 @@
|
||||
setFirstTabIndex(item, index) {
|
||||
let id = item.firstTabId
|
||||
this.curFirstTabIndex = index
|
||||
|
||||
|
||||
if (index == 1) {
|
||||
// this.setOneCateIndex(id)
|
||||
console.log(this.$refs)
|
||||
console.log(this.$refs.mSearch)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.mSearch.getCNYao()
|
||||
this.$refs.mSearch.goToSearch()
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.setOneCateIndex(this.oneCateList[0], 0)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
setOneCateIndex(item, index) {
|
||||
// if(this.userMes.tgdzPower == 0){
|
||||
@@ -263,10 +264,10 @@
|
||||
} else if (index == 3) {
|
||||
this.twoCateList = []
|
||||
this.getTitles(id)
|
||||
} else{
|
||||
} else {
|
||||
this.getTowCateList(id)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getTowCateList(id) {
|
||||
$http.request({
|
||||
@@ -452,6 +453,14 @@
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.mSearch.goToBottom()
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -473,6 +482,7 @@
|
||||
.contentBox {
|
||||
.oneCateList {
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
@@ -481,17 +491,17 @@
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.cur {
|
||||
border-bottom: 5rpx solid #55aa7f;
|
||||
color: #55aa7f;
|
||||
}
|
||||
}
|
||||
|
||||
.oneCateBot{
|
||||
|
||||
.oneCateBot {
|
||||
margin-top: 15rpx;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
@@ -500,14 +510,15 @@
|
||||
font-size: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.cur {
|
||||
background-color: #55aa7f3d;
|
||||
color: #55aa7f;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.firstTab{
|
||||
|
||||
.firstTab {
|
||||
text {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
@@ -604,8 +615,8 @@
|
||||
.uni-modal .uni-modal__bd {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.limiTy{
|
||||
|
||||
.limiTy {
|
||||
font-size: 28rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
</view>
|
||||
</uni-section>
|
||||
|
||||
<view style="text-align: center;color: #999;font-size: 24rpx;">
|
||||
辨病治症仅供参考,若有身体问题请及时到医院问诊
|
||||
</view>
|
||||
|
||||
<!-- <uni-section class="mb-10" titleFontSize="18px" title="配伍" type="line">
|
||||
<view class="item" v-if="prescriptDetail.compatibility && prescriptDetail.compatibility != ''" v-html="prescriptDetail.compatibility">
|
||||
</view>
|
||||
@@ -66,6 +70,8 @@
|
||||
</view>
|
||||
</uni-section> -->
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
|
||||
Reference in New Issue
Block a user