听书页面
This commit is contained in:
33
pages.json
33
pages.json
@@ -210,7 +210,8 @@
|
||||
{
|
||||
"path": "pages/bookShop/settlement",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品结算"
|
||||
"navigationBarTitleText": "商品结算",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -234,7 +235,8 @@
|
||||
{
|
||||
"path": "pages/user/address",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -259,6 +261,33 @@
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/listen/listen",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "悦耳列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/listen/home",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "悦耳听书",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/listen/search",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "搜索听书",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<u-tabs :scrollable="false" :list="contentButtonList" @click="contentButtonClick"></u-tabs>
|
||||
</view>
|
||||
<!-- 详情 + 评价1 -->
|
||||
<view v-if="contentShow == 0">
|
||||
<view class="bookInfo" >
|
||||
<u-row customStyle="margin-bottom: 10px">
|
||||
<u-col ><span>书名:{{productInfo.productName}}</span></u-col>
|
||||
@@ -53,6 +54,10 @@
|
||||
<rich-text v-if="productInfo.productDetails" class="xiangqing" :nodes="productInfo.productDetails|formatRichText"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
用户评价
|
||||
</view>
|
||||
<view style="height: 120rpx;"></view>
|
||||
</view>
|
||||
<uni-goods-nav class="goods_nav" :fill="true" :options="options" :buttonGroup="buttonGroup" @click="onClick"
|
||||
@@ -69,6 +74,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
contentShow:0,
|
||||
options: [{
|
||||
icon: 'cart',
|
||||
text: '购物车'
|
||||
@@ -86,6 +92,9 @@
|
||||
],
|
||||
contentButtonList: [{
|
||||
name: '商品详情'
|
||||
},
|
||||
{
|
||||
name: '商品评论'
|
||||
}
|
||||
],
|
||||
// 轮播图数据
|
||||
@@ -97,6 +106,14 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getProDetail(e)
|
||||
this.getComment()
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
methods: {
|
||||
getProDetail(e){
|
||||
// 获取商品详情
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
@@ -120,10 +137,15 @@
|
||||
uni.hideLoading();
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
|
||||
// 获取商品评论
|
||||
getComment(){
|
||||
|
||||
},
|
||||
|
||||
contentButtonClick(e){
|
||||
this.contentShow = e.index
|
||||
},
|
||||
methods: {
|
||||
// 点击购物车
|
||||
onClick(e) {
|
||||
console.log(e.content.text)
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<view class="header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<z-nav-bar title="物流详情" bgColor="red"></z-nav-bar>
|
||||
<u-tabs active-color="#2979ff" inactive-color="#606266" bar-height="6" bar-width="40" v-if="deliverList"
|
||||
</view>
|
||||
<view v-if="deliverList.length > 0">
|
||||
<u-tabs active-color="#2979ff" inactive-color="#606266" bar-height="6" bar-width="40"
|
||||
name="name" :list="deliverList" :is-scroll="false" :current="current" @change="tabchange"></u-tabs>
|
||||
<view class="deliverCntent">
|
||||
<view class="" v-for="(list, index1) in deliverDetails" :key="index1">
|
||||
@@ -22,6 +24,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quesheng" v-else>
|
||||
<image src="../../static/icon/kongbai.png" ></image>
|
||||
<text>- 暂无物流信息 -</text>
|
||||
</view>
|
||||
<!-- <u-loading color="red" :show="loading"></u-loading> -->
|
||||
</view>
|
||||
</template>
|
||||
@@ -76,7 +82,7 @@
|
||||
this.$http
|
||||
.post(`/book/buyorder/queryFMS?orderId=${this.orderId}`)
|
||||
.then(res => {
|
||||
// console.log(res, '物流信息')
|
||||
console.log(res, '物流信息')
|
||||
if (res && res.code === 0) {
|
||||
uni.hideLoading()
|
||||
this.deliverDetails = res.rntStr
|
||||
@@ -101,6 +107,13 @@
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.quesheng{text-align: center; margin-top: 20px;
|
||||
image{ width: 150rpx; height: 170rpx; display: block; margin: 10px auto;
|
||||
}
|
||||
text{
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.copyCode{display: inline-block; margin-left: 20rpx; }
|
||||
.u-tabs {
|
||||
background: #fff
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
icon: 'none',
|
||||
title: '取消订单成功'
|
||||
})
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
})
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<view>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="我的订单"></z-nav-bar>
|
||||
<!-- <z-nav-bar title="我的订单"></z-nav-bar> -->
|
||||
<z-nav-bar backState="2000" title="我的订单"></z-nav-bar>
|
||||
|
||||
<view class="orderTabs">
|
||||
<view v-for="(item,index) in orderTabs" @click="orderTabCLi(item.value)"
|
||||
@@ -68,7 +69,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -346,6 +346,7 @@
|
||||
this.adressMoRen = this.addressList[this.adressMoRIndex]
|
||||
console.log(this.adressMoRen, '默认')
|
||||
if(this.adressMoRen != {}){
|
||||
console.log('运费之前')
|
||||
this.getYunFei()
|
||||
}else{
|
||||
this.getUserAddress()
|
||||
@@ -437,10 +438,13 @@
|
||||
key.push({productsid: item.productId, productAmount:item.productAmount})
|
||||
dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
|
||||
})
|
||||
console.log(this.adressMoRen.areaidpath,dataToString,'this.adressMoRen.areaidpath')
|
||||
$http.request({
|
||||
url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
// data: key,
|
||||
data:{
|
||||
loadAnimate:'none', // 请求加载动画
|
||||
} ,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
@@ -619,9 +623,12 @@
|
||||
title: "支付成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
// uni.navigateTo({
|
||||
// url: './orderList'
|
||||
// });
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
@@ -629,11 +636,12 @@
|
||||
icon: "none",
|
||||
image: '../../static/icon/ic_close.png'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: './orderList'
|
||||
});
|
||||
}, 1000)
|
||||
// setTimeout(() => {
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: './orderList'
|
||||
// });
|
||||
// }, 1000)
|
||||
}
|
||||
})
|
||||
}else if(this.payType == 1){
|
||||
@@ -649,7 +657,7 @@
|
||||
title: "支付成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
}, 1000)
|
||||
@@ -677,7 +685,7 @@
|
||||
icon: "success"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
}, 1000)
|
||||
|
||||
@@ -8,11 +8,16 @@
|
||||
<text class="prompt">搜索...</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home_nar" v-if="showEbook">
|
||||
<view class="hn_cl_tit dianzishu" @click="onPageJump('../eBook/bookList')">
|
||||
<!-- <view class="home_nar" v-if="showEbook"> -->
|
||||
<view class="home_nar">
|
||||
<view class="hn_cl_tit dianzishu" @click="onPageJump('../listen/home')">
|
||||
<image src="../../static/icon/home_bar_1.png" mode="aspectFit"></image>
|
||||
<text>听书</text>
|
||||
</view>
|
||||
<!-- <view class="hn_cl_tit dianzishu" @click="onPageJump('../eBook/bookList')">
|
||||
<image src="../../static/icon/home_bar_1.png" mode="aspectFit"></image>
|
||||
<text>电子书</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="hn_cl_tit" @click="onPageJump('../bookShop/bookShopIndex')"> -->
|
||||
<view class="hn_cl_tit chaoshi" @click="onPageJump('../bookShop/classify')">
|
||||
<image src="../../static/icon/home_bar_2.png" mode="aspectFit"></image>
|
||||
|
||||
@@ -55,9 +55,12 @@
|
||||
</view>
|
||||
|
||||
<view class="xiugai">
|
||||
<view class="nav_list" @click="onPageJump('../bookShop/orderList')">
|
||||
<view class="nav_list" @click="switchTab('../bookShop/orderList')">
|
||||
<text>我的订单</text>
|
||||
</view>
|
||||
<view class="nav_list" @click="onPageJump('../listen/home')">
|
||||
<text>我的听书</text>
|
||||
</view>
|
||||
<!-- <view v-if="showEbook" class="nav_list" @click="onPageJump('../eBook/bookBuy')">
|
||||
<text>电子书购买记录</text>
|
||||
</view> -->
|
||||
@@ -70,6 +73,7 @@
|
||||
<view class="nav_list" @click="onPageJump('../user/address')">
|
||||
<text>地址管理</text>
|
||||
</view>
|
||||
|
||||
<!-- <view class="nav_list" @click="onGoing()">
|
||||
<text>帮助与反馈</text>
|
||||
</view> -->
|
||||
@@ -127,6 +131,11 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
switchTab(url){
|
||||
uni.switchTab({
|
||||
url: url
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
// 获取个人信息
|
||||
if (this.userInfo.id != undefined) {
|
||||
@@ -148,14 +157,14 @@
|
||||
//分享app
|
||||
onShare(){
|
||||
let shareData = {
|
||||
shareUrl:"https://sj.qq.com/appdetail/com.cn.nuttyreading?source=gdaq",
|
||||
shareUrl:"https://www.nuttyreading.com/nuttyreading.apk",
|
||||
shareTitle:"疯子读书",
|
||||
type:'0',
|
||||
shareContent:"疯子读书",
|
||||
shareContent:"疯子读书,请使用浏览器打开本链接,自动下载安装包",
|
||||
shareImg:"static/fengziIcon.jpg",
|
||||
appId : "wx47134a8f15083734", // 默认不传type的时候,必须传appId和appPath才会显示小程序图标1
|
||||
appPath : "https://sj.qq.com/appdetail/com.cn.nuttyreading?source=gdaq",
|
||||
appWebUrl : "https://sj.qq.com/appdetail/com.cn.nuttyreading?source=gdaq",
|
||||
appId : "wx47134a8f15083734", // 默认不传type的时候,必须传appId和appPath才会显示小程序图标
|
||||
appPath : "https://www.nuttyreading.com/nuttyreading.apk",
|
||||
appWebUrl : "https://www.nuttyreading.com/nuttyreading.apk",
|
||||
};
|
||||
// 调用
|
||||
let shareObj = appShare(shareData,res => {
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
duration:2000
|
||||
});
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: '../bookShop/orderList'
|
||||
});
|
||||
},1000)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
columnDatas: [], //区地址
|
||||
switchTrue: true,
|
||||
switchFalse: false,
|
||||
|
||||
addressChanged:false, // 地址修改标记
|
||||
navName: '', // 顶部导航栏标题
|
||||
provId: '', // 存储省id
|
||||
cityId: '', // 存储市id
|
||||
@@ -237,6 +237,7 @@
|
||||
|
||||
},
|
||||
changeHandler(e) { //城市选择时触发
|
||||
this.addressChanged = true
|
||||
const {
|
||||
columnIndex, //当前选择的列,省 / 市 / 区
|
||||
value, // 当前选择的数组内容
|
||||
@@ -259,6 +260,7 @@
|
||||
},
|
||||
|
||||
addconfirm(e) { //点击确定按钮
|
||||
this.addressChanged = true
|
||||
this.addreShow = false;
|
||||
this.addressForm.areaidpathtext = e.value[0].UName + ' ' + e.value[1].UName + ' ' + e.value[2].UName
|
||||
this.provId = e.value[0].provId
|
||||
@@ -280,6 +282,7 @@
|
||||
link_add = 'book/useraddress/save'
|
||||
} else {
|
||||
link_add = 'book/useraddress/update'
|
||||
// this.addconfirm(e)
|
||||
}
|
||||
if (this.addressForm.areaidpath == '') {
|
||||
uni.showToast({
|
||||
@@ -289,7 +292,10 @@
|
||||
return
|
||||
}
|
||||
this.addressForm.userid = this.userInfo.id
|
||||
if(this.addressChanged){ // 如果修改过地址区域,就重新赋值,否则保持不变
|
||||
this.addressForm.areaidpath = `${this.provId}_${this.cityId}_${this.countyId}`
|
||||
this.addressChanged = false
|
||||
}
|
||||
this.addressForm.areaid = this.countyId
|
||||
this.addressForm.isdefault = this.addressForm.isDafault ? 1 : 0
|
||||
|
||||
|
||||
@@ -155,15 +155,19 @@
|
||||
title: '手机验证成功',
|
||||
duration: 1000,
|
||||
});
|
||||
console.log(res)
|
||||
|
||||
res.userInfo.token = res.token.token;
|
||||
this.setUserInfo(res.userInfo);
|
||||
// socket.init();
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/peanut/home'
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
|
||||
}, 1000);
|
||||
this.setUserInfo(res.userInfo);
|
||||
|
||||
// socket.init();
|
||||
|
||||
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
|
||||
@@ -2935,8 +2935,9 @@ import { nextTick } from "vue";
|
||||
}
|
||||
// 检查是否已经购买
|
||||
// this.bookMessage.isBuy==0&&this.bookMessage.chapterNum==null&&this.bookMessage.freeChapterCount!=0
|
||||
// book/bookchaptercontent/appBooksChapterContent?bookid=89&id=4039&userId=10176
|
||||
return this.$http
|
||||
.post('book/bookchaptercontent/appGetBookChapterContent', {
|
||||
.post('book/bookchaptercontent/appBooksChapterContent', {
|
||||
'userId': this.userInfo.id,
|
||||
'bookid': this.bookId_mark,
|
||||
'chapterid': chapterId
|
||||
|
||||
Reference in New Issue
Block a user