This commit is contained in:
2024-05-17 10:14:19 +08:00
parent fd1a7705c1
commit c7189c787e
12 changed files with 1351 additions and 1170 deletions

View File

@@ -45,6 +45,8 @@
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
this.screenHeight = systemInfo.screenHeight; this.screenHeight = systemInfo.screenHeight;
this.show = true; this.show = true;
}else{
} }
}, },
methods: { methods: {

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/"; // 开发用电脑

View File

@@ -294,6 +294,7 @@ $http.dataFactory = async function(res) {
data: res.data data: res.data
}); });
} else { //其他错误提示 } else { //其他错误提示
console.log(httpData, '其他')
console.log(httpData.info || httpData.msg) console.log(httpData.info || httpData.msg)
if (res.isPrompt && res.data.loadAnimate != 'none') { if (res.isPrompt && res.data.loadAnimate != 'none') {
uni.showToast({ uni.showToast({

View File

@@ -6,12 +6,10 @@
"request": 3000 "request": 3000
}, },
"transformPx": false, "transformPx": false,
"icons" : [ "icons": [{
{
"sizes": "分辨率192x192", "sizes": "分辨率192x192",
"src": "图片路径" "src": "图片路径"
} }],
],
"versionName": "1.2.43", "versionName": "1.2.43",
"versionCode": 1243, "versionCode": 1243,
"app-plus": { "app-plus": {
@@ -29,10 +27,10 @@
}, },
"modules": { "modules": {
"Payment": {}, "Payment": {},
"OAuth" : {},
"Share": {}, "Share": {},
"Camera": {}, "Camera": {},
"VideoPlayer" : {} "VideoPlayer": {},
"OAuth": {}
}, },
"distribute": { "distribute": {
"apple": { "apple": {
@@ -99,7 +97,8 @@
"appid": "wx47134a8f15083734", "appid": "wx47134a8f15083734",
"UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/" "UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
} }
} },
"oauth": {}
}, },
"splashscreen": { "splashscreen": {
"iosStyle": "common", "iosStyle": "common",
@@ -253,4 +252,3 @@
} }
} }
// //

View File

@@ -37,6 +37,8 @@
</u-grid> </u-grid>
</view> </view>
<view class="titleList"> <view class="titleList">
<u-grid :col="3" v-if="titleList.length > 0"> <u-grid :col="3" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"> <u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)">
<view :class="['titleItem']">{{item.title}}</view> <view :class="['titleItem']">{{item.title}}</view>
@@ -110,20 +112,20 @@
}, },
// 穴位详情 // 穴位详情
gotoDetail(item) { gotoDetail(item) {
// if (this.curOneCateIndex == 0 && this.userMes.pointPower== 0) { if (this.curOneCateIndex == 0 && 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
// } }
uni.navigateTo({ uni.navigateTo({
url: "./acupointDetail?id=" + item.id url: "./acupointDetail?id=" + item.id
}) })

View File

@@ -16,8 +16,8 @@
<view class="commodityContent"> <view class="commodityContent">
<view class="commodityPrice" v-if="productInfo.activityPrice && productInfo.activityPrice > 0"> <view class="commodityPrice" v-if="productInfo.activityPrice && productInfo.activityPrice > 0">
<span style="font-size: 28rpx;"></span><em>{{ productInfo.activityPrice }}</em> <span style="font-size: 28rpx;"></span><em>{{ productInfo.activityPrice }}</em>
<span class="oldPrice ">原价<span <span class="oldPrice ">原价<span style="font-size: 20rpx;padding-left:10rpx;"></span>{{
style="font-size: 20rpx;padding-left:10rpx;"></span>{{productInfo.price}}</span> productInfo.price }}</span>
</view> </view>
<view class="commodityPrice" v-else> <view class="commodityPrice" v-else>
<span style="font-size: 28rpx;"></span><em>{{ productInfo.price }}</em> <span style="font-size: 28rpx;"></span><em>{{ productInfo.price }}</em>
@@ -25,8 +25,8 @@
<view class="commodityyName"> <view class="commodityyName">
{{ productInfo.productName }} {{ productInfo.productName }}
<span v-if="productInfo.productStock == 0" style="color: #aaa;font-size:26rpx;">无货</span> <span v-if="productInfo.productStock == 0" style="color: #aaa;font-size:26rpx;">无货</span>
<view><text class="SoldNumber">已售<span <view><text class="SoldNumber">已售<span style="padding-left:10rpx;">{{ productInfo.sumSales
style="padding-left:10rpx;">{{productInfo.sumSales}}</span></text></view> }}</span></text></view>
</view> </view>
<view class="pingjia" v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]"> <view class="pingjia" v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]">
<view class=""> <view class="">
@@ -41,8 +41,8 @@
<image :src="item.productImages" mode="aspectFit"></image> <image :src="item.productImages" mode="aspectFit"></image>
</view> </view>
<text class="username nowrap ">{{ item.productName }}</text> <text class="username nowrap ">{{ item.productName }}</text>
<text class="price" <text class="price" v-if="item.activityPrice && item.activityPrice > 0">{{
v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice}}</text> item.activityPrice }}</text>
<text class="price" v-else>{{ item.price }}</text> <text class="price" v-else>{{ item.price }}</text>
</view> </view>
</view> </view>
@@ -64,24 +64,91 @@
</view> </view>
<!-- 详情 + 评价1 --> <!-- 详情 + 评价1 -->
<view v-if="contentShow == 0"> <view v-if="contentShow == 0">
<view class="pingjia"> <view class="pingjia quanyi_box" v-if="listenList.length > 0 && listenList[0] && iosHide"
<!-- <h4></h4> --> 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 class="quanyi_title" style="">赠送权益</view>
<view style="font-weight: 700;margin-bottom: 30rpx;color:#71d5a1;">赠送听书权益</view> <!-- </view> -->
</view> <view class="quanyi">
<view class="item flexbox aligncenter" v-for="item in listenList" :key="item.id"
style="padding-bottom:10rpx;"> <view class="item " v-for="item in listenList" :key="item.id" style="padding-bottom:10rpx; ">
<view class="spbhimg" @click="previewImage(item.images)"> <view class="spbhimg" @click="previewImage(item.images)">
<image :src="item.images" mode="aspectFit"></image> <image :src="item.images" mode="aspectFit"></image>
</view> </view>
<text style="padding-right: 10rpx;">{{item.name}}</text> <view class="quanyi_book" style="padding-left: 20rpx;">
<u-icon v-if="item.canListen == true" name="volume" color="#71d5a1" size="24" <view class="quanyi_book_name"
@click="goToListen(item.id)"></u-icon> style="padding-right: 10rpx;box-sizing: border-box;line-height: 40rpx;margin-bottom: 10rpx;">
<u-icon v-else name="volume" color="#71d5a1" size="24" {{
@click="goToListenNone(item.id)"></u-icon> item.name }}</view>
<view class="qunyi_bottom ">
<view class="quanyi_item " v-for="(v, i) in qunyiList"
@click="handleClickQuanyi(v, i, item)" style="font-weight: 700;color:#71d5a1;">
<view style="width: 100%;display: flex;
align-items: center;">
<template v-if="v.iconType == 'uni'">
<uni-icons :type="v.icon" color="#71d5a1" :size="v.iconSize"
style="display: inline-block;margin-right: 10rpx;"></uni-icons>
</template>
<template v-else>
<u-icon :name="v.icon" color="#71d5a1" :size="v.iconSize"
style="display: inline-block;margin-right: 10rpx;"></u-icon>
</template>
{{ v.name }}
</view>
<view>
<template v-if="v.type == 'tingshu'">
222
</template>
</view> </view>
</view> </view>
<!-- <view class="quanyi_item "
@click="item.canListen == true ? goToListen(item.id) : goToListenNone(item.id)"
style="font-weight: 700;color:#71d5a1;"><uni-icons type="sound" color="#71d5a1"
size="22" style="display: inline-block;margin-right: 10rpx;"></uni-icons>听书
</view>
<view class="quanyi_item "
@click="item.canListen == true ? goToListen(item.id) : goToListenNone(item.id)"
style="font-weight: 700;color:#71d5a1;"><uni-icons type="chat" color="#71d5a1"
size="20" style="display: inline-block;margin-right: 10rpx;"></uni-icons>书评
</view>
<view class="quanyi_item " style="font-weight: 700;color:#71d5a1;"><u-icon
name="file-text" color="#71d5a1" size="22"
style="display: inline-block;margin-right: 10rpx;"></u-icon>讲书</view>
<view class="quanyi_item " style="font-weight: 700;color:#71d5a1;"><u-icon
name="order" color="#71d5a1" size="22"
style="display: inline-block;margin-right: 10rpx;"></u-icon>医案</view> -->
</view>
<!-- <u-icon v-if="item.canListen == true" name="volume" color="#71d5a1" size="20"
@click=""></u-icon>
<u-icon v-else name="volume" color="#71d5a1" size="20"
@click="goToListenNone(item.id)"></u-icon> -->
</view>
</view>
</view>
</view>
<view class="pingjia">
<!-- <h4></h4> -->
<view class=""> <view class="">
<view style="font-weight: 700;margin:0rpx 0rpx 30rpx;">商品详情</view> <view style="font-weight: 700;margin:0rpx 0rpx 30rpx;">商品详情</view>
</view> </view>
@@ -93,20 +160,20 @@
<u-col v-if="productInfo.author"><span>作者{{ productInfo.author }}</span></u-col> <u-col v-if="productInfo.author"><span>作者{{ productInfo.author }}</span></u-col>
</u-row> </u-row>
<u-row customStyle="margin-bottom: 10px"> <u-row customStyle="margin-bottom: 10px">
<u-col span="12" <u-col span="12" v-if="productInfo.publisher"><span>出版社{{ productInfo.publisher
v-if="productInfo.publisher"><span>出版社{{productInfo.publisher}}</span></u-col> }}</span></u-col>
</u-row> </u-row>
<u-row customStyle="margin-bottom: 10px"> <u-row customStyle="margin-bottom: 10px">
<u-col span="12" <u-col span="12" v-if="productInfo.pubDate"><span>出版时间{{ productInfo.pubDate | formatDate
v-if="productInfo.pubDate"><span>出版时间{{ productInfo.pubDate | formatDate }}</span></u-col> }}</span></u-col>
</u-row> </u-row>
<u-row customStyle="margin-bottom: 10px"> <u-row customStyle="margin-bottom: 10px">
<u-col span="6" v-if="productInfo.format"><span>开本{{ productInfo.format }}</span></u-col> <u-col span="6" v-if="productInfo.format"><span>开本{{ productInfo.format }}</span></u-col>
<u-col span="6" v-if="productInfo.pageNum"><span>页数{{ productInfo.pageNum }}</span></u-col> <u-col span="6" v-if="productInfo.pageNum"><span>页数{{ productInfo.pageNum }}</span></u-col>
</u-row> </u-row>
<u-row customStyle="margin-bottom: 10px"> <u-row customStyle="margin-bottom: 10px">
<u-col span="6" <u-col span="6" v-if="productInfo.quality"><span>内文用纸材质{{ productInfo.quality
v-if="productInfo.quality"><span>内文用纸材质{{productInfo.quality}}</span></u-col> }}</span></u-col>
</u-row> </u-row>
</view> </view>
<!-- <view class="commodityIntroduce" v-html="productInfo.productDetails"> --> <!-- <view class="commodityIntroduce" v-html="productInfo.productDetails"> -->
@@ -123,7 +190,8 @@
</view> </view>
<view class="pingjia" v-else> <view class="pingjia" v-else>
<view class=""> <view class="">
<view style="font-weight: 700;margin-bottom: 30rpx;">评价({{commentsList?commentsList.length:0}}) <view style="font-weight: 700;margin-bottom: 30rpx;">评价({{ commentsList ? commentsList.length : 0
}})
</view> </view>
<!-- <view class="icon-del rotate"></view> --> <!-- <view class="icon-del rotate"></view> -->
</view> </view>
@@ -192,8 +260,8 @@
<image :src="item.productImages" mode="aspectFit"></image> <image :src="item.productImages" mode="aspectFit"></image>
</view> </view>
<text class="username nowrap ">{{ item.productName }}</text> <text class="username nowrap ">{{ item.productName }}</text>
<text class="price" <text class="price" v-if="item.activityPrice && item.activityPrice > 0">{{
v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice}}</text> item.activityPrice }}</text>
<text class="price" v-else>{{ item.price }}</text> <text class="price" v-else>{{ item.price }}</text>
</view> </view>
</view> </view>
@@ -219,6 +287,14 @@
export default { export default {
data() { data() {
return { return {
qunyiList: [
{ name: "打卡", type: 'daka', icon: "calendar", iconType: 'uni', iconSize: 20 },
{ name: "听书", type: 'tingshu', icon: "sound", iconType: 'uni', iconSize: 22 },
{ name: "书评", type: 'shuping', icon: "chat", iconType: 'uni', iconSize: 20 },
{ name: "讲书", type: 'jiangshu', icon: "file-text", iconType: 'uview', iconSize: 22 },
{ name: "医案", type: 'yian', icon: "order", iconType: 'uview', iconSize: 22 },
],
linkimg: '', // 选中的关联商品图片 linkimg: '', // 选中的关联商品图片
playData: {}, playData: {},
contentShow: 0, contentShow: 0,
@@ -272,6 +348,28 @@
musicPlay musicPlay
}, },
methods: { methods: {
handleClickQuanyi(v, i, item) {
switch (v.type) {
case 'tingshu':
if (item.canListen) {
uni.navigateTo({
url: "../listen/listen?bookid=" + item.id
});
} else {
this.goToListenNone(item.id)
}
break;
// case 'tingshu':
// if (item.canListen) {
// uni.navigateTo({
// url: "../listen/listen?bookid=" + id
// });
// } else {
// goToListenNone(item.id)
// }
// break;
}
},
showImg(e) { showImg(e) {
// console.log(e,'点击的内容') // console.log(e,'点击的内容')
// let contentimg = e.target.dataset.nodes; // let contentimg = e.target.dataset.nodes;
@@ -450,7 +548,7 @@
}, },
// 关联商品点击按钮组件 // 关联商品点击按钮组件
buttonClickLink(e) { buttonClickLink(e) {
console.log('点击的是关联商品的组件') console.log(e, '点击的是关联商品的组件')
if (e.index == 0) { if (e.index == 0) {
// 点击的是加入购物车 // 点击的是加入购物车
if (this.linkProducts[this.linkCur].productStock == 0) { if (this.linkProducts[this.linkCur].productStock == 0) {
@@ -460,9 +558,12 @@
duration: 1000, duration: 1000,
}); });
} else { } else {
console.log(this.userInfo, '222')
this.$http this.$http
.post(`book/ordercart/getCartList?userId=${this.userInfo.id}`) .post(`book/ordercart/getCartList?userId=${this.userInfo.id}`)
.then(res => { .then(res => {
// console.log(
this.cartList = res.cartList this.cartList = res.cartList
this.isAddLink(this.linkProducts[this.linkCur]) this.isAddLink(this.linkProducts[this.linkCur])
}) })
@@ -1128,4 +1229,73 @@
} }
} }
} }
.quanyi_box {
padding-right: 0rpx !important;
background: #f6fffc;
margin-top: 30rpx !important;
box-shadow: 0px 0px 6rpx 0px rgba(0, 82, 79, 0.2);
}
.quanyi {
margin-bottom: 30rpx;
overflow: hidden;
.item {
overflow: hidden;
margin-bottom: 30rpx;
border-bottom: 4rpx solid #f0f0f0;
}
.item:nth-last-child(1) {
border: none;
}
.quanyi_item:nth-last-child(1) {
margin-right: 0;
}
.spbhimg {
// width: 60rpx;
float: left;
}
.quanyi_book {
width: calc(100% - 80rpx);
float: right;
.quanyi_book_name {
font-size: 28rpx;
}
}
}
.quanyi_title {
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
font-weight: normal;
font-size: 42rpx;
color: #018F89;
font-weight: 500;
margin-bottom: 30rpx;
color: #33b170;
}
.quanyi_item {
font-size: 26rpx;
width: auto;
border-radius: 10rpx;
box-sizing: border-box;
// display: inline-block;
margin-right: 10rpx;
}
.quanyi_book {
margin-bottom: 20rpx;
}
</style> </style>

Binary file not shown.

BIN
static/font/msyh.ttc Normal file

Binary file not shown.

BIN
static/font/msyh.ttf Normal file

Binary file not shown.

BIN
static/font/msyhbd.ttf Normal file

Binary file not shown.

BIN
static/font/msyhl.ttf Normal file

Binary file not shown.

View File

@@ -1,4 +1,12 @@
@import '@/style/mixin.scss'; @import '@/style/mixin.scss';
@font-face {
font-family: 'PangMenZhengDaobiaoTiTiMianFeiBan';
src: url('@/static/font/PangMenZhengDaoBiaoTiTiMianFeiBan.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
view, view,
page, page,
text, text,