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 = { // module.exports = {
plugins: { // plugins: {
autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit--moz-等等 // autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit--moz-等等
"postcss-px-to-viewport": { // "postcss-px-to-viewport": {
unitToConvert: "px", // 要转化的单位 // unitToConvert: "px", // 要转化的单位
viewportWidth: 1080, // UI设计稿的宽度 // viewportWidth: 1080, // UI设计稿的宽度
unitPrecision: 6, // 转换后的精度,即小数点位数 // unitPrecision: 6, // 转换后的精度,即小数点位数
propList: ["*"], // 指定转换的css属性的单位*代表全部css属性的单位都进行转换 // propList: ["*"], // 指定转换的css属性的单位*代表全部css属性的单位都进行转换
viewportUnit: "vw", // 指定需要转换成的视窗单位默认vw // viewportUnit: "vw", // 指定需要转换成的视窗单位默认vw
fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位默认vw // fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位默认vw
selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名, // selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名,
minPixelValue: 1, // 默认值1小于或等于1px则不进行转换 // minPixelValue: 1, // 默认值1小于或等于1px则不进行转换
mediaQuery: true, // 是否在媒体查询的css代码中也进行转换默认false // mediaQuery: true, // 是否在媒体查询的css代码中也进行转换默认false
replace: true, // 是否转换后直接更换属性值 // replace: true, // 是否转换后直接更换属性值
exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配 // exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配
landscape: false // 是否处理横屏情况 // landscape: false // 是否处理横屏情况
}, // },
} // }
}; // };

View File

@ -120,4 +120,10 @@ export const queryPhase3Box = (data: any) =>
request({ request({
url: 'webapp/index.php?c=Market&a=getSupportedCurrencyTypes', url: 'webapp/index.php?c=Market&a=getSupportedCurrencyTypes',
method: 'get' 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, this.shell.price,
CONTRACT_ADDRESS[AppModule.chainId].marketAddress CONTRACT_ADDRESS[AppModule.chainId].marketAddress
); );
console.log(nftres,'nftres')
if (nftres.status == true) { if (nftres.status == true) {
this.hideLoading(); this.hideLoading();
this.$emit("handMessage", 1); this.$emit("handMessage", 1);

View File

@ -1,74 +1,116 @@
<template> <template>
<div> <div>
<div class="content" > <div class="content">
<div class="header"> <div class="header">
<div>Name</div> <div>Name</div>
<div>Tokenid</div> <div>Tokenid</div>
<div>Type</div> <div>Type</div>
<div>Action</div> <div>Action</div>
<div>From</div> <div>From</div>
<div>To</div> <div>To</div>
<div>Date</div> <div>Date</div>
</div> </div>
<div class="all"> <div class="all">
<el-table <el-table
:data="tableData" :data="tableData"
style="width: 100%" style="width: 100%"
:show-header="false" :show-header="false"
:header-cell-style="getRowClass" :header-cell-style="getRowClass"
> >
<el-table-column prop="name" label="Name" width="195"> <el-table-column prop="name" label="Name" width="195">
</el-table-column> </el-table-column>
<el-table-column prop="tokenid" label="Tokenid" width="195"> <el-table-column prop="tokenid" label="Tokenid" width="195">
</el-table-column> </el-table-column>
<el-table-column prop="type" label="Type"> </el-table-column> <el-table-column label="Type">
<el-table-column prop="action" label="Action" width="195"> <template #default="scope">
</el-table-column> {{ typeOf[scope.row.type] }}
<el-table-column prop="from" label="From" width="195"> </template>
</el-table-column> </el-table-column>
<el-table-column prop="to" label="To"> </el-table-column> <el-table-column label="Action" width="195">
<el-table-column prop="date" label="Date"> </el-table-column> <template #default="scope" >
</el-table> {{scope.row.buyer === account.toLowerCase() ? 'buy':'shell'}}
</div> </template>
</div> </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> </div>
</template> </template>
<script> <script>
import { formatAddress } from "@/utils/formatAddress";
import { formatSelect } from "@/utils/UTCTime";
import { AppModule } from "@/store/modules/app";
export default { export default {
props:['tableData'], props: ["tableData"],
methods:{ data() {
getRowClass() { 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"; 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
width: 1327px;
border-radius: 20px;
background: rgba(80, 110, 190, 1);
.header {
width: 1327px; 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; 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 { .el-table__expanded-cell {
font-size: 20px; font-size: 20px;
background-color: rgba(80, 110, 190, 1) !important; background-color: rgba(80, 110, 190, 1) !important;
@ -100,4 +142,4 @@ export default {
text-align: center !important; text-align: center !important;
border-color: #bacaff !important; border-color: #bacaff !important;
} }
</style> </style>

View File

@ -37,17 +37,47 @@
<script> <script>
import ItemTable from "./ItemTable.vue"; import ItemTable from "./ItemTable.vue";
import { AppModule } from "@/store/modules/app";
import { UserModule } from "@/store/modules/user";
import { getTransactionRecordList } from "@/api/Market";
export default { export default {
props: ["curentid", "nftBtnList", "tableData"], props: ["curentid", "nftBtnList"],
components: { ItemTable }, components: { ItemTable },
data() { data() {
return { return {
nftid: 0, nftid: 0,
tableData: [],
}; };
}, },
computed: {
isLogin() {
return !!UserModule.token && !!AppModule.step && AppModule.accountId;
},
},
watch: {
isLogin() {
if (this.isLogin) {
this.getTableList()
}
},
},
methods: { methods: {
handNftActive(i) { async handNftActive(i) {
this.nftid = 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 { .mynft-sell {
position: absolute; position: absolute;
right: 116px; right: 120px;
bottom: -41px; bottom: -41px;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;