[baozhangchao] 3 lat temu
rodzic
commit
2222b8ae02

+ 2
- 2
src/app.less Wyświetl plik

@@ -27,14 +27,14 @@
27 27
   box-shadow: 0px -4px 6px 0px rgba(0, 0, 0, 0.08);
28 28
   .weui-tabbar__label {
29 29
     color: #c0c8d3;
30
-    font-size: 40px;
30
+    font-size: 30px;
31 31
     font-weight: 800;
32 32
   }
33 33
 
34 34
   .weui-bar__item_on {
35 35
     .weui-tabbar__label {
36 36
       color: #202020;
37
-      font-size: 50px;
37
+      font-size: 30px;
38 38
       font-weight: 800;
39 39
     }
40 40
   }

BIN
src/assets/homesImgaes/searchs.png Wyświetl plik


BIN
src/assets/mineImgaes/aboutUs.png Wyświetl plik


BIN
src/assets/mineImgaes/addresss.png Wyświetl plik


BIN
src/assets/mineImgaes/feedbacks.png Wyświetl plik


BIN
src/assets/mineImgaes/helpCenter.png Wyświetl plik


BIN
src/assets/mineImgaes/mineBack.png Wyświetl plik


BIN
src/assets/mineImgaes/userRight.png Wyświetl plik


BIN
src/assets/mineImgaes/versionUpdate.png Wyświetl plik


BIN
src/assets/tabbar/HomesNOImgaes.png Wyświetl plik


BIN
src/assets/tabbar/HomesOFFImgaes.png Wyświetl plik


BIN
src/assets/tabbar/MineNOImgaes.png Wyświetl plik


BIN
src/assets/tabbar/MineOFFImgaes.png Wyświetl plik


BIN
src/assets/tabbar/OrdersNOImgaes.png Wyświetl plik


BIN
src/assets/tabbar/OrdersOFFImgaes.png Wyświetl plik


+ 14
- 0
src/components/UserCellBox/index.jsx Wyświetl plik

@@ -0,0 +1,14 @@
1
+import { View } from "@tarojs/components"
2
+
3
+import './style.less';
4
+
5
+
6
+export default (props) => {
7
+
8
+  return (
9
+    <View className='User-Setup-background-cmp'>
10
+      <View className='User-Setup-background-SetupText-cmp'>{props.title}</View>
11
+      <View className='User-Setup-background-wxInfo-cmp'>{props.children}</View>
12
+    </View>
13
+  )
14
+}

+ 22
- 0
src/components/UserCellBox/style.less Wyświetl plik

@@ -0,0 +1,22 @@
1
+.User-Setup-background-cmp {
2
+  width: 95vw;
3
+  background: #ffffff;
4
+  border-radius: 40px;
5
+  box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
6
+  padding-top: 60px;
7
+  margin: 0 auto 30px auto;
8
+  padding-bottom: 35px;
9
+  .User-Setup-background-SetupText-cmp {
10
+    border-left: 10px solid black;
11
+    padding-left: 23px;
12
+    margin-bottom: 40px;
13
+    font-size: 34px;
14
+    font-weight: bold;
15
+    color: #333333;
16
+  }
17
+  .User-Setup-background-wxInfo-cmp {
18
+    width: 90%;
19
+    background: #ffffff;
20
+    margin: 0 auto;
21
+  }
22
+}

+ 6
- 6
src/pages/index/tabbar.js Wyświetl plik

@@ -2,18 +2,18 @@
2 2
 const tabbar = [
3 3
   {//recommend_active
4 4
     text: '首页',
5
-    // iconPath: require('@/assets/icons/tabbar/recommend.gif'),
6
-    // selectedIconPath: require('@/assets/icons/tabbar/recommend_active.png'),
5
+    iconPath: require('@/assets/tabbar/HomesOFFImgaes.png'),
6
+    selectedIconPath: require('@/assets/tabbar/HomesNOImgaes.png'),
7 7
   },
8 8
   {
9 9
     text: '订单',
10
-    // iconPath: require('@/assets/icons/tabbar/guide.png'),
11
-    // selectedIconPath: require('@/assets/icons/tabbar/guide_active.png'),
10
+    iconPath: require('@/assets/tabbar/OrdersOFFImgaes.png'),
11
+    selectedIconPath: require('@/assets/tabbar/OrdersNOImgaes.png'),
12 12
   },
13 13
   {
14 14
     text: '我的',
15
-    // iconPath: require('@/assets/icons/tabbar/mine.png'),
16
-    // selectedIconPath: require('@/assets/icons/tabbar/mine_active.png'),
15
+    iconPath: require('@/assets/tabbar/MineOFFImgaes.png'),
16
+    selectedIconPath: require('@/assets/tabbar/MineNOImgaes.png'),
17 17
   },
18 18
 ]
19 19
 

+ 46
- 2
src/pages/index/tabs/Homes.jsx Wyświetl plik

@@ -1,10 +1,54 @@
1 1
 
2
-import { View } from "@tarojs/components"
2
+import { View, Swiper, Image, SwiperItem, Text, Input } from "@tarojs/components"
3
+import addresss from '@/assets/mineImgaes/addresss.png'//地址
4
+import searchs from '@/assets/homesImgaes/searchs.png'//地址
3 5
 
4 6
 
7
+
8
+import './HomesCss/style.less'
9
+
5 10
 export default (props) => {
11
+  // const { SwiperItem } = Swiper
12
+
13
+
14
+  const imglist = [
15
+    { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
16
+    { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
17
+    { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
18
+    { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
19
+    { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
20
+    { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
21
+  ]
22
+
23
+  const handleSearch = (e) => {
24
+    console.log(e.detail.value)
25
+  }
6 26
 
7 27
   return (
8
-    <View>Home</View>
28
+    <View>
29
+      <View className='heads-top-box'>
30
+        <View className='heads-top-box-left'>
31
+          <Image src={addresss} className='heads-top-box-left-addresssImg' />
32
+          <Text>邓州市</Text>
33
+          <View className='heads-top-box-left-addresssImg-DownIcon' />
34
+        </View>
35
+        <View className='heads-content-searchClass'>
36
+          <Input type='text' className='heads-content-searchClass-searchInput' onBlur={handleSearch} placeholder='搜索关键字查询订单' />
37
+          <Image src={searchs} className='heads-content-searchClass-searchInput-searchImg' />
38
+        </View>
39
+      </View>
40
+      <Swiper
41
+        circular
42
+        autoplay
43
+        className='swiper-box'
44
+      >
45
+        {imglist.map((item, inx) => (
46
+          <SwiperItem key={inx}>
47
+            <Image src={item.url} mode='widthFix' className='storeImage' />
48
+          </SwiperItem>
49
+        ))}
50
+      </Swiper>
51
+
52
+    </View>
9 53
   )
10 54
 }

+ 56
- 0
src/pages/index/tabs/HomesCss/style.less Wyświetl plik

@@ -0,0 +1,56 @@
1
+.heads-top-box {
2
+  display: flex;
3
+  margin: 30px;
4
+  margin-bottom: 0;
5
+  &-left {
6
+    display: flex;
7
+    align-items: center;
8
+    margin-right: 30px;
9
+    font-size: 32px;
10
+    font-weight: bold;
11
+    color: #202020;
12
+    line-height: 68px;
13
+    &-addresssImg {
14
+      width: 28px;
15
+      height: 34px;
16
+      margin-right: 9px;
17
+    }
18
+    &-addresssImg-DownIcon {
19
+      border-top: 8px solid #000;
20
+      border-left: 8px solid transparent;
21
+      border-right: 8px solid transparent;
22
+
23
+      margin-left: 10px;
24
+    }
25
+  }
26
+  .heads-content-searchClass {
27
+    display: inline-block;
28
+    position: relative;
29
+    flex: 1;
30
+    &-searchInput {
31
+      background: #f8f8f8;
32
+      border-radius: 34px;
33
+      padding-left: 68px;
34
+      padding-right: 34px;
35
+      font-size: 28px;
36
+      height: 68px;
37
+      line-height: 68px;
38
+    }
39
+    &-searchInput-searchImg {
40
+      width: 30px;
41
+      height: 30px;
42
+      position: absolute;
43
+      left: 31px;
44
+      top: 19px;
45
+    }
46
+  }
47
+}
48
+
49
+.swiper-box {
50
+  height: calc(calc(100vw-60px) * 0.62);
51
+  text-align: center;
52
+  margin: 30px;
53
+  .storeImage {
54
+    height: 100%;
55
+  }
56
+}

+ 52
- 18
src/pages/index/tabs/Mine.jsx Wyświetl plik

@@ -2,44 +2,78 @@
2 2
 import { View, Image } from "@tarojs/components"
3 3
 import { useDidShow } from "@tarojs/taro"
4 4
 import { useState } from "react"
5
+import UserCellBox from '@/components/UserCellBox'
6
+import addresss from '@/assets/mineImgaes/addresss.png'//地址
7
+import aboutUs from '@/assets/mineImgaes/aboutUs.png'//关于我们
8
+import feedbacks from '@/assets/mineImgaes/feedbacks.png'//意见反馈
9
+import helpCenter from '@/assets/mineImgaes/helpCenter.png'//帮助中心
10
+import versionUpdate from '@/assets/mineImgaes/versionUpdate.png'//版本更新
11
+import userRight from '@/assets/mineImgaes/userRight.png'//版本更新
5 12
 import './MineCss/style.less'
6 13
 
7 14
 
8 15
 export default (props) => {
9 16
   const [isLoginBox, setIsLoginBox] = useState(false)
17
+  const userList = [
18
+    { userTitle: '关于我们', userImg: aboutUs },
19
+    { userTitle: '版本更新', userImg: versionUpdate },
20
+    { userTitle: '帮助中心', userImg: helpCenter },
21
+    { userTitle: '意见反馈', userImg: feedbacks },
22
+  ]
10 23
 
11 24
   return (
12
-    <scroll-view scrollY style='height: 100%;' >
13 25
 
26
+    <scroll-view scrollY style='height: 100%;' >
14 27
       <View>
15 28
         {/* 头像 */}
16 29
         {
17 30
           !isLoginBox ?
18
-            <View className='User-Avatar-background-falseBox'>
31
+            <View style={{ backgroundImage: "url(" + require("@/assets/mineImgaes/mineBack.png") + ")" }} className='User-Avatar-background-falseBox'>
19 32
               <Image className='User-Avatar-background-falseBox-userImg userImg' src='https://profile.csdnimg.cn/3/1/5/0_qq_42551866' />
20 33
               <View className='User-Avatar-background-falseBox-userLogin' onClick={() => setIsLoginBox(true)}>点击登陆</View>
21 34
             </View>
22 35
             :
23
-            <View className='User-Avatar-background-trueBox'>
24
-              <View className='setPassword'>修改密码</View>
25
-              <Image className='User-Avatar-background-trueBox-userImg' src='https://profile.csdnimg.cn/3/1/5/0_qq_42551866' />
26
-              <View className='User-Avatar-background-trueBox-name textStyle' >鲍zhangchao</View>
27
-              <View className='User-Avatar-background-trueBox-phone textStyle'>18082043755</View>
28
-            </View>
36
+            <>
37
+              <View style={{ backgroundImage: "url(" + require("@/assets/mineImgaes/mineBack.png") + ")" }} className='User-Avatar-background-trueBox'>
38
+                <View className='setPassword'>修改密码</View>
39
+                <Image className='User-Avatar-background-trueBox-userImg' src='https://profile.csdnimg.cn/3/1/5/0_qq_42551866' />
40
+                <View className='User-Avatar-background-trueBox-name textStyle' >鲍zhangchao</View>
41
+                <View className='User-Avatar-background-trueBox-phone textStyle'>18082043755</View>
42
+              </View>
43
+              <UserCellBox title='地址信息' >
44
+                <View className='addresss-box'>
45
+                  <Image className='addresss-box-images' src={addresss} />
46
+                  <View className='addresss-box-contents'>
47
+                    <View className='addresss-box-contents-texts' >河南省南阳市邓州市九龙镇5556666665</View>
48
+                    <View>》</View>
49
+                  </View>
50
+                </View>
51
+              </UserCellBox>
52
+            </>
29 53
         }
30 54
 
55
+
31 56
         {/* 菜单 */}
32
-        <View className='User-Setup-background'>
33
-          <View className='User-Setup-background-SetupText'>设置</View>
34
-          <View className='User-Setup-background-wxInfo'>
35
-            <View className='User-Setup-background-wxInfo-InfoCell'>
36
-              <Image className='User-Setup-background-wxInfo-InfoCell-imgae' src='https://profile.csdnimg.cn/3/1/5/0_qq_42551866' />
37
-              <View className='User-Setup-background-wxInfo-InfoCell-text'>关于我闷</View>
38
-              <View> 》 </View>
39
-            </View>
57
+        <UserCellBox title='设置' >
58
+          {
59
+            userList.map((item, index) => {
60
+              return (
61
+                <View key={index} className='User-Setup-background-wxInfo-InfoCell'>
62
+                  <Image className='User-Setup-background-wxInfo-InfoCell-imgae' src={item.userImg} />
63
+                  <View className='box-flex'>
64
+                    <View className='User-Setup-background-wxInfo-InfoCell-text'>{item.userTitle}</View>
65
+                    <Image src={userRight} />
66
+                  </View>
67
+                </View>
68
+              )
69
+            })
70
+          }
71
+
72
+        </UserCellBox>
73
+
74
+
75
+        <View className='bottom-buttom'>退出登陆</View>
40 76
 
41
-          </View>
42
-        </View>
43 77
       </View>
44 78
     </scroll-view>
45 79
   )

+ 73
- 42
src/pages/index/tabs/MineCss/style.less Wyświetl plik

@@ -1,12 +1,14 @@
1 1
 .User-Avatar-background-falseBox {
2 2
   width: 95vw;
3 3
   height: 30vh;
4
-  background: rgb(233, 104, 104);
4
+  background-size: 100%;
5
+  background-repeat: no-repeat;
5 6
   border-radius: 40px;
6 7
   box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
7 8
   margin-top: 1em;
8 9
   margin: 0 auto;
9 10
   display: flex;
11
+  margin-bottom: 30px;
10 12
   &-userImg {
11 13
     position: relative;
12 14
     top: 8vh;
@@ -31,13 +33,14 @@
31 33
 //已登陆样式-----------------------
32 34
 
33 35
 .User-Avatar-background-trueBox {
36
+  background-size: 100%;
37
+  background-repeat: no-repeat;
34 38
   width: 95vw;
35 39
   height: 30vh;
36
-  background: rgb(233, 104, 104);
37 40
   border-radius: 40px;
38 41
   box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
39 42
   margin-top: 1em;
40
-  margin: 0 auto;
43
+  margin: 0 auto 30px auto;
41 44
   &-userImg {
42 45
     position: relative;
43 46
     top: 8vh;
@@ -58,8 +61,6 @@
58 61
     font-weight: 500;
59 62
     text-shadow: 0px 2px 0px rgba(0, 0, 0, 0.4);
60 63
   }
61
-  &-name {
62
-  }
63 64
   &-phone {
64 65
     margin-top: 38px;
65 66
   }
@@ -79,46 +80,76 @@
79 80
   }
80 81
 }
81 82
 // 结束-----------------------------
82
-.User-Setup-background {
83
-  width: 95vw;
84
-  background: #ffffff;
85
-  border-radius: 40px;
86
-  box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
87
-  padding-top: 60px;
88 83
 
89
-  margin: 0 auto;
90
-  &-SetupText {
91
-    border-left: 10px solid black;
92
-    padding-left: 23px;
93
-    margin-bottom: 40px;
94
-    font-size: 34px;
95
-    font-weight: bold;
96
-    color: #333333;
84
+//地址显示 ---------------
85
+
86
+.addresss-box {
87
+  display: flex;
88
+  width: 100%;
89
+  align-items: center;
90
+  &-images {
91
+    width: 22px;
92
+    height: 27px;
93
+  }
94
+  &-contents {
95
+    display: flex;
96
+    width: 93%;
97
+    margin-left: 20px;
98
+    justify-content: space-between;
99
+    &-texts {
100
+      width: 88%;
101
+      font-size: 34px;
102
+      text-overflow: ellipsis; //显示...
103
+      white-space: nowrap; //不换行
104
+      overflow: hidden;
105
+      font-weight: 500;
106
+    }
97 107
   }
98
-  &-wxInfo {
99
-    width: 90%;
100
-    height: 60vh;
101
-    background: #ffffff;
102
-    margin: 0 auto;
103
-    &-InfoCell {
104
-      width: 100%;
105
-      height: 108px;
106
-      display: flex;
107
-      align-items: center;
108
-      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
109
-      &-imgae {
110
-        width: 34px;
111
-        height: 43px;
112
-      }
113
-      &-text {
114
-        position: relative;
115
-        right: 0px;
108
+}
109
+
110
+//END
111
+
112
+.User-Setup-background-wxInfo-InfoCell {
113
+  width: 100%;
114
+  height: 108px;
115
+  display: flex;
116
+  align-items: center;
117
+  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
118
+  &-imgae {
119
+    width: 34px;
120
+    height: 43px;
121
+  }
122
+  .box-flex {
123
+    width: 91%;
124
+    display: flex;
125
+    margin-left: 24px;
126
+    justify-content: space-between;
127
+    &-text {
128
+      position: relative;
129
+      right: 0px;
130
+
131
+      font-size: 34px;
132
+      font-weight: bold;
133
+      color: #333333;
134
+      letter-spacing: 5px;
135
+    }
116 136
 
117
-        font-size: 34px;
118
-        font-weight: bold;
119
-        color: #333333;
120
-        letter-spacing: 5px;
121
-      }
137
+    > Image {
138
+      width: 21px;
139
+      height: 36px;
122 140
     }
123 141
   }
124 142
 }
143
+
144
+.bottom-buttom {
145
+  width: 95vw;
146
+  box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
147
+  text-align: center;
148
+  line-height: 98px;
149
+  height: 98px;
150
+  background: #ffffff;
151
+  border-radius: 49px;
152
+  font-size: 40px;
153
+  font-weight: 600;
154
+  margin: 59px auto;
155
+}