index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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.telphone }} </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",
  59. });
  60. },
  61. toRegister() {
  62. uni.navigateTo({
  63. url: "/pages/login/register",
  64. });
  65. },
  66. },
  67. onLoad(option) {
  68. this.getInfoByShareCode(option.shareCode);
  69. },
  70. };
  71. </script>
  72. <style scoped lang="scss">
  73. page {
  74. background: #353f5c;
  75. }
  76. image {
  77. width: 100%;
  78. height: 100%;
  79. }
  80. .vcard-ward {
  81. padding: 60rpx 40rpx;
  82. .vcard-ward-info {
  83. padding-top: 16rpx;
  84. background: #417bff;
  85. border-radius: 20rpx;
  86. .vcard-ward-info-top {
  87. height: 60rpx;
  88. background: linear-gradient(180deg, #ffdea7 0%, #ffeed2 100%);
  89. margin: 0 14rpx;
  90. border-radius: 13rpx 13rpx 0 0;
  91. line-height: 60rpx;
  92. padding-left: 24rpx;
  93. color: #9c7b4a;
  94. font-size: 28rpx;
  95. }
  96. .vcard-ward-info-main {
  97. display: flex;
  98. padding: 32rpx;
  99. color: #ffffff;
  100. background: #5a8cff;
  101. border-radius: 20rpx;
  102. .head {
  103. width: 120rpx;
  104. height: 120rpx;
  105. image {
  106. border-radius: 50%;
  107. }
  108. }
  109. .info {
  110. margin-left: 26rpx;
  111. padding-top: 10rpx;
  112. flex: 1;
  113. .info-name {
  114. font-weight: bold;
  115. font-size: 36rpx;
  116. margin-bottom: 30rpx;
  117. }
  118. .info-item {
  119. margin-bottom: 12rpx;
  120. font-size: 28rpx;
  121. image {
  122. width: 32rpx;
  123. height: 32rpx;
  124. margin-right: 20rpx;
  125. }
  126. }
  127. .fll {
  128. display: flex;
  129. line-height: 38rpx;
  130. image {
  131. padding-top: 4rpx;
  132. }
  133. }
  134. }
  135. }
  136. }
  137. .vcard-ward-tips {
  138. margin-top: 80rpx;
  139. font-size: 32rpx;
  140. .vcard-ward-tips-title {
  141. font-weight: bold;
  142. color: #ffffff;
  143. margin-bottom: 24rpx;
  144. }
  145. .vcard-ward-tips-text {
  146. font-size: 32rpx;
  147. color: #bbb;
  148. font-weight: 400;
  149. line-height: 48rpx;
  150. }
  151. }
  152. .vcard-ward-btns {
  153. width: 90%;
  154. height: 100rpx;
  155. position: fixed;
  156. bottom: 40rpx;
  157. view {
  158. width: 320rpx;
  159. text-align: center;
  160. line-height: 100rpx;
  161. font-weight: bold;
  162. color: #ffffff;
  163. font-size: 32rpx;
  164. background: #44ca7d;
  165. border-radius: 16rpx;
  166. }
  167. }
  168. }
  169. </style>