|
@@ -0,0 +1,27 @@
|
|
|
+import Taro, { Component } from '@tarojs/taro'
|
|
|
+import './index.scss'
|
|
|
+export default class TopPie extends Component {
|
|
|
+ constructor (props) {
|
|
|
+ super(props)
|
|
|
+ const appUserInfo = Taro.getStorageSync('APP_userInfo')
|
|
|
+ this.state = {
|
|
|
+ text: appUserInfo.phone || '未知',
|
|
|
+ num: 30,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ render () {
|
|
|
+ const { text, num } = this.state
|
|
|
+ const itemViews = new Array(30).fill(text).map(item => {
|
|
|
+ return (
|
|
|
+ <View className="op">{item}</View>
|
|
|
+ )
|
|
|
+ })
|
|
|
+ return (
|
|
|
+ <View className="water-mark">
|
|
|
+ {itemViews}
|
|
|
+ </View>
|
|
|
+ )
|
|
|
+ }
|
|
|
+}
|