| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <template>
- <view>
- <view class="search">
- <u-search @custom="search" border-color="#fff" bg-color="#fff" placeholder="输入商家名称" v-model="keyword"></u-search>
- </view>
- <view class="content">
- <view class="flex text-bold" style="padding:0 20rpx 0 40rpx">
- <view class="area1">
- 加入时间
- </view>
- <view class="area2">
- 商户名称
- </view>
- <view class="area3">
- 审核状态
- </view>
- </view>
- <mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
- :up="upOption">
- <navigator :url="'/pagesB/pages/shop-detail?id='+item.id" hover-class="none" class="item" v-for="(item,index) in list" :key="index">
- <view class="area1 flex flex-direction justify-end padding-left-20" >
- {{item.createTime}}
- </view>
- <view class="area2 text-cut-1">
- {{item.name}}
- </view>
- <view class="area3">
- <text class="text-green" v-if="item.auditStatus=='PASS'">审核通过</text>
- <text class="text-red" v-if="item.auditStatus=='FAIL'">审核失败</text>
- <text class="text-red" v-if="item.auditStatus=='STOP'">已停用</text>
- <text class="text-orange" v-if="item.auditStatus.includes('WAITING')">待审核</text>
- </view>
- </navigator>
- </mescroll-body>
- </view>
- </view>
- </template>
- <script>
- import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- list:[],
- downOption:{
- auto:false
- },
- total:0,
- keyword:''
- }
- },
- methods: {
- downCallback() {
- setTimeout(() => {
- uni.showToast({
- title: "刷新成功",
- icon: "none"
- })
- this.mescroll.resetUpScroll();
- }, 1000)
- },
- upCallback(mescroll) {
- let params = {
- agenter:this.vuex_userId,
- current:mescroll.num,
- size:mescroll.size,
- }
- if (!this.$isEmpty(this.keyword)) {
- params.name=this.keyword
- }
- try {
- this.$api.shop.list(params).then(res => {
- let data = res.data.records
- let total = res.data.total
- this.total=total
- mescroll.endBySize(data.length, total);
- if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
- this.list = this.list.concat(data); //追加新数据
- })
- } catch (e) {
- this.mescroll.endErr()
- }
- },
- search(){
- this.mescroll.resetUpScroll();
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .search{
- padding: 30rpx 30rpx 50rpx;
- }
-
- .tips{
- color: #ff9900;
- padding: 30rpx 30rpx 0rpx;
- }
-
-
- .content{
- .area1 {
- width: 50%;
- }
-
- .area2 {
- width: 30%;
- }
-
- .area3 {
- width: 20%;
- }
-
- .item{
- margin-top: 20rpx;
- background-color: #FFFFFF;
- display: flex;
- padding-top: 20rpx;
- padding-bottom: 20rpx;
- }
- }
- </style>
|