userTuiAdd.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view>
  3. <view class="form-box">
  4. <view class="title">你为什么想成为倍力优健康推广?</view>
  5. <view class="textarea-box">
  6. <textarea v-model="question1" value="" placeholder="请输入..." maxlength="200" placeholder-class="textarea-place" />
  7. <view class="num-box">{{ question1.length }}/200</view>
  8. </view>
  9. <view class="title">你是否了解倍力优健康推广大使?</view>
  10. <view class="textarea-box">
  11. <textarea v-model="question2" value="" placeholder="请输入..." maxlength="200" placeholder-class="textarea-place" />
  12. <view class="num-box">{{ question1.length }}/200</view>
  13. </view>
  14. <view class="title">你最有意向推广的产品是哪一款?</view>
  15. <view class="textarea-box">
  16. <textarea v-model="question3" value="" placeholder="请输入..." maxlength="200" placeholder-class="textarea-place" />
  17. <view class="num-box">{{ question3.length }}/200</view>
  18. </view>
  19. <view class="btn-box">
  20. <view class="sub-btn" @click="submit()">提交申请</view>
  21. </view>
  22. <view class="popup-box" v-if="qwShow">
  23. <view class="info-mask" @tap="close()" ></view>
  24. <view class="info-form" >
  25. <image :src="qwUrl" />
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import {applyPromoter} from '@/api/user'
  33. export default {
  34. name: "tuiMoney",
  35. data: function () {
  36. return {
  37. qwShow:false,
  38. question1:"",
  39. question2:"",
  40. question3:"",
  41. qwUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230228/7ee9c2ee807545aea36f6f1127a0cec4.jpg"
  42. };
  43. },
  44. mounted: function () {
  45. },
  46. methods: {
  47. close(){
  48. this.qwShow=false;
  49. },
  50. submit(){
  51. var json={question1:this.question1,question2:this.question2,question3:this.question3}
  52. var data={contentJson:JSON.stringify(json)}
  53. applyPromoter(data).then(
  54. res => {
  55. this.qwShow=true;
  56. if(res.code==200){
  57. uni.showToast({
  58. icon:'none',
  59. title: res.msg,
  60. });
  61. }else{
  62. uni.showToast({
  63. icon:'none',
  64. title: res.msg,
  65. });
  66. }
  67. },
  68. rej => {}
  69. );
  70. },
  71. }
  72. };
  73. </script>
  74. <style lang="scss">
  75. .form-box{
  76. padding: 0 30upx;
  77. background: #FFFFFF;
  78. .title{
  79. padding: 15rpx 0rpx;
  80. font-size: 28upx;
  81. font-family: PingFang SC;
  82. color: #949494;
  83. }
  84. .textarea-box{
  85. box-sizing: border-box;
  86. height: 330upx;
  87. background: #F5F6FA;
  88. border-radius: 10upx;
  89. padding: 30upx;
  90. position: relative;
  91. .textarea-place{
  92. font-size: 28upx;
  93. font-family: PingFang SC;
  94. font-weight: 400;
  95. color: #C9CED6;
  96. }
  97. textarea{
  98. width: 100%;
  99. height: 100%;
  100. font-size: 32upx;
  101. font-family: PingFang SC;
  102. font-weight: 400;
  103. color: #000000;
  104. }
  105. .num-box{
  106. position: absolute;
  107. right: 20upx;
  108. bottom: 20upx;
  109. font-size: 24upx;
  110. font-family: PingFang SC;
  111. font-weight: 400;
  112. color: #C9CED6;
  113. z-index: 10;
  114. background: #F5F6FA;
  115. }
  116. }
  117. }
  118. .btn-box{
  119. margin-top: 30rpx;
  120. height: 120upx;
  121. padding: 0 30upx;
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. .sub-btn{
  126. width: 100%;
  127. height: 88upx;
  128. line-height: 88upx;
  129. text-align: center;
  130. font-size: 30upx;
  131. font-family: PingFang SC;
  132. font-weight: bold;
  133. color: #FFFFFF;
  134. background: #018C39;
  135. border-radius: 44upx;
  136. }
  137. }
  138. .popup-box{
  139. position: fixed;
  140. top: 0;
  141. right: 0;
  142. left: 0;
  143. bottom: 0;
  144. z-index: 999;
  145. display: flex;
  146. justify-content: center;
  147. align-items: center;
  148. .info-mask {
  149. position: fixed;
  150. top: 0;
  151. right: 0;
  152. bottom: 0;
  153. left: 0;
  154. background-color: rgba($color: #000000, $alpha: 0.5);
  155. z-index: 999;
  156. }
  157. .info-form {
  158. z-index: 1000;
  159. width: 80%;
  160. height:80%;
  161. display: flex;
  162. flex-direction: column;
  163. justify-content: center;
  164. align-items: center;
  165. position: relative;
  166. image{
  167. width:100%;
  168. height:100%;
  169. }
  170. }
  171. }
  172. </style>