apply.vue 4.8 KB

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