1002884655 4 år sedan
förälder
incheckning
07eefe6951

+ 2
- 0
src/components/ScrollPageRefresh/index.jsx Visa fil

@@ -79,6 +79,8 @@ export default function ScrollPageRefresh (props) {
79 79
       })
80 80
     }
81 81
   }
82
+  
83
+  const [Reset] = useState(OnRefresh)
82 84
 
83 85
   const OnPullUp = () => {
84 86
     if (HasNextPage) {

+ 1
- 1
src/components/WuYeBaoXiu/index.jsx Visa fil

@@ -56,7 +56,7 @@ export default function WuYeBaoXiu () {
56 56
 
57 57
         {/* 我要报修 */}
58 58
         <view className='WoYaoBaoXiu'>
59
-          <view onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/BaoXiuQuYu/index` }) }}>
59
+          <view onClick={() => { Taro.navigateTo({ url: `/pages/WuYe/TianJiaBaoXiu/index` }) }}>
60 60
             <text className='iconfont iconjia'></text>
61 61
             <text>我要报修</text>
62 62
           </view>

+ 9
- 0
src/pages.js Visa fil

@@ -162,6 +162,15 @@ const Shop = [
162 162
       eventType: 'shop',
163 163
     }
164 164
   },
165
+  {
166
+    name: '福利搜索',
167
+    page: 'pages/FuLi/ShangPinFilter/index',
168
+    auth: ['avatar', 'phone'],
169
+    track: {
170
+      event: 'list',
171
+      eventType: 'shop',
172
+    }
173
+  },
165 174
   {
166 175
     name: '福利-商品详情',
167 176
     page: 'pages/FuLi/ShangPinXiangQing/index',

+ 3
- 0
src/pages/FuLi/ShangPinFilter/index.config.js Visa fil

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '商品搜索'
3
+}

+ 105
- 0
src/pages/FuLi/ShangPinFilter/index.css Visa fil

@@ -0,0 +1,105 @@
1
+.ShangPinXiangQing {
2
+  width: 100%;
3
+  min-height: 100%;
4
+  position: relative;
5
+  overflow: hidden;
6
+  background: #f8f8f8;
7
+}
8
+.ShangPinXiangQing > .Info {
9
+  position: relative;
10
+  overflow: hidden;
11
+  background: #fff;
12
+}
13
+.ShangPinXiangQing > .Info > .Img {
14
+  width: 100%;
15
+  padding-bottom: 50%;
16
+  background: #ccc;
17
+  position: relative;
18
+  overflow: hidden;
19
+}
20
+.ShangPinXiangQing > .Info > .Img > image {
21
+  width: 100%;
22
+  height: 100%;
23
+}
24
+.ShangPinXiangQing > .Info > .Title {
25
+  padding: 20px 30px;
26
+  position: relative;
27
+  overflow: hidden;
28
+}
29
+.ShangPinXiangQing > .Info > .Title > text {
30
+  display: block;
31
+  width: 100%;
32
+  font-size: 32px;
33
+  color: #333;
34
+  font-weight: bold;
35
+  line-height: 40px;
36
+}
37
+.ShangPinXiangQing > .Info > .flex-h {
38
+  padding: 0 30px 20px;
39
+  align-items: center;
40
+}
41
+.ShangPinXiangQing > .Info > .flex-h > text {
42
+  font-size: 28px;
43
+  color: #666;
44
+  line-height: 40px;
45
+}
46
+.ShangPinXiangQing > .Info > .flex-h > text:first-child {
47
+  color: #F35844;
48
+}
49
+.ShangPinXiangQing > .Info > .flex-h > text.flex-item {
50
+  color: #999;
51
+}
52
+.ShangPinXiangQing > .Info > .flex-h > text:last-child {
53
+  color: #971C21;
54
+}
55
+.ShangPinXiangQing > .Detail {
56
+  position: relative;
57
+  overflow: hidden;
58
+  background: #fff;
59
+  margin-top: 20px;
60
+}
61
+.ShangPinXiangQing > .Detail > .Title {
62
+  position: relative;
63
+  overflow: hidden;
64
+  text-align: center;
65
+  padding: 30px 0;
66
+}
67
+.ShangPinXiangQing > .Detail > .Title > .Line {
68
+  height: 2px;
69
+  background: rgba(0, 0, 0, 0.08);
70
+  z-index: 1;
71
+  position: absolute;
72
+  left: 30px;
73
+  right: 30px;
74
+  top: 50%;
75
+  transform: translateY(-50%);
76
+  -webkit-transform: translateY(-50%);
77
+}
78
+.ShangPinXiangQing > .Detail > .Title > text {
79
+  display: inline-block;
80
+  background: #fff;
81
+  padding: 0 40px;
82
+  line-height: 40px;
83
+  z-index: 2;
84
+  font-size: 28px;
85
+  color: #666;
86
+  position: relative;
87
+}
88
+.ShangPinXiangQing > .Detail > .BottomBtn {
89
+  padding: 30px;
90
+  position: relative;
91
+  overflow: hidden;
92
+}
93
+.ShangPinXiangQing > .Detail > .BottomBtn > text {
94
+  width: 100%;
95
+  font-size: 34px;
96
+  color: #fff;
97
+  line-height: 98px;
98
+  background: #ccc;
99
+  border-radius: 98px;
100
+  text-align: center;
101
+  display: block;
102
+}
103
+.ShangPinXiangQing > .Detail > .BottomBtn > text.active {
104
+  background: #F35844;
105
+}

+ 64
- 0
src/pages/FuLi/ShangPinFilter/index.jsx Visa fil

@@ -0,0 +1,64 @@
1
+import React, { useState, useEffect } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { Input } from '@tarojs/components'
4
+import PrizeListItem from '@/components/PrizeListItem/index'
5
+import ScrollPageRefresh from '@/components/ScrollPageRefresh/index'
6
+import { useModel } from '@/store'
7
+import Page from '@/layouts'
8
+import '@/assets/css/reset.less'
9
+import '@/assets/css/iconfont.less'
10
+import './index.less'
11
+
12
+export default function ShangPinFilter () {
13
+
14
+  const { user } = useModel('user')
15
+  const [Key, setKey] = useState('')
16
+  const [PageList, setPageList] = useState([])
17
+  const [Child, setChild] = useState(null)
18
+
19
+  const Refresh = (e) => { // 下拉刷新
20
+    setPageList(e)
21
+  }
22
+
23
+  const Push = (e) => { // 上拉加载
24
+    setPageList(PageList.concat(e))
25
+  }
26
+
27
+  const KeyChange = (e) => {
28
+    setKey(e.detail.value)
29
+  }
30
+
31
+  const SearchConfirm = () => {
32
+    console.log(Key)
33
+  }
34
+
35
+  return (
36
+    <Page>
37
+      <view className='ShangPinFilter flex-v'>
38
+        <view className='Search'>
39
+          <view className='flex-h'>
40
+            <text className='iconfont iconsousuo'></text>
41
+            <view className='flex-item'>
42
+              <Input placeholder='输入关键词搜索' confirm-type='search' onInput={KeyChange} value={Key} onConfirm={SearchConfirm}></Input>
43
+            </view>
44
+          </view>
45
+        </view>
46
+        <view className='flex-item'>
47
+          <ScrollPageRefresh ApiName={`getGoodsList`} Refresh={Refresh} Push={Push}>
48
+            <view className='PirzeList'>
49
+              {
50
+                PageList.map((item, index) => (
51
+                  <view key={`PirzeListItem-${index}`}>
52
+                    <view>
53
+                      <PrizeListItem Data={item}></PrizeListItem>
54
+                    </view>
55
+                  </view>
56
+                ))
57
+              }
58
+            </view>
59
+          </ScrollPageRefresh>
60
+        </view>
61
+      </view>
62
+    </Page>
63
+  )
64
+}

+ 68
- 0
src/pages/FuLi/ShangPinFilter/index.less Visa fil

@@ -0,0 +1,68 @@
1
+.ShangPinFilter {
2
+  width: 100%;
3
+  height: 100vh;
4
+  position: relative;
5
+  overflow: hidden;
6
+  background: #f8f8f8;
7
+
8
+  >.Search {
9
+    padding: 30px;
10
+    position: relative;
11
+    overflow: hidden;
12
+
13
+    >view {
14
+      width: 100%;
15
+      position: relative;
16
+      background: #fff;
17
+      border-radius: 80px;
18
+
19
+      >text {
20
+        font-size: 40px;
21
+        line-height: 80px;
22
+        width: 80px;
23
+        text-align: center;
24
+        color: #666;
25
+      }
26
+
27
+      >view {
28
+        position: relative;
29
+        overflow: hidden;
30
+
31
+        >input {
32
+          width: 100%;
33
+          display: block;
34
+          font-size: 28px;
35
+          color: #666;
36
+          line-height: 80px;
37
+          height: 80px;
38
+        }
39
+      }
40
+    }
41
+  }
42
+
43
+  >.flex-item {
44
+    position: relative;
45
+    overflow: hidden;
46
+
47
+    .PirzeList {
48
+      padding-right: 30px;
49
+      position: relative;
50
+      overflow: hidden;
51
+      font-size: 0;
52
+      padding-bottom: 30px;
53
+
54
+      >view {
55
+        width: 50%;
56
+        display: inline-block;
57
+        vertical-align: middle;
58
+        margin-bottom: 30px;
59
+
60
+        >view {
61
+          padding-left: 30px;
62
+          position: relative;
63
+          overflow: hidden;
64
+        }
65
+      }
66
+    }
67
+  }
68
+}

+ 5
- 5
src/pages/FuLi/index.jsx Visa fil

@@ -96,12 +96,12 @@ export default function FuLi () {
96 96
                 </view>
97 97
 
98 98
                 {/* 搜索框 */}
99
-                {/* <view className='SearchContainer'>
100
-                <view>
101
-                  <text className='iconfont iconsousuo'></text>
102
-                  <text>附近热搜:火锅</text>
99
+                <view className='SearchContainer'>
100
+                  <view onClick={() => { Taro.navigateTo({ url: `/pages/FuLi/ShangPinFilter/index` }) }}>
101
+                    <text className='iconfont iconsousuo'></text>
102
+                    <text>附近热搜:火锅</text>
103
+                  </view>
103 104
                 </view>
104
-              </view> */}
105 105
 
106 106
                 {/* 积分礼品列表 */}
107 107
                 <view className='PirzeList'>

+ 1
- 1
src/pages/WoDe/TuiJianErWeiMa/index.jsx Visa fil

@@ -26,7 +26,7 @@ export default function TuiJianErWeiMa () {
26 26
       <view className='TuiJianErWeiMa'>
27 27
         <CustomHeader IsFixed={true} BgColor='none' Title='推荐二维码'></CustomHeader>
28 28
         <image mode='widthFix' src='https://zhiyun-image.oss-cn-shanghai.aliyuncs.com/xiangsong/img2.jpg'></image>
29
-        <image mode='widthFix' className='QrCodeImg' src={QrCodeImg}></image>
29
+        <image mode='widthFix' className='QrCodeImg centerLabel' src={QrCodeImg}></image>
30 30
       </view>
31 31
     </Page>
32 32
   )

+ 9
- 1
src/pages/WuYe/TianJiaBaoXiu/index.jsx Visa fil

@@ -86,8 +86,16 @@ export default function WuYeTianJiaBaoXiu () {
86 86
     <Page>
87 87
       <view className='WuYeTianJiaBaoXiu'>
88 88
         <view className='Form'>
89
-          <Input placeholder='简述你的想法' onInput={TitleChange} value={Title}></Input>
89
+          {/* <Input placeholder='简述你的想法' onInput={TitleChange} value={Title}></Input> */}
90 90
           <Textarea placeholder='描述问题详情,以便我们更好的相处' onInput={DescChange} value={Desc}></Textarea>
91
+          <view className='LabelList'>
92
+            <text>问题</text>
93
+            <text>问题</text>
94
+            <text>问题</text>
95
+            <text>问题</text>
96
+            <text>问题</text>
97
+            <text>问题</text>
98
+          </view>
91 99
         </view>
92 100
         <view className='Photo'>
93 101
           <view className='Add' onClick={AddImg}>

+ 22
- 0
src/pages/WuYe/TianJiaBaoXiu/index.less Visa fil

@@ -31,6 +31,28 @@
31 31
       margin-top: 20px;
32 32
       width: 100%;
33 33
     }
34
+
35
+    >.LabelList {
36
+      width: 100%;
37
+      position: relative;
38
+      overflow: hidden;
39
+      font-size: 0;
40
+      border-top: 2px solid rgba(0, 0, 0, 0.08);
41
+      padding-top: 10px;
42
+
43
+      >text {
44
+        font-size: 24px;
45
+        color: #666;
46
+        line-height: 48px;
47
+        border: 2px solid rgba(0, 0, 0, 0.08);
48
+        padding: 0 20px;
49
+        border-radius: 6px;
50
+        margin-right: 10px;
51
+        margin-top: 10px;
52
+        display: inline-block;
53
+        vertical-align: middle;
54
+      }
55
+    }
34 56
   }
35 57
 
36 58
   >.Photo {