穴位检索
This commit is contained in:
@@ -7,9 +7,8 @@
|
||||
@cancel="cancel" @clear="clear">
|
||||
</uni-search-bar> -->
|
||||
<view class="search_box" v-if="oneCateList.length > 0">
|
||||
<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 placeholder="请输入穴位名" @focus="focus" @clear="clear" v-model="searchValue" @input="input"
|
||||
@blur="blur" @search="search"></u-search>
|
||||
</view>
|
||||
<view class="searchList" v-show="showSearchList">
|
||||
<view class="itemBox" v-if="searchList.length > 0">
|
||||
@@ -72,7 +71,7 @@
|
||||
oneCateList: [], // 一级分类标题1
|
||||
twoCateList: [], // 二级分类标题
|
||||
titleList: [], // 穴位标题
|
||||
curOneCateIndex: 0, // 当前选中的一级分类
|
||||
curOneCateIndex: 1, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
@@ -94,29 +93,7 @@
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
methods: {
|
||||
// 检查是有权限使用搜索功能
|
||||
checkDisable() {
|
||||
console.log('点击了')
|
||||
if (this.userMes.pointPower == 0 && this.oneCateList[this.curOneCateIndex].id == 3 || this.userMes
|
||||
.pointPower == 0 && this.oneCateList[this.curOneCateIndex].id == 6) { // 等于0 就是没有权限
|
||||
this.showNoRights()
|
||||
}
|
||||
},
|
||||
// 显示无权限弹窗
|
||||
showNoRights() {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: "购买 手模 或 脚模 后方可使用此功能",
|
||||
confirmText: '好的',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// console.log('用户点击确定');
|
||||
that.clear()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取用户详情
|
||||
getUserInfo() {
|
||||
// 用户详情
|
||||
@@ -133,15 +110,9 @@
|
||||
// 穴位详情
|
||||
gotoDetail(item) {
|
||||
|
||||
if (this.userMes.pointPower == 0 && this.oneCateList[this.curOneCateIndex].id == 3 || this.userMes
|
||||
.pointPower == 0 && this.oneCateList[this.curOneCateIndex].id == 6) { // 等于0 就是没有权限
|
||||
this.showNoRights()
|
||||
} else {
|
||||
// 等于1 就是有权限
|
||||
uni.navigateTo({
|
||||
url: "./acupointDetail?id=" + item.id
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "./acupointDetail?id=" + item.id
|
||||
})
|
||||
|
||||
},
|
||||
// 获取穴位名称
|
||||
@@ -174,10 +145,11 @@
|
||||
this.getTitles(id)
|
||||
},
|
||||
setOneCateIndex(item, index) {
|
||||
if(this.userMes.tgdzPower == 0){
|
||||
console.log(item)
|
||||
if (item.id == 3 && this.userMes.pointPower == 0) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: "购买 针灸六经法要上册和下册 后方可使用此功能",
|
||||
content: '购买 手模 或 脚模 后方可使用此功能',
|
||||
confirmText: '好的',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
@@ -188,12 +160,26 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if(item.title == "时辰取穴"){
|
||||
if (item.id == 6 && this.userMes.tgdzPower == 0) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
content: '购买 针灸六经法要上册和下册 后方可使用此功能',
|
||||
confirmText: '好的',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// console.log('用户点击确定');
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (item.title == "时辰取穴") {
|
||||
uni.navigateTo({
|
||||
url: "../timeAcupoint/timeAcupoint"
|
||||
})
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
let id = item.id
|
||||
this.curOneCateIndex = index
|
||||
this.curTwoCateIndex = 0
|
||||
@@ -244,7 +230,7 @@
|
||||
console.log(res, '脉穴分类获取成功')
|
||||
if (res.code == 0 && res.category.length > 0) {
|
||||
this.oneCateList = res.category
|
||||
this.getTowCateList(this.oneCateList[0].id)
|
||||
this.getTowCateList(this.oneCateList[1].id)
|
||||
} else {
|
||||
this.oneCateList = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user