新增首页、分类页、优化在线客服组件、优化商品列表组件

master
chen 2022-02-14 19:45:52 +08:00
parent 7b38c0de7b
commit 03711f6a13
26 changed files with 602 additions and 423 deletions

View File

@ -13,9 +13,11 @@
// //
toolAll.tools.clearClog(); toolAll.tools.clearClog();
// //
this.statusBarH(); // this.statusBarH();
uni.setStorageSync('statusBar',uni.getSystemInfoSync().statusBarHeight);
this.log(uni.getStorageSync('statusBar'),'App.vue第18行')
// //
toolAll.tools.isVedio(); // toolAll.tools.isVedio();
// //
// uni.request({ // uni.request({
// url: `${this.globalData.domainName}index/mini-program-setting`, // url: `${this.globalData.domainName}index/mini-program-setting`,
@ -70,5 +72,5 @@
@import url("./commons/animate.min.css"); @import url("./commons/animate.min.css");
/* 动画样式 end */ /* 动画样式 end */
page {background-color: rgba(244, 244, 244, 1);} page {background-color: rgba(255, 255, 255, 1);}
</style> </style>

View File

@ -30,12 +30,14 @@
.home-quan-box image:last-child{width: 96rpx;height: 96rpx;margin-top: 56rpx;} .home-quan-box image:last-child{width: 96rpx;height: 96rpx;margin-top: 56rpx;}
.shopKf{position: fixed;right: 16rpx;bottom: 140rpx;z-index: 999;} .shopKf{position: fixed;right: 16rpx;bottom: 140rpx;z-index: 999;}
/* 分类 */ /* 分类 */
.catemo{color: #4D4D4D;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;} .sort-box {background-color: #ececee;position: sticky;z-index: 6;}
.cateActive{background-color: #F5F5F5;border-radius: 10rpx 0rpx 0rpx 10rpx;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;} .screen-box{position: fixed;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.5);z-index: 12;}
.cate-tu-item{padding: 16rpx 20rpx;background-color: #DFDFDF;} .screen-box > view{background-color: #FFFFFF;margin-left: 200rpx; height: 100%;float: right;padding: 50rpx 30rpx;box-sizing: border-box;}
.cate-box{position: fixed;top: 0;left: 0;bottom: 140rpx;background-color: #FFFFFF;} .sort-price input {height: 50rpx;border: 2rpx solid #8c8c9b;}
.list-min{min-height: 260rpx;} .screen-btn {position: absolute;bottom: 30rpx;right: 30rpx;left: 30rpx;}
.cate-box .fon26 .mar-s20:first-child {margin-top: 50rpx;} .screen-btn view {height: 80rpx;width: 229rpx;text-align: center;line-height: 80rpx;}
.screen-btn view:first-child{border: 2rpx solid #8c8c9b;}
.screen-btn view:last-child{border: 2rpx solid #000000;background-color: #000000;}
/* 搜索 */ /* 搜索 */
.search-input-box{width: 100%;padding-bottom: 20rpx;} .search-input-box{width: 100%;padding-bottom: 20rpx;}
.tank-box{margin: 0 85rpx;} .tank-box{margin: 0 85rpx;}
@ -337,6 +339,8 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.width55{width: 55%;} .width55{width: 55%;}
.width50{width: 50%;} .width50{width: 50%;}
.width48{width: 48%;} .width48{width: 48%;}
.width47{width: 47%;}
.width46{width: 46%;}
.width45{width: 45%;} .width45{width: 45%;}
.width33{width: 33%;} .width33{width: 33%;}
.width25{width: 25%;} .width25{width: 25%;}
@ -412,12 +416,16 @@ button:after{content: none!important;}
.col7D{color: #7D7D7D;} .col7D{color: #7D7D7D;}
.colB3{color: #B3B3B3;} .colB3{color: #B3B3B3;}
.col5b{color: #5B5B5B;} .col5b{color: #5B5B5B;}
.colpeili{color: #868695;}
/* 字体位置 */ /* 字体位置 */
.tc{text-align: center;} .tc{text-align: center;}
.tright{text-align: right;} .tright{text-align: right;}
/* 行间距 */ /* 行间距 */
.linh40{line-height: 40rpx;} .linh40{line-height: 40rpx;}
.linh50{line-height: 50rpx;}
.linh60{line-height: 60rpx;}
.linh70{line-height: 70rpx;}
/* 粗体 */ /* 粗体 */
.bold{font-weight: bold;} .bold{font-weight: bold;}
@ -428,6 +436,7 @@ button:after{content: none!important;}
/* 背景颜色 */ /* 背景颜色 */
.pbackc{background-color: #3875F6;} .pbackc{background-color: #3875F6;}
.bacf{background-color: #FFFFFF;} .bacf{background-color: #FFFFFF;}
.bac0{background-color: #000000;}
.bcdb{background-color: #DBDBDB;} .bcdb{background-color: #DBDBDB;}
.bcf8{background: #F85050;} .bcf8{background: #F85050;}
.bacf5{background: #F5F5F5;} .bacf5{background: #F5F5F5;}
@ -551,6 +560,8 @@ button:after{content: none!important;}
.pad-x36{padding-bottom: 36rpx;} .pad-x36{padding-bottom: 36rpx;}
.pad-x40{padding-bottom: 40rpx;} .pad-x40{padding-bottom: 40rpx;}
.pad-x50{padding-bottom: 50rpx;} .pad-x50{padding-bottom: 50rpx;}
.pad-x120{padding-bottom: 120rpx;}
.pad-x140{padding-bottom: 140rpx;}
.pad-x160{padding-bottom: 160rpx;} .pad-x160{padding-bottom: 160rpx;}
.pad-x180{padding-bottom: 180rpx;} .pad-x180{padding-bottom: 180rpx;}
.pad-x260{padding-bottom: 260rpx;} .pad-x260{padding-bottom: 260rpx;}

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 3180711 */ font-family: "iconfont"; /* Project id 3180711 */
src: url('https://at.alicdn.com/t/font_3180711_ngoezww1u8.woff2?t=1644748713104') format('woff2'), src: url('https://at.alicdn.com/t/font_3180711_dt5ycve1667.woff2?t=1644838459299') format('woff2'),
url('https://at.alicdn.com/t/font_3180711_ngoezww1u8.woff?t=1644748713104') format('woff'), url('https://at.alicdn.com/t/font_3180711_dt5ycve1667.woff?t=1644838459299') format('woff'),
url('https://at.alicdn.com/t/font_3180711_ngoezww1u8.ttf?t=1644748713104') format('truetype'); url('https://at.alicdn.com/t/font_3180711_dt5ycve1667.ttf?t=1644838459299') format('truetype');
} }
.icon { .icon {
@ -13,6 +13,58 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-customer-black:before {
content: "\ec2e";
}
.icon-customer:before {
content: "\e628";
}
.icon-check:before {
content: "\e61e";
}
.icon-del-white:before {
content: "\e61f";
}
.icon-screen:before {
content: "\e60b";
}
.icon-search:before {
content: "\e653";
}
.icon-caidan-mo:before {
content: "\e73e";
}
.icon-renwu-mo:before {
content: "\e73f";
}
.icon-shopp-cart:before {
content: "\e73d";
}
.icon-caidan-active:before {
content: "\e608";
}
.icon-renwu-acitve:before {
content: "\e67c";
}
.icon-home-mo:before {
content: "\e673";
}
.icon-home-active:before {
content: "\e674";
}
.icon-return:before { .icon-return:before {
content: "\e600"; content: "\e600";
} }

View File

@ -5,6 +5,7 @@
background: isGradualChange ? `linear-gradient( to ${direction}, ${colorOne} 0%, ${colorTwo} 20%, ${colorThree} 80%, ${colorFour} 100%)` : `url(${backgroundImage}) ${backgroundColor} `, background: isGradualChange ? `linear-gradient( to ${direction}, ${colorOne} 0%, ${colorTwo} 20%, ${colorThree} 80%, ${colorFour} 100%)` : `url(${backgroundImage}) ${backgroundColor} `,
boxShadow: `-10rpx 0rpx 20rpx rgba( 0, 0, 0, ${boxShadowNum})` boxShadow: `-10rpx 0rpx 20rpx rgba( 0, 0, 0, ${boxShadowNum})`
}"> }">
<!-- 后台动态改变的icon与标题 start -->
<!-- tab-图标列表 --> <!-- tab-图标列表 -->
<view class="item-box" :style="{marginBottom: marginBottomNum +'px'}"> <view class="item-box" :style="{marginBottom: marginBottomNum +'px'}">
<view @tap="choosefoot(index)" <view @tap="choosefoot(index)"
@ -24,6 +25,7 @@
:style="{width:100 / imgList.length +'%', color:newcurrent == index ? colorActive : colorMo}" :style="{width:100 / imgList.length +'%', color:newcurrent == index ? colorActive : colorMo}"
v-for="(itemt,index) in titleList" :key="index">{{itemt}}</view> v-for="(itemt,index) in titleList" :key="index">{{itemt}}</view>
</view> </view>
<!-- 后台动态改变的icon图 end -->
</view> </view>
</view> </view>
</template> </template>

View File

@ -0,0 +1,127 @@
<template>
<view>
<view class="swiper-item mar-x40" v-for="(item,index) in list" :key="index">
<!-- 活动商品 start -->
<h1 style="" class="fon36 bold">{{item.title}}</h1>
<view class="colpeili fon26 mar-s20 mar-x40 clips1">{{item.content}}</view>
<view class="posir">
<image class="radius30" :src="item.mainImg" mode="aspectFill" style="height: 425rpx;width: 100%;"></image>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20" style="background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;"></view>
</view>
<!-- 活动商品 end -->
<!-- 子商品 start -->
<view class="disjbac fw">
<view class="width47 mar-s50 posir" v-for="(childrenitem,childrenindex) in item.childrenList" :key="childrenindex">
<image :src="childrenitem.childrenImg" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{childrenitem.childrenTitle}}</view>
<view class="fon30 colpeili">{{childrenitem.childrenPrice}}</view>
<view v-if="childrenitem.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20" style="background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;"></view>
</view>
</view>
<!-- 子商品 end -->
</view>
</view>
</template>
<script>
export default {
name:"list-one",
props:{
list:{
type:Array,
default:()=>{
return [
{
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
}
]
},
{
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
}
]
},
{
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
}
]
}
]
}
}
},
data() {
return {
};
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,52 @@
<template>
<view class="disjbac fw">
<view class="width47 mar-s50 posir" v-for="(item,index) in list" :key="index">
<image :src="item.imgSrc" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.title}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20" style="background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;"></view>
</view>
</view>
</template>
<script>
export default {
name:"list-two",
props:{
list:{
type:Array,
default:()=>{
return [
{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:true,
},
{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
}
]
}
}
},
data() {
return {
};
}
}
</script>
<style>
</style>

View File

@ -1,9 +1,19 @@
<template> <template>
<view> <view>
<view @tap="lianK" :style="{background:publicColor,right:nright+'rpx',bottom:nbottom+'rpx'}" :class="isSmall?'smallImg':''" class="fw posir" style="position: fixed;z-index: 2; width: 120rpx;height: 120rpx;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.22);"> <view @tap="lianK"
<image class="posia" src="/static/public/btnKF.png" style="width: 50rpx;height: 50rpx;top: 20rpx;" mode=""></image> :style="{
<view class="colf fon20 posia" style="bottom: 20rpx;">在线客服</view> background: backgroundColor,
<button class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact">客服</button> right:nright+'rpx',
bottom:nbottom+'rpx',
boxShadow: `0rpx 0rpx 30rpx rgba(0,0,0,${shadowNum})`,
borderRadius: radiusNum,
width: widthHeight,
height: widthHeight}"
class="customer-box">
<i class="icon" :class="['icon-customer','icon-customer-black'][iconNum]" style="font-size: 70rpx;"></i>
<!-- <image class="posia" src="/static/public/btnKF.png" style="width: 50rpx;height: 50rpx;top: 20rpx;" mode=""></image> -->
<view v-if="showText" class="fon20" style="margin-top: -20rpx;">线</view>
<button class="fon24 posia-op" open-type="contact"></button>
</view> </view>
</view> </view>
</template> </template>
@ -12,9 +22,30 @@
export default { export default {
name:"public-customer", name:"public-customer",
props:{ props:{
nright:{// //
widthHeight:{
type:String,
default:'110rpx'
},
//
backgroundColor:{
type:String,
default:'#000000'
},
// 0~1
shadowNum:{
type:Number, type:Number,
default:30 default:0.55
},
//
radiusNum:{
type:String,
default: '26rpx'
},
//
nright:{
type:Number,
default:20
}, },
nbottom:{// nbottom:{//
type:Number, type:Number,
@ -24,6 +55,16 @@
type:Boolean, type:Boolean,
default:false default:false
}, },
// 线
showText:{
type:Boolean,
default:true
},
//
iconNum:{
type:Number,
default:0
},
nid:{//id nid:{//id
type:String, type:String,
default:'0' default:'0'
@ -50,5 +91,10 @@
</script> </script>
<style> <style>
.smallImg{transform: scale(.8);margin-right: -10rpx;} .customer-box {
position: fixed;z-index: 2;
display: flex;justify-content: center;align-items: center;flex-wrap: wrap;
box-sizing: border-box;
color: #FFFFFF;
}
</style> </style>

View File

@ -6,20 +6,20 @@
<!-- 头部状态栏 start --> <!-- 头部状态栏 start -->
<view class="status-nav" <view class="status-nav"
:style="{background: backgroudColor,height: navBarHeight+'rpx'}"> :style="{background: backgroudColor,height: navBarHeight+'px'}">
<!-- 返回键 --> <!-- 返回键 -->
<view class="return-box" @tap="backEv" v-if="ifReturn" <view class="return-box" @tap="backEv" v-if="ifReturn"
:style="{height: navBarHeight+'rpx'}"> :style="{height: navBarHeight+'px'}">
<i class="icon icon-return" <i class="icon icon-return"
:style="{color: returnColor}"></i> :style="{color: returnColor}"></i>
</view> </view>
<!-- 标题 --> <!-- 标题 -->
<view class="tab-title" :class="['','clips1','clips2'][clipNumber]" v-if="ifTitle" <view class="tab-title" v-if="ifTitle"
:style="{ :style="{
color: titleColor, color: titleColor,
textAlign: ifCenter ? 'center' : 'left', justifyContent: ifCenter ? 'center' : '',
padding: ifCenter ? '0px' : '0px 38px'}"> padding: ifCenter ? '0px' : `${ifReturn ? '0 38' : '0 15'}px`}">
<text>{{navBarTitle}}</text> <view :class="['','clips1','clips2'][clipNumber]" :style="{maxWidth: ifCenter ? '360rpx' : '70%'}">{{navBarTitle}}</view>
</view> </view>
</view> </view>
<!-- 头部状态栏 end --> <!-- 头部状态栏 end -->
@ -38,7 +38,7 @@
// //
navBarHeight: { navBarHeight: {
type:Number, type:Number,
default:110 default:50
}, },
// //
ifReturn:{ ifReturn:{
@ -53,7 +53,7 @@
// //
ifTitle:{ ifTitle:{
type:Boolean, type:Boolean,
default:false default:true
}, },
// //
navBarTitle: { navBarTitle: {
@ -73,7 +73,7 @@
// //
ifCenter: { ifCenter: {
type:Boolean, type:Boolean,
default: false default: true
} }
}, },
data(){ data(){
@ -87,7 +87,6 @@
query.select('.statusHNH').boundingClientRect((rect) => { query.select('.statusHNH').boundingClientRect((rect) => {
uni.setStorageSync('statusHNH',rect.height) uni.setStorageSync('statusHNH',rect.height)
}).exec(); }).exec();
this.log(getApp().globalData.appletName,'status-nav组件打印');
// //
let pages = getCurrentPages(); let pages = getCurrentPages();
@ -125,7 +124,7 @@
.tab-title{ .tab-title{
width: 100%; width: 100%;
font-size: 36rpx;font-weight: bold; font-size: 36rpx;font-weight: bold;
padding: 0rpx; display: flex;
} }
.tab-title text{display: block;margin-top: -4rpx;} .tab-title view{margin-top: -4rpx;}
</style> </style>

View File

@ -7,14 +7,10 @@
:class="['tab__item', {'tab__item--active': currentIndex === index}]" :class="['tab__item', {'tab__item--active': currentIndex === index}]"
:style="{color: (currentIndex === index ? `${itemColor}`: '')}" id="tab_item" :style="{color: (currentIndex === index ? `${itemColor}`: '')}" id="tab_item"
@click="select(item, index)"> @click="select(item, index)">
<view class="tab__item-title">
<!-- 标题 --> <!-- 标题 -->
<slot name="title" :title="item.title"></slot> <view><slot name="title" :title="item.title"></slot></view>
</view>
<!-- 标题 --> <!-- 标题 -->
<view v-if="!showTitleSlot" class="tab__item-title"> <view v-if="!showTitleSlot">{{item.title}}</view>
{{item.title}}
</view>
</view> </view>
</view> </view>
<!-- 下划线 --> <!-- 下划线 -->
@ -129,31 +125,27 @@
.tabBlock { .tabBlock {
position: relative; position: relative;
background: #fff; background: #fff;
.tab { .tab {
position: relative; position: relative;
display: flex; display: flex;
font-size: 28rpx; font-size: 28rpx;
padding-bottom: 15rpx; padding-bottom: 15rpx;
white-space: nowrap; white-space: nowrap;
&__item { &__item {
flex: 1; flex: 1;
// width: 30%; // width: 30%;
text-align: center; text-align: center;
line-height: 90rpx; line-height: 90rpx;
color: $uni-text-color; color: #868695;
&--active { &--active {
color: $uni-color-primary; color: $uni-color-primary;
font-weight: bold;
} }
&-title { &-title {
margin: 0 40rpx; margin: 0 40rpx;
} }
} }
} }
.tab__line { .tab__line {
display: block; display: block;
height: 6rpx; height: 6rpx;
@ -161,7 +153,7 @@
bottom: 20rpx; bottom: 20rpx;
left: 0; left: 0;
z-index: 1; z-index: 1;
border-radius: 3rpx; border-radius: 6rpx;
position: relative; position: relative;
background: $uni-color-primary; background: $uni-color-primary;
} }

View File

@ -1,160 +0,0 @@
<template>
<view>
<view v-if="list.length==0" class="" style="display: flex;flex-direction: column;align-items: center;">
<image src="/static/public/nothing.png" style="width: 474rpx;height: 273rpx;" mode="aspectFill"></image>
<view class="fon24 col3" style="margin-bottom: 60rpx;">暂无内容</view>
</view>
<view class="list-container">
<view id="wf-list" class="list" v-for="(list,listIndex) of viewList" :key="listIndex">
<view @tap="goDetail(listIndex,index)" class="item" style="position: relative;" v-for="(item,index) of list.list" :key="index">
<image style="border-radius: 30rpx;min-height: 260rpx;" @load="handleViewRender(listIndex,index)" @error="handleViewRender(listIndex,index)" :src="item.main_img" mode="widthFix"></image>
<view style="position: absolute;top: 18rpx;right: 18rpx;z-index: 3;" @tap.stop="chooseLike(listIndex,index)">
<!-- <image src="/static/public/like.png" style="width: 69rpx;height: 69rpx;border-radius: 100%;" mode=""></image> -->
<!-- 不喜欢 -->
<image v-if="item.is_collected!=1" style="width: 69rpx;height: 69rpx;border-radius: 100%;" src="/static/public/no-like.png"></image>
<!-- 喜欢 -->
<image v-if="item.is_collected==1" :class="item.is_collected==1?'bounceIn':'bounceOut'" style="width: 69rpx;height: 69rpx;border-radius: 100%;" class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<view style="position: absolute;z-index: 1;bottom: 8rpx;color: #FFFFFF;background: -webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));width: 100%;padding-top: 100rpx;border-bottom-left-radius: 30rpx;border-bottom-right-radius: 30rpx;">
<view style="margin: 20rpx;font-size: 22rpx;line-height: 40rpx;">
<view style="display: flex;align-items: center;font-size: 30rpx;">
<view class="clips1 mar-y10">{{item.title}}</view>
<text v-if="item.isVideo" :style="{fontSize:(nFon-2)+'px',marginLeft:nmarz+'px'}" style="border-radius: 5rpx;padding: 0 6rpx;text-align: center;" class="pbackc flexs fon30"></text>
</view>
<view class="clips1" style="opacity: .7;">{{item.content}}</view>
<view style="display: flex;align-items: center;">
<image :src="item.head_img" style="width: 28rpx;height: 28rpx;border-radius: 100%;" mode=""></image>
<view class="mar-z10" style="opacity: .7;">{{item.name}}</view>
</view>
</view>
</view>
<image v-if="item.isVideo" :style="{width:nWidth+'rpx',height:nHeight+'rpx'}" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);z-index: 3;" src="/static/public/video.png" mode=""></image>
</view>
</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="pu_content" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
</view>
</template>
<script>
export default {
props:{
list:{
type:Array, //
},
nWidth:{
type:String,
default:'120'
},
nHeight:{
type:String,
default:'120'
},
nFon:{
type:String,
default:'15'
},
},
data() {
return {
viewList:[{list:[]},{list:[]}], //
everyNum:2,
jieDuan:false,
pu_content:'是否需要取消收藏?',
isShowT:false,
current:{}
}
},
watch:{
list(oldVal,newVal){
this.init()
}
},
methods: {
comfirmev(){
// console.log('');
this.$emit('comfirmev',this.current)
this.isShowT = false
},
cancleev(){
// console.log('');
this.isShowT = false
},
chooseLike(index,indext){//
// console.log('',index);
if(this.jieDuan==false){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
this.$emit('chooseLike',this.viewList[index].list[indext].id)
this.current = this.viewList[index].list[indext].id
if(this.viewList[index].list[indext].is_collected==1) {
this.isShowT = true
} else {
let maiOjb = {
e:3,//
c:this.viewList[index].list[indext].id,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
}
} else this.jieDuan = true
}
},
goDetail(index,indext){//
if(this.jieDuan==false){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
uni.navigateTo({
// url:'/pagesB/problemDetail/problemDetail?isCate='+this.list[index].isCate
url:'/pagesB/problemDetail/problemDetail?id='+this.viewList[index].list[indext].id+'&category_id='+this.viewList[index].list[indext].category_id
})
} else this.jieDuan = true
}
},
init(){
this.viewList = [{list:[]},{list:[]}];
setTimeout(()=>{
this.handleViewRender(0,0)
},0)
},
handleViewRender(x,y){
const index = this.viewList.reduce((total,current)=>total + current.list.length,0)
if(index>this.list.length-1) {
//
return
};
const query = uni.createSelectorQuery().in(this);
let listFlag = 0;
query.selectAll('#wf-list').boundingClientRect(data => {
listFlag = data[0].bottom - data[1].bottom<=0?0:1;
this.viewList[listFlag].list.push(this.list[index])
}).exec()
},
},
mounted() {
if(this.list.length){
this.init()
}
}
}
</script>
<style lang="stylus" scoped>
.list-container
display flex
justify-content space-between
align-items:flex-start
padding-top 20rpx
.list
width calc(48%)
display flex
flex-direction column
.item
margin-bottom 30rpx
image
width 100%
.desc
padding 20rpx
font-size 22rpx
</style>

View File

@ -273,7 +273,6 @@ const tools = {
} }
}, },
loginEv(){//执行登录事件 loginEv(){//执行登录事件
getApp().log('tools.js第275行打印')
let that = this; let that = this;
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
@ -385,7 +384,6 @@ const tools = {
return newTime; return newTime;
}, },
isVedio(){//是否显示视频内容 isVedio(){//是否显示视频内容
getApp().log(8)
uni.request({ uni.request({
url: `${getApp().globalData.domainName}index/base-config`, url: `${getApp().globalData.domainName}index/base-config`,
method: 'get', method: 'get',

88
main.js
View File

@ -41,56 +41,56 @@ const {log} = console;
Vue.prototype.log = log; Vue.prototype.log = log;
// 动态获取手机电量栏,并设置状态栏高度 // // 动态获取手机电量栏,并设置状态栏高度
Vue.prototype.statusBarH = function(){ // Vue.prototype.statusBarH = function(){
uni.getSystemInfo({ // uni.getSystemInfo({
success: (e) => { // success: (e) => {
// 定义电量栏 // // 定义电量栏
let statusBar = 0; // let statusBar = 0;
// 定义状态栏 // // 定义状态栏
let customBar = 0; // let customBar = 0;
// #ifdef APP-PLUS // // #ifdef APP-PLUS
// app时执行 // // app时执行
// 设置电量栏高度 // // 设置电量栏高度
Vue.prototype.statusBar = e.statusBarHeight; // Vue.prototype.statusBar = e.statusBarHeight;
// 设置状态栏高度 // // 设置状态栏高度
Vue.prototype.customBar = e.statusBarHeight + 45; // Vue.prototype.customBar = e.statusBarHeight + 45;
// #endif // // #endif
// 网页 // // 网页
// #ifdef H5 // // #ifdef H5
statusBar = 0 // statusBar = 0
customBar = e.statusBarHeight + 45 // customBar = e.statusBarHeight + 45
// #endif // // #endif
// 小程序 // // 小程序
// #ifdef MP // // #ifdef MP
statusBar = e.statusBarHeight // statusBar = e.statusBarHeight
customBar = e.statusBarHeight + 45 // customBar = e.statusBarHeight + 45
if (e.platform === 'android') { // if (e.platform === 'android') {
this.$store.commit('SET_SYSTEM_IOSANDROID', false) // this.$store.commit('SET_SYSTEM_IOSANDROID', false)
customBar = e.statusBarHeight + 50 // customBar = e.statusBarHeight + 50
} // }
// #endif // // #endif
// 微信小程序 // // 微信小程序
// #ifdef MP-WEIXIN // // #ifdef MP-WEIXIN
statusBar = e.statusBarHeight; // statusBar = e.statusBarHeight;
// @ts-ignore // // @ts-ignore
const custom = wx.getMenuButtonBoundingClientRect() // const custom = wx.getMenuButtonBoundingClientRect()
customBar = custom.bottom + custom.top - e.statusBarHeight; // customBar = custom.bottom + custom.top - e.statusBarHeight;
// #endif // // #endif
// 这里你可以自己决定存放方式建议放在store中因为store是实时变化的 // // 这里你可以自己决定存放方式建议放在store中因为store是实时变化的
uni.setStorageSync('statusBar',statusBar); // uni.setStorageSync('statusBar',statusBar);
uni.setStorageSync('customBar',customBar); // uni.setStorageSync('customBar',customBar);
// 全局配置域名 // // 全局配置域名
uni.setStorageSync('hostapi',`https://hengmei.scdxtc.cn/api/`); // uni.setStorageSync('hostapi',`https://hengmei.scdxtc.cn/api/`);
} // }
}) // })
} // }

View File

@ -1,158 +1,136 @@
<template> <template>
<view> <view>
<!-- 状态栏 --> <!-- 状态栏 -->
<status-nav :statusBack="false" :titleVal="'分类'" :statusTitle="true"></status-nav> <status-nav
<view class="disje mar-zy20" :style="{paddingTop: (statusHNH+10)+'px'}"> :ifTitle="true"
<template v-if="cateList.length!=0"> :ifReturn="false"
<view class="cate-box" :style="{paddingTop:statusHNH+'px'}" style="overflow: hidden;overflow-y: scroll;"> :ifCenter="true"
<view class="fon26"> :navBarTitle="'分类'"></status-nav>
<view class="mar-s20 flexs" :style="{color : ccurrent==indexc ? publicColor:''}" <view :style="{paddingTop: statusBarHeight+50+'px'}" class="pad-x140">
:class="ccurrent==indexc?'bold cateActive':'catemo'" <view class="pad30 sort-box" :style="{top: statusBarHeight+50+'px'}">
v-for="(itemc,indexc) in cateList" :key="indexc" <view class="col0 fon38 disjbac fon50">
@tap="chooseCate(indexc)">{{itemc.title}}</view> <view class="bold">分类筛选</view>
<i @tap="clikScreenIcon" class="icon icon-screen" style="font-size: 50rpx;"></i>
</view>
<view v-if="chooseCateList.length" class="disac fw fon24">
<view class="disac pad-sx10 pad-zy20 radius20 bac0 colf mar-y20 mar-s20"
v-for="(item,index) in chooseCateList" :key="index"
@tap="delCate(index)">
{{item}}<i class="icon icon-del-white mar-z20" style="font-size: 20rpx;"></i>
</view> </view>
</view> </view>
<view :style="{width:cateW+'px'}" class="flexs" style="height: 10px;"></view>
<view v-show="isLoading" class="pad-x260" style="width: 74%;">
<!-- 热门推荐 -->
<template v-if="ccurrent==0">
<!-- 自定义轮播 -->
<swiper-pu :bannerList="bannerList" :isplay="isAutoPlay" :newHeight="'154'" :newRadius="'10'" :newBottom="'10'"></swiper-pu>
<!-- 自定义二级分类 -->
<view class="mar-x20 mar-s40">
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" @choosecateEv="chooseTwo" :newcateList="cateListTwo"></cate-pu>
</view> </view>
<!-- 列表 --> <!-- 列表 -->
<block v-if="!isHot"> <view class="pad-zy30">
<view v-if="dataList.length!=0"> <list-two></list-two>
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :nFon="'14'" :radiu="true" :nmarz="'6'" :nWidth="'90'" :nHeight="'90'" :list="dataList"></list-pu>
</view> </view>
<view v-else style="padding-top: 150rpx;"> <!-- 筛选框 -->
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="dataList"></list-pu> <view v-show="isScreen" @tap="isScreen=false" class="screen-box" :style="{top:statusBarHeight+50+'px'}">
</view> <view @tap.stop="isScreen=true" class="posir">
</block> <view class="fon24">筛选</view>
<block v-else> <!-- 类型 -->
<view v-if="dataShopList.length!=0" style="margin-top: -20rpx;"> <view v-for="(item,index) in screenList" :key="index">
<view class="pad-sx20"> <view class="fon30 bold mar-sx20">{{item.mainTitle}}</view>
<view style="width: 48.6%;float: left;"> <view class="disac fw fon24">
<view v-if="index1%2==0" v-for="(item1,index1) in dataShopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)"> <view class="disac pad-sx10 pad-zy20 radius20 mar-y20 mar-x20"
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image> :class="childitem.isCheck ? 'bac0 colf' : 'colpeili'"
<view class="pad-zy20 pad-s10 pad-x30"> v-for="(childitem,childindex) in item.childrenList" :key="childindex"
<view class="fon28 bold col3 clips2">{{item1.title}}</view> @tap.stop="chooseCate(index,childindex)">
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral"> {{childitem.title}}<i v-if="childitem.isCheck" class="icon icon-check mar-z20" style="font-size: 30rpx;"></i>
<view class="radius10 colf mar-y10" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;"></view>
</view>
<view class="disac">
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
<view v-if="item1.isIntegral" class="mar-s20">
<view>积分:{{item1.integral}}</view>
<view class="disac mar-s20" v-if="item1.grade!=0">
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>
<span v-if="item1.isXian"></span>
{{item1.zhePrice}}
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view>
<view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
<view class="disac">
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view> </view>
</view> </view>
</view> </view>
<view style="width: 48.6%;float: right;"> <!-- 价格 -->
<view v-if="index1%2!=0" v-for="(item1,index1) in dataShopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)"> <view class="sort-price">
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image> <view class="fon30 bold mar-sx20">价格</view>
<view class="pad-zy20 pad-s10 pad-x30"> <view class="disac fon24">
<view class="fon28 bold col3 clips2">{{item1.title}}</view> <input class="radius20 pad-zy20" v-model="minPrice" type="number" placeholder="0" />
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral"> <view class="mar-zy20">~</view>
<view class="radius10 colf mar-y10" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view> <input class="radius20 pad-zy20" v-model="maxPrice" type="number" placeholder="9999" />
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;"></view>
</view>
<view class="disac">
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
<view v-if="item1.isIntegral" class="mar-s20">
<view>积分:{{item1.integral}}</view>
<view class="disac mar-s20" v-if="item1.grade!=0">
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view> </view>
</view> </view>
<view v-else> <!-- 按钮 -->
<span v-if="item1.isPing"></span> <view class="disjbac fon30 screen-btn">
<span v-if="item1.isXian"></span> <view @tap.stop="isScreen=false" class="radius30 colpeili">取消</view>
{{item1.zhePrice}} <view @tap.stop="defineEv" class="radius30 colf">确定</view>
</view>
</view>
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view>
<view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
<view class="disac">
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
<view v-else class="disjcac fc" style="margin-top: 34%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">暂无内容</view>
</view>
</block>
</template>
<!-- 秃顶种植 -->
<template v-if="ccurrent!=0">
<view v-if="tuList.length!=0">
<cate-tu :isDetail="true" :list="tuList"></cate-tu>
</view>
<view v-else class="disjcac fc" style="margin-top: 60%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">暂无内容</view>
</view>
</template>
</view>
</template>
</view>
<!-- 底部tab --> <!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='1'></foot-tab> <foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='1'></foot-tab>
<!-- 全局客服 -->
<public-customer :nbottom="320"></public-customer>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile>
</view> </view>
</template> </template>
<script> <script>
import swiperPu from '@/components/swiper-pu.vue'; import swiperPu from '@/components/swiper-pu.vue';
import cateTu from '@/components/cate-items/cate-tu.vue'; import cateTu from '@/components/cate-items/cate-tu.vue';
import listTwo from '@/components/list/list-two.vue';
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js'; import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
export default { export default {
components:{ components:{
swiperPu, swiperPu,
cateTu cateTu,
listTwo
}, },
data() { data() {
return { return {
statusHNH:uni.getStorageSync('statusHNH'), statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
chooseCateList:[],//
temporaryCate:[],//
isScreen:false,//
//
screenList:[
{
mainTitle:'类型',
childrenList:[
{
title:'全部',
isCheck:true,
},
{
title:'翡翠',
isCheck:false,
},
{
title:'白玉',
isCheck:false,
},
{
title:'彩宝',
isCheck:false,
},
{
title:'琥珀',
isCheck:false,
},
{
title:'其他',
isCheck:false,
}
]
},
{
mainTitle:'活动',
childrenList:[
{
title:'全部',
isCheck:true,
},
{
title:'折扣',
isCheck:false,
}
]
}
],
minPrice:'',//
maxPrice:'',//
ccurrent:0, ccurrent:0,
cateList:[], cateList:[],
cateListTwo:[// cateListTwo:[//
@ -220,10 +198,6 @@
this.checkSwi() this.checkSwi()
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin()
// console.log(this.category_id);
if(this.category_id!='') this.checkCate(this.category_id)//
this.isAutoPlay = true;
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res); // log('',res);
if(res.code==0){ if(res.code==0){
@ -266,6 +240,90 @@
},error=>{}) },error=>{})
}, },
methods: { methods: {
//
clikScreenIcon(){
this.isScreen = true;
},
//
chooseCate(mainIndex,childrenIndex){
//
this.screenList[mainIndex].childrenList.forEach((item,index)=>{
item.isCheck = false;
})
//
this.temporaryCate[mainIndex] = [];
// true
this.screenList[mainIndex].childrenList[childrenIndex].isCheck = true;
//
this.screenList[mainIndex].childrenList.forEach((item,index)=>{
if(item.isCheck){
if(index!=0){
this.temporaryCate[mainIndex].push(item.title);
} else {
this.temporaryCate.splice(mainIndex,1);
}
}
})
},
//
delCate(index){
this.chooseCateList.splice(index,1);
//
this.screenList.forEach((item1,index1)=>{
item1.childrenList.forEach((item2,index2)=>{
if(index2!=0){
this.screenList[index1].childrenList[index2].isCheck = false;
}
})
})
if(this.chooseCateList.length){
this.chooseCateList.forEach((existItem,existIndex)=>{
//
this.screenList.forEach((item,mainIndex)=>{
let nameIndex = item.childrenList.findIndex((childItem)=>{
return childItem.title == existItem;
})
if(nameIndex!=-1){
this.screenList[mainIndex].childrenList[nameIndex].isCheck = true;
} else {
this.screenList[mainIndex].childrenList[0].isCheck = true;
}
})
//
this.temporaryCate.forEach((temporaryItem,temporaryIndex)=>{
let newIndex = temporaryItem.findIndex(titem=>{
return titem == existItem;
})
if(newIndex==-1){
this.temporaryCate[temporaryIndex].splice(0,1);
}
})
})
} else {// 0
this.screenList.forEach((item1,index1)=>{
item1.childrenList.forEach((item2,index2)=>{
if(index2==0){
this.screenList[index1].childrenList[index2].isCheck = true;
}
})
})
this.temporaryCate = [];
}
},
//
defineEv(){
this.log(this.temporaryCate)
// this.temporaryCate this.chooseCateList
let newChoose = this.temporaryCate.join().split(',');
//
this.chooseCateList = [];
newChoose.forEach(item=>{
if(item!=''){
this.chooseCateList.push(item);
}
})
this.isScreen = false;
},
checkSwi(){ checkSwi(){
checkBanner({position:'category-hot-banner'}).then(res=>{ checkBanner({position:'category-hot-banner'}).then(res=>{
if(res.code==0){ if(res.code==0){
@ -282,7 +340,6 @@
this.bannerList.push(banObj) this.bannerList.push(banObj)
}) })
} }
//
} }
}) })
}, },
@ -322,15 +379,6 @@
} }
this.cateList.unshift(reObj) this.cateList.unshift(reObj)
this.checkCate(this.category_id)// this.checkCate(this.category_id)//
if(this.cateList.length!=0){
setTimeout(()=>{
const query = wx.createSelectorQuery()
query.select('.cate-box').boundingClientRect((rect) => {
// console.log('',rect.width);
this.cateW = rect.width
}).exec()
},300)
}
setTimeout(()=>{this.isLoading = true},500) setTimeout(()=>{this.isLoading = true},500)
} }
},error=>{}) },error=>{})
@ -429,11 +477,6 @@
} }
},error=>{}) },error=>{})
}, },
chooseCate(index){//
this.ccurrent = index
this.checkData(this.cateList[index].id)
// console.log(':',index);
},
chooseTwo(index){// chooseTwo(index){//
this.newCurrent = index this.newCurrent = index
this.isZanw = true; this.isZanw = true;

View File

@ -3,20 +3,37 @@
<!-- 状态栏 --> <!-- 状态栏 -->
<status-nav <status-nav
:ifTitle="true" :ifTitle="true"
:ifReturn="true"></status-nav> :ifReturn="false"
<view :style="{paddingTop: statusBarHeight+110+'rpx'}"> :ifCenter="true"
<view style="position: sticky;z-index: 10;" :style="{top: statusBarHeight+110+'rpx'}"> :navBarTitle="'首页'"></status-nav>
<swiper-tab id="tab" :list="type" v-model="active" @input="clickTab" itemColor="#ff0000" lineColor="#ff0000"> <view :style="{paddingTop: statusBarHeight+50+'px'}">
<view class="pad-sx20 pad-zy40">
<!-- 搜索输入框 start -->
<view class="radius30 disac pad-zy40 pad-sx20 mar-x40" style="background-color: #f2f1f7;">
<image src="/static/constant/icon-search.png" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
<input type="text" style="padding-left: 20rpx;" v-model="searchText" placeholder="搜索" placeholder-style="font-weight: bold;" />
</view>
<!-- 搜索输入框 end -->
<!-- 轮播图 start -->
<swiper-pu :bannerList="bannerList" :isplay="isAutoPlay" :newHeight="'230'" :newRadius="'15'" :newBottom="'10'"></swiper-pu>
<!-- 轮播图 end -->
</view>
<view style="position: sticky;z-index: 10;" :style="{top: statusBarHeight+50+'px'}">
<swiper-tab id="tab" :list="type" v-model="active" @input="clickTab" itemColor="#000000" lineColor="#000000">
<!-- 自定义tabs样式 --> <!-- 自定义tabs样式 -->
<!-- <view slot="title">其其</view> --> <!-- <view slot="title">其其</view> -->
</swiper-tab> </swiper-tab>
</view> </view>
<swiper class="swiper-page" :style="{height:swiperHeight-(statusBarHeight+110)+'px'}" :current="current" @change="swiperChange"> <view class="pad-zy40">
<swiper-item v-for="item in type"> <swiper class="swiper-page mar-s40 pad-x140" :style="{height:swiperHeight-(statusBarHeight+50)+'px'}" :current="current" @change="swiperChange">
<view class="swiper-item">{{item.title}}</view> <swiper-item v-for="item in type" :key="index" class="" style="overflow: hidden;overflow-y: scroll;">
<!-- 列表数据 -->
<list-one></list-one>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view>
<!-- 底部tab --> <!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList"></foot-tab> <foot-tab :titleList="titleList" :imgList="imgList"></foot-tab>
</view> </view>
@ -25,29 +42,28 @@
<script> <script>
import swiperTab from '@/components/swiper-tab/swiper-tab.vue' import swiperTab from '@/components/swiper-tab/swiper-tab.vue'
import swiperPu from '@/components/swiper-pu.vue'; import swiperPu from '@/components/swiper-pu.vue';
import wfallsFlow from '@/components/wfalls-flow' import listOne from '@/components/list/list-one.vue';
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js'; import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
export default { export default {
components:{ components:{
swiperPu, swiperPu,
wfallsFlow swiperTab,
listOne
}, },
data() { data() {
return { return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight, statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
statusHNH:uni.getStorageSync('customBar'), statusHNH:uni.getStorageSync('customBar'),
type: [{ type: [{
title: '全部' title: '翡翠'
}, { }, {
title: '待付款' title: '白玉'
}, { }, {
title: '待发货' title: '彩宝'
}, { }, {
title: '待收货' title: '琥珀'
}, { }, {
title: '已完成' title: '其他'
}, {
title: '已取消'
}], }],
active: 0, active: 0,
current:0, current:0,
@ -175,12 +191,12 @@
} else if(options.invite_code!='' && options.invite_code!=undefined){ } else if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options); this.loginEv(options);
} }
const query = wx.createSelectorQuery() // const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => { // query.select('.statusHNH').boundingClientRect((rect) => {
// log('+',rect.height); // // log('+',rect.height);
uni.setStorageSync('statusHNH',rect.height) // uni.setStorageSync('statusHNH',rect.height)
this.statusHNH = rect.height // this.statusHNH = rect.height
}).exec() // }).exec()
this.checkBCate(); this.checkBCate();
this.checkKey(); this.checkKey();
this.checkSwi();// this.checkSwi();//

View File

@ -405,7 +405,6 @@
if(index==0) { if(index==0) {
this.orderList = this.zanList; this.orderList = this.zanList;
} else if(index==3){ } else if(index==3){
console.log(1234);
} else { } else {
this.orderList = this.zanList.filter(item=>{ this.orderList = this.zanList.filter(item=>{
return item.orderStatus==index; return item.orderStatus==index;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB