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

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