This commit is contained in:
huangjinming 2023-01-28 16:15:01 +08:00
parent 6db23bd7f4
commit a5e6a0eb0e
6 changed files with 159 additions and 80 deletions

View File

@ -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 // 是否处理横屏情况
// },
}
};
// }
// };

View File

@ -121,3 +121,9 @@ export const queryPhase3Box = (data: any) =>
url: 'webapp/index.php?c=Market&a=getSupportedCurrencyTypes',
method: 'get'
})
export const getTransactionRecordList = (data:any) =>
request({
url: 'webapp/index.php?c=Market&a=getTransactionRecord',
method: 'get',
params: data
})

View File

@ -268,6 +268,7 @@ export default {
this.shell.price,
CONTRACT_ADDRESS[AppModule.chainId].marketAddress
);
console.log(nftres,'nftres')
if (nftres.status == true) {
this.hideLoading();
this.$emit("handMessage", 1);

View File

@ -21,13 +21,31 @@
</el-table-column>
<el-table-column prop="tokenid" label="Tokenid" width="195">
</el-table-column>
<el-table-column prop="type" label="Type"> </el-table-column>
<el-table-column prop="action" label="Action" width="195">
<el-table-column label="Type">
<template #default="scope">
{{ typeOf[scope.row.type] }}
</template>
</el-table-column>
<el-table-column prop="from" label="From" width="195">
<el-table-column label="Action" width="195">
<template #default="scope" >
{{scope.row.buyer === account.toLowerCase() ? 'buy':'shell'}}
</template>
</el-table-column>
<el-table-column label="From" width="195">
<template #default="scope">
{{ formatAddress(scope.row.seller) }}
</template>
</el-table-column>
<el-table-column label="To">
<template #default="scope">
{{ formatAddress(scope.row.buyer) }}
</template>
</el-table-column>
<el-table-column label="Date">
<template #default="scope">
{{ formatSelect(scope.row.createtime) }}
</template>
</el-table-column>
<el-table-column prop="to" label="To"> </el-table-column>
<el-table-column prop="date" label="Date"> </el-table-column>
</el-table>
</div>
</div>
@ -35,14 +53,38 @@
</template>
<script>
import { formatAddress } from "@/utils/formatAddress";
import { formatSelect } from "@/utils/UTCTime";
import { AppModule } from "@/store/modules/app";
export default {
props:['tableData'],
props: ["tableData"],
data() {
return {
typeOf: {
1: "hero",
2: "weapon",
3: "chip",
5: "piece",
},
};
},
computed: {
account() {
return AppModule.accountId;
},
},
methods: {
getRowClass() {
return "background: rgba(62, 89, 182, 1);fontSize: 30px;font-weight: 600; color: #BACAFF";
},
}
}
formatAddress(add) {
return formatAddress(add);
},
formatSelect(time) {
return formatSelect(time);
},
},
};
</script>
<style lang="scss" scoped>
.content {

View File

@ -37,17 +37,47 @@
<script>
import ItemTable from "./ItemTable.vue";
import { AppModule } from "@/store/modules/app";
import { UserModule } from "@/store/modules/user";
import { getTransactionRecordList } from "@/api/Market";
export default {
props: ["curentid", "nftBtnList", "tableData"],
props: ["curentid", "nftBtnList"],
components: { ItemTable },
data() {
return {
nftid: 0,
tableData: [],
};
},
computed: {
isLogin() {
return !!UserModule.token && !!AppModule.step && AppModule.accountId;
},
},
watch: {
isLogin() {
if (this.isLogin) {
this.getTableList()
}
},
},
methods: {
handNftActive(i) {
async handNftActive(i) {
this.nftid = i;
this.getTableList()
console.log(this.tableData, "this.tableData2");
},
async getTableList(){
const data = {
account: AppModule.accountId,
type: this.nftid == 4 ? 5 : this.nftid,
start: 0,
page_size: 10,
};
const res = await getTransactionRecordList(data);
this.tableData = res.nfts;
console.log(this.tableData, "this.tableData1");
}
},
};

View File

@ -810,7 +810,7 @@ export default {
}
.mynft-sell {
position: absolute;
right: 116px;
right: 120px;
bottom: -41px;
display: flex;
justify-content: flex-end;