订单页面调整

This commit is contained in:
曹磊 2024-07-25 20:58:11 +08:00
parent 6a2a58a331
commit b6d6481478
11 changed files with 254 additions and 174 deletions

View File

@ -167,18 +167,28 @@
<view class="index-card-view-title">
<image class="index-card-image" :src="item.packageImg?item.packageImg:item.massageImg" mode=""></image>
<!-- <view class="index-card-view-title-left">{{item.title}}</view> -->
<view class="index-card-view-title-right">助眠解压</view>
<view class="index-card-view-title-right" >
<text v-if="item.tagsData!=''">{{item.tagsData[0]}}</text>
<text v-else>助眠解压</text>
</view>
<!-- <view class="index-card-view-title-right" >助眠解压</view> -->
</view>
<view class="index-card-mian">
<view class="index-card-mian-title marginTop">{{item.title}}</view>
<view class="index-card-mian-biao marginTop">
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<view class="index-card-mian-biao-left">
助眠减压
</view>
<view class="index-card-mian-biao-right">
<!-- <view class="index-card-mian-biao-right"> -->
<view class="index-card-mian-biao-left">
缓解疲劳
</view>
</view>
</view>
<view class="index-card-mian-time marginTop" v-if="item.duration">
<image src="../../static/rumen-time.png" mode="widthFix"></image>
<span>{{item.duration}}分钟</span>
@ -1129,6 +1139,9 @@
if (res.code == 0) {
if (res.data) {
this.tjData = res.data.list
for(var i=0;i<this.tjData.length;i++){
this.tjData[i].tagsData=this.tjData[i].labels.split(',');
}
}
}
});
@ -1143,6 +1156,9 @@
if (res.code == 0) {
if (res.data) {
this.tjData = res.data.list
for(var i=0;i<this.tjData.length;i++){
this.tjData[i].tagsData=this.tjData[i].labels.split(',');
}
}
}
});
@ -1667,11 +1683,15 @@
margin-left: 10px;
}
.index-card-mian-biao-left{
background-color:rgba(253, 197, 128, 0.2);
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
font-weight: 400;
font-size: 23rpx;
color: #FFA12D;
padding: 0 10rpx;
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
.index-card-mian-biao{
width: 100%;
@ -2158,4 +2178,20 @@
height: 100vh;
overflow: auto;
}
.shop_label{
display: flex;
flex-wrap: wrap;
margin-top: 10rpx;
}
.shop_label span{
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
padding: 0 10rpx;
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
</style>

View File

@ -59,8 +59,11 @@
<span></span>
<span>{{item.oldPrice}}/{{item.serviceCount}}</span>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
@ -121,7 +124,7 @@
if (res.code == 0) {
this.dataList=res.data.records;
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
}
})
@ -179,7 +182,7 @@
margin-top: 10rpx;
}
.shop_label span{
background: #f3f3f3;
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
@ -187,6 +190,7 @@
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
.item-view-bottom-qian{
margin-top: 5px;

View File

@ -1,6 +1,8 @@
<!-- 自定义下拉刷新与上拉加载演示(vue) -->
<template>
<view class="content-view">
<z-paging ref="paging" v-model="dataList" @query="queryList" >
<template #top>
<view class="service-head-top">
<view class="service-head-top-left">
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
@ -15,11 +17,13 @@
</view>
</view>
</view>
<!-- <view class="fenlei">
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/>
</view> -->
<t-refresh ref="refresh" v-if="dataList.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0" >
<template slot="content">
</template>
<template #refresher="{refresherStatus}" >
<custom-refresher :status="refresherStatus" />
</template>
<template #loadingMoreNoMore >
<custom-nomore />
</template>
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<image :src="item.packageImg" mode="" class="item-img"></image>
<view class="item-view">
@ -45,8 +49,11 @@
</view>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
@ -58,18 +65,12 @@
</view>
</view>
</view>
</template>
</t-refresh>
<empty v-if="dataList.length==0"></empty>
</z-paging>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
import tRefresh from "@/components/t-refresh/t-refresh.vue"
export default {
components:{tRefresh,empty},
data() {
return {
loadingType:0,
@ -89,36 +90,33 @@
}
},
onLoad(e){
this.myId = uni.getStorageSync('userId')
if(e){
this.searchValue=e.searchValue
}
this.getData()
},
onPullDownRefresh: function() {
this.page = 1;
this.getData()
// 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)
}
},
input(res) {//
this.searchValue=res;
console.log('----input:', res)
},
//
// loadMore: async function() {
// //loadingType: 0. 1. 2.
// if(this.loadingType==0){
// this.loadingType=2
// //
// setTimeout(()=>{
// this.page++;
// this.loadingType=0;
// this.getData()
// },1000)
// }
// },
searchBtn(){//
if(this.searchValue!=""){
this.getData()
@ -136,17 +134,35 @@
if (this.page == 1) this.dataList = []; //
this.dataList = [...this.dataList, ...res.data.list]; //
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
uni.stopPullDownRefresh()
}
}
});
this.$refs.paging.reload(true);
},
changeClick(index,item){
this.classifyId=item.id
this.searchValue=''
this.getData()
// changeClick(index,item){
// this.classifyId=item.id
// this.searchValue=''
// this.getData()
// },
queryList(pageNo, pageSize) {
console.log("queryList");
const params = {
city:'',
page:pageNo,
limit:pageSize,
title:this.searchValue
}
this.$Request.get('/app/massage/package/findPackageAndMassagePage',params).then(res => {
for(var i=0;i<res.data.list.length;i++){
res.data.list[i].tagsData=res.data.list[i].labels.split(',');
}
this.$refs.paging.complete(res.data.list);
}).catch(res => {
this.$refs.paging.complete(false);
})
},
backImg(){//
uni.reLaunch({
@ -330,16 +346,16 @@
}
.item {
width: 96%;
margin: 0 2% ;
margin: 0 auto;
display: flex;
flex-direction: row;
justify-content: space-between;
height: 140px;
background: #FFFFFF;
border-radius: 21rpx;
margin-top:12px;
margin-top:10px;
align-items: center;
padding: 0px 10px;
padding: 12px;
}
.item-detail {
@ -363,7 +379,7 @@
width:100%;
}
/deep/.zp-paging-container-content{
width: 95%;
width: 100%;
margin: 0 auto;
}
.fenlei{

View File

@ -58,9 +58,11 @@
<span>/{{item.serviceCount}}</span>
<span style="text-decoration: line-through;">{{item.oldPrice}}/{{item.serviceCount}}</span>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
@ -121,7 +123,7 @@
if (res.code == 0) {
this.dataList=res.data.records;
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
}
})
@ -179,7 +181,7 @@
margin-top: 10rpx;
}
.shop_label span{
background: #f3f3f3;
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
@ -187,6 +189,7 @@
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
.item-view-bottom-qian{
margin-top: 5px;

View File

@ -41,10 +41,12 @@
<span>{{item.oldPrice}}</span>
</view>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu" style="align-items: flex-end; ">
<span style="font-size: 26rpx; color: #999; margin-right: 8rpx;">已售</span><span style="font-size: 26rpx; color: #333;">{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
@ -144,7 +146,7 @@
if (this.page == 1) this.dataList = []; //
this.dataList = [...this.dataList, ...res.data.list]; //
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
uni.stopPullDownRefresh()
}
@ -210,7 +212,7 @@
/deep/.refresh-body{
height: 100% !important;
border-top: 2px solid #f7f7f7;
margin: 88px 0px;
margin: 80px 0px;
}
.content-view{
width: 100%;

View File

@ -148,8 +148,11 @@
</view>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
@ -275,7 +278,7 @@
if (res.data) {
this.dataList = res.data.list||{}; //
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
}
}
@ -704,14 +707,18 @@
.shop_label{
display: flex;
flex-wrap: wrap;
margin-top: 10rpx;
}
.shop_label span{
background: #e5e5e5;
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
padding: 2rpx 8rpx;
font-size: 20rpx;
padding: 0 10rpx;
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
.item-view-xiangmu span:nth-child(2){
font-weight: normal;

View File

@ -39,9 +39,12 @@
<span></span>
<span>{{item.oldPrice}}<text v-if="item.type!='104'">/{{item.serviceCount}}</text>{{typeData=='104'?'':typeData=='105'?'':''}}</span>
</view>
<view class="shop_label" v-if="item.tagsData">
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}</span><!-- | 好评{{item.esteemRate}}% -->
@ -233,7 +236,7 @@
/deep/.refresh-body{
height: 100% !important;
border-top: 2px solid #f7f7f7;
margin: 88px 0px;
margin: 80px 0px;
}
.content-view{
width: 100%;

View File

@ -51,9 +51,12 @@
<view class="view-cata">
<view class="item-view-title">{{item.title}}</view>
</view>
<view class="shop_label" v-if="item.tagsData">
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="pace-plan">
<view class="pace-text"><span>{{item.duration}}</span><span>分钟</span></view>
</view>

View File

@ -53,9 +53,12 @@
<!-- <view class="xiaoer item-view-biao">{{item.classifyName}}</view> -->
</view>
<view class="flex" style="margin-top: 10rpx;">
<view class="shop_label" v-if="item.tagsData">
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
</view>
<view class="item-view-bottom-qian">
<span></span>

View File

@ -59,8 +59,11 @@
<span></span>
<span>{{item.oldPrice}}/</span>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
@ -120,7 +123,7 @@
if (res.code == 0) {
this.dataList=res.data.records;
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
}
})

View File

@ -31,8 +31,8 @@
<span>{{item.price}}</span>
<span style="color: #999;text-decoration: line-through;margin-left: 5px;">{{item.oldPrice}}</span>
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
@ -52,8 +52,8 @@
<view class="item-view-jianjie">
{{item.consortiaContent}}
</view>
<view class="shop_label" v-if="tagsData">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span>
<view class="shop_label" v-if="item.tagsData">
<span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view>
<view class="item-view-bottom">
@ -150,9 +150,8 @@
if (this.page == 1) this.dataList = []; //
this.dataList = [...this.dataList, ...res.data.list]; //
for(var i=0;i<this.dataList.length;i++){
this.tagsData=this.dataList[i].labels.split(',');
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
console.log("tagsData",this.tagsData)
uni.stopPullDownRefresh()
}
}
@ -244,16 +243,16 @@
.item-view-bottom-qian span:nth-child(1){
font-weight: 400;
font-size: 25rpx;
color: #F95900;
color: #FF1200;
}
.item-view-bottom-qian span:nth-child(2){
font-weight: bold;
font-size: 36.81rpx;
color: #F95900;
color: #FF1200;
}
.item-view-bottom-qian span:nth-child(3){
font-size: 25rpx;
color: #F95900;
color: #FF1200;
}
.item-view-bottom{
width: 100%;
@ -518,7 +517,7 @@
margin-top: 10rpx;
}
.shop_label span{
background: #f3f3f3;
background: linear-gradient(90deg, #ffefde, #fff7ef);
height: 34rpx;
line-height: 34rpx;
border-radius: 8rpx;
@ -526,6 +525,7 @@
font-size: 22rpx;
margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
}
.shop-arrow{
display: inline-block;