|
|
@@ -0,0 +1,149 @@
|
|
|
+import React, {Component} from 'react'
|
|
|
+import {View} from "@tarojs/components";
|
|
|
+import {AtCard, AtSearchBar} from "taro-ui"
|
|
|
+
|
|
|
+import "taro-ui/dist/style/components/card.scss";
|
|
|
+import "taro-ui/dist/style/components/search-bar.scss";
|
|
|
+import './shop.scss'
|
|
|
+
|
|
|
+export default class shop extends Component {
|
|
|
+ state = {
|
|
|
+ value: '',
|
|
|
+ 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'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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'
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ onChange(value) {
|
|
|
+ this.setState({
|
|
|
+ value: value
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ renderProductList(Products) {
|
|
|
+ return Products.map((ele, index) => {
|
|
|
+ return (
|
|
|
+ <View className={'shop-card'}>
|
|
|
+ <AtCard
|
|
|
+ note={'联系方式:' + ele.contact}
|
|
|
+ title={ele.title}
|
|
|
+ extra={ele.value + '元'}
|
|
|
+ >
|
|
|
+ {
|
|
|
+ ele.content
|
|
|
+ }
|
|
|
+ </AtCard>
|
|
|
+ </View>
|
|
|
+ )
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ render() {
|
|
|
+ return (
|
|
|
+ <View>
|
|
|
+ <AtSearchBar
|
|
|
+ value={this.state.value}
|
|
|
+ onChange={this.onChange.bind(this)}
|
|
|
+ />
|
|
|
+ {
|
|
|
+ this.renderProductList(this.state.products)
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ )
|
|
|
+ }
|
|
|
+}
|