修改bug

This commit is contained in:
邓洁
2023-02-24 14:13:17 +08:00
parent afccd4c183
commit 8bdb156ec2
9 changed files with 34 additions and 69 deletions

View File

@@ -11,7 +11,8 @@
<view class="time_line">
<view class="release_time">
<text>{{item.pub_time}}</text>
<text v-if="updateIndex==0||updateIndex==1">{{item.update_time}}</text>
<text v-else>{{item.pub_time}}</text>
</view>
<view style="display: flex;">
<view class="btn" @click="editIdeasAndNeeds(item)">
@@ -32,7 +33,9 @@
<text class="needs_text">{{item.pname}}</text>
<view class="time_line">
<view class="release_time">
<text>{{item.pub_time}}</text>
<text v-if="updateIndex==0||updateIndex==1">{{item.update_time}}</text>
<text v-else>{{item.pub_time}}</text>
</view>
<view style="display: flex;">
<view class="btn" @click="editIdeasAndNeeds(item)">
@@ -74,26 +77,27 @@
name: '创意发布'
}],
needsList: [],
ideasList: []
ideasList: [],
updateIndex: ''
}
},
onLoad(options) {
console.log(options)
if (options && options.index) {
console.log(options)
options.index = options.index - 1
this.updateIndex = options.index
this.tabChange(options)
return
}
this.getIdeasAndNeeds()
},
methods: {
//获取创意发布
//获取创意发布或需求发布
getIdeasAndNeeds() {
this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
let data = res.data.data
for (const item of data) {
item.pub_time = dateFormatXwDetail(item.pub_time)
item.update_time = dateFormatXwDetail(item.update_time)
const imagesList = item.images && item.images.length > 0 ? item.images.split(';') : []
item.images = imagesList.map(item1 => {
item1 = uni.getStorageSync('img_url') + '/' + item1
@@ -112,7 +116,6 @@
//切换需求发布和创意发布
tabChange(data) {
this.tabCurrent = data.index
// console.log('data.index', data.index);
if (data.index == 0) {
this.type = 1
} else if (data.index == 1) {
@@ -143,7 +146,6 @@
success: function(res) {
if (res.confirm) {
that.$apiServe.deleteIdeasAndNeeds(item.id).then(res => {
// console.log('删除发布', res);
if (res.data.code == 1) {
that.$toast.warn('删除成功')
}