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

@@ -1,54 +1,52 @@
{ {
"name" : "疯子读书", "name": "疯子读书",
"appid" : "__UNI__9788EB5", "appid": "__UNI__9788EB5",
"description" : "疯子读书", "description": "疯子读书",
"networkTimeout" : { "networkTimeout": {
"request" : 3000 "request": 3000
}, },
"transformPx" : false, "transformPx": false,
"icons" : [ "icons": [{
{ "sizes": "分辨率192x192",
"sizes" : "分辨率192x192", "src": "图片路径"
"src" : "图片路径" }],
} "versionName": "1.2.43",
], "versionCode": 1243,
"versionName" : "1.2.43", "app-plus": {
"versionCode" : 1243, "compatible": {
"app-plus" : { "ignoreVersion": true
"compatible" : {
"ignoreVersion" : true
}, },
"privacy" : { "privacy": {
"prompt" : "template", "prompt": "template",
"template" : { "template": {
"title" : "用户协议和隐私政策", "title": "用户协议和隐私政策",
"message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://main.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "message": "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://main.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意", "buttonAccept": "同意",
"buttonRefuse" : "暂不同意" "buttonRefuse": "暂不同意"
} }
}, },
"modules" : { "modules": {
"Payment" : {}, "Payment": {},
"OAuth" : {}, "Share": {},
"Share" : {}, "Camera": {},
"Camera" : {}, "VideoPlayer": {},
"VideoPlayer" : {} "OAuth": {}
}, },
"distribute" : { "distribute": {
"apple" : { "apple": {
"devices" : "universal" "devices": "universal"
}, },
// "UIBackgroundModes" : [ "audio" ] // "UIBackgroundModes" : [ "audio" ]
"android" : { "android": {
"permissionPhoneState" : { "permissionPhoneState": {
"request" : "none", "request": "none",
"prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。" "prompt": "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
}, },
"permissionExternalStorage" : { "permissionExternalStorage": {
"request" : "none", "request": "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" "prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
}, },
"permissions" : [ "permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
@@ -75,182 +73,182 @@
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"minSdkVersion" : 21, "minSdkVersion": 21,
"targetSdkVersion" : 30, "targetSdkVersion": 30,
"schemes" : "nuttyreading" "schemes": "nuttyreading"
}, },
"sdkConfigs" : { "sdkConfigs": {
"ad" : {}, "ad": {},
"maps" : {}, "maps": {},
"share" : { "share": {
"weixin" : { "weixin": {
"appid" : "wx47134a8f15083734", "appid": "wx47134a8f15083734",
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/" "UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
} }
}, },
"payment" : { "payment": {
"alipay" : { "alipay": {
"__platform__" : [ "ios", "android" ] "__platform__": ["ios", "android"]
}, },
"appleiap" : {}, "appleiap": {},
"weixin" : { "weixin": {
"__platform__" : [ "ios", "android" ], "__platform__": ["ios", "android"],
"appid" : "wx47134a8f15083734", "appid": "wx47134a8f15083734",
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/" "UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
}
} }
}, },
"splashscreen" : { "oauth": {}
"iosStyle" : "common",
"androidStyle" : "default",
"useOriginalMsgbox" : true
}, },
"ios" : { "splashscreen": {
"dSYMs" : false, "iosStyle": "common",
"androidStyle": "default",
"useOriginalMsgbox": true
},
"ios": {
"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"]
} }
}, },
"idfa" : false, "idfa": false,
"urltypes" : "nuttyreading", "urltypes": "nuttyreading",
"urlschemewhitelist" : "everhealth", "urlschemewhitelist": "everhealth",
"privacyDescription" : { "privacyDescription": {
"NSPhotoLibraryUsageDescription" : "为了给您提供修改头像的功能", "NSPhotoLibraryUsageDescription": "为了给您提供修改头像的功能",
"NSCameraUsageDescription" : "为了给您提供修改头像的功能" "NSCameraUsageDescription": "为了给您提供修改头像的功能"
} }
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "unpackage/res/icons/72x72.png", "hdpi": "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png", "xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png" "xxxhdpi": "unpackage/res/icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "unpackage/res/icons/1024x1024.png", "appstore": "unpackage/res/icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "unpackage/res/icons/76x76.png", "app": "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png", "app@2x": "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png", "notification": "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png", "proapp@2x": "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png", "settings": "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png", "spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png" "spotlight@2x": "unpackage/res/icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "unpackage/res/icons/120x120.png", "app@2x": "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png", "app@3x": "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png", "notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png", "settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png", "spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png" "spotlight@3x": "unpackage/res/icons/120x120.png"
} }
} }
} }
}, },
"compilerVersion" : 3, "compilerVersion": 3,
"nvueLaunchMode" : "fast", "nvueLaunchMode": "fast",
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : false "alwaysShowBeforeRender": false
}, },
"nativePlugins" : {}, "nativePlugins": {},
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
// 5+App特有相关 // 5+App特有相关
"quickapp" : {}, "quickapp": {},
// 快应用特有相关 // 快应用特有相关
"mp-weixin" : { "mp-weixin": {
"setting" : { "setting": {
"urlCheck" : false, "urlCheck": false,
"es6" : true, "es6": true,
"postcss" : true, "postcss": true,
"minified" : true "minified": true
}, },
"usingComponents" : true, "usingComponents": true,
"appid" : "wxd3ba52b7661b36be", "appid": "wxd3ba52b7661b36be",
"permission" : { "permission": {
"scope.userLocation" : { "scope.userLocation": {
"desc" : "你的位置信息将用于小程序位置接口的效果展示" "desc": "你的位置信息将用于小程序位置接口的效果展示"
} }
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"h5" : { "h5": {
"template" : "template.h5.html", "template": "template.h5.html",
"router" : { "router": {
"mode" : "hash", "mode": "hash",
"base" : "/uniappDemo/" "base": "/uniappDemo/"
}, },
"optimization" : { "optimization": {
"treeShaking" : { "treeShaking": {
"enable" : true "enable": true
} }
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"_spaceID" : "mp-3614b80b-2d75-4462-a481-4998f8187274", "_spaceID": "mp-3614b80b-2d75-4462-a481-4998f8187274",
"uniStatistics" : { "uniStatistics": {
"version" : "2", "version": "2",
"enable" : true "enable": true
}, },
"mp-alipay" : { "mp-alipay": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"mp-baidu" : { "mp-baidu": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"mp-jd" : { "mp-jd": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"mp-kuaishou" : { "mp-kuaishou": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"mp-lark" : { "mp-lark": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"mp-qq" : { "mp-qq": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"mp-toutiao" : { "mp-toutiao": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"quickapp-webview-huawei" : { "quickapp-webview-huawei": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
}, },
"quickapp-webview-union" : { "quickapp-webview-union": {
"uniStatistics" : { "uniStatistics": {
"enable" : true "enable": true
} }
} }
} }
// //

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

@@ -7,7 +7,7 @@
<view class="swiperBox"> <view class="swiperBox">
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000"
style="width: 100%;height: 100%;"> style="width: 100%;height: 100%;">
<swiper-item v-for="(item,index) in swiperlist" :key="index" style="width: 100%;height: 100%;"> <swiper-item v-for="(item, index) in swiperlist" :key="index" style="width: 100%;height: 100%;">
<image :src="item" mode="aspectFit" style="width: 100%;height: 100%;" @click="previewImage(item)"> <image :src="item" mode="aspectFit" style="width: 100%;height: 100%;" @click="previewImage(item)">
</image> </image>
</swiper-item> </swiper-item>
@@ -15,18 +15,18 @@
</view> </view>
<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>
</view> </view>
<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="">
@@ -36,14 +36,14 @@
<!-- 商品包含 --> <!-- 商品包含 -->
<view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]"> <view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]">
<view class="spbh" v-for="(item, index) in linkProducts" :key="item.id"> <view class="spbh" v-for="(item, index) in linkProducts" :key="item.id">
<view class="flexbox aligncenter" @click="previewProduct(item,index)"> <view class="flexbox aligncenter" @click="previewProduct(item, index)">
<view class="spbhimg"> <view class="spbhimg">
<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>
</view> </view>
@@ -64,56 +64,123 @@
</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>
<view class="bookInfo"> <view class="bookInfo">
<u-row customStyle="margin-bottom: 10px"> <u-row customStyle="margin-bottom: 10px">
<u-col><span>书名{{productInfo.productName}}</span></u-col> <u-col><span>书名{{ productInfo.productName }}</span></u-col>
</u-row> </u-row>
<u-row customStyle="margin-bottom: 10px"> <u-row customStyle="margin-bottom: 10px">
<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"> -->
<view class="commodityIntroduce"> <view class="commodityIntroduce">
<view v-if="productInfo.productDetails"> <view v-if="productInfo.productDetails">
<rich-text v-if="productInfo.productDetails" class="xiangqing" @itemclick="showImg" <rich-text v-if="productInfo.productDetails" class="xiangqing" @itemclick="showImg"
:nodes="productInfo.productDetails|formatRichText"></rich-text> :nodes="productInfo.productDetails | formatRichText"></rich-text>
</view> </view>
</view> </view>
</view> </view>
@@ -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>
@@ -133,25 +201,25 @@
<view class="flexbox aligncenter"> <view class="flexbox aligncenter">
<view class="touxiang"> <view class="touxiang">
<image :src="item.avatar" mode="aspectFit"></image> <image :src="item.avatar" mode="aspectFit"></image>
<text class="username nowrap ">{{item.name}}</text> <text class="username nowrap ">{{ item.name }}</text>
</view> </view>
<view class="mb30" style="padding: 6rpx 0rpx 0rpx 20rpx;"> <view class="mb30" style="padding: 6rpx 0rpx 0rpx 20rpx;">
<span :class="['star',item.starlevel >= 1 ? 'starLight':'starGray']"></span> <span :class="['star', item.starlevel >= 1 ? 'starLight' : 'starGray']"></span>
<span :class="['star',item.starlevel >= 2 ? 'starLight':'starGray']"></span> <span :class="['star', item.starlevel >= 2 ? 'starLight' : 'starGray']"></span>
<span :class="['star',item.starlevel >= 3 ? 'starLight':'starGray']"></span> <span :class="['star', item.starlevel >= 3 ? 'starLight' : 'starGray']"></span>
<span :class="['star',item.starlevel >= 4 ? 'starLight':'starGray']"></span> <span :class="['star', item.starlevel >= 4 ? 'starLight' : 'starGray']"></span>
<span :class="['star',item.starlevel >= 5 ? 'starLight':'starGray']"></span> <span :class="['star', item.starlevel >= 5 ? 'starLight' : 'starGray']"></span>
</view> </view>
</view> </view>
<view class="contentBox"> <view class="contentBox">
<div class="pjimgs flexbox"> <div class="pjimgs flexbox">
<view class="item" v-for="(item1,index) in item.images"> <view class="item" v-for="(item1, index) in item.images">
<image v-if="item1.length > 10" @click="previewImage(item1)" :src="item1" <image v-if="item1.length > 10" @click="previewImage(item1)" :src="item1"
mode="aspectFill" style="width:100%; height: 50px;"></image> mode="aspectFill" style="width:100%; height: 50px;"></image>
</view> </view>
</div> </div>
<view class="content" v-html="item.phtml"></view> <view class="content" v-html="item.phtml"></view>
<text class="time">{{item.createdate}}</text> <text class="time">{{ item.createdate }}</text>
</view> </view>
<!-- 显示追平 --> <!-- 显示追平 -->
<view class="zhuiping item" v-if="item.zphtml != ''" style="padding-left: 60rpx;"> <view class="zhuiping item" v-if="item.zphtml != ''" style="padding-left: 60rpx;">
@@ -159,7 +227,7 @@
<view class="flexbox"> <view class="flexbox">
<view class="contentBox"> <view class="contentBox">
<view class="content" v-html="item.zphtml"></view> <view class="content" v-html="item.zphtml"></view>
<text class="time">{{item.followUpdate}}</text> <text class="time">{{ item.followUpdate }}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -185,16 +253,16 @@
<text>查看详情</text> <text>查看详情</text>
</view> </view>
</view> </view>
<view :class="['spbh', linkCur == index ? 'cur' :'']" v-for="(item, index) in linkProducts" <view :class="['spbh', linkCur == index ? 'cur' : '']" v-for="(item, index) in linkProducts"
:key="item.id"> :key="item.id">
<view class="flexbox aligncenter" @click="previewProduct(item,index)"> <view class="flexbox aligncenter" @click="previewProduct(item, index)">
<view class="spbhimg"> <view class="spbhimg">
<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>
</view> </view>
@@ -209,16 +277,24 @@
</view> </view>
</template> </template>
<script> <script>
import musicPlay from '@/components/music.vue' import musicPlay from '@/components/music.vue'
import emojiList1 from '../../bkhumor-emojiplus/emoji/biaoqin.js' import emojiList1 from '../../bkhumor-emojiplus/emoji/biaoqin.js'
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import { import {
mapState mapState
} from 'vuex'; } from 'vuex';
import loginVue from '../user/login.vue'; import loginVue from '../user/login.vue';
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;
@@ -330,7 +428,7 @@
urls: [url], urls: [url],
longPressActions: { longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'], itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) { success: function (res) {
// console.log(res,'+++++') // console.log(res,'+++++')
} }
} }
@@ -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])
}) })
@@ -696,13 +797,13 @@
}, },
formatRichText(html) { //控制图片大小 formatRichText(html) { //控制图片大小
let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) { let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, ''); match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, ''); match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, ''); match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
return match; return match;
}); });
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) { newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi,
'max-width:100%;'); 'max-width:100%;');
return match; return match;
@@ -737,13 +838,13 @@
* @returns {void|string|*} * @returns {void|string|*}
*/ */
formatRichText(html) { //控制小程序中图片大小 formatRichText(html) { //控制小程序中图片大小
let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) { let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, ''); match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, ''); match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, ''); match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
return match; return match;
}); });
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) { newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi,
'max-width:100%;'); 'max-width:100%;');
return match; return match;
@@ -763,14 +864,14 @@
return year + '-' + month + '-' + day; return year + '-' + month + '-' + day;
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.header_fixed { .header_fixed {
background-color: #fff; background-color: #fff;
} }
.tanchu { .tanchu {
background: #fff; background: #fff;
position: relative; position: relative;
padding: 40rpx 30rpx 40rpx 30rpx; padding: 40rpx 30rpx 40rpx 30rpx;
@@ -818,9 +919,9 @@
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
} }
} }
.tingshuList { .tingshuList {
margin-top: 20rpx; margin-top: 20rpx;
background-color: #fff; background-color: #fff;
padding: 20rpx; padding: 20rpx;
@@ -845,9 +946,9 @@
font-size: 32rpx; font-size: 32rpx;
padding-left: 20rpx; padding-left: 20rpx;
} }
} }
.pjimgs { .pjimgs {
margin: 0; margin: 0;
flex-wrap: wrap; flex-wrap: wrap;
display: flex; display: flex;
@@ -863,49 +964,49 @@
} }
} }
} }
.star { .star {
display: inline-block; display: inline-block;
width: 15px; width: 15px;
height: 15px; height: 15px;
margin-right: 6rpx; margin-right: 6rpx;
} }
.starGray { .starGray {
background: url(../../static/icon/star_greey.png) no-repeat; background: url(../../static/icon/star_greey.png) no-repeat;
background-size: contain; background-size: contain;
} }
.starLight { .starLight {
background: url(../../static/icon/star_light.png) no-repeat; background: url(../../static/icon/star_light.png) no-repeat;
background-size: contain; background-size: contain;
} }
.quesheng { .quesheng {
text-align: center; text-align: center;
margin-top: 0rpx; margin-top: 0rpx;
color: #8b8a91; color: #8b8a91;
} }
.pingjia { .pingjia {
background-color: #f5f5f5; background-color: #f5f5f5;
border-radius: 20rpx; border-radius: 20rpx;
// margin-top: 20rpx; // margin-top: 20rpx;
padding: 30rpx 30rpx 20rpx; padding: 30rpx 30rpx 20rpx;
} }
.pingjiaBox { .pingjiaBox {
color: #555; color: #555;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.flexbox { .flexbox {
display: flex; display: flex;
} }
.contentBox { .contentBox {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0rpx 10rpx 30rpx 6rpx; padding: 0rpx 10rpx 30rpx 6rpx;
@@ -922,15 +1023,15 @@
padding-top: 6rpx; padding-top: 6rpx;
float: right; float: right;
} }
} }
.spbh { .spbh {
padding-bottom: 10rpx; padding-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
padding: 0 10rpx; padding: 0 10rpx;
} }
.spbhimg { .spbhimg {
width: 40px; width: 40px;
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
@@ -944,25 +1045,25 @@
overflow: hidden; overflow: hidden;
} }
} }
.username { .username {
margin-left: 10rpx; margin-left: 10rpx;
} }
.price { .price {
margin-left: 5px; margin-left: 5px;
color: #ffa200; color: #ffa200;
font-weight: bold; font-weight: bold;
} }
.nowrap { .nowrap {
white-space: nowrap; white-space: nowrap;
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.touxiang { .touxiang {
width: 40px; width: 40px;
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
@@ -982,13 +1083,13 @@
color: #999; color: #999;
margin-top: 6rpx; margin-top: 6rpx;
} }
} }
.aligncenter { .aligncenter {
align-items: center; align-items: center;
} }
.xiangqing { .xiangqing {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;
@@ -1000,49 +1101,49 @@
p { p {
max-width: 100%; max-width: 100%;
} }
} }
.goods_nav { .goods_nav {
z-index: 1; z-index: 1;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
} }
.SoldNumber { .SoldNumber {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 16rpx; margin-top: 16rpx;
font-weight: 400; font-weight: 400;
} }
.bookInfo { .bookInfo {
// padding: 20px 10px; // padding: 20px 10px;
// line-height: 30rpx; // line-height: 30rpx;
// background-color: #fff; // background-color: #fff;
font-size: 26rpx; font-size: 26rpx;
color: #555; color: #555;
// border-radius: 20rpx 20rpx 0 0 // border-radius: 20rpx 20rpx 0 0
} }
.header { .header {
position: fixed; position: fixed;
top: 0%; top: 0%;
left: 0%; left: 0%;
z-index: 999; z-index: 999;
} }
.contentButton { .contentButton {
// margin: 10px 0; // margin: 10px 0;
} }
.swiperBox { .swiperBox {
width: 100%; width: 100%;
height: 375px; height: 375px;
margin-top: 150rpx; margin-top: 150rpx;
} }
.commodityContent { .commodityContent {
background-color: #fff; background-color: #fff;
padding: 30rpx 30rpx 10rpx 30rpx; padding: 30rpx 30rpx 10rpx 30rpx;
height: auto; height: auto;
@@ -1088,9 +1189,9 @@
// background-color: #fff; // background-color: #fff;
// padding: 0 20rpx 30rpx 20rpx; // padding: 0 20rpx 30rpx 20rpx;
} }
} }
.footer { .footer {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
background-color: #fff; background-color: #fff;
@@ -1127,5 +1228,74 @@
background-color: #cf3906; background-color: #cf3906;
} }
} }
}
.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,