修改market列表到detail的传参方式
This commit is contained in:
parent
2bd2df4fab
commit
90c5a53dba
@ -32,11 +32,10 @@
|
|||||||
import { ref, toRaw, onMounted, getCurrentInstance } from "vue"
|
import { ref, toRaw, onMounted, getCurrentInstance } from "vue"
|
||||||
import BuyDialog from "@/components/Dialogs/buyDialog.vue"
|
import BuyDialog from "@/components/Dialogs/buyDialog.vue"
|
||||||
import {priceCalculated} from "@/configs/priceCalculate.js"
|
import {priceCalculated} from "@/configs/priceCalculate.js"
|
||||||
import { useDetailStore } from "@/store/detail"
|
|
||||||
import {
|
import {
|
||||||
apiAddCartList
|
apiAddCartList
|
||||||
} from "@/utils/marketplace"
|
} from "@/utils/marketplace"
|
||||||
const detailData = useDetailStore()
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
@ -62,8 +61,12 @@ const getImageUrl = (name) => {
|
|||||||
|
|
||||||
// 去详情页面
|
// 去详情页面
|
||||||
const toDetail = () => {
|
const toDetail = () => {
|
||||||
detailData.nftData = toRaw(props.nftData)
|
// detailData.nftData = toRaw(props.nftData)
|
||||||
router.push('/detail');
|
// router.push('/detail');
|
||||||
|
const _nftData = toRaw(props.nftData)
|
||||||
|
const nftData = _nftData.nft
|
||||||
|
nftData.event = _nftData.event
|
||||||
|
router.push({name: 'Detail', state: { nftData}});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加购物车
|
// 添加购物车
|
||||||
|
Loading…
x
Reference in New Issue
Block a user