home.wxml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!--pages/home/home.wxml-->
  2. <!-- 头部 -->
  3. <view style="width: 100%; height: 20rpx; background-color: #f5f5f5; position: absolute; top: 0; left: -1rpx; position: fixed; z-index: 100;" ></view>
  4. <view class="bigBox">
  5. <view class="head" style="position: fixed;">
  6. <view bind:tap="userTo">
  7. <!-- 头像 -->
  8. <view class="head-portrait-bg">
  9. <van-image width="100rpx" height="100rpx" fit="cover" src="{{avatarUrl}}" radius="20rpx"></van-image>
  10. </view>
  11. <!-- 昵称 -->
  12. <view class="username">{{nickName}}</view>
  13. </view>
  14. <!-- 消息提示 -->
  15. <view bind:tap="messageTo">
  16. <van-icon name="bell" custom-style="margin" class="head_bell" size="50rpx" info="9" color="var(--themeColor)"/>
  17. </view>
  18. </view>
  19. <!-- 搜索框 -->
  20. <view class="search_box" style="position: fixed; top: 129rpx">
  21. <input type="search" name="" placeholder="搜索..." class="search_text" bind:tap="searchTo"/>
  22. <button class="search_button" plain="true">
  23. <van-icon class="search_icon" name="search" size="50rpx"/>
  24. </button>
  25. </view>
  26. </view>
  27. <!-- 分类展示 -->
  28. <view class="categories">
  29. <!-- categories -->
  30. <view style="position: relative;">
  31. <view class="text">分类</view>
  32. <view class="color_block categories_block "></view>
  33. </view>
  34. <!-- 点击前往分类页面 -->
  35. <view class="text_small" bind:tap="classifyTo">更多分类</view>
  36. </view>
  37. <!-- 分类推荐 -->
  38. <scroll-view scroll-x style='display: flex;white-space:nowrap; margin-top: 80rpx;'>
  39. <view class="categories_card" wx:for="{{classifyList}}" wx:for-item="item" wx:key="index">
  40. <view bind:tap="detailClassifyTo" data-num='{{item.Id}}' data-title='{{item.Name}}'>
  41. <van-image width="75" height="75" radius="20rpx" src="{{item.Pic}}" />
  42. <view class="name_show">{{item.Name}}</view>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. <!-- 商品展示 -->
  47. <view style="position: relative;">
  48. <view class="display_text text">推荐商品</view>
  49. <view class="color_block recommend_block"></view>
  50. </view>
  51. <!-- 商品卡片 -->
  52. <view class="commodity">
  53. <view class="commodity_show" wx:for="{{allGoods}}" wx:key="index">
  54. <view bind:tap="detailTo" data-id='{{item.Id}}' data-price='{{item.Price}}' data-Title='{{item.Title}}'
  55. data-pic='{{item.Pic}}' data-uid='{{item.ownerId}}'>
  56. <image src="{{item.Pic}}" alt="" class="commodity_image"/>
  57. <text class="commodity_name">{{item.Title}}</text>
  58. <text class="price">¥{{item.Price}}</text>
  59. <!-- <avatar
  60. ownerId = '{{item.ownerId}}'
  61. ></avatar> -->
  62. <!-- <view class="seller" bind:tap="showInfo" wx:for="{{ownerMsg}}" wx:key="index">
  63. <view class="avater">
  64. <image src="{{item.avatar}}" mode="" class="avatar_pic"/>
  65. </view>
  66. <view class="seller_name">{{item.name}}</view>
  67. </view> -->
  68. </view>
  69. </view>
  70. </view>
  71. <van-toast id="van-toast" />