订单页面调整

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" : "盛安到家", "name" : "盛安到家",
"appid" : "__UNI__0A81F4F", "appid" : "__UNI__807ED4C",
"description" : "", "description" : "",
"versionName" : "1.0.1", "versionName" : "1.0.1",
"versionCode" : 101, "versionCode" : 101,

View File

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

View File

@ -1,74 +1,70 @@
<!-- 自定义下拉刷新与上拉加载演示(vue) --> <!-- 自定义下拉刷新与上拉加载演示(vue) -->
<template> <template>
<view class="content-view"> <view class="content-view">
<view class="tab-view"> <z-paging ref="paging" v-model="dataList" @query="queryList">
<view class="service-head-top"> <template #top>
<view class="service-head-top-left"> <view class="service-head-top">
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image> <view class="service-head-top-left">
<span>服务项目</span> <image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
</view> <span>服务项目</span>
<view> </view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input" <view>
@clear="clear"> <uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
</uni-search-bar> @clear="clear">
<view class="search-btn" @click="searchBtn"> </uni-search-bar>
搜索 <view class="search-btn" @click="searchBtn">
</view> 搜索
</view> </view>
</view> </view>
<view class="fenlei"> </view>
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/> <view class="fenlei">
</view> <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>
<template slot="content"> <template #loadingMoreNoMore >
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)"> <custom-nomore />
<view class="item-img"> </template>
<image :src="item.massageImg" mode=""></image> <view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
</view> <view class="item-img">
<view class="item-view"> <image :src="item.massageImg" mode=""></image>
<view class="view-cata"> </view>
<span class="item-view-title">{{item.title}}</span> <view class="item-view">
<!-- <span class="xiaoer item-view-biao">{{item.classifyName}}</span> --> <view class="view-cata">
</view> <span class="item-view-title">{{item.title}}</span>
<view class="item-view-xiangmu"> <!-- <span class="xiaoer item-view-biao">{{item.classifyName}}</span> -->
</view>
<view class="item-view-bottom-qian"> <view class="item-view-xiangmu">
<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>
<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> </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,
@ -91,24 +87,24 @@
this.myId = uni.getStorageSync('userId') this.myId = uni.getStorageSync('userId')
this.tabNav() this.tabNav()
}, },
onPullDownRefresh: function() { // onPullDownRefresh: function() {
this.page = 1; // this.page = 1;
this.getData() // this.getData()
}, // },
methods: { methods: {
// //
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)
} // }
}, // },
tabNav(){ tabNav(){
let data = { let data = {
type: "服务类型", type: "服务类型",
@ -133,26 +129,45 @@
} }
}, },
getData(){ getData(){
this.$Request.get("/app/artificer/selectMassageTypePage", { // this.$Request.get("/app/artificer/selectMassageTypePage", {
by: '3', // by: '3',
status:'1', // status:'1',
classifyId:this.classifyId, // classifyId:this.classifyId,
page:this.page, // page:this.page,
limit:this.limit, // limit:this.limit,
title:this.searchValue // title:this.searchValue
}).then(res => { // }).then(res => {
if (res.code == 0) { // if (res.code == 0) {
if (res.data) { // if (res.data) {
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.dataList[i].tagsData=this.dataList[i].labels.split(','); // this.dataList[i].tagsData=this.dataList[i].labels.split(',');
} // }
uni.stopPullDownRefresh() // 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){ changeClick(index,item){
this.classifyId=item.id this.classifyId=item.id
this.searchValue='' this.searchValue=''

View File

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

View File

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