Переглянути джерело

处理我的->我发布的产品->上架逻辑问题。

处理我的->我发布的产品->强制下架显示问题。
release/210823_需求对对碰
王饶冀 3 роки тому
джерело
коміт
bd2ba3849e

BIN
images/home/forced-removal-icon.png Переглянути файл


+ 13
- 3
pages/myModule/components/myRelease/myRelease.js Переглянути файл

@@ -151,8 +151,9 @@ Page({
productReleasePost(item) {
this.showLoading();
let { businessCommunicationDemandId, state } = item;
// 上架传0 下架传-1
$request.post(`/businessCommunicationDemand/outDemand.action`,
{ businessCommunicationDemandId, state }
{ businessCommunicationDemandId, state: state != 0 ? 0 : -1 }
).then(res => {
wx.hideLoading()
if (res.status == 0) {
@@ -240,8 +241,16 @@ Page({
mask: true
})
},


// 显示下架原因
showOutReason(e){
let outReason = e.currentTarget.dataset.outreason;
wx.showModal({
title: '下架原因',
content: outReason,
showCancel: false,
})
},
getListData() {
let { page, size, customerId, keyword, currentTab } = this.data;
$request.get('/businessCommunicationDemand/getDemandByStateAndCustomerId.action',
@@ -302,4 +311,5 @@ Page({
this.getListData();
}
},

})

+ 7
- 3
pages/myModule/components/myRelease/myRelease.wxml Переглянути файл

@@ -23,11 +23,15 @@
<view wx:else>
<view class="not-data" wx:if="{{ listData.length < 1 }}">
<image class="not-data-img" src="/images/home/not-data.png" />
<view class="not-info">暂无需求</view>
<view class="not-info">该用户没有发布任何需求</view>
</view>
<view wx:else>
<view class="list-view" wx:for="{{ listData }}" wx:key="*this">
<listItem item="{{ item }}" pageStatus="myRelease"/>
<view class="forced-removal" wx:if="{{ item.state == -2 }}">
<image class="forced-removal-img" src="/images/home/forced-removal-icon.png" data-outreason="{{ item.outReason }}" bindtap="showOutReason"/>
已强制下架
</view>
<view class="foot-btn">
<van-button
plain
@@ -37,12 +41,12 @@
class="foot-van-btn"
data-item="{{ item }}"
bindtap="productIsOnTop"
wx:if="{{ item.state != -1 }}"
wx:if="{{ item.state != -1 && item.state != -2}}"
>
{{ item.isOnTop ? '取消置顶' : '置顶' }}
</van-button>
<van-button plain type="info" size="small" round class="foot-van-btn" data-item="{{ item }}" bindtap="productEdit">修改</van-button>
<van-button plain type="info" size="small" round class="foot-van-btn" data-item="{{ item }}" bindtap="productRelease">
<van-button plain type="info" size="small" round class="foot-van-btn" data-item="{{ item }}" bindtap="productRelease" wx:if="{{ item.state != -2}}">
{{ item.state == 0 ? '下架' : '上架' }}
</van-button>
<van-button plain type="info" size="small" round class="foot-van-btn" data-item="{{ item }}" bindtap="productDel">删除</van-button>

+ 15
- 0
pages/myModule/components/myRelease/myRelease.wxss Переглянути файл

@@ -95,4 +95,19 @@
}
.foot-btn .foot-van-btn{
margin-left: 10rpx;
}

.forced-removal {
position: absolute;
right: 20rpx;
top: 10rpx;
color: #ff3c3c;
font-size: 22rxp;
}
.forced-removal .forced-removal-img{
width: 22rpx;
height: 22rpx;
position: relative;
top: 2rpx;
margin-right: 5rpx;
}

Завантаження…
Відмінити
Зберегти