index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="me-content" :style="{'--status-bar-': statusBarHeight}">
  3. <view class="me-content-info">
  4. <!-- 头部主要内容 开始 -->
  5. <view class="me-content-header">
  6. <customNavbar
  7. title="我的"
  8. bgColor="#fff"
  9. :is-left="false"
  10. :contentStyle="{color: '#000'}"
  11. ></customNavbar>
  12. </view>
  13. <!-- 头部主要内容 结束 -->
  14. <!-- userInfo内容 开始 -->
  15. <view class="me-content-userinfo">
  16. <view class="me-userinfo-info">
  17. <view><text>分销商名称:</text><text>张飞烤地瓜旅行社是发射点发射点发
  18. 张飞烤地瓜旅行社是发射点发射点发张飞烤地瓜旅行社是发射点发射点发</text></view>
  19. <view><text>负责人:</text><text>关羽</text></view>
  20. </view>
  21. </view>
  22. <!-- userInfo内容 结束 -->
  23. <!-- tool内容 开始 -->
  24. <view class="me-content-tool">
  25. <view
  26. class="me-tool-item"
  27. v-for="(item,index) in tool"
  28. :key="index"
  29. @click="navigateToFun(item)"
  30. >
  31. <image
  32. class="me-tool-item-icon"
  33. :src="item.icon"></image>
  34. <text>{{ item.title }}</text>
  35. <view><u-icon name="arrow-right"></u-icon></view>
  36. </view>
  37. </view>
  38. <!-- tool内容 结束 -->
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import { navigateTo } from "@/utils/util.js"
  44. export default {
  45. data() {
  46. return {
  47. title: '这是我的',
  48. statusBarHeight: 0, // 状态栏安全距离
  49. tool: [ // 我的工具
  50. { title: "邀请统计",icon: this.$commonConfig.staticUrl + 'me/yijian2.png', url: '/pages/invitationStatistics/index' },
  51. { title: "余额提现",icon: this.$commonConfig.staticUrl + 'me/beifeng.png', url: '/pages/balance/index' },
  52. { title: "我的推广码",icon: this.$commonConfig.staticUrl + 'me/yijian1.png', url: '' },
  53. ]
  54. }
  55. },
  56. onLoad() {
  57. },
  58. onShow() {
  59. this.statusBarHeight = getApp().globalData.statusBarHeight
  60. },
  61. methods: {
  62. /**
  63. * @author ygh
  64. * @data 2023-12-20
  65. */
  66. navigateToFun(item){
  67. navigateTo(item.url)
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .me-content {
  74. display: flex;
  75. flex-direction: column;
  76. align-items: center;
  77. justify-content: center;
  78. --header-h: 90rpx;
  79. .me-content-info {
  80. width: 100%;
  81. box-sizing: border-box;
  82. }
  83. }
  84. /** 头部主要内容 开始 */
  85. .me-content-header {
  86. width: 100%;
  87. height: var(--header-h);
  88. box-sizing: border-box;
  89. ::v-deep .u-search {
  90. padding: 0 30rpx !important;
  91. }
  92. ::v-deep .u-search__action {
  93. color: #fff !important;
  94. }
  95. }
  96. /** 头部主要内容 结束 **/
  97. /** userInfo内容 开始 */
  98. .me-content-userinfo {
  99. width: 100%;
  100. padding: 24rpx;
  101. box-sizing: border-box;
  102. .me-userinfo-info {
  103. width: 100%;
  104. height: 200rpx;
  105. box-sizing: border-box;
  106. background: linear-gradient(to bottom, rgba(238, 12, 12, 1) 0%, rgba(243, 157, 159, 1) 100%);
  107. border-radius: 20rpx;
  108. box-shadow: 0rpx 0 20rpx 2rpx rgba(205, 205, 205, 0.50);
  109. display: flex;
  110. flex-direction: column;
  111. align-items: flex-start;
  112. justify-content: center;
  113. color: #fff;
  114. font-size: 28rpx;
  115. font-family: SourceHanSansCN, SourceHanSansCN;
  116. padding: 0 50rpx;
  117. >view:nth-child(1) {
  118. display: flex;
  119. font-weight: 600;
  120. width: 100%;
  121. text:nth-child(1) {
  122. width: 168rpx;
  123. flex-shrink: 0;
  124. }
  125. text:nth-child(2) {
  126. width: calc( 100% - 168rpx );
  127. overflow: hidden;
  128. display: -webkit-box;
  129. -webkit-line-clamp: 2; /* 设置最大显示行数 */
  130. -webkit-box-orient: vertical;
  131. text-overflow: ellipsis;
  132. }
  133. }
  134. >view:nth-child(2) {
  135. width: 100%;
  136. display: flex;
  137. margin-top: 20rpx;
  138. text:nth-child(1) {
  139. width: 112rpx;
  140. flex-shrink: 0;
  141. }
  142. text:nth-child(2) {
  143. width: calc( 100% - 112rpx );
  144. }
  145. }
  146. }
  147. }
  148. /** userInfo内容 结束 **/
  149. /** tool内容 开始 */
  150. .me-content-tool {
  151. width: 100%;
  152. box-sizing: border-box;
  153. padding: 30rpx 30rpx 0;
  154. .me-tool-item {
  155. width: 100%;
  156. background: #FBFBFB;
  157. border-radius: 20rpx;
  158. box-sizing: border-box;
  159. display: flex;
  160. align-items: center;
  161. justify-content: space-between;
  162. color: rgba(54, 54, 54, 1);
  163. font-size: 28rpx;
  164. padding: 12rpx 10rpx;
  165. margin-bottom: 20rpx;
  166. .me-tool-item-icon {
  167. width: 54rpx;
  168. height: 56rpx;
  169. flex-shrink: 0;
  170. }
  171. >text {
  172. width: 100%;
  173. padding-left: 20rpx;
  174. box-sizing: border-box;
  175. }
  176. }
  177. }
  178. /** tool内容 结束 */
  179. </style>