43 lines
645 B
Vue
43 lines
645 B
Vue
<template>
|
|
<view>
|
|
<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>
|
|
|
|
<style lang="less" scoped>
|
|
.top-card{
|
|
width: 710rpx;
|
|
height: 280rpx;
|
|
background: #fff;
|
|
border-radius: 16rpx;
|
|
}
|
|
|
|
|
|
</style> |