shop.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="box">
  3. <view class="topbox">
  4. <view class="sstop">
  5. <image src="../../static/timg/icon_search@2x.png" mode="" class="sstopimg"></image>
  6. <input type="text" placeholder="请输入商品名称" class="sstopInput">
  7. </view>
  8. <scroll-view scroll-x="true" class="scroll-Y" >
  9. <view class="classificationBox">
  10. <view class="classification" v-for="(item,index) in 8" @click="topClick(index)">
  11. <view class="classificationName">分类名称一</view>
  12. <view class="classificationHx" v-if="topIndex==index"></view>
  13. </view>
  14. </view>
  15. </scroll-view>
  16. <view class="paixuBox">
  17. <view class="paixuLine">
  18. 默认排序
  19. </view>
  20. <view class="paixuLine">
  21. <view>销量</view>
  22. <view class="paixuLineTbBox">
  23. <view class="paixuLineTbtop">
  24. <image v-if="!salessorts" src="../../static/timg/icon_arrow_up_pre@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIcons"></image>
  25. <image v-else src="../../static/timg/icon_arrow_up_def@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIcons"></image>
  26. </view>
  27. <view class="paixuLineTbtop">
  28. <image v-if="!salessortx" src="../../static/timg/icon_arrow_pre@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIconx"></image>
  29. <image v-else src="../../static/timg/icon_arrow_def@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIconx"></image>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="paixuLine">
  34. <view>价格</view>
  35. <view class="paixuLineTbBox">
  36. <view class="paixuLineTbtop">
  37. <image v-if="!pricesorts" src="../../static/timg/icon_arrow_up_pre@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIcons"></image>
  38. <image v-else src="../../static/timg/icon_arrow_up_def@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIcons"></image>
  39. </view>
  40. <view class="paixuLineTbtop">
  41. <image v-if="!pricesortx" src="../../static/timg/icon_arrow_pre@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIconx"></image>
  42. <image v-else src="../../static/timg/icon_arrow_def@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIconx"></image>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <scroll-view scroll-Y="true" class="scroll-Y goodsSw" >
  48. <view class="goodsBox">
  49. <view class="hotGoodsLine" v-for="(item,index) in 5" @click="goDetail(item)">
  50. <view>
  51. <image src="../../static/timg/nocar.png" mode="" class="hotGoodsLineImg"></image>
  52. </view>
  53. <view class="hotGoodsLineRIght">
  54. <view class="goodsName">德国马牌 Continental 全新升级6代 TechContct德国马牌 Continental 全新升级6代 TechContct</view>
  55. <view class="Sold">已售 999</view>
  56. <view class="goodsPrice">
  57. <view class="goodsPrice1">店庆价</view>
  58. <view class="goodsPrice2">¥</view>
  59. <view class="goodsPrice3">999</view>
  60. <view class="goodsPrice3">¥893</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </scroll-view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. components: {
  72. },
  73. data() {
  74. return {
  75. userInfo:'',
  76. salessort:false,
  77. salessorts:false,
  78. salessortx:false,
  79. pricesort:false,
  80. pricesorts:false,
  81. pricesortx:false,
  82. topIndex:0,
  83. }
  84. },
  85. onLoad() {
  86. this.userInfo = uni.getStorageSync("userInfo");
  87. //this.getOrderTimes()
  88. },
  89. methods: {
  90. topClick(index){
  91. this.topIndex=index
  92. },
  93. goDetail(){
  94. uni.navigateTo({
  95. url:'goodsDetail'
  96. })
  97. }
  98. }
  99. }
  100. </script>
  101. <style scoped lang="less">
  102. .paixuLineTbtopIcon{
  103. width: 16rpx;
  104. height: 8rpx;
  105. display: block;
  106. padding-left: 10rpx;
  107. }
  108. .paixuLineTbtopIconx{
  109. padding-bottom:20rpx;
  110. }
  111. .paixuLineTbtopIcons{
  112. padding-top: 6rpx;
  113. }
  114. .paixuLineTbBox{
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: space-between;
  118. }
  119. .box{
  120. background: #F4F5F7;
  121. min-height: 100vh;
  122. }
  123. .sstopInput{
  124. width: 626rpx;
  125. height: 72rpx;
  126. background: #F4F5F7;
  127. border-radius: 36rpx;
  128. line-height: 72rpx;
  129. font-size: 28rpx;
  130. padding-left: 76rpx;
  131. }
  132. .sstop{
  133. position: relative;
  134. padding-top: 24rpx;
  135. padding-left: 24rpx;
  136. background: #ffffff;
  137. }
  138. .sstopimg{
  139. width: 40rpx;
  140. height: 40rpx;
  141. position: absolute;
  142. left: 44rpx;
  143. top: 40rpx;
  144. }
  145. .scroll-Y{
  146. background: #ffffff;
  147. width: 750rpx;
  148. }
  149. .classificationBox{
  150. display: flex;
  151. padding-bottom: 12rpx;
  152. }
  153. .classificationName{
  154. white-space: nowrap;
  155. font-size: 28rpx;
  156. color: #3C3C3C;
  157. line-height: 40rpx;
  158. padding:24rpx 24rpx 8rpx 24rpx;
  159. }
  160. .classificationHx{
  161. width: 40rpx;
  162. height: 4rpx;
  163. background: #F03B3B;
  164. margin: 0 auto;
  165. }
  166. .paixuBox{
  167. width: 750rpx;
  168. height: 72rpx;
  169. background: #FFFFFF;
  170. margin-top: 20rpx;
  171. display: flex;
  172. justify-content: space-around;
  173. }
  174. .paixuLine{
  175. line-height: 37rpx;font-size: 26rpx;color: #666666;padding-top: 18rpx;
  176. display: flex;
  177. }
  178. .hotGoodsLine{
  179. margin-top: 20rpx;
  180. padding: 20rpx;
  181. background: #FFFFFF;
  182. border-radius: 16rpx;
  183. display: flex;
  184. }
  185. .hotGoodsLineImg{
  186. width: 208rpx;
  187. height: 194rpx;
  188. border-radius: 16rpx;
  189. border: 1px solid #EEEEEE;
  190. }
  191. .goodsName{
  192. font-size: 28rpx;
  193. font-family: PingFangSC-Regular, PingFang SC;
  194. font-weight: 400;
  195. color: #333333;
  196. line-height: 40rpx;
  197. text-overflow: -o-ellipsis-lastline;
  198. overflow: hidden;
  199. text-overflow: ellipsis;
  200. display: -webkit-box;
  201. -webkit-line-clamp: 2;
  202. line-clamp: 2;
  203. -webkit-box-orient: vertical;
  204. }
  205. .hotGoodsLineRIght{
  206. padding-left: 24rpx;
  207. }
  208. .goodsPrice{
  209. display: flex;
  210. padding-top: 10rpx;
  211. }
  212. .goodsPrice1{
  213. font-size: 24rpx;
  214. font-weight: 400;
  215. color: #F03B3B;
  216. }
  217. .goodsPrice2{
  218. font-size: 22rpx;
  219. font-weight: 400;
  220. color: #F03B3B;
  221. }
  222. .goodsPrice3{
  223. font-size: 32rpx;
  224. font-weight: 400;
  225. color: #F03B3B;
  226. }
  227. .goodsPrice3{
  228. font-size: 24rpx;
  229. font-weight: 400;
  230. color: #999999;
  231. }
  232. .Sold{
  233. font-weight: 400;
  234. color: #999999;
  235. font-size: 24rpx;
  236. padding-top: 8rpx;
  237. }
  238. </style>