self_info.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <view class="content-box">
  3. <!-- <view class="header-box">
  4. <image src="/static/tips.png" mode="aspectFill"></image>
  5. <text>温馨提示:请填写以下信息,填写后信息不可修改</text>
  6. </view> -->
  7. <form @submit="formSubmit" style="width: 100%">
  8. <!-- <view class="self-title-box">
  9. <image src="/static/rect-icon.png" mode="aspectFill"></image>
  10. <text>登记信息</text>
  11. </view> -->
  12. <view class="info-box">
  13. <view class="info-title-box">
  14. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  15. <text>姓名</text>
  16. </view>
  17. <view class="info-value-box">
  18. <input type="text" placeholder="请输入姓名" name="selfName" :value="userName" >
  19. </view>
  20. </view>
  21. <view class="info-box">
  22. <view class="info-title-box">
  23. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  24. <text>手机号</text>
  25. </view>
  26. <view class="info-value-box">
  27. <input type="tel" placeholder="请输入手机号" name="selfTel" :value="userPhone" disabled="true">
  28. </view>
  29. </view>
  30. <!-- <view class="info-box">
  31. <view class="info-title-box">
  32. <image src="/static/require-icon.png" mode="aspectFill"></image>
  33. <text>个人照片</text>
  34. </view>
  35. <view class="info-value-box">
  36. <image :src="userHeadImg" mode="aspectFit" style="width: 120rpx;height: 120rpx;border-radius: 10rpx;" @click="showLarge(userHeadImg)"></image>
  37. <view class="update_button display-flex">
  38. <view class="upload-box" @click="getImage('album')">
  39. <view class="img">
  40. <image src="/static/photo.png" class="photo"></image>
  41. </view>
  42. </view>
  43. <view class="display-flex upload-box-photo" v-for="(item, index) in uploadList" :key="index">
  44. <image :src="item" mode="aspectFit" style="width: 100%; height: 100%" @click="showLarge(item)"/>
  45. <image src="/static/del.png" class="del-icon"mode="aspectFit"
  46. style="width: 30rpx; height: 30rpx" @click="delPhoto(index)"></image>
  47. </view>
  48. </view>
  49. </view>
  50. </view> -->
  51. <view class="img-container">
  52. <label for="img">个人照片</label>
  53. <view class="note-image-box">
  54. <view class="note-image-item" v-for="(item,index) in uploadList" :key="index">
  55. <view class="close-icon" @click="delPhoto(index)">
  56. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  57. </view>
  58. <view class="image-box" @click="showLarge(item)">
  59. <image :src="item" mode="aspectFill"></image>
  60. </view>
  61. </view>
  62. <view v-if="uploadList.length < 1" class="note-image-item" @click="getImage('album')">
  63. <view class="image-box">
  64. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="info-box">
  70. <view class="info-title-box">
  71. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  72. <text>入党年月</text>
  73. </view>
  74. <view class="info-value-box">
  75. <view class="uni-list title-date-box">
  76. <view class="uni-list-cell">
  77. <view class="uni-list-cell-db display-flex-start">
  78. <picker mode="date" fields="year" @change="bindDateChange" class="picker-class">
  79. <view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
  80. </picker>
  81. <picker :range="arrayMonth" :value="dateMonth" @change="bindDateMonthChange" class="picker-class" style="margin-left: 2%;">
  82. <view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
  83. </picker>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="info-box">
  90. <view class="info-title-box">
  91. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  92. <text>性别</text>
  93. </view>
  94. <view class="info-gender-box">
  95. <radio-group @change="radioCheck" class="padding-left-2">
  96. <label class="radio margin-right-10"><radio value="1" :checked="userSex==='1'" color="#00A1B4" class="form-radio"/>男</label>
  97. <label class="radio"><radio value="2" :checked="userSex==='2'" color="#00A1B4" class="form-radio"/>女</label>
  98. </radio-group>
  99. </view>
  100. </view>
  101. <view class="info-box">
  102. <view class="info-title-box">
  103. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  104. <text>民族</text>
  105. </view>
  106. <view class="info-value-box">
  107. <input type="text" placeholder="请输入民族" name="selfNation" :value="userNation" >
  108. </view>
  109. </view>
  110. <view class="info-box">
  111. <view class="info-title-box">
  112. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  113. <text>籍贯</text>
  114. </view>
  115. <view class="info-value-box">
  116. <input type="text" placeholder="请输入籍贯" name="selfNative" :value="userNative" >
  117. </view>
  118. </view>
  119. <view class="info-box">
  120. <view class="info-title-box">
  121. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  122. <text>出生日期</text>
  123. </view>
  124. <view class="info-value-box">
  125. <uni-datetime-picker
  126. class="time-select-box"
  127. type="date"
  128. :value="userBorn"
  129. @change="change"
  130. :clear-icon="false"
  131. @maskClick="dateMask"
  132. />
  133. </view>
  134. </view>
  135. <view class="info-box">
  136. <view class="info-title-box">
  137. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  138. <text>学历</text>
  139. </view>
  140. <view class="info-value-box">
  141. <picker @change="bindPickerChange($event,'education')" :range="educationArray" class="select-box" >
  142. <view class="uni-input">{{educationValue}}</view>
  143. <image src="/static/arrow_down.svg" mode="aspectFill"></image>
  144. </picker>
  145. </view>
  146. </view>
  147. <view class="info-box">
  148. <view class="info-title-box">
  149. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  150. <text>学位</text>
  151. </view>
  152. <view class="info-value-box">
  153. <picker @change="this.degreeValue=getArrayValueByOrder(this.degreeArray,$event.target.value)" :range="getArrayValues(this.degreeArray)" class="select-box" >
  154. <view class="uni-input">{{degreeValue}}</view>
  155. <image src="/static/arrow_down.svg" mode="aspectFill"></image>
  156. </picker>
  157. </view>
  158. </view>
  159. <view class="info-box">
  160. <view class="info-title-box">
  161. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  162. <text>在职学历</text>
  163. </view>
  164. <view class="info-value-box">
  165. <picker @change="this.jobEducationValue=getArrayValueByOrder(this.jobEducatioinArray,$event.target.value)" :range="getArrayValues(this.jobEducatioinArray)" class="select-box" >
  166. <view class="uni-input">{{jobEducationValue}}</view>
  167. <image src="/static/arrow_down.svg" mode="aspectFill"></image>
  168. </picker>
  169. </view>
  170. </view>
  171. <view class="info-box">
  172. <view class="info-title-box">
  173. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  174. <text>在职学位</text>
  175. </view>
  176. <view class="info-value-box">
  177. <picker @change="this.jobDegreeValue=getArrayValueByOrder(this.degreeArray,$event.target.value)" :range="getArrayValues(this.degreeArray)" class="select-box" >
  178. <view class="uni-input">{{jobDegreeValue}}</view>
  179. <image src="/static/arrow_down.svg" mode="aspectFill"></image>
  180. </picker>
  181. </view>
  182. </view>
  183. <view class="info-box">
  184. <view class="info-title-box">
  185. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  186. <text>工作单位</text>
  187. </view>
  188. <view class="info-value-box">
  189. <input type="text" name="selfOffice" :value="userOffice" >
  190. </view>
  191. </view>
  192. <view class="info-box">
  193. <view class="info-title-box">
  194. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  195. <text>职务</text>
  196. </view>
  197. <view class="info-value-box">
  198. <input type="text" name="selfPosition" :value="userPosition">
  199. </view>
  200. </view>
  201. <view class="info-box">
  202. <view class="info-title-box">
  203. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  204. <text>职称</text>
  205. </view>
  206. <view class="info-value-box">
  207. <input type="text" :value="userTitle" name="selfTitle">
  208. </view>
  209. </view>
  210. <view class="info-box">
  211. <view class="info-title-box">
  212. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  213. <text>现任职级</text>
  214. </view>
  215. <view class="info-value-box">
  216. <picker @change="bindRankChange($event)" :range="getArrayValues(this.rankArray)" class="select-box" >
  217. <view class="uni-input">{{rankValue}}</view>
  218. <image src="/static/arrow_down.svg" mode="aspectFill"></image>
  219. </picker>
  220. </view>
  221. </view>
  222. <view class="info-box">
  223. <view class="info-title-box">
  224. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  225. <text>任职年月</text>
  226. </view>
  227. <view class="info-value-box">
  228. <view class="uni-list title-date-box">
  229. <view class="uni-list-cell">
  230. <view class="uni-list-cell-db display-flex-start">
  231. <picker mode="date" fields="year" @change="bindRankDateChange" class="picker-class">
  232. <view class="uni-input display-between items-center">{{rankYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
  233. </picker>
  234. <picker :range="arrayMonth" :value="dateMonth" @change="bindRankDateMonthChange" class="picker-class" style="margin-left: 2%;">
  235. <view class="uni-input display-between items-center" style="color: #707070;">{{rankMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
  236. </picker>
  237. </view>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. <view style="display: flex;justify-content: space-evenly;">
  243. <!-- <button type="default" class="submit-bth" style="background-color: #aaaaaa;">清空</button> -->
  244. <button type="primary" class="submit-bth" style="background-color: #169bd5;" formType="submit">提交</button>
  245. </view>
  246. </form>
  247. </view>
  248. </template>
  249. <script>
  250. import md5 from "@/common/md5.js";
  251. // import pickerAddress from '@/components/liudx-pickerAddress/index.vue'
  252. // var graceChecker = require("../../../common/graceChecker.js");
  253. export default {
  254. components: {
  255. },
  256. data() {
  257. return {
  258. dateYear:new Date().getFullYear(),
  259. dateMonth:new Date().getMonth() + 1,
  260. rankYear:new Date().getFullYear(),
  261. rankMonth:new Date().getMonth() + 1,
  262. arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
  263. title: 'Hello',
  264. userName:'',
  265. userPhone:getApp().globalData.user_phone,
  266. userHeadImg:getApp().globalData.user_headUrl,
  267. detailObj:{},
  268. shareContent:'',
  269. shareCode:'',
  270. storeImg:'',
  271. isAuthPhone:getApp().globalData.user_phone,
  272. userSex:'1',
  273. userNation:'',
  274. userNative:'',
  275. userBorn:'',
  276. userOffice:'',
  277. userPosition:'',
  278. userTitle:'',
  279. txt: '请选择',
  280. educationValue:'请选择',
  281. degreeValue:'',
  282. jobEducationValue:'',
  283. jobDegreeValue:',',
  284. educationArray: ['博士研究生','硕士研究生','本科','大专','中专'],
  285. rankValue:'',
  286. professionValue:'请选择',
  287. professionArray:[],
  288. endsValue:'请选择',
  289. endsArray:[],
  290. provinceArray: [],
  291. addressShow: false,
  292. form: {
  293. province: '',
  294. city: '',
  295. },
  296. address: '',
  297. addressObj:{},
  298. userBrand:'',
  299. addressDetail:'',
  300. loginObj:{},
  301. uploadList: [],
  302. imgIdList: [],
  303. headImgId:'',
  304. educationObj:{
  305. '1':'中专',
  306. '2':'大专',
  307. '3':'本科',
  308. '4':'硕士研究生',
  309. '5':'博士研究生'
  310. },
  311. educationObjEdit:{
  312. '中专':'1',
  313. '大专':'2',
  314. '本科':'3',
  315. '硕士研究生':'4',
  316. '博士研究生':'5'
  317. },
  318. jobEducatioinArray:{
  319. '0':'',
  320. '2':'大专',
  321. '3':'本科',
  322. '4':'硕士研究生',
  323. '5':'博士研究生'
  324. },
  325. degreeArray:{
  326. '0':'',
  327. '1':'学士',
  328. '2':'硕士',
  329. '3':'博士'
  330. },
  331. rankArray:{
  332. '0':'',
  333. '1':'正厅',
  334. '2':'副厅(正局)',
  335. '3':'副局',
  336. '4':'正处',
  337. '5':'副处',
  338. '6':'正科',
  339. '7':'一级巡视员',
  340. '8':'二级巡视员',
  341. '9':'一级调研员',
  342. '10':'二级调研员',
  343. '11':'三级调研员',
  344. '12':'四级调研员'
  345. },
  346. }
  347. },
  348. onLoad() {
  349. this.getMemberInfo();
  350. },
  351. onShow() {
  352. },
  353. // onShareAppMessage() {
  354. // return {
  355. // title: '分销小助手',
  356. // path:'/pages/index/index?scene=' + getApp().globalData.user_id
  357. // }
  358. // },
  359. methods: {
  360. getArrayValues(list){
  361. var values = [];
  362. for (var i in list){
  363. values.push(list[i]);
  364. }
  365. return values;
  366. },
  367. getArrayKeyByValue(list, value){
  368. for (var i in list){
  369. if (value == list[i]){
  370. return i;
  371. }
  372. }
  373. },
  374. getArrayValueByOrder(list, order){
  375. var n = 0;
  376. for (var i in list){
  377. if (order == n){
  378. return list[i];
  379. }
  380. n++;
  381. }
  382. },
  383. getArrayValueByKey(list, key){
  384. return list[key];
  385. },
  386. getListData(list, type, value){
  387. if (type == 1){
  388. //输出value数组
  389. var values = [];
  390. for (var i in list){
  391. values.push(list[i]);
  392. }
  393. return values;
  394. }
  395. },
  396. getMemberInfo() {
  397. let md5Sign = md5(
  398. "method=" +"member" + "&timestamp=" + getApp().globalData.globalTimestamp +
  399. "&secret=" + getApp().globalData.secret
  400. );
  401. let url = getApp().globalData.shareUrl +"api/api.php" +
  402. "?method=member&action=info&timestamp=" +
  403. getApp().globalData.globalTimestamp +
  404. "&sign=" +
  405. md5Sign;
  406. uni.request({
  407. url: url,
  408. method: "POST",
  409. header: {
  410. "content-type": "application/x-www-form-urlencoded",
  411. },
  412. data: {
  413. openid: getApp().globalData.open_id,
  414. },
  415. success: (res) => {
  416. if (res.data.code === 200) {
  417. let userInfoObj = res.data.data;
  418. this.userName = userInfoObj.name;
  419. this.dateYear = userInfoObj.jion_year;
  420. this.dateMonth = userInfoObj.jion_month;
  421. this.rankYear = userInfoObj.rank_year;
  422. this.rankMonth = userInfoObj.rank_month;
  423. if (this.rankYear == '0'){
  424. this.rankYear = '';
  425. }
  426. if (this.rankMonth == '0'){
  427. this.rankMonth = '';
  428. }
  429. this.userNation = userInfoObj.nation;
  430. this.userNative = userInfoObj.native;
  431. this.userSex = userInfoObj.sex;
  432. this.rankValue = this.getArrayValueByKey(this.rankArray, userInfoObj.rank);
  433. this.degreeValue = this.getArrayValueByKey(this.degreeArray,userInfoObj.degree);
  434. this.jobDegreeValue = this.getArrayValueByKey(this.degreeArray,userInfoObj.job_degree);
  435. this.jobEducationValue = this.getArrayValueByKey(this.jobEducatioinArray,userInfoObj.job_education_level);
  436. if (this.userSex == '0')
  437. {
  438. this.userSex = '2';
  439. }
  440. if(userInfoObj.birth_day && userInfoObj.birth_day!='0'){
  441. this.userBorn = (userInfoObj.birth_day).substr(0,4) + '-' + (userInfoObj.birth_day).substr(4,2) + '-' + (userInfoObj.birth_day).substr(6);
  442. }
  443. this.educationValue = this.educationObj[userInfoObj.education_level];
  444. this.userOffice = userInfoObj.office;
  445. this.userPosition = userInfoObj.position;
  446. this.userTitle = userInfoObj.technical_title;
  447. if(userInfoObj.pic_url){
  448. userInfoObj.pic_url = getApp().globalData.shareUrl + userInfoObj.pic_url
  449. this.uploadList.push(userInfoObj.pic_url);
  450. }
  451. }
  452. },
  453. fail: () => {
  454. console.log("连接失败");
  455. },
  456. });
  457. },
  458. bindRankChange(e){
  459. this.rankValue = this.getArrayValueByOrder(this.rankArray,e.target.value);
  460. },
  461. bindDateChange(e){
  462. this.dateYear = e.target.value
  463. },
  464. bindRankDateChange(e){
  465. this.rankYear = e.target.value
  466. },
  467. bindDateMonthChange(e){
  468. this.dateMonth = this.arrayMonth[e.target.value]
  469. },
  470. bindRankDateMonthChange(e){
  471. this.rankMonth = this.arrayMonth[e.target.value]
  472. },
  473. change(e) {
  474. console.log('show')
  475. this.userBorn = e;
  476. },
  477. dateMask(param){
  478. console.log(param)
  479. },
  480. showDateModal(){
  481. console.log('show')
  482. },
  483. getImage(type) {
  484. let that = this;
  485. if (that.uploadList.length === 1) {
  486. uni.showToast({
  487. title: "最多上传1张图片",
  488. icon: "none",
  489. duration: 2500,
  490. });
  491. return;
  492. }
  493. uni.chooseImage({
  494. sourceType: [type],
  495. count: 1,
  496. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  497. success: (res) => {
  498. for (let i = 0; i < res.tempFilePaths.length; i++) {
  499. console.log(res.tempFilePaths[i])
  500. that.uploadList.push(res.tempFilePaths[i]);
  501. that.uploadFileRequest(res.tempFilePaths[i]);
  502. }
  503. },
  504. });
  505. },
  506. uploadFileRequest(fileVal) {
  507. uni.showLoading({
  508. title: "上传中",
  509. mask: true,
  510. });
  511. let that = this;
  512. let md5Sign = md5(
  513. "method=" +"member_upload" +"&timestamp=" +
  514. getApp().globalData.globalTimestamp +
  515. "&secret=" + getApp().globalData.secret
  516. );
  517. let url =
  518. getApp().globalData.shareUrl +
  519. "api/api.php" +
  520. "?method=member_upload&timestamp=" +
  521. getApp().globalData.globalTimestamp +
  522. "&sign=" +
  523. md5Sign;
  524. uni.uploadFile({
  525. url: url, //需要设置为全局
  526. filePath: fileVal,
  527. name: "file",
  528. formData: {
  529. file: fileVal,
  530. openid:getApp().globalData.open_id,
  531. },
  532. success: (res) => {
  533. let tmpres = JSON.parse(res.data);
  534. uni.hideLoading();
  535. that.imgIdList.push(tmpres.data.id);
  536. that.headImgId = tmpres.data.id;
  537. },
  538. fail: (res) => {
  539. console.log("上传请求失败");
  540. console.log(res);
  541. },
  542. });
  543. },
  544. delPhoto(idx) {
  545. this.uploadList.splice(idx, 1);
  546. this.imgIdList.splice(idx, 1);
  547. },
  548. showLarge(src) {
  549. uni.previewImage({
  550. urls: [src],
  551. longPressActions: {
  552. itemList: ["发送给朋友", "保存图片"],
  553. success: function (data) {},
  554. fail: function (err) {
  555. console.log(err.errMsg);
  556. },
  557. },
  558. });
  559. },
  560. radioCheck(e){
  561. console.log(e.target.value)
  562. this.userSex = e.target.value;
  563. //this.gender = e.target.value == '0' ? '男' : '女';
  564. },
  565. changeCity(data) {
  566. this.txt = data.data.join('')
  567. console.log(data.data.join(''))
  568. },
  569. bindPickerChange(e,type) {
  570. this.educationValue = this.educationArray[e.target.value]
  571. console.log(this.educationValue)
  572. console.log(this.educationObjEdit[this.educationValue])
  573. },
  574. formSubmit(e) {
  575. //进行表单检查
  576. var formData = e.detail.value;
  577. console.log(formData)
  578. if(!formData.selfName){
  579. uni.showToast({
  580. title:'请填写姓名',
  581. duration:2500,
  582. icon:'none'
  583. })
  584. }else {
  585. this.submitRequest(formData)
  586. }
  587. },
  588. submitRequest(params){
  589. console.log(this.userTitle,this.headImgId)
  590. let md5Sign = md5(
  591. "method=" +"member" + "&timestamp=" + getApp().globalData.globalTimestamp +
  592. "&secret=" + getApp().globalData.secret
  593. );
  594. let url = getApp().globalData.shareUrl +"api/api.php" +
  595. "?method=member&action=info_update&timestamp=" +
  596. getApp().globalData.globalTimestamp +
  597. "&sign=" +
  598. md5Sign;
  599. let ry = this.rankYear;
  600. if (ry == ''){
  601. ry = '0';
  602. }
  603. var rm = this.rankMonth;
  604. if (rm == ''){
  605. rm = '0';
  606. }
  607. uni.request({
  608. url: url,
  609. method: "POST",
  610. header: {
  611. "content-type": "application/x-www-form-urlencoded",
  612. },
  613. data: {
  614. openid: getApp().globalData.open_id,
  615. name:params.selfName,
  616. jion_year :this.dateYear,
  617. jion_month :this.dateMonth,
  618. rank_year :ry,
  619. rank_month :rm,
  620. sex : this.userSex,
  621. birth_day: this.userBorn,
  622. office :params.selfOffice,
  623. position:params.selfPosition,
  624. nation:params.selfNation,
  625. native:params.selfNative,
  626. rank:this.getArrayKeyByValue(this.rankArray,this.rankValue),
  627. degree:this.getArrayKeyByValue(this.degreeArray,this.degreeValue),
  628. job_degree:this.getArrayKeyByValue(this.degreeArray,this.jobDegreeValue),
  629. job_education_level:this.getArrayKeyByValue(this.jobEducatioinArray,this.jobEducationValue),
  630. technical_title:params.selfTitle,
  631. education_level:this.educationObjEdit[this.educationValue],
  632. photo_attach_id:this.headImgId,
  633. },
  634. success: (res) => {
  635. if (res.data.code === 200) {
  636. uni.showToast({
  637. title:'修改成功',
  638. duration:2500,
  639. icon:'none',
  640. })
  641. setTimeout(()=>{uni.navigateBack({delta:1})},500)
  642. }
  643. },
  644. fail: () => {
  645. console.log("连接失败");
  646. },
  647. });
  648. },
  649. }
  650. }
  651. </script>
  652. <style lang="scss" scoped>
  653. .content {
  654. &_list{
  655. display: flex;
  656. flex-direction: row;
  657. align-items: center;
  658. justify-content:space-around;
  659. &_lable{
  660. }
  661. &_content{
  662. flex: 1;
  663. width: auto;
  664. text-align: right;
  665. }
  666. }
  667. }
  668. .content-box {
  669. width: 100%;
  670. /* height: 100%; */
  671. display: flex;
  672. flex-direction: column;
  673. align-items: center;
  674. /* justify-content: center; */
  675. }
  676. .header-box {
  677. width: 85%;
  678. height:80rpx;
  679. border: .5px dotted #00A1B4;
  680. border-radius: 50rpx;
  681. display: flex;
  682. justify-content: center;
  683. align-items: center;
  684. font-size: 24rpx;
  685. color:#00A1B4 ;
  686. /* font-family: PingFangSC-Regular; */
  687. margin-top: 2%;
  688. }
  689. .header-box image {
  690. width: 36rpx;
  691. height: 36rpx;
  692. margin-right: 1%;
  693. }
  694. .self-title-box {
  695. width: 90%;
  696. display: flex;
  697. align-items: center;
  698. font-size: 32rpx;
  699. letter-spacing: 2rpx;
  700. color:#3C3C3C ;
  701. /* font-family: SimHei; */
  702. margin: 4% auto;
  703. font-weight: bold;
  704. height: 50rpx;
  705. line-height: 50rpx;
  706. }
  707. .self-title-box image {
  708. width: 6rpx;
  709. height: 32rpx;
  710. margin-right: 2%;
  711. }
  712. .info-box {
  713. width: 90%;
  714. margin: 3% auto;
  715. display: flex;
  716. align-items: center;
  717. // height: 180rpx;
  718. }
  719. .info-title-box {
  720. width: 20%;
  721. display: flex;
  722. align-items: center;
  723. font-size: 26rpx;
  724. }
  725. .info-title-box image{
  726. width: 15rpx;
  727. height: 15rpx;
  728. margin-right: 2%;
  729. }
  730. .info-value-box {
  731. width: 75%;
  732. }
  733. .info-value-box input {
  734. height: 88rpx;
  735. background: #f7f7f7;
  736. font-size: 28rpx;
  737. padding-left: 4%;
  738. margin: 2% auto;
  739. }
  740. .info-value-box picker {
  741. position: relative;
  742. }
  743. .info-value-box picker image {
  744. position: absolute;
  745. width: 25rpx;
  746. height: 25rpx;
  747. right: 10px;
  748. top: 30rpx;
  749. }
  750. .select-box {
  751. height: 80rpx;
  752. background: #f7f7f7;
  753. font-size: 28rpx;
  754. padding-left: 4%;
  755. margin: 2% auto;
  756. color: #888;
  757. line-height: 88rpx;
  758. }
  759. .info-gender-box {
  760. width: 75%;
  761. font-size: 28rpx;
  762. }
  763. .form-radio {
  764. transform: scale(0.6);
  765. }
  766. .padding-left-2 {
  767. // padding-left: 2%;
  768. }
  769. .margin-right-10 {
  770. margin-right: 10%;
  771. }
  772. .border-line-box {
  773. width: 100%;
  774. height: 20rpx;
  775. background: #f7f7f7;
  776. }
  777. .picker-box{
  778. display: flex;
  779. align-items: center;
  780. justify-content: space-between;
  781. height: 60rpx;
  782. line-height: 60rpx;
  783. background: #f7f7f7;
  784. height: 88rpx;
  785. line-height: 88rpx;
  786. background: #f7f7f7;
  787. font-size: 28rpx;
  788. padding-left: 4%;
  789. }
  790. .uni-input image {
  791. width: 40rpx;
  792. height: 40rpx;
  793. margin-right: 2%;
  794. float: right;
  795. }
  796. .textarea-box {
  797. background: #f7f7f7;
  798. min-height: 120rpx;
  799. font-size: 28rpx;
  800. margin: 5% auto;
  801. padding: 4%;
  802. margin-bottom: 8%;
  803. }
  804. .upload-box {
  805. display: flex;
  806. flex-flow: column;
  807. width: 25%;
  808. background-color: #e0e0e0;
  809. height: 100rpx;
  810. border-radius: 10rpx;
  811. padding-top: 15rpx;
  812. image {
  813. margin-top: 10rpx;
  814. width: 60rpx !important;
  815. height: 60rpx !important;
  816. }
  817. }
  818. .upload-box-photo {
  819. width: 25%;
  820. height: 100rpx;
  821. border-radius: 10rpx;
  822. padding-top: 15rpx;
  823. position: relative;
  824. margin-left: 10rpx;
  825. }
  826. .del-icon {
  827. position: absolute;
  828. right: 0;
  829. width: 30rpx;
  830. height: 30rpx;
  831. }
  832. .update_button {
  833. text-align: center;
  834. display: flex;
  835. flex-wrap: wrap;
  836. }
  837. .picker-class {
  838. border-radius: 10rpx;
  839. padding: 10rpx;
  840. width: 73%;
  841. font-size: 28rpx;
  842. background: #f5f5f5;
  843. }
  844. .picker-class image {
  845. width: 26rpx;
  846. height: 26rpx;
  847. }
  848. .submit-bth {
  849. width: 25%;
  850. font-size: 26rpx;
  851. margin: 0 0 5% 0;
  852. color: #fff;
  853. }
  854. .img-container{
  855. display: flex;
  856. width: 90%;
  857. margin: 3% auto;
  858. font-size: 26rpx;
  859. label {
  860. width: 20%;
  861. }
  862. .note-image-box{
  863. width: 75%;
  864. display: flex;
  865. flex-wrap: wrap;
  866. .note-image-item{
  867. position: relative;
  868. //这两个百分比很关键
  869. width: 33.33%;
  870. height: 0;
  871. padding-top: 33.33%;
  872. box-sizing: border-box;
  873. .close-icon{
  874. display: flex;
  875. justify-content: center;
  876. align-items: center;
  877. position: absolute;
  878. right: 0;
  879. top: 0;
  880. width: 22px;
  881. height: 22px;
  882. border-radius: 50%;
  883. background-color: #d5d5d5;
  884. z-index: 2;
  885. }
  886. .image-box{
  887. display: flex;
  888. justify-content: center;
  889. align-items: center;
  890. position: absolute;
  891. top: 5px;
  892. right: 5px;
  893. bottom: 5px;
  894. left: 5px;
  895. border: 1px #eee solid;
  896. border-radius: 5px;
  897. overflow: hidden;
  898. image{
  899. width: 100%;
  900. height: 100%;
  901. }
  902. }
  903. }
  904. }
  905. }
  906. </style>