bottom1.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="box">
  3. <image class="image"
  4. src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404111712812810046B1fbafed9.png"
  5. lazy-load="true" mode="aspectFill" />
  6. <view class="function">
  7. <view class="cn-title">预约免费设计</view>
  8. <view class="en-title">Appointment Free Design</view>
  9. <view class="form">
  10. <view class="text">
  11. <view class="bg" />
  12. <view class="iconfont icon-renyuan-hui" />
  13. <input class="input" type="text" v-model="content.name" placeholder="请输入您的姓名">
  14. </view>
  15. <view class="text">
  16. <view class="bg" />
  17. <view class="iconfont icon-dianhua-hui" />
  18. <input class="input" type="number" v-model="content.phoneNumber" placeholder="请输入您的电话号码">
  19. </view>
  20. <picker mode='region' @change="getRegion">
  21. <view class="text">
  22. <view class="bg" />
  23. <view class="iconfont icon-dizhi-hui1" />
  24. <view style="color: #fff;" v-if="content.province">
  25. {{ this.getCity(content, false) }}
  26. </view>
  27. <view v-else style="opacity: .3;color: #fff;font-size: 14px;">
  28. 请选择城市
  29. </view>
  30. </view>
  31. </picker>
  32. <view class="text textarea-box">
  33. <view class="bg" />
  34. <view class="iconfont icon-dizhi-hui1" />
  35. <textarea class="textarea" v-model="content.address" placeholder="请输入您的具体地址(街道、楼号、门牌号等)" />
  36. </view>
  37. <view class="but" hover-class="navigator-hover" @click="submit">
  38. 立即免费预约 >
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. name: "bottom1",
  47. props: {
  48. ownertable: {
  49. type: String
  50. },
  51. ownerid: {
  52. type: [String, Number]
  53. },
  54. type: {
  55. type: String
  56. },
  57. typemx: {
  58. type: String
  59. },
  60. extrajson: {
  61. type: Object
  62. }
  63. },
  64. data() {
  65. return {
  66. content: {
  67. name: "",
  68. phoneNumber: "",
  69. address: "",
  70. "province": "",
  71. "city": "",
  72. "county": "",
  73. }
  74. }
  75. },
  76. methods: {
  77. submit() {
  78. let content = this.content;
  79. content.ownertable = this.ownertable;
  80. content.ownerid = this.ownerid;
  81. content.type = this.type;
  82. content.typemx = this.typemx;
  83. content.extrajson = this.extrajson;
  84. this.$Http.basic({
  85. "id": 20240513144602,
  86. content
  87. }).then(res => {
  88. console.log("提交预约单", res)
  89. if (this.cutoff(res.msg)) return;
  90. uni.showModal({
  91. title: '提交成功',
  92. content: '感谢您的支持,工作人员会第一时间跟您联系!',
  93. showCancel: false,
  94. confirmColor: '#C30D23',
  95. })
  96. this.content = {
  97. name: "",
  98. phoneNumber: "",
  99. address: "",
  100. "province": "",
  101. "city": "",
  102. "county": "",
  103. };
  104. })
  105. },
  106. getRegion(e) {
  107. this.content.province = e.detail.value[0];
  108. this.content.city = e.detail.value[1];
  109. this.content.county = e.detail.value[2];
  110. }
  111. },
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. .box {
  116. position: relative;
  117. width: 100vw;
  118. height: 436px;
  119. .image {
  120. width: 100%;
  121. height: 100%;
  122. display: block;
  123. vertical-align: bottom;
  124. }
  125. .function {
  126. position: absolute;
  127. top: 0;
  128. left: 0;
  129. width: 100%;
  130. height: 100%;
  131. z-index: 1;
  132. .cn-title {
  133. width: 100%;
  134. text-align: center;
  135. line-height: 22px;
  136. font-family: PingFang SC, PingFang SC;
  137. font-weight: 500;
  138. font-size: 16px;
  139. color: #FFFFFF;
  140. margin-top: 30px;
  141. }
  142. .en-title {
  143. width: 100%;
  144. text-align: center;
  145. font-family: PingFang SC, PingFang SC;
  146. font-size: 10px;
  147. color: #FFFFFF;
  148. }
  149. .form {
  150. width: 260px;
  151. margin: 0 auto;
  152. margin-top: 20px;
  153. .text {
  154. position: relative;
  155. display: flex;
  156. align-items: center;
  157. width: 260px;
  158. height: 45px;
  159. border: 1px solid rgba(255, 255, 255, 0.4);
  160. border-radius: 2px;
  161. overflow: hidden;
  162. padding: 0 10px;
  163. box-sizing: border-box;
  164. margin-bottom: 10px;
  165. .input {
  166. color: #fff;
  167. flex: 1;
  168. }
  169. .textarea {
  170. color: #fff;
  171. flex: 1;
  172. height: 62px;
  173. }
  174. .iconfont {
  175. color: #fff;
  176. font-size: 20px;
  177. margin-right: 10px;
  178. }
  179. }
  180. .textarea-box {
  181. padding-top: 13px;
  182. height: 90px;
  183. align-items: flex-start;
  184. }
  185. .text::after {
  186. content: "";
  187. position: absolute;
  188. top: 0;
  189. left: 0;
  190. width: 100%;
  191. height: 100%;
  192. background: #fff;
  193. opacity: .2;
  194. }
  195. .but {
  196. display: flex;
  197. align-items: center;
  198. justify-content: center;
  199. width: 260px;
  200. height: 45px;
  201. background: #C30D23;
  202. border-radius: 2px;
  203. font-family: PingFang SC, PingFang SC;
  204. font-weight: 500;
  205. font-size: 14px;
  206. color: #FFFFFF;
  207. }
  208. }
  209. }
  210. }
  211. </style>