diff --git a/components/z-navigation/z-navigation.vue b/components/z-navigation/z-navigation.vue index fb51b66..681f587 100644 --- a/components/z-navigation/z-navigation.vue +++ b/components/z-navigation/z-navigation.vue @@ -1,5 +1,5 @@ + + \ No newline at end of file diff --git a/pages/bookShop/commodityDetail.vue b/pages/bookShop/commodityDetail.vue index f60949d..6c93415 100644 --- a/pages/bookShop/commodityDetail.vue +++ b/pages/bookShop/commodityDetail.vue @@ -66,7 +66,7 @@ - + 赠送听书权益 diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue index c754f20..6062111 100644 --- a/pages/bookShop/orderLCont.vue +++ b/pages/bookShop/orderLCont.vue @@ -509,15 +509,15 @@ uni.showModal({ title: '提示', content: '微信号:yilujiankangkefu', - success: function (res) { - if (res.confirm) { - uni.makePhoneCall({ - phoneNumber: '022-24142321' //仅为示例 - }); - } else if (res.cancel) { + // success: function (res) { + // if (res.confirm) { + // uni.makePhoneCall({ + // phoneNumber: '022-24142321' //仅为示例 + // }); + // } else if (res.cancel) { - } - } + // } + // } }) }, // 查看物流 diff --git a/pages/bookShop/settlement.vue b/pages/bookShop/settlement.vue index fcea81f..92f0063 100644 --- a/pages/bookShop/settlement.vue +++ b/pages/bookShop/settlement.vue @@ -37,10 +37,11 @@ {{item.productName}} - ¥{{item.activityPrice*item.productAmount}} + ¥{{item.activityPrice*item.productAmount}} ¥{{item.price*item.productAmount}} + :input-height="20" :min="1" :max="item.productStock" integer> @@ -55,10 +56,8 @@ 优惠券 - 当前可选{{this.youhuiList.length}}张 - 暂无优惠券 + 当前可选{{this.youhuiList.length}}张 + 暂无优惠券 - ¥{{youhuiContent.coupons.couponAmount}} @@ -67,19 +66,25 @@ 运费 ¥{{farePrice}} + + + 注:如订单包含一种或多种预售书,预售书和现货书需分开发货(即需要收取多次快递首重费用);如多本书会按照实际重量,收取快递续重费用。 + - + {{item.title}} - {{userMes.peanutCoin}}天医币可用 - 去充值 + {{userMes.peanutCoin}}天医币可用 + 去充值 + style="float: right;margin-top: 5rpx;"> @@ -90,20 +95,22 @@ - + {{item.title}} - {{userMes.peanutCoin}}天医币可用 - 去充值 + {{userMes.peanutCoin}}天医币可用 + 去充值 + style="float: right;margin-top: 5rpx;"> - - + + 实付款: {{realPrice}} @@ -122,7 +129,7 @@ 立即支付 - + @@ -133,7 +140,7 @@ + v-for="(item,index) in addressList" :key="index" @click="choseDizhi(index)"> @@ -150,7 +157,7 @@ - {{item.province}} {{item.city}} {{item.county}} + {{item.province}} {{item.city}} {{item.county}} {{item.detailAddress}} @@ -193,11 +200,11 @@ - + - + @@ -206,7 +213,8 @@ import $http from '@/config/requestConfig.js'; import { setPay, - setPayAssign,setWXPay + setPayAssign, + setWXPay } from '@/config/utils'; import { mapState @@ -214,26 +222,26 @@ export default { data() { return { - isAndorid:true, // 操作系统 - playData:{}, + isAndorid: true, // 操作系统 + playData: {}, typeId: 0, shangIDNum: 0, cartIDNum: [], cartList: [], - userMes:{}, // 用户信息 - amount:null, // 商品总价 + userMes: {}, // 用户信息 + amount: null, // 商品总价 addressList: [], adressMoRen: {}, - adressMoRenPath:"", + adressMoRenPath: "", adressMoRIndex: 0, youhuiList: [], - addressId:null, + addressId: null, youhuiContent: {}, youhuiIndex: '', dizhiShow: false, youhuiShow: false, totalPrice: 0, - isSend:'0', + isSend: '0', farePrice: 0, realPrice: 0, payType: 1, @@ -242,17 +250,17 @@ title: '支付宝', id: 2, img: '../../static/icon/pay_1.png' - }, + }, { title: '微信', id: 1, img: '../../static/icon/pay_2.png' }, { - title: '天医币购买', - id: 4, - img: '../../static/icon/oder_chong.png' - }, + title: '天医币购买', + id: 4, + img: '../../static/icon/oder_chong.png' + }, // { // title: 'ios内购', // id: 3, @@ -263,17 +271,17 @@ title: '支付宝', id: 2, img: '../../static/icon/pay_1.png' - }, + }, { title: '微信', id: 1, img: '../../static/icon/pay_2.png' }, - { - title: '天医币购买', - id: 4, - img: '../../static/icon/oder_chong.png' - }, + // { + // title: '天医币购买', + // id: 4, + // img: '../../static/icon/oder_chong.png' + // }, // { // title: 'ios内购', // id: 3, @@ -290,41 +298,41 @@ this.typeId = 0 this.shangIDNum = e.list } - // this.getYunFei() - - this.getData() - this.getOS() + // this.getYunFei() + + this.getData() + this.getOS() }, - onShow() { + onShow() { // if (this.typeId == 1) { // this.getCartList() - + // } else if (this.typeId == 0) { // this.getShangList(this.shangIDNum); // } if (this.typeId == 1) { this.getCartList() - + } else if (this.typeId == 0) { - this.getShangList(this.shangIDNum); + this.getShangList(this.shangIDNum); } // this.getUserAddress() }, computed: { ...mapState(['userInfo']), }, - components:{ + components: { musicPlay }, methods: { // 获得操作系统 - getOS(){ + getOS() { let oprateOs = '' oprateOs = uni.getSystemInfoSync().platform // console.log(oprateOs) - if(oprateOs == 'android'){ + if (oprateOs == 'android') { this.isAndorid = true - }else{ + } else { this.isAndorid = false } }, @@ -337,18 +345,18 @@ getData() { let that = this // 获取个人信息 - // 用户详情 - if (this.userInfo.id != undefined) { - this.$http - .post('book/user/info/' + this.userInfo.id) - .then(res => { - this.userMes = res.user - // consol.log(this.userMes.peanutCoin,'呼呼') - if (this.userMes.vip != 0) { - this.typeFen = 2 - } - }); - } + // 用户详情 + if (this.userInfo.id != undefined) { + this.$http + .post('book/user/info/' + this.userInfo.id) + .then(res => { + this.userMes = res.user + // consol.log(this.userMes.peanutCoin,'呼呼') + if (this.userMes.vip != 0) { + this.typeFen = 2 + } + }); + } }, // 获取地址列表 getUserAddress() { @@ -362,13 +370,13 @@ // console.log(this.addressList,'地址列表') this.adressMoRen = this.addressList[this.adressMoRIndex] console.log(this.adressMoRen, '默认') - if(this.adressMoRen != {} && this.adressMoRen.id){ + if (this.adressMoRen != {} && this.adressMoRen.id) { // console.log('运费之前') this.getYunFei() - }else{ + } else { // this.getUserAddress() uni.showToast({ - title:'获取用户地址失败', + title: '获取用户地址失败', icon: 'none' }) } @@ -376,15 +384,15 @@ } }) }, - goPoinBuy(){ - if(this.realPrice > this.userMes.peanutCoin){ + goPoinBuy() { + if (this.realPrice > this.userMes.peanutCoin) { uni.showToast({ - title:'天医币不足,请充值', + title: '天医币不足,请充值', icon: 'none', duration: 2000 }) - return - }else{ + return + } else { this.goBuyJie() } }, @@ -404,11 +412,12 @@ price = item.productAmount * item.price; allprice += price }) - this.amount = allprice // 商品总价 + this.amount = allprice // 商品总价 this.allPrice() // '&products=' + proId + //商品id this.$http - .post('book/couponhistory/appGetUserCoupon?userId=' + this.userInfo.id + '&amount=' + this.amount + '&type=0') + .post('book/couponhistory/appGetUserCoupon?userId=' + this.userInfo.id + '&amount=' + this.amount + + '&type=0') .then(res => { this.youhuiList = res.userCoupons }); @@ -426,13 +435,13 @@ prodCont.image = res.shopProduct.productImages prodCont.productName = res.shopProduct.productName prodCont.productAmount = 1 - if(res.shopProduct.activityPrice && res.shopProduct.activityPrice > 0){ + if (res.shopProduct.activityPrice && res.shopProduct.activityPrice > 0) { prodCont.price = res.shopProduct.activityPrice - }else{ + } else { prodCont.price = res.shopProduct.price } prodCont.weight = res.shopProduct.weight - this.cartList.push(prodCont) + this.cartList.push(prodCont) this.getCourpe() this.getUserAddress() //this.getYunFei() @@ -452,55 +461,58 @@ console.log(this.cartList, '购物车列表') this.getCourpe() this.getUserAddress() - + }) }, // 获取运费 - getYunFei(){ + getYunFei() { let key = [] let dataToString = '' // console.log(this.adressMoRen, '默认地址') - this.cartList.forEach((item, index) => { - key.push({productId: item.productId, quantity:item.productAmount}) - // dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&") - }) - // console.log(key,'this.adressMoRen.areaidpath') - + this.cartList.forEach((item, index) => { + key.push({ + productId: item.productId, + quantity: item.productAmount + }) + // dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&") + }) + // console.log(key,'this.adressMoRen.areaidpath') + $http.request({ // url: "book/buyOrder/calculateTransportPrice/", url: "book/buyOrder/calculateTransportPrice", // url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString, method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data:{ - 'regionCode':this.adressMoRen.regionCode, - 'products':key, - loadAnimate:'none', // 请求加载动画 - } , + data: { + 'regionCode': this.adressMoRen.regionCode, + 'products': key, + loadAnimate: 'none', // 请求加载动画 + }, header: { //默认 无 说明:请求头 'Content-Type': 'application/json' }, - }).then(res => { + }).then(res => { if (res.code == 0) { this.farePrice = res.result - console.log('需要的运费',res.result) + console.log('需要的运费', res.result) this.allPrice() } - + }) - }, + }, // 总价 allPrice() { let allprice = 0; this.cartList.forEach((item, index) => { let price = 0; - if(item.activityPrice && item.activityPrice > 0){ + if (item.activityPrice && item.activityPrice > 0) { price = item.productAmount * item.activityPrice; - }else{ + } else { price = item.productAmount * item.price; - } + } allprice += price - }) + }) this.totalPrice = allprice if (this.youhuiContent.id != undefined) { this.realPrice = this.totalPrice - this.youhuiContent.coupons.couponAmount @@ -510,9 +522,9 @@ this.realPrice = this.realPrice + this.farePrice }, // 超出阈值时 - overlimit(){ + overlimit() { uni.showToast({ - title:'超出商品数量', + title: '超出商品数量', icon: 'error', duration: 1000 }) @@ -523,34 +535,34 @@ productItem = item productItem.productAmount = e.value this.updateCart(productItem) - this.$nextTick(()=>{ + this.$nextTick(() => { this.getYunFei() this.getCourpe() }) - + }, - // 更新购物车 - updateCart(shagnpin){ - // 已在购物车中添加 - $http.request({ - url: "book/ordercart/update", - method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data: shagnpin, - header: { //默认 无 说明:请求头 - 'Content-Type': 'application/json' - } - }).then(res => { - if (res.code == 0) { - // uni.showToast({ - // title: '加入购物车成功', - // duration: 1000, - // }); - } - }) - }, + // 更新购物车 + updateCart(shagnpin) { + // 已在购物车中添加 + $http.request({ + url: "book/ordercart/update", + method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + data: shagnpin, + header: { //默认 无 说明:请求头 + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code == 0) { + // uni.showToast({ + // title: '加入购物车成功', + // duration: 1000, + // }); + } + }) + }, // 更改地址 - choseDizhi(e) { + choseDizhi(e) { this.adressMoRIndex = e this.adressMoRen = this.addressList[this.adressMoRIndex] console.log(this.adressMoRen) @@ -573,9 +585,9 @@ this.youhuiShow = false }, // 提交结算 - goBuyJie() { - if(this.addressList.length == 0) { - this.dizhiShow = true // 如果没有地址信息 + goBuyJie() { + if (this.addressList.length == 0) { + this.dizhiShow = true // 如果没有地址信息 } if (!this.nowClick) { return @@ -606,12 +618,12 @@ userId: this.userInfo.id, //下单人ID shippingUser: this.adressMoRen.consigneeName, //收货人姓名 userPhone: this.adressMoRen.consigneePhone, //收货人手机号 - + // province: this.adressMoRen.areaidpathtext.split(' ')[0], //省 // city: this.adressMoRen.areaidpathtext.split(' ')[1], //市 // district: this.adressMoRen.areaidpathtext.split(' ')[2], //区 //address: this.adressMoRen.useraddress, //地址 - + paymentMethod: this.payType, //支付方式 2支付宝,1微信,3ios内购 4,天医币购买 orderMoney: this.totalPrice, //订单金额 realMoney: this.realPrice, //实收金额 @@ -623,9 +635,9 @@ orderStatus: 0, //订单状态 productList: xiaBiao, //订单列表商品 orderType: "order", //订单类型 - addressId:this.adressMoRen.id // 地址ID - } - $http.request({ + addressId: this.adressMoRen.id // 地址ID + } + $http.request({ // url: "book/buyOrder/buySave", url: "book/buyOrder/placeOrder", method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 @@ -642,54 +654,54 @@ image: '../../static/icon/ic_close.png' }); } else { - if(this.payType == 2){ - // 常规支付 - uni.showToast({ - title: "正在支付", - icon: "loading" - }); - setPay({ - typePay: 'alipay', - subject: 'order', - totalAmount: res.money, - type: 2, - relevanceoid: res.orderSn, - customerId: this.userInfo.id, - }, res => { - if (res.success) { - uni.showToast({ - title: "支付成功" - }); - setTimeout(() => { - uni.switchTab({ - url: './orderList' + if (this.payType == 2) { + // 常规支付 + uni.showToast({ + title: "正在支付", + icon: "loading" + }); + setPay({ + typePay: 'alipay', + subject: 'order', + totalAmount: res.money, + type: 2, + relevanceoid: res.orderSn, + customerId: this.userInfo.id, + }, res => { + if (res.success) { + uni.showToast({ + title: "支付成功" }); - // uni.navigateTo({ - // url: './orderList' - // }); - }, 1000) - } else { - uni.showToast({ - title: "支付失败", - icon: "none", - image: '../../static/icon/ic_close.png' - }); - // setTimeout(() => { - - // uni.navigateTo({ - // url: './orderList' - // }); - // }, 1000) - } - }) - }else if(this.payType == 1){ + setTimeout(() => { + uni.switchTab({ + url: './orderList' + }); + // uni.navigateTo({ + // url: './orderList' + // }); + }, 1000) + } else { + uni.showToast({ + title: "支付失败", + icon: "none", + image: '../../static/icon/ic_close.png' + }); + // setTimeout(() => { + + // uni.navigateTo({ + // url: './orderList' + // }); + // }, 1000) + } + }) + } else if (this.payType == 1) { // 微信支付 let data1 = { - orderSn:res.orderSn, - buyOrderId: null, - totalAmount: res.money + orderSn: res.orderSn, + buyOrderId: null, + totalAmount: res.money } - setWXPay(data1,res => { + setWXPay(data1, res => { if (res.success) { uni.showToast({ title: "支付成功" @@ -699,28 +711,28 @@ url: './orderList' }); }, 1000) - } else { + } else { console.log(res) - if(res.data.errMsg.indexOf('User canceled') != -1){ + if (res.data.errMsg.indexOf('User canceled') != -1) { uni.showToast({ title: "用户取消支付", icon: "none", image: '../../static/icon/ic_close.png' }); - }else{ - uni.showToast({ - title: "支付失败", - icon: "none", - image: '../../static/icon/ic_close.png' - }); + } else { + uni.showToast({ + title: "支付失败", + icon: "none", + image: '../../static/icon/ic_close.png' + }); } } }) - }else if(this.payType == 4){ + } else if (this.payType == 4) { // 天医币支付 uni.showToast({ title: "购买成功", - icon: "success" + icon: "success" }); setTimeout(() => { uni.switchTab({ @@ -884,6 +896,11 @@ float: right; } } + + .yq_beizhu { + color: #aaa; + font-size: 24rpx; + } } .youhui_quan>view { @@ -899,7 +916,8 @@ padding: 30rpx 40rpx 0 40rpx; background-color: #fff; border-bottom: 1px solid #eee; - padding-bottom:90rpx; + padding-bottom: 90rpx; + .zhif_radio { .zhif_xuanx { @@ -1067,6 +1085,7 @@ border-color: #fd6004; } } + .chongBtn { background-color: #54a966; color: #fff !important; @@ -1074,6 +1093,6 @@ border-radius: 10rpx; padding: 2rpx 10rpx; font-size: 20rpx; - display: inline-block; + display: inline-block; } - + \ No newline at end of file diff --git a/pages/classic/classic.vue b/pages/classic/classic.vue index bbb9734..9441387 100644 --- a/pages/classic/classic.vue +++ b/pages/classic/classic.vue @@ -48,7 +48,7 @@ --> - + 返回今天 - + 补卡 - + @@ -281,7 +283,7 @@ export default { data() { return { - isAndorid:true, + isAndorid: true, opPinglun: {}, // 针对的评论对象 pinglunShow: false, placeholder: '开始输入...', @@ -352,7 +354,7 @@ onLoad(e) { this.bookid = e.bookid this.windowWidth = uni.getSystemInfoSync().windowWidth; - this.getOS() + this.getOS() }, onPullDownRefresh() { console.log('下拉刷新了') @@ -376,21 +378,22 @@ }, methods: { // 获得操作系统 - getOS(){ - let oprateOs = '' + getOS() { + let oprateOs = '' oprateOs = uni.getSystemInfoSync().platform // console.log(oprateOs) - if(oprateOs == 'android'){ + if (oprateOs == 'android') { this.isAndorid = true - }else{ + } else { this.isAndorid = false } }, - haveSelected(data){ + haveSelected(data) { let image = '' - this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image = 'static/fengziIcon.jpg' - console.log(data,' 选择的是') - if(data.index == 0){ + this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image = + 'static/fengziIcon.jpg' + console.log(data, ' 选择的是') + if (data.index == 0) { // 分享到好友 uni.share({ provider: "weixin", @@ -400,14 +403,14 @@ title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`, summary: `${this.taskInfo.content}`, imageUrl: image, - success: function (res) { + success: function(res) { console.log("success:" + JSON.stringify(res)); }, - fail: function (err) { + fail: function(err) { console.log("fail:" + JSON.stringify(err)); } }); - }else if(data.index == 1){ + } else if (data.index == 1) { // 分享到朋友圈 uni.share({ provider: "weixin", @@ -417,19 +420,19 @@ title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`, summary: `${this.taskInfo.content}`, imageUrl: image, - success: function (res) { + success: function(res) { console.log("success:" + JSON.stringify(res)); }, - fail: function (err) { + fail: function(err) { console.log("fail:" + JSON.stringify(err)); } }); } }, // 新写分享 - newOnShare(){ + newOnShare() { this.$refs.share.open() - }, + }, showPingLun(item) { // 回复评论 this.opPinglun = item @@ -678,29 +681,31 @@ uni.hideLoading() }) }, - gotoBuy(){ + gotoBuy() { let that = this - uni.showModal({ - title: '提示', - content: '购买本书后方可参与打卡', - confirmText:'立即购买', - cancelText:'知道了', - success: function (res) { - if (res.confirm) { - console.log(that.bookInfo,'that.bookInfo'); - uni.navigateTo({ - url: '../bookShop/commodityDetail?id=' + that.bookInfo.productId - }); - } + uni.showModal({ + title: '提示', + content: '购买本书后方可参与打卡', + confirmText: '立即购买', + cancelText: '知道了', + success: function(res) { + if (res.confirm) { + console.log(that.bookInfo, 'that.bookInfo'); + uni.navigateTo({ + url: '../bookShop/commodityDetail?id=' + that.bookInfo.productId + }); } - }); + } + }); }, // 补卡 buSign(day) { console.log('正在补卡', this.taskInfo, day) - if(!this.bookInfo.isBuy){ - this.gotoBuy() - return + if (this.bookInfo.bookType == 0) { + if (!this.bookInfo.isBuy) { + this.gotoBuy() + return + } } let param = { 'bookId': this.bookid, @@ -724,16 +729,24 @@ // this.getAllSign(this.taskInfo) }, 2000) + }else{ + uni.showToast({ + icon:'none', + title: res.msg + }) } }); }, // 快捷签到 kuickSign() { - if(!this.bookInfo.isBuy){ - this.gotoBuy() - return + if (this.bookInfo.bookType == 0) { + if (!this.bookInfo.isBuy) { + this.gotoBuy() + return + } } + if (this.taskInfo != null && !this.taskInfo.id) { uni.showToast({ @@ -821,7 +834,7 @@ }); }, // 说点什么 - goToSign() { + goToSign() { // images数据处理 if (this.formData.images.length > 0) { var imgs = [] @@ -1004,9 +1017,18 @@ + + .mb30 { + margin-bottom: 30rpx; + overflow: hidden; + } + \ No newline at end of file diff --git a/pages/comments/commentsList.vue b/pages/comments/commentsList.vue index f174b2e..e2b9d71 100644 --- a/pages/comments/commentsList.vue +++ b/pages/comments/commentsList.vue @@ -5,86 +5,96 @@ - - {{item.name}} - + + {{item.name}} + - - - 1 - - - - - - - - {{item.title}} - - - - - {{item.bookname}} - - 全文 - - - - {{formatTimeDifferenceFromT(item.createTime)}} - - - - {{item.contlike}} - - {{item.commentNum}} - - - - - - - - - 暂无书评内容~ - - - - - - - - - {{item.title}} - - - - - {{item.bookname}} - - 全文 - - - - {{formatTimeDifferenceFromT(item.createTime)}} - - - - {{item.contlike}} - - {{item.commentNum}} - - - - - - - - - 暂无书评内容~ - - - + + + 1 + + + + + + + + {{item.title}} + + + + + {{item.bookname}} + + 全文 + + + + {{formatTimeDifferenceFromT(item.createTime)}} + + + + {{item.contlike}} + + {{item.commentNum}} + + + + + + + + + + 暂无书评内容~ + + + + + + + + + {{item.title}} + + + + + {{item.bookname}} + + 全文 + + + + {{formatTimeDifferenceFromT(item.createTime)}} + + + + {{item.contlike}} + + {{item.commentNum}} + + + + + + + + + + 暂无书评内容~ + + + @@ -95,33 +105,35 @@ - - - - - - {{item.name}} - {{item.forumNum}}篇书评 - - - - {{item1.title}} - - - - - 全部 - - - - - - - - 暂无书评内容~ - - - + + + + + + {{item.name}} + {{item.forumNum}}篇书评 + + + + {{item1.title}} + + + + + 全部 + + + + + + + + 暂无书评内容~ + + + 努力加载中 @@ -129,7 +141,7 @@ - + @@ -137,44 +149,47 @@ + \ No newline at end of file diff --git a/pages/eBook/bookContent.vue b/pages/eBook/bookContent.vue index 18130ae..84b7595 100644 --- a/pages/eBook/bookContent.vue +++ b/pages/eBook/bookContent.vue @@ -10,15 +10,16 @@ {{bookMessage.name}} - -

+ + - + @@ -57,47 +58,49 @@ - - - 精彩试听 - - - - - + + + + 精彩试听 + + + + + - {{item.chapter}}   - - + {{item.chapter}}   + + + - - - 查看完整目录 - - - - - - - 热门书评 - - - -

{{item.title}}

- - - + + 查看完整目录 - 立即查看 - - 查看更多 + + + + + 热门书评 + + +

{{item.title}}

+ + + + + 立即查看 +
+ + 查看更多 + +
+
-
{ + checkBookRight(data, res => { console.log(res) - if(res.success){ + if (res.success) { uni.navigateTo({ url: '../talkBook/talkBookML?bookid=' + this.bookId }); - }else{ + } else { uni.showToast({ - title:'购买本书后方可查看此内容!', - icon:'none' + title: '购买本书后方可查看此内容!', + icon: 'none' }) } }) - + }, // 去听书 gotoListen() { @@ -275,18 +278,18 @@ 'userId': this.userInfo.id, 'bookId': this.bookId } - checkBookRight(data,res=>{ + checkBookRight(data, res => { console.log(res) - if(res.success){ + if (res.success) { this.onPageJump('../clock/clock?bookid=' + this.bookId) - }else{ + } else { uni.showToast({ - title:'购买本书后方可参与打卡!', - icon:'none' + title: '购买本书后方可参与打卡!', + icon: 'none' }) } }) - + }, // 查看本书更多书评 toMore(val) { @@ -295,21 +298,21 @@ 'userId': this.userInfo.id, 'bookId': this.bookId } - - checkBookRight(data,res=>{ + + checkBookRight(data, res => { console.log(res) - if(res.success){ + if (res.success) { uni.navigateTo({ url: '../comments/comments?bookid=' + this.bookId, }); - }else{ + } else { uni.showToast({ - title:'购买本书后方可查看此内容!', - icon:'none' + title: '购买本书后方可查看此内容!', + icon: 'none' }) } }) - + }, // 去购买 goBuy() { diff --git a/pages/library/library.vue b/pages/library/library.vue index 423dda4..4948f5d 100644 --- a/pages/library/library.vue +++ b/pages/library/library.vue @@ -67,7 +67,7 @@ -->
- + @@ -88,11 +88,14 @@ 听 书 - + - + + + + 书 评 diff --git a/pages/listen/home.vue b/pages/listen/home.vue index 3c49102..1022468 100644 --- a/pages/listen/home.vue +++ b/pages/listen/home.vue @@ -119,15 +119,16 @@ // ], } }, - onLoad() { - }, - onShow() { + onLoad() { this.page = 1, // 页码 this.tjPage = 1 this.tjBookLIst = [] this.bookList = [] this.getListDate() this.getfreeBook() + }, + onShow() { + }, onPullDownRefresh() { console.log('下拉刷新了') diff --git a/pages/listen/listen.vue b/pages/listen/listen.vue index 4671fc0..e0d388f 100644 --- a/pages/listen/listen.vue +++ b/pages/listen/listen.vue @@ -25,12 +25,12 @@ {{bookInfo.name}} -

+ diff --git a/pages/listen/listenNotBuy.vue b/pages/listen/listenNotBuy.vue index 24f1e17..d53f381 100644 --- a/pages/listen/listenNotBuy.vue +++ b/pages/listen/listenNotBuy.vue @@ -21,12 +21,12 @@ {{bookInfo.name}} -

+ ¥98.00 diff --git a/pages/peanut/aboutUs.vue b/pages/peanut/aboutUs.vue index fc9cfbf..bcc423d 100644 --- a/pages/peanut/aboutUs.vue +++ b/pages/peanut/aboutUs.vue @@ -60,15 +60,15 @@ uni.showModal({ title: '提示', content: '微信号:yilujiankangkefu', - success: function (res) { - if (res.confirm) { - uni.makePhoneCall({ - phoneNumber: '022-24142321' //仅为示例 - }); - } else if (res.cancel) { + // success: function (res) { + // if (res.confirm) { + // uni.makePhoneCall({ + // phoneNumber: '022-24142321' //仅为示例 + // }); + // } else if (res.cancel) { - } - } + // } + // } }) } diff --git a/pages/peanut/home.vue b/pages/peanut/home.vue index cb856b5..71a0353 100644 --- a/pages/peanut/home.vue +++ b/pages/peanut/home.vue @@ -47,7 +47,7 @@ --> - + diff --git a/pages/peanut/mine.vue b/pages/peanut/mine.vue index b67ed89..486622a 100644 --- a/pages/peanut/mine.vue +++ b/pages/peanut/mine.vue @@ -42,16 +42,16 @@ > - + {{userMes.peanutCoin}} 天医币 - + {{userMes.conponsCount}} 优惠券 - 充 值 + 充 值 @@ -62,10 +62,10 @@ - + 我的听书 - + 听书设置 diff --git a/pages/prescript/CNMedicineSearch.vue b/pages/prescript/CNMedicineSearch.vue index 1eaaa06..583b0f7 100644 --- a/pages/prescript/CNMedicineSearch.vue +++ b/pages/prescript/CNMedicineSearch.vue @@ -26,27 +26,18 @@ - + 性味: - + {{item}} - , - - - {{item}} - , - - - {{item}} - , + , - + 功效: - + {{item}} - , + , + + + 查询 + + + + + + + + 功效 + + + + + {{item.title}} + + + + + + + + + 查询 + + + + + + @@ -117,6 +229,150 @@ titleList: [], // 药物标题 curOneCateIndex: 0, // 当前选中的一级分类 curTwoCateIndex: 0, // 当前选中的二级分类 + CNateList: [{ + title: "功效", + id: 1 + }, { + title: "性味", + id: 2 + }, ], + CNCateIndex: 0, + page: 1, + status: 3, + totalPage: 1, + xingweiShow: false, // 查询条件弹出层,性味 + gongxiaoShow: false, // 查询条件弹出层,功效 + sanpinShow: false, // 查询条件弹出层,sanpin + curXWGMark: [], + curGongxiaoMark: [], + curXingIndex: [], + curWeiIndex: [], + curGuijingIndex: [], + curGongxiaoIndex: [], + gongxiaoSelectionList: [{ + title: "解表" + }, + { + title: "清热" + }, + { + title: "泻下" + }, + { + title: "祛风湿" + }, + { + title: "芳香化湿" + }, + { + title: "利水渗湿" + }, + { + title: "温里" + }, + { + title: "理气" + }, + { + title: "消食" + }, + { + title: "驱虫" + }, + { + title: "止血" + }, + { + title: "活血祛瘀" + }, + { + title: "化痰止咳平喘" + }, + { + title: "安神" + }, + { + title: "平肝息风" + }, + { + title: "开窍" + }, + { + title: "补虚" + }, + { + title: "收涩" + }, + { + title: "涌吐" + }, + { + title: "外用及其他" + }, + ], + xingSelectionList: [{ + title: "寒" + }, + { + title: "凉" + }, + { + title: "平" + }, + { + title: "温" + }, + { + title: "热" + }, + ], + weiSelectionList: [{ + title: "酸" + }, + { + title: "涩" + }, + { + title: "甘" + }, + { + title: "苦" + }, + { + title: "辛" + }, + { + title: "咸" + }, + { + title: "淡" + }, + ], + guijingSelectionList: [{ + title: "心" + }, + { + title: "肝" + }, + { + title: "脾" + }, + { + title: "肺" + }, + { + title: "肾" + }, + { + title: "肠" + }, + { + title: "膀胱" + }, + { + title: "胃" + }, + ], searchList: [], // 搜索结果数组 showSearchList: false, userMes: {}, // 用户信息 @@ -129,6 +385,8 @@ // onLoad() { // this.getCNYao() // }, + + methods: { setOneCateIndex(item, index) { // let id = item.prescriptCategoryId @@ -141,7 +399,7 @@ this.getXiYao('抗感染类', 1) } else { // 中药检索 // this.getTowCateList(id) - this.getCNYao() // book/materials/getMaterialsList + this.goNewSearch() // book/materials/getMaterialsList } }, setTwoCateIndex(item, index) { @@ -187,20 +445,69 @@ }) }, // 获取中药 - getCNYao(id, type) { + + gotoCNDetail(item) { + console.log('2222') + uni.navigateTo({ + url: "./CNMedicineSearchDetail?id=" + item.id + }) + }, + + gotoSousuo() { + uni.navigateTo({ + url: "./CNMedicineText" + }) + }, + + setXingIndex(item, index, arr) { + // let arr = this.curXingIndex + if (arr.includes(item.title)) { + // 若包含,则从数组中删除该值 + var index = arr.indexOf(item.title); + if (index > -1) { + arr.splice(index, 1); + } + } else { + // 若不包含,则向数组中添加该值 + arr.push(item.title); + } + }, + + setCNIndex(item, index) { + let id = item.id + this.CNCateIndex = index + if (id == 2) { + this.xingweiShow = true + this.gongxiaoShow = false + this.sanpinShow = false + } + if (id == 1) { + this.xingweiShow = false + this.gongxiaoShow = true + this.sanpinShow = false + } + }, + + goNewSearch() { + this.page = 1 + this.titleList = [] + this.goToSearch() + }, + + goToSearch() { $http.request({ url: "book/materials/getMaterialsList", method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 data: { // loadAnimate: 'none', // 请求加载动画 - "limit": 10, - "current": 1, + "limit": 20, + "current": this.page, "name": "", "type": "", // 植物、矿物、动物 - "effect": "", //功效 - "taste": "", //味 - "property": "", //性 - "tropism": "" //归经 + "effect": this.curGongxiaoIndex.join(','), //功效 + "taste": this.curWeiIndex.join(','), //味 + "property": this.curXingIndex.join(','), //性 + "tropism": this.curGuijingIndex.join(',') //归经 }, header: { //默认 无 说明:请求头 'Content-Type': 'application/json' @@ -208,31 +515,51 @@ }).then(res => { console.log(res, '内容获取成功') if (res.code == 0 && res.result.records.length > 0) { - this.titleList = res.result.records + for (var i = 0; i < res.result.records.length; i++) { + this.titleList.push(res.result.records[i]) + } + } else { this.titleList = [] } + + this.xingweiShow = false + this.gongxiaoShow = false + this.sanpinShow = false + + this.totalPage = res.result.pages + if (this.page == this.totalPage) { + this.status = 1 + } else { + this.status = 3 + } + + // 标记 + this.curGongxiaoMark = JSON.parse(JSON.stringify(this.curGongxiaoIndex)) + this.curXWGMark = JSON.parse(JSON.stringify(this.curXingIndex.concat(this.curWeiIndex) + .concat(this.curGuijingIndex))) + }).catch(e => { this.titleList = [] console.log(e) }) }, - gotoCNDetail(item) { - console.log('2222') - uni.navigateTo({ - url: "./CNMedicineSearchDetail?id=" + item.id - }) + + + goToBottom() { + console.log(this.curOneCateIndex) + // this.loadingNow = true + if (this.curOneCateIndex != 1) { + console.log('到底了') + if (this.page + 1 <= this.totalPage) { + this.page++ + this.goToSearch() + } else { + this.status = 1 + } + } + }, - gotoSousuo() { - uni.navigateTo({ - url: "./CNMedicineText" - }) - }, - gotoFenlei() { - uni.navigateTo({ - url: "./CNMedicineSearch" - }) - } } }; @@ -246,11 +573,6 @@ } } - .scroll-view_H { - background-color: #fff; - white-space: nowrap; - padding: 10rpx; - } .contentBox { .oneCateList { @@ -298,6 +620,8 @@ color: #55aa7f; } + + // .u-grid-list{border: 0.5px solid #dadbde;} } @@ -336,7 +660,7 @@ margin-top: 30rpx; margin-bottom: 20rpx; - + } .flexbox { @@ -351,4 +675,74 @@ font-size: 28rpx; line-height: 46rpx; } + + .CNCateList { + font-size: 28rpx; + margin-top: 20rpx; + + .grid-text { + padding: 16rpx 20rpx; + text-align: center; + } + + .grid-text>b { + margin-left: 10rpx; + display: inline-block; + vertical-align: middle; + } + + .cur { + color: #55aa7f; + } + + .u-grid-list { + // border-top: 0.5px solid #dadbde; + // border-bottom: 0.5px solid #dadbde; + } + + } + + + .CNMedicineSearchPopup { + .grid-text { + padding: 16rpx 20rpx !important; + } + + .grid-text>b { + margin-left: 10rpx; + display: inline-block; + vertical-align: middle; + } + + .cur { + color: #55aa7f; + } + + .u-grid-list { + // border-top: 0.5px solid #dadbde; + // border-bottom: 0.5px solid #dadbde; + } + } + + + .marYao { + background-color: #55aa7f1c; + padding: 10rpx 20rpx 10rpx 20rpx; + margin-bottom: 10rpx; + font-size: 26rpx; + color: #225f40; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + + span { + + color: #55aa7f; + + font { + display: inline-block; + margin: 0 5rpx; + } + } + } \ No newline at end of file diff --git a/pages/prescript/prescript.vue b/pages/prescript/prescript.vue index acc8619..83cc1e0 100644 --- a/pages/prescript/prescript.vue +++ b/pages/prescript/prescript.vue @@ -11,11 +11,11 @@ {{item.title}} + v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId" v-show="!iosHide&&index!=0">{{item.title}} - + @@ -27,7 +27,7 @@ - + + @click="gotoDetail(item)" + style="align-items: flex-start;border-bottom: 2px solid #fff;"> {{item.title}} @@ -93,10 +94,10 @@ }, data() { return { - firstTabList:[{ + firstTabList: [{ firstTabId: 1, title: '方剂检索' - },{ + }, { firstTabId: 2, title: '药物检索' }], @@ -218,18 +219,18 @@ setFirstTabIndex(item, index) { let id = item.firstTabId this.curFirstTabIndex = index - + if (index == 1) { // this.setOneCateIndex(id) console.log(this.$refs) console.log(this.$refs.mSearch) this.$nextTick(() => { - this.$refs.mSearch.getCNYao() + this.$refs.mSearch.goToSearch() }) - }else{ + } else { this.setOneCateIndex(this.oneCateList[0], 0) } - + }, setOneCateIndex(item, index) { // if(this.userMes.tgdzPower == 0){ @@ -263,10 +264,10 @@ } else if (index == 3) { this.twoCateList = [] this.getTitles(id) - } else{ + } else { this.getTowCateList(id) } - + }, getTowCateList(id) { $http.request({ @@ -452,6 +453,14 @@ plus.key.hideSoftKeybord(); // #endif }, + + onReachBottom() { + this.$nextTick(() => { + this.$refs.mSearch.goToBottom() + }) + + }, + } @@ -473,6 +482,7 @@ .contentBox { .oneCateList { justify-content: space-between; + text { text-align: center; display: inline-block; @@ -481,17 +491,17 @@ font-size: 32rpx; font-weight: bold; } - + .cur { border-bottom: 5rpx solid #55aa7f; color: #55aa7f; } } - - .oneCateBot{ + + .oneCateBot { margin-top: 15rpx; justify-content: space-between; - + text { text-align: center; display: inline-block; @@ -500,14 +510,15 @@ font-size: 30rpx; border-radius: 10rpx; } - + .cur { background-color: #55aa7f3d; color: #55aa7f; font-weight: bold; } } - .firstTab{ + + .firstTab { text { text-align: center; display: inline-block; @@ -604,8 +615,8 @@ .uni-modal .uni-modal__bd { text-align: left; } - - .limiTy{ + + .limiTy { font-size: 28rpx; line-height: 46rpx; } diff --git a/pages/prescript/prescriptDetail.vue b/pages/prescript/prescriptDetail.vue index 027f531..610820b 100644 --- a/pages/prescript/prescriptDetail.vue +++ b/pages/prescript/prescriptDetail.vue @@ -50,6 +50,10 @@ + + 辨病治症仅供参考,若有身体问题请及时到医院问诊 + + + + diff --git a/pages/talkBook/talkBookML.vue b/pages/talkBook/talkBookML.vue index b8446bb..e746eda 100644 --- a/pages/talkBook/talkBookML.vue +++ b/pages/talkBook/talkBookML.vue @@ -24,12 +24,12 @@ -

+ 注册账号 忘记密码? --> -