apply.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image src="../../static/imgs/icon_left_jt.png" @click="back"></image>
  5. <text>申请专项演示方案</text>
  6. </view>
  7. <view class="contact">
  8. <view class="title">请留下您的联系方式</view>
  9. <view class="item first">
  10. <view class="name"><span>*</span>公司名称</view>
  11. <view class="inp">
  12. <input type="text" placeholder="请输入公司名称" v-model="info.companyName">
  13. </view>
  14. </view>
  15. <view class="item">
  16. <view class="name"><span>*</span>联系电话</view>
  17. <view class="inp">
  18. <input type="tel" placeholder="请输入联系电话" v-model="info.linkPhone">
  19. </view>
  20. </view>
  21. <view class="item">
  22. <view class="name"><span>*</span>姓名</view>
  23. <view class="inp">
  24. <input type="text" placeholder="请输入您的姓名" v-model="info.realName">
  25. </view>
  26. </view>
  27. <view class="item last">
  28. <view class="name"><span>*</span>企业需求</view>
  29. <view class="inp">
  30. <textarea maxlength="-1" placeholder="请输入企业需求" v-model="info.requirement"></textarea>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="apply" @click="apply">立即申请</view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data(){
  40. return {
  41. info:{
  42. companyName:'',
  43. linkPhone:'',
  44. realName:'',
  45. requirement:''
  46. },
  47. canApply:true,
  48. }
  49. },
  50. methods:{
  51. back(){
  52. uni.reLaunch({
  53. url:'/pages/consult/index'
  54. })
  55. },
  56. apply(){
  57. if(!this.canApply) return;
  58. if(!this.info.companyName) return this.$showToast('请输入公司名称');
  59. if(!this.$reg.mobile(this.info.linkPhone)) return this.$showToast('请输入正确的联系电话');
  60. if(!this.info.realName) return this.$showToast('请输入您的姓名');
  61. if(!this.info.requirement) return this.$showToast('请输入企业需求');
  62. this.canApply = false;
  63. this.$api.post('/specialcrowd-admin/contactus',this.info).then(res=>{
  64. this.canApply = true;
  65. if(res.data.code===0){
  66. uni.reLaunch({
  67. url:'/pages/consult/result'
  68. })
  69. }else this.$showToast(res.data.msg);
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style scoped lang="less">
  76. .content{
  77. background: #fff;
  78. .top{
  79. margin-top: 24rpx;
  80. width: 100%;
  81. height: 42rpx;
  82. display: flex;
  83. align-items: center;
  84. justify-content: center;
  85. position: relative;
  86. text{
  87. font-family: PingFangSC, PingFang SC;
  88. font-weight: 400;
  89. font-size: 30rpx;
  90. color: #111111;
  91. line-height: 42rpx;
  92. }
  93. image{
  94. width: 42rpx;
  95. height: 42rpx;
  96. position: absolute;
  97. top: 0;
  98. left: 30rpx;
  99. }
  100. }
  101. .contact{
  102. width: calc(100% - 48rpx);
  103. margin: 44rpx 24rpx 0;
  104. padding: 36rpx 0 24rpx;
  105. box-sizing: border-box;
  106. background: #FFFFFF;
  107. box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.06);
  108. border-radius: 12rpx;
  109. .title{
  110. font-family: PingFang-SC, PingFang-SC;
  111. font-weight: bold;
  112. font-size: 32rpx;
  113. color: #111111;
  114. line-height: 45rpx;
  115. padding-left: 28rpx;
  116. position: relative;
  117. &:before{
  118. content: '';
  119. width: 12rpx;
  120. height: 24rpx;
  121. background: #1460CA;
  122. position: absolute;
  123. left: 0;
  124. top: 50%;
  125. margin-top: -12rpx;
  126. }
  127. }
  128. .item{
  129. width: calc(100% - 60rpx);
  130. height: 90rpx;
  131. box-shadow: inset 0rpx -2rpx 0rpx 0rpx #F0F1F4;
  132. margin: 0 30rpx 0;
  133. display: flex;
  134. align-items: center;
  135. &.first{
  136. margin-top: 63rpx;
  137. }
  138. &.last{
  139. height: 300rpx;
  140. align-items: flex-start;
  141. padding: 25rpx 0;
  142. box-sizing: border-box;
  143. }
  144. .name{
  145. width: 176rpx;
  146. padding-left: 22rpx;
  147. box-sizing: border-box;
  148. font-family: PingFangSC, PingFang SC;
  149. font-weight: 400;
  150. font-size: 28rpx;
  151. color: #666666;
  152. line-height: 40rpx;
  153. position: relative;
  154. span{
  155. width: 24rpx;
  156. height: 40rpx;
  157. font-family: PingFangSC, PingFang SC;
  158. font-weight: 400;
  159. font-size: 28rpx;
  160. color: #F61B1B;
  161. line-height: 40rpx;
  162. position: absolute;
  163. left: 0;
  164. }
  165. }
  166. .inp{
  167. width: calc(100% - 176rpx);
  168. height: 100%;
  169. input,textarea{
  170. width: 100%;
  171. height: 100%;
  172. border: none;
  173. outline: none;
  174. font-family: PingFangSC, PingFang SC;
  175. font-weight: 400;
  176. font-size: 26rpx;
  177. color: #666666;
  178. line-height: 37rpx;
  179. &::placeholder{
  180. color: #CCCCCC;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. .apply{
  187. width: calc(100% - 80rpx);
  188. height: 80rpx;
  189. background: #1460CA;
  190. border-radius: 12rpx;
  191. margin: 194rpx 40rpx 0;
  192. text-align: center;
  193. line-height: 80rpx;
  194. font-family: PingFang-SC, PingFang-SC;
  195. font-weight: bold;
  196. font-size: 32rpx;
  197. color: #FFFFFF;
  198. letter-spacing: 2rpx;
  199. }
  200. }
  201. </style>