建材商城系统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.

458 lines
12 KiB

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