苹果审核,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> <template>
<view> <view v-if="iosHide">
<view class="footer_box" :class="{ footer_bg: bg }"> <view class="footer_box" :class="{ footer_bg: bg }">
<view v-for="(item, index) of navigationList" :key="index" class="footer_item"> <view v-for="(item, index) of navigationList" :key="index" class="footer_item">
<view class="footer_nav_item" @click="onPageJump(item.pagePath)"> <view class="footer_nav_item" @click="onPageJump(item.pagePath)">
@@ -12,7 +12,20 @@
</view> </view>
</view> </view>
<view v-if="bg" class="footer_station"></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> </view>
</template> </template>
<script> <script>
@@ -58,6 +71,26 @@
text: '我的' 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/"; // baseUrl = "http://localhost:7001/";
// socketUrl = "ws://localhost:6001/"; // socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/"; // baseUrl = "https://twin-ui.com/demo/";
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 // baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式 baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/"; // baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/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 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 = /^[a-zA-Z0-9]{4,10}$/;
const passwordRegular = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/; const passwordRegular = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/;

37
main.js
View File

@@ -2,22 +2,41 @@ import Vue from 'vue'
import App from './App' import App from './App'
import qs from 'qs' import qs from 'qs'
import {music, bgm} from '@/utils/music.js' import {
music,
bgm
} from '@/utils/music.js'
Vue.prototype.$music = music Vue.prototype.$music = music
Vue.prototype.$bgm = bgm Vue.prototype.$bgm = bgm
import {nowHour} from '@/utils/getHours.js' import {
nowHour
} from '@/utils/getHours.js'
Vue.prototype.$getHours = nowHour Vue.prototype.$getHours = nowHour
// 地址 // 地址
// Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" // Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/"
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/" // Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/" Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
// 安卓安卓包下载地址 // 安卓安卓包下载地址
// Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk" // 本地地址 // 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组件库 // uView组件库
import uView from "uview-ui"; import uView from "uview-ui";
@@ -37,11 +56,15 @@ import $http from '@/config/requestConfig'
Vue.prototype.$http = $http; Vue.prototype.$http = $http;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
//挂载全局微信分享 //挂载全局微信分享
import { wxShare } from '@/config/utils' import {
wxShare
} from '@/config/utils'
Vue.prototype.wxShare = wxShare; Vue.prototype.wxShare = wxShare;
// #endif // #endif
//判断是否登录 //判断是否登录
import { judgeLogin } from '@/config/login'; import {
judgeLogin
} from '@/config/login';
Vue.prototype.judgeLogin = judgeLogin; Vue.prototype.judgeLogin = judgeLogin;
Vue.config.productionTip = false; Vue.config.productionTip = false;
// #ifdef H5 // #ifdef H5

View File

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

View File

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

View File

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

View File

@@ -73,6 +73,10 @@
</view> </view>
</uni-section> </uni-section>
<view style="text-align: center;color: #999;font-size: 24rpx;">
辨病治症仅供参考若有身体问题请及时到医院问诊
</view>
</view> </view>
</view> </view>
<music-play :playData="playData"></music-play> <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 v-if="contentShow == 0">
<view class="pingjia"> <view class="pingjia">
<!-- <h4></h4> --> <!-- <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 class="">
<view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view> <view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view>
</view> </view>

View File

@@ -509,15 +509,15 @@
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '微信号yilujiankangkefu', content: '微信号yilujiankangkefu',
success: function (res) { // success: function (res) {
if (res.confirm) { // if (res.confirm) {
uni.makePhoneCall({ // uni.makePhoneCall({
phoneNumber: '022-24142321' //仅为示例 // phoneNumber: '022-24142321' //仅为示例
}); // });
} else if (res.cancel) { // } else if (res.cancel) {
} // }
} // }
}) })
}, },
// 查看物流 // 查看物流

View File

@@ -37,10 +37,11 @@
<text>{{item.productName}}</text> <text>{{item.productName}}</text>
</view> </view>
<view class="itemPrice"> <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> <text v-else>{{item.price*item.productAmount}}</text>
<u-number-box v-model="item.productAmount" @change="valChange($event, item)" :input-width="50" <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> </view>
</view> </view>
@@ -55,10 +56,8 @@
<u-icon name="red-packet-fill" color="#e74141" size="18" class="yqLeft"></u-icon> <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> <u-icon name="arrow-right" color="#aaa" size="18" class="yqRight"></u-icon>
<text class="dagnqian" <text class="dagnqian" v-if="youhuiList.length>0">当前可选{{this.youhuiList.length}}</text>
v-if="youhuiList.length>0">当前可选{{this.youhuiList.length}}</text> <text class="dagnqian" v-else style="background-color: #999;">暂无优惠券</text>
<text class="dagnqian" v-else
style="background-color: #999;">暂无优惠券</text>
<text class="dagnqian" v-if="youhuiContent.id!=undefined"> <text class="dagnqian" v-if="youhuiContent.id!=undefined">
- {{youhuiContent.coupons.couponAmount}}</text> - {{youhuiContent.coupons.couponAmount}}</text>
</view> </view>
@@ -67,6 +66,10 @@
运费 运费
<text>{{farePrice}}</text> <text>{{farePrice}}</text>
</view> </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>
<!-- 安卓支付列表 --> <!-- 安卓支付列表 -->
<view class="zhif_fangsh" v-if="isAndorid"> <view class="zhif_fangsh" v-if="isAndorid">
@@ -76,10 +79,12 @@
<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> <image :src="item.img"></image>
{{item.title}} {{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}天医币可用</span> <span v-if="item.id == 4"
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4" class="chongBtn">去充值</span> 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' <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>
</view> </view>
</u-radio-group> </u-radio-group>
@@ -93,17 +98,19 @@
<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> <image :src="item.img"></image>
{{item.title}} {{item.title}}
<span v-if="item.id == 4" style="color: #bbb; margin-left: 10px;">{{userMes.peanutCoin}}天医币可用</span> <span v-if="item.id == 4"
<span @click.stop="buPoint" style="color: #bf0c0c; margin-left: 10px;" v-if="item.id == 4" class="chongBtn">去充值</span> 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' <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>
</view> </view>
</u-radio-group> </u-radio-group>
</view> </view>
</view> </view>
<view class="footer" > <view class="footer">
<view class="commodityPrice" v-if="payType != 4"> <view class="commodityPrice" v-if="payType != 4">
<span style="color: #666;margin-right: 10rpx; font-size: 15px;">实付款: </span> <span style="color: #666;margin-right: 10rpx; font-size: 15px;">实付款: </span>
<span></span>{{realPrice}} <span></span>{{realPrice}}
@@ -206,7 +213,8 @@
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import { import {
setPay, setPay,
setPayAssign,setWXPay setPayAssign,
setWXPay
} from '@/config/utils'; } from '@/config/utils';
import { import {
mapState mapState
@@ -214,26 +222,26 @@
export default { export default {
data() { data() {
return { return {
isAndorid:true, // 操作系统 isAndorid: true, // 操作系统
playData:{}, playData: {},
typeId: 0, typeId: 0,
shangIDNum: 0, shangIDNum: 0,
cartIDNum: [], cartIDNum: [],
cartList: [], cartList: [],
userMes:{}, // 用户信息 userMes: {}, // 用户信息
amount:null, // 商品总价 amount: null, // 商品总价
addressList: [], addressList: [],
adressMoRen: {}, adressMoRen: {},
adressMoRenPath:"", adressMoRenPath: "",
adressMoRIndex: 0, adressMoRIndex: 0,
youhuiList: [], youhuiList: [],
addressId:null, addressId: null,
youhuiContent: {}, youhuiContent: {},
youhuiIndex: '', youhuiIndex: '',
dizhiShow: false, dizhiShow: false,
youhuiShow: false, youhuiShow: false,
totalPrice: 0, totalPrice: 0,
isSend:'0', isSend: '0',
farePrice: 0, farePrice: 0,
realPrice: 0, realPrice: 0,
payType: 1, payType: 1,
@@ -269,11 +277,11 @@
id: 1, id: 1,
img: '../../static/icon/pay_2.png' img: '../../static/icon/pay_2.png'
}, },
{ // {
title: '天医币购买', // title: '天医币购买',
id: 4, // id: 4,
img: '../../static/icon/oder_chong.png' // img: '../../static/icon/oder_chong.png'
}, // },
// { // {
// title: 'ios内购', // title: 'ios内购',
// id: 3, // id: 3,
@@ -313,18 +321,18 @@
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
}, },
components:{ components: {
musicPlay musicPlay
}, },
methods: { methods: {
// 获得操作系统 // 获得操作系统
getOS(){ getOS() {
let oprateOs = '' let oprateOs = ''
oprateOs = uni.getSystemInfoSync().platform oprateOs = uni.getSystemInfoSync().platform
// console.log(oprateOs) // console.log(oprateOs)
if(oprateOs == 'android'){ if (oprateOs == 'android') {
this.isAndorid = true this.isAndorid = true
}else{ } else {
this.isAndorid = false this.isAndorid = false
} }
}, },
@@ -362,13 +370,13 @@
// console.log(this.addressList,'地址列表') // console.log(this.addressList,'地址列表')
this.adressMoRen = this.addressList[this.adressMoRIndex] this.adressMoRen = this.addressList[this.adressMoRIndex]
console.log(this.adressMoRen, '默认') console.log(this.adressMoRen, '默认')
if(this.adressMoRen != {} && this.adressMoRen.id){ if (this.adressMoRen != {} && this.adressMoRen.id) {
// console.log('运费之前') // console.log('运费之前')
this.getYunFei() this.getYunFei()
}else{ } else {
// this.getUserAddress() // this.getUserAddress()
uni.showToast({ uni.showToast({
title:'获取用户地址失败', title: '获取用户地址失败',
icon: 'none' icon: 'none'
}) })
} }
@@ -376,15 +384,15 @@
} }
}) })
}, },
goPoinBuy(){ goPoinBuy() {
if(this.realPrice > this.userMes.peanutCoin){ if (this.realPrice > this.userMes.peanutCoin) {
uni.showToast({ uni.showToast({
title:'天医币不足,请充值', title: '天医币不足,请充值',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
return return
}else{ } else {
this.goBuyJie() this.goBuyJie()
} }
}, },
@@ -408,7 +416,8 @@
this.allPrice() this.allPrice()
// '&products=' + proId + //商品id // '&products=' + proId + //商品id
this.$http 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 => { .then(res => {
this.youhuiList = res.userCoupons this.youhuiList = res.userCoupons
}); });
@@ -426,9 +435,9 @@
prodCont.image = res.shopProduct.productImages prodCont.image = res.shopProduct.productImages
prodCont.productName = res.shopProduct.productName prodCont.productName = res.shopProduct.productName
prodCont.productAmount = 1 prodCont.productAmount = 1
if(res.shopProduct.activityPrice && res.shopProduct.activityPrice > 0){ if (res.shopProduct.activityPrice && res.shopProduct.activityPrice > 0) {
prodCont.price = res.shopProduct.activityPrice prodCont.price = res.shopProduct.activityPrice
}else{ } else {
prodCont.price = res.shopProduct.price prodCont.price = res.shopProduct.price
} }
prodCont.weight = res.shopProduct.weight prodCont.weight = res.shopProduct.weight
@@ -456,12 +465,15 @@
}) })
}, },
// 获取运费 // 获取运费
getYunFei(){ getYunFei() {
let key = [] let key = []
let dataToString = '' let dataToString = ''
// console.log(this.adressMoRen, '默认地址') // console.log(this.adressMoRen, '默认地址')
this.cartList.forEach((item, index) => { this.cartList.forEach((item, index) => {
key.push({productId: item.productId, quantity:item.productAmount}) key.push({
productId: item.productId,
quantity: item.productAmount
})
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&") // dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
}) })
// console.log(key,'this.adressMoRen.areaidpath') // console.log(key,'this.adressMoRen.areaidpath')
@@ -471,18 +483,18 @@
url: "book/buyOrder/calculateTransportPrice", url: "book/buyOrder/calculateTransportPrice",
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString, // url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data:{ data: {
'regionCode':this.adressMoRen.regionCode, 'regionCode': this.adressMoRen.regionCode,
'products':key, 'products': key,
loadAnimate:'none', // 请求加载动画 loadAnimate: 'none', // 请求加载动画
} , },
header: { //默认 无 说明:请求头 header: { //默认 无 说明:请求头
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.farePrice = res.result this.farePrice = res.result
console.log('需要的运费',res.result) console.log('需要的运费', res.result)
this.allPrice() this.allPrice()
} }
@@ -494,9 +506,9 @@
let allprice = 0; let allprice = 0;
this.cartList.forEach((item, index) => { this.cartList.forEach((item, index) => {
let price = 0; let price = 0;
if(item.activityPrice && item.activityPrice > 0){ if (item.activityPrice && item.activityPrice > 0) {
price = item.productAmount * item.activityPrice; price = item.productAmount * item.activityPrice;
}else{ } else {
price = item.productAmount * item.price; price = item.productAmount * item.price;
} }
allprice += price allprice += price
@@ -510,9 +522,9 @@
this.realPrice = this.realPrice + this.farePrice this.realPrice = this.realPrice + this.farePrice
}, },
// 超出阈值时 // 超出阈值时
overlimit(){ overlimit() {
uni.showToast({ uni.showToast({
title:'超出商品数量', title: '超出商品数量',
icon: 'error', icon: 'error',
duration: 1000 duration: 1000
}) })
@@ -523,7 +535,7 @@
productItem = item productItem = item
productItem.productAmount = e.value productItem.productAmount = e.value
this.updateCart(productItem) this.updateCart(productItem)
this.$nextTick(()=>{ this.$nextTick(() => {
this.getYunFei() this.getYunFei()
this.getCourpe() this.getCourpe()
}) })
@@ -531,7 +543,7 @@
}, },
// 更新购物车 // 更新购物车
updateCart(shagnpin){ updateCart(shagnpin) {
// 已在购物车中添加 // 已在购物车中添加
$http.request({ $http.request({
url: "book/ordercart/update", url: "book/ordercart/update",
@@ -574,7 +586,7 @@
}, },
// 提交结算 // 提交结算
goBuyJie() { goBuyJie() {
if(this.addressList.length == 0) { if (this.addressList.length == 0) {
this.dizhiShow = true // 如果没有地址信息 this.dizhiShow = true // 如果没有地址信息
} }
if (!this.nowClick) { if (!this.nowClick) {
@@ -623,7 +635,7 @@
orderStatus: 0, //订单状态 orderStatus: 0, //订单状态
productList: xiaBiao, //订单列表商品 productList: xiaBiao, //订单列表商品
orderType: "order", //订单类型 orderType: "order", //订单类型
addressId:this.adressMoRen.id // 地址ID addressId: this.adressMoRen.id // 地址ID
} }
$http.request({ $http.request({
// url: "book/buyOrder/buySave", // url: "book/buyOrder/buySave",
@@ -642,7 +654,7 @@
image: '../../static/icon/ic_close.png' image: '../../static/icon/ic_close.png'
}); });
} else { } else {
if(this.payType == 2){ if (this.payType == 2) {
// 常规支付 // 常规支付
uni.showToast({ uni.showToast({
title: "正在支付", title: "正在支付",
@@ -682,14 +694,14 @@
// }, 1000) // }, 1000)
} }
}) })
}else if(this.payType == 1){ } else if (this.payType == 1) {
// 微信支付 // 微信支付
let data1 = { let data1 = {
orderSn:res.orderSn, orderSn: res.orderSn,
buyOrderId: null, buyOrderId: null,
totalAmount: res.money totalAmount: res.money
} }
setWXPay(data1,res => { setWXPay(data1, res => {
if (res.success) { if (res.success) {
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功"
@@ -701,13 +713,13 @@
}, 1000) }, 1000)
} else { } else {
console.log(res) console.log(res)
if(res.data.errMsg.indexOf('User canceled') != -1){ if (res.data.errMsg.indexOf('User canceled') != -1) {
uni.showToast({ uni.showToast({
title: "用户取消支付", title: "用户取消支付",
icon: "none", icon: "none",
image: '../../static/icon/ic_close.png' image: '../../static/icon/ic_close.png'
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title: "支付失败", title: "支付失败",
icon: "none", icon: "none",
@@ -716,7 +728,7 @@
} }
} }
}) })
}else if(this.payType == 4){ } else if (this.payType == 4) {
// 天医币支付 // 天医币支付
uni.showToast({ uni.showToast({
title: "购买成功", title: "购买成功",
@@ -884,6 +896,11 @@
float: right; float: right;
} }
} }
.yq_beizhu {
color: #aaa;
font-size: 24rpx;
}
} }
.youhui_quan>view { .youhui_quan>view {
@@ -899,7 +916,8 @@
padding: 30rpx 40rpx 0 40rpx; padding: 30rpx 40rpx 0 40rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
padding-bottom:90rpx; padding-bottom: 90rpx;
.zhif_radio { .zhif_radio {
.zhif_xuanx { .zhif_xuanx {
@@ -1067,6 +1085,7 @@
border-color: #fd6004; border-color: #fd6004;
} }
} }
.chongBtn { .chongBtn {
background-color: #54a966; background-color: #54a966;
color: #fff !important; color: #fff !important;

View File

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

View File

@@ -1,5 +1,6 @@
<template> <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> <z-nav-bar title="读书打卡"></z-nav-bar>
<!-- 仿钉钉打卡日历组件 --> <!-- 仿钉钉打卡日历组件 -->
<view class="" <view class=""
@@ -17,7 +18,7 @@
<text>返回今天</text> <text>返回今天</text>
</view> </view>
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> --> <!-- <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> <text style="font-size: 24rpx;">补卡</text>
</view> </view>
<view class="dakaBtn" @tap="kuickSign()" <view class="dakaBtn" @tap="kuickSign()"
@@ -254,7 +255,8 @@
</view> </view>
</u-popup> </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" <button style="height: 70rpx; font-size: 28rpx; line-height: 70rpx;" type="primary" plain="true"
@click="addTextShow = true">说点什么</button> @click="addTextShow = true">说点什么</button>
</view> </view>
@@ -281,7 +283,7 @@
export default { export default {
data() { data() {
return { return {
isAndorid:true, isAndorid: true,
opPinglun: {}, // 针对的评论对象 opPinglun: {}, // 针对的评论对象
pinglunShow: false, pinglunShow: false,
placeholder: '开始输入...', placeholder: '开始输入...',
@@ -376,21 +378,22 @@
}, },
methods: { methods: {
// 获得操作系统 // 获得操作系统
getOS(){ getOS() {
let oprateOs = '' let oprateOs = ''
oprateOs = uni.getSystemInfoSync().platform oprateOs = uni.getSystemInfoSync().platform
// console.log(oprateOs) // console.log(oprateOs)
if(oprateOs == 'android'){ if (oprateOs == 'android') {
this.isAndorid = true this.isAndorid = true
}else{ } else {
this.isAndorid = false this.isAndorid = false
} }
}, },
haveSelected(data){ haveSelected(data) {
let image = '' let image = ''
this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image = 'static/fengziIcon.jpg' this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image =
console.log(data,' 选择的是') 'static/fengziIcon.jpg'
if(data.index == 0){ console.log(data, ' 选择的是')
if (data.index == 0) {
// 分享到好友 // 分享到好友
uni.share({ uni.share({
provider: "weixin", provider: "weixin",
@@ -400,14 +403,14 @@
title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`, title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
summary: `${this.taskInfo.content}`, summary: `${this.taskInfo.content}`,
imageUrl: image, imageUrl: image,
success: function (res) { success: function(res) {
console.log("success:" + JSON.stringify(res)); console.log("success:" + JSON.stringify(res));
}, },
fail: function (err) { fail: function(err) {
console.log("fail:" + JSON.stringify(err)); console.log("fail:" + JSON.stringify(err));
} }
}); });
}else if(data.index == 1){ } else if (data.index == 1) {
// 分享到朋友圈 // 分享到朋友圈
uni.share({ uni.share({
provider: "weixin", provider: "weixin",
@@ -417,17 +420,17 @@
title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`, title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
summary: `${this.taskInfo.content}`, summary: `${this.taskInfo.content}`,
imageUrl: image, imageUrl: image,
success: function (res) { success: function(res) {
console.log("success:" + JSON.stringify(res)); console.log("success:" + JSON.stringify(res));
}, },
fail: function (err) { fail: function(err) {
console.log("fail:" + JSON.stringify(err)); console.log("fail:" + JSON.stringify(err));
} }
}); });
} }
}, },
// 新写分享 // 新写分享
newOnShare(){ newOnShare() {
this.$refs.share.open() this.$refs.share.open()
}, },
showPingLun(item) { showPingLun(item) {
@@ -678,16 +681,16 @@
uni.hideLoading() uni.hideLoading()
}) })
}, },
gotoBuy(){ gotoBuy() {
let that = this let that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '购买本书后方可参与打卡', content: '购买本书后方可参与打卡',
confirmText:'立即购买', confirmText: '立即购买',
cancelText:'知道了', cancelText: '知道了',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log(that.bookInfo,'that.bookInfo'); console.log(that.bookInfo, 'that.bookInfo');
uni.navigateTo({ uni.navigateTo({
url: '../bookShop/commodityDetail?id=' + that.bookInfo.productId url: '../bookShop/commodityDetail?id=' + that.bookInfo.productId
}); });
@@ -698,10 +701,12 @@
// 补卡 // 补卡
buSign(day) { buSign(day) {
console.log('正在补卡', this.taskInfo, day) console.log('正在补卡', this.taskInfo, day)
if(!this.bookInfo.isBuy){ if (this.bookInfo.bookType == 0) {
if (!this.bookInfo.isBuy) {
this.gotoBuy() this.gotoBuy()
return return
} }
}
let param = { let param = {
'bookId': this.bookid, 'bookId': this.bookid,
'userId': this.userInfo.id, 'userId': this.userInfo.id,
@@ -724,16 +729,24 @@
// this.getAllSign(this.taskInfo) // this.getAllSign(this.taskInfo)
}, 2000) }, 2000)
}else{
uni.showToast({
icon:'none',
title: res.msg
})
} }
}); });
}, },
// 快捷签到 // 快捷签到
kuickSign() { kuickSign() {
if(!this.bookInfo.isBuy){ if (this.bookInfo.bookType == 0) {
if (!this.bookInfo.isBuy) {
this.gotoBuy() this.gotoBuy()
return return
} }
}
if (this.taskInfo != null && !this.taskInfo.id) { if (this.taskInfo != null && !this.taskInfo.id) {
uni.showToast({ uni.showToast({
@@ -1004,9 +1017,18 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.share{font-size: 28rpx; float: right; padding-bottom:20rpx ; .share {
.per_mes_img{width: 40rpx; height: 40rpx; margin-left: 10rpx;} font-size: 28rpx;
float: right;
padding-bottom: 20rpx;
.per_mes_img {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
} }
}
.pingjiaBox { .pingjiaBox {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }

View File

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

View File

@@ -31,16 +31,21 @@
</span> </span>
</view> </view>
<view class="btns flexbox" style="margin-top:10rpx;"> <view class="btns flexbox" style="margin-top:10rpx;">
<span class="left" style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span> <span class="left"
style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span>
<span class="right flexbox opbtns"> <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-if="item.ilike" src="../../static/icon/gz2.png"
<image class="gzicon" v-else src="../../static/icon/gz.png" mode="aspectFill" @click.stop="clickLike(item)"></image> 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> <view style="color: #C0C4CC;">{{item.contlike}}</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> <view style="color: #C0C4CC;">{{item.commentNum}}</view>
</span> </span>
</view> </view>
<view style="border-bottom:2rpx solid #e9e9e9;height:50rpx;" v-if="index<item.length-1"></view> <view style="border-bottom:2rpx solid #e9e9e9;height:50rpx;" v-if="index<item.length-1">
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -66,16 +71,21 @@
</span> </span>
</view> </view>
<view class="btns flexbox" style="margin-top:10rpx;"> <view class="btns flexbox" style="margin-top:10rpx;">
<span class="left" style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span> <span class="left"
style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span>
<span class="right flexbox opbtns"> <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-if="item.ilike" src="../../static/icon/gz2.png"
<image class="gzicon" v-else src="../../static/icon/gz.png" mode="aspectFill" @click.stop="clickLike(item)"></image> 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> <view style="color: #C0C4CC;">{{item.contlike}}</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> <view style="color: #C0C4CC;">{{item.commentNum}}</view>
</span> </span>
</view> </view>
<view style="border-bottom:2rpx solid #e9e9e9;height:50rpx;" v-if="index<item.length-1"></view> <view style="border-bottom:2rpx solid #e9e9e9;height:50rpx;" v-if="index<item.length-1">
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -103,9 +113,11 @@
<view class="title">{{item.name}}</view> <view class="title">{{item.name}}</view>
<view class="pianshuping">{{item.forumNum}}篇书评</view> <view class="pianshuping">{{item.forumNum}}篇书评</view>
</view> </view>
<image class="feng" v-if="item.images" :src="item.images" mode="aspectFill" @click.stop="toMore(item)"></image> <image class="feng" v-if="item.images" :src="item.images" mode="aspectFill"
@click.stop="toMore(item)"></image>
<view class="shupingList"> <view class="shupingList">
<view class="description" v-for="(item1,index1) in item.forums" :key="index1" @click.stop="toDetail1(item1)">{{item1.title}}</view> <view class="description" v-for="(item1,index1) in item.forums" :key="index1"
@click.stop="toDetail1(item1)">{{item1.title}}</view>
</view> </view>
<view class="btns flexbox" @click.stop="toMore(item)"> <view class="btns flexbox" @click.stop="toMore(item)">
<span class="left"></span> <span class="left"></span>
@@ -138,9 +150,12 @@
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import emotion from '@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue'; import emotion from '@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue';
import musicPlay from '@/components/music.vue' import musicPlay from '@/components/music.vue'
import { data } from 'jquery';
import { import {
mapState, mapMutations data
} from 'jquery';
import {
mapState,
mapMutations
} from 'vuex'; } from 'vuex';
import { import {
checkBookRight checkBookRight
@@ -149,32 +164,32 @@ import { data } from 'jquery';
data() { data() {
return { return {
// loadingNow : false, // loadingNow : false,
playData:{}, playData: {},
emojiIcon:'cuIcon-emoji', emojiIcon: 'cuIcon-emoji',
windowWidth:0, windowWidth: 0,
bookid:null, bookid: null,
booklistpage: 1, booklistpage: 1,
productList:[], productList: [],
productInfo:{}, productInfo: {},
pingjiaShow:false, //添加评价 pingjiaShow: false, //添加评价
Pform:{ // 评价表单 Pform: { // 评价表单
star:0, star: 0,
comment:'', comment: '',
img:[], img: [],
html:'' html: ''
}, },
emoji:[], emoji: [],
Files:[], Files: [],
page:1, page: 1,
pageSize:10, pageSize: 10,
total:0, // 资源的总页数1 total: 0, // 资源的总页数1
status:3, status: 3,
shupingList:[], shupingList: [],
bfaid:null, bfaid: null,
commentsTabs: [ { commentsTabs: [{
name: '书集', name: '书集',
value: 3 value: 3
},{ }, {
name: '最新', name: '最新',
value: 1 value: 1
}, { }, {
@@ -185,9 +200,9 @@ import { data } from 'jquery';
newestpage: 1, newestpage: 1,
hotestpage: 1, hotestpage: 1,
booksetpage: 1, booksetpage: 1,
newList:[], newList: [],
hotList:[], hotList: [],
bookList:[], bookList: [],
contentShow: 1, contentShow: 1,
} }
@@ -207,23 +222,24 @@ import { data } from 'jquery';
}, },
onReachBottom() { onReachBottom() {
if(this.newestpage + 1 <= this.total || this.hotestpage +1 <= this.total || this.booksetpage + 1 <= this.total){ if (this.newestpage + 1 <= this.total || this.hotestpage + 1 <= this.total || this.booksetpage + 1 <= this
.total) {
this.newestpage++ this.newestpage++
this.hotestpage++ this.hotestpage++
this.booksetpage++ this.booksetpage++
this.getBookList(this.commentsListTab, false) this.getBookList(this.commentsListTab, false)
}else{ } else {
this.status = 1 this.status = 1
} }
}, },
onLoad(e) { onLoad(e) {
this.windowWidth = uni.getSystemInfoSync().windowWidth; this.windowWidth = uni.getSystemInfoSync().windowWidth;
console.log(e,'onload') console.log(e, 'onload')
// this.bookid = e.bookid // this.bookid = e.bookid
this.getBookList(3, false) this.getBookList(3, false)
}, },
computed:{ computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
}, },
methods: { methods: {
@@ -274,107 +290,109 @@ import { data } from 'jquery';
this.getBookList(this.commentsListTab, false) this.getBookList(this.commentsListTab, false)
}, },
// 查看本书更多书评 // 查看本书更多书评
toMore(val){ toMore(val) {
// console.log(val,'val') // console.log(val,'val')
let data = { let data = {
'userId': this.userInfo.id, 'userId': this.userInfo.id,
'bookId': val.id 'bookId': val.id
} }
checkBookRight(data,res=>{ checkBookRight(data, res => {
console.log(res) console.log(res)
if(res.success){ if (res.success) {
uni.navigateTo({ uni.navigateTo({
url: '../comments/comments?bookid='+val.id, url: '../comments/comments?bookid=' + val.id,
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title:'购买本书后方可查看此内容!', title: '购买本书后方可查看此内容!',
icon:'none' icon: 'none'
}) })
} }
}) })
}, },
// 书评详情 // 书评详情
toDetail(val){ toDetail(val) {
// console.log(val,'val') // console.log(val,'val')
uni.navigateTo({ uni.navigateTo({
url:'../comments/commentsDetail?bookid='+val.bookid+'&bfa_id='+val.id url: '../comments/commentsDetail?bookid=' + val.bookid + '&bfa_id=' + val.id
}) })
}, },
// 判断健全 // 判断健全
toDetail1(val){ toDetail1(val) {
// console.log(val,'val') // console.log(val,'val')
let data = { let data = {
'userId': this.userInfo.id, 'userId': this.userInfo.id,
'bookId': val.bookid 'bookId': val.bookid
} }
checkBookRight(data,res=>{ checkBookRight(data, res => {
console.log(res) console.log(res)
if(res.success){ if (res.success) {
uni.navigateTo({ uni.navigateTo({
url:'../comments/commentsDetail?bookid='+val.bookid+'&bfa_id='+val.id url: '../comments/commentsDetail?bookid=' + val.bookid + '&bfa_id=' + val.id
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title:'购买本书后方可查看此内容!', title: '购买本书后方可查看此内容!',
icon:'none' icon: 'none'
}) })
} }
}) })
}, },
clickLike(item){ clickLike(item) {
this.$http this.$http
.post("forum/articles/chickForumContlike?forum_id=" + item.id,) .post("forum/articles/chickForumContlike?forum_id=" + item.id, )
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
uni.showToast({ uni.showToast({
title:'点赞成功!', title: '点赞成功!',
icon:'success' icon: 'success'
}) })
item.contlike++ item.contlike++
} }
}).catch((e)=>{ }).catch((e) => {
console.log(e,'e') console.log(e, 'e')
}) })
}, },
getBookList(flag, tushuflag){ getBookList(flag, tushuflag) {
// 根据tab不同获取最新书评、最热书评、书集列表 // 根据tab不同获取最新书评、最热书评、书集列表
// uni.showLoading({ // uni.showLoading({
// title: '加载中' // title: '加载中'
// }); // });
var httpurl = "" var httpurl = ""
if(flag == 1){ if (flag == 1) {
httpurl = "forum/articles/getForumsNew?page=" + this.newestpage + '&limit=10' httpurl = "forum/articles/getForumsNew?page=" + this.newestpage + '&limit=10'
}else if(flag == 2){ } else if (flag == 2) {
httpurl = "forum/articles/getForumsHot?page=" + this.hotestpage + '&limit=10' httpurl = "forum/articles/getForumsHot?page=" + this.hotestpage + '&limit=10'
}else{ } else {
if(tushuflag){ // 点击切换已购和推荐 if (tushuflag) { // 点击切换已购和推荐
this.booksetpage = 1 this.booksetpage = 1
this.bookList = [] this.bookList = []
} }
if(this.contentShow == 1){ if (this.contentShow == 1) {
httpurl = "forum/articles/getHasForumsAndBook?page=" + this.booksetpage + '&limit=10&userId=' + this.userInfo.id httpurl = "forum/articles/getHasForumsAndBook?page=" + this.booksetpage + '&limit=10&userId=' +
this.userInfo.id
} else { } else {
httpurl = "forum/articles/getBestForumsAndBook?page=" + this.booksetpage + '&limit=10&userId=' + this.userInfo.id httpurl = "forum/articles/getBestForumsAndBook?page=" + this.booksetpage + '&limit=10&userId=' +
this.userInfo.id
} }
} }
this.$http this.$http
.post(httpurl) .post(httpurl)
.then(res => { .then(res => {
if(flag == 1){ if (flag == 1) {
this.newList = this.newList.concat(res.page.records) this.newList = this.newList.concat(res.page.records)
}else if(flag == 2){ } else if (flag == 2) {
this.hotList = this.hotList.concat(res.page.records) this.hotList = this.hotList.concat(res.page.records)
}else{ } else {
this.bookList = this.bookList.concat(res.page.records) this.bookList = this.bookList.concat(res.page.records)
} }
this.total = res.page.pages this.total = res.page.pages
console.log(this.newList,'this.newList') console.log(this.newList, 'this.newList')
// let list = res.page.records // let list = res.page.records
// console.log(list,'list') // console.log(list,'list')
// for(let i=0; i < list.length; i++){ // for(let i=0; i < list.length; i++){
@@ -405,23 +423,23 @@ import { data } from 'jquery';
this.status = 0 this.status = 0
// } // }
// uni.hideLoading(); // uni.hideLoading();
}).catch((e)=>{ }).catch((e) => {
console.log(e,'e') console.log(e, 'e')
}) })
}, },
// 显示评论 // 显示评论
pinglun(val){ pinglun(val) {
this.bfaid = val this.bfaid = val
this.pingjiaShow = true this.pingjiaShow = true
}, },
// 提交评论 // 提交评论
submitPJ(){ submitPJ() {
if(this.Pform.comment != ''){ if (this.Pform.comment != '') {
let data={ let data = {
'content':this.Pform.comment, 'content': this.Pform.comment,
'userid':this.userInfo.id, 'userid': this.userInfo.id,
'bookid':this.bookid, 'bookid': this.bookid,
'bfaid': this.bfaid 'bfaid': this.bfaid
} }
// console.log(data,'data') // console.log(data,'data')
@@ -435,8 +453,8 @@ import { data } from 'jquery';
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
uni.showToast({ uni.showToast({
title:'评论成功!', title: '评论成功!',
icon:'success' icon: 'success'
}) })
this.pingjiaShow = false this.pingjiaShow = false
@@ -444,15 +462,15 @@ import { data } from 'jquery';
this.pinglunId = null this.pinglunId = null
} }
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title:'请先输入您的评价内容 ', title: '请先输入您的评价内容 ',
icon:'none' icon: 'none'
}) })
} }
}, },
}, },
components:{ components: {
musicPlay, musicPlay,
emotion emotion
} }
@@ -460,8 +478,8 @@ import { data } from 'jquery';
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// @import '@/style/mixin.scss'; // @import '@/style/mixin.scss';
.orderTabs { .orderTabs {
// margin: 70rpx 0 0 0; // margin: 70rpx 0 0 0;
width: 100%; width: 100%;
// padding: 0 3% 3% 3%; // padding: 0 3% 3% 3%;
@@ -474,7 +492,7 @@ import { data } from 'jquery';
display: inline-block; display: inline-block;
padding: 20rpx 0 20rpx 0; padding: 20rpx 0 20rpx 0;
// margin: 40rpx 0 15rpx 0; // margin: 40rpx 0 15rpx 0;
width:230rpx; width: 230rpx;
text-align: center; text-align: center;
font-size: 30rpx; font-size: 30rpx;
} }
@@ -484,19 +502,49 @@ import { data } from 'jquery';
// color: #54a966; // color: #54a966;
font-weight: bold; font-weight: bold;
} }
} }
.flexbox{display: flex;} .flexbox {
.container{padding: 0 10px;} display: flex;
.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;} .container {
padding: 0 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 { .cuIcon-emoji {
background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block; margin-right: 20rpx; background: url(../../static/biaoqing.png) no-repeat;
width: 30px; } background-size: contain;
.cuIcon-keyboard{background : url(../../static/biaoqing.png) no-repeat; background-size: contain; display: block; display: block;
width: 30px; } margin-right: 20rpx;
width: 30px;
}
.cuIcon-keyboard {
background: url(../../static/biaoqing.png) no-repeat;
background-size: contain;
display: block;
width: 30px;
}
.tanchu { .tanchu {
padding: 40rpx 30rpx 40rpx 30rpx; padding: 40rpx 30rpx 40rpx 30rpx;
position: relative; position: relative;
@@ -524,15 +572,29 @@ import { data } from 'jquery';
display: inline-block; display: inline-block;
margin-right: 5rpx; margin-right: 5rpx;
} }
}} }
}
.quesheng{text-align: center; margin-top: 100rpx; color: #8b8a91; padding-bottom: 20rpx; padding-top: 20rpx;} .quesheng {
.gengduoshuping{text-align: right; color: #0044ff; padding-bottom: 20rpx; padding-top: 20rpx;} text-align: center;
.bookInfo{ margin-top: 100rpx;
color: #8b8a91;
padding-bottom: 20rpx;
padding-top: 20rpx;
}
.gengduoshuping {
text-align: right;
color: #0044ff;
padding-bottom: 20rpx;
padding-top: 20rpx;
}
.bookInfo {
justify-content: space-between; justify-content: space-between;
// margin-bottom: 15px; // margin-bottom: 15px;
background-color: #fff; background-color: #fff;
padding:20rpx; padding: 20rpx;
border: 1px splid #999; border: 1px splid #999;
box-sizing: border-box; box-sizing: border-box;
// padding-bottom: 20rpx; // padding-bottom: 20rpx;
@@ -564,9 +626,11 @@ import { data } from 'jquery';
// .bookinfoimage{width: 150px !important; } // .bookinfoimage{width: 150px !important; }
} }
.mainContent{
.mainContent {
background-color: #fff; background-color: #fff;
.item{
.item {
// padding: 10px; // padding: 10px;
// margin-bottom: 30rpx; // margin-bottom: 30rpx;
// border: 1px solid #999; // border: 1px solid #999;
@@ -575,16 +639,24 @@ import { data } from 'jquery';
border-radius: 20rpx; border-radius: 20rpx;
// margin-bottom: 20rpx; // margin-bottom: 20rpx;
} }
.feng{
margin:10rpx 20rpx 0 0; .feng {
margin: 10rpx 20rpx 0 0;
height: 160rpx; height: 160rpx;
width: 140rpx; width: 140rpx;
float:left; float: left;
border-radius: 20rpx; border-radius: 20rpx;
border:1rpx solid #e9e9e9; border: 1rpx solid #e9e9e9;
} }
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
/deep/.description{ .title {
font-size: 30rpx;
font-weight: 700;
color: #000;
overflow: hidden;
}
/deep/.description {
overflow: hidden; overflow: hidden;
color: #666; color: #666;
text-overflow: -o-ellipsis-lastline; text-overflow: -o-ellipsis-lastline;
@@ -596,54 +668,69 @@ import { data } from 'jquery';
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 26rpx; font-size: 26rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
margin-top:10rpx; margin-top: 10rpx;
height: 172rpx; line-height: 34rpx;
img{ height: calc(5 * 34rpx);
img {
width: 100% !important; width: 100% !important;
} }
} }
.btns{
.btns {
font-size: 22rpx; font-size: 22rpx;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.left{
.left {
width: 300rpx; width: 300rpx;
color: #a1a1a1; color: #a1a1a1;
} }
.right{
.right {
width: 300rpx; width: 300rpx;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
.gzicon{
margin:0 0 0 20rpx; .gzicon {
margin: 0 0 0 20rpx;
height: 40rpx; height: 40rpx;
width: 40rpx; width: 40rpx;
// float:left; // float:left;
// border-radius: 20rpx; // border-radius: 20rpx;
// border:1rpx solid #e9e9e9; // border:1rpx solid #e9e9e9;
} }
.opbtns{
.pingjia{margin-left: 10px;}
}
}
}
.mb30{margin-bottom: 30rpx; overflow: hidden;}
.bookInfo3{ .opbtns {
.pingjia {
margin-left: 10px;
}
}
}
}
.mb30 {
margin-bottom: 30rpx;
overflow: hidden;
}
.bookInfo3 {
justify-content: space-between; justify-content: space-between;
// margin-bottom: 15px; // margin-bottom: 15px;
background-color: #fff; background-color: #fff;
padding:20rpx; padding: 20rpx;
border: 1px splid #999; border: 1px splid #999;
box-sizing: border-box; box-sizing: border-box;
// padding-bottom: 20rpx; // padding-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.mainContent3{
.mainContent3 {
background-color: #fff; background-color: #fff;
.item{
.item {
// padding: 10px; // padding: 10px;
// margin-bottom: 30rpx; // margin-bottom: 30rpx;
// border: 1px solid #999; // border: 1px solid #999;
@@ -652,23 +739,33 @@ import { data } from 'jquery';
border-radius: 20rpx; border-radius: 20rpx;
// margin-bottom: 20rpx; // margin-bottom: 20rpx;
} }
.feng{
margin:10rpx 20rpx 0 0; .feng {
margin: 10rpx 20rpx 0 0;
height: 240rpx; height: 240rpx;
width: 164rpx; width: 164rpx;
float:left; float: left;
border-radius: 20rpx; border-radius: 20rpx;
border:1rpx solid #e9e9e9; border: 1rpx solid #e9e9e9;
} }
.title{font-size: 30rpx; font-weight: 700; color: #000; overflow: hidden;}
.pianshuping{ .title {
font-size: 30rpx;
font-weight: 700;
color: #000;
overflow: hidden;
}
.pianshuping {
font-size: 24rpx; font-size: 24rpx;
color: red; color: red;
} }
.shupingList{
.shupingList {
min-height: 212rpx; min-height: 212rpx;
} }
/deep/.description{
/deep/.description {
overflow: hidden; overflow: hidden;
color: #666; color: #666;
text-overflow: -o-ellipsis-lastline; text-overflow: -o-ellipsis-lastline;
@@ -680,35 +777,43 @@ import { data } from 'jquery';
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 26rpx; font-size: 26rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
margin-top:10rpx; margin-top: 10rpx;
img{
img {
width: 100% !important; width: 100% !important;
} }
} }
.btns{
.btns {
font-size: 22rpx; font-size: 22rpx;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.left{
.left {
width: 300rpx; width: 300rpx;
color: #a1a1a1; color: #a1a1a1;
} }
.right{
.right {
width: 300rpx; width: 300rpx;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
.gzicon{
margin:0 0 0 20rpx; .gzicon {
margin: 0 0 0 20rpx;
height: 40rpx; height: 40rpx;
width: 40rpx; width: 40rpx;
// float:left; // float:left;
// border-radius: 20rpx; // border-radius: 20rpx;
// border:1rpx solid #e9e9e9; // border:1rpx solid #e9e9e9;
} }
.opbtns{
.pingjia{margin-left: 10px;} .opbtns {
.pingjia {
margin-left: 10px;
}
} }
} }
} }

View File

@@ -10,15 +10,16 @@
<view style="font-weight: bold;margin-bottom: 30rpx;"> <view style="font-weight: bold;margin-bottom: 30rpx;">
{{bookMessage.name}} {{bookMessage.name}}
</view> </view>
<view v-if="bookMessage.bookType==0&&bookMessage.author" style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;"> <view v-if="bookMessage.bookType==0&&bookMessage.author"
<p @click="onAuCHJump(bookMessage.author.id,1)" style="margin-bottom: 20rpx;"> 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}} [] > {{bookMessage.author.authorName}} [] >
</p> </p> -->
<!-- <p @click="onAuCHJump(item.id,2)" v-for="item in this.bookMessage.publisherNIList"> <!-- <p @click="onAuCHJump(item.id,2)" v-for="item in this.bookMessage.publisherNIList">
{{item.title}} > {{item.title}} >
</p> --> </p> -->
</view> </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 class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>
<uni-tag @click="gotoListen()" class="tag" v-if="bookMessage.canListen" :inverted="true" text="听书" <uni-tag @click="gotoListen()" class="tag" v-if="bookMessage.canListen" :inverted="true" text="听书"
type="primary"></uni-tag> type="primary"></uni-tag>
@@ -57,6 +58,7 @@
</text> </text>
</view> </view>
<u-divider v-else text="暂无简介信息"></u-divider> <u-divider v-else text="暂无简介信息"></u-divider>
<view v-if="iosHide">
<view class="head_line" style="margin-bottom:30rpx;"> <view class="head_line" style="margin-bottom:30rpx;">
<b></b> <b></b>
<text>精彩试听</text> <text>精彩试听</text>
@@ -99,6 +101,7 @@
</view> </view>
<u-divider v-else text="暂无书评数据"></u-divider> <u-divider v-else text="暂无书评数据"></u-divider>
</view> </view>
</view>
<view> <view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' <u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle'
:iconStyle="iconStyle"></u-back-top> :iconStyle="iconStyle"></u-back-top>
@@ -248,16 +251,16 @@
'userId': this.userInfo.id, 'userId': this.userInfo.id,
'bookId': this.bookId 'bookId': this.bookId
} }
checkBookRight(data,res=>{ checkBookRight(data, res => {
console.log(res) console.log(res)
if(res.success){ if (res.success) {
uni.navigateTo({ uni.navigateTo({
url: '../talkBook/talkBookML?bookid=' + this.bookId url: '../talkBook/talkBookML?bookid=' + this.bookId
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title:'购买本书后方可查看此内容!', title: '购买本书后方可查看此内容!',
icon:'none' icon: 'none'
}) })
} }
}) })
@@ -275,14 +278,14 @@
'userId': this.userInfo.id, 'userId': this.userInfo.id,
'bookId': this.bookId 'bookId': this.bookId
} }
checkBookRight(data,res=>{ checkBookRight(data, res => {
console.log(res) console.log(res)
if(res.success){ if (res.success) {
this.onPageJump('../clock/clock?bookid=' + this.bookId) this.onPageJump('../clock/clock?bookid=' + this.bookId)
}else{ } else {
uni.showToast({ uni.showToast({
title:'购买本书后方可参与打卡!', title: '购买本书后方可参与打卡!',
icon:'none' icon: 'none'
}) })
} }
}) })
@@ -296,16 +299,16 @@
'bookId': this.bookId 'bookId': this.bookId
} }
checkBookRight(data,res=>{ checkBookRight(data, res => {
console.log(res) console.log(res)
if(res.success){ if (res.success) {
uni.navigateTo({ uni.navigateTo({
url: '../comments/comments?bookid=' + this.bookId, url: '../comments/comments?bookid=' + this.bookId,
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title:'购买本书后方可查看此内容!', title: '购买本书后方可查看此内容!',
icon:'none' icon: 'none'
}) })
} }
}) })

View File

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

View File

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

View File

@@ -25,12 +25,12 @@
{{bookInfo.name}} {{bookInfo.name}}
</view> </view>
<view style="color: #9b9b9b;font-size: 28rpx;margin:20rpx 0 0 0;max-width: 400rpx;line-height: 38rpx;"> <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}} [] > {{bookInfo.author.authorName}} [] >
</p> </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}} > {{item.title}} >
</p> </p> -->
</view> </view>
<view class="tags"> <view class="tags">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag> <uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>

View File

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

View File

@@ -60,15 +60,15 @@
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '微信号yilujiankangkefu', content: '微信号yilujiankangkefu',
success: function (res) { // success: function (res) {
if (res.confirm) { // if (res.confirm) {
uni.makePhoneCall({ // uni.makePhoneCall({
phoneNumber: '022-24142321' //仅为示例 // phoneNumber: '022-24142321' //仅为示例
}); // });
} else if (res.cancel) { // } else if (res.cancel) {
} // }
} // }
}) })
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -28,31 +28,143 @@
</u-grid> </u-grid>
</view> </view>
<view class="titleList" v-if="curOneCateIndex == 1"> <view class="titleList" v-if="curOneCateIndex == 1">
<u-grid :col="1" v-if="titleList.length > 0"> <view v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)" <view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;"> style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view> <view :class="['titleItem']">{{item.name}}</view>
</u-grid-item> </view>
</u-grid> </view>
<u-divider v-else text="暂无药物数据哦~"></u-divider> <u-divider v-else text="暂无药物数据哦~"></u-divider>
</view> </view>
<view style="padding: 10rpx 20rpx 0 20rpx;font-size: 30rpx;" v-if="!curOneCateIndex == 1"> <view v-if="!curOneCateIndex == 1">
<b>大家常看的</b> <view class="grid CNCateList">
<view style="color: #55aa7f;float: right;font-weight: bold;" @click="gotoFenlei()"> <u-grid :col="2" border class="u-grid-list">
<img src="../../static/jainsuo.png" alt="" style="width: 36rpx;vertical-align: text-top;margin-right: 8rpx;"> <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> </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>
<view class="titleList" v-if="!curOneCateIndex == 1"> <view class="titleList" v-if="!curOneCateIndex == 1">
<u-grid :col="1" v-if="titleList.length > 0"> <view v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)" <view v-for="(item, index) in titleList" :key="item.id" @click="gotoCNDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;"> style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view> <view :class="['titleItem']">{{item.name}}</view>
</u-grid-item> </view>
</u-grid> </view>
<u-divider v-else text="暂无药物数据哦~"></u-divider> <u-divider v-else text="暂无药物数据哦~"></u-divider>
</view> </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>
<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> </view>
</template> </template>
@@ -117,6 +229,150 @@
titleList: [], // 药物标题 titleList: [], // 药物标题
curOneCateIndex: 0, // 当前选中的一级分类 curOneCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 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: [], // 搜索结果数组 searchList: [], // 搜索结果数组
showSearchList: false, showSearchList: false,
userMes: {}, // 用户信息 userMes: {}, // 用户信息
@@ -129,6 +385,8 @@
// onLoad() { // onLoad() {
// this.getCNYao() // this.getCNYao()
// }, // },
methods: { methods: {
setOneCateIndex(item, index) { setOneCateIndex(item, index) {
// let id = item.prescriptCategoryId // let id = item.prescriptCategoryId
@@ -141,7 +399,7 @@
this.getXiYao('抗感染类', 1) this.getXiYao('抗感染类', 1)
} else { // 中药检索 } else { // 中药检索
// this.getTowCateList(id) // this.getTowCateList(id)
this.getCNYao() // book/materials/getMaterialsList this.goNewSearch() // book/materials/getMaterialsList
} }
}, },
setTwoCateIndex(item, index) { 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({ $http.request({
url: "book/materials/getMaterialsList", url: "book/materials/getMaterialsList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: { data: {
// loadAnimate: 'none', // 请求加载动画 // loadAnimate: 'none', // 请求加载动画
"limit": 10, "limit": 20,
"current": 1, "current": this.page,
"name": "", "name": "",
"type": "", // 植物、矿物、动物 "type": "", // 植物、矿物、动物
"effect": "", //功效 "effect": this.curGongxiaoIndex.join(','), //功效
"taste": "", //味 "taste": this.curWeiIndex.join(','), //味
"property": "", //性 "property": this.curXingIndex.join(','), //性
"tropism": "" //归经 "tropism": this.curGuijingIndex.join(',') //归经
}, },
header: { //默认 无 说明:请求头 header: { //默认 无 说明:请求头
'Content-Type': 'application/json' 'Content-Type': 'application/json'
@@ -208,32 +515,52 @@
}).then(res => { }).then(res => {
console.log(res, '内容获取成功') console.log(res, '内容获取成功')
if (res.code == 0 && res.result.records.length > 0) { 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 { } else {
this.titleList = [] 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 => { }).catch(e => {
this.titleList = [] this.titleList = []
console.log(e) console.log(e)
}) })
}, },
gotoCNDetail(item) {
console.log('2222')
uni.navigateTo({ goToBottom() {
url: "./CNMedicineSearchDetail?id=" + item.id console.log(this.curOneCateIndex)
}) // this.loadingNow = true
}, if (this.curOneCateIndex != 1) {
gotoSousuo() { console.log('到底了')
uni.navigateTo({ if (this.page + 1 <= this.totalPage) {
url: "./CNMedicineText" this.page++
}) this.goToSearch()
}, } else {
gotoFenlei() { this.status = 1
uni.navigateTo({
url: "./CNMedicineSearch"
})
} }
} }
},
}
}; };
</script> </script>
@@ -246,11 +573,6 @@
} }
} }
.scroll-view_H {
background-color: #fff;
white-space: nowrap;
padding: 10rpx;
}
.contentBox { .contentBox {
.oneCateList { .oneCateList {
@@ -298,6 +620,8 @@
color: #55aa7f; color: #55aa7f;
} }
// .u-grid-list{border: 0.5px solid #dadbde;} // .u-grid-list{border: 0.5px solid #dadbde;}
} }
@@ -351,4 +675,74 @@
font-size: 28rpx; font-size: 28rpx;
line-height: 46rpx; 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> </style>

View File

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

View File

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

View File

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

View File

@@ -103,7 +103,7 @@
<button @click="onPageJump('/pages/user/register')">注册账号</button> <button @click="onPageJump('/pages/user/register')">注册账号</button>
<text v-if="type == 1000" @click="onPageJump('/pages/user/forget')">忘记密码</text> <text v-if="type == 1000" @click="onPageJump('/pages/user/forget')">忘记密码</text>
</view> --> </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_title"><text>第三方登录</text></view>
<view class="third_party_content"> <view class="third_party_content">
<image src="../../static/icon/ic_login_health.png" @click="onHealthLogin" mode="aspectFit"> <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> <z-nav-bar title="我的账户"></z-nav-bar>
<view class="ACTable"> <view class="ACTable">
<u-tabs :list="tab_list" @click="tab_click" lineColor="#54a966 100% 100%" <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 v-if="tab_muJian==0">
<view class="AC_mes"> <view class="AC_mes">
@@ -67,7 +70,8 @@
</view> </view>
</view> </view>
<view class="footer"> <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>
<view>{{item.coupons.note}}</view> <view>{{item.coupons.note}}</view>
<view class="arrow"></view> <view class="arrow"></view>
@@ -113,13 +117,16 @@
export default { export default {
data() { data() {
return { return {
playData:{}, playData: {},
platform:null, platform: null,
tab_list: [{ tab_list: [{
name: '天医币', name: '天医币',
}, { }, {
name: '优惠券', name: '优惠券',
}], }],
tab_list_ios: [{
name: '优惠券',
}],
couponTabs: [{ couponTabs: [{
name: '未使用' name: '未使用'
}, { }, {
@@ -185,7 +192,7 @@
uni.hideTabBar(); uni.hideTabBar();
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.platform = uni.getSystemInfoSync().platform this.platform = uni.getSystemInfoSync().platform
console.log('操纵系统',this.platform) console.log('操纵系统', this.platform)
// #endif // #endif
}, },
computed: { computed: {
@@ -197,21 +204,24 @@
uni.hideTabBar(); uni.hideTabBar();
this.getData(); this.getData();
this.getCourpe(); this.getCourpe();
}, },
components:{ components: {
musicPlay musicPlay
}, },
//方法 //方法
methods: { methods: {
// 获取 // 获取
getData() { getData() {
if(!this.iosHide){
this.tab_muJian=1
}
// 用户详情 // 用户详情
if (this.userInfo.id != undefined) { if (this.userInfo.id != undefined) {
this.$http this.$http
.post('book/user/info/' + this.userInfo.id) .post('book/user/info/' + this.userInfo.id)
.then(res => { .then(res => {
this.userMes = res.user this.userMes = res.user
}); });
} }

View File

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

View File

@@ -218,7 +218,7 @@
<view v-if="contentShow == 0"> <view v-if="contentShow == 0">
<view class="pingjia"> <view class="pingjia">
<!-- <h4></h4> --> <!-- <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 class="">
<view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view> <view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view>
</view> </view>

View File

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