diff --git a/.postcssrc.js b/.postcssrc.js index ae3cdf5..43d1ea8 100644 --- a/.postcssrc.js +++ b/.postcssrc.js @@ -1,22 +1,22 @@ - module.exports = { - plugins: { - autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit-,-moz-等等 - "postcss-px-to-viewport": { - unitToConvert: "px", // 要转化的单位 - viewportWidth: 1080, // UI设计稿的宽度 - unitPrecision: 6, // 转换后的精度,即小数点位数 - propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换 - viewportUnit: "vw", // 指定需要转换成的视窗单位,默认vw - fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位,默认vw - selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名, - minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换 - mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false - replace: true, // 是否转换后直接更换属性值 - exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配 - landscape: false // 是否处理横屏情况 - }, + // module.exports = { + // plugins: { + // autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit-,-moz-等等 + // "postcss-px-to-viewport": { + // unitToConvert: "px", // 要转化的单位 + // viewportWidth: 1080, // UI设计稿的宽度 + // unitPrecision: 6, // 转换后的精度,即小数点位数 + // propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换 + // viewportUnit: "vw", // 指定需要转换成的视窗单位,默认vw + // fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位,默认vw + // selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名, + // minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换 + // mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false + // replace: true, // 是否转换后直接更换属性值 + // exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配 + // landscape: false // 是否处理横屏情况 + // }, - } - }; + // } + // }; diff --git a/src/chain/blockchain.ts b/src/chain/blockchain.ts index a67e4aa..1471ae8 100644 --- a/src/chain/blockchain.ts +++ b/src/chain/blockchain.ts @@ -19,7 +19,7 @@ import { isMobile } from '@/utils/resize' import { hasMetamask, toHexChainId } from '@/utils/chain.util' import { AllChains } from '@/configs/allchain' import { MessageBox } from 'element-ui' -import { ERC20ABI } from '@/configs/contracts' +import { ERC20ABI, MARKET_ABI } from '@/configs/contracts' import { TransactionReceipt } from 'web3-core' const EIP721_DOMAIN_DATA = [ @@ -465,6 +465,14 @@ export class Blockchain { .send({ gas: 1000000 }) } + public async beginNftSell(nftToken: string, currency: string, tokenId: string, amount: number, price: number,marketAddress:string ) { + const priceBN = this.web3.utils.toBN(this.web3.utils.toWei(price + '')) + const marketInstance: any = await this.getContractInstance(marketAddress, MARKET_ABI) + return marketInstance.methods + .sell(nftToken, currency, tokenId,priceBN, amount) + .send({ gas: 1000000 }) + } + public async signData(signObj: any, signer: string) { const msgParams = JSON.stringify(signObj) const from = signer diff --git a/src/components/market/MosaicChip.vue b/src/components/market/MosaicChip.vue index 980dcb5..3506871 100644 --- a/src/components/market/MosaicChip.vue +++ b/src/components/market/MosaicChip.vue @@ -173,20 +173,7 @@
#3006985843100103 (NFTLink)
- + -
9999.99
-
- - aoi-hero -
- --> - - diff --git a/src/components/market/TheSellDialog.vue b/src/components/market/TheSellDialog.vue index 1811494..ff604ba 100644 --- a/src/components/market/TheSellDialog.vue +++ b/src/components/market/TheSellDialog.vue @@ -16,7 +16,7 @@
- +
- +