穴位检索

This commit is contained in:
徐哼唧L
2024-01-17 17:15:05 +08:00
parent c86ccf46c4
commit 31ff846431
10 changed files with 588 additions and 420 deletions

View File

@@ -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 = []
}

View File

@@ -33,7 +33,7 @@
<view>
<view class="flexbox yigoumaiList">
<view class="info">
<view class="videoBox demo-layout bg-purple">
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)">
<image v-if="item.images != '' && item.images != null" :src="item.images"
mode="scaleToFill"></image>
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
@@ -41,7 +41,7 @@
</view>
<view class="btns">
<view class="text">
<view class="bookName">{{item.name}}</view>
<view class="bookName" @click="goDetail(item)">{{item.name}}</view>
<!-- <view class="author">
作者<text v-if="item.authorName == null || item.authorName == ''">暂无</text>
<text v-else>{{item.authorName}}</text>
@@ -286,6 +286,12 @@
url: "../listen/listen?bookid=" + item.id // 前台播放版本
});
},
// 跳转详情页
goDetail(item) {
uni.navigateTo({
url: '../eBook/bookContent?Id=' + item.id
});
},
// 点不过去的
noOp(){
uni.showToast({

View File

@@ -10,7 +10,7 @@
<view style="font-weight: bold;margin-bottom: 30rpx;">
{{bookMessage.name}}
</view>
<view v-if="bookMessage.bookType==0" style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<view v-if="bookMessage.bookType==0&&bookMessage.author" style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookMessage.author.id,1)" style="margin-bottom: 20rpx;">
{{bookMessage.author.authorName}} [] >
</p>
@@ -37,7 +37,7 @@
<uni-tag @click="onPageJump('../talkBook/talkBookML?bookid='+ bookId)" v-if="bookMessage.teachIn == 1" class="tag" :inverted="true"
text="讲书" type="error"></uni-tag>
</view> -->
<view class="buy" v-if="!bookMessage.isBuy&&bookMessage.bookType==0">
<view class="buy" v-if="!bookMessage.isBuy&&bookMessage.bookType==0&&bookMessage.productId">
<view class="btn" @click="goBuy">
立即购买
</view>

View File

@@ -191,7 +191,6 @@
scroll: function(e) {},
// 获取五运六气
getYun(date) {
console.log(this.data + '1111111111111111111')
let that = this
$http.request({
url: "book/point/WYLQForYear",

View File

@@ -173,7 +173,8 @@
console.log('this.curTwoCateIndex',this.curTwoCateIndex)
if(this.curOneCateIndex==0){
uni.navigateTo({
url: '../bookShop/commodityDetail?id=' + item.id
// url: '../bookShop/commodityDetail?id=' + item.id
url: '../eBook/bookContent?Id=' + item.id
})
return
}

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="方检索"></z-nav-bar>
<z-nav-bar title="方检索"></z-nav-bar>
<!-- <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus" @input="input"
@cancel="cancel" @clear="clear">
</uni-search-bar> -->
@@ -181,8 +181,6 @@
uni.navigateTo({
url: "./prescriptDetail?id=" + item.prescriptId
})
},
// 获取方剂名称
getTitles(id) {
@@ -242,11 +240,15 @@
this.searchValue = ''
this.searchList = []
this.showSearchList = false
if (index != 2) {
this.getTowCateList(id)
} else {
if (index == 2) {
this.getJFList(id)
} else if (index == 3) {
this.twoCateList = []
this.getTitles(id)
} else{
this.getTowCateList(id)
}
},
getTowCateList(id) {
$http.request({
@@ -315,6 +317,7 @@
console.log(e)
})
},
getCateList(id) {
id ? '' : id = 0
this.twoCateList = []

View File

@@ -13,7 +13,7 @@
<view class="per_list">
<text class="biaoti">邮箱</text>
<text class="neirong">{{userMsage.email}}</text>
<text class="marPer" v-if="userMsage.email!=''" @click="emailShow = true;OpenClear()"
<text class="marPer" v-if="userMsage.email==''" @click="emailShow = true;OpenClear()"
style="background-color: #ed901d;">点击绑定</text>
</view>
<view class="per_list per_list_arrow" @click="avatarShow = true">