阶段性上传
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
<template>
|
||||
<view style="font-size: 28upx;">
|
||||
<!-- <z-nav-bar backState="2000" title="首页"></z-nav-bar> -->
|
||||
<view class="home_bg" >
|
||||
<image src="../../static/icon/home_icon_1.png" mode="aspectFit" class="icon_hua_1"></image>
|
||||
<view v-if="showEbook" class="search_box" @click="onPageJump('./searchFor')">
|
||||
<text class="icon_search"></text>
|
||||
<text class="prompt">搜索...</text>
|
||||
<view class="home_bg">
|
||||
<view class="flexbox" style=" justify-content: space-between; ">
|
||||
<view class="icon_hua">
|
||||
<image src="../../static/icon/home_icon_3.png" mode="aspectFit" class="icon_hua_1"></image>
|
||||
</view>
|
||||
<view class="search_box flexbox" @click="onPageJump('./searchFor')">
|
||||
<view class="search">
|
||||
<text class="icon_search"></text>
|
||||
<text class="prompt">请输入想要搜索的书名</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="searBtn flexbox">
|
||||
<text>搜索</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home_lunbo">
|
||||
<u-swiper :list="list3" indicator indicatorMode="line" circular style="height: 180rpx;"></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="home_nar" v-if="showEbook"> -->
|
||||
@@ -21,10 +33,10 @@
|
||||
</view>
|
||||
|
||||
<!-- <view class="hn_cl_tit" @click="onPageJump('../bookShop/bookShopIndex')"> -->
|
||||
<view class="hn_cl_tit shuping" @click="onTabJump()">
|
||||
<!-- <view class="hn_cl_tit shuping" @click="onTabJump()">
|
||||
<image src="../../static/icon/home3.png" mode="aspectFit"></image>
|
||||
<text>书评</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="hn_cl_tit chaoshi" @click="onPageJump('../bookShop/classify')">
|
||||
<image src="../../static/icon/home4.png" mode="aspectFit"></image>
|
||||
@@ -32,9 +44,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="home_lunbo">
|
||||
<!-- <view class="home_lunbo">
|
||||
<u-swiper :list="list3" indicator indicatorMode="line" circular style="height: 180rpx;"></u-swiper>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="home_shujia" v-if="showEbook">
|
||||
<view class="hn_sj" @click="onTabJump('./bookshelf')">
|
||||
@@ -89,9 +101,21 @@
|
||||
<view class="head_line" >
|
||||
<b></b>
|
||||
<text>新书上市</text>
|
||||
<i @click="onBookMore('New')">查看更多 ></i>
|
||||
<!-- <i @click="onBookMore('New')">查看更多 ></i> -->
|
||||
</view>
|
||||
|
||||
|
||||
<view class="newBook">
|
||||
<scroll-view class="scroll-view_H " scroll-x="true" scroll-left="10">
|
||||
<view :class="['item']" v-for="(item,index) in newBookList" :key="index">
|
||||
<view class="videoBox" @click="goDetail(item.productId)">
|
||||
<image v-if="item.productImages != ''" :src="item.productImages" mode="scaleToFill"></image>
|
||||
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
|
||||
</view>
|
||||
<text class="bookName">{{item.productName}}</text>
|
||||
</view>
|
||||
</scroll-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>
|
||||
@@ -214,6 +238,7 @@
|
||||
transaction: { // 成功回调
|
||||
|
||||
},
|
||||
scrollLeft:0,
|
||||
maxTimes:1, // 轮询最大次数
|
||||
ComplateRequestInterval:null, // 轮询定时器
|
||||
checking:false, // 正在检测
|
||||
@@ -233,6 +258,7 @@
|
||||
bgiStyle: {
|
||||
background: '#fff'
|
||||
},
|
||||
newBookList:[],
|
||||
iconStyle: {
|
||||
fontSize: '40rpx',
|
||||
fontWeight: 'bold',
|
||||
@@ -265,7 +291,7 @@
|
||||
onPullDownRefresh() {
|
||||
this.getData()
|
||||
uni.stopPullDownRefresh()
|
||||
this.requestIapOrder()
|
||||
this.requestIapOrder()
|
||||
},
|
||||
|
||||
|
||||
@@ -291,6 +317,19 @@
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(['setUserInfo']),
|
||||
|
||||
// 新书上市
|
||||
getNewBook(){
|
||||
this.$http
|
||||
.post('book/shopproduct/getNewBook',{
|
||||
'limit': 10,
|
||||
'page':1
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res,'xinshu')
|
||||
this.newBookList = res.page.list
|
||||
});
|
||||
},
|
||||
// 检测未完成订单
|
||||
requestIapOrder(){
|
||||
console.log('检测支付环境...')
|
||||
@@ -479,6 +518,8 @@
|
||||
console.log(res.page.list,'首页商品')
|
||||
this.goodsList = res.page.list
|
||||
})
|
||||
|
||||
this.getNewBook()
|
||||
},
|
||||
|
||||
// 跳转
|
||||
@@ -519,7 +560,7 @@
|
||||
url: '../bookShop/commodityDetail?id=' + id
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 列表跳页
|
||||
onShopMore(e) {
|
||||
uni.navigateTo({
|
||||
@@ -542,7 +583,24 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
.newBook{margin-top: 20rpx;}
|
||||
.scroll-view_H{background-color: #fff;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{
|
||||
image{display: block; width:150rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
}
|
||||
.bookName{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;}
|
||||
}
|
||||
.flexbox{display: flex;}
|
||||
.head_line {
|
||||
margin: 50rpx 0 0 0;
|
||||
|
||||
@@ -571,50 +629,51 @@
|
||||
}
|
||||
|
||||
.home_bg {
|
||||
background-image: url('@/static/icon/home_bg.jpg');
|
||||
background-image: url('@/static/icon/home_bg1.jpg');
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
padding: 100rpx 0 40rpx 0;
|
||||
padding: 100rpx 20rpx 40rpx 20rpx;
|
||||
position: relative;
|
||||
|
||||
height: 400rpx; margin-bottom: 130rpx;
|
||||
.icon_hua_1 {
|
||||
margin: 0 auto;
|
||||
// margin: 0 auto;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.search_box {
|
||||
width: 90%;
|
||||
height: 64upx;
|
||||
background-color: #fff;
|
||||
border-radius: 32upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0upx 40upx;
|
||||
position: absolute;
|
||||
margin-left: -46%;
|
||||
left: 50%;
|
||||
bottom: -30rpx;
|
||||
box-shadow: 0 0px 10px 1px #54a96633;
|
||||
|
||||
.prompt {
|
||||
color: #cccccc;
|
||||
|
||||
.icon_hua{width: 150rpx; display: block;}
|
||||
.search_box { margin-top: 20rpx; align-items: center;
|
||||
width: calc(100% - 300rpx);
|
||||
|
||||
.search{height: 80upx;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
padding: 0upx 40upx;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
box-shadow: 0 0px 10px 1px #54a96633;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #838383; font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.icon_search {
|
||||
background-image: url('@/static/icon/map_ic_search.png');
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
width: 29upx;
|
||||
height: 28upx;
|
||||
width:36upx;
|
||||
height: 36upx;
|
||||
margin-right: 20upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.searBtn{
|
||||
width: 80rpx; align-items: center;
|
||||
font-size: 30rpx; color: #fff;
|
||||
}
|
||||
}
|
||||
.home_nar { padding-bottom: 20rpx;
|
||||
margin: 30rpx 20rpx; justify-content: space-between;
|
||||
display: flex;
|
||||
@@ -626,7 +685,8 @@
|
||||
// .shuping{ background-color: #d6ffda; border: 2px solid #bae9bf;}
|
||||
// .shuguan{ background-color:#e3f9f9 ; border: 2px solid #d7eced; }
|
||||
.hn_cl_tit { padding-bottom: 10rpx;
|
||||
width: 23%;
|
||||
// width: 23%;
|
||||
width: 31%;
|
||||
text-align: center;
|
||||
border-radius: 20rpx ; padding-top: 10rpx;
|
||||
// line-height: 110upx;
|
||||
@@ -638,9 +698,9 @@
|
||||
height:110upx;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
margin: 0 20rpx;
|
||||
// margin: 0 20rpx;
|
||||
}
|
||||
text{ display:block; 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;}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,22 +18,22 @@
|
||||
</view>
|
||||
<br clear="both">
|
||||
</view>
|
||||
<view class="now_vip" v-if="userMes.vip==0">
|
||||
<!-- <view class="now_vip" v-if="userMes.vip==0">
|
||||
<text>
|
||||
<image src="../../static/icon/mine_p.png" style="height: 44rpx;"></image>
|
||||
开通会员畅享海量内容
|
||||
</text>
|
||||
<b class="kt_btn" @click="onPageJump('./opeVip')">开通VIP</b>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="now_vip" v-if="userMes.vip==1">
|
||||
<!-- <view class="now_vip" v-if="userMes.vip==1">
|
||||
<text>
|
||||
<image src="../../static/icon/mine_v.png"></image>
|
||||
尊贵的VIP会员
|
||||
<font style="font-size: 14rpx;margin-left: 20rpx;">{{userMes.vipValidtime}}到期</font>
|
||||
</text>
|
||||
<b class="kt_btn" @click="onPageJump('./opeVip')">立即续费</b>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="chong_zhi">
|
||||
<view class="zhanghu" @click="onPageJump('../user/persCount')">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<text v-for="item in historyList" @click="serkeyWord(item)">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sear_class" v-if="this.show==1">
|
||||
<!-- <view class="sear_class" v-if="this.show==1">
|
||||
<view class="sc_xuan">
|
||||
<view class="sc_con" v-for="(item,index) in classFen" @click="FenBook(item)"
|
||||
:class="bookScreen.type == item.id ? 'sc_con sc_con_style' : 'sc_con'">{{item.sort}}</view>
|
||||
@@ -21,14 +21,14 @@
|
||||
<view class="sc_con" v-for="(item,index) in classMian" @click="MianBook(item)"
|
||||
:class="bookScreen.is_charge == item.id ? 'sc_con sc_con_style' : 'sc_con'">{{item.sort}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="sear_list" v-if="this.show==1">
|
||||
<view class="bl_tioa" v-for="(item,index) in bookList" @click="onBookJump(item)">
|
||||
<image :src="item.images"></image>
|
||||
<image :src="item.productImages"></image>
|
||||
<view>
|
||||
<text class="bok_name">{{item.name}}</text>
|
||||
<text class="bok_name">{{item.productName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<!-- <view>
|
||||
<text>作者:<text style="color: #333;">{{item.authorName}}</text></text>
|
||||
</view>
|
||||
<view>
|
||||
@@ -36,7 +36,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<text style="line-height: 20rpx;">{{item.title}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view style="height: 1px;"></view>
|
||||
<view>
|
||||
@@ -121,7 +121,8 @@
|
||||
this.bookScreen.page = this.bookScreen.page + 1
|
||||
setTimeout(() => {
|
||||
this.$http
|
||||
.post('book/book/list', this.bookScreen)
|
||||
// .post('book/book/list', this.bookScreen)
|
||||
.post('book/shopproduct/selectList?limit=8&page=1&key='+this.bookScreen.bookName)
|
||||
.then(res => {
|
||||
this.totalPage = res.page.totalPage
|
||||
for (let i in res.page.list) {
|
||||
@@ -162,8 +163,10 @@
|
||||
// 获取列表数据
|
||||
getData() {
|
||||
this.$http
|
||||
.post('book/book/list', this.bookScreen)
|
||||
// .post('book/book/list', this.bookScreen)
|
||||
.post('book/shopproduct/selectList?limit=8&page=1&key='+ this.bookScreen.bookName)
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
this.bookList = res.page.list
|
||||
this.totalPage = res.page.totalPage
|
||||
this.status = 3
|
||||
@@ -223,9 +226,12 @@
|
||||
|
||||
// 电子书内容跳转
|
||||
onBookJump(e) {
|
||||
console.log(e,'e')
|
||||
uni.navigateTo({
|
||||
url: '../eBook/bookContent?Id=' + e.id
|
||||
// url: '../eBook/bookContent?Id=' + e.id
|
||||
url: '../bookShop/commodityDetail?type=2&id=' + e.productId
|
||||
});
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -280,20 +286,22 @@
|
||||
}
|
||||
|
||||
.sear_list {
|
||||
margin: 50rpx 30rpx 0 30rpx;
|
||||
margin: 50rpx 30rpx 0 30rpx; display: flex; flex-wrap: wrap; justify-content: space-between;
|
||||
|
||||
.bl_tioa {
|
||||
box-shadow: 0 0px 10px 1px #d3d1d133;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
padding: 0 25upx 10upx 220upx;
|
||||
margin: 0 0 60rpx 0;
|
||||
width: 30%;
|
||||
box-shadow: 0 0px 10px 1px #d3d1d133; padding-bottom: 10rpx;
|
||||
background-color: #fff; margin-bottom: 20rpx;
|
||||
// position: relative;
|
||||
// padding: 0 25upx 10upx 220upx;
|
||||
// margin: 0 0 60rpx 0;
|
||||
text-align: center;
|
||||
border-radius: 15rpx;
|
||||
min-height: 250rpx;
|
||||
|
||||
view {
|
||||
|
||||
text {
|
||||
display: block;
|
||||
text { display: block;
|
||||
color: #9b9b9b;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
@@ -306,12 +314,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
left: 30upx;
|
||||
top: -20upx;
|
||||
image { display: inline-block;
|
||||
padding-top:20rpx;
|
||||
width: 160upx;
|
||||
height: 240upx;
|
||||
height: 220upx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user