<template>
|
<view class="activity-list">
|
<view class="search-area" style="">
|
<view class="search-conainer">
|
<uni-easyinput
|
:inputBorder="false"
|
style="margin: auto 0;"
|
prefixIcon="search"
|
v-model="searchValue"
|
placeholder="搜索昵称"
|
confirmType="search"
|
@confirm="confirm"
|
></uni-easyinput>
|
</view>
|
</view>
|
<mescroll-body
|
ref="mescrollRef"
|
@init="mescrollInit"
|
:top="orderTop"
|
@down="downCallback"
|
:up="upOption"
|
@up="upCallback"
|
>
|
<view v-for="(item,index) in activities" :key="index">
|
<!-- :image="item.firstImage"
|
:orderNum="item.orderId"
|
:orderCode="item.orderCode"
|
:status="item.orderState"
|
:orderTitle="item.categoryName + ' ' + item.brandName"
|
:detail="item.aboutData"
|
:price="item.firstQuotation"
|
:orderTime="item.createTime"
|
@upDataList="upDataList" -->
|
<commentItem
|
|
></commentItem>
|
</view>
|
</mescroll-body>
|
<view class="bottom-add"></view>
|
<!-- <view class="bottom-add" style="position: fixed; bottom: 0;">
|
<view class="add-action" @click="select">新增活动</view>
|
</view> -->
|
</view>
|
</template>
|
|
<script>
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
import commentItem from './commentItem.vue'
|
export default {
|
mixins: [MescrollMixin],
|
components: { commentItem },
|
data() {
|
|
return {
|
searchValue: '',
|
orderTop: 80,
|
upOption:{
|
noMoreSize: 2, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
empty:{
|
tip: '', // 提示
|
// icon: require('@/static/images/default_nodata.png')
|
},
|
|
textNoMore: '- 没有更多了 -'
|
},
|
activities: [],
|
};
|
},
|
methods: {
|
confirm() {
|
console.log(this.searchValue);
|
},
|
tabChange() {
|
|
},
|
deleteAction(item) {
|
console.log(item);
|
},
|
editAction(item) {
|
console.log(item);
|
uni.navigateTo({
|
url: `/pages/merchant/merchatCenter/merchantActivity/merchantActivityOprae?title=编辑活动`
|
})
|
},
|
/*下拉刷新的回调 */
|
downCallback() {
|
// console.log('downCallback');
|
this.activities = []// 先置空列表,显示加载进度
|
// console.log('下拉刷新');
|
// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
|
this.mescroll.resetUpScroll()
|
},
|
upCallback(page) {
|
uni.showLoading({
|
title: '加载中'
|
})
|
setTimeout(() => {
|
this.activities.push(...[1,2,3,4,5,6,7,8,9,10])
|
this.mescroll.endSuccess(10, false);
|
uni.hideLoading()
|
}, 1000)
|
// orderList({
|
// current: page.num,
|
// size: page.size,
|
// status: this.tabs[this.tabIndex].type
|
// })
|
// .then(res => {
|
// this.goods = [...this.goods, ...res.data.records]
|
// // console.log('res.data.total',res.data.total);
|
// // console.log('this.goods.length', this.goods.length);
|
// this.mescroll.endSuccess(res.data.total, this.goods.length != res.data.total);
|
// })
|
// .catch(err => {
|
// this.mescroll.err()
|
// })
|
// .finally(() => {
|
// uni.hideLoading()
|
// })
|
},
|
select() {
|
uni.navigateTo({
|
url: '/pages/merchant/merchatCenter/merchantActivity/merchantActivityOprae'
|
})
|
},
|
showActivity() {
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.activity-list {
|
background-color: #fff;
|
height: 100%;
|
}
|
.search-area {
|
position: fixed;
|
background-color: #fff;
|
width: 100%;
|
z-index: 999;
|
padding: 20rpx 32rpx 0;
|
box-sizing: border-box;
|
.search-conainer {
|
border-radius: 44rpx;
|
background: #F5F5F5;
|
|
}
|
|
// margin:;
|
|
}
|
.bottom-add {
|
width: 100%;
|
height: 72rpx;
|
padding-top: 134rpx;
|
padding-bottom: env(safe-area-inset-bottom);
|
.add-action {
|
height: 72rpx;
|
background: linear-gradient(90deg, #D95A5A 0%, #D20A0B 100%);
|
border-radius: 44rpx;
|
font-size: 32rpx;
|
font-weight: 500;
|
color: #FFFFFF;
|
line-height: 72rpx;
|
text-align: center;
|
margin: 0 56rpx;
|
}
|
}
|
</style>
|