sign_up_info.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="info">
  3. <view class="base_info">
  4. <view class="base_info_con">
  5. <view class="title flexS">
  6. <text class="iconfont icongeren2" style="font-size: 45rpx;color: #ea4a42;margin-right: 10rpx;"></text>
  7. <text>报名信息</text>
  8. </view>
  9. <view class="info_fixed">
  10. <view>
  11. <view class="label">姓名:</view>
  12. <view class="label_con">{{ userInfo.nickname || '' }}</view>
  13. </view>
  14. <view>
  15. <view class="label">手机号:</view>
  16. <view class="label_con">{{ userInfo.phone || '' }}</view>
  17. </view>
  18. <view>
  19. <view class="label">代理等级:</view>
  20. <view class="label_con">{{ userInfo.level || '' }}</view>
  21. </view>
  22. <view>
  23. <view class="label">性别:</view>
  24. <view class="label_con">{{ signedInfo.sex ? '女' : '男' }}</view>
  25. </view>
  26. <view>
  27. <view class="label">身份证号:</view>
  28. <view class="label_con">{{ signedInfo.id_code || '' }}</view>
  29. </view>
  30. <view>
  31. <view class="label">来自哪里:</view>
  32. <view class="label_con">{{ signedInfo.province || '' }}-{{ signedInfo.city || '' }}-{{ signedInfo.area || '' }}</view>
  33. </view>
  34. <view>
  35. <view class="label">详细地址:</view>
  36. <view class="label_con">{{ signedInfo.detail || '' }}</view>
  37. </view>
  38. <view>
  39. <view class="label">参加次数:</view>
  40. <view class="label_con">{{ (userInfo.type ? signedInfo.join_two_num : signedInfo.join_one_num) || 0 }}</view>
  41. </view>
  42. </view>
  43. <view class="dynamic_info">
  44. <view class="info_con" v-for="item in formData" :key="item.id">
  45. <view class="label">{{ item.form_name }}</view>
  46. <radio-group v-if="item.style == 1">
  47. <label v-for="(temp, index) in item.form_value" :key="index">
  48. <view class="radio_con">
  49. <radio :value="item.value" checked="item.value" disabled></radio>
  50. <text>{{ item.form_value[index] }}</text>
  51. </view>
  52. </label>
  53. </radio-group>
  54. <checkbox-group v-if="item.style == 2">
  55. <label v-for="(temp, index) in item.form_value" :key="index">
  56. <view class="check_con">
  57. <checkbox :value="item.value" checked="item.value" disabled />
  58. <text>{{ item.form_value[index] }}</text>
  59. </view>
  60. </label>
  61. </checkbox-group>
  62. <view class="label_con" v-if="item.style == 3"><textarea v-model="item.value" disabled auto-height :class="brand ? 'textareaIp' : ''" /></view>
  63. <view v-if="item.style == 4">
  64. <view class="label_con flexS address">
  65. <text class="iconfont icondizhi"></text>
  66. <text>{{ item.value[0] }} {{ item.value[1] }} {{ item.value[2] }}</text>
  67. </view>
  68. <view class="label">详细地址</view>
  69. <view class="label_con flexS">
  70. <text class="iconfont icondizhi"></text>
  71. <textarea v-model="item.value[3]" disabled auto-height :class="brand ? 'textareaIp' : ''" />
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import { lookForm, userSignUpInfo } from '../../api/sign.js';
  82. export default {
  83. data() {
  84. return {
  85. formData: [],
  86. userInfo: {},
  87. signedInfo: {}
  88. };
  89. },
  90. onShow() {
  91. this.lookForm();
  92. this.getSystem();
  93. this.getFormSignedInfo()
  94. this.userInfo = uni.getStorageSync('userInfo');
  95. },
  96. methods: {
  97. getFormSignedInfo() {
  98. userSignUpInfo().then(res => {
  99. if(res.code === 200) {
  100. this.signedInfo = res.data
  101. }
  102. })
  103. },
  104. //获取手机版本动态设置textarea的padinng值 解决安卓机跟ios的textarea的高度不一致
  105. getSystem() {
  106. uni.getSystemInfo({
  107. success: res => {
  108. if (res.brand == 'iPhone') {
  109. this.brand = true;
  110. }
  111. }
  112. });
  113. },
  114. lookForm() {
  115. lookForm().then(res => {
  116. if (res.code == 200) {
  117. this.formData = res.data.list;
  118. } else {
  119. uni.showModal({
  120. content: res.message || '请求失败',
  121. showCancel: false
  122. });
  123. }
  124. });
  125. }
  126. }
  127. };
  128. </script>
  129. <style>
  130. page {
  131. width: 100%;
  132. height: 100%;
  133. background-color: #fff;
  134. }
  135. </style>
  136. <style lang="scss">
  137. .label {
  138. font-size: 28rpx;
  139. margin: 20rpx 0;
  140. }
  141. .label_con {
  142. font-size: 32rpx;
  143. font-weight: 600;
  144. padding-bottom: 15rpx;
  145. .iconfont {
  146. margin-right: 10rpx;
  147. flex-shrink: 0;
  148. }
  149. }
  150. .textareaIp {
  151. padding: 0;
  152. }
  153. textarea {
  154. font-size: 32rpx;
  155. font-weight: 600;
  156. padding: 10rpx 0;
  157. }
  158. .address {
  159. border-bottom: 1rpx solid #f5f5f5;
  160. }
  161. .info {
  162. padding-bottom: 82rpx;
  163. .base_info {
  164. width: 100%;
  165. background-color: #fff;
  166. .title {
  167. padding: 15rpx 0;
  168. text {
  169. font-size: 36rpx;
  170. font-weight: 600;
  171. }
  172. image {
  173. height: 40rpx;
  174. width: 40rpx;
  175. margin-right: 20rpx;
  176. }
  177. }
  178. .base_info_con {
  179. width: 90%;
  180. margin: 0 auto;
  181. }
  182. }
  183. .base_info {
  184. .base_info_con {
  185. .info_fixed {
  186. color: #333;
  187. > view {
  188. border-bottom: 1rpx solid #f5f5f5;
  189. }
  190. }
  191. .info_con {
  192. border-bottom: 1rpx solid #f5f5f5;
  193. .check_con,
  194. .radio_con {
  195. width: 100%;
  196. display: flex;
  197. justify-content: flex-start;
  198. align-items: center;
  199. padding-bottom: 15rpx;
  200. text {
  201. font-size: 32rpx;
  202. font-weight: 600;
  203. margin-left: 20rpx;
  204. }
  205. }
  206. .radio_con {
  207. radio .wx-radio-input {
  208. border-radius: 50%;
  209. border: 2rpx solid #999;
  210. background: transparent !important;
  211. width: 40rpx;
  212. height: 40rpx;
  213. }
  214. radio .wx-radio-input.wx-radio-input-checked::before {
  215. border-radius: 100%;
  216. width: 60%;
  217. height: 60%;
  218. content: '';
  219. background-color: #ea4a42;
  220. transform: translate(-50%, -50%) scale(1);
  221. -webkit-transform: translate(-50%, -50%) scale(1);
  222. }
  223. radio .wx-radio-input.wx-radio-input-checked {
  224. border-color: #ea4a42;
  225. }
  226. }
  227. .check_con {
  228. checkbox .wx-checkbox-input {
  229. border: 2rpx solid #999;
  230. background: transparent !important;
  231. width: 40rpx;
  232. height: 40rpx;
  233. }
  234. checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  235. border-color: #ea4a42;
  236. }
  237. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  238. width: 60%;
  239. height: 60%;
  240. background: #ea4a42;
  241. content: '';
  242. transform: translate(-50%, -50%) scale(1);
  243. -webkit-transform: translate(-50%, -50%) scale(1);
  244. }
  245. }
  246. }
  247. }
  248. }
  249. }
  250. </style>