This commit is contained in:
徐哼唧L
2023-12-20 15:36:31 +08:00
parent dd655db39d
commit 0ce8f9db96

View File

@@ -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">
@@ -32,6 +32,7 @@
</view> </view>
<!-- </scroll-view> --> <!-- </scroll-view> -->
<view v-show="!showSearchList"> <view v-show="!showSearchList">
<view v-if="limiOneFour==0">
<view class="grid twoCateList" v-if="twoCateList.length > 0"> <view class="grid twoCateList" v-if="twoCateList.length > 0">
<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"
@@ -40,9 +41,10 @@
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
<view class="titleList" v-if="oneCateList[curOneCateIndex].prescriptCategoryId != 3"> <view class="titleList" v-if="curOneCateIndex != 2">
<u-grid :col="3" v-if="titleList.length > 0"> <u-grid :col="3" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.prescriptId" @click="gotoDetail(item)"> <u-grid-item v-for="(item, index) in titleList" :key="item.prescriptId"
@click="gotoDetail(item)">
<view :class="['titleItem']">{{item.title}}</view> <view :class="['titleItem']">{{item.title}}</view>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
@@ -60,6 +62,23 @@
<u-divider v-else text="暂无方剂数据哦~"></u-divider> <u-divider v-else text="暂无方剂数据哦~"></u-divider>
</view> </view>
</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>
@@ -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, '呼呼')
}); });
} }
}, },
@@ -218,7 +240,16 @@
this.searchValue = '' this.searchValue = ''
this.searchList = [] this.searchList = []
this.showSearchList = false this.showSearchList = false
this.limiOneFour = 0
if (index != 2) { 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,7 +284,9 @@
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] = [];
} }
@@ -406,7 +439,7 @@
// #endif // #endif
}, },
components: { components: {
musicPlay
}, },
} }
</script> </script>
@@ -471,6 +504,7 @@
.titleItem { .titleItem {
padding: 20rpx 10rpx; padding: 20rpx 10rpx;
} }
.JFtitleItem { .JFtitleItem {
background-color: #ffffff; background-color: #ffffff;
padding: 20rpx 10rpx; padding: 20rpx 10rpx;
@@ -527,4 +561,11 @@
.flexbox { .flexbox {
display: flex; display: flex;
} }
.limiTy {
display: block;
font-size: 26rpx;
line-height: 48rpx;
padding: 0 25rpx;
}
</style> </style>