Commit d2c2b3a5 by 李伟康

commit

1 parent 0e43cd62
...@@ -54,7 +54,7 @@ import { couponApi } from '@/api' ...@@ -54,7 +54,7 @@ import { couponApi } from '@/api'
export default { export default {
name: '', name: '',
mixins: [discountTypeMixin], mixins: [discountTypeMixin],
data () { data() {
return { return {
detail: {}, detail: {},
customerObj: [ customerObj: [
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}, },
{ {
label: '领取时间', label: '领取时间',
format (item) { format(item) {
return new Date(item.receiveTime).format('yyyy年MM月dd日') return new Date(item.receiveTime).format('yyyy年MM月dd日')
} }
} }
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
}, },
{ {
label: '类型', label: '类型',
format (item) { format(item) {
return window.$discountType[item.discountType] return window.$discountType[item.discountType]
} }
}, },
...@@ -94,26 +94,29 @@ export default { ...@@ -94,26 +94,29 @@ export default {
}, },
{ {
label: '发放时间', label: '发放时间',
format (item) { format(item) {
return new Date(item.issueDate).format('yyyy年MM月dd日') return new Date(item.issueDate).format('yyyy年MM月dd日')
} }
} }
] ],
verficationCode: ''
} }
}, },
mounted () { mounted() {
let { verficationCode } = this.getParams() let { verficationCode } = this.getParams()
couponApi.scan({ verficationCode }).then(res => { couponApi.scan({ verficationCode }).then(res => {
this.detail = res this.detail = res
this.verficationCode = verficationCode
}) })
}, },
methods: { methods: {
submit () { submit() {
let { verficationCode } = this.detail let { verficationCode } = this
couponApi.verificationCode({ verficationCode }).then(res => { couponApi.verificationCode({ verficationCode }).then(res => {
if (res) this.showToast('已核销', () => { if (res)
this.$router.back() 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!