女性专区加上部 tap

This commit is contained in:
Mr.jiang 2024-08-23 09:08:59 +08:00
parent 6ddab227fa
commit 6905a5631a
3 changed files with 178 additions and 115 deletions

View File

@ -173,6 +173,7 @@
this.searchValue = e.searchValue
}
this.tabNav()
this.getData()
},
// onPullDownRefresh: function() {
// this.page = 1;

View File

@ -19,7 +19,9 @@
</view>
</view>
</view>
<view class="fenlei">
<z-tabs class="z-tabs-fenlei" :list="tabListS" @changeClick="changeClick"/>
</view>
</template>
<template #loadingMoreNoMore>
<custom-nomore />
@ -31,7 +33,8 @@
<view class="leftTab">
<scroll-view scroll-y="true" class="tabBox">
<block v-for="(item,index) in tabList" :key="index">
<view class="tabItem" :class="tabCurrent == index?'tabActive':''" @click="changeTab(index,item)">
<view class="tabItem" :class="tabCurrent == index?'tabActive':''"
@click="changeTab(index,item)">
{{item.value}}
</view>
</block>
@ -40,19 +43,23 @@
<!-- 右侧商品 -->
<view class="rightGoods">
<!-- <view class="title">{{productTitle}}</view> -->
<view class="item" v-for="(item,index) in dataList" :key="index+'2'" @click="itemClick(item)">
<view class="item-img">
<image :src="item.massageImg" mode=""></image>
</view>
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<image :src="item.massageImg" mode="" class="item-img"></image>
<view class="item-view">
<view class="view-cata">
<span class="item-view-title">{{item.title}}</span>
<!-- <span class="xiaoer item-view-biao">{{item.classifyName}}</span> -->
<view class="item-view-title">
{{item.title}}
</view>
<view class="item-view-bottom-qian">
<span></span>
<span>{{item.price}}</span>
<span v-if="item.type!='104' && item.type!='105' && item.type!='106'"></span>
<span v-else-if="item.type=='104'">/</span>
<span v-else>/{{item.serviceCount?item.serviceCount:''}}</span>
<span>{{item.oldPrice}}</span>
<span v-if="item.type!='104' && item.type!='105' && item.type!='106'"></span>
<span v-else-if="item.type=='104'">/</span>
<span v-else>/{{item.serviceCount?item.serviceCount:''}}</span>
</view>
<view class="flex" style="margin-top: 10rpx;">
<view class="shop_label" v-if="item.tagsData!=''">
@ -64,7 +71,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
<span>已售</span><span>{{item.sales}}</span>
</view>
<view class="item-view-bottom-btn">
查看
@ -74,13 +81,72 @@
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
export default {
data() {
return {
tabListS:[
{
code: "单项",
id: 1,
name: "",
orderNum: 6,
parentId: 22,
remark: "单项",
status: 1,
type: "",
value: "单项",
},
{
code: "套餐",
id: 104,
name: "",
orderNum: 6,
parentId: 22,
remark: "套餐",
status: 1,
type: "",
value: "套餐",
},
{
code: "疗程",
id: 106,
name: "",
orderNum: 6,
parentId: 22,
remark: "疗程",
status: 1,
type: "",
value: "疗程",
},
{
code: "次卡",
id: 105,
name: "",
orderNum: 6,
parentId: 22,
remark: "次卡",
status: 1,
type: "",
value: "次卡",
},
{
code: "企业",
id: 114,
name: "",
orderNum: 6,
parentId: 22,
remark: "企业",
status: 1,
type: "",
value: "企业",
},
],
loadingType: 0,
myId: '',
// v-model
@ -98,30 +164,29 @@
//
tabCurrent: 0,
productTitle: '氧气罐',
type:'1'
}
},
onLoad() {
onLoad(e) {
this.myId = uni.getStorageSync('userId')
if (e) {
this.searchValue = e.searchValue
}
this.tabNav()
this.getData()
},
// onPullDownRefresh: function() {
// this.page = 1;
// this.getData()
// },
methods: {
//
// loadMore: async function() {
// //loadingType: 0. 1. 2.
// if(this.loadingType==0){
// this.loadingType=2
// //
// setTimeout(()=>{
// this.page++;
// this.loadingType=0;
// this.getData()
// },1000)
// }
// },
changeClick(index,item){
this.type=item.id
this.searchValue=''
this.page = 1;
this.dataList = []
this.getData()
},
tabNav() {
let data = {
type: "服务类型",
@ -156,7 +221,8 @@
by: '3',
status: '1',
classifyId: this.classifyId,
title: this.searchValue
title: this.searchValue,
type:this.type
}
this.$Request.get('/app/artificer/selectMassageTypePage', params).then(res => {
for (var i = 0; i < res.data.list.length; i++) {
@ -185,11 +251,31 @@
this.getData()
},
itemClick(item) {
if (item.type == '104') {
uni.navigateTo({
url: '/pages/my/fuwuDateil?id=' + item.massageTypeId + '&limit=' + this.limit + '&page=' + this
url: '/pages/my/serviceOderDrtail?id=' + item.id + '&limit=' + this.limit + '&page=' + this
.page + '&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} else if (item.type == '105') {
uni.navigateTo({
url: '/pages/my/cikarDrtail?id=' + item.id + '&limit=' + this.limit + '&page=' + this
.page + '&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} else if (item.type == '106') {
uni.navigateTo({
url: '/pages/my/fuwuliaochengDetail?id=' + item.id + '&limit=' + this.limit + '&page=' +
this.page + '&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} else if(item.type == '114'){
uni.navigateTo({
url: '/pages/shop/qiyeDatail?id=' + item.id +'&name=' + 'index'
})
}else {
uni.navigateTo({
url: '/pages/my/fuwuDateil?id=' + item.id + '&limit=' + this.limit + '&page=' + this.page +
'&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
}
}
}
}
@ -201,6 +287,16 @@
margin-top: 106px;
margin-left: 42%;
}
/deep/.z-tabs-item-title /deep/span{
white-space: nowrap;
}
.fenlei{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
}
.body {
// height: 100vh;
display: flex;
@ -209,12 +305,11 @@
.leftTab {
width:19%;
height: 100%;
background: #fff;
background: #ffffff;
// border-radius: 0px 15rpx 0px 0px;
// padding: 24rpx 11rpx;
box-sizing: border-box;
border-top: 1px solid #f7f7f7;
// margin-top: 10px;
position: fixed;
left: 0;
.tabBox {
@ -224,7 +319,7 @@
text-align: center;
padding: 14rpx 0;
// border-radius: 60rpx;
color: #333;
color: #464646;
font-size: 14px;
font-weight: bold;
margin-bottom: 20rpx;
@ -261,17 +356,6 @@
}
}
}
.tab-view {
width: 100%;
display: flex;
flex-direction: column;
position: fixed;
z-index: 999;
background: #fff linear-gradient(60deg, rgba(115, 212, 183, 0.2), rgba(227, 251, 244, 0.1), rgba(193, 236, 223, 0.35));
border-bottom: 1rpx solid #c4ede1;
padding-top: 6rpx;
}
.shop_label {
display: flex;
flex-wrap: wrap;
@ -290,23 +374,15 @@
color: #f68607;
}
/deep/.z-tabs-item-title {
color: #222;
}
/deep/.refresh-body .content {}
/deep/.refresh-body {
height: 100% !important;
border-top: 2px solid #f7f7f7;
margin: 80px 0px;
height: 845px !important;
background-color: #f7f7f7;
}
.content-view {
width: 100%;
height: 100vh;
overflow: hidden;
background-color: #f7f7f7;
}
.item-view-bottom-btn {
@ -314,7 +390,7 @@
width: 131rpx;
height: 55rpx;
line-height: 55rpx;
background: linear-gradient(90deg, #019c88, #0FA78B, #35C495);
background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
border-radius: 10rpx;
font-weight: bold;
font-size: 28rpx;
@ -331,19 +407,18 @@
font-size: 28rpx;
color: #848484;
text-decoration-line: line-through;
margin-left: 5px;
}
.item-view-bottom-qian span:nth-child(3) {
font-size: 28rpx;
color: #848484;
text-decoration-line: line-through;
margin-left: 5px;
color: #FF6000;
}
.item-view-bottom-qian span:nth-child(2) {
font-weight: bold !important;
font-size: 36.81rpx !important;
color: #FF6000 !important;
font-weight: bold;
font-size: 36.81rpx;
color: #FF6000;
}
.item-view-bottom-qian span:nth-child(1) {
@ -367,7 +442,8 @@
.item-view-jianjie {
font-weight: 400;
font-size: 24rpx;
color: #999;
color: #848484;
margin: 5px 0px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
@ -377,7 +453,8 @@
}
.item-view-biao {
border-radius: 15rpx 3rpx 15rpx 3rpx;
padding: 1px 2px;
border-radius: 6rpx;
}
.tuina {
@ -386,13 +463,8 @@
}
.xiaoer {
width: 120rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
background-color: #f1f8d7;
color: #58b314;
font-size: 20rpx;
}
.taishi {
@ -428,13 +500,9 @@
}
.item-view-title {
width: 76%;
font-weight: bold;
font-size: 32rpx;
font-size: 33rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-view {
@ -471,7 +539,6 @@
.item-img image {
width: 100%;
height: 100%;
border-radius: 14rpx;
}
.item {
@ -591,14 +658,14 @@
}
.service-head-top-left span {
width: 180rpx;
height: 60rpx;
background: url('../../static/images/headline.png') 0rpx 26rpx;
height: 100rpx;
background: url('../../static/images/headline.png') 0rpx 50rpx;
background-repeat: no-repeat;
font-weight: bold;
font-size: 34rpx;
color: #171717;
margin-top: 14rpx;
display: flex;
align-items: center;
}
.service-head-top-left {
@ -616,10 +683,4 @@
justify-content: space-between;
background: #fff;
}
.view-cata {
display: flex;
flex-direction: row;
align-items: center;
}
</style>

View File

@ -130,6 +130,7 @@
onLoad() {
this.myId = uni.getStorageSync('userId')
this.tabNav()
this.getData()
},
methods: {
tabNav() {