数字艺术
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

300 lines
6.3 KiB

<template>
<view class="max_box">
<view class="user_top">
<view>
<view class="tx">
<image :src="userinfos.avatar" v-if="userinfos.avatar"></image>
<image src="../../static/usertx.png" v-else></image>
<image src="../../static/userzt.png" v-if="cardstatus"></image>
</view>
<view class="mz" v-if="userinfos.nickname">{{userinfos.nickname}}</view>
<view class="mz" v-else>KTONG GON</view>
<view class="did" v-if="userinfos.did">did:{{userinfos.did}}</view>
<!-- <view class="did" v-else>did:123456789</view> -->
<view class="xx">
<image @click="goorder" src="../../static/userxxl.png"></image>
<!-- <image src="../../static/realname.png" @click="comerealname"></image> -->
<image src="../../static/qianbao.png" @click="comeprice"></image>
</view>
</view>
<view @click="goset">
<image src="../../static/seticon.png"></image>
</view>
</view>
<view class="chanping">
<view class="chanping_top">
<view @click="xzstate(1)" :class="xzzt==1?'xz':''">产品({{listnumber}})</view>
<view @click="xzstate(2)" :class="xzzt==2?'xz':''">盲盒</view>
</view>
<view class="changpinglist" v-if="xzzt==1">
<view @click="godetails(item)" v-for="item in workerlist.list">
<image :src="item.collect_avatar" style="border-radius: 12rpx;"></image>
<view>{{item.collect_name}}</view>
<view>{{item.artist_name}}</view>
</view>
</view>
<view class="manghe" v-if="xzzt==2">
<image src="../../static/Frames.png" mode=""></image>
<view class="text">
暂未开放
</view>
</view>
</view>
<Uitabbar :selected="1"></Uitabbar>
</view>
</template>
<script>
import {ref,reactive} from 'vue';
import {onReachBottom,onLoad,onShow} from "@dcloudio/uni-app";
import {myworks,userinfo,usergetverified} from "../../api/api.js";
import Uitabbar from '../../components/uitabbar/uitabbar.vue'
export default {
components:{
Uitabbar
},
setup() {
let xzzt=ref(1);
let number=ref(1);
let cardstatus=ref(false)
let listnumber=ref(0)
let workerlist=reactive({list:[]})
let userinfos=reactive({
nickname:"",
avatar:"",
phone:"",
did:""
})
onReachBottom(()=>{
number.value++;
});
onShow(()=>{
usergetverified({}).then((res)=>{
console.log(res);
if(res.data.id_card){
cardstatus.value=true
}
})
});
onLoad((options)=>{
if(options.did){
uni.setStorageSync("id",options.did)
}
myworks({}).then((res)=>{
// console.log(res);
workerlist.list=res.data;
listnumber.value=res.data.length;
})
userinfo({}).then((res)=>{
console.log(res);
userinfos.nickname=res.data.nickname;
userinfos.avatar=res.data.avatar;
userinfos.did=res.data.did;
})
// usergetverified({}).then((res)=>{
// // console.log(res);
// if(res.data.id_card){
// cardstatus.value=true
// }
// })
})
function xzstate(value){
xzzt.value=value
}
function goorder(){
let did=uni.getStorageSync("id")
uni.navigateTo({
url:`../orderlist/orderlist?did=${did}`
})
}
function goset(){
uni.navigateTo({
url:'../set/set'
})
}
function godetails(item){
console.log(item);
uni.navigateTo({
url:`../detalis1/detalis1?id=${item.works_id}&no=${item.no}&hydz=${item.contract_address}&txzid=${item.contract_id}&${item.hash_code}`
});
}
function comerealname(){
uni.navigateTo({
url:"../realname/realname"
})
}
function comeprice(){
uni.navigateTo({
url:"../price/price"
})
}
return {
goorder,
goset,
godetails,
xzstate,
xzzt,
workerlist,
listnumber,
userinfos,
comerealname,
cardstatus,
comeprice
}
}
}
</script>
<style lang="scss">
.chanping{
width: 100%;
display: flex;
flex-direction: column;
padding: 32upx;
box-sizing: border-box;
>.chanping_top{
display: flex;
>view{
padding: 12upx 44upx;
font-size: 28upx;
font-weight: 400;
color: #FFFFFF;
background-color:#23262F ;
margin-right: 32upx;
border-radius: 44upx;
&:nth-last-child(1){
margin-right: 0;
}
}
.xz{
background-color: #3772FF !important;
}
}
>.changpinglist{
display: flex;
flex-wrap: wrap;
>view{
width: 328upx;
margin-top: 36upx;
margin-right: 26upx;
&:nth-of-type(2n){
margin-right:0
}
>image{
width: 328upx;
height: 328upx;
}
>view:nth-of-type(1){
font-size: 28upx;
font-weight: bold;
color: #FFFFFF;
margin-top: 24upx;
margin-bottom: 10upx;
}
>view:nth-of-type(2){
font-size: 24upx;
font-weight: 400;
color: #FFFFFF;
}
}
}
.manghe{
width: 750rpx;
height: 500rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
image{
width: 300rpx;
height: 300rpx;
}
.text{
color: #FFFFFF;
margin-top: 20rpx;
}
}
}
.max_box{
width: 100%;
border-radius: 30upx 30upx 0 0;
min-height: 79vh;
background-color: #141417;
box-sizing: border-box;
>.user_top{
width: 100%;
box-sizing: border-box;
padding: 44upx;
display: flex;
justify-content: space-between;
border-bottom:1upx solid #373737 ;
>view:nth-of-type(1){
margin-top: -100upx;
.tx{
width: 174upx;
height: 174upx;
position: relative;
>image:nth-of-type(1){
width: 174upx;
height: 174upx;
}
>image:nth-of-type(2){
width: 33.5upx;
height: 39.69upx;
position: absolute;
right: 0;
top: 10upx;
}
}
.mz{
font-size: 32upx;
font-weight: bold;
color: #FFFFFF;
margin-top: 34upx;
margin-bottom: 22upx;
}
.did{
font-size: 28upx;
font-weight: 500;
color: #FFFFFF;
}
.xx{
display: flex;
margin-top: 44upx;
>image{
width: 76upx;
height: 76upx;
&:nth-of-type(1){
margin-right: 40upx;
}
}
}
}
>view:nth-of-type(2){
>image{
width: 44upx;
height: 44upx;
}
}
}
}
page{
// background-image: url('../../static/userbeijin.png');
background-color: #FFFFFF;
background-repeat: no-repeat;
background-size: 100% 100%;
padding-top: 248upx;
}
</style>