订单页面调整

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,16 +167,26 @@
<view class="index-card-view-title"> <view class="index-card-view-title">
<image class="index-card-image" :src="item.packageImg?item.packageImg:item.massageImg" mode=""></image> <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-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>
<view class="index-card-mian"> <view class="index-card-mian">
<view class="index-card-mian-title marginTop">{{item.title}}</view> <view class="index-card-mian-title marginTop">{{item.title}}</view>
<view class="index-card-mian-biao marginTop"> <view class="index-card-mian-biao marginTop">
<view class="index-card-mian-biao-left"> <view class="shop_label" v-if="item.tagsData!=''">
助眠减压 <span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view> </view>
<view class="index-card-mian-biao-right"> <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-left">
缓解疲劳
</view>
</view> </view>
</view> </view>
<view class="index-card-mian-time marginTop" v-if="item.duration"> <view class="index-card-mian-time marginTop" v-if="item.duration">
@ -1129,6 +1139,9 @@
if (res.code == 0) { if (res.code == 0) {
if (res.data) { if (res.data) {
this.tjData = res.data.list 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.code == 0) {
if (res.data) { if (res.data) {
this.tjData = res.data.list 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; margin-left: 10px;
} }
.index-card-mian-biao-left{ .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; border-radius: 8rpx;
font-weight: 400; padding: 0 10rpx;
font-size: 23rpx; font-size: 22rpx;
color: #FFA12D; margin-right: 8rpx;
margin-bottom: 8rpx;
color: #f68607;
} }
.index-card-mian-biao{ .index-card-mian-biao{
width: 100%; width: 100%;
@ -2158,4 +2178,20 @@
height: 100vh; height: 100vh;
overflow: auto; 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> </style>

View File

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

View File

@ -1,75 +1,76 @@
<!-- 自定义下拉刷新与上拉加载演示(vue) --> <!-- 自定义下拉刷新与上拉加载演示(vue) -->
<template> <template>
<view class="content-view"> <view class="content-view">
<view class="service-head-top"> <z-paging ref="paging" v-model="dataList" @query="queryList" >
<view class="service-head-top-left"> <template #top>
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image> <view class="service-head-top">
<span>更多推荐</span> <view class="service-head-top-left">
</view> <image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
<view> <span>更多推荐</span>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input" </view>
@clear="clear"> <view>
</uni-search-bar> <uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
<view class="search-btn" @click="searchBtn"> @clear="clear">
搜索 </uni-search-bar>
</view> <view class="search-btn" @click="searchBtn">
</view> 搜索
</view> </view>
<!-- <view class="fenlei"> </view>
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/> </view>
</view> --> </template>
<t-refresh ref="refresh" v-if="dataList.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0" > <template #refresher="{refresherStatus}" >
<template slot="content"> <custom-refresher :status="refresherStatus" />
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)"> </template>
<image :src="item.packageImg" mode="" class="item-img"></image> <template #loadingMoreNoMore >
<view class="item-view"> <custom-nomore />
<view class="item-view-title"> </template>
{{item.title}} <view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
</view> <image :src="item.packageImg" mode="" class="item-img"></image>
<!-- <view class="item-view-xiangmu"> <view class="item-view">
<span class="xiaoer item-view-biao">{{item.classifyName}}</span> <view class="item-view-title">
<span>已售{{item.sales}} | 好评{{item.esteemRate}}%</span> {{item.title}}
</view> --> </view>
<!-- <view class="item-view-xiangmu">
<view class="item-view-bottom"> <span class="xiaoer item-view-biao">{{item.classifyName}}</span>
<view class="item-view-bottom-qian"> <span>已售{{item.sales}} | 好评{{item.esteemRate}}%</span>
<span></span> </view> -->
<span>{{item.price}}</span>
<span v-if="item.type!='104'"> <view class="item-view-bottom">
<view class="item-view-bottom-qian">
<span></span>
<span>{{item.price}}</span>
<span v-if="item.type!='104'">
/{{item.serviceCount?item.serviceCount:''}}{{item.type=='105'||item.type=='106'?'':''}} /{{item.serviceCount?item.serviceCount:''}}{{item.type=='105'||item.type=='106'?'':''}}
</span> </span>
<span v-if="item.type=='104'">/ <span v-if="item.type=='104'">/
</span> </span>
<span v-if="item.type!='104'">{{item.oldPrice}}/{{item.serviceCount?item.serviceCount:''}}{{item.type=='105'||item.type=='106'?'':''}}</span> <span v-if="item.type!='104'">{{item.oldPrice}}/{{item.serviceCount?item.serviceCount:''}}{{item.type=='105'||item.type=='106'?'':''}}</span>
<span v-if="item.type=='104'">{{item.oldPrice}}/</span> <span v-if="item.type=='104'">{{item.oldPrice}}/</span>
</view> </view>
</view> </view>
<view class="shop_label" v-if="tagsData"> <view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span> <span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view> </view>
<view class="item-view-bottom"> <view class="shop_label" v-else>
<view class="item-view-xiangmu"> <span>助眠解压</span>
<span>已售</span><span>{{item.sales}}</span><!-- | 好评{{item.esteemRate}}% --> </view>
</view> <view class="item-view-bottom">
<view class="item-view-bottom-btn"> <view class="item-view-xiangmu">
查看 <span>已售</span><span>{{item.sales}}</span><!-- | 好评{{item.esteemRate}}% -->
</view> </view>
</view> <view class="item-view-bottom-btn">
</view> 查看
</view> </view>
</template> </view>
</t-refresh> </view>
<empty v-if="dataList.length==0"></empty> </view>
</z-paging>
</view> </view>
</template> </template>
<script> <script>
import empty from '@/components/empty.vue'
import tRefresh from "@/components/t-refresh/t-refresh.vue"
export default { export default {
components:{tRefresh,empty},
data() { data() {
return { return {
loadingType:0, loadingType:0,
@ -89,36 +90,33 @@
} }
}, },
onLoad(e){ onLoad(e){
this.myId = uni.getStorageSync('userId') this.myId = uni.getStorageSync('userId')
if(e){ if(e){
this.searchValue=e.searchValue this.searchValue=e.searchValue
} }
this.getData() // this.getData()
},
onPullDownRefresh: function() {
this.page = 1;
this.getData()
}, },
// onPullDownRefresh: function() {
// this.page = 1;
// this.getData()
// },
methods: { methods: {
input(res) {//
this.searchValue=res;
},
// //
loadMore: async function() { // loadMore: async function() {
//loadingType: 0. 1. 2. // //loadingType: 0. 1. 2.
if(this.loadingType==0){ // if(this.loadingType==0){
this.loadingType=2 // this.loadingType=2
// // //
setTimeout(()=>{ // setTimeout(()=>{
this.page++; // this.page++;
this.loadingType=0; // this.loadingType=0;
this.getData() // this.getData()
},1000) // },1000)
} // }
}, // },
input(res) {//
this.searchValue=res;
console.log('----input:', res)
},
searchBtn(){// searchBtn(){//
if(this.searchValue!=""){ if(this.searchValue!=""){
this.getData() this.getData()
@ -136,23 +134,41 @@
if (this.page == 1) this.dataList = []; // if (this.page == 1) this.dataList = []; //
this.dataList = [...this.dataList, ...res.data.list]; // this.dataList = [...this.dataList, ...res.data.list]; //
for(var i=0;i<this.dataList.length;i++){ 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() uni.stopPullDownRefresh()
} }
} }
}); });
this.$refs.paging.reload(true);
}, },
changeClick(index,item){ // changeClick(index,item){
this.classifyId=item.id // this.classifyId=item.id
this.searchValue='' // this.searchValue=''
this.getData() // 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(){// backImg(){//
uni.reLaunch({ uni.reLaunch({
url:'/pages/index/index' url:'/pages/index/index'
}) })
}, },
clear(res) { clear(res) {
this.getData() this.getData()
}, },
@ -174,7 +190,7 @@
url:'/pages/my/fuwuDateil?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon url:'/pages/my/fuwuDateil?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
}) })
} }
} }
} }
} }
@ -329,19 +345,19 @@
height: 100%; height: 100%;
} }
.item { .item {
width: 96%; width: 96%;
margin: 0 2% ; margin: 0 auto;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
height: 140px; height: 140px;
background: #FFFFFF; background: #FFFFFF;
border-radius: 21rpx; border-radius: 21rpx;
margin-top:12px; margin-top:10px;
align-items: center; align-items: center;
padding: 0px 10px; padding: 12px;
} }
.item-detail { .item-detail {
padding: 5rpx 15rpx; padding: 5rpx 15rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -349,7 +365,7 @@
color: white; color: white;
background-color: #007AFF; background-color: #007AFF;
} }
.item-line { .item-line {
position: absolute; position: absolute;
bottom: 0rpx; bottom: 0rpx;
@ -363,7 +379,7 @@
width:100%; width:100%;
} }
/deep/.zp-paging-container-content{ /deep/.zp-paging-container-content{
width: 95%; width: 100%;
margin: 0 auto; margin: 0 auto;
} }
.fenlei{ .fenlei{
@ -457,5 +473,5 @@
background: linear-gradient(60deg,rgba(115, 212, 183, 0.2),rgba(227, 251, 244, 0.1),rgba(193, 236, 223, 0.35)); background: 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; border-bottom:1rpx solid #c4ede1;
} }
</style> </style>

View File

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

View File

@ -41,10 +41,12 @@
<span>{{item.oldPrice}}</span> <span>{{item.oldPrice}}</span>
</view> </view>
</view> </view>
<view class="shop_label" v-if="tagsData"> <view class="shop_label" v-if="item.tagsData!=''">
<span v-for="tag in tagsData" :key="tag">{{tag}}</span> <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"> <view class="item-view-bottom">
<view class="item-view-xiangmu" style="align-items: flex-end; "> <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> <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 = []; // if (this.page == 1) this.dataList = []; //
this.dataList = [...this.dataList, ...res.data.list]; // this.dataList = [...this.dataList, ...res.data.list]; //
for(var i=0;i<this.dataList.length;i++){ 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() uni.stopPullDownRefresh()
} }
@ -210,7 +212,7 @@
/deep/.refresh-body{ /deep/.refresh-body{
height: 100% !important; height: 100% !important;
border-top: 2px solid #f7f7f7; border-top: 2px solid #f7f7f7;
margin: 88px 0px; margin: 80px 0px;
} }
.content-view{ .content-view{
width: 100%; width: 100%;

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/> <z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/>
</view> --> </view> -->
</template> </template>
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) --> <!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) -->
<!-- 注意注意注意字节跳动小程序中自定义下拉刷新不支持slot-scope将导致custom-refresher无法显示 --> <!-- 注意注意注意字节跳动小程序中自定义下拉刷新不支持slot-scope将导致custom-refresher无法显示 -->
@ -37,7 +37,7 @@
<!-- 此处的custom-nomore为demo中自定义的组件非z-paging的内置组件请在实际项目中自行创建这里插入什么view没有更多数据就显示什么view --> <!-- 此处的custom-nomore为demo中自定义的组件非z-paging的内置组件请在实际项目中自行创建这里插入什么view没有更多数据就显示什么view -->
<custom-nomore /> <custom-nomore />
</template> </template>
<!-- 如果希望其他view跟着页面滚动可以放在z-paging标签内 --> <!-- 如果希望其他view跟着页面滚动可以放在z-paging标签内 -->
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)" > <view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)" >
<!-- <view class="item-title">{{item.title}}</view> <!-- <view class="item-title">{{item.title}}</view>
@ -53,9 +53,12 @@
<!-- <view class="xiaoer item-view-biao">{{item.classifyName}}</view> --> <!-- <view class="xiaoer item-view-biao">{{item.classifyName}}</view> -->
</view> </view>
<view class="flex" style="margin-top: 10rpx;"> <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> <span v-for="tag in item.tagsData" :key="tag">{{tag}}</span>
</view> </view>
<view class="shop_label" v-else>
<span>助眠解压</span>
</view>
</view> </view>
<view class="item-view-bottom-qian"> <view class="item-view-bottom-qian">
<span></span> <span></span>
@ -63,7 +66,7 @@
<!-- <span>/{{item.serviceCount}}</span> --> <!-- <span>/{{item.serviceCount}}</span> -->
<span>{{item.oldPrice}}</span> <span>{{item.oldPrice}}</span>
</view> </view>
<view class="item-view-bottom"> <view class="item-view-bottom">
<view class="item-view-xiangmu"> <view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span> <span>已售</span><span>{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
@ -75,10 +78,10 @@
开抢 开抢
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</z-paging> </z-paging>
</view> </view>
</template> </template>
@ -118,7 +121,7 @@
getData(){ getData(){
// console.log("getData"); // console.log("getData");
// let data = { // let data = {
// userId: this.myId, // userId: this.myId,
// page: this.page, // page: this.page,
// limit: this.limit, // limit: this.limit,
// type: '112', // type: '112',
@ -144,7 +147,7 @@
// } // }
// }) // })
// } // }
this.$refs.paging.reload(true); this.$refs.paging.reload(true);
}, },
tabChange(index) { tabChange(index) {
this.tabIndex = index; this.tabIndex = index;
@ -184,9 +187,9 @@
}).catch(res => { }).catch(res => {
this.$refs.paging.complete(false); this.$refs.paging.complete(false);
}) })
} }
}, },
backImg(){// backImg(){//
if(this.text=='my'){ if(this.text=='my'){
uni.reLaunch({ uni.reLaunch({
@ -197,7 +200,7 @@
url:'/pages/index/index' url:'/pages/index/index'
}) })
} }
}, },
clear(res) { clear(res) {
this.getData() this.getData()
}, },
@ -210,7 +213,7 @@
uni.navigateTo({ uni.navigateTo({
url:'/pages/my/miaoShaOderDrtail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+this.text url:'/pages/my/miaoShaOderDrtail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+this.text
}) })
} }
} }
} }
} }
@ -225,7 +228,7 @@
} }
.pace-text{ .pace-text{
font-size: 24rpx; font-size: 24rpx;
} }
.pace-text span:nth-child(1){ .pace-text span:nth-child(1){
color: #666; color: #666;
@ -234,7 +237,7 @@
color: #019C88; color: #019C88;
font-weight: bold; font-weight: bold;
} }
.pace{ .pace{
/* width: 60%; */ /* width: 60%; */
padding: 0px 5px; padding: 0px 5px;
@ -243,7 +246,7 @@
background: #f5f5f5; background: #f5f5f5;
font-size: 20rpx; font-size: 20rpx;
line-height: 30rpx; line-height: 30rpx;
} }
.seckill-entry{ .seckill-entry{
display: flex; display: flex;
@ -253,7 +256,7 @@
.seckill-money{ .seckill-money{
color: #fc2d32; color: #fc2d32;
background: #fff8f0; background: #fff8f0;
border-radius: 30rpx; border-radius: 30rpx;
padding: 15rpx 20rpx; padding: 15rpx 20rpx;
} }
.seckill-money span:nth-child(1){ .seckill-money span:nth-child(1){
@ -275,7 +278,7 @@
padding-left: 55rpx; padding-left: 55rpx;
line-height: 50rpx; line-height: 50rpx;
margin-top: 15rpx; margin-top: 15rpx;
} }
.seckill-img{ .seckill-img{
width: 70rpx; width: 70rpx;
@ -291,7 +294,7 @@
font-style:italic; font-style:italic;
} }
.item-view-bottom-qian{ .item-view-bottom-qian{
margin-top: 5px; margin-top: 5px;
} }
.item-view-bottom-btn{ .item-view-bottom-btn{
@ -337,7 +340,7 @@
font-size: 36.81rpx; font-size: 36.81rpx;
color: #FF1200; color: #FF1200;
} }
.item-view-bottom{ .item-view-bottom{
width: 100%; width: 100%;
display: flex; display: flex;
@ -465,7 +468,7 @@
align-items: center; align-items: center;
padding: 12px; padding: 12px;
} }
.item-detail { .item-detail {
padding: 5rpx 15rpx; padding: 5rpx 15rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -473,7 +476,7 @@
color: white; color: white;
background-color: #007AFF; background-color: #007AFF;
} }
.item-line { .item-line {
position: absolute; position: absolute;
bottom: 0rpx; bottom: 0rpx;
@ -533,7 +536,7 @@
height: 50rpx; height: 50rpx;
background: #18A689; background: #18A689;
border-radius: 31rpx; border-radius: 31rpx;
} }
/deep/.uni-searchbar__box{ /deep/.uni-searchbar__box{
height: 30px; height: 30px;

View File

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