Commit 96411f6f by chenwq

开店申请

1 parent af702dd8
// packageMine/pages/serviceManage/components/StoreApply/StoreApply.js
import { IMG_URL } from '~/utils/constantData'
import mineServiceApi from '~/api/mineApi/mineService'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
bgUrl: `${IMG_URL}/personal/empty_tran.png`,
active: 'service',
serviceList: [],
total: -1,
pageCof: {
pageNum: 1,
pageSize: 10
},
isAsk: false
},
lifetimes: {
attached() {
this.handleSearch()
}
},
/**
* 组件的方法列表
*/
methods: {
handleSearch() {
this.setData({
['pageCof.pageNum']: 1,
total: -1
})
this.getList(true)
},
scrollonReachBottom() {
this.getList()
},
getList(isReset = false) {
let { serviceList, pageCof, total, isAsk } = this.data
let _this = this
if (total == serviceList.length || isAsk) {
return true
}
let params = {
...pageCof
}
this.setData({
isAsk: true
})
mineServiceApi.getServiceList(params).then(res => {
let { list, total } = res
this.setData({
serviceList: pageCof.pageNum == 1 ? (list || []) : serviceList.concat(list),
['pageCof.pageNum']: pageCof.pageNum + 1,
triggered: false,
total
})
if (isReset) {
this.setData({
scrollTop: 0
})
}
}).finally(function () {
_this.setData({
isAsk: false
})
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageMine/pages/serviceManage/components/StoreApply/StoreApply.wxss */
.service-list-page {
width: 100%;
box-sizing: border-box;
padding: 20rpx;
background-color: #F2F3F7;
.title-box {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
.title {
color: #323436;
font-size: 28rpx;
font-weight: 600;
.number {
color: var(--btnColor)
}
}
}
.nothingCon {
width: calc(100vw - 40rpx);
height: calc(100vh - 140rpx);
// background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
}
.item-box {
width: 100%;
background: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
.top {
display: flex;
justify-content: space-between;
// align-items: center;
padding: 24rpx 32rpx;
.message {
display: flex;
.avatar {
flex-shrink: 0;
width: 72rpx;
height: 72rpx;
margin-right: 12rpx;
}
.message-text {
display: flex;
flex-flow: column;
justify-content: center;
.merchant {
color: #323436;
font-size: 28rpx;
}
.contact {
color: #858A94;
font-size: 26rpx;
}
}
}
}
.bottom {
padding: 0 32rpx;
height: 72rpx;
background-color: #FFF9F2;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
color: #8A8C90;
.service_name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.bottomTips {
text-align: center;
color: #393b3e;
font-size: 26rpx;
height: 60rpx;
line-height: 40rpx;
}
}
\ No newline at end of file
<!--packageMine/pages/serviceManage/components/StoreApply/StoreApply.wxml-->
<view class="service-list-page">
<view class="content-box" wx:if="{{serviceList.length}}">
<view class="title-box">
<view class="title">我的开店申请:<text class="number">{{total < 0 ? 0 : total}}</text>
</view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="message">
<glsx-image src="personal/service_head.png" class="avatar" />
<view class="message-text">
<view class="merchant">{{item.merchantName}}</view>
<view class="contact">联系人:{{item.contactName}} {{item.phone}}</view>
</view>
</view>
<view>审核中</view>
</view>
<view class="bottom">
<view class="service_name">
商户号:{{item.merchantId}}
</view>
<view class="time">{{item.createdDate}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{serviceList.length == total}}">到底啦!</view>
</scroll-view>
</view>
<view wx:else>
<nothing-tips custom-class="nothingCon" tips="暂无开店申请~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
\ No newline at end of file
......@@ -82,7 +82,7 @@ Component({
let { list, total } = res.data
const dateFormat = merchantType == 1 ? 'yyyy-MM-dd hh:mm:ss' : 'yyyy-MM-dd'
list.forEach(item => {
item.reviewDate = item.reviewDate ? new Date(item.reviewDate).format(dateFormat).replace(/-/g, '.') : ''
item.createdDate = item.createdDate ? new Date(item.createdDate).format(dateFormat).replace(/-/g, '.') : ''
})
this.setData({
serviceList: pageCof.currentPage == 1 ? (list || []) : serviceList.concat(list),
......
......@@ -22,11 +22,11 @@
驳回原因:{{item.rejectedReason || ''}}
</view>
<view wx:if="{{merchantType == 1}}" class="bottom">
申请时间:{{item.reviewDate || ''}}
申请时间:{{item.createdDate || ''}}
</view>
<view wx:else class="bottom">
<view>所属:{{item.serviceCenterMerchantName || '无'}}</view>
<view>{{item.reviewDate || ''}}</view>
<view>所属:{{item.yqMerchantName || '无'}}</view>
<view>{{item.createdDate || ''}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{serviceList.length == total}}">到底啦!</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!