李志伟 hace 3 años
padre
commit
8be10d9a15
Se han modificado 2 ficheros con 24 adiciones y 22 borrados
  1. 13
    8
      src/pages/dogCardDetail/index.jsx
  2. 11
    14
      src/pages/dogCardDetail/style.less

+ 13
- 8
src/pages/dogCardDetail/index.jsx Ver fichero

@@ -1,4 +1,5 @@
1 1
 import { View, Image, ScrollView } from '@tarojs/components'
2
+import RatioItem from '@/components/RatioItem';
2 3
 import './style.less'
3 4
 
4 5
 export default (props) => {
@@ -22,12 +23,19 @@ export default (props) => {
22 23
                 <View className='lable'>犬名</View>:
23 24
                 <View className='content'>噬嗥</View>
24 25
               </View>
26
+              <View className='cell'>
27
+            <View className='lable'>毛色</View>:
28
+            <View className='content'>米白</View>
29
+          </View>
25 30
             </View>
26 31
             <View className='cardRight'>
27
-              <Image
28
-                className='thumb'
29
-                src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fq_70%2Cc_zoom%2Cw_640%2Fimages%2F20181228%2Ff22539cd34044f5f821e9893f508765d.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656163682&t=bec14da4c530bf5f0ae04ff8488a9ebd'
30
-              ></Image>
32
+                <RatioItem ratio='109:151'>
33
+                  <Image
34
+                    style={{width:'100%'}}
35
+                    mode='center'
36
+                    src='https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fq_70%2Cc_zoom%2Cw_640%2Fimages%2F20181228%2Ff22539cd34044f5f821e9893f508765d.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656163682&t=bec14da4c530bf5f0ae04ff8488a9ebd'
37
+                  ></Image>
38
+                </RatioItem>
31 39
             </View>
32 40
           </View>
33 41
           <View className='cell' style={{ marginTop: '0' }}>
@@ -39,10 +47,7 @@ export default (props) => {
39 47
             <View className='lable'>犬种</View>:
40 48
             <View className='content'>银月狼神一族</View>
41 49
           </View>
42
-          <View className='cell'>
43
-            <View className='lable'>毛色</View>:
44
-            <View className='content'>米白</View>
45
-          </View>
50
+          
46 51
           <View className='cell'>
47 52
             <View className='lable'>证件号</View>:
48 53
             <View className='content'>36559948485522</View>

+ 11
- 14
src/pages/dogCardDetail/style.less Ver fichero

@@ -41,21 +41,18 @@
41 41
         background-color:rgb(170, 168, 168);
42 42
       }
43 43
     }
44
-    .cardLeft{
45
-      width: 60%;
46
-      display: inline-block;
47
-    }
48
-    .cardRight{
49
-      width: 40%;
50
-      display: inline-block;
51
-      text-align: center;
52
-      vertical-align: top;
53
-      .thumb{
54
-        width: 30vw;
55
-        height: 30vw;
56
-        margin: 16px 0 0 16px;
44
+    .body{
45
+      display: flex;
46
+      justify-content:space-between;
47
+      .cardLeft{
48
+        width: 60%;
49
+      }
50
+      .cardRight{
51
+        overflow: hidden;
52
+        width: 35%;
53
+        margin: 16px 0;        
57 54
       }
58
-      // 100vw-64px-32px*0.4
59 55
     }
56
+    
60 57
   }
61 58
 }