index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <view class="content">
  3. <foot-tabs></foot-tabs>
  4. <div class="self-inf">
  5. <div class="img-name-box">
  6. <image src="/static/logo.png" alt="" class="heade-img" mode="aspectFill"></image>
  7. <p src="" alt="" class="nickname">微信昵称2233</p>
  8. </div>
  9. <image class="bg-img" :src="swiperBackground" mode="aspectFill"></image>
  10. <image src="../../static/Intersect.svg" class="groove-img"></image>
  11. </div>
  12. <div class="options">
  13. <div v-for="(item, idx) in list" :key="idx" class="options-item">
  14. <div class="img-box">
  15. <img :src="item.icoin" alt="" class="options-item-img" /><span></span>
  16. </div>
  17. <div
  18. class="options-item-name"
  19. :class="{ fontGrey: idx == list.length - 1 }"
  20. >
  21. {{ item.name }}
  22. </div>
  23. </div>
  24. </div>
  25. </view>
  26. </template>
  27. <script>
  28. import md5 from '@/common/md5.js';
  29. export default {
  30. data() {
  31. return {
  32. message: "我的",
  33. list: [
  34. { icoin: "/static/selfCenter/suggest.png", name: "我的建议" },
  35. { icoin: "/static/selfCenter/sign.png", name: "我的报名" },
  36. { icoin: "/static/selfCenter/collection.png", name: "我的收藏" },
  37. { icoin: "/static/selfCenter/back.png", name: "退出登录" },
  38. ],
  39. swiperBackground:'',
  40. };
  41. },
  42. onLoad() {
  43. this.getSwiperList();
  44. },
  45. methods: {
  46. getSwiperList(){
  47. let md5Sign = md5("method="+'common'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
  48. let url = getApp().globalData.shareUrl+'api/api.php'+'?method=common&source=main_pics&action=list&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
  49. uni.request({
  50. url:url,
  51. method: 'POST',
  52. header: {
  53. 'content-type': 'application/x-www-form-urlencoded'
  54. },
  55. data: {
  56. order_by:"weight desc",
  57. s_status:1,
  58. },
  59. success: (res) => {
  60. if(res.data.code === 200){
  61. this.swiperBackground = getApp().globalData.shareUrl + res.data.data.list[0].pic_path
  62. }
  63. },
  64. fail: () => {
  65. console.log("连接失败");
  66. }
  67. });
  68. },
  69. },
  70. };
  71. </script>
  72. <style lang="scss" scoped>
  73. .content {
  74. display: flex;
  75. flex-direction: column;
  76. .self-inf {
  77. position: relative;
  78. height: 440rpx;
  79. width: 100%;
  80. display: flex;
  81. margin-bottom: 80rpx;
  82. border-radius: 0rpx 0rpx 100% 100%;
  83. .img-name-box {
  84. height: 150rpx;
  85. margin-top: 70rpx;
  86. display: flex;
  87. align-items: center;
  88. .heade-img {
  89. z-index: 1;
  90. width: 100rpx;
  91. height: 100rpx;
  92. border-radius: 50%;
  93. margin-left: 80rpx;
  94. }
  95. }
  96. .bg-img {
  97. z-index: -1;
  98. position: absolute;
  99. width: 100%;
  100. height: 100%;
  101. // border-radius: 0rpx 0rpx 70rpx 70rpx;
  102. }
  103. .groove-img {
  104. width: 100%;
  105. height: 100rpx;
  106. bottom: -22rpx;
  107. position: absolute;
  108. }
  109. .nickname {
  110. font-weight: 600;
  111. font-size: 28rpx;
  112. margin-left: 30rpx;
  113. margin-top: 20rpx;
  114. color: #ffffff;
  115. letter-spacing: 1rpx;
  116. }
  117. }
  118. .options {
  119. padding: 70rpx;
  120. z-index: 99;
  121. position: relative;
  122. top: -270rpx;
  123. .options-item {
  124. background-color: #fff;
  125. display: flex;
  126. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  127. border-radius: 32rpx;
  128. margin-top: 20px;
  129. height: 150rpx;
  130. align-items: center;
  131. .img-box {
  132. margin-left: 40rpx;
  133. .options-item-img {
  134. width: 56rpx;
  135. height: 56rpx;
  136. }
  137. }
  138. .options-item-name {
  139. margin-left: 40rpx;
  140. font-weight: 600;
  141. font-size: 30rpx;
  142. margin-bottom: 10rpx;
  143. }
  144. }
  145. }
  146. }
  147. .fontGrey {
  148. color: $uni-text-color-grey;
  149. }
  150. </style>