my.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="page">
  3. <view class="top">
  4. <view class="wd">
  5. <view class="qw"><image src="../../static/ls.jpg" class="head"></image></view>
  6. <view class="xs">
  7. <view>登录 / 注册</view>
  8. <view class="mt10">张玲</view>
  9. </view>
  10. </view>
  11. <image src="../../static/bj.jpg" mode="aspectFill"></image>
  12. </view>
  13. <view class="main">
  14. <view class="flex menu">
  15. <view class="f">
  16. <view class="icon" style="background-color: #607D8B">&#xe636;</view>
  17. <view class="title">我的预约</view>
  18. </view>
  19. <view class="f">
  20. <view class="icon" style="background-color: #e23e33;">&#xe610;</view>
  21. <view class="title">我的投诉</view>
  22. </view>
  23. <view class="f">
  24. <view class="icon" style="background-color: #2cc937;">&#xe656;</view>
  25. <view class="title">我的评论</view>
  26. </view>
  27. <view class="f">
  28. <view class="icon" style="background-color: #2196F3;">&#xe623;</view>
  29. <view class="title">我的旅途</view>
  30. </view>
  31. </view>
  32. <view class="list">
  33. <view class="item hr">
  34. <text class="icon ic">&#xe626;</text>
  35. <text>个人资料</text>
  36. <text class="icon arrow">&#xe65a;</text>
  37. </view>
  38. <view class="item hr">
  39. <text class="icon ic">&#xe65f;</text>
  40. <text>关于我们</text>
  41. <text class="icon arrow">&#xe65a;</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. ip: this.$http.urls.ip,
  52. goods_list: []
  53. };
  54. },
  55. onLoad(e) {
  56. //this.init();
  57. },
  58. methods: {
  59. init() {
  60. this.$http.request({
  61. url: this.$http.urls.home,
  62. success: res => {
  63. this.goods_list = res.data.data.goods_list;
  64. }
  65. });
  66. //let user={id:35,nickName:'微信用户',openId:'oD2_E4sMkz3zF_0xjhX_C4vaI_xo',sex:0,phone:'13097850972',token:'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc2NTVmOGM0LWY3YTAtNGU0Mi04MDU3LTdkNTA4NGY5NjE2NyJ9.f6xqQVYkm6zlfhZFbCOyj1-iOZtpkHJbUyCB2MNtTW-jgz1_9zcKKOdnw9uX_WJ_2VNrgOn6R5hmQAIm79YIZw'}
  67. // uni.setStorageSync('user',user);
  68. },
  69. detail(item) {
  70. uni.navigateTo({ url: '/pages/goods/detail?id=' + item.id });
  71. }
  72. }
  73. };
  74. </script>
  75. <style lang="scss">
  76. .top {
  77. position: relative;
  78. height: 300px;
  79. color: white;
  80. .wd {
  81. position: absolute;
  82. top: 70px;
  83. left: 20px;
  84. z-index: 111111;
  85. .head {
  86. width: 75px;
  87. height: 75px;
  88. border-radius: 50%;
  89. }
  90. .xs {
  91. margin-left: 100px;
  92. width: 100%;
  93. font-weight: bold;
  94. margin-top: 10px;
  95. }
  96. }
  97. image {
  98. width: 100%;
  99. height: 300px;
  100. position: absolute;
  101. }
  102. }
  103. .main {
  104. padding: 15px 15px 50px 15px;
  105. width: 100%;
  106. margin-top: -50px;
  107. overflow: hidden;
  108. position: absolute;
  109. .menu {
  110. background-color: white;
  111. border-radius: 10px;
  112. padding: 15px;
  113. width: 100%;
  114. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  115. .icon {
  116. font-size: 30px;
  117. background-color: red;
  118. width: 38px;
  119. height: 38px;
  120. border-radius: 5px;
  121. margin: 0 auto;
  122. color: white;
  123. padding: 3px;
  124. }
  125. .title {
  126. padding-top: 4px;
  127. font-size: 13px;
  128. }
  129. }
  130. .list {
  131. margin-top: 10px;
  132. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  133. .item {
  134. padding: 15px;
  135. .ic {
  136. font-size: 20px;
  137. padding-right: 10px;
  138. }
  139. .arrow {
  140. margin-top: 6px;
  141. font-size: 20px;
  142. }
  143. }
  144. }
  145. }
  146. </style>