wangfukang 2 weeks ago
parent
commit
dfe5eeca24
  1. 277
      components/tab-bar/postList.vue
  2. 16
      package1/buyFood/buyFood.vue
  3. 3
      package1/group/groupBuyList.vue
  4. 53
      package1/group/groupBuySingle.vue

277
components/tab-bar/postList.vue

@ -1,15 +1,63 @@
<template>
<!-- 鱼塘 -->
<view class="page1">
<view class="tab-mask" v-if="showMoreTab == true"></view>
<view class="title">
<view class="title-sreach">
<view class="title-sreach" :style="{'margin-top': menuButtonInfo.top +'px'}">
<uni-icons type="search"></uni-icons>
<input type="text" placeholder="搜索" />
<view class="">
<input type="text" placeholder="搜索"
style="flex:1;line-height: 33px;height: 33px;width: 70%;padding: 0 10px;" />
<view class="sreach-btn">
搜索
</view>
</view>
</view>
<view class="nav-tab">
<view class="tab-box">
<view @tap="checkTab(index)" class="tab1" v-for="(item,index) in tabList" :key="index">
<view class="" style=""
:style="{'font-size':tabIndex == index?'14px':'12px','font-weight':tabIndex == index?'700':'400'}">
{{item.name}}
</view>
<view class="black-line" v-if="tabIndex == index"></view>
</view>
<view class="down-tab" @tap="showMoreTab = true">
<uni-icons type="down"></uni-icons>
</view>
</view>
<view class="up-tab" v-if="showMoreTab == true">
<view>
<view
style="height: 25px;line-height: 25px;width: 100%;padding-left: 12px;font-size: 14px;font-weight: 700;">
更多分类
<text style="font-size: 12px;color: rgba(0, 35, 28, 0.5);">
点击进入分类
</text>
</view>
<view class="down-tab" @tap="showMoreTab = false">
<uni-icons type="down"></uni-icons>
</view>
</view>
<view class="tanchu-tab">
<view class="tanchu1" v-for="(item,index) in tabList" :key="index"
:style="{'background':tabIndex == index?'rgba(0, 35, 28, 1)':'#fff','color':tabIndex == index?'rgba(166, 255, 234, 1)':''}">
{{item.name}}
</view>
</view>
</view>
</view>
<view class="shop-list">
<view class="shop1" v-for="(item,index) in shopList" :key="index">
<img :src="item.img" alt="" />
<view class="shop-name">
{{item.shopName | sliceMsg}}
</view>
</view>
</view>
<view class="huodong">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/bc6b887514a5469a938cdd0001e841c2.png" alt="" style="margin-right: 5px;" />
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/90a37f3f8a204d7eaa8ea2d3293e1086.png" alt="" style="margin-left: 5px;" />
</view>
</view>
</template>
@ -17,10 +65,85 @@
export default {
data() {
return {
shopList: [{
shopName: '高徒课堂',
img: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png'
}, {
shopName: '赵一鸣',
img: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png'
}, {
shopName: '蜜雪冰城',
img: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png'
}, {
shopName: '怂柠',
img: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png'
}, {
shopName: '麻辣烫酸辣粉',
img: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png'
}, {
shopName: '鲸鱼AI教育',
img: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png'
}],
showMoreTab: false,
tabIndex: 0,
tabList: [{
name: '兼职',
index: 0
}, {
name: '广告',
index: 1
}, {
name: '活动',
index: 2
}, {
name: '美妆个护',
index: 3
}, {
name: '考学职称',
index: 4
}, {
name: '技能服务',
index: 5
}, {
name: '省钱神券',
index: 6
}, {
name: '推荐',
index: 7
}, {
name: '摄影',
index: 8
}, {
name: '吃饭',
index: 8
}, {
name: '电影',
index: 8
}, {
name: '唱歌',
index: 8
}, {
name: '美妆个护',
index: 8
}, {
name: '考学职称',
index: 8
}, {
name: '技能服务',
index: 8
}, {
name: '二手旧物',
index: 8
}],
menuButtonInfo: {}
}
},
props:{
filters:{
sliceMsg(val) {
return val.slice(0, 4);
}
},
props: {
},
watch: {
@ -39,14 +162,17 @@
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.$forceUpdate()
},
getShopList(){
checkTab(index) {
this.tabIndex = index
},
getShopList() {
}
}
}
</script>
<style>
<style lang="scss">
page {
width: 100%;
height: 100%;
@ -67,13 +193,146 @@
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/25cad6ddbfb44230abf0c4d1a6259e16.png') no-repeat;
width: 100%;
height: 190px;
height: 100px;
background-size: 100%;
}
.title-sreach {
width: 100%;
width: 70%;
display: flex;
height: 66rpx;
line-height: 66rpx;
display: flex;
background: #fff;
border-radius: 66rpx;
padding-left: 10px;
margin-left: 10px;
}
.sreach-btn {
width: 50px;
height: 25px;
line-height: 25px;
background: rgba(0, 35, 28, 1);
color: rgba(166, 255, 234, 1);
border-radius: 30px;
text-align: center;
margin: 4px;
}
.tab-box {
display: flex;
height: 200rpx;
height: 30px;
line-height: 20px;
padding-left: 12px;
width: 100%;
overflow: scroll;
white-space: nowrap;
position: relative;
}
.tab1 {
margin-right: 18px;
}
.nav-tab {
position: relative;
}
.black-line {
width: 25px;
height: 3px;
background: #000;
border-radius: 3px;
margin: 0 auto;
}
.down-tab {
position: absolute;
top: 0;
right: 0;
background: #fff;
width: 55px;
height: 20px;
text-align: right;
line-height: 20px;
padding-right: 7px;
background: linear-gradient(to right, transparent 0%, #ffffff 60%, #ffffff 100%);
}
.up-tab {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 200px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
z-index: 99;
background: #F5F8F5;
}
.tab-mask {
width: 100%;
height: 100%;
overflow: hidden;
position: absolute;
top: 100px;
left: 0;
background: rgba(0, 0, 0, 0.2);
z-index: 97;
}
.tanchu-tab {
display: flex;
flex-wrap: wrap;
}
.tanchu1 {
width: 80px;
height: 30px;
background: #fff;
border-radius: 10px;
text-align: center;
margin: 10px 0 0 10px;
line-height: 30px;
font-size: 13px;
}
.shop-list {
display: flex;
white-space: nowrap;
width: 100%;
padding: 0 12px;
overflow: scroll;
margin-top: 15px;
}
.shop1 {
height: 70px;
width: 50px;
text-align: center;
margin-right: 18px;
img {
width: 50px;
height: 50px;
border-radius: 50px;
}
}
.shop-name {
height: 20px;
line-height: 20px;
font-weight: 600;
}
.huodong{
padding: 0 12px;
display: flex;
height: 85px;
margin-top: 12px;
img{
height: 85px;
flex: 1;
}
}
</style>

16
package1/buyFood/buyFood.vue

@ -340,19 +340,16 @@
alt=""
style="width: 90rpx;height: 90rpx;border-radius: 90rpx;margin: 0 auto;display: block;" />
</view>
<view class="kaituan22">
<view class="weipincheng">
+
</view>
</view>
<view class="kaituan22">
<view class="kaituan22" v-for="n in groupItem.groupRule.groupCount - 1">
<view class="weipincheng">
+
</view>
</view>
</view>
<view class="kaituan3">
剩余<text style="font-size: 32rpx;font-weight: 700;padding: 0 20rpx;color: red;">23:59:23</text>结束
<view class="kaituan3" style="display: flex;margin-left: auto;margin-right: auto;width: 50%;">
剩余
<uni-countdown :show-day="false" :hour="23" :minute="59" :second="59" :font-size="16" color="red" />
结束
</view>
<view class="kaituan4">
<button open-type="share" style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;">
@ -1304,4 +1301,7 @@
line-height: 80rpx;
margin: 0 auto;
}
button::after{
border: 0;
}
</style>

3
package1/group/groupBuyList.vue

@ -333,8 +333,6 @@
that.shopArea.push(res.result[m])
}
}
console.log(that.shopArea)
console.log(that.shopArea)
}
} else {
that.tui.toast(res.message)
@ -397,7 +395,6 @@
})
}else if(type == 'search'){
if(item){
console.log("11111",item)
uni.navigateTo({
url:'/package1/group/searchGroup?shopType=' + (item.value || '')
})

53
package1/group/groupBuySingle.vue

@ -91,7 +91,7 @@
</swiper>
</view>
<!-- 分类栏移到goods-list外层position:sticky才能生效 -->
<view class="container" style="display: flex;height: 72%;">
<view class="container" style="display: flex;height: 72%;margin-top: 20rpx;">
<scroll-view scroll-y id="menuList" style="border-right: 1px solid #eee;font-weight: 700;font-size: 28rpx;height: 100%;width: 160rpx;">
<view class="menu1" @tap="checkTab(index)" v-for="(item,index) in menuList" :key="index"
:style="{'border-top-right-radius':item.checked?'20rpx':'','border-bottom-right-radius':item.checked?'20rpx':'','color':item.checked?'rgba(0, 35, 28, 1)':'#777','background':item.checked?'#fff':''}">
@ -143,6 +143,7 @@
</view>
</view>
<uni-load-more :status="loadStatus" @change="onChange" />
<view style="width: 100%;height: 160rpx;"></view>
</scroll-view>
</view>
@ -285,7 +286,25 @@
</view>
</view>
</view>
<template
v-if="(groupId == null || groupId == '') && isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
<view class="spec11">
成团选择
</view>
<view class="goods-team">
<view
:class="selectedGroupRule && selectedGroupRule.groupCount === rule.groupCount ? 'team-check' : 'team1'"
v-for="(rule, rIndex) in currentItem.productGroupBuyPrices" :key="rIndex"
@tap="selectGroupRule(rule)">
<view class="team11">
{{parseFloat(rule.groupPrice).toFixed(2)}}
</view>
<view class="team11">
{{rule.groupCount}}人团
</view>
</view>
</view>
</template>
<view class="spec11" v-if="moreBuyList.length > 0 && isPintuan" style="display: flex;">
<view style="flex: 1;">
搭配小食
@ -321,27 +340,6 @@
</view>
</view>
</view>
<template
v-if="groupId == '' && isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
<view class="spec11" style="margin-top: -30rpx;">
成团选择
</view>
<view class="goods-team">
<view
:class="selectedGroupRule && selectedGroupRule.groupCount === rule.groupCount ? 'team-check' : 'team1'"
v-for="(rule, rIndex) in currentItem.productGroupBuyPrices" :key="rIndex"
@tap="selectGroupRule(rule)">
<view class="team11">
{{parseFloat(rule.groupPrice).toFixed(2)}}
</view>
<view class="team11">
{{rule.groupCount}}人团
</view>
</view>
</view>
</template>
<view style="width: 100%;height: 160rpx;"></view>
</scroll-view>
<view class="bottom" style="padding-bottom: 40rpx;height: 160rpx;z-index: 10;">
@ -377,11 +375,8 @@
<view class="car-close" @tap="$refs.pintuanGroupPopup.close()">
<uni-icons type="close" size="30" color="#fff"></uni-icons>
</view>
<view class="goods-top">
快来加入一起成团吧
</view>
<view class="goods-top">
可以选取任意拼团商品下单
<view class="goods-top" style="font-size: 14px;font-weight: 700;">
快来加入拼团吧可以选取任意拼团商品下单
</view>
<scroll-view scroll-y style="max-height: 50vh;">
<template>
@ -1898,7 +1893,7 @@
.goods-team {
width: 100%;
min-height: 180rpx;
min-height: 130rpx;
}
.list-right {

Loading…
Cancel
Save