Browse Source

报告列表静态页

dev01 1 year ago
parent
commit
cf961fe304

+ 1 - 1
config/index.js

@@ -15,7 +15,7 @@ const sassImporter = function(url) {
 }
 
 const config = {
-  projectName: 'taro-yanxuan',
+  projectName: 'kede-createRD-h5',
   date: '2019-2-1',
   designWidth: 750,
   deviceRatio: {

+ 7 - 7
config/prod.js

@@ -1,22 +1,22 @@
 const isH5 = process.env.CLIENT_ENV === 'h5'
 
-const HOST = '"https://miniapp.you.163.com"'
-const HOST_M = '"https://m.you.163.com"'
+// const HOST = '"https://miniapp.you.163.com"'
+// const HOST_M = '"https://m.you.163.com"'
 
 // XXX 搭了个 proxy 用于演示 prod 环境的 H5
-const HOST_H5 = '"http://140.210.193.73"'
-const HOST_M_H5 = '"http://jsnewbee.com/taro-yanxuan/api-m"'
+// const HOST_H5 = '"http://140.210.193.73"'
+// const HOST_M_H5 = '"http://jsnewbee.com/taro-yanxuan/api-m"'
 
 module.exports = {
   env: {
     NODE_ENV: '"production"'
   },
   defineConstants: {
-    HOST: isH5 ? HOST_H5 : HOST,
-    HOST_M: isH5 ? HOST_M_H5 : HOST_M
+    // HOST: isH5 ? HOST_H5 : HOST,
+    // HOST_M: isH5 ? HOST_M_H5 : HOST_M
   },
   weapp: {},
   h5: {
-    publicPath: '/taro-yanxuan'
+    // publicPath: '/kede-createRD-h5'
   }
 }

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-	"name": "taro-yanxuan",
+	"name": "kede-createRD-h5",
 	"version": "1.3.0",
 	"private": true,
 	"description": "Taro 多端(微信小程序 + H5 + React Native)",

+ 2 - 2
project.config.json

@@ -1,7 +1,7 @@
 {
 	"miniprogramRoot": "dist/",
-	"projectname": "taro-yanxuan",
-	"description": "Taro 多端实践之网易严选(微信小程序 + H5 + React Native)",
+	"projectname": "kede-createRD-h5",
+	"description": "Taro 多端(微信小程序 + H5 + React Native)",
 	"appid": "touristappid",
 	"setting": {
 		"urlCheck": false,

+ 5 - 4
src/app.js

@@ -19,10 +19,11 @@ const store = configStore()
 class App extends Component {
   config = {
     pages: [
-      'pages/user-login/user-login',
-      'pages/list/list',
-      'pages/increase/increase',
-      'pages/user/user',
+      'pages/list/list', // 报告列表
+      'pages/user-login/user-login', // 登录页
+      
+      'pages/increase/increase', // 生成报告
+      'pages/user/user', // 我的
     ],
     window: {
       backgroundTextStyle: 'light',

+ 32 - 0
src/pages/list/itemlist.js

@@ -0,0 +1,32 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, Text } from '@tarojs/components'
+import './itemlist.scss'
+
+export default class ItemList extends Component {
+
+
+  render() {
+    const { list = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] } = this.props
+    return (
+      <View className='list'>
+        {
+          list.map((item, index) =>
+            <View className='list__item' key={index}
+              onClick={() => {
+
+              }}
+            >
+              <View className='list__item__left'>
+                <View className='list__item__left-line'>关联企业:中国某某某企业</View>
+                <View className='list__item__left-line'>企业名称:这是企业名称</View>
+                <View className='list__item__left-line'>项目名称:项目名称项目名称</View>
+                <View className='list__item__left-line'>项目负责人:负责人</View>
+              </View>
+              <View className='list__item__right'>已完成</View>
+            </View>
+          )
+        }
+      </View>
+    )
+  }
+}

+ 35 - 0
src/pages/list/itemlist.scss

@@ -0,0 +1,35 @@
+.list {
+  padding: 20px 20px 50px 20px;
+
+  &__item {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    background: #FFFFFF;
+    padding: 20px;
+    font-size: 28px;
+    border-radius: 10px;
+    margin-bottom: 17px;
+
+    &__left {
+      width: 80%;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+
+      &-line {
+        color: #9A9A9A;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+      }
+
+    }
+
+    &__right {
+      font-size: 28px;
+    }
+
+  }
+
+}

+ 9 - 3
src/pages/list/list.js

@@ -4,11 +4,10 @@ import { Loading } from '@components'
 import { connect } from '@tarojs/redux'
 import * as actions from '@actions/list'
 // import { dispatchCartNum } from '@actions/list'
+import ItemList from './itemlist'
 import { getWindowHeight } from '@utils/style'
 import './list.scss'
 
-const RECOMMEND_SIZE = 20
-
 // @connect(state => state.home, { ...actions, })
 class List extends Component {
   config = {
@@ -34,7 +33,14 @@ class List extends Component {
     const { } = this.props
     return (
       <View className='home'>
-        liebiao
+        <ScrollView
+          scrollY
+          className='home__wrap'
+          onScrollToLower={() => { console.log("----") }}
+          style={{ height: getWindowHeight() }}
+        >
+          <ItemList />
+        </ScrollView>
       </View>
     )
   }

+ 3 - 0
src/pages/list/list.scss

@@ -0,0 +1,3 @@
+.home {
+  background: #EDEDED;
+}