|
|
@@ -1,13 +1,79 @@
|
|
|
import React, {Component} from "react";
|
|
|
-import {View} from "@tarojs/components";
|
|
|
+import {Text, View} from "@tarojs/components";
|
|
|
import MyTitle from "../../components/MyTitle/MyTitle";
|
|
|
+import {AtAvatar, AtCard, AtDivider} from 'taro-ui'
|
|
|
+import './account.scss'
|
|
|
+
|
|
|
+import "taro-ui/dist/style/components/avatar.scss";
|
|
|
+import "taro-ui/dist/style/components/divider.scss";
|
|
|
+import "taro-ui/dist/style/components/card.scss";
|
|
|
|
|
|
class account extends Component {
|
|
|
+ state = {
|
|
|
+ products: [
|
|
|
+ {
|
|
|
+ title: '河南·新乡市·卫辉市 风力发电 10000w',
|
|
|
+ value: 7000,
|
|
|
+ content: '采用风力发电,符合环保标准,接收就近传输',
|
|
|
+ contact: 'xxxxxxxxxxx'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '安徽·巢湖市 水力发电 1000w',
|
|
|
+ value: 5500,
|
|
|
+ content: '采用水力发电,符合环保标准,接收就近传输',
|
|
|
+ contact: 'xxxxxxxxxxx'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '安徽·巢湖市 火力发电 20000w',
|
|
|
+ value: 3500,
|
|
|
+ content: '火力发电',
|
|
|
+ contact: 'xxxxxxxxxxx'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '江苏·扬州市·邗江区 火力发电 20000w',
|
|
|
+ value: 3500,
|
|
|
+ content: '火力发电',
|
|
|
+ contact: 'xxxxxxxxxxx'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+
|
|
|
+ renderProductList(Products) {
|
|
|
+ return Products.map((ele, index) => {
|
|
|
+ return (
|
|
|
+ <View className={'account-card'}>
|
|
|
+ <AtCard
|
|
|
+ note={'联系方式:' + ele.contact}
|
|
|
+ title={ele.title}
|
|
|
+ extra={ele.value + '元'}
|
|
|
+ >
|
|
|
+ {
|
|
|
+ ele.content
|
|
|
+ }
|
|
|
+ </AtCard>
|
|
|
+ </View>
|
|
|
+ )
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
return (
|
|
|
- <View>
|
|
|
+ <View className={'account-view'}>
|
|
|
<MyTitle title={'个人信息'}/>
|
|
|
-
|
|
|
+ <View className={'account-avatar'}>
|
|
|
+ <AtAvatar
|
|
|
+ size={'large'}
|
|
|
+ circle
|
|
|
+ image='https://img1.baidu.com/it/u=4106295116,717584435&fm=253&fmt=auto&app=120&f=JPEG?w=542&h=500'/>
|
|
|
+ </View>
|
|
|
+ <View className={'account-name'}>
|
|
|
+ <Text>
|
|
|
+ 有喵的柴
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ <AtDivider content='我发布的交易' lineColor={'#cccccc'} fontColor={'#cccccc'}/>
|
|
|
+ {
|
|
|
+ this.renderProductList(this.state.products)
|
|
|
+ }
|
|
|
</View>
|
|
|
)
|
|
|
}
|