bottom2.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <view class="box">
  3. <view class="title"> 免费帮您获取装修预算 </view>
  4. <view class="total"> 今日已有 <text class="num">258</text>位业主申请 </view>
  5. <view
  6. class="input-box"
  7. hover-class="navigator-hover"
  8. @click="areaFocus = true"
  9. >
  10. <input
  11. type="digit"
  12. @input="onInput"
  13. :focus="areaFocus"
  14. placeholder="您房子的面积是多少?"
  15. style="color: #fff"
  16. placeholder-class="placeholder"
  17. />
  18. <text class="unit"> m² </text>
  19. </view>
  20. <view
  21. class="input-box"
  22. hover-class="navigator-hover"
  23. @click="showBathroom = true"
  24. >
  25. <view class="value">
  26. {{ submitData.bathroom }}
  27. </view>
  28. <text class="iconfont icon-a-wodetiaozhuan" />
  29. </view>
  30. <u-action-sheet
  31. :actions="bathroomList"
  32. :show="showBathroom"
  33. cancelText="取消"
  34. @close="showBathroom = false"
  35. @select="onSelect($event, 'bathroom')"
  36. />
  37. <view
  38. class="input-box"
  39. hover-class="navigator-hover"
  40. @click="showWall = true"
  41. >
  42. <view class="value">
  43. {{ submitData.wall }}
  44. </view>
  45. <text class="iconfont icon-a-wodetiaozhuan" />
  46. </view>
  47. <u-action-sheet
  48. :actions="wallList"
  49. :show="showWall"
  50. cancelText="取消"
  51. @close="showWall = false"
  52. @select="onSelect($event, 'wall')"
  53. />
  54. <view class="radio-box">
  55. <u-radio-group v-model="submitData.type">
  56. <u-radio
  57. v-for="item in radioList"
  58. style="margin-right: 20px"
  59. :key="item.name"
  60. activeColor="#E3041F"
  61. labelColor="#FFFFFF"
  62. :customStyle="item.customStyle"
  63. :labelSize="tovw(14)"
  64. :label="item.name"
  65. :name="item.name"
  66. />
  67. </u-radio-group>
  68. </view>
  69. <view class="submit" hover-class="navigator-hover" @click="toEstimate">
  70. 立即估算报价 <text class="iconfont icon-a-wodetiaozhuan" />
  71. </view>
  72. <view class="evenMore">
  73. 更多阳台空间、全屋顶墙柜门等报价,请咨询当地专卖店
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. name: "bottom2",
  80. data() {
  81. return {
  82. areaFocus: false,
  83. submitData: {
  84. area: "100",
  85. wall: "1个背景墙",
  86. bathroom: "1厨1卫",
  87. type: "毛坯房装修",
  88. },
  89. radioList: [
  90. {
  91. name: "毛坯房装修",
  92. customStyle: { marginRight: this.tovw(26) },
  93. },
  94. {
  95. name: "旧房装修",
  96. customStyle: { marginRight: this.tovw(26) },
  97. },
  98. {
  99. name: "精装房焕新",
  100. },
  101. ],
  102. showWall: false,
  103. showBathroom: false,
  104. bathroomList: [
  105. {
  106. name: "0厨0卫",
  107. },
  108. {
  109. name: "1厨1卫",
  110. },
  111. {
  112. name: "1厨2卫",
  113. },
  114. {
  115. name: "1厨3卫",
  116. },
  117. {
  118. name: "1厨>3卫",
  119. },
  120. ],
  121. wallList: [
  122. {
  123. name: "0个背景墙",
  124. },
  125. {
  126. name: "1个背景墙",
  127. },
  128. {
  129. name: "2个背景墙",
  130. },
  131. {
  132. name: "3个背景墙",
  133. },
  134. {
  135. name: ">3个背景墙",
  136. },
  137. ],
  138. };
  139. },
  140. methods: {
  141. onSelect({ name }, key) {
  142. this.submitData[key] = name;
  143. },
  144. onInput(e) {
  145. this.submitData.area = e.detail.value;
  146. console.log("submitData", this.submitData);
  147. },
  148. toEstimate() {
  149. uni.navigateTo({
  150. url: "/store/budget/result?data=" + JSON.stringify(this.submitData),
  151. });
  152. },
  153. },
  154. };
  155. </script>
  156. <style lang="scss" scoped>
  157. .box {
  158. display: flex;
  159. flex-direction: column;
  160. align-items: center;
  161. width: 100vw;
  162. padding: 30px 0;
  163. background: radial-gradient(100% 0% at 50% 50%, #7e7e7e 0%, #787878 100%);
  164. /deep/.placeholder {
  165. color: #fff;
  166. opacity: 0.6;
  167. }
  168. .title {
  169. line-height: 22px;
  170. font-family: PingFang SC, PingFang SC;
  171. font-weight: 500;
  172. font-size: 16px;
  173. color: #ffffff;
  174. letter-spacing: 1px;
  175. }
  176. .total {
  177. line-height: 17px;
  178. font-family: PingFang SC, PingFang SC;
  179. font-size: 12px;
  180. color: #ffffff;
  181. margin-top: 5px;
  182. letter-spacing: 1.5px;
  183. .num {
  184. color: #fc9228;
  185. padding: 0 5px;
  186. letter-spacing: 0px;
  187. }
  188. }
  189. .input-box {
  190. display: flex;
  191. align-items: center;
  192. justify-content: space-between;
  193. width: 315px;
  194. height: 45px;
  195. background: rgba(255, 255, 255, 0.2);
  196. border-radius: 2px;
  197. border: 1px solid rgba(255, 255, 255, 0.2);
  198. box-sizing: border-box;
  199. padding: 0 10px;
  200. margin-top: 10px;
  201. .value {
  202. color: #ffffff;
  203. font-size: 14px;
  204. }
  205. .iconfont {
  206. color: #ffffff;
  207. transform: rotate(90deg);
  208. }
  209. .unit {
  210. color: #ffffff;
  211. }
  212. }
  213. .radio-box {
  214. height: 20px;
  215. line-height: 20px;
  216. margin-top: 20px;
  217. }
  218. .submit {
  219. display: flex;
  220. align-items: center;
  221. justify-content: center;
  222. width: 315px;
  223. height: 45px;
  224. background: #fc9228;
  225. border-radius: 2px;
  226. font-family: PingFang SC, PingFang SC;
  227. font-weight: 500;
  228. font-size: 14px;
  229. color: #ffffff;
  230. margin-top: 20px;
  231. .iconfont {
  232. font-size: 12px;
  233. margin-left: 4px;
  234. }
  235. }
  236. .evenMore {
  237. margin-top: 10px;
  238. line-height: 17px;
  239. font-family: PingFang SC, PingFang SC;
  240. font-size: 12px;
  241. color: rgba(255, 255, 255, 0.8);
  242. }
  243. }
  244. </style>