穴位检索

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

@@ -12,8 +12,8 @@
"src" : "图片路径" "src" : "图片路径"
} }
], ],
"versionName" : "1.2.26", "versionName" : "1.2.29",
"versionCode" : 1226, "versionCode" : 1229,
"app-plus" : { "app-plus" : {
"compatible" : { "compatible" : {
"ignoreVersion" : true "ignoreVersion" : true

View File

@@ -505,7 +505,7 @@
{ {
"path": "pages/prescript/prescript", "path": "pages/prescript/prescript",
"style": { "style": {
"navigationBarTitleText": "方检索", "navigationBarTitleText": "方检索",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },

View File

@@ -7,9 +7,8 @@
@cancel="cancel" @clear="clear"> @cancel="cancel" @clear="clear">
</uni-search-bar> --> </uni-search-bar> -->
<view class="search_box" v-if="oneCateList.length > 0"> <view class="search_box" v-if="oneCateList.length > 0">
<u-search :disabled="userMes.pointPower == 0 && oneCateList[curOneCateIndex].id == 3 || userMes <u-search placeholder="请输入穴位名" @focus="focus" @clear="clear" v-model="searchValue" @input="input"
.pointPower == 0 && oneCateList[curOneCateIndex].id == 6 ? true : false" @click="checkDisable" placeholder="请输入穴位名" @focus="focus" @clear="clear" @blur="blur" @search="search"></u-search>
v-model="searchValue" @input="input" @blur="blur" @search="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">
@@ -72,7 +71,7 @@
oneCateList: [], // 一级分类标题1 oneCateList: [], // 一级分类标题1
twoCateList: [], // 二级分类标题 twoCateList: [], // 二级分类标题
titleList: [], // 穴位标题 titleList: [], // 穴位标题
curOneCateIndex: 0, // 当前选中的一级分类 curOneCateIndex: 1, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类 curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组 searchList: [], // 搜索结果数组
showSearchList: false, showSearchList: false,
@@ -94,29 +93,7 @@
...mapState(['userInfo']), ...mapState(['userInfo']),
}, },
methods: { 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() { getUserInfo() {
// 用户详情 // 用户详情
@@ -133,15 +110,9 @@
// 穴位详情 // 穴位详情
gotoDetail(item) { 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({ uni.navigateTo({
url: "./acupointDetail?id=" + item.id url: "./acupointDetail?id=" + item.id
}) })
}
}, },
// 获取穴位名称 // 获取穴位名称
@@ -174,10 +145,11 @@
this.getTitles(id) this.getTitles(id)
}, },
setOneCateIndex(item, index) { setOneCateIndex(item, index) {
if(this.userMes.tgdzPower == 0){ console.log(item)
if (item.id == 3 && this.userMes.pointPower == 0) {
let that = this let that = this
uni.showModal({ uni.showModal({
content: "购买 针灸六经法要上册和下册 后方可使用此功能", content: '购买 手模 或 脚模 后方可使用此功能',
confirmText: '好的', confirmText: '好的',
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
@@ -188,7 +160,21 @@
}) })
return 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({ uni.navigateTo({
url: "../timeAcupoint/timeAcupoint" url: "../timeAcupoint/timeAcupoint"
}) })
@@ -244,7 +230,7 @@
console.log(res, '脉穴分类获取成功') console.log(res, '脉穴分类获取成功')
if (res.code == 0 && res.category.length > 0) { if (res.code == 0 && res.category.length > 0) {
this.oneCateList = res.category this.oneCateList = res.category
this.getTowCateList(this.oneCateList[0].id) this.getTowCateList(this.oneCateList[1].id)
} else { } else {
this.oneCateList = [] this.oneCateList = []
} }

View File

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

View File

@@ -10,7 +10,7 @@
<view style="font-weight: bold;margin-bottom: 30rpx;"> <view style="font-weight: bold;margin-bottom: 30rpx;">
{{bookMessage.name}} {{bookMessage.name}}
</view> </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;"> <p @click="onAuCHJump(bookMessage.author.id,1)" style="margin-bottom: 20rpx;">
{{bookMessage.author.authorName}} [] > {{bookMessage.author.authorName}} [] >
</p> </p>
@@ -37,7 +37,7 @@
<uni-tag @click="onPageJump('../talkBook/talkBookML?bookid='+ bookId)" v-if="bookMessage.teachIn == 1" class="tag" :inverted="true" <uni-tag @click="onPageJump('../talkBook/talkBookML?bookid='+ bookId)" v-if="bookMessage.teachIn == 1" class="tag" :inverted="true"
text="讲书" type="error"></uni-tag> text="讲书" type="error"></uni-tag>
</view> --> </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 class="btn" @click="goBuy">
立即购买 立即购买
</view> </view>

View File

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

View File

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

View File

@@ -13,12 +13,12 @@
<view class="fiveIcon flexbox" style="justify-content: space-around;"> <view class="fiveIcon flexbox" style="justify-content: space-around;">
<div class="item item1" @click="onPageJump('../acupoint/acupoint')"> <div class="item item1" @click="onPageJump('../acupoint/acupoint')">
<image src="../../static/icon/five1.png" mode="aspectFit" ></image> <image src="../../static/icon/five1.png" mode="aspectFit"></image>
<text>经穴检索</text> <text>经穴检索</text>
</div> </div>
<div class="item item1" @click="onPageJump('../prescript/prescript')"> <div class="item item1" @click="onPageJump('../prescript/prescript')">
<image src="../../static/icon/five2.png" mode="aspectFit"></image> <image src="../../static/icon/five2.png" mode="aspectFit"></image>
<text>检索</text> <text>检索</text>
</div> </div>
<div class="item item1" @click="onPageJump('../classic/classic')"> <div class="item item1" @click="onPageJump('../classic/classic')">
<image src="../../static/icon/five7.png" mode="aspectFit"></image> <image src="../../static/icon/five7.png" mode="aspectFit"></image>
@@ -31,25 +31,17 @@
</div> </div>
</div> </div>
<div class="item item1" @click="onPageJump('../peanut/searchFor')"> <!-- <div class="item item1" @click="onPageJump('../peanut/searchFor')">
<image src="../../static/icon/five3.png" mode="aspectFit"></image> <image src="../../static/icon/five3.png" mode="aspectFit"></image>
<text>书名检索</text> <text>书名检索</text>
</div> </div> -->
<div class="item item1" @click="onPageJump('../medicaldes/medicaldes')"> <div class="item item1" @click="onPageJump('../medicaldes/medicaldes')">
<image src="../../static/icon/five5.png" mode="aspectFit"></image> <image src="../../static/icon/five5.png" mode="aspectFit"></image>
<text>吴门医述</text> <text>吴门医述</text>
</div> </div>
</view> </view>
<!-- <view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入书名</text>
</view>
</view> -->
<!-- <view class="searBtn flexbox">
<text>搜索</text>
</view> -->
</view> </view>
<!-- <view class="home_lunbo"> <!-- <view class="home_lunbo">
- -
@@ -226,26 +218,44 @@
<!-- <i @click="onShopMore('Hot')">查看更多 ></i> --> <!-- <i @click="onShopMore('Hot')">查看更多 ></i> -->
<!-- <i @click="onPageJump('../bookShop/classify')">查看更多 ></i> --> <!-- <i @click="onPageJump('../bookShop/classify')">查看更多 ></i> -->
<!-- </view> --> <!-- </view> -->
<view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入书名</text>
</view>
<view class="searBtn">
<text>书名检索</text>
</view>
</view>
<scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0"> <scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0">
<view class="ProTabs"> <view class="ProTabs">
<text v-for="item in tagList" :key="item.splId" :class="[tabsid == item.splId ? 'cur' :'']" @click="tabsChange(item)">{{item.labelName}}</text> <text v-for="item in tagList" :key="item.splId" :class="[tabsid == item.splId ? 'cur' :'']"
@click="tabsChange(item)">{{item.labelName}}</text>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0" v-if="tabsid == 15"> <scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0" v-if="tabsid == 15">
<view class="ProTabs"> <view class="ProTabs">
<text v-for="item in yxtaglist" :key="item.splId" :class="[wztabsid == item.splId ? 'cur' :'']" @click="wztabsChange(item)">{{item.labelName}}</text> <text v-for="item in yxtaglist" :key="item.splId" :class="[wztabsid == item.splId ? 'cur' :'']"
@click="wztabsChange(item)">{{item.labelName}}</text>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0" v-if="tabsid == 16"> <scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0" v-if="tabsid == 16">
<view class="wzProTabs"> <view class="wzProTabs">
<text v-for="item in wztaglist" :key="item.splId" :class="[wztabsid == item.splId ? 'cur' :'']" @click="wztabsChange(item)">{{item.labelName}}</text> <text v-for="item in wztaglist" :key="item.splId" :class="[wztabsid == item.splId ? 'cur' :'']"
@click="wztabsChange(item)">{{item.labelName}}</text>
</view> </view>
</scroll-view> </scroll-view>
<!-- 商品展示 --> <!-- 商品展示 -->
<view class="goods"> <view class="goods">
<!-- 精选 --> <!-- 精选 -->
<view class="" > <view class="">
<view v-if="tjProList.length > 0" > <view v-if="tjProList.length > 0">
<view class="flexbox" style="flex-wrap: wrap;"> <view class="flexbox" style="flex-wrap: wrap;">
<view class="goodsItem" v-for="(item,index) in tjProList" :key="index" <view class="goodsItem" v-for="(item,index) in tjProList" :key="index"
@click="goDetail(item.productId)"> @click="goDetail(item.productId)">
@@ -255,7 +265,8 @@
{{item.productName}} {{item.productName}}
</view> </view>
<view class="goodsPrice"> <view class="goodsPrice">
<span class="price" v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice}}</span> <span class="price"
v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice}}</span>
<span class="price" v-else>{{item.price}}</span> <span class="price" v-else>{{item.price}}</span>
<span class="Salesnum">已售{{item.sumSales}} </span> <span class="Salesnum">已售{{item.sumSales}} </span>
</view> </view>
@@ -265,7 +276,8 @@
<view class=""> <view class="">
<view v-if="status==0" style="text-align: center;"> <view v-if="status==0" style="text-align: center;">
<u-loading-icon style="display: inline-block;"></u-loading-icon> <u-loading-icon style="display: inline-block;"></u-loading-icon>
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font> <font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中
</font>
</view> </view>
<view v-if="status==1"> <view v-if="status==1">
<u-divider text="全部加载完成"></u-divider> <u-divider text="全部加载完成"></u-divider>
@@ -295,23 +307,24 @@
import repciptData from '@/static/json/repcipt.json' import repciptData from '@/static/json/repcipt.json'
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import { import {
mapState,mapMutations mapState,
mapMutations
} from 'vuex'; } from 'vuex';
export default { export default {
data() { data() {
return { return {
myList:[], myList: [],
showEbook:false, // 显示电子书相关 showEbook: false, // 显示电子书相关
transaction: { // 成功回调 transaction: { // 成功回调
}, },
tabsNumber : null, tabsNumber: null,
scrollLeft:0, scrollLeft: 0,
maxTimes:1, // 轮询最大次数 maxTimes: 1, // 轮询最大次数
ComplateRequestInterval:null, // 轮询定时器 ComplateRequestInterval: null, // 轮询定时器
checking:false, // 正在检测 checking: false, // 正在检测
ComplateRequestArr:[], ComplateRequestArr: [],
iapChannel:null, iapChannel: null,
scrollTop: 0, scrollTop: 0,
list3: [ list3: [
// '../../static/icon/home_ban_1.jpg', // '../../static/icon/home_ban_1.jpg',
@@ -323,37 +336,59 @@
limiTist: [], limiTist: [],
jingList: [], jingList: [],
seckillList: [], seckillList: [],
offSaleList:[], // 折扣列表 offSaleList: [], // 折扣列表
goodsList: [], goodsList: [],
bgiStyle: { bgiStyle: {
background: '#fff' background: '#fff'
}, },
newBookList:[], newBookList: [],
iconStyle: { iconStyle: {
fontSize: '40rpx', fontSize: '40rpx',
fontWeight: 'bold', fontWeight: 'bold',
color: '#54a966', color: '#54a966',
}, },
tagList:[] ,// 推荐标签列表 tagList: [], // 推荐标签列表
wztaglist:[ wztaglist: [{
{splId:"-1",labelName:"全部"}, splId: "-1",
{splId:"5",labelName:"文学"}, labelName: "全部"
{splId:"6",labelName:"哲学"}, },
{
splId: "5",
labelName: "文学"
},
{
splId: "6",
labelName: "哲学"
},
], ],
yxtaglist:[ yxtaglist: [{
{splId:"0",labelName:"全部"}, splId: "0",
{splId:"2",labelName:"中医经典"}, labelName: "全部"
{splId:"1",labelName:"中医基础"}, },
{splId:"3",labelName:"各家学说"}, {
{splId:"4",labelName:"中医临床"}, splId: "2",
labelName: "中医经典"
},
{
splId: "1",
labelName: "中医基础"
},
{
splId: "3",
labelName: "各家学说"
},
{
splId: "4",
labelName: "中医临床"
},
], ],
wztabsid: '', wztabsid: '',
pageSize:10, pageSize: 10,
page:1, page: 1,
totalPage:0, totalPage: 0,
tjProList:[], tjProList: [],
status : 3, status: 3,
userMsg:{}, // 用户信息 userMsg: {}, // 用户信息
}; };
}, },
onPageScroll(e) { onPageScroll(e) {
@@ -400,11 +435,11 @@
onReachBottom() { onReachBottom() {
this.loadingNow = true this.loadingNow = true
console.log('到底了') console.log('到底了')
if(this.page+1 <= this.totalPage){ if (this.page + 1 <= this.totalPage) {
this.status = 0 this.status = 0
this.page++ this.page++
this.getJtData() this.getJtData()
}else{ } else {
this.status = 1 this.status = 1
} }
@@ -426,7 +461,7 @@
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
}, },
components:{ components: {
musicPlay musicPlay
}, },
//方法 //方法
@@ -450,41 +485,41 @@
this.$http this.$http
.post('book/label/getLabels') .post('book/label/getLabels')
.then(res => { .then(res => {
console.log(res,'标签列表') console.log(res, '标签列表')
if(res.code == 0 && res.result.labels.length > 0){ if (res.code == 0 && res.result.labels.length > 0) {
this.tagList = res.result.labels this.tagList = res.result.labels
this.tabsid = this.tagList[0].splId this.tabsid = this.tagList[0].splId
this.getJtData() this.getJtData()
} }
}).catch(e => { }).catch(e => {
console.log(e,'e') console.log(e, 'e')
}); });
}, },
tabsChange(item){ tabsChange(item) {
this.tjProList = [] this.tjProList = []
this.tabsid = item.splId this.tabsid = item.splId
if(this.tabsid == 15){ if (this.tabsid == 15) {
this.wztabsid = '0' this.wztabsid = '0'
}else if(this.tabsid == 16){ } else if (this.tabsid == 16) {
this.wztabsid = '-1' this.wztabsid = '-1'
}else{ } else {
this.wztabsid = '' this.wztabsid = ''
} }
this.page = 1 this.page = 1
// 获取推荐数据 // 获取推荐数据
this.getJtData() this.getJtData()
}, },
wztabsChange(item){ wztabsChange(item) {
this.tjProList = [] this.tjProList = []
this.wztabsid = item.splId this.wztabsid = item.splId
this.page = 1 this.page = 1
// 获取推荐数据 // 获取推荐数据
this.getJtData() this.getJtData()
}, },
getJtData(){ getJtData() {
this.$http this.$http
// .post('book/label/list',{ // .post('book/label/list',{
.post('book/label/getProductsByLabel',{ .post('book/label/getProductsByLabel', {
'splId': this.tabsid, 'splId': this.tabsid,
'limit': this.pageSize, 'limit': this.pageSize,
'page': this.page, 'page': this.page,
@@ -492,50 +527,50 @@
}) })
.then(res => { .then(res => {
if(res.code == 0 && res.page.records.length > 0){ if (res.code == 0 && res.page.records.length > 0) {
this.tjProList = this.tjProList.concat(res.page.records) this.tjProList = this.tjProList.concat(res.page.records)
this.totalPage = res.page.pages this.totalPage = res.page.pages
this.status = 3 this.status = 3
console.log(this.tjProList,'按标签检索结果') console.log(this.tjProList, '按标签检索结果')
}else{ } else {
this.tjProList = [] this.tjProList = []
this.totalPage = 0 this.totalPage = 0
} }
}).catch(e => { }).catch(e => {
console.log(e,'标签检索报错') console.log(e, '标签检索报错')
}); });
}, },
// 获取折扣图书 // 获取折扣图书
getOffSale(){ getOffSale() {
this.$http this.$http
.post('book/shopproduct/listactivityprice?limit=10&page=1') .post('book/shopproduct/listactivityprice?limit=10&page=1')
.then(res => { .then(res => {
console.log(res,'折扣') console.log(res, '折扣')
if(res.code == 0 && res.page.list.length > 0){ if (res.code == 0 && res.page.list.length > 0) {
this.offSaleList = res.page.list this.offSaleList = res.page.list
this.tabsNumber = 0 this.tabsNumber = 0
} }
}).catch(e => { }).catch(e => {
console.log(e,'e') console.log(e, 'e')
}); });
}, },
// 新书上市 // 新书上市
getNewBook(){ getNewBook() {
this.$http this.$http
.post('book/shopproduct/getNewBook',{ .post('book/shopproduct/getNewBook', {
'limit': 4, 'limit': 4,
'page':1 'page': 1
}) })
.then(res => { .then(res => {
console.log(res,'xinshu') console.log(res, 'xinshu')
this.newBookList = res.page.list this.newBookList = res.page.list
}).catch(e => { }).catch(e => {
console.log(e,'新书上市报错') console.log(e, '新书上市报错')
}); });
}, },
// 检测未完成订单 // 检测未完成订单
requestIapOrder(){ requestIapOrder() {
console.log('检测支付环境...') console.log('检测支付环境...')
plus.payment.getChannels((channels) => { plus.payment.getChannels((channels) => {
console.log(channels, 'channels') console.log(channels, 'channels')
@@ -545,7 +580,7 @@
if (channels[i].id === 'appleiap') { if (channels[i].id === 'appleiap') {
this.iapChannel = channels[i] this.iapChannel = channels[i]
// console.log(this.userInfo.restoreFlag,'this.userInfo.restoreFlag') // console.log(this.userInfo.restoreFlag,'this.userInfo.restoreFlag')
if(this.userInfo.restoreFlag){ // 如果存在异常回调订单 if (this.userInfo.restoreFlag) { // 如果存在异常回调订单
this.restoreComplateRequest() this.restoreComplateRequest()
} }
} }
@@ -553,27 +588,27 @@
}) })
}, },
// 查询未关闭订单 // 查询未关闭订单
restoreComplateRequest(){ restoreComplateRequest() {
let that = this let that = this
console.log('检测未完成订单') console.log('检测未完成订单')
console.log(this.iapChannel,'this.iapChannel') console.log(this.iapChannel, 'this.iapChannel')
this.iapChannel.restoreComplateRequest({ this.iapChannel.restoreComplateRequest({
manualFinishTransaction: true manualFinishTransaction: true
}, function(results) { }, function(results) {
if(!that.checking){ if (!that.checking) {
that.checking = true that.checking = true
// console.log(that.checking) // console.log(that.checking)
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证 // results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证
that.ComplateRequestArr = results that.ComplateRequestArr = results
console.log(that.ComplateRequestArr,'未完成订单数组') console.log(that.ComplateRequestArr, '未完成订单数组')
if(results && results.length>0){ if (results && results.length > 0) {
results.map((item,index)=>{ results.map((item, index) => {
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。 // "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
if(item.transactionState == '1'){ if (item.transactionState == '1') {
// 已经支付,但是没有走逻辑的内购订单 // 已经支付,但是没有走逻辑的内购订单
that.iapCheck(item,index) that.iapCheck(item, index)
}else{ } else {
// 其他状态的内购订单 // 其他状态的内购订单
that.finishTransaction(item) that.finishTransaction(item)
@@ -586,12 +621,14 @@
}, },
// 关闭交易订单 // 关闭交易订单
finishTransaction(trans,index){ finishTransaction(trans, index) {
this.iapChannel.finishTransaction(trans, (success) => { this.iapChannel.finishTransaction(trans, (success) => {
console.log('关闭订单成功',index); console.log('关闭订单成功', index);
if(index == this.ComplateRequestArr.length-1){ // 最后一个支付订单 if (index == this.ComplateRequestArr.length - 1) { // 最后一个支付订单
this.setUserInfo({restoreFlag:false}); this.setUserInfo({
restoreFlag: false
});
// console.log(this.userInfo.restoreFlag,'this.ComplateRequestArr.length+++') // console.log(this.userInfo.restoreFlag,'this.ComplateRequestArr.length+++')
} }
@@ -599,7 +636,7 @@
console.log('关闭订单失败'); console.log('关闭订单失败');
}); });
}, },
iapCheck(result,index) { iapCheck(result, index) {
const that = this const that = this
console.log('进入后台验证') console.log('进入后台验证')
let data = { let data = {
@@ -607,10 +644,10 @@
customerOid: that.userInfo.id, customerOid: that.userInfo.id,
productId: result.payment.productid, // 产品id productId: result.payment.productid, // 产品id
orderId: result.payment.username, // 系统订单号 orderId: result.payment.username, // 系统订单号
receiptData: result.transactionReceipt ,// 苹果返回收据 receiptData: result.transactionReceipt, // 苹果返回收据
loadAnimate:'none', // 请求加载动画 loadAnimate: 'none', // 请求加载动画
} }
console.log(data,'data') console.log(data, 'data')
$http.request({ $http.request({
url: "/Ipa/veri", url: "/Ipa/veri",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
@@ -621,51 +658,51 @@
}).then(res => { }).then(res => {
console.log(JSON.stringify(res)) console.log(JSON.stringify(res))
console.log(res.code) console.log(res.code)
if(res.code == 0){ if (res.code == 0) {
// uni.hideLoading() // uni.hideLoading()
console.log('充值订单已处理,请留意账户金额变动....') console.log('充值订单已处理,请留意账户金额变动....')
// 服务器验证票据有效后在客户端关闭订单 // 服务器验证票据有效后在客户端关闭订单
that.finishTransaction(result,index) that.finishTransaction(result, index)
}else if(res.code == 200){ // 重复验证订单 } else if (res.code == 200) { // 重复验证订单
console.log('重复验证....') console.log('重复验证....')
that.finishTransaction(result,index) that.finishTransaction(result, index)
} }
}).catch(e => { }).catch(e => {
console.log('支付验证失败,进入轮询程序...') console.log('支付验证失败,进入轮询程序...')
that.getIapPayResult(result,index) that.getIapPayResult(result, index)
}) })
console.log('--------------') console.log('--------------')
}, },
// 轮询验证支付结果 // 轮询验证支付结果
getIapPayResult(result,index){ getIapPayResult(result, index) {
// let interval = null // let interval = null
this.ComplateRequestInterval = setTimeout(() => { this.ComplateRequestInterval = setTimeout(() => {
if(this.maxTimes <= 3){ if (this.maxTimes <= 3) {
this.iapCheck(result,index) this.iapCheck(result, index)
console.log('执行1', this.maxTimes,this.ComplateRequestInterval) console.log('执行1', this.maxTimes, this.ComplateRequestInterval)
this.maxTimes += 1 this.maxTimes += 1
}else{ } else {
this.maxTimes = 0 this.maxTimes = 0
console.log('停止轮询', this.maxTimes,this.ComplateRequestInterval, this.maxTimes) console.log('停止轮询', this.maxTimes, this.ComplateRequestInterval, this.maxTimes)
this.checking = false this.checking = false
this.saveErrorIapOrder(result,index) this.saveErrorIapOrder(result, index)
clearTimeout(this.ComplateRequestInterval) clearTimeout(this.ComplateRequestInterval)
} }
},10000) }, 10000)
}, },
// 轮询失败接口 // 轮询失败接口
saveErrorIapOrder(result,index){ saveErrorIapOrder(result, index) {
console.log('提交到充值问题单里面...') console.log('提交到充值问题单里面...')
let data = { let data = {
transactionId : result.transactionIdentifier, transactionId: result.transactionIdentifier,
failureflag: 1, failureflag: 1,
orderId:result.payment.username, orderId: result.payment.username,
receiptData:result.transactionReceipt, receiptData: result.transactionReceipt,
productId:result.payment.productid, productId: result.payment.productid,
customerOid:this.userInfo.id customerOid: this.userInfo.id
} }
$http.request({ $http.request({
url: "Ipa/failure", url: "Ipa/failure",
@@ -676,14 +713,14 @@
}, },
}).then(res => { }).then(res => {
console.log(JSON.stringify(res)) console.log(JSON.stringify(res))
if(res.code == 200){ if (res.code == 200) {
console.log('提交成功,关闭订单') console.log('提交成功,关闭订单')
this.finishTransaction(result,index) this.finishTransaction(result, index)
} }
}).catch(e => { }).catch(e => {
console.log(e) console.log(e)
if(e.statusCode == 0){ // 重复提交,直接关闭订单 if (e.statusCode == 0) { // 重复提交,直接关闭订单
this.finishTransaction(result,index) this.finishTransaction(result, index)
} }
}) })
}, },
@@ -718,15 +755,14 @@
// 跳转 // 跳转
onPageJump(url) { onPageJump(url) {
console.log(this.userMsg,'this.userMsg') console.log(this.userMsg, 'this.userMsg')
if(url == '../luck/luck' && this.userMsg.wylqPower == 0){ if (url == '../luck/luck' && this.userMsg.wylqPower == 0) {
uni.showModal({ uni.showModal({
content: "购买 中医时间医学·火病原理 后方可使用此功能", content: "购买 中医时间医学·火病原理 后方可使用此功能",
confirmText: '好的', confirmText: '好的',
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {}
}
} }
}) })
return return
@@ -790,55 +826,137 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/style/mixin.scss'; @import '@/style/mixin.scss';
.fiveIcon{justify-content: space-between; text-align: center;
text{ .fiveIcon {
font-size: 28rpx; color: #11a669; justify-content: space-between;
text-align: center;
text {
font-size: 28rpx;
color: #11a669;
} }
image{width: 56rpx; height: 56rpx; margin: 0 auto; }
image {
width: 56rpx;
height: 56rpx;
margin: 0 auto;
} }
.hehan{width: 80%; margin: 10rpx auto;}
.zhekou{
.goodsName{margin-bottom: 20rpx;}
} }
.activityPrice{font-size: 60rpx;}
.priceAndnum{ font-size: 24rpx !important; .hehan {
.price{color: #9b9b9b !important; font-size: inherit; font-weight: normal !important; display: block;} width: 80%;
margin: 10rpx auto;
} }
.ProTabs{
.zhekou {
.goodsName {
margin-bottom: 20rpx;
}
}
.activityPrice {
font-size: 60rpx;
}
.priceAndnum {
font-size: 24rpx !important;
.price {
color: #9b9b9b !important;
font-size: inherit;
font-weight: normal !important;
display: block;
}
}
.ProTabs {
// margin: 20rpx 0; // margin: 20rpx 0;
padding:0 20rpx; padding: 0 20rpx;
text{padding: 8rpx 14rpx; font-size: 32rpx; display: inline-block; border-radius: 10rpx; overflow: hidden;
text {
padding: 8rpx 14rpx;
font-size: 32rpx;
display: inline-block;
border-radius: 10rpx;
overflow: hidden;
// background-color: #eee; // background-color: #eee;
color: #55aa7f; margin-right: 10rpx;} color: #55aa7f;
text.cur{background-color:#55aa7f ; color: #fff;} margin-right: 10rpx;
} }
.wzProTabs{
text.cur {
background-color: #55aa7f;
color: #fff;
}
}
.wzProTabs {
display: flex; display: flex;
justify-content: center; justify-content: center;
padding:0 20rpx; padding: 0 20rpx;
text{padding: 8rpx 14rpx; font-size: 32rpx; display: inline-block; border-radius: 10rpx; overflow: hidden;
text {
padding: 8rpx 14rpx;
font-size: 32rpx;
display: inline-block;
border-radius: 10rpx;
overflow: hidden;
// background-color: #eee; // background-color: #eee;
color: #55aa7f; margin-right: 10rpx;} color: #55aa7f;
text.cur{background-color:#55aa7f ; color: #fff;} margin-right: 10rpx;
} }
text.cur {
background-color: #55aa7f;
color: #fff;
}
}
// .newBook{margin-top: 10rpx;} // .newBook{margin-top: 10rpx;}
.scroll-view_H{background-color: #fff;white-space: nowrap; .scroll-view_H {
padding:10rpx ; margin-top: 12rpx;} background-color: #fff;
.scroll-view_H{ white-space: nowrap;
.item { padding: 10rpx; overflow: hidden; display: inline-block; padding-bottom: 0; padding: 10rpx;
width: 180rpx !important; margin-right: 20rpx; border-radius: 10rpx; margin-top: 12rpx;
.videoBox{ }
image{display: block; width:150rpx;
.scroll-view_H {
.item {
padding: 10rpx;
overflow: hidden;
display: inline-block;
padding-bottom: 0;
width: 180rpx !important;
margin-right: 20rpx;
border-radius: 10rpx;
.videoBox {
image {
display: block;
width: 150rpx;
height: 170rpx; height: 170rpx;
} }
} }
.bookName{display: block; margin-top: 6rpx; color: #666; font-size: 24rpx; white-space: nowrap;
overflow-x: hidden; overflow: hidden; .bookName {
text-overflow: ellipsis;} display: block;
margin-top: 6rpx;
color: #666;
font-size: 24rpx;
white-space: nowrap;
overflow-x: hidden;
overflow: hidden;
text-overflow: ellipsis;
} }
}
// .item.active{margin-right: 20rpx; border: 1px solid #55aa00; border-radius: 10rpx;} // .item.active{margin-right: 20rpx; border: 1px solid #55aa00; border-radius: 10rpx;}
} }
.flexbox{display: flex;}
.flexbox {
display: flex;
}
.head_line { .head_line {
padding-top: 8rpx; padding-top: 8rpx;
margin: 12rpx 0 0 0; margin: 12rpx 0 0 0;
@@ -874,32 +992,57 @@
background-size: cover; background-size: cover;
padding: 20rpx; padding: 20rpx;
position: relative; position: relative;
// margin-bottom:60rpx; // margin-bottom:60rpx;
// height: 400rpx; margin-bottom: 130rpx; // height: 400rpx; margin-bottom: 130rpx;
.icon_hua_1 { .icon_hua_1 {
// margin: 0 auto; // margin: 0 auto;
width: 100%; text-align: center; width: 100%;
text-align: center;
height: 80rpx;
image {
width: 150rpx;
height: 80rpx; height: 80rpx;
image{width: 150rpx; height: 80rpx;}
} }
.icon_hua{width: 100%; text-align: center; display: block;
image{width: 150rpx; height: 150rpx; margin: 0 auto;}
} }
.search_box { margin: 0 auto; margin-top: 20rpx; align-items: center;
width: calc(100% - 30rpx); margin-top: 0; .icon_hua {
width: 100%;
text-align: center;
display: block;
image {
width: 150rpx;
height: 150rpx;
margin: 0 auto;
}
}
}
.search_box {
margin: 20rpx auto 10rpx auto;
align-items: center;
width: calc(100% - 30rpx);
margin-bottom: 20rpx; margin-bottom: 20rpx;
.search{height: 56upx; .search {
height: 56upx;
display: flex; display: flex;
width: 86%; margin: 0 auto; width: 100%;
margin: 0 auto;
align-items: center; align-items: center;
padding: 0upx 40upx; padding: 0upx 40upx;
background-color: #fff; background-color: #fff;
border-radius: 20upx; border-radius: 20upx;
box-shadow: 0 0px 10px 1px #54a96633; box-shadow: 0 0px 10px 1px #54a96633;
} }
.prompt { .prompt {
color: #838383; font-size: 24rpx; color: #838383;
font-size: 24rpx;
} }
@@ -908,16 +1051,29 @@
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
width:36upx; width: 36upx;
height: 36upx; height: 36upx;
margin-right: 20upx; margin-right: 20upx;
} }
.searBtn {
width: 180rpx;
line-height: 56rpx;
text-align: center;
align-items: center;
font-size: 28rpx;
color: #fff;
margin-left: -80rpx;
background-color: #11a669;
border-top-right-radius: 20upx;
border-bottom-right-radius: 20upx;
} }
.searBtn{
width: 80rpx; align-items: center;
font-size: 30rpx; color: #fff;
} }
}
.home_nar { .home_nar {
background-color: #fff; background-color: #fff;
padding: 40rpx 10rpx; padding: 40rpx 10rpx;
@@ -925,6 +1081,7 @@
display: flex; display: flex;
color: #333; color: #333;
margin-bottom: 0; margin-bottom: 0;
// .dianzishu{ margin-right:10rpx; // .dianzishu{ margin-right:10rpx;
// background-color:#f8d6f4 ; border: 2px solid #edcce9; // background-color:#f8d6f4 ; border: 2px solid #edcce9;
// } // }
@@ -935,19 +1092,28 @@
// width: 23%; // width: 23%;
width: 31%; width: 31%;
text-align: center; text-align: center;
border-radius: 20rpx ; border-radius: 20rpx;
// line-height: 110upx; // line-height: 110upx;
//display: flex; //display: flex;
align-content: center; align-content: center;
justify-content: center; justify-content: center;
image { image {
width:120rpx; width: 120rpx;
height:120rpx; height: 120rpx;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
// margin: 0 20rpx; // margin: 0 20rpx;
} }
text{ display:block; text-align: center; margin-top:4rpx; font-size: 36rpx; color: #000; font-weight:blod;}
text {
display: block;
text-align: center;
margin-top: 4rpx;
font-size: 36rpx;
color: #000;
font-weight: blod;
}
} }
@@ -1211,13 +1377,15 @@
.goods { .goods {
width: 100%; width: 100%;
margin:0 0 50rpx 0; background-color: #fff; margin: 0 0 50rpx 0;
background-color: #fff;
.goodsItem { .goodsItem {
display: inline-block; display: inline-block;
width: 46%; width: 46%;
border-radius: 20rpx; border-radius: 20rpx;
padding: 25rpx; padding-bottom: 5rpx; padding: 25rpx;
padding-bottom: 5rpx;
margin: 0 20rpx 20rpx 20rpx; margin: 0 20rpx 20rpx 20rpx;
background-color: #fff; background-color: #fff;
border: 1px solid #eee; border: 1px solid #eee;
@@ -1239,12 +1407,17 @@
.goodsPrice { .goodsPrice {
font-size: 28rpx; font-size: 28rpx;
margin: 5rpx 0 0 3rpx; margin: 5rpx 0 0 3rpx;
display: flex; justify-content: space-between; display: flex;
.price{ justify-content: space-between;
.price {
font-weight: bold; font-weight: bold;
color: #ff0000; color: #ff0000;
} }
.Salesnum{color: #9b9b9b;}
.Salesnum {
color: #9b9b9b;
}
} }
} }
} }

View File

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

View File

@@ -13,7 +13,7 @@
<view class="per_list"> <view class="per_list">
<text class="biaoti">邮箱</text> <text class="biaoti">邮箱</text>
<text class="neirong">{{userMsage.email}}</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> style="background-color: #ed901d;">点击绑定</text>
</view> </view>
<view class="per_list per_list_arrow" @click="avatarShow = true"> <view class="per_list per_list_arrow" @click="avatarShow = true">