소스 검색

提交代码,完成我发布的需求!

release/210823_需求对对碰
王饶冀 3 년 전
부모
커밋
be1bd4236d
2개의 변경된 파일25개의 추가작업 그리고 8개의 파일을 삭제
  1. 13
    7
      pages/myModule/components/myRelease/myRelease.js
  2. 12
    1
      pages/releaseModule/index.js

+ 13
- 7
pages/myModule/components/myRelease/myRelease.js 파일 보기

@@ -99,12 +99,12 @@ Page({
let { businessCommunicationDemandId, isOnTop } = item;
this.showLoading();
$request.post(`/businessCommunicationDemand/setOnTopOrDown.action`,
{ businessCommunicationDemandId, isOnTop: isOnTop ? 0 : 1 }
{ businessCommunicationDemandId, isOnTop: isOnTop ? 0 : 1, customerId: "666967" }
).then(res => {
wx.hideLoading()
if (res.status == 0) {
wx.showToast({
title: isOnTop ? '取消置顶' : '置顶' + '成功',
title: isOnTop ? '取消置顶成功' : '置顶成功',
icon: 'success',
duration: 2000
})
@@ -117,6 +117,12 @@ Page({
this.setData({
listData
})
}else if(res.status == 106){
wx.showToast({
title: res.msg,
icon: 'error',
duration: 2000
})
}
}).catch(error => {
console.log(error, 'error appletLogin')
@@ -153,7 +159,7 @@ Page({
wx.hideLoading()
if (res.status == 0) {
wx.showToast({
title: state == 0 ? '下架' : '上架' + '成功',
title: state == 0 ? '下架成功' : '上架成功',
icon: 'success',
duration: 2000
})
@@ -164,12 +170,12 @@ Page({
}
})
this.setData({
listData
listData
})
}
}).catch(error => {
console.log(error, 'error appletLogin')
wx.hideLoading()
wx.hideLoading()
})
},
// 删除需求
@@ -218,7 +224,7 @@ Page({
})
},
// 修改需求
productEdit(e){
productEdit(e) {
let item = e.currentTarget.dataset.item;
let that = this;
wx.navigateTo({
@@ -237,7 +243,7 @@ Page({
})
},

getListData() {
let { page, size, customerId, keyword, currentTab } = this.data;
$request.get('/businessCommunicationDemand/getDemandByStateAndCustomerId.action',

+ 12
- 1
pages/releaseModule/index.js 파일 보기

@@ -135,7 +135,18 @@ Page({
})
setTimeout(() => {
wx.hideLoading()
// wx.navigateBack()
let pages = getCurrentPages();
let Page = pages[pages.length - 1];//当前页
let prevPage = pages[pages.length - 2]; //上一个页面
let info = prevPage.data //取上页data里的数据也可以修改
let tempListData = info.listData;
tempListData.forEach(el=>{
if(el.businessCommunicationDemandId == businessCommunicationDemandId){
el.info = Page.data.detailValue
}
})
prevPage.setData({listData:tempListData })//设置数据
wx.navigateBack()
}, 1000);
}

Loading…
취소
저장