Commit d2c2b3a5 by 李伟康

commit

1 parent 0e43cd62
......@@ -54,7 +54,7 @@ import { couponApi } from '@/api'
export default {
name: '',
mixins: [discountTypeMixin],
data () {
data() {
return {
detail: {},
customerObj: [
......@@ -68,7 +68,7 @@ export default {
},
{
label: '领取时间',
format (item) {
format(item) {
return new Date(item.receiveTime).format('yyyy年MM月dd日')
}
}
......@@ -84,7 +84,7 @@ export default {
},
{
label: '类型',
format (item) {
format(item) {
return window.$discountType[item.discountType]
}
},
......@@ -94,26 +94,29 @@ export default {
},
{
label: '发放时间',
format (item) {
format(item) {
return new Date(item.issueDate).format('yyyy年MM月dd日')
}
}
]
],
verficationCode: ''
}
},
mounted () {
mounted() {
let { verficationCode } = this.getParams()
couponApi.scan({ verficationCode }).then(res => {
this.detail = res
this.verficationCode = verficationCode
})
},
methods: {
submit () {
let { verficationCode } = this.detail
submit() {
let { verficationCode } = this
couponApi.verificationCode({ verficationCode }).then(res => {
if (res) this.showToast('已核销', () => {
this.$router.back()
})
if (res)
this.showToast('已核销', () => {
this.$router.back()
})
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!