cooperate.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="flex-common-css iPhone-bottom box-border-box">
  3. <Nav title="商务合作" titleColor="#333" bgckgroundBox='#fff'></Nav>
  4. <scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
  5. <view class="content-box box-border-box">
  6. <view class="bgc-f p-24 b-rad-20 mb-20 box-sizing-border">
  7. <view class="fs-32 fw-600 fc-3 mb-8">
  8. 请描述你想合作的想法
  9. </view>
  10. <view class="textarea-box">
  11. <textarea v-model="formData.content" placeholder-style="color:#ccc" auto-height maxlength='100' placeholder="请在这里输入您的想法" />
  12. </view>
  13. </view>
  14. <view class="bgc-f b-rad-20 box-sizing-border phone-box">
  15. <view class="fs-32 fc-3 mb-20 fw-600">
  16. 联系方式
  17. </view>
  18. <input v-model="formData.name" class="uni-input mb-20" focus placeholder="请输入姓名" type="text" />
  19. <input v-model="formData.phone" class="uni-input" focus placeholder="请输入手机号" type="number" />
  20. </view>
  21. </view>
  22. </scroll-view>
  23. <view class="bot-box bgc-f" @click="save()">
  24. <view class="bot-but fc-f fs-32 text-align-center b-rad-200 bgc-4FB3EF">
  25. 提交合作
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import {setCooperation} from '@/api/common.js'
  32. import tools from '@/service/tools';
  33. export default {
  34. components: {},
  35. data() {
  36. return {
  37. formData: {
  38. phone:'',
  39. content: '',
  40. name: '',
  41. },
  42. isAJAX:false,
  43. };
  44. },
  45. methods: {
  46. save(){
  47. if(this.isAJAX){
  48. return
  49. }
  50. this.isAJAX = true;
  51. setCooperation(this.formData).then((res)=>{
  52. if(res.code === 1){
  53. this.isAJAX = false;
  54. tools.success('提交成功');
  55. setTimeout(()=>{
  56. uni.reLaunch({
  57. url:'/pages/me/index'
  58. })
  59. },1500)
  60. }else{
  61. this.isAJAX = false;
  62. tools.error(res.msg);
  63. }
  64. })
  65. },
  66. },
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .content-box {
  71. padding: 26rpx 24rpx 0;
  72. }
  73. .textarea-box {
  74. width: 100%;
  75. height: 200rpx;
  76. }
  77. .up-img {
  78. width: 152rpx;
  79. height: 152rpx;
  80. margin: 0 0 10rpx 0;
  81. position: relative;
  82. .img {
  83. width: 100%;
  84. height: 100%;
  85. border-radius: 4rpx;
  86. }
  87. .delete-icons {
  88. position: absolute;
  89. right: 0;
  90. top: 0;
  91. }
  92. }
  93. .add-img-box {
  94. width: 152rpx;
  95. height: 152rpx;
  96. border: 1px dashed #ccc;
  97. border-radius: 4rpx;
  98. .add-img {
  99. width: 56rpx;
  100. height: 56rpx;
  101. }
  102. }
  103. .phone-box {
  104. padding: 32rpx 24rpx;
  105. }
  106. .uni-input {
  107. // width: 100%;
  108. height: 92rpx;
  109. line-height: 92rpx;
  110. background: #F6F6F6;
  111. border-radius: 12rpx;
  112. padding: 0 0 0 26rpx;
  113. }
  114. .bot-box {
  115. width: 100%;
  116. padding: 12rpx 32rpx;
  117. box-sizing: border-box;
  118. .bot-but {
  119. width: 100%;
  120. height: 92rpx;
  121. line-height: 92rpx;
  122. }
  123. }
  124. </style>