方剂
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<!-- <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus" @input="input"
|
<!-- <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus" @input="input"
|
||||||
@cancel="cancel" @clear="clear">
|
@cancel="cancel" @clear="clear">
|
||||||
</uni-search-bar> -->
|
</uni-search-bar> -->
|
||||||
|
|
||||||
<view class="contentBox">
|
<view class="contentBox">
|
||||||
<!-- <scroll-view class="scroll-view_H oneCateList" scroll-x="true" scroll-left="0"> -->
|
<!-- <scroll-view class="scroll-view_H oneCateList" scroll-x="true" scroll-left="0"> -->
|
||||||
<view class="oneCateList flexbox">
|
<view class="oneCateList flexbox">
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
<!-- <u-search :disabled="userMes.pointPower == 0 && oneCateList[curOneCateIndex].id == 3 || userMes
|
<!-- <u-search :disabled="userMes.pointPower == 0 && oneCateList[curOneCateIndex].id == 3 || userMes
|
||||||
.pointPower == 0 && oneCateList[curOneCateIndex].id == 6 ? true : false" @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear"
|
.pointPower == 0 && oneCateList[curOneCateIndex].id == 6 ? true : false" @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear"
|
||||||
v-model="searchValue" @input="input" @blur="blur" @search="search"></u-search> -->
|
v-model="searchValue" @input="input" @blur="blur" @search="search"></u-search> -->
|
||||||
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear"
|
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear" v-model="searchValue"
|
||||||
v-model="searchValue" @input="input" @blur="blur" @search="search" @custom="search"></u-search>
|
@input="input" @blur="blur" @search="search" @custom="search"></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">
|
||||||
@@ -31,33 +31,52 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- </scroll-view> -->
|
<!-- </scroll-view> -->
|
||||||
<view v-show="!showSearchList">
|
<view v-show="!showSearchList">
|
||||||
<view class="grid twoCateList" v-if="twoCateList.length > 0">
|
<view v-if="limiOneFour==0">
|
||||||
<u-grid :col="3" border class="u-grid-list">
|
<view class="grid twoCateList" v-if="twoCateList.length > 0">
|
||||||
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
<u-grid :col="3" border class="u-grid-list">
|
||||||
@click="setTwoCateIndex(item, index)">
|
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"
|
||||||
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.title}}</view>
|
@click="setTwoCateIndex(item, index)">
|
||||||
</u-grid-item>
|
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.title}}</view>
|
||||||
</u-grid>
|
|
||||||
</view>
|
|
||||||
<view class="titleList" v-if="oneCateList[curOneCateIndex].prescriptCategoryId != 3">
|
|
||||||
<u-grid :col="3" v-if="titleList.length > 0">
|
|
||||||
<u-grid-item v-for="(item, index) in titleList" :key="item.prescriptId" @click="gotoDetail(item)">
|
|
||||||
<view :class="['titleItem']">{{item.title}}</view>
|
|
||||||
</u-grid-item>
|
|
||||||
</u-grid>
|
|
||||||
<u-divider v-else text="暂无方剂数据哦~"></u-divider>
|
|
||||||
</view>
|
|
||||||
<view class="titleList" v-else>
|
|
||||||
<u-grid :col="1" v-if="titleList">
|
|
||||||
<u-grid-item v-for="(item, index) in titleList" :key="index">
|
|
||||||
<view :class="['titleItem']">{{index}}</view>
|
|
||||||
<u-grid-item v-for="(item1, index1) in item" :key="item1.prescriptId" >
|
|
||||||
<view :class="['JFtitleItem']" @click="gotoDetail(item1)">{{item1.title}}</view>
|
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
</u-grid-item>
|
</u-grid>
|
||||||
</u-grid>
|
</view>
|
||||||
<u-divider v-else text="暂无方剂数据哦~"></u-divider>
|
<view class="titleList" v-if="curOneCateIndex != 2">
|
||||||
|
<u-grid :col="3" v-if="titleList.length > 0">
|
||||||
|
<u-grid-item v-for="(item, index) in titleList" :key="item.prescriptId"
|
||||||
|
@click="gotoDetail(item)">
|
||||||
|
<view :class="['titleItem']">{{item.title}}</view>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
<u-divider v-else text="暂无方剂数据哦~"></u-divider>
|
||||||
|
</view>
|
||||||
|
<view class="titleList" v-else>
|
||||||
|
<u-grid :col="1" v-if="titleList">
|
||||||
|
<u-grid-item v-for="(item, index) in titleList" :key="index">
|
||||||
|
<view :class="['titleItem']">{{index}}</view>
|
||||||
|
<u-grid-item v-for="(item1, index1) in item" :key="item1.prescriptId">
|
||||||
|
<view :class="['JFtitleItem']" @click="gotoDetail(item1)">{{item1.title}}</view>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
<u-divider v-else text="暂无方剂数据哦~"></u-divider>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view v-if="curOneCateIndex == 0">
|
||||||
|
<text class="limiTy">
|
||||||
|
此功能使用权限仅对同一手机账号注册过一路健康APP,且开通《吴门验方基础班》【上中下】与《吴门验方提高班》【上下】五部课程的疯子读书APP学员开通。
|
||||||
|
<br>如果您符合条件,请联系微信客服开通。
|
||||||
|
<br>客服微信:<b>yilujiankangkefu</b>
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="curOneCateIndex == 3">
|
||||||
|
<text class="limiTy">
|
||||||
|
此功能使用权限仅对在疯子读书APP购买《肿瘤六经辨证法》书籍的学员开通。
|
||||||
|
<br>如果您符合条件,请联系微信客服开通。
|
||||||
|
<br>客服微信:<b>yilujiankangkefu</b>
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -69,13 +88,11 @@
|
|||||||
<text class="prompt">请输入方剂名</text>
|
<text class="prompt">请输入方剂名</text>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<music-play :playData="playData"></music-play>
|
|
||||||
<z-navigation></z-navigation>
|
<z-navigation></z-navigation>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import musicPlay from '@/components/music.vue'
|
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
@@ -85,7 +102,9 @@
|
|||||||
return {
|
return {
|
||||||
playData: {},
|
playData: {},
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
oneCateList: [], // 一级分类标题1
|
oneCateList: [{
|
||||||
|
prescriptCategoryId: 0
|
||||||
|
}], // 一级分类标题1
|
||||||
twoCateList: [], // 二级分类标题
|
twoCateList: [], // 二级分类标题
|
||||||
titleList: [], // 方剂标题
|
titleList: [], // 方剂标题
|
||||||
curOneCateIndex: 0, // 当前选中的一级分类
|
curOneCateIndex: 0, // 当前选中的一级分类
|
||||||
@@ -94,7 +113,7 @@
|
|||||||
showSearchList: false,
|
showSearchList: false,
|
||||||
userMes: {}, // 用户信息
|
userMes: {}, // 用户信息
|
||||||
searchDisable: false, // 搜索不可用
|
searchDisable: false, // 搜索不可用
|
||||||
|
limiOneFour: 1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -103,8 +122,8 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
this.showSearchList = false
|
// this.showSearchList = false
|
||||||
this.searchList = []
|
// this.searchList = []
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userInfo']),
|
...mapState(['userInfo']),
|
||||||
@@ -141,8 +160,11 @@
|
|||||||
.post('book/user/info/' + this.userInfo.id)
|
.post('book/user/info/' + this.userInfo.id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.userMes = res.user
|
this.userMes = res.user
|
||||||
|
if (this.userMes.prescriptAPower == 1) {
|
||||||
|
this.limiOneFour = 0
|
||||||
|
}
|
||||||
this.getCateList()
|
this.getCateList()
|
||||||
console.log(this.userMes, '呼呼')
|
// console.log(this.userMes, '呼呼')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -153,10 +175,10 @@
|
|||||||
// .pointPower == 0 && this.oneCateList[this.curOneCateIndex].prescriptCategoryId == 6) { // 等于0 就是没有权限
|
// .pointPower == 0 && this.oneCateList[this.curOneCateIndex].prescriptCategoryId == 6) { // 等于0 就是没有权限
|
||||||
// this.showNoRights()
|
// this.showNoRights()
|
||||||
// } else {
|
// } else {
|
||||||
// 等于1 就是有权限
|
// 等于1 就是有权限
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "./prescriptDetail?id=" + item.prescriptId
|
url: "./prescriptDetail?id=" + item.prescriptId
|
||||||
})
|
})
|
||||||
// }
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -218,7 +240,16 @@
|
|||||||
this.searchValue = ''
|
this.searchValue = ''
|
||||||
this.searchList = []
|
this.searchList = []
|
||||||
this.showSearchList = false
|
this.showSearchList = false
|
||||||
if(index!=2){
|
this.limiOneFour = 0
|
||||||
|
if (index != 2) {
|
||||||
|
if (index == 0 && this.userMes.prescriptAPower != 1) {
|
||||||
|
this.limiOneFour = 1
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (index == 3 && this.userMes.prescriptBPower != 1) {
|
||||||
|
this.limiOneFour = 1
|
||||||
|
return
|
||||||
|
}
|
||||||
this.getTowCateList(id)
|
this.getTowCateList(id)
|
||||||
} else {
|
} else {
|
||||||
this.getJFList(id)
|
this.getJFList(id)
|
||||||
@@ -253,9 +284,11 @@
|
|||||||
transformData(inputData) {
|
transformData(inputData) {
|
||||||
const result = {};
|
const result = {};
|
||||||
inputData.forEach(item => {
|
inputData.forEach(item => {
|
||||||
const { letter } = item;
|
const {
|
||||||
|
letter
|
||||||
|
} = item;
|
||||||
if (!result[letter]) {
|
if (!result[letter]) {
|
||||||
result[letter] = [];
|
result[letter] = [];
|
||||||
}
|
}
|
||||||
result[letter].push(item);
|
result[letter].push(item);
|
||||||
});
|
});
|
||||||
@@ -277,7 +310,7 @@
|
|||||||
if (res.code == 0 && res.list.length > 0) {
|
if (res.code == 0 && res.list.length > 0) {
|
||||||
this.twoCateList = []
|
this.twoCateList = []
|
||||||
this.titleList = this.transformData(res.list)
|
this.titleList = this.transformData(res.list)
|
||||||
console.log('JF经方',this.titleList)
|
console.log('JF经方', this.titleList)
|
||||||
// this.getTitles(this.twoCateList[0].prescriptCategoryId)
|
// this.getTitles(this.twoCateList[0].prescriptCategoryId)
|
||||||
} else {
|
} else {
|
||||||
this.twoCateList = []
|
this.twoCateList = []
|
||||||
@@ -334,7 +367,7 @@
|
|||||||
if (res.code == 0 && res.list.length >= 0) {
|
if (res.code == 0 && res.list.length >= 0) {
|
||||||
this.showSearchList = true
|
this.showSearchList = true
|
||||||
this.searchList = res.list
|
this.searchList = res.list
|
||||||
}else{
|
} else {
|
||||||
this.searchList = []
|
this.searchList = []
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
@@ -406,7 +439,7 @@
|
|||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
musicPlay
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -471,7 +504,8 @@
|
|||||||
.titleItem {
|
.titleItem {
|
||||||
padding: 20rpx 10rpx;
|
padding: 20rpx 10rpx;
|
||||||
}
|
}
|
||||||
.JFtitleItem{
|
|
||||||
|
.JFtitleItem {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 20rpx 10rpx;
|
padding: 20rpx 10rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -527,4 +561,11 @@
|
|||||||
.flexbox {
|
.flexbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.limiTy {
|
||||||
|
display: block;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 48rpx;
|
||||||
|
padding: 0 25rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user