分类页改版、购物车删除功能、提交订单表单验证修改完成
parent
47d0c1f1b3
commit
ebecce786d
|
@ -12,16 +12,16 @@
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20" style="width: 100%;">
|
<view class="pad-zy20" style="width: 100%;position: relative;">
|
||||||
<scroll-view :style="{height: scrollHeight +'px'}" style="padding-bottom: 130rpx;"
|
<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-y="true"
|
||||||
:scroll-into-view="doms"
|
:scroll-into-view="doms"
|
||||||
scroll-with-animation
|
scroll-with-animation
|
||||||
@scroll="scrolls"
|
@scroll="scrolls"
|
||||||
@scrolltolower="scrollBottomEv">
|
@scrolltolower="scrollBottomEv">
|
||||||
<view class="posir" :id="'product'+index" v-for="(item,index) in dataList" :key="index">
|
<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="disac bbt-d9 pad-sx30" @tap="goDetail(item1.id)" v-for="(item1,index1) in item" :key="index1">
|
||||||
<view class="cate-title" v-if="item.length > 0">{{cateList[index].title}}</view>
|
|
||||||
<view class="cate-txt">
|
<view class="cate-txt">
|
||||||
<image class="radius30 flexs borbot-cc" :src="item1.imgsrc" mode="aspectFill" style="width: 240rpx;height: 240rpx;"></image>
|
<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;">
|
<view class="width100 disjb fc mar-z20" style="height: 240rpx;">
|
||||||
|
@ -76,7 +76,8 @@
|
||||||
ifLoading:false,
|
ifLoading:false,
|
||||||
pid:'',//分类id
|
pid:'',//分类id
|
||||||
doms:'',
|
doms:'',
|
||||||
topList:[]
|
topList:[],
|
||||||
|
heightData: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
|
@ -116,7 +117,12 @@
|
||||||
})
|
})
|
||||||
this.dataList[i] = newArr;
|
this.dataList[i] = newArr;
|
||||||
if(i == this.cateList.length-1){
|
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.getNodesInfo();
|
||||||
this.ifLoading = false;
|
this.ifLoading = false;
|
||||||
}
|
}
|
||||||
|
@ -153,6 +159,7 @@
|
||||||
chooseCate(index,id) {
|
chooseCate(index,id) {
|
||||||
this.current =index
|
this.current =index
|
||||||
this.doms = 'product'+index
|
this.doms = 'product'+index
|
||||||
|
console.log(index,222)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 滚动
|
// 滚动
|
||||||
|
@ -172,16 +179,15 @@
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
const query = uni.createSelectorQuery().in(this);
|
const query = uni.createSelectorQuery().in(this);
|
||||||
query.selectAll('.posir').boundingClientRect().exec((res)=>{
|
query.selectAll('.posir').boundingClientRect().exec((res)=>{
|
||||||
console.log(res,234)
|
|
||||||
let nodes = res[0]
|
let nodes = res[0]
|
||||||
let rel =[];
|
let rel =[];
|
||||||
nodes.map(item=>{
|
nodes.map(item=>{
|
||||||
rel.push(item.top)
|
rel.push(item.top-uni.getSystemInfoSync().statusBarHeight-50-this.heightData)
|
||||||
})
|
})
|
||||||
this.topList = rel
|
this.topList = rel
|
||||||
|
// console.log(this.topList,234)
|
||||||
})
|
})
|
||||||
},200)
|
},200)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转详情页
|
// 跳转详情页
|
||||||
|
@ -212,5 +218,5 @@
|
||||||
.cate-txt{
|
.cate-txt{
|
||||||
display: flex;
|
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>
|
</style>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="pad-x180">
|
<view class="pad-x180">
|
||||||
<status-nav :ifReturn="false" titleColor="#FFFFFF" navBarTitle="个人中心" backgroudColor="#fe4b57"></status-nav>
|
<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">
|
<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>
|
<image :src="userImg" mode="aspectFill" style="width: 126rpx;height: 126rpx;border-radius: 100%;border: 6rpx solid #FFFFFF;"></image>
|
||||||
<view class="mar-z30">{{userName}}</view>
|
<view class="mar-z30">{{userName}}</view>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="pad-x180">
|
<view class="pad-x180">
|
||||||
<status-nav :ifReturn="false" titleColor="#FFFFFF" navBarTitle="首页" backgroudColor="#fe4b57"></status-nav>
|
<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);">
|
<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>
|
<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">
|
<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