苹果审核,bug恢复

This commit is contained in:
徐哼唧L
2024-02-26 09:05:04 +08:00
parent 5ae322d192
commit 08667cd3fc
36 changed files with 2158 additions and 1232 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view v-if="iosHide">
<view class="footer_box" :class="{ footer_bg: bg }">
<view v-for="(item, index) of navigationList" :key="index" class="footer_item">
<view class="footer_nav_item" @click="onPageJump(item.pagePath)">
@@ -12,7 +12,20 @@
</view>
</view>
<view v-if="bg" class="footer_station"></view>
</view>
<view v-else>
<view class="footer_box" :class="{ footer_bg: bg }">
<view v-for="(item, index) of navigationIos" :key="index" class="footer_item">
<view class="footer_nav_item" @click="onPageJump(item.pagePath)">
<image v-if="item.pagePath == path" class="footer_nav_item_image footer_nav_item_image_scale"
:src="'/' + item.selectedIconPath" mode="aspectFit"></image>
<image v-else class="footer_nav_item_image" :src="'/' + item.iconPath" mode="aspectFit"></image>
<text class="footer_nav_item_text"
:class="[item.pagePath == path ? 'footer_item_text_active' : '']">{{ item.text }}</text>
</view>
</view>
</view>
<view v-if="bg" class="footer_station"></view>
</view>
</template>
<script>
@@ -58,6 +71,26 @@
text: '我的'
}
],
navigationIos: [{
pagePath: 'pages/peanut/home',
iconPath: 'static/tab/icon1_n.png',
selectedIconPath: 'static/tab/icon1_y.png',
text: '首页'
},
{
pagePath: 'pages/bookShop/orderList',
iconPath: 'static/tab/icon2_n.png',
selectedIconPath: 'static/tab/icon2_y.png',
text: '我的订单'
},
{
pagePath: 'pages/peanut/mine',
iconPath: 'static/tab/icon4_n.png',
selectedIconPath: 'static/tab/icon4_y.png',
text: '我的'
}
],
};
},
//第一次加载

View File

@@ -5,8 +5,8 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "http://localhost:7001/";
// socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/";
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
@@ -51,7 +51,7 @@ const phoneRegular = /^1\d{10}$/;
// 手机号码验证 支持港澳台 大陆
// const phoneRegular = /^[1][3-8]\d{9}$|^([6|9])\d{7}$|^[0][9]\d{8}$|^[6]([8|6])\d{5}$|^(00){0,1}(65){1}[13689]\d{6,7}$/;
//邮箱验证正则表达式
const mailRegular = /^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
const mailRegular = /^\w+([-+._']\w+)*@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
//密码验证正则表达式
// const passwordRegular = /^[a-zA-Z0-9]{4,10}$/;
const passwordRegular = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/;

39
main.js
View File

@@ -2,21 +2,40 @@ import Vue from 'vue'
import App from './App'
import qs from 'qs'
import {music, bgm} from '@/utils/music.js'
import {
music,
bgm
} from '@/utils/music.js'
Vue.prototype.$music = music
Vue.prototype.$bgm = bgm
import {nowHour} from '@/utils/getHours.js'
import {
nowHour
} from '@/utils/getHours.js'
Vue.prototype.$getHours = nowHour
// 地址
// Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/"
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
// 安卓安卓包下载地址
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
// 安卓安卓包下载地址
// Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk" // 本地地址
Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.nuttyreading" // 应用宝
Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.nuttyreading" // 应用宝
// 判断手机型号
uni.getSystemInfo({
success: function(res) {
if (res.platform == 'ios') {
Vue.prototype.iosHide = false;
// Vue.prototype.iosHide = true;
} else {
Vue.prototype.iosHide = true;
}
}
})
// uView组件库
@@ -37,11 +56,15 @@ import $http from '@/config/requestConfig'
Vue.prototype.$http = $http;
// #ifdef MP-WEIXIN
//挂载全局微信分享
import { wxShare } from '@/config/utils'
import {
wxShare
} from '@/config/utils'
Vue.prototype.wxShare = wxShare;
// #endif
//判断是否登录
import { judgeLogin } from '@/config/login';
import {
judgeLogin
} from '@/config/login';
Vue.prototype.judgeLogin = judgeLogin;
Vue.config.productionTip = false;
// #ifdef H5

View File

@@ -12,8 +12,8 @@
"src" : "图片路径"
}
],
"versionName" : "1.2.31",
"versionCode" : 1231,
"versionName" : "1.2.38",
"versionCode" : 1238,
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
@@ -30,16 +30,15 @@
"modules" : {
"Payment" : {},
"OAuth" : {},
// "Messaging" : {}, 短信权限
"VideoPlayer" : {},
"Share" : {},
"Camera" : {}
"Camera" : {},
"VideoPlayer" : {}
},
"distribute" : {
"apple" : {
"devices" : "universal",
"UIBackgroundModes" : [ "audio" ]
"devices" : "universal"
},
// "UIBackgroundModes" : [ "audio" ]
"android" : {
"permissionPhoneState" : {
"request" : "none",
@@ -109,7 +108,7 @@
},
"ios" : {
"dSYMs" : false,
"UIBackgroundModes" : [ "audio" ], // 背景播放音乐
// "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
@@ -117,7 +116,11 @@
},
"idfa" : false,
"urltypes" : "nuttyreading",
"urlschemewhitelist" : "everhealth"
"urlschemewhitelist" : "everhealth",
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "为了给您提供修改头像的功能",
"NSCameraUsageDescription" : "为了给您提供修改头像的功能"
}
},
"icons" : {
"android" : {

View File

@@ -488,6 +488,12 @@
"navigationBarTitleText": "脉穴详情",
"enablePullDownRefresh": false
}
},{
"path": "pages/acupoint/givenDegree",
"style": {
"navigationBarTitleText": "特定穴位",
"enablePullDownRefresh": false
}
},{
"path": "pages/timeAcupoint/timeAcupoint",
"style": {

View File

@@ -25,6 +25,7 @@
<view class="oneCateList flexbox">
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
v-for="(item, index) in oneCateList" :key="item.id">{{item.title}}</text>
<text @click="setOneCateIndex(3,3)">特定穴位</text>
</view>
<!-- </scroll-view> -->
<view class="grid twoCateList" v-if="twoCateList.length > 0">
@@ -109,11 +110,23 @@
},
// 穴位详情
gotoDetail(item) {
// if (this.curOneCateIndex == 0 && this.userMes.pointPower== 0) {
// let that = this
// uni.showModal({
// content: '购买 手模 或 脚模 后方可使用此功能',
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
uni.navigateTo({
url: "./acupointDetail?id=" + item.id
})
},
// 获取穴位名称
getTitles(id) {
@@ -146,20 +159,20 @@
},
setOneCateIndex(item, index) {
console.log(item)
if (item.id == 3 && this.userMes.pointPower == 0) {
let that = this
uni.showModal({
content: '购买 手模 或 脚模 后方可使用此功能',
confirmText: '好的',
showCancel: false,
success: function(res) {
if (res.confirm) {
// console.log('用户点击确定');
}
}
})
return
}
// if (item.id == 3 && this.userMes.pointPower == 0) {
// let that = this
// uni.showModal({
// content: '购买 手模 或 脚模 后方可使用此功能',
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
if (item.id == 6 && this.userMes.tgdzPower == 0) {
let that = this
uni.showModal({
@@ -180,6 +193,12 @@
})
return
}
if (index == 3) {
uni.navigateTo({
url: "./givenDegree"
})
return
}
let id = item.id
this.curOneCateIndex = index
this.curTwoCateIndex = 0
@@ -267,7 +286,6 @@
// title: '搜索:' + res,
// icon: 'none'
// })
},
input(res) {
console.log('----input:', res)

View File

@@ -73,6 +73,10 @@
</view>
</uni-section>
<view style="text-align: center;color: #999;font-size: 24rpx;">
辨病治症仅供参考若有身体问题请及时到医院问诊
</view>
</view>
</view>
<music-play :playData="playData"></music-play>

View File

@@ -0,0 +1,160 @@
<template>
<view class="container88">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="特定穴位"></z-nav-bar>
<view class="tedingBox">
<table :style="{'height':monHeight + 'px', 'margin-left':monmarleft + 'px', 'margin-top':monmartop + 'rpx'}" border cellspacing="0">
<tr class="titHear">
<td v-for="(item, index) in MonList.attribute">
{{item}}
</td>
</tr>
<tr v-for="(ikth, indth) in MonList.arry">
<td v-for="(item, index) in ikth">{{item}}</td>
</tr>
</table>
<table
:style="{'height':sunHeight + 'px', 'margin-left':sunmarleft + 'px', 'margin-top':sunmartop + 'rpx', 'margin-bottom':sunmarbot + 'rpx'}"
border cellspacing="0">
<tr class="titHear">
<td v-for="(item, index) in SunList.attribute">
{{item}}
</td>
</tr>
<tr v-for="(ikth, indth) in SunList.arry">
<td v-for="(item, index) in ikth">{{item}}</td>
</tr>
</table>
</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';
export default {
data() {
return {
monHeight: 0,
monmarleft: 0,
sunHeight: 0,
sunmarleft: 0,
sunmartop: 0,
sunmarbot: 0,
playData: {},
MonList: {
title: '阴经',
vlue: '属性',
attribute: ['阴经', '属性', '肺经(金)', '脾经(士)', '心(火)', '肾经(水)', '心包经(冬至前相火,冬至后相水)', '肝经(木)'],
arry: [
['井', '木', '少商', '隐白', '少冲(母穴)', '涌泉(子穴)', '中冲(冬至前母穴冬至后子穴)', '大敦(本穴)'],
['荥', '火', '鱼际', '大都(母穴)', '少府(本穴)', '然谷(泄井当泄荥)', '劳宫(冬至前本穴)', '行间(子穴)'],
['俞', '土', '太渊(母穴)', '太白(本穴)', '神门(子穴)', '太溪', '大陵(冬至前子穴)', '太冲'],
['经', '金', '经渠(本穴)', '商丘(子穴)', '灵道', '复溜(母穴)', '间使(冬至后母穴)', '中封'],
['合', '水', '尺泽(子穴)', '阴陵泉', '少海(补井当补合)', '阴谷(本穴)', '曲泽(冬至后本穴)', '曲泉(母穴)'],
['郄', '', '孔最', '地机', '阴郄', '水泉', '郄门', '中都'],
['络', '', '列缺', '公孙', '通里', '大钟', '内关', '蠡沟'],
['募穴', '', '中府', '章门', '巨阙', '京门', '膻中', '期门']
]
},
SunList: {
title: '阳经',
vlue: '属性',
attribute: ['阳经', '属性', '大肠经(金)', '脾经(士)', '心(火)', '膀胱经(水)', '三焦经(冬至前相火,冬至后相水)', '胆经(木)'],
arry: [
['井', '金', '商阳(本穴)', '厉兑(子穴)', '少泽', '至阴(母穴)', '关冲(冬至后母穴)', '窍阴'],
['荥', '水', '二间(子穴)', '内庭(泄井当泄荥)', '前谷', '通谷(本穴)', '液门(冬至后本穴)', '侠溪(母穴)'],
['俞', '木', '三间', '陷谷', '后匾(母穴)', '束骨(子穴)', '中渚(冬至前回穴,冬至后子穴)', '临泣(本穴)'],
['经', '水', '阳溪', '解溪(母穴)', '阳谷(本穴)', '昆仑', '支沟(冬至前本穴)', '阳辅(子穴)'],
['合', '土', '曲池(母穴)', '足三里(本穴)', '小海(子穴)', '委中(补井当补合)', '天井(冬至前子穴)', '阳陵泉'],
['原', '', '合谷', '冲阳', '腕骨', '京骨', '阳池', '丘墟'],
['郄', '', '温溜', '梁丘', '养老', '金门', '会宗', '外丘'],
['络', '', '偏历', '丰隆', '支正', '飞扬', '外关', '光明'],
['募穴', '', '天枢', '中脘', '关元', '中极', '石门', '日月']
]
},
}
},
onLoad() {
this.getData()
},
onShow() {
},
onHide() {
},
methods: {
getData() {
this.monHeight = uni.getSystemInfoSync().windowWidth-20
this.monmarleft = uni.getSystemInfoSync().windowWidth-10
this.monmartop = 25
this.sunHeight = uni.getSystemInfoSync().windowWidth-20
this.sunmarleft = uni.getSystemInfoSync().windowWidth-10
this.sunmartop = 1000
this.sunmarbot = 1000
},
},
components: {
musicPlay
},
}
</script>
<style lang="scss" scoped>
.tedingBox {
flex-wrap: nowrap;
table {
border-collapse: collapse;
font-size: 28rpx;
text-align: center;
background-color: antiquewhite;
transform: rotate(90deg);
transform-origin: top left;
}
table tr {
// display: table-row;
}
table tr td {
border-bottom: 1px solid #a84a2d;
border-right: 1px solid #a84a2d;
padding: 8rpx 10rpx;
white-space: nowrap;
letter-spacing: 3rpx;
}
table tr.titHear td {
background-color: #fbd5ca;
font-weight: bold;
border-top: 1px solid #a84a2d;
}
table tr td:first-child {
border-left: 1px solid #a84a2d;
font-weight: bold;
background-color: #fbd5ca;
}
table tr td:nth-child(2) {
background-color: #fbd5ca;
}
}
</style>

View File

@@ -66,7 +66,7 @@
<view v-if="contentShow == 0">
<view class="pingjia">
<!-- <h4></h4> -->
<view class="" v-if="listenList.length > 0 && listenList[0]" style="margin:0rpx 0rpx 30rpx;">
<view class="" v-if="listenList.length > 0 && listenList[0]&&iosHide" style="margin:0rpx 0rpx 30rpx;">
<view class="">
<view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view>
</view>

View File

@@ -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) {
}
}
// }
// }
})
},
// 查看物流

View File

@@ -37,10 +37,11 @@
<text>{{item.productName}}</text>
</view>
<view class="itemPrice">
<text v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice*item.productAmount}}</text>
<text
v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice*item.productAmount}}</text>
<text v-else>{{item.price*item.productAmount}}</text>
<u-number-box v-model="item.productAmount" @change="valChange($event, item)" :input-width="50"
:input-height="20" :min="1" :max="item.productStock" integer ></u-number-box>
:input-height="20" :min="1" :max="item.productStock" integer></u-number-box>
</view>
</view>
</view>
@@ -55,10 +56,8 @@
<u-icon name="red-packet-fill" color="#e74141" size="18" class="yqLeft"></u-icon>
优惠券
<u-icon name="arrow-right" color="#aaa" size="18" class="yqRight"></u-icon>
<text class="dagnqian"
v-if="youhuiList.length>0">当前可选{{this.youhuiList.length}}</text>
<text class="dagnqian" v-else
style="background-color: #999;">暂无优惠券</text>
<text class="dagnqian" v-if="youhuiList.length>0">当前可选{{this.youhuiList.length}}</text>
<text class="dagnqian" v-else style="background-color: #999;">暂无优惠券</text>
<text class="dagnqian" v-if="youhuiContent.id!=undefined">
- {{youhuiContent.coupons.couponAmount}}</text>
</view>
@@ -67,19 +66,25 @@
运费
<text>{{farePrice}}</text>
</view>
<view class="yq_beizhu">
<u-icon name="info-circle" color="#ffb529" size="12" style="display: inline-block;margin-right: 10rpx;"></u-icon>
如订单包含一种或多种预售书预售书和现货书需分开发货即需要收取多次快递首重费用如多本书会按照实际重量收取快递续重费用
</view>
</view>
<!-- 安卓支付列表 -->
<view class="zhif_fangsh" v-if="isAndorid">
<view class="zhif_radio">
<u-radio-group v-model="payType">
<view style="width: 100%;">
<view v-for="(item, index) in paylist" class="zhif_xuanx">
<view v-for="(item, index) in paylist" class="zhif_xuanx">
<image :src="item.img"></image>
{{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}天医币可用</span>
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4" class="chongBtn">去充值</span>
<span v-if="item.id == 4"
style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}天医币可用</span>
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4"
class="chongBtn">去充值</span>
<u-radio :key="index" activeColor="#fe6e09" :name='item.id'
style="float: right;margin-top: 5rpx;" ></u-radio>
style="float: right;margin-top: 5rpx;"></u-radio>
</view>
</view>
</u-radio-group>
@@ -90,20 +95,22 @@
<view class="zhif_radio">
<u-radio-group v-model="payType">
<view style="width: 100%;">
<view v-for="(item, index) in paylistIos" class="zhif_xuanx">
<view v-for="(item, index) in paylistIos" class="zhif_xuanx">
<image :src="item.img"></image>
{{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}天医币可用</span>
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4" class="chongBtn">去充值</span>
<span v-if="item.id == 4"
style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}天医币可用</span>
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4"
class="chongBtn">去充值</span>
<u-radio :key="index" activeColor="#fe6e09" :name='item.id'
style="float: right;margin-top: 5rpx;" ></u-radio>
style="float: right;margin-top: 5rpx;"></u-radio>
</view>
</view>
</u-radio-group>
</view>
</view>
<view class="footer" >
<view class="footer">
<view class="commodityPrice" v-if="payType != 4">
<span style="color: #666;margin-right: 10rpx; font-size: 15px;">实付款: </span>
<span></span>{{realPrice}}
@@ -197,7 +204,7 @@
</view>
</u-popup>
<music-play :playData="playData"></music-play>
<music-play :playData="playData"></music-play>
</view>
</template>
@@ -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,
@@ -249,10 +257,10 @@
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,
@@ -269,11 +277,11 @@
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,10 +298,10 @@
this.typeId = 0
this.shangIDNum = e.list
}
// this.getYunFei()
// this.getYunFei()
this.getData()
this.getOS()
this.getData()
this.getOS()
},
onShow() {
// if (this.typeId == 1) {
@@ -313,18 +321,18 @@
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{
} 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,9 +435,9 @@
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
@@ -456,33 +465,36 @@
})
},
// 获取运费
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+"&")
key.push({
productId: item.productId,
quantity: item.productAmount
})
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
})
// console.log(key,'this.adressMoRen.areaidpath')
// 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 => {
if (res.code == 0) {
this.farePrice = res.result
console.log('需要的运费',res.result)
console.log('需要的运费', res.result)
this.allPrice()
}
@@ -494,9 +506,9 @@
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
@@ -510,9 +522,9 @@
this.realPrice = this.realPrice + this.farePrice
},
// 超出阈值时
overlimit(){
overlimit() {
uni.showToast({
title:'超出商品数量',
title: '超出商品数量',
icon: 'error',
duration: 1000
})
@@ -523,32 +535,32 @@
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) {
this.adressMoRIndex = e
@@ -574,8 +586,8 @@
},
// 提交结算
goBuyJie() {
if(this.addressList.length == 0) {
this.dizhiShow = true // 如果没有地址信息
if (this.addressList.length == 0) {
this.dizhiShow = true // 如果没有地址信息
}
if (!this.nowClick) {
return
@@ -623,7 +635,7 @@
orderStatus: 0, //订单状态
productList: xiaBiao, //订单列表商品
orderType: "order", //订单类型
addressId:this.adressMoRen.id // 地址ID
addressId: this.adressMoRen.id // 地址ID
}
$http.request({
// url: "book/buyOrder/buySave",
@@ -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(() => {
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){
// uni.navigateTo({
// url: './orderList'
// });
// }, 1000)
}
})
} else if (this.payType == 1) {
// 微信支付
let data1 = {
orderSn:res.orderSn,
orderSn: res.orderSn,
buyOrderId: null,
totalAmount: res.money
}
setWXPay(data1,res => {
setWXPay(data1, res => {
if (res.success) {
uni.showToast({
title: "支付成功"
@@ -701,22 +713,22 @@
}, 1000)
} 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: "购买成功",
@@ -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;

View File

@@ -48,7 +48,7 @@
</view> -->
</view>
<view class="flexbox icons">
<view class="flexbox icons" v-if="iosHide">
<!-- <view class="item ">
<view @click="goRead(item)">
<image src="../../static/icon/home6.png" mode="aspectFit"></image>

View File

@@ -1,5 +1,6 @@
<template>
<view :class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy ? 'pb100':'']">
<view
:class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 && (bookInfo.isBuy||bookInfo.booktype!=0) ? 'pb100':'']">
<z-nav-bar title="读书打卡"></z-nav-bar>
<!-- 仿钉钉打卡日历组件 -->
<view class=""
@@ -17,7 +18,7 @@
<text>返回今天</text>
</view>
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
<view class="dakaBtn" @tap="buSign(linshiDay)" v-if="currentDay > linshiDay">
<view class="dakaBtn" @tap="buSign(linshiDay)" v-if="currentDay > linshiDay&&(currentDay-linshiDay)<=7">
<text style="font-size: 24rpx;">补卡</text>
</view>
<view class="dakaBtn" @tap="kuickSign()"
@@ -254,7 +255,8 @@
</view>
</u-popup>
<view class="leaveBtn" v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy">
<view class="leaveBtn"
v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0 && (bookInfo.isBuy||bookInfo.booktype!=0)">
<button style="height: 70rpx; font-size: 28rpx; line-height: 70rpx;" type="primary" plain="true"
@click="addTextShow = true">说点什么</button>
</view>
@@ -281,7 +283,7 @@
export default {
data() {
return {
isAndorid:true,
isAndorid: true,
opPinglun: {}, // 针对的评论对象
pinglunShow: false,
placeholder: '开始输入...',
@@ -376,21 +378,22 @@
},
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
}
},
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,17 +420,17 @@
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) {
@@ -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,17 +729,25 @@
// 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({
title: '当天未发布打卡任务,不可签到哦',
@@ -1004,9 +1017,18 @@
</script>
<style lang="scss" scoped>
.share{font-size: 28rpx; float: right; padding-bottom:20rpx ;
.per_mes_img{width: 40rpx; height: 40rpx; margin-left: 10rpx;}
.share {
font-size: 28rpx;
float: right;
padding-bottom: 20rpx;
.per_mes_img {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
}
.pingjiaBox {
margin-bottom: 20rpx;
}

View File

@@ -19,9 +19,12 @@
<!-- <view class="description">{{productInfo.bookdesc}}</view> -->
<view class="ting-du-mai">
<view class="ting-du-mai-item" v-if="productInfo.canListen" @click="toOtherPage(1,productInfo)">听书</view>
<view class="ting-du-mai-item" v-if="productInfo.clockIn == 1" @click="toOtherPage(2,productInfo)">读书打卡</view>
<view class="ting-du-mai-item" v-if="productInfo.bookType == 0" @click="toOtherPage(3,productInfo)">立即购买</view>
<view class="ting-du-mai-item" v-if="productInfo.canListen" @click="toOtherPage(1,productInfo)">
听书</view>
<view class="ting-du-mai-item" v-if="productInfo.clockIn == 1"
@click="toOtherPage(2,productInfo)">读书打卡</view>
<view class="ting-du-mai-item" v-if="productInfo.bookType == 0"
@click="toOtherPage(3,productInfo)">立即购买</view>
</view>
</view>
@@ -38,12 +41,14 @@
<view class="shuping-topbar-order">
<!-- <view v-for="(item,index) in orderTabs" @click="orderTabCLi(item.value)" :key="index"
:class="orderListTab==item.value?'orderdefine ordStyle':'orderdefine'">{{item.name}}</view> -->
<view :class="orderListTab==1?'orderdefine ordStyle':'orderdefine'" @click="orderTabCLi(1)">按时间</view>
<view :class="orderListTab==1?'orderdefine ordStyle':'orderdefine'" @click="orderTabCLi(1)">按时间
</view>
<view style="border-left:2rpx solid #e9e9e9;height:36rpx;"></view>
<view :class="orderListTab==2?'orderdefine ordStyle':'orderdefine'" @click="orderTabCLi(2)">按热度</view>
<view :class="orderListTab==2?'orderdefine ordStyle':'orderdefine'" @click="orderTabCLi(2)">按热度
</view>
</view>
</view>
<view class="item" @click.stop="toDetail(item)" v-for="(item,index1) in shupingList" :key="index">
<view class="item" @click.stop="toDetail(item)" v-for="(item,index1) in shupingList" :key="index1">
<view class="title">{{item.title}}</view>
<image class="feng" v-if="item.image" :src="item.image" mode="aspectFill"></image>
<view class="description" v-html="item.content">
@@ -53,16 +58,20 @@
<view class="btns flexbox" style="margin-top:10rpx;">
<span class="left" style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span>
<span class="right flexbox opbtns">
<image class="gzicon" v-if="item.ilike" src="../../static/icon/gz2.png" mode="aspectFill" @click.stop="clickLike(item)"></image>
<image class="gzicon" v-else src="../../static/icon/gz.png" mode="aspectFill" @click.stop="clickLike(item)"></image>
<image class="gzicon" v-if="item.ilike" src="../../static/icon/gz2.png" mode="aspectFill"
@click.stop="clickLike(item)"></image>
<image class="gzicon" v-else src="../../static/icon/gz.png" mode="aspectFill"
@click.stop="clickLike(item)"></image>
<view style="color: #C0C4CC;">{{item.contlike}}</view>
<!-- <image class="gzicon" v-if="1" src="../../static/icon/pinglun.png" mode="aspectFill" @click.stop="pinglun(item.id)"></image>
<view style="color: #C0C4CC;" @click.stop="pinglun(item.id)">{{item.commentNum}}</view> -->
<image class="gzicon" v-if="1" src="../../static/icon/pinglun.png" mode="aspectFill"></image>
<image class="gzicon" v-if="1" src="../../static/icon/pinglun.png" mode="aspectFill">
</image>
<view style="color: #C0C4CC;">{{item.commentNum}}</view>
</span>
</view>
<view style="border-bottom:2rpx solid #e9e9e9;height:36rpx;" v-if="index1<shupingList.length-1"></view>
<view style="border-bottom:2rpx solid #e9e9e9;height:36rpx;" v-if="index1<shupingList.length-1">
</view>
<!-- <image class="feng" v-if="item.image == ''" src="../../static/icon/home_bg.jpg" mode="scaleToFill" style="width: 100%;"></image>
<image class="feng" v-else :src="item.image" mode="scaleToFill" style="width: 100%;"></image>
<text class="title">{{item.title}}</text> -->
@@ -103,7 +112,7 @@
<uni-forms :modelValue="Pform">
<!-- 评价图片 -->
<!-- end -->
<!-- <uni-forms-item name="comment" label-width="0">
<!-- <uni-forms-item name="comment" label-width="0">
<uni-easyinput type="textarea" v-model="Pform.comment" placeholder="请输入您的商品评价" />
</uni-forms-item> -->
</uni-forms>
@@ -112,17 +121,20 @@
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
<view class="flex-sub flexbox">
<i @click="showEmj()" :class="emojiIcon" ></i>
<i @click="showEmj()" :class="emojiIcon"></i>
<!-- <input type="text" @focus="InputFocus" @blur="InputBlur" v-model="message" @input="textareaBInput" placeholder-style="font-size:24rpx;color:#aaaaaa;" placeholder="请输入您要发送的内容"></input> -->
<textarea class="textarea" v-model="Pform.comment" @focus="InputFocus" @blur="InputBlur" @input="textareaBInput" placeholder-style="font-size:24rpx;color:#aaaaaa;" placeholder="请输入您要发送的内容"></textarea>
<textarea class="textarea" v-model="Pform.comment" @focus="InputFocus" @blur="InputBlur"
@input="textareaBInput" placeholder-style="font-size:24rpx;color:#aaaaaa;"
placeholder="请输入您要发送的内容"></textarea>
</view>
<view class="">
<u-button type="success" @click="submitPJ">提交</u-button>
<u-button type="success" @click="submitPJ">提交</u-button>
</view>
</view>
<view style="position: relative;">
<emotion @emotion="handleEmj" :height="220" v-if="isShowEmj" :windowWidth="windowWidth"></emotion>
<emotion @emotion="handleEmj" :height="220" v-if="isShowEmj" :windowWidth="windowWidth">
</emotion>
</view>
</view>
</view>
@@ -134,14 +146,16 @@
<script>
import $http from '@/config/requestConfig.js';
import emotion from '@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue';
import musicPlay from '@/components/music.vue'
import { data } from 'jquery';
import {
mapState
} from 'vuex';
import {
checkBookRight
} from '@/config/utils';
import musicPlay from '@/components/music.vue'
import {
data
} from 'jquery';
import {
mapState
} from 'vuex';
import {
checkBookRight
} from '@/config/utils';
export default {
data() {
return {
@@ -154,159 +168,158 @@ import { data } from 'jquery';
value: 2
}],
shupingNum: 0,
loadingNow : false,
playData:{},
loadingNow: false,
playData: {},
isShowEmj: false,
emojiIcon:'cuIcon-emoji',
windowWidth:0,
bookid:null,
productInfo:{},
pingjiaShow:false, //添加评价
Pform:{ // 评价表单
star:0,
comment:'',
img:[],
html:''
emojiIcon: 'cuIcon-emoji',
windowWidth: 0,
bookid: null,
productInfo: {},
pingjiaShow: false, //添加评价
Pform: { // 评价表单
star: 0,
comment: '',
img: [],
html: ''
},
emoji:[],
Files:[],
page:1,
pageSize:10,
total:0,
status:3,
shupingList:[],
bfaid:null,
emoji: [],
Files: [],
page: 1,
pageSize: 10,
total: 0,
status: 3,
shupingList: [],
bfaid: null,
}
},
onPullDownRefresh() {
console.log('下拉刷新了')
uni.stopPullDownRefresh();
this.page=1, // 页码
this.shupingList = []
this.getBookCom(this.orderListTab)
this.page = 1, // 页码
this.shupingList = []
this.getBookCom(this.orderListTab)
},
onReachBottom() {
this.loadingNow = true
if(this.page < this.total){
if (this.page < this.total) {
this.page++
console.log('加载',this.page)
console.log('加载', this.page)
this.status = 0
this.getBookCom(this.orderListTab)
}else{
} else {
this.status = 1
console.log('加载完成了',this.page)
console.log('加载完成了', this.page)
return
}
},
onLoad(e) {
this.windowWidth = uni.getSystemInfoSync().windowWidth;
console.log(e,'onload')
console.log(e, 'onload')
this.bookid = e.bookid
this.getProDetail(e)
this.getBookCom(this.orderListTab)
},
computed:{
computed: {
...mapState(['userInfo']),
},
methods: {
toOtherPage(e,productInfo) {
if(e==1){
toOtherPage(e, productInfo) {
if (e == 1) {
// 跳转到听书
uni.navigateTo({
url: "../listen/listen?bookid=" + productInfo.id
});
}
if(e==2){
if (e == 2) {
// 跳转到读书打卡
let data = {
'userId': this.userInfo.id,
'bookId': productInfo.id
}
checkBookRight(data,res=>{
checkBookRight(data, res => {
console.log(res)
if(res.success){
if (res.success) {
uni.navigateTo({
url: '../clock/clock?bookid='+ productInfo.id
url: '../clock/clock?bookid=' + productInfo.id
})
}else{
} else {
uni.showToast({
title:'购买本书后方可参与打卡!',
icon:'none'
title: '购买本书后方可参与打卡!',
icon: 'none'
})
}
})
}
if(e==3){
if (e == 3) {
// 跳转到购买
uni.navigateTo({
url: '../bookShop/commodityDetail?id=' + productInfo.id
});
}
},
// 切换tab状态
// 切换tab状态
orderTabCLi(e) {
this.orderListTab = e
this.page = 1
this.shupingList = []
this.page = 1
this.shupingList = []
this.getBookCom(this.orderListTab)
},
clickLike(item){
this.$http
.post("forum/articles/chickForumContlike?forum_id=" + item.id,)
clickLike(item) {
this.$http
.post("forum/articles/chickForumContlike?forum_id=" + item.id, )
.then(res => {
if (res.code == 0) {
uni.showToast({
title:'点赞成功!',
icon:'success'
})
item.contlike++
}
}).catch((e)=>{
console.log(e,'e')
if (res.code == 0) {
uni.showToast({
title: '点赞成功!',
icon: 'success'
})
item.contlike++
}
}).catch((e) => {
console.log(e, 'e')
})
},
formatTimeDifferenceFromT(dateTimeT) {
const now = new Date();
const t = new Date(dateTimeT);
const differenceInSeconds = Math.floor((now - t) / 1000);
},
formatTimeDifferenceFromT(dateTimeT) {
const now = new Date();
const t = new Date(dateTimeT);
const differenceInSeconds = Math.floor((now - t) / 1000);
if (differenceInSeconds <= 3600) {
const minutes = Math.floor(differenceInSeconds / 60);
return `${minutes} 分钟前`;
} else if (differenceInSeconds <= 86400) {
const hours = Math.floor(differenceInSeconds / 3600);
return `${hours} 小时前`;
} else if (differenceInSeconds <= 2592000) {
const days = Math.floor(differenceInSeconds / 86400);
return `${days} 天前`;
} else {
const currentYear = now.getFullYear();
const tYear = t.getFullYear();
if (currentYear === tYear) {
const month = t.getMonth() + 1;
const day = t.getDate();
return `${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
} else {
const year = t.getFullYear();
const month = t.getMonth() + 1;
const day = t.getDate();
return `${year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
}
}
},
if (differenceInSeconds <= 3600) {
const minutes = Math.floor(differenceInSeconds / 60);
return `${minutes} 分钟前`;
} else if (differenceInSeconds <= 86400) {
const hours = Math.floor(differenceInSeconds / 3600);
return `${hours} 小时前`;
} else if (differenceInSeconds <= 2592000) {
const days = Math.floor(differenceInSeconds / 86400);
return `${days} 天前`;
} else {
const currentYear = now.getFullYear();
const tYear = t.getFullYear();
if (currentYear === tYear) {
const month = t.getMonth() + 1;
const day = t.getDate();
return `${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
} else {
const year = t.getFullYear();
const month = t.getMonth() + 1;
const day = t.getDate();
return `${year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
}
}
},
// 书评详情
toDetail(val){
console.log(val,'val')
toDetail(val) {
console.log(val, 'val')
uni.navigateTo({
url:'./commentsDetail?bookid='+this.bookid+'&bfa_id='+val.id
url: './commentsDetail?bookid=' + this.bookid + '&bfa_id=' + val.id
})
},
getProDetail(e){
getProDetail(e) {
// 获取商品详情
uni.showLoading({
title: '加载中'
@@ -315,118 +328,122 @@ import { data } from 'jquery';
this.$http
.post('book/book/appinfo/' + this.bookid + '/' + this.userInfo.id)
.then(res => {
console.log(res,'res')
console.log(res, 'res')
this.productInfo = res.book
uni.hideLoading();
}).catch((e)=>{
console.log(e,'e')
}).catch((e) => {
console.log(e, 'e')
})
},
// 获得书评
getBookCom(flag){
getBookCom(flag) {
let data = {
'page': this.page,
'limit': this.pageSize,
'bookId' : this.bookid,
'order' : flag
'bookId': this.bookid,
'order': flag
}
console.log(data,'data')
console.log(data, 'data')
this.$http
.post('forum/articles/getForumByBook', data)
.then(res => {
console.log(res,'获取成功')
this.total = res.page.pages
this.shupingNum = res.page.total
this.shupingList = this.shupingList.concat(res.page.records)
// console.log(res,'已购买')
this.status = 3
}).catch((e)=>{
console.log(e,'e')
})
console.log(res, '获取成功')
this.total = res.page.pages
this.shupingNum = res.page.total
this.shupingList = this.shupingList.concat(res.page.records)
// console.log(res,'已购买')
this.status = 3
}).catch((e) => {
console.log(e, 'e')
})
},
// 获得输入的表情数组
handleEmj(i) {
console.log(i,'i---------');
console.log(i, 'i---------');
this.inputValue = i
// console.log(this.inputValue);
if(i.emotioni == '[em_98]') {
if (i.emotioni == '[em_98]') {
//匹配最后一个表情符号并删除11。
this.Pform.comment = this.Pform.comment.replace(/(\[[^\]]+\]|[\s\S])$/, '');
if(this.emoji.length > 0){
this.emoji = this.emoji.slice(0,-1)
if (this.emoji.length > 0) {
this.emoji = this.emoji.slice(0, -1)
}
} else {
this.emoji.push({'tag' : i.emotion, 'name':i.emotioni})
this.emoji.push({
'tag': i.emotion,
'name': i.emotioni
})
// console.log(this.emoji,'this.emoji')
this.Pform.comment += i.emotioni;
/// this.Pform.html += i.emotion
}
},
textareaBInput(e) {
console.log(e,'e')
console.log(e, 'e')
this.Pform.comment = e.detail.value
/// this.Pform.html = e.detail.value
},
showEmj() {
let bool = !this.isShowEmj;
if(bool) {
if (bool) {
this.emojiIcon = 'cuIcon-keyboard';
} else {
this.emojiIcon = 'cuIcon-emoji';
}
this.isShowEmj = bool;
this.$emit('show')
},
InputBlur(e){
InputBlur(e) {
},
InputFocus(e){
InputFocus(e) {
this.isShowEmj = false;
this.emojiIcon = 'cuIcon-emoji';
this.$emit('foc')
},
// end
deleteImg(e){
deleteImg(e) {
// var arr = this.Pform.img.slice(0,-1)
this.Pform.img.pop()
// console.log('删除文件',arr)
// console.log('删除文件',arr)
console.log(this.Pform)
},
getStar(i){
getStar(i) {
this.Pform.star = i
},
select(e){
console.log('选择文件:',e)
let arr = e.tempFiles.map(item => {
return {'url':item.url,'name':item.name}
})
this.Pform.img = this.Pform.img.concat(...arr)
select(e) {
console.log('选择文件:', e)
let arr = e.tempFiles.map(item => {
return {
'url': item.url,
'name': item.name
}
})
this.Pform.img = this.Pform.img.concat(...arr)
//this.Pform.img = arr
console.log(this.Pform,'img')
console.log(this.Pform, 'img')
},
upSuccess(e){
upSuccess(e) {
console.log(e)
},
// 获取html格式的评论1
getHtmlComment(){
// 格式化html
var ss = this.Pform.comment
if(this.emoji.length> 0){
for (var i = 0; i<this.emoji.length; i++){
if(this.Pform.comment.indexOf(this.emoji[i].name) !== -1 ){
//var re = new RegExp(this.emoji[0].name,"g"); //定义正则表达式
//第一个参数是要替换掉的内容第二个参数"g"表示替换全部global
// ss = ss.replace(re, ); //第一个参数是正则表达式
ss = ss.replace(this.emoji[i].name, this.emoji[i].tag)
// console.log(ss)
}
}
this.Pform.html = ss
}else{
this.Pform.html = this.Pform.comment
}
getHtmlComment() {
// 格式化html
var ss = this.Pform.comment
if (this.emoji.length > 0) {
for (var i = 0; i < this.emoji.length; i++) {
if (this.Pform.comment.indexOf(this.emoji[i].name) !== -1) {
//var re = new RegExp(this.emoji[0].name,"g"); //定义正则表达式
//第一个参数是要替换掉的内容,第二个参数"g"表示替换全部global)。
// ss = ss.replace(re, ); //第一个参数是正则表达式
ss = ss.replace(this.emoji[i].name, this.emoji[i].tag)
// console.log(ss)
}
}
this.Pform.html = ss
} else {
this.Pform.html = this.Pform.comment
}
//console.log(this.Pform.html,'this.Pform.html')
},
deletePic() {
@@ -437,13 +454,13 @@ import { data } from 'jquery';
afterRead(e) {
//console.log(e)
let that = this
for (var i=0; i< e.file.length; i++) {
for (var i = 0; i < e.file.length; i++) {
//console.log(i,e.file[i].url)
uni.uploadFile({
url: this.$baseUrl + 'oss/fileoss',
filePath: e.file[i].url,
//files:e.file,
name: 'file',
name: 'file',
formData: {},
success: (res) => {
that.Pform.img.push({
@@ -453,27 +470,27 @@ import { data } from 'jquery';
});
}
},
closePingjia(){
closePingjia() {
this.pingjiaShow = false
this.Pform.comment = ''
this.Pform.html = ''
this.emoji = []
},
// 点赞
dianzan(val){},
dianzan(val) {},
// 显示评论
pinglun(val){
pinglun(val) {
this.bfaid = val
this.pingjiaShow = true
},
// 提交评论
submitPJ(){
if(this.Pform.comment != ''){
let data={
'content':this.Pform.comment,
'userid':this.userInfo.id,
'bookid':this.bookid,
submitPJ() {
if (this.Pform.comment != '') {
let data = {
'content': this.Pform.comment,
'userid': this.userInfo.id,
'bookid': this.bookid,
'bfaid': this.bfaid
}
// console.log(data,'data')
@@ -485,26 +502,25 @@ import { data } from 'jquery';
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
uni.showToast({
title:'评论成功!',
icon:'success'
})
this.pingjiaShow = false
this.Pform.comment = ''
this.pinglunId = null
}
})
}else{
if (res.code == 0) {
uni.showToast({
title: '评论成功!',
icon: 'success'
})
this.pingjiaShow = false
this.Pform.comment = ''
this.pinglunId = null
}
})
} else {
uni.showToast({
title:'请先输入您的评价内容 ',
icon:'none'
title: '请先输入您的评价内容 ',
icon: 'none'
})
}
},
},
components:{
},
components: {
musicPlay,
emotion
}
@@ -512,16 +528,46 @@ import { data } from 'jquery';
</script>
<style lang="scss" scoped>
.flexbox{display: flex;}
.container{padding: 10px;}
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
.starLight{ background : url(../../static/icon/star_light.png) no-repeat; background-size: contain;}
.cuIcon-emoji {
background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block; margin-right: 20rpx;
width: 30px; }
.cuIcon-keyboard{background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block;
width: 30px; }
.flexbox {
display: flex;
}
.container {
padding: 10px;
}
.star {
display: inline-block;
width: 20px;
height: 20px;
margin-right: 10rpx;
}
.starGray {
background: url(../../static/icon/star_greey.png) no-repeat;
background-size: contain;
}
.starLight {
background: url(../../static/icon/star_light.png) no-repeat;
background-size: contain;
}
.cuIcon-emoji {
background: url(../../static/biaoqing.png) no-repeat;
background-size: contain;
display: block;
margin-right: 20rpx;
width: 30px;
}
.cuIcon-keyboard {
background: url(../../static/biaoqing.png) no-repeat;
background-size: contain;
display: block;
width: 30px;
}
.tanchu {
padding: 40rpx 30rpx 40rpx 30rpx;
position: relative;
@@ -549,25 +595,30 @@ import { data } from 'jquery';
display: inline-block;
margin-right: 5rpx;
}
}}
.shuping-topbar{
}
}
.shuping-topbar {
display: flex;
justify-content: space-between;
align-items: center;
.shuping-topbar-tiao{
.shuping-topbar-tiao {
font-size: 28rpx;
color: #8b8a91;
}
.shuping-topbar-order{
.shuping-topbar-order {
width: 280rpx;
display: flex;
justify-content: space-between;
align-items: center;
.orderdefine {
display: inline-block;
padding: 20rpx 0 20rpx 0;
// margin: 40rpx 0 15rpx 0;
width:230rpx;
width: 230rpx;
text-align: center;
font-size: 30rpx;
}
@@ -579,57 +630,88 @@ import { data } from 'jquery';
}
}
}
.quesheng{text-align: center; margin-top: 100rpx; color: #8b8a91; padding-bottom: 20rpx; padding-top: 20rpx;}
.bookInfo{
.quesheng {
text-align: center;
margin-top: 100rpx;
color: #8b8a91;
padding-bottom: 20rpx;
padding-top: 20rpx;
}
.bookInfo {
justify-content: space-between;
margin-bottom: 15px;
background-color: #fff;
padding:10px;
padding: 10px;
// border: 1px splid #999;
box-sizing: border-box;
padding-bottom: 20rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
.ting-du-mai{
.ting-du-mai {
display: flex;
justify-content: space-between;
align-content: center;
font-size: 28rpx;
width: 400rpx;
.ting-du-mai-item{
.ting-du-mai-item {
color: deepskyblue;
border: 1px solid deepskyblue;
border-radius: 6rpx;
padding: 4rpx 6rpx;
}
}
.imageradius{
.imageradius {
border-radius: 20rpx;
border:1rpx solid #e9e9e9;
border: 1rpx solid #e9e9e9;
}
.bookinfoimage{
.bookinfoimage {
width: 100px;
height:100px;
height: 100px;
}
.bookInfo-inner{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 100px);
.title{font-size: 32rpx; margin-top: 0rpx; margin-bottom: 20rpx;font-weight: 700; display: block;}
.author{font-size: 30rpx;margin-top: 0rpx;margin-bottom: 20rpx;font-weight: 500; display: block; }
.bookInfo-inner {
padding-left: 30rpx;
box-sizing: border-box;
width: calc(100% - 100px);
.title {
font-size: 32rpx;
margin-top: 0rpx;
margin-bottom: 20rpx;
font-weight: 700;
display: block;
}
.author {
font-size: 30rpx;
margin-top: 0rpx;
margin-bottom: 20rpx;
font-weight: 500;
display: block;
}
}
.description{
.description {
font-size: 28rpx;
line-height: 20px;
width: 100%;
color:#888;
color: #888;
padding-left: 0;
overflow:hidden;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 9;
display: -webkit-box;
-webkit-box-orient: vertical;
}
// view{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 150px);
// .title{font-size: 38rpx; margin-top: 20rpx; font-weight: blod; margin-bottom: 20rpx; display: block;
// }
@@ -638,11 +720,13 @@ import { data } from 'jquery';
// image{width: 150px !important; }
}
.mainContent{
.mainContent {
background-color: #fff;
padding: 20rpx;
border-radius: 20rpx;
.item{
.item {
// padding: 10px;
margin-bottom: 30rpx;
// border: 1px solid #999;
@@ -651,21 +735,24 @@ import { data } from 'jquery';
border-radius: 20rpx;
margin-bottom: 20rpx;
}
.feng{
margin:10rpx 20rpx 0 0;
height: 160rpx;
width: 140rpx;
float:left;
border-radius: 20rpx;
border:1rpx solid #e9e9e9;
.feng {
margin: 10rpx 20rpx 0 0;
height: 160rpx;
width: 140rpx;
float: left;
border-radius: 20rpx;
border: 1rpx solid #e9e9e9;
}
.title{
.title {
font-size: 30rpx;
font-weight: 700;
color: #000;
overflow: hidden;
}
.description{
.description {
overflow: hidden;
color: #666;
text-overflow: -o-ellipsis-lastline;
@@ -677,9 +764,10 @@ import { data } from 'jquery';
-webkit-box-orient: vertical;
font-size: 26rpx;
margin-bottom: 20rpx;
margin-top:10rpx;
margin-top: 10rpx;
// height: 172rpx;
}
// .btns{
// font-size: 24rpx;
// justify-content: space-between;
@@ -690,32 +778,42 @@ import { data } from 'jquery';
// }
// }
.btns{
.btns {
font-size: 22rpx;
justify-content: space-between;
align-items: center;
.left{
width: 300rpx;
color: #a1a1a1;
}
.right{
width: 300rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
.gzicon{
margin:0 0 0 20rpx;
height: 40rpx;
width: 40rpx;
// float:left;
// border-radius: 20rpx;
// border:1rpx solid #e9e9e9;
}
.opbtns{
.pingjia{margin-left: 10px;}
.left {
width: 300rpx;
color: #a1a1a1;
}
.right {
width: 300rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
.gzicon {
margin: 0 0 0 20rpx;
height: 40rpx;
width: 40rpx;
// float:left;
// border-radius: 20rpx;
// border:1rpx solid #e9e9e9;
}
.opbtns {
.pingjia {
margin-left: 10px;
}
}
}
}
.mb30{margin-bottom: 30rpx; overflow: hidden;}
.mb30 {
margin-bottom: 30rpx;
overflow: hidden;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -10,15 +10,16 @@
<view style="font-weight: bold;margin-bottom: 30rpx;">
{{bookMessage.name}}
</view>
<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;">
<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>
</p> -->
<!-- <p @click="onAuCHJump(item.id,2)" v-for="item in this.bookMessage.publisherNIList">
{{item.title}} >
</p> -->
</view>
<view class="tags" v-if="bookMessage.bookType==0">
<view class="tags" v-if="bookMessage.bookType==0&&iosHide">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>
<uni-tag @click="gotoListen()" class="tag" v-if="bookMessage.canListen" :inverted="true" text="听书"
type="primary"></uni-tag>
@@ -57,47 +58,49 @@
</text>
</view>
<u-divider v-else text="暂无简介信息"></u-divider>
<view class="head_line" style="margin-bottom:30rpx;">
<b></b>
<text>精彩试听</text>
</view>
<view class="playList" v-if="libLIst.length > 0">
<view class="item" v-for="(item,index) in libLIst" :key="index">
<view>
<view v-if="item.isFree == 1" :class="[]" @click="listenOne(item, index)">
<view v-if="iosHide">
<view class="head_line" style="margin-bottom:30rpx;">
<b></b>
<text>精彩试听</text>
</view>
<view class="playList" v-if="libLIst.length > 0">
<view class="item" v-for="(item,index) in libLIst" :key="index">
<view>
<view v-if="item.isFree == 1" :class="[]" @click="listenOne(item, index)">
<span
:class="[userInfo.playingInfo.bookId==item.bookId && userInfo.playingInfo.id == item.id ? 'playing' : '','graytitle']">{{item.chapter}}</span>&nbsp;&nbsp;
<uni-tag v-if="item.isFree == 1" class="tag" size="small" :inverted="true" text="试听"
type="success" />
<!-- <image class="playingFig" src="/static/playingGif.gif" mode="aspectFill"></image> -->
<span
:class="[userInfo.playingInfo.bookId==item.bookId && userInfo.playingInfo.id == item.id ? 'playing' : '','graytitle']">{{item.chapter}}</span>&nbsp;&nbsp;
<uni-tag v-if="item.isFree == 1" class="tag" size="small" :inverted="true" text="试听"
type="success" />
<!-- <image class="playingFig" src="/static/playingGif.gif" mode="aspectFill"></image> -->
</view>
</view>
</view>
</view>
<view class="" style="text-align: center;" @click="gotoListen">
<text style="font-size: 28rpx; color:#27b386">查看完整目录</text>
</view>
</view>
<u-divider v-else text="暂无试听数据"></u-divider>
<view class="head_line" style="margin-bottom:30rpx;">
<b></b>
<text>热门书评</text>
</view>
<view class="list shupingList" v-if="shupingList.length > 0">
<view class="item" @click.stop="toDetail(item)" v-for="item in shupingList" :key="item.id">
<h4>{{item.title}}</h4>
<view class="" v-if="item.content && item.content != '' ">
<view class="info" v-html="item.content">
</view>
<view class="" style="text-align: center;" @click="gotoListen">
<text style="font-size: 28rpx; color:#27b386">查看完整目录</text>
</view>
<view class="more" @click.stop="toDetail(item)">立即查看</view>
</view>
<view class="moreBtn" @click="toMore(item)">
<text>查看更多</text>
<u-divider v-else text="暂无试听数据"></u-divider>
<view class="head_line" style="margin-bottom:30rpx;">
<b></b>
<text>热门书评</text>
</view>
<view class="list shupingList" v-if="shupingList.length > 0">
<view class="item" @click.stop="toDetail(item)" v-for="item in shupingList" :key="item.id">
<h4>{{item.title}}</h4>
<view class="" v-if="item.content && item.content != '' ">
<view class="info" v-html="item.content">
</view>
</view>
<view class="more" @click.stop="toDetail(item)">立即查看</view>
</view>
<view class="moreBtn" @click="toMore(item)">
<text>查看更多</text>
</view>
</view>
<u-divider v-else text="暂无书评数据"></u-divider>
</view>
<u-divider v-else text="暂无书评数据"></u-divider>
</view>
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle'
@@ -248,16 +251,16 @@
'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: '../talkBook/talkBookML?bookid=' + this.bookId
});
}else{
} else {
uni.showToast({
title:'购买本书后方可查看此内容!',
icon:'none'
title: '购买本书后方可查看此内容!',
icon: 'none'
})
}
})
@@ -275,14 +278,14 @@
'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'
})
}
})
@@ -296,16 +299,16 @@
'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'
})
}
})

View File

@@ -67,7 +67,7 @@
</view> -->
</view>
<view class="flexbox icons">
<view class="flexbox icons" v-if="iosHide">
<view class="item " >
<!-- <u-icon name="chat" color="#fcbd71" size="24"></u-icon> -->
<view v-if="item.clockIn != null && item.clockIn != 2" @click="goDaKa(item)">
@@ -88,11 +88,14 @@
</view>
<view class="v1"><text> </text></view>
</view>
<view class="item " @click="goPingshu(item)">
<view class="item ">
<!-- <u-icon name="chat" color="#fcbd71" size="24"></u-icon> -->
<view class="">
<view v-if="item.forumNum>0" @click="goPingshu(item)">
<image src="../../static/icon/home3.png" mode="aspectFit"></image>
</view>
<view v-else @click="noOp()">
<image class="gray" src="../../static/icon/home3.png" mode="aspectFit"></image>
</view>
<view class="v1"><text> </text></view>
</view>
<view class="item " >

View File

@@ -120,14 +120,15 @@
}
},
onLoad() {
},
onShow() {
this.page = 1, // 页码
this.tjPage = 1
this.tjBookLIst = []
this.bookList = []
this.getListDate()
this.getfreeBook()
},
onShow() {
},
onPullDownRefresh() {
console.log('下拉刷新了')

View File

@@ -25,12 +25,12 @@
{{bookInfo.name}}
</view>
<view style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
<!-- <p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;" v-if="bookInfo.author">
{{bookInfo.author.authorName}} [] >
</p>
<p @click="onAuCHJump(item.id,2)" v-for="item in bookInfo.publisherNIList">
<p @click="onAuCHJump(item.id,2)" v-for="item in bookInfo.publisherNIList" v-if="bookInfo.publisherNIList">
{{item.title}} >
</p>
</p> -->
</view>
<view class="tags">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>

View File

@@ -21,12 +21,12 @@
{{bookInfo.name}}
</view>
<view style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookInfo.authorId,1)" style="margin-bottom: 20rpx;">
<!-- <p @click="onAuCHJump(bookInfo.authorId,1)" style="margin-bottom: 20rpx;">
{{bookInfo.authorName}} [] >
</p>
<p @click="onAuCHJump(item.id,2)" v-for="item in this.bookInfo.publisherNIList">
{{item.title}} >
</p>
</p> -->
</view>
<view class="price">
<text class="light">98.00</text>

View File

@@ -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) {
}
}
// }
// }
})
}

View File

@@ -47,7 +47,7 @@
</view> -->
</view>
<!-- <view class="home_nar" v-if="showEbook"> -->
<view class="home_nar">
<view class="home_nar" v-if="iosHide">
<view class="hn_cl_tit shuguan" @click="onPageJump('../clock/index')">
<image src="../../static/icon/home1-1.png" mode="aspectFit"></image>
<!-- <text> </text> -->

View File

@@ -42,16 +42,16 @@
<text style="float: right;line-height: 85rpx;"> > </text>
</view>
<view class="chong_list">
<view>
<view v-if="iosHide">
<b>{{userMes.peanutCoin}}</b>
天医币
</view>
<view>
<view v-if="iosHide">
<b>{{userMes.conponsCount}}</b>
优惠券
</view>
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')"> </b> -->
<b class="chong_btn" v-if="platform != 'ios'" @click="onPageJump('./reCharge')"> </b>
<b class="chong_btn" v-if="iosHide" @click="onPageJump('./reCharge')"> </b>
</view>
</view>
@@ -62,10 +62,10 @@
<!-- <view class="nav_list" @click="onPageJump('../clock/clockList')">
<text>我的打卡</text>
</view> -->
<view class="nav_list" @click="onPageJump('../listen/home')">
<view class="nav_list" @click="onPageJump('../listen/home')" v-if="iosHide">
<text>我的听书</text>
</view>
<view class="nav_list" @click="onPageJump('../listen/setListen')">
<view class="nav_list" @click="onPageJump('../listen/setListen')" v-if="iosHide">
<text>听书设置</text>
</view>
<view class="nav_list" @click="onPageJump('../peanut/myComments')">

View File

@@ -26,27 +26,18 @@
</u-grid-item>
</u-grid>
</view>
<view class="marYao" @click="xingweiShow = true"
v-if="curXingIndex.length>0||curWeiIndex.length>0||curGuijingIndex.length>0">
<view class="marYao" @click="xingweiShow = true" v-if="curXWGMark.length>0">
性味
<span v-for="(item, index) in curXingIndex">
<span v-for="(item, index) in curXWGMark">
{{item}}
<font>,</font>
</span>
<span v-for="(item, index) in curWeiIndex">
{{item}}
<font>,</font>
</span>
<span v-for="(item, index) in curGuijingIndex">
{{item}}
<font>,</font>
<font v-if="index+1!=curXWGMark.length">,</font>
</span>
</view>
<view class="marYao" @click="gongxiaoShow = true" v-if="curGongxiaoIndex.length>0">
<view class="marYao" @click="gongxiaoShow = true" v-if="curGongxiaoMark.length>0">
功效
<span v-for="(item, index) in curGongxiaoIndex">
<span v-for="(item, index) in curGongxiaoMark">
{{item}}
<font v-if="index+1!=curGongxiaoIndex.length">,</font>
<font v-if="index+1!=curGongxiaoMark.length">,</font>
</span>
</view>
<!-- <view class="searchList" v-show="showSearchList">
@@ -339,6 +330,8 @@
status: 3,
page: 1,
totalPage: 1,
curXWGMark: [],
curGongxiaoMark: [],
}
},
onLoad() {
@@ -387,10 +380,9 @@
// 若不包含,则向数组中添加该值
arr.push(item.title);
}
this.page = 1
this.titleList = []
this.goToSearch()
console.log(arr);
console.log(this.curGongxiaoMark)
console.log(this.curXWGMark)
},
goNewSearch() {
this.page = 1
@@ -407,7 +399,7 @@
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 20,
"limit": 50,
"current": this.page,
"name": "",
"type": "", // 植物、矿物、动物
@@ -433,6 +425,10 @@
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)))
} else {
this.titleList = []
@@ -602,9 +598,7 @@
}
.marYao:nth-last-child(1) {
display: none;
}
}

View File

@@ -6,7 +6,7 @@
<view class="contentBox">
<view class="search_box">
<u-search :clearabled="true" bgColor="#fff" borderColor="#54a966" focus v-model="keyword"
@custom='souYao' @clear="souYao"></u-search>
@custom='souYao' @clear="souYao" @search="souYao"></u-search>
</view>
<view class="titleList">
<u-grid :col="1" v-if="titleList.length > 0">
@@ -17,7 +17,6 @@
</u-grid>
<u-divider v-else text="暂无药物数据哦~"></u-divider>
</view>
</view>
<view>
<view v-if="status==0" style="text-align: center;padding: 20rpx 0;">
@@ -51,9 +50,11 @@
totalPage: 1,
}
},
onLoad() {
this.titleList = []
this.souYao()
},
onHide() {
this.page = 1
},
@@ -65,6 +66,7 @@
this.goToSearch()
uni.stopPullDownRefresh();
},
onReachBottom() {
// this.loadingNow = true
console.log('到底了')
@@ -75,9 +77,11 @@
this.status = 1
}
},
computed: {
...mapState(['userInfo']),
},
methods: {
// 搜索
goToSearch() {
@@ -86,7 +90,7 @@
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 20,
"limit": 50,
"current": this.page,
"name": this.keyword,
"type": "", // 植物、矿物、动物
@@ -104,15 +108,12 @@
for (var i = 0; i < res.result.records.length; i++) {
this.titleList.push(res.result.records[i])
}
this.totalPage = res.result.pages
if (this.page == this.totalPage) {
this.status = 1
} else {
this.status = 3
}
} else {
this.titleList = []
}
@@ -135,8 +136,8 @@
url: "./CNMedicineSearchDetail?id=" + item.id
})
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();

View File

@@ -28,31 +28,143 @@
</u-grid>
</view>
<view class="titleList" v-if="curOneCateIndex == 1">
<u-grid :col="1" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
<view v-if="titleList.length > 0">
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view>
</u-grid-item>
</u-grid>
</view>
</view>
<u-divider v-else text="暂无药物数据哦~"></u-divider>
</view>
<view style="padding: 10rpx 20rpx 0 20rpx;font-size: 30rpx;" v-if="!curOneCateIndex == 1">
<b>大家常看的</b>
<view style="color: #55aa7f;float: right;font-weight: bold;" @click="gotoFenlei()">
<img src="../../static/jainsuo.png" alt="" style="width: 36rpx;vertical-align: text-top;margin-right: 8rpx;">
分类检索
<view v-if="!curOneCateIndex == 1">
<view class="grid CNCateList">
<u-grid :col="2" border class="u-grid-list">
<u-grid-item v-for="(item, index) in CNateList" :key="item.id" @click="setCNIndex(item, index)">
<view :class="['grid-text',false ? 'cur' : '']">
{{item.title}}
<b v-if="index==1&&xingweiShow">
<u-icon name="arrow-up-fill" color="#666" size="12"></u-icon>
</b>
<b v-if="index==1&&!xingweiShow">
<u-icon name="arrow-down-fill" color="#666" size="12"></u-icon>
</b>
<b v-if="index==0&&gongxiaoShow">
<u-icon name="arrow-up-fill" color="#666" size="12"></u-icon>
</b>
<b v-if="index==0&&!gongxiaoShow">
<u-icon name="arrow-down-fill" color="#666" size="12"></u-icon>
</b>
</view>
</u-grid-item>
</u-grid>
</view>
<view class="marYao" @click="gongxiaoShow = true" v-if="curGongxiaoMark.length>0">
功效
<span v-for="(item, index) in curGongxiaoMark">
{{item}}
<font v-if="index+1!=curGongxiaoMark.length">,</font>
</span>
</view>
<view class="marYao" @click="xingweiShow = true" v-if="curXWGMark.length>0">
性味
<span v-for="(item, index) in curXWGMark">
{{item}}
<font v-if="index+1!=curXWGMark.length">,</font>
</span>
</view>
</view>
<view class="titleList" v-if="!curOneCateIndex == 1">
<u-grid :col="1" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
<view v-if="titleList.length > 0">
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view>
</u-grid-item>
</u-grid>
</view>
</view>
<u-divider v-else text="暂无药物数据哦~"></u-divider>
</view>
<view v-if="!curOneCateIndex == 1">
<view v-if="status==0" style="text-align: center;padding: 20rpx 0;">
<u-loading-icon style="display: inline-block;"></u-loading-icon>
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>
努力加载中
</font>
</view>
<view v-if="status==1" style="padding: 20rpx 0;">
<u-divider text="全部加载完成"></u-divider>
</view>
</view>
</view>
<u-popup mode="bottom" :show="xingweiShow" :round="10" @close="xingweiShow=false">
<view class="CNMedicineSearchPopup">
<view class="dp_title"></view>
<view class="grid twoCateList" v-if="xingSelectionList.length > 0">
<u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in xingSelectionList" :key="item.title"
@click="setXingIndex(item, index, curXingIndex)">
<view :class="['grid-text',curXingIndex.includes(item.title) ? 'cur' : '']">{{item.title}}
</view>
</u-grid-item>
</u-grid>
</view>
<view class="dp_title"></view>
<view class="grid twoCateList" v-if="weiSelectionList.length > 0">
<u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in weiSelectionList" :key="item.title"
@click="setXingIndex(item, index, curWeiIndex)">
<view :class="['grid-text',curWeiIndex.includes(item.title) ? 'cur' : '']">{{item.title}}
</view>
</u-grid-item>
</u-grid>
</view>
<view class="dp_title">归经</view>
<view class="grid twoCateList" v-if="guijingSelectionList.length > 0">
<u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in guijingSelectionList" :key="item.title"
@click="setXingIndex(item, index, curGuijingIndex)">
<view :class="['grid-text',curGuijingIndex.includes(item.title) ? 'cur' : '']">
{{item.title}}
</view>
</u-grid-item>
</u-grid>
</view>
<view style="max-height: 1000rpx;overflow-y: scroll;margin-top: 28px;">
<!-- 提交 -->
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
<view>
<u-button type="success" @click="goNewSearch">查询</u-button>
</view>
</view>
</view>
</view>
</u-popup>
<u-popup mode="bottom" :show="gongxiaoShow" :round="10" @close="gongxiaoShow=false">
<view class="CNMedicineSearchPopup">
<view class="dp_title">功效</view>
<view class="grid twoCateList" v-if="gongxiaoSelectionList.length > 0">
<u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in gongxiaoSelectionList" :key="item.title"
@click="setXingIndex(item, index, curGongxiaoIndex)">
<view :class="['grid-text',curGongxiaoIndex.includes(item.title) ? 'cur' : '']">
{{item.title}}
</view>
</u-grid-item>
</u-grid>
</view>
<view style="max-height: 1000rpx;overflow-y: scroll;margin-top: 28px;">
<!-- 提交 -->
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
<view>
<u-button type="success" @click="goNewSearch">查询</u-button>
</view>
</view>
</view>
</view>
</u-popup>
</view>
</template>
@@ -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"
})
}
}
};
</script>
@@ -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;}
}
@@ -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;
}
}
}
</style>

View File

@@ -11,11 +11,11 @@
<view v-if="curFirstTabIndex==0">
<view class="oneCateBot flexbox">
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId">{{item.title}}</text>
v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId" v-show="!iosHide&&index!=0">{{item.title}}</text>
</view>
<view class="search_box" v-if="oneCateList.length > 0">
<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">
@@ -27,7 +27,7 @@
<u-divider text="未找到相关方剂哦~"></u-divider>
</view>
</view>
<view v-show="!showSearchList">
<view v-show="!showSearchList&&!iosHide&&curOneCateIndex!=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"
@@ -39,7 +39,8 @@
<view class="titleList" v-if="curOneCateIndex != 2">
<u-grid :col="1" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.prescriptId"
@click="gotoDetail(item)" style="align-items: flex-start;border-bottom: 2px solid #fff;">
@click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.title}}</view>
</u-grid-item>
</u-grid>
@@ -93,10 +94,10 @@
},
data() {
return {
firstTabList:[{
firstTabList: [{
firstTabId: 1,
title: '方剂检索'
},{
}, {
firstTabId: 2,
title: '药物检索'
}],
@@ -224,9 +225,9 @@
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)
}
@@ -263,7 +264,7 @@
} else if (index == 3) {
this.twoCateList = []
this.getTitles(id)
} else{
} else {
this.getTowCateList(id)
}
@@ -452,6 +453,14 @@
plus.key.hideSoftKeybord();
// #endif
},
onReachBottom() {
this.$nextTick(() => {
this.$refs.mSearch.goToBottom()
})
},
}
</script>
@@ -473,6 +482,7 @@
.contentBox {
.oneCateList {
justify-content: space-between;
text {
text-align: center;
display: inline-block;
@@ -488,7 +498,7 @@
}
}
.oneCateBot{
.oneCateBot {
margin-top: 15rpx;
justify-content: space-between;
@@ -507,7 +517,8 @@
font-weight: bold;
}
}
.firstTab{
.firstTab {
text {
text-align: center;
display: inline-block;
@@ -605,7 +616,7 @@
text-align: left;
}
.limiTy{
.limiTy {
font-size: 28rpx;
line-height: 46rpx;
}

View File

@@ -50,6 +50,10 @@
</view>
</uni-section>
<view style="text-align: center;color: #999;font-size: 24rpx;">
辨病治症仅供参考若有身体问题请及时到医院问诊
</view>
<!-- <uni-section class="mb-10" titleFontSize="18px" title="配伍" type="line">
<view class="item" v-if="prescriptDetail.compatibility && prescriptDetail.compatibility != ''" v-html="prescriptDetail.compatibility">
</view>
@@ -66,6 +70,8 @@
</view>
</uni-section> -->
</view>
</view>
<music-play :playData="playData"></music-play>

View File

@@ -24,12 +24,12 @@
</view>
<view v-if="bookInfo.author != null"
style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
<!-- <p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
{{bookInfo.author.authorName}} [] >
</p>
<p @click="onAuCHJump(item.id,2)" v-for="item in this.bookInfo.publisherNIList">
{{item.title}} >
</p>
</p> -->
</view>
<view class="tags" v-if="bookInfo.bookType==0">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评"

View File

@@ -103,7 +103,7 @@
<button @click="onPageJump('/pages/user/register')">注册账号</button>
<text v-if="type == 1000" @click="onPageJump('/pages/user/forget')">忘记密码</text>
</view> -->
<view class="third_party_login_box">
<view class="third_party_login_box" v-if="iosHide">
<view class="third_party_title"><text>第三方登录</text></view>
<view class="third_party_content">
<image src="../../static/icon/ic_login_health.png" @click="onHealthLogin" mode="aspectFit">

View File

@@ -5,7 +5,10 @@
<z-nav-bar title="我的账户"></z-nav-bar>
<view class="ACTable">
<u-tabs :list="tab_list" @click="tab_click" lineColor="#54a966 100% 100%"
:activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.1)'}"></u-tabs>
:activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.1)'}" v-if="iosHide"></u-tabs>
<u-tabs :list="tab_list_ios" @click="tab_click" lineColor="#54a966 100% 100%"
:activeStyle="{color: '#303133',fontWeight: 'bold',transform: 'scale(1.1)'}" v-if="!iosHide"></u-tabs>
<view v-if="tab_muJian==0">
<view class="AC_mes">
@@ -67,7 +70,8 @@
</view>
</view>
<view class="footer">
<view style="margin: 0 0 8rpx 0;">使用时间{{item.coupons.takeEffectDate}} - {{item.coupons.expirationDate}}
<view style="margin: 0 0 8rpx 0;">使用时间{{item.coupons.takeEffectDate}} -
{{item.coupons.expirationDate}}
</view>
<view>{{item.coupons.note}}</view>
<view class="arrow"></view>
@@ -105,7 +109,7 @@
</template>
<script>
import musicPlay from '@/components/music.vue'
import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js';
import {
mapState
@@ -113,13 +117,16 @@
export default {
data() {
return {
playData:{},
platform:null,
playData: {},
platform: null,
tab_list: [{
name: '天医币',
}, {
name: '优惠券',
}],
tab_list_ios: [{
name: '优惠券',
}],
couponTabs: [{
name: '未使用'
}, {
@@ -185,7 +192,7 @@
uni.hideTabBar();
// #ifdef APP-PLUS
this.platform = uni.getSystemInfoSync().platform
console.log('操纵系统',this.platform)
console.log('操纵系统', this.platform)
// #endif
},
computed: {
@@ -197,21 +204,24 @@
uni.hideTabBar();
this.getData();
this.getCourpe();
},
components:{
components: {
musicPlay
},
//方法
methods: {
// 获取
getData() {
if(!this.iosHide){
this.tab_muJian=1
}
// 用户详情
if (this.userInfo.id != undefined) {
this.$http
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMes = res.user
});
}

View File

@@ -389,14 +389,14 @@
return;
}
if (e == 'phone') {
if (!this.userMes.phone) {
if (this.userMes.phone == '') {
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
return;
}
if (this.userMes.quCode == null || this.userMes.quCode == 86) {
if (this.userMes.quCode == '' || this.userMes.quCode == 86) {
if (!this.$base.phoneRegular.test(this.userMes.phone)) {
uni.showToast({
title: '手机格式不正确',
@@ -453,7 +453,7 @@
// 手机
chosePhone(e) {
this.userMes.code = this.userMes.phonecode
if (this.userMes.email == '') {
if (this.userMes.phone == '') {
uni.showToast({
title: '请输入手机号',
icon: 'none'

View File

@@ -218,7 +218,7 @@
<view v-if="contentShow == 0">
<view class="pingjia">
<!-- <h4></h4> -->
<view class="" v-if="listenList.length > 0 && listenList[0]" style="margin:0rpx 0rpx 30rpx;">
<view class="" v-if="listenList.length > 0 && listenList[0]&&iosHide" style="margin:0rpx 0rpx 30rpx;">
<view class="">
<view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view>
</view>

View File

@@ -24,12 +24,12 @@
</view>
<view v-if="bookInfo.author != null"
style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;">
<p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
<!-- <p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
{{bookInfo.author.authorName}} [] >
</p>
<p @click="onAuCHJump(item.id,2)" v-for="item in this.bookInfo.publisherNIList">
{{item.title}} >
</p>
</p> -->
</view>
<view class="tags">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评"

View File

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

View File

@@ -0,0 +1,12 @@
// 本文件用于使用JQL语法操作项目关联的uniCloud空间的数据库方便开发调试和远程数据库管理
// 编写clientDB的js API也支持常规js语法比如var可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
// 可以全部运行也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
// 如果文档中存在多条JQL语句只有最后一条语句生效
// 如果混写了普通js最后一条语句需是数据库操作语句
// 此处代码运行不受DB Schema的权限控制移植代码到实际业务中注意在schema中配好permission
// 不支持clientDB的action
// 数据库查询有最大返回条数限制详见https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
// 详细JQL语法请参考https://uniapp.dcloud.net.cn/uniCloud/jql.html
// 下面示例查询uni-id-users表的所有数据
db.collection('uni-id-users').get();