移动端
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

205 wiersze
5.4 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 个人信息
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="add_btn" @click="send">保存</div>
  7. </div>
  8. <van-form @submit="onSubmit" ref="formData">
  9. <div class="list_main">
  10. <van-field required label="用户昵称" :rules="[{ required: true , message:'请输入用户昵称' }]" v-model="user.nickName" placeholder="请输入用户昵称" input-align="right" :border="false" />
  11. <van-field required label="手机号码" :rules="[{ required: true , message:'请输入手机号码'},{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ , message:'请输入手机号码'}]" v-model="user.phonenumber" placeholder="请输入手机号码" input-align="right" :border="false" />
  12. <van-field required label="邮箱" :rules="[{ required: true, message: '邮箱地址不能为空' }]" prop="email" v-model="user.email" placeholder="请输入邮箱" input-align="right" :border="false" />
  13. <van-field name="radio" label="性别" input-align="right" :border="false">
  14. <template #input>
  15. <van-radio-group v-model="user.sex" direction="horizontal">
  16. <van-radio name="0">男</van-radio>
  17. <van-radio name="1">女</van-radio>
  18. </van-radio-group>
  19. </template>
  20. </van-field>
  21. </div>
  22. <!-- <div style="margin: 16px;">-->
  23. <!-- <van-button round block type="primary" native-type="submit">-->
  24. <!-- 保存-->
  25. <!-- </van-button>-->
  26. <!-- </div>-->
  27. </van-form>
  28. </div>
  29. </template>
  30. <script>
  31. import { addOddjob , getUserProfile , updateUserProfile } from "@/api/sunVillage_info/fixedAssets";
  32. import Cookies from "js-cookie";
  33. import request from '@/utils/request'
  34. export default {
  35. name: "certificateList",
  36. data() {
  37. return {
  38. user:{
  39. sex:0
  40. },
  41. };
  42. },
  43. created() {
  44. this.getUser();
  45. },
  46. methods: {
  47. getUser() {
  48. getUserProfile().then(response => {
  49. this.user = response.data;
  50. });
  51. },
  52. send(){
  53. this.$refs.formData.submit();
  54. },
  55. onSubmit(){
  56. var that = this;
  57. updateUserProfile(this.user).then(response => {
  58. that.$notify({ type: 'success', message: '修改成功!' });
  59. setTimeout(function(){
  60. history.back(-1);
  61. },2000)
  62. });
  63. },
  64. onConfirmOpenNy(data){
  65. this.form.jobTime = this.format(data,'yyyy-MM-dd');
  66. this.jobTime = data;
  67. this.showBuildTime = false;
  68. },
  69. },
  70. }
  71. </script>
  72. <style scoped lang="scss">
  73. .home_wrapper{
  74. background: #e9e9e9;
  75. min-height: 100vh;
  76. width: 100vw;
  77. .header_main {
  78. height: 116px;
  79. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  80. background-size: 100% 100%;
  81. position: fixed;
  82. top: 0;
  83. left: 0;
  84. width: 100%;
  85. font-size: 36px;
  86. line-height: 116px;
  87. text-align: center;
  88. color: #fff;
  89. position: relative;
  90. .return_btn {
  91. width: 24px;
  92. height: 43.2px;
  93. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  94. background-size: 20px 36px;
  95. position: absolute;
  96. left: 38px;
  97. top: 36px;
  98. }
  99. .add_btn{
  100. width: 56.4px;
  101. height: 40.8px;
  102. font-size: 14PX;
  103. position: absolutze;
  104. right: 38px;
  105. top: 36px;
  106. line-height: 40.8px;
  107. }
  108. }
  109. .release_head{
  110. height: 90px;
  111. padding:0 23px;
  112. display: flex;
  113. align-items: center;
  114. font-size: 26px;
  115. color: #929292;
  116. .people{
  117. flex: 1;
  118. display: flex;
  119. align-items: center;
  120. .icon{
  121. width: 24px;
  122. height: 21px;
  123. background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat;
  124. background-size: 100% 100%;
  125. display: block;
  126. margin-right: 8px;
  127. }
  128. }
  129. .time{
  130. flex: 1;
  131. display: flex;
  132. align-items: center;
  133. justify-content:flex-end;
  134. .icon{
  135. width: 25px;
  136. height: 25px;
  137. background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat;
  138. background-size: 100% 100%;
  139. display: block;
  140. margin-right: 8px;
  141. }
  142. }
  143. }
  144. .release_conetnt{
  145. padding:0 22px;
  146. font-size: 32px;
  147. color: #252525;
  148. line-height: 44px;
  149. img{
  150. max-width: 100%;
  151. margin-bottom: 16px;
  152. }
  153. p{
  154. margin-bottom: 16px;
  155. }
  156. }
  157. .list_main{
  158. padding:25px;
  159. background: #ffffff;
  160. width: 94%;
  161. margin: 25px auto 0;
  162. border-radius: 15PX;
  163. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  164. }
  165. .titBox{
  166. display: flex;
  167. align-items: center;
  168. }
  169. .tit{
  170. font-size: 36px;
  171. font-weight: bold;
  172. }
  173. /deep/ .van-cell{
  174. padding-left: 0!important;
  175. padding-right: 0!important;
  176. padding-bottom: 0!important;
  177. &:first-child{
  178. padding-top: 0;
  179. }
  180. }
  181. /deep/ .van-field__label{
  182. padding-left: 10PX;
  183. width: auto;
  184. display: flex;
  185. align-items: center;
  186. }
  187. /deep/ .van-cell--required::before{
  188. left: 0PX;
  189. }
  190. /deep/ .van-field__error-message{
  191. display: none;
  192. }
  193. }
  194. </style>