Sfoglia il codice sorgente

fix:认证租户选择的页面

chenzhen2 1 anno fa
parent
commit
bfd812eb2f

+ 1 - 1
src/app.wpy

@@ -43,8 +43,8 @@ wepy.app({
 <config>
 {
     pages: [
+      'pages/bindTenant/index',
       'pages/index',
-      'pages/bindTenant/index'
     ],
     "subpackages":[
      {

+ 13 - 39
src/components/common/page-top-bar.wpy

@@ -4,7 +4,7 @@
   top: 0;
   left: 0;
   width: 100%;
-  z-index: 100;
+  z-index: 444;
   .page-top-bar {
     position: relative;
     .title {
@@ -14,43 +14,23 @@
       display: flex;
       align-items: center;
       justify-content: center;
-      font-size: 36rpx;
+      font-size: 18px;
       color: #ffffff;
     }
     .icon {
       position: absolute;
-      left: 32rpx;
+      left: 17px;
       bottom: 0;
-      width: 24rpx;
-      height: 45rpx;
-      .icon_home {
-        width: 76rpx;
-        height: 56rpx;
-      }
+      line-height: 17px;
+      width: 87px;
       .icon_define {
-        width: 24rpx;
-        height: 45rpx;
-      }
-      &.white {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        width: 42px;
-        height: 32px;
-        background: rgba(255, 255, 255, 0.596637);
-        border: 0.5px solid rgba(151, 151, 151, 0.201002);
-        box-sizing: border-box;
-        border-radius: 25px;
-        .icon_define {
-          width: 8px;
-          height: 16px;
-        }
+        width: 9px;
+        height: 17px;
       }
     }
   }
 }
 </style>
-
 <template>
   <div class="component-container"
        :style="{'padding-top': pageTopBarTop + 'px','padding-bottom': pageTopBarBottom + 'px', 'height': pageTopBarHeight + 'px', 'background-color': bgColor}">
@@ -60,19 +40,13 @@
            :style="{'color': titleColor, height: pageTopBarHeight + 'px'}">
         <span v-show="title">{{title}}</span>
       </div>
-      <div v-if="icon || iconType"
+      <div v-if="icon"
            class="icon"
            v-on:click="emitIconClick"
            :style="{bottom: bottom+'px'}"
            :class="{'white': iconBg === 'white'}">
-        <block v-if="iconType == 'home'">
-          <image class="icon_home"
-                 src="{{h5StaticPath}}/static/icon_home.svg" />
-        </block>
-        <block v-else>
-          <image class="icon_define"
+           <image class="icon_define"
                  src="{{icon}}" />
-        </block>
       </div>
     </div>
   </div>
@@ -97,7 +71,7 @@ wepy.component({
       type: String,
       default: '#fff'
     },
-    pageTopBarBottom:{
+    pageTopBarBottom: {
       type: Number,
       default: 0
     },
@@ -109,15 +83,15 @@ wepy.component({
 
     // 加上右上角胶囊按钮的边框2
     this.pageTopBarTop = menuButtonBoundingClientRect.top;
-    if(!this.iconBg) {
-      this.bottom = (this.pageTopBarHeight - 22) / 2
+    if (!this.iconBg) {
+      this.bottom = (this.pageTopBarHeight - 17) / 2;
     }
   },
   data: {
     pageTopBarTop: 0,
     pageTopBarHeight: 48,
     bottom: 0,
-    h5StaticPath: config.h5StaticPath,
+    h5StaticPath: config.h5StaticPath
   },
   methods: {
     emitIconClick(e) {

+ 1 - 1
src/config/index.js

@@ -27,7 +27,7 @@ const duoduoenvService = '/duoduo-service/duoduoenv-service/'
 config = Object.assign(base, config, {
   // h5PagePath: config.h5Origin + '/#',
   h5PagePath: 'http://localhost:8081/' + '/#',
-  h5StaticPath: '/static',
+  h5StaticPath: 'http://192.168.16.234:8080/static',
   // h5StaticPath: config.h5Origin + '/static/WeChat',
   featuresVersion,
   projectName,

+ 123 - 5
src/pages/bindTenant/index.wpy

@@ -1,22 +1,125 @@
 <style lang="less">
 page {
   height: 100%;
+  overflow: hidden;
   background: rgba(235, 245, 250, 1);
 }
 .overflow-wrap {
+  box-sizing: border-box;
   width: 100%;
   height: 100%;
-
-  padding: 24rpx 40rpx;
+  padding-left: 40rpx;
+  padding-right: 40rpx;
+  padding-top: 136rpx;
+  padding-bottom: 208rpx;
+  overflow-y: auto;
   .bind-item {
+    position: relative;
+    width: 100%;
+    box-sizing: border-box;
     padding: 40rpx 48rpx;
+    margin: 0 auto;
+    margin-top: 24rpx;
+    background: #ffffff;
+    border-radius: 20px;
+    &:nth-child(1) {
+      margin-top: 34rpx;
+    }
+    .checked-icon {
+      position: absolute;
+      right: 0;
+      top: 0;
+      width: 56rpx;
+      height: 56rpx;
+    }
+    .tenant-name {
+      font-family: PingFang SC;
+      font-size: 36rpx;
+      font-weight: 500;
+      line-height: 50rpx;
+      letter-spacing: 0px;
+    }
+    .tenant-identity {
+      display: flex;
+      padding-top: 8rpx;
+      justify-content: space-between;
+      font-family: PingFang SC;
+
+      .info {
+        font-size: 28rpx;
+        font-weight: 400;
+        padding: 8rpx;
+        //styleName: 14/常规;
+        font-family: PingFang SC;
+        font-weight: 400;
+        color: #8b949e;
+      }
+      image {
+        width: 112rpx;
+        height: 40rpx;
+      }
+    }
+  }
+  .check-item {
+    background: #3dcbcc4d;
+  }
+  .bind-btn-box {
+    position: fixed;
+    z-index: 333;
+    bottom: 0;
+    left: 0;
+    height: 208rpx;
+    width: 100%;
+    background: linear-gradient(
+      180deg,
+      rgba(235, 245, 250, 0) 0%,
+      #ebf5fa 44.97%
+    );
+    button {
+      margin-top: 20px;
+      width: 670rpx;
+      height: 100rpx;
+      line-height: 100rpx;
+      border: none;
+      border-color: transparent;
+      color: #fff;
+      border-radius: 28px;
+      background: #3dcbcc;
+    }
   }
 }
 </style>
 <template>
  <div class="overflow-wrap">
+  <page-top-bar title="公司身份选择" 
+  titleColor="#1B2129" bgColor="#EBF5FA" icon="{{h5StaticPath+'/topBar/return-icon.svg'}}"></page-top-bar>
+   <div class="bind-item check-item">
+      <div class="tenant-name">禹数科技有限公司</div>
+      <div class="tenant-identity">
+        <div class="info">正式员工</div>
+        <image class="logo-icon" src="{{h5StaticPath+'/bindTenant/logo_icon.svg'}}"/>
+      </div>
+      <image class="checked-icon" src="{{h5StaticPath+'/bindTenant/checked.svg'}}"/>
+   </div>
    <div class="bind-item">
-      
+      <div class="tenant-name">禹数科技有限公司</div>
+      <div class="tenant-identity">
+        <div class="info">正式员工</div>
+        <image class="logo-icon" src="{{h5StaticPath+'/bindTenant/logo_icon.svg'}}"/>
+      </div>
+      <image class="checked-icon" src="{{h5StaticPath+'/bindTenant/checked.svg'}}"/>
+   </div>
+   <div class="bind-item" :key="key" v-for="(item,key) in 20">
+      <div class="tenant-name">禹数科技有限公司</div>
+      <div class="tenant-identity">
+        <div class="info">正式员工</div>
+        <image class="logo-icon" src="{{h5StaticPath+'/bindTenant/logo_icon.svg'}}"/>
+      </div>
+      <image class="checked-icon" src="{{h5StaticPath+'/bindTenant/checked.svg'}}"/>
+   </div>
+
+   <div class="bind-btn-box">
+    <button>确认</button>
    </div>
  </div>
 </template>
@@ -25,6 +128,7 @@ page {
 import wepy from '@wepy/core';
 import { mapState } from '@wepy/x';
 import store from '@/store';
+import config from '@/config';
 import { setUserInfoByAuth } from '@/service/user';
 
 wepy.page({
@@ -32,7 +136,15 @@ wepy.page({
   config: {
     navigationBarTitleText: 'test'
   },
-  data: {},
+  data: {
+    pageTopBarHeight: 48,
+    tenantData: [
+      {
+        name: '科技公司1'
+      }
+    ],
+    h5StaticPath: config.h5StaticPath
+  },
   onLoad() {},
   onShow() {
     // this.checkAuthCamra();
@@ -44,7 +156,13 @@ wepy.page({
 <config>
 {
   "navigationBarTitleText": "公司身份选择",
-  "disableScroll": true,
   "backgroundColor": "#EBF5FA",
+  navigationStyle:"custom",
+  usingComponents: {
+    'page-top-bar': '~@/components/common/page-top-bar',      
+  },
+  componentPlaceholder:{
+    'page-top-bar': 'view'
+  }
 }
 </config>

+ 0 - 2
src/pages/index.wpy

@@ -153,7 +153,5 @@ wepy.page({
 <config>
 {
 navigationBarTitleText: '首页',
-usingComponents: {
-}
 }
 </config>