index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. <!-- 我的分享码 -->
  41. <customPromotionCode ref="customPromotionCode" />
  42. </view>
  43. </template>
  44. <script>
  45. import { navigateTo } from "@/utils/util.js"
  46. export default {
  47. data() {
  48. return {
  49. title: '这是我的',
  50. statusBarHeight: 0, // 状态栏安全距离
  51. tool: [ // 我的工具
  52. { title: "邀请统计",icon: this.$commonConfig.staticUrl + 'me/yijian2.png', url: '/pages/invitationStatistics/index' },
  53. { title: "余额提现",icon: this.$commonConfig.staticUrl + 'me/beifeng.png', url: '/pages/balance/index' },
  54. { title: "我的推广码",icon: this.$commonConfig.staticUrl + 'me/yijian1.png', url: '' },
  55. ]
  56. }
  57. },
  58. onLoad() {
  59. },
  60. onShow() {
  61. this.statusBarHeight = getApp().globalData.statusBarHeight
  62. },
  63. methods: {
  64. /**
  65. * @author ygh
  66. * @data 2023-12-20
  67. */
  68. navigateToFun(item){
  69. if(item.url) {
  70. navigateTo(item.url)
  71. }else {
  72. this.$refs.customPromotionCode.initData("我是谁!!!")
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .me-content {
  80. display: flex;
  81. flex-direction: column;
  82. align-items: center;
  83. justify-content: center;
  84. --header-h: 90rpx;
  85. .me-content-info {
  86. width: 100%;
  87. box-sizing: border-box;
  88. }
  89. }
  90. /** 头部主要内容 开始 */
  91. .me-content-header {
  92. width: 100%;
  93. height: var(--header-h);
  94. box-sizing: border-box;
  95. ::v-deep .u-search {
  96. padding: 0 30rpx !important;
  97. }
  98. ::v-deep .u-search__action {
  99. color: #fff !important;
  100. }
  101. }
  102. /** 头部主要内容 结束 **/
  103. /** userInfo内容 开始 */
  104. .me-content-userinfo {
  105. width: 100%;
  106. padding: 24rpx;
  107. box-sizing: border-box;
  108. .me-userinfo-info {
  109. width: 100%;
  110. height: 200rpx;
  111. box-sizing: border-box;
  112. background: linear-gradient(to bottom, rgba(238, 12, 12, 1) 0%, rgba(243, 157, 159, 1) 100%);
  113. border-radius: 20rpx;
  114. box-shadow: 0rpx 0 20rpx 2rpx rgba(205, 205, 205, 0.50);
  115. display: flex;
  116. flex-direction: column;
  117. align-items: flex-start;
  118. justify-content: center;
  119. color: #fff;
  120. font-size: 28rpx;
  121. font-family: SourceHanSansCN, SourceHanSansCN;
  122. padding: 0 50rpx;
  123. >view:nth-child(1) {
  124. display: flex;
  125. font-weight: 600;
  126. width: 100%;
  127. text:nth-child(1) {
  128. width: 168rpx;
  129. flex-shrink: 0;
  130. }
  131. text:nth-child(2) {
  132. width: calc( 100% - 168rpx );
  133. overflow: hidden;
  134. display: -webkit-box;
  135. -webkit-line-clamp: 2; /* 设置最大显示行数 */
  136. -webkit-box-orient: vertical;
  137. text-overflow: ellipsis;
  138. }
  139. }
  140. >view:nth-child(2) {
  141. width: 100%;
  142. display: flex;
  143. margin-top: 20rpx;
  144. text:nth-child(1) {
  145. width: 112rpx;
  146. flex-shrink: 0;
  147. }
  148. text:nth-child(2) {
  149. width: calc( 100% - 112rpx );
  150. }
  151. }
  152. }
  153. }
  154. /** userInfo内容 结束 **/
  155. /** tool内容 开始 */
  156. .me-content-tool {
  157. width: 100%;
  158. box-sizing: border-box;
  159. padding: 30rpx 30rpx 0;
  160. .me-tool-item {
  161. width: 100%;
  162. background: #FBFBFB;
  163. border-radius: 20rpx;
  164. box-sizing: border-box;
  165. display: flex;
  166. align-items: center;
  167. justify-content: space-between;
  168. color: rgba(54, 54, 54, 1);
  169. font-size: 28rpx;
  170. padding: 12rpx 10rpx;
  171. margin-bottom: 20rpx;
  172. .me-tool-item-icon {
  173. width: 54rpx;
  174. height: 56rpx;
  175. flex-shrink: 0;
  176. }
  177. >text {
  178. width: 100%;
  179. padding-left: 20rpx;
  180. box-sizing: border-box;
  181. }
  182. }
  183. }
  184. /** tool内容 结束 */
  185. </style>