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
.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> -->
<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">
@@ -32,6 +32,7 @@
</view>
<!-- </scroll-view> -->
<view v-show="!showSearchList">
<view v-if="limiOneFour==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"
@@ -40,9 +41,10 @@
</u-grid-item>
</u-grid>
</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-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>
</u-grid-item>
</u-grid>
@@ -60,6 +62,23 @@
<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>
@@ -69,13 +88,11 @@
<text class="prompt">请输入方剂名</text>
</view>
</view> -->
<music-play :playData="playData"></music-play>
<z-navigation></z-navigation>
</view>
</template>
<script>
import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js';
import {
mapState
@@ -85,7 +102,9 @@
return {
playData: {},
searchValue: '',
oneCateList: [], // 一级分类标题1
oneCateList: [{
prescriptCategoryId: 0
}], // 一级分类标题1
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
@@ -94,7 +113,7 @@
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limiOneFour: 1,
}
},
onLoad() {
@@ -103,8 +122,8 @@
},
onHide() {
this.showSearchList = false
this.searchList = []
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(['userInfo']),
@@ -141,8 +160,11 @@
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMes = res.user
if (this.userMes.prescriptAPower == 1) {
this.limiOneFour = 0
}
this.getCateList()
console.log(this.userMes, '呼呼')
// console.log(this.userMes, '呼呼')
});
}
},
@@ -218,7 +240,16 @@
this.searchValue = ''
this.searchList = []
this.showSearchList = false
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)
} else {
this.getJFList(id)
@@ -253,7 +284,9 @@
transformData(inputData) {
const result = {};
inputData.forEach(item => {
const { letter } = item;
const {
letter
} = item;
if (!result[letter]) {
result[letter] = [];
}
@@ -406,7 +439,7 @@
// #endif
},
components: {
musicPlay
},
}
</script>
@@ -471,6 +504,7 @@
.titleItem {
padding: 20rpx 10rpx;
}
.JFtitleItem {
background-color: #ffffff;
padding: 20rpx 10rpx;
@@ -527,4 +561,11 @@
.flexbox {
display: flex;
}
.limiTy {
display: block;
font-size: 26rpx;
line-height: 48rpx;
padding: 0 25rpx;
}
</style>