bottom2.vue 6.0 KB

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