index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view class="vcard-ward">
  3. <view class="vcard-ward-info">
  4. <view class="vcard-ward-info-top"> 个人名片 </view>
  5. <view class="vcard-ward-info-main">
  6. <view class="head">
  7. <image
  8. :src="
  9. userInfo && userInfo.avatar
  10. ? $method.splitImgHost(userInfo.avatar, true)
  11. : defaultHead
  12. "
  13. ></image>
  14. </view>
  15. <view class="info">
  16. <view class="info-name"> {{ userInfo.realname }} </view>
  17. <view class="info-item fl">
  18. <image src="../../static/image/icon-phone.png" mode=""></image>
  19. <view class=""> {{ userInfo.phonenumber }} </view>
  20. </view>
  21. <view class="info-item fll">
  22. <image src="../../static/image/icon-business.png" mode=""></image>
  23. <view class=""> {{ userInfo.tenantName }}</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="vcard-ward-tips">
  29. <!-- <view class="vcard-ward-tips-title"> 活动规则说明 </view>
  30. <view class="vcard-ward-tips-text">
  31. 文案文案规则说明文案文案规则说明,文案文案规则说明文案文案规则说明文案文案明,文案文案规则说明文案文案规则说明文案文案规则说明,文案文案规则说明文案文案规则说明文案文案规则说明,文案文案规则说明文案文案规则说明文案文案规则说明,文案文案规则说明
  32. </view> -->
  33. </view>
  34. <view class="vcard-ward-btns fl_b">
  35. <view @click="toLogin">登录</view>
  36. <view style="background: #5a8cff" @click="toRegister">注册</view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import { getInfoByShareCode } from "@/utils/user";
  42. export default {
  43. data() {
  44. return {
  45. defaultHead: require("../../static/image/defhead.png"),
  46. userInfo: {},
  47. };
  48. },
  49. methods: {
  50. getInfoByShareCode(shareCode) {
  51. shareCode &&
  52. getInfoByShareCode({ shareCode }).then((res) => {
  53. this.userInfo = res;
  54. });
  55. },
  56. toLogin() {
  57. uni.navigateTo({
  58. url: "/pages/login/login?backBill=1&shareCode=" + this.shareCode,
  59. });
  60. },
  61. toRegister() {
  62. uni.navigateTo({
  63. url: "/pages/login/register?backBill=1&shareCode=" + this.shareCode,
  64. });
  65. },
  66. },
  67. onLoad(option) {
  68. this.shareCode = option.shareCode;
  69. this.getInfoByShareCode(option.shareCode);
  70. },
  71. };
  72. </script>
  73. <style scoped lang="scss">
  74. page {
  75. background: #353f5c;
  76. }
  77. image {
  78. width: 100%;
  79. height: 100%;
  80. }
  81. .vcard-ward {
  82. padding: 60rpx 40rpx;
  83. .vcard-ward-info {
  84. padding-top: 16rpx;
  85. background: #417bff;
  86. border-radius: 20rpx;
  87. .vcard-ward-info-top {
  88. height: 60rpx;
  89. background: linear-gradient(180deg, #ffdea7 0%, #ffeed2 100%);
  90. margin: 0 14rpx;
  91. border-radius: 13rpx 13rpx 0 0;
  92. line-height: 60rpx;
  93. padding-left: 24rpx;
  94. color: #9c7b4a;
  95. font-size: 28rpx;
  96. }
  97. .vcard-ward-info-main {
  98. display: flex;
  99. padding: 32rpx;
  100. color: #ffffff;
  101. background: #5a8cff;
  102. border-radius: 20rpx;
  103. .head {
  104. width: 120rpx;
  105. height: 120rpx;
  106. image {
  107. border-radius: 50%;
  108. }
  109. }
  110. .info {
  111. margin-left: 26rpx;
  112. padding-top: 10rpx;
  113. flex: 1;
  114. .info-name {
  115. font-weight: bold;
  116. font-size: 36rpx;
  117. margin-bottom: 30rpx;
  118. }
  119. .info-item {
  120. margin-bottom: 12rpx;
  121. font-size: 28rpx;
  122. image {
  123. width: 32rpx;
  124. height: 32rpx;
  125. margin-right: 20rpx;
  126. }
  127. }
  128. .fll {
  129. display: flex;
  130. line-height: 38rpx;
  131. image {
  132. padding-top: 4rpx;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. .vcard-ward-tips {
  139. margin-top: 80rpx;
  140. font-size: 32rpx;
  141. .vcard-ward-tips-title {
  142. font-weight: bold;
  143. color: #ffffff;
  144. margin-bottom: 24rpx;
  145. }
  146. .vcard-ward-tips-text {
  147. font-size: 32rpx;
  148. color: #bbb;
  149. font-weight: 400;
  150. line-height: 48rpx;
  151. }
  152. }
  153. .vcard-ward-btns {
  154. width: 90%;
  155. height: 100rpx;
  156. position: fixed;
  157. bottom: 40rpx;
  158. view {
  159. width: 320rpx;
  160. text-align: center;
  161. line-height: 100rpx;
  162. font-weight: bold;
  163. color: #ffffff;
  164. font-size: 32rpx;
  165. background: #44ca7d;
  166. border-radius: 16rpx;
  167. }
  168. }
  169. }
  170. </style>