订单页面调整
This commit is contained in:
parent
23b83afc8f
commit
56d5180a95
|
@ -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,
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<!-- 自定义下拉刷新与上拉加载演示(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">
|
||||||
|
<template #top>
|
||||||
<view class="service-head-top">
|
<view class="service-head-top">
|
||||||
<view class="service-head-top-left">
|
<view class="service-head-top-left">
|
||||||
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
|
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
|
||||||
|
@ -19,9 +20,10 @@
|
||||||
<view class="fenlei">
|
<view class="fenlei">
|
||||||
<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>
|
||||||
</view>
|
</template>
|
||||||
<t-refresh ref="refresh" v-if="dataList.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
|
<template #loadingMoreNoMore >
|
||||||
<template slot="content">
|
<custom-nomore />
|
||||||
|
</template>
|
||||||
<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-img">
|
<view class="item-img">
|
||||||
<image :src="item.massageImg" mode=""></image>
|
<image :src="item.massageImg" mode=""></image>
|
||||||
|
@ -57,18 +59,12 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</z-paging>
|
||||||
</t-refresh>
|
|
||||||
<empty v-if="dataList.length==0"></empty>
|
|
||||||
|
|
||||||
</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,25 +129,44 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getData(){
|
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',
|
by: '3',
|
||||||
status:'1',
|
status:'1',
|
||||||
classifyId:this.classifyId,
|
classifyId:this.classifyId,
|
||||||
page:this.page,
|
|
||||||
limit:this.limit,
|
|
||||||
title:this.searchValue
|
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){
|
changeClick(index,item){
|
||||||
this.classifyId=item.id
|
this.classifyId=item.id
|
||||||
|
|
|
@ -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 -->
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue