Task:收礼相关接口
This commit is contained in:
@@ -1,14 +1,32 @@
|
||||
<template>
|
||||
<view>
|
||||
<GiftCard/>
|
||||
<GiftCard :card="giftCard"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GiftCard from './components/GiftCard.vue'
|
||||
import { getGiftCardDetail } from '@/api/gift'
|
||||
export default {
|
||||
components: {
|
||||
GiftCard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
giftCard: {}
|
||||
}
|
||||
},
|
||||
onLoad(opts) {
|
||||
this.getGiftCard(opts.code)
|
||||
},
|
||||
methods: {
|
||||
async getGiftCard(code) {
|
||||
const res = await getGiftCardDetail({
|
||||
code: code
|
||||
})
|
||||
this.giftCard = res.data
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user