Bladeren bron

静态页面

dev01 1 jaar geleden
bovenliggende
commit
11570ea5eb
4 gewijzigde bestanden met toevoegingen van 62 en 9 verwijderingen
  1. 2 4
      src/actions/increase.js
  2. 25 4
      src/pages/increase/increase.js
  3. 34 0
      src/pages/increase/increase.scss
  4. 1 1
      src/pages/list/list.js

+ 2 - 4
src/actions/increase.js

@@ -1,7 +1,5 @@
-import {} from '@constants/increase'
-import {
-  API_HOME, API_HOME_SEARCH_COUNT, API_HOME_RECOMMEND, API_HOME_PIN
-} from '@constants/api'
+import { } from '@constants/increase'
+import { API_HOME, } from '@constants/api'
 import { createAction } from '@utils/redux'
 
 /**

+ 25 - 4
src/pages/increase/increase.js

@@ -1,5 +1,5 @@
-import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Image, ScrollView } from '@tarojs/components'
+import Taro, { canIUse, Component } from '@tarojs/taro'
+import { View, Picker, ScrollView } from '@tarojs/components'
 import { Loading } from '@components'
 import { connect } from '@tarojs/redux'
 import * as actions from '@actions/increase'
@@ -15,6 +15,10 @@ class Increase extends Component {
   }
 
   state = {
+    selector: [{ key: "项目验收申请单", value: 1 },
+    { key: "立项报告模板", value: 2 },
+    { key: "高新认定模板", value: 3 },
+    { key: "空白模板", value: 0 },],
     loaded: false,
     loading: false,
     lastItemId: 0,
@@ -32,6 +36,13 @@ class Increase extends Component {
   }
 
 
+  onChange = e => {
+    console.log(e.detail.value, "e===", e)
+    this.setState({
+      selectorChecked: this.state.selector[e.detail.value]
+    })
+  }
+
   render() {
     // if (!this.state.loaded) {
     //   return <Loading />
@@ -46,8 +57,18 @@ class Increase extends Component {
           onScrollToLower={this.loadRecommend}
           style={{ height: getWindowHeight() }}
         >
-          <View onClick={this.handlePrevent}>
-            新建报告
+          <View className='increase'>
+            <View className='increase__item'>
+              <Picker
+                mode='selector'
+                rangeKey="key"
+                range={this.state.selector}
+                onChange={this.onChange}>
+                <View className='increase__item-buttom'>
+                  + 新建报告
+                </View>
+              </Picker>
+            </View>
           </View>
         </ScrollView>
       </View>

+ 34 - 0
src/pages/increase/increase.scss

@@ -0,0 +1,34 @@
+.home {
+  background: #EDEDED;
+}
+
+
+.increase {
+  padding: 20px;
+
+  &__item {
+    height: 91vh;
+    border-radius: 10px;
+    background: #FFFFFF;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
+    &-buttom {
+      margin: 40px auto;
+      width: 200px;
+      height: 200px;
+      border-radius: 50%;
+      box-shadow: 1px 1px 15px 1px #3f82e8;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      background: #3f82e8;
+      color: #fff;
+      font-size: 28px;
+
+    }
+
+  }
+
+}

+ 1 - 1
src/pages/list/list.js

@@ -36,7 +36,7 @@ class List extends Component {
         <ScrollView
           scrollY
           className='home__wrap'
-          onScrollToLower={() => { console.log("----") }}
+          onScrollToLower={() => { console.log("----滑到底部") }}
           style={{ height: getWindowHeight() }}
         >
           <ItemList />