订单页面调整
This commit is contained in:
parent
23b83afc8f
commit
56d5180a95
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name" : "盛安到家",
|
||||
"appid" : "__UNI__0A81F4F",
|
||||
"appid" : "__UNI__807ED4C",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 101,
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template #refresher="{refresherStatus}" >
|
||||
<!-- <template #refresher="{refresherStatus}" >
|
||||
<custom-refresher :status="refresherStatus" />
|
||||
</template>
|
||||
</template> -->
|
||||
<template #loadingMoreNoMore >
|
||||
<custom-nomore />
|
||||
</template>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<!-- 自定义下拉刷新与上拉加载演示(vue) -->
|
||||
<template>
|
||||
<view class="content-view">
|
||||
<view class="tab-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>
|
||||
|
@ -19,9 +20,10 @@
|
|||
<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">
|
||||
</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>
|
||||
|
@ -57,18 +59,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,
|
||||
|
@ -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,25 +129,44 @@
|
|||
}
|
||||
},
|
||||
getData(){
|
||||
this.$Request.get("/app/artificer/selectMassageTypePage", {
|
||||
// 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,
|
||||
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',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
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template #refresher="{refresherStatus}" >
|
||||
<!-- <template #refresher="{refresherStatus}" >
|
||||
<custom-refresher :status="refresherStatus" />
|
||||
</template>
|
||||
</template> -->
|
||||
<template #loadingMoreNoMore >
|
||||
<custom-nomore />
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue