Commit 82fa58c5 by 李伟康

commit

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