Commit 82fa58c5 by 李伟康

commit

1 parent e64f2409
......@@ -287,10 +287,9 @@ export default {
this.showLoading('提交中...')
giftApi.createOrupdataGift(params).then(res => {
this.hideLoading()
this.showToast(`${id ? '修改' : '创建'}成功`, () => {
this.$route.params.giftToast = `${id ? '修改' : '创建'}成功`
this.$router.back()
})
})
}
}
}
......
......@@ -134,18 +134,31 @@ export default {
total: 0,
list: [],
showQr: false,
qr: {}
qr: {},
giftToast: ''
}
},
beforeRouteEnter (to, from, next) {
let { params: { giftToast } } = from
next(vm =>{
if (giftToast) vm.giftToast = giftToast
})
},
mounted () {
let { giftToast } = this
if (giftToast) {
this.showToast(giftToast, () => {
this.getList()
})
} else this.getList()
wxConfig.init(['shareAppMessage'])
},
methods: {
getList () {
let { uuid } = this.getLocalStorage('dj_scrm_userInfo')
let { pageNum, tabIndex, list, name } = this
let { pageNum, tabIndex, list, name, giftToast } = this
if (giftToast) this.giftToast = ''
this.showLoading()
giftApi.getGiftList({
pageNum,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!