阶段性上传
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;}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user