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

360 lines
7.8 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. </view>
  35. <view class="building-class">
  36. <view class="line grid">
  37. <uv-grid :col="4" :border="false">
  38. <uv-grid-item @click="contactUs">
  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 @click="$utils.redirectTo('/index/cart')">
  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. @click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword?index='+2)">
  52. <image class="image" src="../../static/image/home/6.png" mode=""></image>
  53. <text class="grid-text">XX建材</text>
  54. </uv-grid-item>
  55. </uv-grid>
  56. </view>
  57. </view>
  58. <view class="hot-building">
  59. <text>热卖建材</text>
  60. </view>
  61. <view class="hot-building"
  62. @click="toUrl"
  63. style="position: fixed;right: 30rpx;
  64. top: 40vh;z-index: 99;">
  65. <view class="new-message">
  66. 你有一条新的快捷下单信息
  67. </view>
  68. <view class="quick-order">
  69. <view class="number-order">
  70. 1
  71. </view>
  72. <image src="../../static/image/home/7.png" mode=""></image>
  73. </view>
  74. </view>
  75. <view class="shop-list"
  76. v-for="(item, index) in 20"
  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. }
  141. }
  142. </script>
  143. <style scoped lang="scss">
  144. .red-top{
  145. position: relative;
  146. height: 420rpx;
  147. background: $uni-color;
  148. border-bottom-left-radius: 100rpx;
  149. border-bottom-right-radius: 100rpx;
  150. z-index: -1;
  151. .building-title{
  152. position: absolute;
  153. height: 100rpx;
  154. width: 100%;
  155. margin-top: 100rpx;
  156. .title-right{
  157. color: $uni-bg-color;
  158. height: 100rpx;
  159. line-height: 100rpx;
  160. font-size: 45rpx;
  161. font-weight: 900;
  162. margin-left: 30rpx;
  163. display: inline-block;
  164. }
  165. .title-left{
  166. display: inline-block;
  167. margin-left: 30rpx;
  168. font-size: 22rpx;
  169. color: $uni-bg-color;
  170. }
  171. }
  172. .building-search{
  173. position: absolute;
  174. height: 100rpx;
  175. width: 100%;
  176. margin-top: 200rpx;
  177. // background-color: black;
  178. .address{
  179. height: 100rpx;
  180. width: 150rpx;
  181. position: relative;
  182. image{
  183. position: absolute;
  184. height: 20rpx;
  185. width: 15rpx;
  186. line-height: 20rpx;
  187. left: 40rpx;
  188. top: 42rpx;
  189. }
  190. .eare{
  191. width: 100rpx;
  192. height: 100rpx;
  193. line-height: 100rpx;
  194. margin-left:60rpx;
  195. color: $uni-bg-color;
  196. }
  197. .down-arrow:after {
  198. content: "";
  199. display: inline-block;
  200. width: 0;
  201. height: 0;
  202. border-left: 10rpx solid transparent;
  203. border-right: 10rpx solid transparent;
  204. border-top:15rpx solid $uni-bg-color;
  205. margin-top: 5rpx;
  206. position: absolute;
  207. top: 42rpx;
  208. left: 130rpx;
  209. }
  210. }
  211. .search{
  212. display: inline-block;
  213. position: absolute;
  214. top: 16rpx;
  215. left: 26%;
  216. width: 70%;
  217. }
  218. }
  219. }
  220. .image-home{
  221. z-index: 1;
  222. height: 350rpx;
  223. margin: 0 20rpx;
  224. margin-top: -90rpx;
  225. border-radius: 10rpx;
  226. overflow: hidden;
  227. }
  228. .building-class{
  229. height: 220rpx;
  230. display: flex;
  231. justify-content: space-around;
  232. align-items: center; /* 垂直居中 */
  233. background-color: $uni-bg-color;
  234. image{
  235. margin-left: 20rpx;
  236. margin-right: 20rpx;
  237. margin-bottom: 10rpx;
  238. width: 100rpx;
  239. height: 100rpx;
  240. display: inline-block;
  241. }
  242. }
  243. .text-building{
  244. display: flex;
  245. justify-content: space-around;
  246. align-items: center; /* 垂直居中 */
  247. background-color: $uni-bg-color;
  248. text-align: center;
  249. font-weight: 500;
  250. margin-bottom: -30rpx;
  251. padding-bottom: 40rpx;
  252. // overflow: hidden;
  253. }
  254. .hot-building{
  255. margin-top: 25rpx;
  256. height: 0rpx;
  257. background-color: $uni-bg-color;
  258. display: flex;
  259. align-items: center;
  260. padding-left: 40rpx;
  261. font-size: 35rpx;
  262. font-weight: 400;
  263. }
  264. .new-message{
  265. background-color: #DC2828;
  266. border-radius: 20rpx;
  267. font-size: 25rpx;
  268. color: $uni-bg-color;
  269. padding: 0 10rpx;
  270. margin-top: 500rpx;
  271. }
  272. .quick-order{
  273. position: relative;
  274. width: 230rpx;
  275. height: 160rpx;
  276. margin-right: -50rpx;
  277. margin-top: 500rpx;
  278. image{
  279. width: 100%;
  280. height: 100%;
  281. }
  282. .number-order{
  283. background-color: #DC2828;
  284. position: absolute;
  285. font-size: 30rpx;
  286. height: 40rpx;
  287. width: 40rpx;
  288. text-align: center;
  289. border-radius: 20rpx;
  290. color: #ffffff;
  291. top: 10rpx;
  292. left: 25rpx;
  293. }
  294. }
  295. .shop-list{
  296. width: 95%;
  297. height: 222rpx;
  298. display: flex;
  299. margin: 30rpx auto;
  300. background-color: #ffffff;
  301. border-radius: 20rpx;
  302. // /deep/
  303. .picture-shop{
  304. width: 240rpx;
  305. height: 100%;
  306. display: flex;
  307. align-items: center;
  308. justify-content: center;
  309. image{
  310. width: 200rpx;
  311. height: 150rpx;
  312. }
  313. }
  314. .price-shop{
  315. width: 250rpx;
  316. height: 100%;
  317. .top-shop{
  318. height: 100rpx;
  319. width: 100%;
  320. font-size: 33rpx;
  321. margin-top: 30rpx;
  322. text-align: center;
  323. .tag-shop{
  324. display: flex;
  325. justify-content: space-around;
  326. }
  327. }
  328. .bottom-price{
  329. display: inline-block;
  330. color: #DC2828;
  331. height: 80rpx;
  332. width: 250rpx;
  333. line-height: 100rpx;
  334. }
  335. }
  336. .buy-shop{
  337. height: 100%;
  338. width: 250rpx;
  339. display: flex;
  340. justify-content: center;
  341. align-items: center;
  342. }
  343. }
  344. </style>