标签:
export default { route: { activate: function (transition) { this.$http.patch(‘/api/merchants/‘ + window.user.merchantId + ‘/users/‘ + window.user.id + ‘/items/‘ + this.$route.params.id + ‘/give‘).then(function (response) { if (response.data.data.status) { this.$set(‘data‘, response.data) transition.next() } else { $(‘body>div‘).remove() $.alert(response.data.data.msg, function () { wx.closeWindow() }) } }) } } }
参考网站:http://router.vuejs.org/zh-cn/pipeline/hooks.html#transition-object
标签:
原文地址:http://www.cnblogs.com/zzbp/p/5787120.html