chooseIdentity.wpy 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <style lang="less">
  2. .overflow-wrap {
  3. box-sizing: border-box;
  4. position: relative;
  5. width: 100%;
  6. height: 100%;
  7. background-color: #ebf5fa;
  8. background-repeat: no-repeat;
  9. background-size: contain;
  10. padding-left: 40rpx;
  11. padding-right: 40rpx;
  12. padding-top: 166rpx;
  13. padding-bottom: 208rpx;
  14. overflow-y: auto;
  15. .bind-item {
  16. position: relative;
  17. width: 100%;
  18. box-sizing: border-box;
  19. padding: 40rpx 48rpx;
  20. margin: 0 auto;
  21. margin-top: 24rpx;
  22. background: #ffffff;
  23. border-radius: 20px;
  24. overflow: hidden;
  25. // &:nth-child(1) {
  26. // margin-top: 34rpx;
  27. // }
  28. .checked-icon {
  29. position: absolute;
  30. right: 0;
  31. top: 0;
  32. width: 56rpx;
  33. height: 56rpx;
  34. }
  35. .tenant-name {
  36. font-family: PingFang SC;
  37. font-size: 36rpx;
  38. font-weight: 500;
  39. line-height: 50rpx;
  40. letter-spacing: 0px;
  41. }
  42. .tenant-identity {
  43. display: flex;
  44. padding-top: 8rpx;
  45. justify-content: space-between;
  46. font-family: PingFang SC;
  47. .info {
  48. font-size: 28rpx;
  49. font-weight: 400;
  50. padding: 8rpx;
  51. //styleName: 14/常规;
  52. font-family: PingFang SC;
  53. font-weight: 400;
  54. color: #8b949e;
  55. }
  56. image {
  57. width: 112rpx;
  58. height: 40rpx;
  59. }
  60. }
  61. }
  62. .check-item {
  63. background: #3dcbcc4d;
  64. }
  65. .bind-btn-box {
  66. position: fixed;
  67. z-index: 333;
  68. bottom: 0;
  69. left: 0;
  70. height: 208rpx;
  71. width: 100%;
  72. background: linear-gradient(
  73. 180deg,
  74. rgba(235, 245, 250, 0) 0%,
  75. #ebf5fa 44.97%
  76. );
  77. button {
  78. margin-top: 20px;
  79. width: 670rpx;
  80. height: 100rpx;
  81. line-height: 100rpx;
  82. border: none;
  83. border-color: transparent;
  84. color: #fff;
  85. border-radius: 28px;
  86. background: #3dcbcc;
  87. }
  88. }
  89. }
  90. </style>
  91. <template>
  92. <div class="overflow-wrap" :style="{'background-image': 'url('+h5StaticPath+'/page-home/adminBack.png)'}">
  93. <navigationbar :ntitle="'选择登录身份'"></navigationbar>
  94. <div class="bind-item" >
  95. <div class="tenant-name">{{ companyName }}</div>
  96. <div class="tenant-identity">
  97. <div class="info">正式员工</div>
  98. <image class="logo-icon" src="{{h5StaticPath+'/page-bind-tenant/logo_icon.svg'}}"/>
  99. </div>
  100. <image class="checked-icon" src="{{h5StaticPath+'/page-bind-tenant/checked.svg'}}"/>
  101. </div>
  102. <div class="bind-btn-box">
  103. <button @click.stop="loginAdmin">确认</button>
  104. </div>
  105. </div>
  106. </template>
  107. <script>
  108. import wepy from '@wepy/core';
  109. import eventHub from '@/common/eventHub';
  110. import { mapState } from '@wepy/x';
  111. import store from '@/store';
  112. import config from '@/config';
  113. import { confirmLogin } from '@/api/home.js';
  114. wepy.page({
  115. store,
  116. config: {},
  117. data: {
  118. h5StaticPath: config.h5StaticPath,
  119. qrCodeId: '',
  120. },
  121. computed: {
  122. ...mapState({
  123. userInfo: (state) => state.user.userInfo,
  124. projctId: (state) => state.user?.userInfo?.projctId,
  125. companyId: (state) => state.user?.userInfo?.companyId,
  126. companyName: (state) => {
  127. return state.user?.companyName;
  128. },
  129. }),
  130. },
  131. methods: {
  132. loginAdmin() {
  133. confirmLogin({ qrCodeId: this.qrCodeId })
  134. .then((res) => {
  135. if (res.result == 'success') {
  136. wx.navigateTo({
  137. url: `/packagesEnv/pages/administration/asuccess`,
  138. });
  139. }
  140. })
  141. .catch((err) => {});
  142. },
  143. },
  144. onLoad(options) {
  145. this.qrCodeId = options.qrCodeId;
  146. },
  147. onShow() {},
  148. });
  149. </script>
  150. <config>
  151. {
  152. "navigationStyle":"custom",
  153. usingComponents: {
  154. "van-icon": "module:@vant/weapp/dist/icon",
  155. "navigationbar":'./navigationbar',
  156. }
  157. }
  158. </config>