bottom2.vue 5.3 KB

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