分类页改版、购物车删除功能、提交订单表单验证修改完成
parent
47d0c1f1b3
commit
ebecce786d
|
@ -12,16 +12,16 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="pad-zy20" style="width: 100%;">
|
||||
<scroll-view :style="{height: scrollHeight +'px'}" style="padding-bottom: 130rpx;"
|
||||
<view class="pad-zy20" style="width: 100%;position: relative;">
|
||||
<view class="cate-title">{{cateList[current].title}}</view>
|
||||
<scroll-view :style="{height: scrollHeight +'px'}" style="padding-top: 60rpx;box-sizing: border-box;"
|
||||
scroll-y="true"
|
||||
:scroll-into-view="doms"
|
||||
scroll-with-animation
|
||||
@scroll="scrolls"
|
||||
@scrolltolower="scrollBottomEv">
|
||||
<view class="posir" :id="'product'+index" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="disac bbt-d9 pad-sx30" @tap="goDetail(item.id)" v-for="(item1,index1) in item" :key="index1">
|
||||
<view class="cate-title" v-if="item.length > 0">{{cateList[index].title}}</view>
|
||||
<view class="disac bbt-d9 pad-sx30" @tap="goDetail(item1.id)" v-for="(item1,index1) in item" :key="index1">
|
||||
<view class="cate-txt">
|
||||
<image class="radius30 flexs borbot-cc" :src="item1.imgsrc" mode="aspectFill" style="width: 240rpx;height: 240rpx;"></image>
|
||||
<view class="width100 disjb fc mar-z20" style="height: 240rpx;">
|
||||
|
@ -76,7 +76,8 @@
|
|||
ifLoading:false,
|
||||
pid:'',//分类id
|
||||
doms:'',
|
||||
topList:[]
|
||||
topList:[],
|
||||
heightData: 0
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -116,7 +117,12 @@
|
|||
})
|
||||
this.dataList[i] = newArr;
|
||||
if(i == this.cateList.length-1){
|
||||
console.log(i,123)
|
||||
setTimeout(()=>{
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('.cate-title').boundingClientRect(data => {
|
||||
this.heightData = data.height
|
||||
}).exec();
|
||||
},200)
|
||||
this.getNodesInfo();
|
||||
this.ifLoading = false;
|
||||
}
|
||||
|
@ -153,6 +159,7 @@
|
|||
chooseCate(index,id) {
|
||||
this.current =index
|
||||
this.doms = 'product'+index
|
||||
console.log(index,222)
|
||||
},
|
||||
|
||||
// 滚动
|
||||
|
@ -172,16 +179,15 @@
|
|||
setTimeout(()=>{
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.selectAll('.posir').boundingClientRect().exec((res)=>{
|
||||
console.log(res,234)
|
||||
let nodes = res[0]
|
||||
let rel =[];
|
||||
nodes.map(item=>{
|
||||
rel.push(item.top)
|
||||
rel.push(item.top-uni.getSystemInfoSync().statusBarHeight-50-this.heightData)
|
||||
})
|
||||
this.topList = rel
|
||||
// console.log(this.topList,234)
|
||||
})
|
||||
},200)
|
||||
|
||||
},
|
||||
|
||||
// 跳转详情页
|
||||
|
@ -212,5 +218,5 @@
|
|||
.cate-txt{
|
||||
display: flex;
|
||||
}
|
||||
.cate-title{width: 100%;font-size: 24rpx;line-height: 1.5;padding-bottom: 30rpx;color: #666;}
|
||||
.cate-title{position: absolute;left:0; top:0; width: 100%; background-color: #fff; font-size: 24rpx;line-height: 60rpx;color: #666; z-index: 9;text-indent: 20rpx;}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="pad-x180">
|
||||
<status-nav :ifReturn="false" titleColor="#FFFFFF" navBarTitle="个人中心" backgroudColor="#fe4b57"></status-nav>
|
||||
<view class="head-box" style="background: linear-gradient( to top, #ff3574 0%, #fe4b57 100%); padding: 2px 0 20px; margin-top: -12px;">
|
||||
<view class="head-box" style="background: linear-gradient( to top, #ff3574 0%, #fe4b57 100%); padding: 0 0 20px; margin-top: -20rpx;">
|
||||
<view class="mar-zy40 mar-s20 mar-x90 disac colf fon36">
|
||||
<image :src="userImg" mode="aspectFill" style="width: 126rpx;height: 126rpx;border-radius: 100%;border: 6rpx solid #FFFFFF;"></image>
|
||||
<view class="mar-z30">{{userName}}</view>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="pad-x180">
|
||||
<status-nav :ifReturn="false" titleColor="#FFFFFF" navBarTitle="首页" backgroudColor="#fe4b57"></status-nav>
|
||||
<view class="head-box" style="background: linear-gradient( to top, #ff3574 0%, #fe4b57 100%); padding: 2px 0 20px; margin-top: -12px;">
|
||||
<view class="head-box" style="background: linear-gradient( to top, #ff3574 0%, #fe4b57 100%); padding: 0 0 20px; margin-top: -20rpx;">
|
||||
<view class=" mar-zy40 radius30 pad-zy30 disac" style="background-color: rgba(255, 255, 255, 0.2);">
|
||||
<image src="/static/public/icon-search.png" mode="widthFix" style="width: 40rpx;height: 40rpx;"></image>
|
||||
<input @confirm="goSearch" v-model="keyword" class="width100 colf fon30 mar-z20" type="text" placeholder="搜索" style="height: 90rpx;" placeholder-style="color: #FFFFFF">
|
||||
|
|
Loading…
Reference in New Issue