bottom2.vue 5.9 KB

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