Explorar el Código

Merge branch 'master' of http://git.ycjcjy.com/pet_identity/miniapp

张延森 hace 3 años
padre
commit
f203ce1d0f

+ 18
- 6
src/app.js Ver fichero

@@ -1,6 +1,6 @@
1 1
 import { Component } from 'react'
2 2
 import Taro from '@tarojs/taro';
3
-
3
+//at.alicdn.com/t/font_3429358_khwsvk6pgxm.css
4 4
 import store, { StoreRoot, useModel } from './store'
5 5
 
6 6
 import './app.less'
@@ -8,7 +8,9 @@ import { View } from '@tarojs/components';
8 8
 
9 9
 class App extends Component {
10 10
 
11
-  componentDidMount () { }
11
+  componentDidMount () {
12
+
13
+  }
12 14
 
13 15
   componentDidShow () { }
14 16
 
@@ -16,20 +18,30 @@ class App extends Component {
16 18
 
17 19
   componentDidCatchError () { }
18 20
   onLaunch (options) {
21
+
19 22
     const { logins, setUserLocation } = store.getModel('userData').getState()
20 23
 
21 24
 
22 25
     // 登录获取人员信息
23
-
24
-
25 26
     Taro.login({
26 27
       success: (res) => {
27 28
         const { code } = res;
28 29
         logins({ code })
29
-
30
-
31 30
       }
32 31
     })
32
+    Taro.loadFontFace({
33
+      family: 'iconfont',
34
+      source: 'url("//at.alicdn.com/t/font_3429358_r17zty6kva.ttf?t=1653534540687")',
35
+      success () {
36
+        console.log('eeeeeeeeee');
37
+
38
+      },
39
+      fail (e) {
40
+        console.log(e);
41
+      }
42
+    })
43
+
44
+
33 45
 
34 46
   }
35 47
 

+ 2
- 0
src/app.less Ver fichero

@@ -1,3 +1,5 @@
1
+@import "./components/ViewIcon/style.less";
2
+
1 3
 page {
2 4
   background-color: #f5f5f5;
3 5
 }

BIN
src/assets/listImage.png Ver fichero


+ 18
- 0
src/components/ViewIcon/index.jsx Ver fichero

@@ -0,0 +1,18 @@
1
+import Taro from '@tarojs/taro';
2
+import { View, Text, Swiper, SwiperItem, Image } from '@tarojs/components';
3
+import './style.less'
4
+
5
+export default (props) => {
6
+  const { size, icon, color } = props;
7
+  const styleIcon = {
8
+    display: 'inline-block',
9
+    fontSize: `${size}px`,
10
+    color: color,
11
+
12
+  }
13
+
14
+  return (
15
+    <View className={`iconfont icon-${icon}`} style={styleIcon}></View>
16
+  )
17
+
18
+}

+ 49
- 0
src/components/ViewIcon/style.less Ver fichero

@@ -0,0 +1,49 @@
1
+@font-face {
2
+  font-family: "iconfont"; /* Project id 3429358 */
3
+  src: url("//at.alicdn.com/t/font_3429358_r17zty6kva.ttf?t=1653534540687")
4
+    format("truetype");
5
+}
6
+
7
+.iconfont {
8
+  font-family: "iconfont" !important;
9
+  font-size: 16px;
10
+  font-style: normal;
11
+  -webkit-font-smoothing: antialiased;
12
+  -moz-osx-font-smoothing: grayscale;
13
+}
14
+
15
+.icon-tongzhigonggao:before {
16
+  content: "\e634";
17
+}
18
+
19
+.icon-icon-test:before {
20
+  content: "\e618";
21
+}
22
+
23
+.icon-dingdan:before {
24
+  content: "\e897";
25
+}
26
+
27
+.icon-jihuajindu:before {
28
+  content: "\e600";
29
+}
30
+
31
+.icon-alibaba-banzhengfuwu:before {
32
+  content: "\e892";
33
+}
34
+
35
+.icon-gouzheng:before {
36
+  content: "\e632";
37
+}
38
+
39
+.icon-wode:before {
40
+  content: "\e604";
41
+}
42
+
43
+.icon-guashi:before {
44
+  content: "\e636";
45
+}
46
+
47
+.icon-xuqi:before {
48
+  content: "\e613";
49
+}

+ 2
- 0
src/pages/main/index.config.js Ver fichero

@@ -5,6 +5,8 @@ export default {
5 5
   navigationBarTextStyle: "black",
6 6
   backgroundColor: "#FBD804",
7 7
   usingComponents: {
8
+    "mp-cells": "weui-miniprogram/cells/cells",
9
+    "mp-cell": "weui-miniprogram/cell/cell",
8 10
   }
9 11
 
10 12
 }

+ 25
- 3
src/pages/main/index.jsx Ver fichero

@@ -1,15 +1,37 @@
1 1
 import { View, Text, Image } from '@tarojs/components'
2 2
 import Taro from '@tarojs/taro';
3
+import ViewIcon from '../../components/ViewIcon';
4
+import listImage from '../../assets/listImage.png'//办证
5
+
3 6
 
4 7
 import './style.less'
5 8
 
6 9
 export default (props) => {
7 10
 
8
-
11
+  const goDogList = () => {
12
+    console.log('e',);
13
+  }
9 14
   return (
10
-    <View className='index-UserQRcode'>
15
+    <View className='user-box'>
16
+
17
+      <View className='user-box-Card'>
18
+        <Image />
19
+      </View>
20
+
21
+      <mp-cells ext-class='my-cells' >
22
+        <mp-cell link hover>
23
+          <View className='iconCell'>
24
+            <ViewIcon icon='dingdan' size={25} />
25
+            {/* <Image slot='icon' src={listImage} style='margin-right: 16px;vertical-align: middle;width:28px; height: 30px;' /> */}
26
+
27
+            <View onClick={goDogList} style='padding-left:5px;width:80%'>申请列表</View>
28
+
29
+          </View>
30
+
31
+        </mp-cell>
11 32
 
12
-    </View>
33
+      </mp-cells>
34
+    </View >
13 35
   )
14 36
 }
15 37
 

+ 6
- 0
src/pages/main/style.less Ver fichero

@@ -0,0 +1,6 @@
1
+.user-box {
2
+  .iconCell {
3
+    display: flex;
4
+    align-items: center;
5
+  }
6
+}