home-view.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view>
  3. <view class="bg-img flex align-center" style="background-image: url('/static/ldt/aolinpike.png');height: 395upx;"></view>
  4. <view class="car-head">
  5. <view class="flex">
  6. <view class="avatar">
  7. <u-avatar src="/static/avatar.png" size="110"></u-avatar>
  8. </view>
  9. <view class="name">赖德福|德芙值得信赖</view>
  10. </view>
  11. <view class="flex justify-center text-center align-center">
  12. <view style="width: 40%;">
  13. <view class="text-bold" style="color: #ff9447;font-size: 32upx;">2000</view>
  14. <view class="text-sm text-black text-bold">我的积分</view>
  15. </view>
  16. <view style="width: 40%;">
  17. <view class="text-bold" style="color: #ff0101;font-size: 32upx;">+2000</view>
  18. <view class="text-sm text-black text-bold">昨日收益</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="padding-left" style="height: 60upx;">
  23. <text class="cuIcon-locationfill padding-right-xs" style="color: #fbc85e;"></text>
  24. <text class="text-bold">保利中心</text>
  25. <text class="cuIcon-triangledownfill" style="font-size: 30upx;"></text>
  26. </view>
  27. <view class="flex justify-center align-center padding-bottom-sm">
  28. <view class="search">
  29. <text class="cuIcon-search padding-right-xs"></text>
  30. {{searValue}}
  31. </view>
  32. </view>
  33. <view class="flex justify-around text-center padding-tb">
  34. <block v-for="(item,index) in icons" :key="index">
  35. <view @click="navByIcon(item.url)">
  36. <image :src="item.image" style="width: 80upx;height: 80upx;"></image>
  37. <view class="margin-top-xs text-sm text-bold">{{item.name}}</view>
  38. </view>
  39. </block>
  40. </view>
  41. <view class="bg-white">
  42. <view class="flex justify-between align-center padding-sm">
  43. <view class="text-bold text-black">附近优惠</view>
  44. <view @click="clear" class="text-bold text-black">
  45. <text class="text-sm">更多</text>
  46. <text class="cuIcon-right"></text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="flex bg-white padding-bottom-sm">
  51. <image src="/static/ldt/starbucks.png" style="width: 234upx;height: 156upx;margin: 0 20upx 20upx 20upx;"></image>
  52. <view style="width: 60%;">
  53. <view class="text-bold text-black text-lg">星巴克</view>
  54. <view class="flex justify-between text-gray text-sm margin-tb-xs">
  55. <view>据此564米</view>
  56. <view>B1层</view>
  57. </view>
  58. <view class="text-sm text-cut-2 text-gray" style="height: 60upx;">星巴克咖啡公司成立于1971年,致力于商业道德采购并烘焙世界上高品质的阿拉比卡咖啡,在全球82个市场,拥有超过32,000家门店的星巴克是世界上首屈一指的专业咖啡烘焙商和零售商。</view>
  59. </view>
  60. </view>
  61. <view class="flex bg-white padding-bottom-sm">
  62. <image src="/static/ldt/kfc.png" style="width: 234upx;height: 156upx;margin: 0 20upx 20upx 20upx;"></image>
  63. <view style="width: 60%;">
  64. <view class="text-bold text-black text-lg">肯德基</view>
  65. <view class="flex justify-between text-gray text-sm margin-tb-xs">
  66. <view>据此564米</view>
  67. <view>B1层</view>
  68. </view>
  69. <view class="text-sm text-cut-2 text-gray" style="height: 60upx;">肯德基与百事可乐结成了战略联盟,固定销售百事公司提供的碳酸饮料。2017年6月,《2017年BrandZ最具价值全球品牌100强》公布,肯德基排名第81位。</view>
  70. </view>
  71. </view>
  72. <view class="flex justify-center padding-xs" style="color: #bebebe;">
  73. 一一我也是有底线的一一
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. data() {
  80. return {
  81. searValue: '星巴克',
  82. icons: [
  83. {image: '/static/ldt/earnPoints.png', name: '赚积分', url: '/pages/activityList/index'},
  84. {image: '/static/ldt/costPoints.png', name: '花积分', url: ''},
  85. {image: '/static/ldt/exchangePoints.png', name: '换积分', url: ''},
  86. ],
  87. }
  88. },
  89. methods: {
  90. navByIcon(url) {
  91. uni.navigateTo({
  92. url: url
  93. })
  94. },
  95. clear(){
  96. uni.clearStorage()
  97. }
  98. }
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. .car-head {
  103. background-color: #ffffff;
  104. margin: -60upx 30upx 30upx 30upx;
  105. height: 180upx;
  106. border-radius: 100upx;
  107. box-shadow: 10upx 20upx 60upx #d8d8d8;
  108. .avatar {
  109. margin-top: -40upx;
  110. padding-left: 40upx;
  111. padding-right: 20upx;
  112. }
  113. .name {
  114. padding-top: 10upx;
  115. font-size: 26upx;
  116. font-family: PingFang SC;
  117. font-weight: 600;
  118. color: #222222;
  119. }
  120. }
  121. .search {
  122. width: 90%;
  123. border-radius: 50upx;
  124. line-height: 60upx;
  125. background-color: #FFFFFF;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. color: #9D9D9D;
  130. font-size: 20upx;
  131. box-shadow: 10upx 20upx 60upx #d8d8d8;
  132. }
  133. </style>