订单页面调整

This commit is contained in:
曹磊 2024-07-26 10:45:31 +08:00
parent 23b83afc8f
commit 56d5180a95
5 changed files with 124 additions and 109 deletions

View File

@ -1,6 +1,6 @@
{
"name" : "盛安到家",
"appid" : "__UNI__0A81F4F",
"appid" : "__UNI__807ED4C",
"description" : "",
"versionName" : "1.0.1",
"versionCode" : 101,

View File

@ -18,9 +18,9 @@
</view>
</view>
</template>
<template #refresher="{refresherStatus}" >
<!-- <template #refresher="{refresherStatus}" >
<custom-refresher :status="refresherStatus" />
</template>
</template> -->
<template #loadingMoreNoMore >
<custom-nomore />
</template>

View File

@ -1,74 +1,70 @@
<!-- 自定义下拉刷新与上拉加载演示(vue) -->
<template>
<view class="content-view">
<view class="tab-view">
<view class="service-head-top">
<view class="service-head-top-left">
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
<span>服务项目</span>
</view>
<view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
@clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
搜索
</view>
</view>
</view>
<view class="fenlei">
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/>
</view>
</view>
<t-refresh ref="refresh" v-if="dataList.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
<template slot="content">
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<view class="item-img">
<image :src="item.massageImg" mode=""></image>
</view>
<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>
<view class="item-view-xiangmu">
<view class="item-view-bottom-qian">
<span></span>
<span>{{item.price}}</span>
<span></span>
<span></span>
<span>{{item.oldPrice}}</span>
</view>
</view>
<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>
</view>
<view class="item-view-bottom-btn">
查看
</view>
</view>
</view>
</view>
</template>
</t-refresh>
<empty v-if="dataList.length==0"></empty>
<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>
<span>服务项目</span>
</view>
<view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
@clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
搜索
</view>
</view>
</view>
<view class="fenlei">
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/>
</view>
</template>
<template #loadingMoreNoMore >
<custom-nomore />
</template>
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<view class="item-img">
<image :src="item.massageImg" mode=""></image>
</view>
<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>
<view class="item-view-xiangmu">
<view class="item-view-bottom-qian">
<span></span>
<span>{{item.price}}</span>
<span></span>
<span></span>
<span>{{item.oldPrice}}</span>
</view>
</view>
<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>
</view>
<view class="item-view-bottom-btn">
查看
</view>
</view>
</view>
</view>
</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,
@ -91,24 +87,24 @@
this.myId = uni.getStorageSync('userId')
this.tabNav()
},
onPullDownRefresh: function() {
this.page = 1;
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)
}
},
// loadMore: async function() {
// //loadingType: 0. 1. 2.
// if(this.loadingType==0){
// this.loadingType=2
// //
// setTimeout(()=>{
// this.page++;
// this.loadingType=0;
// this.getData()
// },1000)
// }
// },
tabNav(){
let data = {
type: "服务类型",
@ -133,26 +129,45 @@
}
},
getData(){
this.$Request.get("/app/artificer/selectMassageTypePage", {
by: '3',
status:'1',
classifyId:this.classifyId,
page:this.page,
limit:this.limit,
title:this.searchValue
}).then(res => {
if (res.code == 0) {
if (res.data) {
if (this.page == 1) this.dataList = []; //
this.dataList = [...this.dataList, ...res.data.list]; //
for(var i=0;i<this.dataList.length;i++){
this.dataList[i].tagsData=this.dataList[i].labels.split(',');
}
uni.stopPullDownRefresh()
}
}
});
// this.$Request.get("/app/artificer/selectMassageTypePage", {
// by: '3',
// status:'1',
// classifyId:this.classifyId,
// page:this.page,
// limit:this.limit,
// title:this.searchValue
// }).then(res => {
// if (res.code == 0) {
// if (res.data) {
// if (this.page == 1) this.dataList = []; //
// this.dataList = [...this.dataList, ...res.data.list]; //
// for(var i=0;i<this.dataList.length;i++){
// this.dataList[i].tagsData=this.dataList[i].labels.split(',');
// }
// uni.stopPullDownRefresh()
// }
// }
// });
this.$refs.paging.reload(true);
},
queryList(pageNo, pageSize) {
const params = {
page: pageNo,
limit: pageSize,
by: '3',
status:'1',
classifyId:this.classifyId,
title:this.searchValue
}
this.$Request.get('/app/artificer/selectMassageTypePage',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);
})
},
changeClick(index,item){
this.classifyId=item.id
this.searchValue=''
@ -164,7 +179,7 @@
uni.reLaunch({
url:'/pages/index/index'
})
},
},
clear(res) {
this.getData()
},
@ -361,7 +376,7 @@
align-items: center;
padding: 12px;
}
.item-detail {
padding: 5rpx 15rpx;
border-radius: 10rpx;
@ -369,7 +384,7 @@
color: white;
background-color: #007AFF;
}
.item-line {
position: absolute;
bottom: 0rpx;

View File

@ -28,10 +28,10 @@
<!-- 注意注意注意字节跳动小程序中自定义下拉刷新不支持slot-scope将导致custom-refresher无法显示 -->
<!-- 如果是字节跳动小程序请参照sticky-demo.vue中的写法此处使用slot-scope是为了减少data中无关变量声明降低依赖 -->
<template #refresher="{refresherStatus}" >
<!-- <template #refresher="{refresherStatus}" > -->
<!-- 此处的custom-refresh为demo中自定义的组件非z-paging的内置组件请在实际项目中自行创建这里插入什么view下拉刷新就显示什么view -->
<custom-refresher :status="refresherStatus" />
</template>
<!-- <custom-refresher :status="refresherStatus" />
</template> -->
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore >
<!-- 此处的custom-nomore为demo中自定义的组件非z-paging的内置组件请在实际项目中自行创建这里插入什么view没有更多数据就显示什么view -->

View File

@ -18,9 +18,9 @@
</view>
</view>
</template>
<template #refresher="{refresherStatus}" >
<!-- <template #refresher="{refresherStatus}" >
<custom-refresher :status="refresherStatus" />
</template>
</template> -->
<template #loadingMoreNoMore >
<custom-nomore />
</template>