版本恢复

This commit is contained in:
@fawn-nine
2023-09-19 09:43:11 +08:00
parent 8ebf79f301
commit 30e174b237
3 changed files with 301 additions and 333 deletions

View File

@@ -19,22 +19,7 @@
<text style=" color:#a3a3a3;">今天已签到</text> <text style=" color:#a3a3a3;">今天已签到</text>
</view> </view>
</view> </view>
</view> </view>
<!-- <scroll-view class="scroll-view_H flexbox" scroll-x="true" @scroll="scroll" :scroll-left="scrollLeft">
<view class="" style="padding: 0 6rpx; display: inline-block; width: 20%; box-sizing: border-box; " v-for="(item,index) in 365">
<view
:class="['item', signList.indexOf(index+1) != -1 ? 'havSign' : '',
currentDay == index+1 && signList.indexOf(index+1) == -1 ? 'current' : '',
linshiDay == index+1 ? 'linshiDay':'']" @click="getInfo(index+1)">
<span class="day"><em>{{index+1}}</em> </span>
<u-icon v-if="signList.indexOf(index+1) != -1" name="checkbox-mark" color="#fff" size="28" style="margin: 0 auto; width: 28px; text-align: center;"></u-icon>
<span v-if="signList.indexOf(index+1) == -1 && currentDay > index+1" class="buka">未签</span>
<span v-if="currentDay < index+1" class="weidaka">未开始</span>
<span v-if="currentDay == index+1 && signList.indexOf(index+1) == -1" class="daka" @click="kuickSign()">签到</span>
</view>
</view>
</scroll-view> -->
<swiper class="swiper scroll-view_H" @animationfinish="animationfinish" @change="swiperChange" :current='currentIndex' :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" <swiper class="swiper scroll-view_H" @animationfinish="animationfinish" @change="swiperChange" :current='currentIndex' :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration"> :duration="duration">
<swiper-item v-for="(item,index) in dayList" :key="index" class="flexbox swiperPage"> <swiper-item v-for="(item,index) in dayList" :key="index" class="flexbox swiperPage">

View File

@@ -18,8 +18,9 @@
</p> --> </p> -->
</view> </view>
<view class="tags"> <view class="tags">
<uni-tag @click="gotoListen()" class="tag" v-if="bookMessage.canListen" :inverted="true" text="听书" type="primary"></uni-tag>
<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="听书" type="primary"></uni-tag>
<!-- 1:打卡2不打卡 --> <!-- 1:打卡2不打卡 -->
<uni-tag @click="gotoclock()" v-if="bookMessage.clockIn == 1" class="tag" :inverted="true" text="签到" type="warning"></uni-tag> <uni-tag @click="gotoclock()" v-if="bookMessage.clockIn == 1" class="tag" :inverted="true" text="签到" type="warning"></uni-tag>
</view> </view>

View File

@@ -115,107 +115,27 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="home_xinshu" v-if="showEbook">
<view v-for="(item, index) in xinsList" @click="onBookJump(item)" v-if="index<3" class="hx_list">
<image :src="item.image"></image>
<view class="hx_title">{{item.bookName}}</view>
<view class="hx_author">{{item.authorName}} []</view>
<b v-if="item.isVip==1" style="background: #c79119;">VIP</b>
<b v-if="item.isVip==2" style="background: #c74119;">付费</b>
</view>
<br clear='both'>
<view v-for="(item, index) in xinsList" @click="onBookJump(item)" v-if="index>2&&index<6" class="hx_list">
<image :src="item.image"></image>
<view class="hx_title">{{item.bookName}}</view>
<view class="hx_author">{{item.authorName}} []</view>
<b v-if="item.isVip==1" style="background: #c79119;">VIP</b>
<b v-if="item.isVip==2" style="background: #c74119;">付费</b>
</view>
<br clear='both'>
</view>
<!--按类型 类型推荐 -->
<view class="tuijianView">
</view>
<!-- end --> <!-- end -->
<view class="head_line" v-if="showEbook">
<b></b>
<text>限时特价</text>
<i @click="onBookMore('Sale')">查看更多 ></i>
</view>
<view class="home_limit" v-if="showEbook">
<u-scroll-list indicatorActiveColor="#27b386">
<view v-for="(item, index) in limiTist" :key="index" @click="onBookJump(item)" class="lt_list">
<image :src="item.image"></image>
<view class="lt_title">{{item.bookName}}</view>
<view class="lt_author">{{item.authorName}} []</view>
<view class="lt_yuan">{{item.price}}疯币</view>
<view class="lt_xian">{{item.salePrice}}疯币</view>
<b v-if="item.isVip==1" style="background: #c79119;">VIP</b>
<b v-if="item.isVip==2" style="background: #c74119;">付费</b>
</view>
</u-scroll-list>
</view>
<view class="head_line" v-if="showEbook">
<b></b>
<text>精选书单</text>
<i @click="onBookMore('Best')">查看更多 ></i>
</view>
<view class="home_jingxu" v-if="showEbook">
<view class="hj_hot" v-for="(item,index) in jingList" @click="onBookJump(item)">
<view>
<text class="bok_name">{{item.bookName}}</text>
<text style="margin-left: 50rpx;" v-if="item.authorName!=''">{{item.authorName}}</text>
</view>
<view v-if="item.publisherName!=''">
<text>出版社{{item.publisherName}}</text>
</view>
<view>
<text>{{item.introduce | ellipsis}}</text>
</view>
<image :src="item.image"></image>
<!-- <b v-if="item.isVip==0">免费</b> -->
<b v-if="item.isVip==1" style="background: #c79119;">VIP</b>
<b v-if="item.isVip==2" style="background: #c74119;">付费</b>
</view>
</view>
<view class="head_line" style="margin-bottom: 10px;"> <view class="head_line" style="margin-bottom: 10px;">
<b></b> <b></b>
<text>精选图书</text> <text>精选商品</text>
<!-- <i @click="onShopMore('Hot')">查看更多 ></i> --> <!-- <i @click="onShopMore('Hot')">查看更多 ></i> -->
<!-- <i @click="onPageJump('../bookShop/classify')">查看更多 ></i> --> <i @click="onPageJump('../bookShop/classify')">查看更多 ></i>
</view> </view>
<!-- 商品展示 --> <!-- 商品展示 -->
<view class="goods"> <view class="goods">
<view class="goodsItem flexbox" v-for="(item,index) in goodsList" :key="item.productId" <view class="goodsItem" v-for="(item,index) in goodsList" :key="item.productId"
> @click="goDetail(item.productId)">
<view class="imgs" @click="onBookJump(item)"> <image :src="item.productImages" mode="" class="goodsImg"></image>
<image v-if="item.images != ''" :src="item.images" mode="" class="goodsImg"></image>
<image v-else src="../../static/icon/home_bg.jpg" class="goodsImg"></image>
</view>
<view class="goodsContent"> <view class="goodsContent">
<view class="goodsName"> <view class="goodsName">
<span>{{item.name}}</span> {{item.productName}}
</view>
<view class="tags">
<uni-tag v-if="item.canListen" style="margin-right: 10rpx;" @click="gotoListen(item)" class="tag" :inverted="true" text="听书" type="primary"></uni-tag>
<uni-tag style="margin-right: 10rpx;" class="tag" @click="gotopingshu(item)" :inverted="true" text="书评" type="success"></uni-tag>
<!-- 1:打卡2不打卡 -->
<uni-tag v-if="item.clockIn == 1" style="margin-right: 10rpx;" @click="gotoclock(item)" class="tag" :inverted="true" text="签到" type="warning"></uni-tag>
</view>
<view class="flexbox" style="margin-top: 20rpx; color: #5f5f5f;">
<view class="">
<span v-if="item.authorName">{{item.authorName}} &nbsp; &nbsp;</span>
<span v-if="item.publisherName">&nbsp; &nbsp;/&nbsp; {{item.publisherName}} &nbsp;</span>
</view> </view>
<view class="goodsPrice">
<span class="price">{{item.price}}</span>
<span class="Salesnum">已售{{item.sumSales}} </span>
</view> </view>
</view> </view>
</view> </view>
@@ -245,7 +165,8 @@
import repciptData from '@/static/json/repcipt.json' import repciptData from '@/static/json/repcipt.json'
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import { import {
mapState,mapMutations mapState,
mapMutations
} from 'vuex'; } from 'vuex';
export default { export default {
data() { data() {
@@ -324,13 +245,12 @@
}, },
onReachBottom() { onReachBottom() {
console.log('到底了') console.log('到底了')
// if (this.jPage + 1 <= this.jTotal) {
if(this.jPage+1 <= this.jTotal){ // this.jPage++
this.jPage++ // this.getJBook()
this.getJBook() // } else {
}else{ // this.status = 1
this.status = 1 // }
}
}, },
filters: { filters: {
// 控制字数 // 控制字数
@@ -448,7 +368,9 @@
console.log('关闭订单成功', index); console.log('关闭订单成功', index);
if (index == this.ComplateRequestArr.length - 1) { // 最后一个支付订单 if (index == this.ComplateRequestArr.length - 1) { // 最后一个支付订单
this.setUserInfo({restoreFlag:false}); this.setUserInfo({
restoreFlag: false
});
// console.log(this.userInfo.restoreFlag,'this.ComplateRequestArr.length+++') // console.log(this.userInfo.restoreFlag,'this.ComplateRequestArr.length+++')
} }
@@ -570,17 +492,10 @@
// 获取精选图书 // 获取精选图书
getJBook() { getJBook() {
this.$http this.$http
.post('book/book/listbooks',{ .post('book/shopproduct/appGetList?limit=30&page=1&istop=1')
'limit':6,
'page': this.jPage
})
.then(res => { .then(res => {
console.log(res,'首页商品') console.log(res.page.list, '首页商品')
this.jTotal = res.page.totalPage this.goodsList = res.page.list
this.goodsList = this.goodsList.concat(res.page.list)
console.log(this.goodsList,'this.goodsList')
this.status = 3
uni.stopPullDownRefresh()
}) })
}, },
// 跳转 // 跳转
@@ -644,29 +559,62 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/style/mixin.scss'; @import '@/style/mixin.scss';
.tags { .tags {
uni-tag{margin-right: 10rpx;} uni-tag {
margin-right: 10rpx;
} }
.newBook{margin-top: 20rpx;} }
.scroll-view_H{background-color: #fff;white-space: nowrap;
width: 100%; padding:10rpx ; } .newBook {
margin-top: 20rpx;
}
.scroll-view_H { .scroll-view_H {
.item { padding: 10rpx; overflow: hidden; display: inline-block; background-color: #fff;
width: 180rpx !important; margin-right: 20rpx; border-radius: 10rpx; white-space: nowrap;
width: 100%;
padding: 10rpx;
}
.scroll-view_H {
.item {
padding: 10rpx;
overflow: hidden;
display: inline-block;
width: 180rpx !important;
margin-right: 20rpx;
border-radius: 10rpx;
.videoBox { .videoBox {
image{display: block; width:150rpx; image {
display: block;
width: 150rpx;
height: 170rpx; height: 170rpx;
} }
} }
.bookName{display: block; margin-top: 20rpx; color: #666; font-size: 24rpx; white-space: nowrap;
overflow-x: hidden; overflow: hidden; .bookName {
text-overflow: ellipsis;} display: block;
margin-top: 20rpx;
color: #666;
font-size: 24rpx;
white-space: nowrap;
overflow-x: hidden;
overflow: hidden;
text-overflow: ellipsis;
} }
}
// .item.active{margin-right: 20rpx; border: 1px solid #55aa00; border-radius: 10rpx;} // .item.active{margin-right: 20rpx; border: 1px solid #55aa00; border-radius: 10rpx;}
} }
.flexbox{display: flex;}
.flexbox {
display: flex;
}
.head_line { .head_line {
margin: 50rpx 0 0 0; margin: 30rpx 0 0 0;
b { b {
@@ -699,17 +647,26 @@
background-size: cover; background-size: cover;
padding: 20rpx; padding: 20rpx;
position: relative; position: relative;
// height: 400rpx; margin-bottom: 130rpx; // height: 400rpx; margin-bottom: 130rpx;
.icon_hua_1 { .icon_hua_1 {
// margin: 0 auto; // margin: 0 auto;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
} }
.icon_hua{width: 150rpx; display: block;}
.search_box { margin-top: 20rpx; align-items: center; .icon_hua {
width: 150rpx;
display: block;
}
.search_box {
margin-top: 20rpx;
align-items: center;
width: calc(100% - 300rpx); width: calc(100% - 300rpx);
.search{height: 80upx; .search {
height: 80upx;
display: flex; display: flex;
width: 100%; width: 100%;
align-items: center; align-items: center;
@@ -718,8 +675,10 @@
border-radius: 20upx; border-radius: 20upx;
box-shadow: 0 0px 10px 1px #54a96633; box-shadow: 0 0px 10px 1px #54a96633;
} }
.prompt { .prompt {
color: #838383; font-size: 24rpx; color: #838383;
font-size: 24rpx;
} }
@@ -733,30 +692,40 @@
margin-right: 20upx; margin-right: 20upx;
} }
} }
.searBtn { .searBtn {
width: 80rpx; align-items: center; width: 80rpx;
font-size: 30rpx; color: #fff; align-items: center;
font-size: 30rpx;
color: #fff;
} }
} }
.home_nar { padding-bottom: 20rpx;
margin: 30rpx 20rpx; justify-content: space-between; .home_nar {
padding-bottom: 20rpx;
margin: 30rpx 20rpx;
justify-content: space-between;
display: flex; display: flex;
color: #333; color: #333; margin-bottom: 0 !important;
// .dianzishu{ margin-right:10rpx; // .dianzishu{ margin-right:10rpx;
// background-color:#f8d6f4 ; border: 2px solid #edcce9; // background-color:#f8d6f4 ; border: 2px solid #edcce9;
// } // }
// .chaoshi{background-color:#fff2d8 ; border: 2px solid #ede6d3; } // .chaoshi{background-color:#fff2d8 ; border: 2px solid #ede6d3; }
// .shuping{ background-color: #d6ffda; border: 2px solid #bae9bf;} // .shuping{ background-color: #d6ffda; border: 2px solid #bae9bf;}
// .shuguan{ background-color:#e3f9f9 ; border: 2px solid #d7eced; } // .shuguan{ background-color:#e3f9f9 ; border: 2px solid #d7eced; }
.hn_cl_tit { padding-bottom: 10rpx; .hn_cl_tit {
padding-bottom: 10rpx;
// width: 23%; // width: 23%;
width: 31%; width: 31%;
text-align: center; text-align: center;
border-radius: 20rpx ; padding-top: 10rpx; border-radius: 20rpx;
padding-top: 10rpx;
// line-height: 110upx; // line-height: 110upx;
//display: flex; //display: flex;
align-content: center; align-content: center;
justify-content: center; justify-content: center;
image { image {
width: 110upx; width: 110upx;
height: 110upx; height: 110upx;
@@ -764,7 +733,15 @@
margin: 0 auto; margin: 0 auto;
// margin: 0 20rpx; // margin: 0 20rpx;
} }
text{ display:block; text-align: center; margin-top: 10px; font-size: 36rpx; color: #000; font-weight:blod;}
text {
display: block;
text-align: center;
margin-top: 10px;
font-size: 36rpx;
color: #000;
font-weight: blod;
}
} }
@@ -1031,28 +1008,24 @@
margin: 40rpx 0 50rpx 0; margin: 40rpx 0 50rpx 0;
.goodsItem { .goodsItem {
display: inline-block;
width: 46%;
border-radius: 20rpx; border-radius: 20rpx;
padding: 25rpx 25rpx 20rpx 25rpx; padding: 25rpx 25rpx 20rpx 25rpx;
margin: 0 20rpx 20rpx 20rpx; margin: 0 20rpx 20rpx 20rpx;
background-color: #fff; background-color: #fff;
border: 1px solid #eee; border: 1px solid #eee;
.imgs { .goodsImg {
width: 200rpx; width: 98%;
height: 260rpx; overflow: hidden; height: 380rpx;
border-radius: 10rpx; border-radius: 10rpx;
image{width: 200rpx;
height: 260rpx; overflow: hidden;}
} }
.goodsContent { .goodsContent {
padding-left: 46rpx;
.goodsName {
color: #131313; .goodsName {
margin-top: 10rpx; margin-top: 10rpx;
margin-bottom: 37rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
} }
@@ -1060,14 +1033,23 @@
.goodsPrice { .goodsPrice {
font-size: 30rpx; font-size: 30rpx;
margin: 5rpx 0 0 3rpx; margin: 5rpx 0 0 3rpx;
display: flex; justify-content: space-between; display: flex;
justify-content: space-between;
.price { .price {
font-weight: bold; font-weight: bold;
color: #bf0c0c; color: #bf0c0c;
} }
.Salesnum{color: #9b9b9b;}
.Salesnum {
color: #9b9b9b;
} }
} }
} }
} }
.goodsItem:nth-child(2n) {
margin-left: 0;
}
}
</style> </style>