jiangchengfeiyi-xiaochengxu/pages/booking/CostumeDetails/CostumeDetails.vue
2024-12-04 13:33:43 +08:00

46 lines
928 B
Vue

<template>
<view>{{details.name}}</view>
<image :src="details.image"></image>
<image :src="details.effectImg"></image>
<view>{{details.intro}}</view>
<view>{{details.price}}</view>
<view>{{details.clothesType}}</view>
</template>
<script setup>
import {ref,onMounted} from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { baseUrl } from '../../../api/request';
const id = ref([{}])
const details = ref([{}])
onLoad((options)=>{
id.value = JSON.parse(options.info)
console.log(id.value,1111111111)
})
onMounted(()=>{
getDetails()
})
const getDetails = async ()=>{
const res = await uni.request({
url:baseUrl + '/clothesInfo/list/detail',
method:'POST',
header:{
cookie:wx.getAccountInfoSync('cookie')
},
data:{
id:id.value
}
})
if(res.data.code === 1){
details.value = res.data.data
}else{
uin.showtoast({
icon:'error',
title:'获取失败'
})
}
}
</script>
<style>
</style>