🎨 接口数据结构变更
This commit is contained in:
parent
4d5f95f7dd
commit
46f6b06fb7
@ -76,15 +76,12 @@ export default {
|
|||||||
idArticle: _ts.idArticle,
|
idArticle: _ts.idArticle,
|
||||||
articleTags: _ts.articleTags.join(',')
|
articleTags: _ts.articleTags.join(',')
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
|
console.log(res)
|
||||||
if (res) {
|
if (res) {
|
||||||
if (res.success) {
|
|
||||||
_ts.$emit('closeDialog');
|
_ts.$emit('closeDialog');
|
||||||
} else {
|
} else {
|
||||||
_ts.$message(res.message)
|
_ts.$message(res.message)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
_ts.$message("更新失败!")
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
</client-only>
|
</client-only>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="isShare" style="margin-bottom: 1rem;">
|
<el-col v-if="isShare" style="margin-bottom: 1rem;">
|
||||||
<share-box :url="shareData.shareUrl"></share-box>
|
<share-box :url="shareUrl"></share-box>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="article.portfolios && article.portfolios.length > 0">
|
<el-col v-if="article.portfolios && article.portfolios.length > 0">
|
||||||
<portfolios-widget :portfolios="article.portfolios"></portfolios-widget>
|
<portfolios-widget :portfolios="article.portfolios"></portfolios-widget>
|
||||||
@ -257,7 +257,7 @@ export default {
|
|||||||
isShare: false,
|
isShare: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
isPerfect: false,
|
isPerfect: false,
|
||||||
shareData: {}
|
shareUrl: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -283,12 +283,12 @@ export default {
|
|||||||
if (_ts.user) {
|
if (_ts.user) {
|
||||||
_ts.$axios.$get('/api/article/' + _ts.article.idArticle + '/share').then(function (res) {
|
_ts.$axios.$get('/api/article/' + _ts.article.idArticle + '/share').then(function (res) {
|
||||||
if (res) {
|
if (res) {
|
||||||
_ts.$set(_ts, 'shareData', res);
|
_ts.$set(_ts, 'shareUrl', res);
|
||||||
_ts.$set(_ts, 'isShare', true);
|
_ts.$set(_ts, 'isShare', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_ts.$set(_ts, 'shareData', {shareUrl: _ts.article.articlePermalink});
|
_ts.$set(_ts, 'shareUrl', _ts.article.articlePermalink);
|
||||||
_ts.$set(_ts, 'isShare', true);
|
_ts.$set(_ts, 'isShare', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user