修改bug
This commit is contained in:
@@ -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('删除成功')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user