建材商城系统20241014
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

368 lines
7.9 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="page">
  3. <view class="red-top">
  4. <view class="building-title">
  5. <view class="title-right">
  6. 建材
  7. </view>
  8. <view class="title-left">
  9. 寻找你想要的建材材料
  10. </view>
  11. </view>
  12. <view class="building-search">
  13. <view class="address">
  14. <image src="../../static/image/home/1.png" mode=""></image>
  15. <view class="eare">
  16. <text>深圳</text>
  17. </view>
  18. <view class="down-arrow"></view>
  19. </view>
  20. <view class="search">
  21. <!-- DC2828 -->
  22. <uv-search bgColor="#ffffff" placeholder="搜索材料" inputAlign="left" height="70" showAction="false"></uv-search>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="image-home">
  27. <uv-swiper
  28. class="uv-swaip"
  29. height="350rpx"
  30. :list="list"
  31. circular
  32. bgColor="#ffffff">
  33. </uv-swiper>
  34. </view>
  35. <view class="building-class">
  36. <view style="width: 710rpx;">
  37. <uv-grid :col="4" :border="false">
  38. <uv-grid-item>
  39. <image class="image" src="../../static/image/home/3.png" mode=""></image>
  40. <text class="grid-text">XX建材</text>
  41. </uv-grid-item>
  42. <uv-grid-item>
  43. <image class="image" src="../../static/image/home/4.png" mode=""></image>
  44. <text class="grid-text">XX建材</text>
  45. </uv-grid-item>
  46. <uv-grid-item >
  47. <image class="image" src="../../static/image/home/5.png" mode=""></image>
  48. <text class="grid-text">XX建材</text>
  49. </uv-grid-item>
  50. <uv-grid-item>
  51. <image class="image" src="../../static/image/home/6.png" mode=""></image>
  52. <text class="grid-text">XX建材</text>
  53. </uv-grid-item>
  54. </uv-grid>
  55. </view>
  56. </view>
  57. <view class="hot-building">
  58. <text>热卖建材</text>
  59. </view>
  60. <view class="hot-building"
  61. @click="toUrl"
  62. style="position: fixed;right: 30rpx;
  63. top: 40vh;z-index: 99;">
  64. <view class="new-message">
  65. 你有一条新的快捷下单信息
  66. </view>
  67. <view class="quick-order">
  68. <view class="number-order">
  69. 1
  70. </view>
  71. <image src="../../static/image/home/7.png" mode=""></image>
  72. </view>
  73. </view>
  74. <view class="shop-list"
  75. v-for="(item, index) in 20"
  76. @click="toGoodInfo(item,index)"
  77. :key="index">
  78. <view class="picture-shop">
  79. <image src="../../static/image/home/8.png" mode=""></image>
  80. </view>
  81. <view class="price-shop">
  82. <view class="top-shop">
  83. <text>泰山工装石膏板</text>
  84. <view class="tag-shop">
  85. <uv-tags text="建材材料" type="warning" plain size="mini"></uv-tags>
  86. <uv-tags text="快速下单" type="warning" plain size="mini"></uv-tags>
  87. </view>
  88. </view>
  89. <view class="bottom-price">
  90. <text style="font-size: 40rpx; ">38</text>.00/
  91. </view>
  92. </view>
  93. <view class="buy-shop">
  94. <uv-button :custom-style="customStyle" type="primary" shape="circle" text="立即购买" ></uv-button>
  95. </view>
  96. </view>
  97. <PrivacyAgreementPoup/>
  98. <tabber select="0"/>
  99. </view>
  100. </template>
  101. <script>
  102. import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
  103. import tabber from '@/components/base/tabbar.vue'
  104. export default {
  105. components : {
  106. tabber,
  107. PrivacyAgreementPoup,
  108. },
  109. data() {
  110. return {
  111. keyword:'',
  112. list: [
  113. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  114. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  115. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  116. ]
  117. }
  118. },
  119. computed : {
  120. customStyle(){
  121. return{
  122. height: '60rpx',
  123. background: '#EB553B',
  124. color: '#fff',
  125. borderRadius: '40rpx' ,//圆角
  126. // nvue中必须是下方的写法
  127. 'border-top-right-radius': '40rpx',
  128. 'border-bottom-left-radius': '40rpx',
  129. 'border-bottom-right-radius': '40rpx'
  130. }
  131. }
  132. },
  133. methods: {
  134. toUrl(){
  135. uni.navigateTo({
  136. url: '/pages_order/order/fastCreateOrder'
  137. })
  138. // this.$utils.navigateTo('/pages_order/mine/address')
  139. },
  140. toGoodInfo(item,index){
  141. // uni.navigateTo({
  142. // url: `/pages_order/order/product/productDetail?id=`+item.id
  143. // })
  144. uni.navigateTo({
  145. url: '/pages_order/product/productDetail'
  146. })
  147. },
  148. }
  149. }
  150. </script>
  151. <style scoped lang="scss">
  152. .red-top{
  153. position: relative;
  154. height: 420rpx;
  155. background: $uni-color;
  156. border-bottom-left-radius: 100rpx;
  157. border-bottom-right-radius: 100rpx;
  158. z-index: -1;
  159. .building-title{
  160. position: absolute;
  161. height: 100rpx;
  162. width: 100%;
  163. margin-top: 100rpx;
  164. .title-right{
  165. color: $uni-bg-color;
  166. height: 100rpx;
  167. line-height: 100rpx;
  168. font-size: 45rpx;
  169. font-weight: 900;
  170. margin-left: 30rpx;
  171. display: inline-block;
  172. }
  173. .title-left{
  174. display: inline-block;
  175. margin-left: 30rpx;
  176. font-size: 22rpx;
  177. color: $uni-bg-color;
  178. }
  179. }
  180. .building-search{
  181. position: absolute;
  182. height: 100rpx;
  183. width: 100%;
  184. margin-top: 200rpx;
  185. // background-color: black;
  186. .address{
  187. height: 100rpx;
  188. width: 150rpx;
  189. position: relative;
  190. image{
  191. position: absolute;
  192. height: 20rpx;
  193. width: 15rpx;
  194. line-height: 20rpx;
  195. left: 40rpx;
  196. top: 42rpx;
  197. }
  198. .eare{
  199. width: 100rpx;
  200. height: 100rpx;
  201. line-height: 100rpx;
  202. margin-left:60rpx;
  203. color: $uni-bg-color;
  204. }
  205. .down-arrow:after {
  206. content: "";
  207. display: inline-block;
  208. width: 0;
  209. height: 0;
  210. border-left: 10rpx solid transparent;
  211. border-right: 10rpx solid transparent;
  212. border-top:15rpx solid $uni-bg-color;
  213. margin-top: 5rpx;
  214. position: absolute;
  215. top: 42rpx;
  216. left: 130rpx;
  217. }
  218. }
  219. .search{
  220. display: inline-block;
  221. position: absolute;
  222. top: 16rpx;
  223. left: 26%;
  224. width: 70%;
  225. }
  226. }
  227. }
  228. .image-home{
  229. z-index: 1;
  230. height: 350rpx;
  231. margin: 0 20rpx;
  232. margin-top: -90rpx;
  233. border-radius: 10rpx;
  234. overflow: hidden;
  235. }
  236. .building-class{
  237. height: 220rpx;
  238. display: flex;
  239. justify-content: space-around;
  240. align-items: center; /* 垂直居中 */
  241. background-color: $uni-bg-color;
  242. image{
  243. margin-left: 20rpx;
  244. margin-right: 20rpx;
  245. margin-bottom: 10rpx;
  246. width: 100rpx;
  247. height: 100rpx;
  248. display: inline-block;
  249. }
  250. }
  251. .text-building{
  252. display: flex;
  253. justify-content: space-around;
  254. align-items: center; /* 垂直居中 */
  255. background-color: $uni-bg-color;
  256. text-align: center;
  257. font-weight: 500;
  258. margin-bottom: -30rpx;
  259. padding-bottom: 40rpx;
  260. // overflow: hidden;
  261. }
  262. .hot-building{
  263. margin-top: 25rpx;
  264. height: 0rpx;
  265. background-color: $uni-bg-color;
  266. display: flex;
  267. align-items: center;
  268. padding-left: 40rpx;
  269. font-size: 35rpx;
  270. font-weight: 400;
  271. }
  272. .new-message{
  273. background-color: #DC2828;
  274. border-radius: 20rpx;
  275. font-size: 25rpx;
  276. color: $uni-bg-color;
  277. padding: 0 10rpx;
  278. margin-top: 500rpx;
  279. }
  280. .quick-order{
  281. position: relative;
  282. width: 230rpx;
  283. height: 160rpx;
  284. margin-right: -50rpx;
  285. margin-top: 500rpx;
  286. image{
  287. width: 100%;
  288. height: 100%;
  289. }
  290. .number-order{
  291. background-color: #DC2828;
  292. position: absolute;
  293. font-size: 30rpx;
  294. height: 40rpx;
  295. width: 40rpx;
  296. text-align: center;
  297. border-radius: 20rpx;
  298. color: #ffffff;
  299. top: 10rpx;
  300. left: 25rpx;
  301. }
  302. }
  303. .shop-list{
  304. width: 95%;
  305. height: 222rpx;
  306. display: flex;
  307. margin: 30rpx auto;
  308. background-color: #ffffff;
  309. border-radius: 20rpx;
  310. // /deep/
  311. .picture-shop{
  312. width: 240rpx;
  313. height: 100%;
  314. display: flex;
  315. align-items: center;
  316. justify-content: center;
  317. image{
  318. width: 200rpx;
  319. height: 150rpx;
  320. }
  321. }
  322. .price-shop{
  323. width: 250rpx;
  324. height: 100%;
  325. .top-shop{
  326. height: 100rpx;
  327. width: 100%;
  328. font-size: 33rpx;
  329. margin-top: 30rpx;
  330. text-align: center;
  331. .tag-shop{
  332. display: flex;
  333. justify-content: space-around;
  334. }
  335. }
  336. .bottom-price{
  337. display: inline-block;
  338. color: #DC2828;
  339. height: 80rpx;
  340. width: 250rpx;
  341. line-height: 100rpx;
  342. }
  343. }
  344. .buy-shop{
  345. height: 100%;
  346. width: 250rpx;
  347. display: flex;
  348. justify-content: center;
  349. align-items: center;
  350. }
  351. }
  352. </style>