userTuiAdd.vue 3.8 KB

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