honour_edit.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="real-name">
  3. <u-form :model="form" ref="uForm" label-width='200'>
  4. <u-form-item label="学术任职">
  5. <u-input v-model="form.academic_post" placeholder="请填写学术任职" />
  6. </u-form-item>
  7. <u-form-item label="学术成果">
  8. </u-form-item>
  9. <u-form-item>
  10. <u-input v-model="form.academic_results" :type="type" :border="border" :height="height"
  11. :auto-height="autoHeight" placeholder="请输入学术成果"/>
  12. </u-form-item>
  13. <u-form-item label="个人研究方向">
  14. </u-form-item>
  15. <u-form-item>
  16. <u-input v-model="form.study" :type="type" :border="border" :height="height"
  17. :auto-height="autoHeight" placeholder="请输入个人研究方向"/>
  18. </u-form-item>
  19. <u-form-item label="所获荣誉">
  20. </u-form-item>
  21. <u-form-item>
  22. <u-input v-model="form.honor" :type="type" :border="border" :height="height"
  23. :auto-height="autoHeight" placeholder="请输入所获荣誉"/>
  24. </u-form-item>
  25. </u-form>
  26. <button class="buttom" @click="save()">保存</button>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. form: {},
  34. type: 'textarea',
  35. border: true,
  36. height: 200,
  37. autoHeight: true,
  38. }
  39. },
  40. onLoad(options) {
  41. if (options.type == 0) {
  42. this.getMe()
  43. }
  44. },
  45. onShow() {
  46. this.form = this.$store.state.vuex_user
  47. },
  48. methods: {
  49. save() {
  50. this.$u.post('/page/update-people-info', this.form).then(res => {
  51. console.log(res, 'pppp')
  52. uni.showToast({
  53. title: res.message,
  54. icon: 'none'
  55. })
  56. this.$u.vuex('vuex_user', this.form);
  57. setTimeout(function() {
  58. uni.navigateBack()
  59. }, 1000)
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .upload_image {
  67. width: 90%;
  68. margin: 0 auto;
  69. }
  70. .complate,
  71. .complate1 {
  72. width: 50%;
  73. margin: 0 auto;
  74. margin-top: 20%;
  75. line-height: 44px;
  76. text-align: center;
  77. height: 44px;
  78. background: #79573D;
  79. opacity: 1;
  80. border-radius: 24px;
  81. font-size: 18px;
  82. font-family: PingFang SC;
  83. font-weight: 500;
  84. color: #FFFFFF;
  85. opacity: 1;
  86. }
  87. .complate1 {
  88. margin-top: 30px;
  89. }
  90. .real-name {
  91. padding: 0 16px;
  92. padding-bottom: 40px;
  93. .name_item {
  94. margin-top: 20px !important;
  95. }
  96. .item {
  97. display: flex;
  98. align-items: center;
  99. justify-content: space-between;
  100. height: 46px;
  101. line-height: 46px;
  102. // margin-top: 10px;
  103. .label {
  104. flex: 0 0 40%;
  105. font-size: 16px;
  106. font-family: PingFang SC;
  107. font-weight: bold;
  108. line-height: 20px;
  109. color: #282828;
  110. opacity: 1;
  111. }
  112. .right {
  113. // flex: 1;
  114. font-size: 13px;
  115. font-family: PingFang SC;
  116. font-weight: 400;
  117. line-height: 20px;
  118. color: #282828;
  119. opacity: 0.42;
  120. text-align: right;
  121. height: 20px;
  122. // overflow: hidden;
  123. display: flex;
  124. align-items: center;
  125. text {
  126. display: inline-block;
  127. // width: 200px;
  128. height: 20px;
  129. line-height: 20px;
  130. overflow: hidden;
  131. white-space: nowrap;
  132. text-overflow: ellipsis;
  133. }
  134. }
  135. }
  136. .form {
  137. position: relative;
  138. .back {
  139. position: absolute;
  140. left: 10px;
  141. top: 0px;
  142. width: 30px;
  143. height: 44px;
  144. line-height: 44px;
  145. text-align: center;
  146. z-index: 9999;
  147. // background: #18B566;
  148. }
  149. .title {
  150. padding: 0 20px;
  151. height: 40px;
  152. line-height: 40px;
  153. }
  154. .input {
  155. margin: 0 20px;
  156. height: 40px;
  157. line-height: 40px;
  158. border-bottom: solid 1px rgba(175, 175, 175, .2);
  159. }
  160. }
  161. .item1 {
  162. .dec {
  163. font-size: 13px;
  164. font-family: PingFang SC;
  165. font-weight: 400;
  166. line-height: 20px;
  167. color: #AFAFAF;
  168. opacity: 1;
  169. padding-bottom: 10px;
  170. border-bottom: solid 1px rgba(175, 175, 175, .2);
  171. }
  172. }
  173. .buttom {
  174. width: 229px;
  175. height: 56px;
  176. line-height: 56px;
  177. background: #79573D;
  178. text-align: center;
  179. border-radius: 28px;
  180. margin: 0 auto;
  181. margin-top: 50px;
  182. font-size: 18px;
  183. font-family: PingFang SC;
  184. font-weight: bold;
  185. color: #fff;
  186. opacity: 1;
  187. }
  188. }
  189. </style>