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

@ -120,4 +120,10 @@ export const queryPhase3Box = (data: any) =>
request({
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

@ -1,74 +1,116 @@
<template>
<div>
<div class="content" >
<div class="header">
<div>Name</div>
<div>Tokenid</div>
<div>Type</div>
<div>Action</div>
<div>From</div>
<div>To</div>
<div>Date</div>
</div>
<div class="all">
<el-table
:data="tableData"
style="width: 100%"
:show-header="false"
:header-cell-style="getRowClass"
>
<el-table-column prop="name" label="Name" width="195">
</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>
<el-table-column prop="from" label="From" width="195">
</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>
<div class="content">
<div class="header">
<div>Name</div>
<div>Tokenid</div>
<div>Type</div>
<div>Action</div>
<div>From</div>
<div>To</div>
<div>Date</div>
</div>
<div class="all">
<el-table
:data="tableData"
style="width: 100%"
:show-header="false"
:header-cell-style="getRowClass"
>
<el-table-column prop="name" label="Name" width="195">
</el-table-column>
<el-table-column prop="tokenid" label="Tokenid" width="195">
</el-table-column>
<el-table-column label="Type">
<template #default="scope">
{{ typeOf[scope.row.type] }}
</template>
</el-table-column>
<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>
</div>
</div>
</div>
</template>
<script>
import { formatAddress } from "@/utils/formatAddress";
import { formatSelect } from "@/utils/UTCTime";
import { AppModule } from "@/store/modules/app";
export default {
props:['tableData'],
methods:{
getRowClass() {
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 {
.content {
width: 1327px;
border-radius: 20px;
background: rgba(80, 110, 190, 1);
.header {
width: 1327px;
height: 89px;
background: rgba(62, 89, 182, 1);
display: flex;
font-size: 30px;
justify-content: space-around;
align-items: center;
font-weight: 600;
color: #bacaff;
border-radius: 20px;
background: rgba(80, 110, 190, 1);
.header {
width: 1327px;
height: 89px;
background: rgba(62, 89, 182, 1);
display: flex;
font-size: 30px;
justify-content: space-around;
align-items: center;
font-weight: 600;
color: #bacaff;
border-radius: 20px;
}
.all {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
background-color: rgba(80, 110, 190, 1) !important;
padding: 0px 24px 24px 24px;
}
}
::v-deep .el-table,
.all {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
background-color: rgba(80, 110, 190, 1) !important;
padding: 0px 24px 24px 24px;
}
}
::v-deep .el-table,
.el-table__expanded-cell {
font-size: 20px;
background-color: rgba(80, 110, 190, 1) !important;
@ -100,4 +142,4 @@ export default {
text-align: center !important;
border-color: #bacaff !important;
}
</style>
</style>

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;