apply.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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.redirectTo({
  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. this.$showToast('申请成功');
  67. }else this.$showToast(res.data.msg);
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style scoped lang="less">
  74. .content{
  75. background: #fff;
  76. .top{
  77. margin-top: 24rpx;
  78. width: 100%;
  79. height: 42rpx;
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. position: relative;
  84. text{
  85. font-family: PingFangSC, PingFang SC;
  86. font-weight: 400;
  87. font-size: 30rpx;
  88. color: #111111;
  89. line-height: 42rpx;
  90. }
  91. image{
  92. width: 42rpx;
  93. height: 42rpx;
  94. position: absolute;
  95. top: 0;
  96. left: 30rpx;
  97. }
  98. }
  99. .contact{
  100. width: calc(100% - 48rpx);
  101. margin: 44rpx 24rpx 0;
  102. padding: 36rpx 0 24rpx;
  103. box-sizing: border-box;
  104. background: #FFFFFF;
  105. box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.06);
  106. border-radius: 12rpx;
  107. .title{
  108. font-family: PingFang-SC, PingFang-SC;
  109. font-weight: bold;
  110. font-size: 32rpx;
  111. color: #111111;
  112. line-height: 45rpx;
  113. padding-left: 28rpx;
  114. position: relative;
  115. &:before{
  116. content: '';
  117. width: 12rpx;
  118. height: 24rpx;
  119. background: #1460CA;
  120. position: absolute;
  121. left: 0;
  122. top: 50%;
  123. margin-top: -12rpx;
  124. }
  125. }
  126. .item{
  127. width: calc(100% - 60rpx);
  128. height: 90rpx;
  129. box-shadow: inset 0rpx -2rpx 0rpx 0rpx #F0F1F4;
  130. margin: 0 30rpx 0;
  131. display: flex;
  132. align-items: center;
  133. &.first{
  134. margin-top: 63rpx;
  135. }
  136. &.last{
  137. height: 300rpx;
  138. align-items: flex-start;
  139. padding: 25rpx 0;
  140. box-sizing: border-box;
  141. }
  142. .name{
  143. width: 176rpx;
  144. padding-left: 22rpx;
  145. box-sizing: border-box;
  146. font-family: PingFangSC, PingFang SC;
  147. font-weight: 400;
  148. font-size: 28rpx;
  149. color: #666666;
  150. line-height: 40rpx;
  151. position: relative;
  152. span{
  153. width: 24rpx;
  154. height: 40rpx;
  155. font-family: PingFangSC, PingFang SC;
  156. font-weight: 400;
  157. font-size: 28rpx;
  158. color: #F61B1B;
  159. line-height: 40rpx;
  160. position: absolute;
  161. left: 0;
  162. }
  163. }
  164. .inp{
  165. width: calc(100% - 176rpx);
  166. height: 100%;
  167. input,textarea{
  168. width: 100%;
  169. height: 100%;
  170. border: none;
  171. outline: none;
  172. font-family: PingFangSC, PingFang SC;
  173. font-weight: 400;
  174. font-size: 26rpx;
  175. color: #666666;
  176. line-height: 37rpx;
  177. &::placeholder{
  178. color: #CCCCCC;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. .apply{
  185. width: calc(100% - 80rpx);
  186. height: 80rpx;
  187. background: #1460CA;
  188. border-radius: 12rpx;
  189. margin: 194rpx 40rpx 0;
  190. text-align: center;
  191. line-height: 80rpx;
  192. font-family: PingFang-SC, PingFang-SC;
  193. font-weight: bold;
  194. font-size: 32rpx;
  195. color: #FFFFFF;
  196. letter-spacing: 2rpx;
  197. }
  198. }
  199. </style>