소스 검색

静态页面

1002884655 4 년 전
부모
커밋
b71cfb0a04
2개의 변경된 파일25개의 추가작업 그리고 2개의 파일을 삭제
  1. 16
    2
      src/pages/person/index.js
  2. 9
    0
      src/pages/person/index.scss

+ 16
- 2
src/pages/person/index.js 파일 보기

@@ -15,6 +15,7 @@ import login from '@/utils/login'
15 15
 export const version = Version
16 16
 import { rule as ruleToast } from '@/utils/ruleToast'
17 17
 import { Loading } from '@/components/Loading'
18
+import ready from '@/utils/ready'
18 19
 
19 20
 const DRIFT = ROLE_CODE['DRIFT']
20 21
 const CUSTOMER = ROLE_CODE['CUSTOMER']
@@ -41,6 +42,7 @@ export default class Person extends Component {
41 42
     pageVisible: false,
42 43
     loading: true,
43 44
     UserLevelIcon: null,
45
+    Org: null,
44 46
     UserMenus: [
45 47
       [
46 48
         {
@@ -120,6 +122,14 @@ export default class Person extends Component {
120 122
       ]
121 123
     ]
122 124
   }
125
+  componentWillMount () {
126
+    ready.queue(() => {
127
+      console.log(this.props, `--------------------------------------------1111111111111111111111111`)
128
+      this.setState({
129
+        Org: this.props.user.userInfo.person.org || null
130
+      })
131
+    })
132
+  }
123 133
 
124 134
   componentDidShow () {
125 135
     Taro.showLoading()
@@ -319,7 +329,7 @@ export default class Person extends Component {
319 329
   }
320 330
 
321 331
   renderDetail () {
322
-    const { users, menus, roleName, UserMenus, UserLevelIcon } = this.state
332
+    const { users, menus, roleName, UserMenus, UserLevelIcon, Org } = this.state
323 333
     const { user: { userInfo: { person: { avatarurl, org: { waterMark } = {} }, miniApp: { name } } } } = this.props
324 334
 
325 335
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
@@ -329,7 +339,11 @@ export default class Person extends Component {
329 339
       <View className="person">
330 340
         <Notice></Notice>
331 341
         <View className="info">
332
-          <Image className="bg" src='../../assets/img/topbg.jpg' mode='widthFix'></Image>
342
+          <Image className="bg" src={require('@/assets/img/topbg.jpg')} mode='widthFix'></Image>
343
+          {
344
+            Org !== null &&
345
+            <Image className="WaterMark" src={Org.waterMark} mode='widthFix'></Image>
346
+          }
333 347
 
334 348
           <View className="content">
335 349
             <View className="info-block">

+ 9
- 0
src/pages/person/index.scss 파일 보기

@@ -117,6 +117,15 @@
117 117
     width: 100%;
118 118
     position: relative;
119 119
   }
120
+  .WaterMark {
121
+    width: 180px;
122
+    display: block;
123
+    position: absolute;
124
+    right: 30px;
125
+    top: 50%;
126
+    transform: translateY(-50%);
127
+    -webkit-transform: translateY(-50%);
128
+  }
120 129
   .logo{
121 130
     position: absolute;
122 131
     width: 200px;