targetInfo.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. import WxValidate from '../../utils/WxValidate.js';
  2. const app = require('../../utils/util.js');
  3. const tool = require('../../utils/tool.js');
  4. Page({
  5. data: {
  6. form: {
  7. ageMin: '',
  8. ageMax: '',
  9. heightMin: '',
  10. heightMax: '',
  11. education: '',
  12. income: '',
  13. nativePlace: '',
  14. marriage: '',
  15. assetHouse: '',
  16. assetHouseArea: '',
  17. assetHouseLoan: '',
  18. assetCar: '',
  19. assetCarValue: '',
  20. assetCarLoan: '',
  21. constellation: '',
  22. workStatus: '',
  23. companyNature: '',
  24. parentAssets: '',
  25. composition: '',
  26. isCommon: '',
  27. id: ''
  28. },
  29. educationArr: [],
  30. incomeArr: [],
  31. nativePlaceArr: ['外地', '本地', '咋的都行'],
  32. marriageArr: ["不行", "行", '咋的都行'],
  33. constellationArr: [],
  34. workStatusArr: [],
  35. assetHouseArr: ['租房', '购房', '咋的都行'],
  36. assetHouseAreaArr: [],
  37. assetHouseLoanArr: ['有', '没有', '咋的都行'],
  38. assetCarArr: ['有', '没有', '咋的都行'],
  39. assetCarValueArr: [],
  40. assetCarLoanArr: ['不行', '行', '咋的都行'],
  41. companyNatureArr: [],
  42. parentAssetsArr: [],
  43. compositionArr: ['老几都行', '必须独苗一根'],
  44. isCommonArr: ['愿意', '不愿意', '咋的都行']
  45. },
  46. ageMinChange(e) {
  47. let ageMin = 'form.ageMin'
  48. this.setData({
  49. [ageMin]: e.detail.value
  50. })
  51. },
  52. ageMaxChange(e) {
  53. let ageMax = 'form.ageMax'
  54. this.setData({
  55. [ageMax]: e.detail.value
  56. })
  57. },
  58. heightMinChange(e) {
  59. let heightMin = 'form.heightMin'
  60. this.setData({
  61. [heightMin]: e.detail.value
  62. })
  63. },
  64. heightMaxChange(e) {
  65. let heightMax = 'form.heightMax'
  66. this.setData({
  67. [heightMax]: e.detail.value
  68. })
  69. },
  70. educationPicker(e) {
  71. let education = 'form.education'
  72. this.setData({
  73. educationLabel: this.data.educationArr[e.detail.value],
  74. [education]: this.data.educationArrValue[e.detail.value]
  75. })
  76. },
  77. incomePicker(e) {
  78. let income = 'form.income'
  79. this.setData({
  80. incomeLabel: this.data.incomeArr[e.detail.value],
  81. [income]: this.data.incomeArrValue[e.detail.value]
  82. })
  83. },
  84. nativePlacePicker(e) {
  85. let nativePlace = 'form.nativePlace';
  86. this.setData({
  87. nativePlaceLabel: this.data.nativePlaceArr[e.detail.value]
  88. })
  89. if (e.detail.value != 2) {
  90. this.setData({
  91. [nativePlace]: e.detail.value
  92. })
  93. }
  94. },
  95. marriageChange(e) {
  96. let marriage = 'form.marriage';
  97. this.setData({
  98. marriageLabel: this.data.marriageArr[e.detail.value]
  99. })
  100. if (e.detail.value != 2) {
  101. this.setData({
  102. [marriage]: e.detail.value
  103. })
  104. }
  105. },
  106. assetHousePickerChange(e) {
  107. let assetHouse = 'form.assetHouse';
  108. this.setData({
  109. assetHouseLabel: this.data.assetHouseArr[e.detail.value]
  110. })
  111. if (e.detail.value != 2) {
  112. this.setData({
  113. [assetHouse]: e.detail.value
  114. })
  115. }
  116. },
  117. assetHouseAreaPickerChange(e) {
  118. let assetHouseArea = 'form.assetHouseArea'
  119. this.setData({
  120. assetHouseAreaLabel: this.data.assetHouseAreaArr[e.detail.value],
  121. [assetHouseArea]: this.data.assetHouseAreaArrValue[e.detail.value]
  122. })
  123. },
  124. assetHouseLoanPickerChange(e) {
  125. let assetHouseLoan = 'form.assetHouseLoan';
  126. this.setData({
  127. assetHouseLoanLabel: this.data.assetHouseLoanArr[e.detail.value]
  128. })
  129. if (e.detail.value != 2) {
  130. this.setData({
  131. [assetHouseLoan]: e.detail.value
  132. })
  133. }
  134. },
  135. assetCarPickerChange(e) {
  136. let assetCar = 'form.assetCar';
  137. this.setData({
  138. assetCarLabel: this.data.assetCarArr[e.detail.value]
  139. })
  140. if (e.detail.value != 2) {
  141. this.setData({
  142. [assetCar]: e.detail.value
  143. })
  144. }
  145. },
  146. assetCarValuePickerChange(e) {
  147. let assetCarValue = 'form.assetCarValue'
  148. this.setData({
  149. assetCarValueLabel: this.data.assetCarValueArr[e.detail.value],
  150. [assetCarValue]: this.data.assetCarValueArrValue[e.detail.value]
  151. })
  152. },
  153. assetCarLoanPickerChange(e) {
  154. let assetCarLoan = 'form.assetCarLoan';
  155. this.setData({
  156. assetCarLoanLabel: this.data.assetCarLoanArr[e.detail.value]
  157. })
  158. if (e.detail.value != 2) {
  159. this.setData({
  160. [assetCarLoan]: e.detail.value
  161. })
  162. }
  163. },
  164. constellationPicker(e) {
  165. console.log(e.detail.value)
  166. const items = this.data.constellationArr;
  167. const values = e.detail.value;
  168. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  169. items[i].checked = false
  170. for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
  171. if (items[i].value === values[j]) {
  172. items[i].checked = true
  173. break
  174. }
  175. }
  176. }
  177. let constellation = 'form.constellation'
  178. this.setData({
  179. constellationArr: this.data.constellationArr,
  180. [constellation]: e.detail.value
  181. })
  182. },
  183. workStatusChange(e) {
  184. console.log(e.detail.value)
  185. const items = this.data.workStatusArr;
  186. const values = e.detail.value;
  187. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  188. items[i].checked = false
  189. for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
  190. if (items[i].value === values[j]) {
  191. items[i].checked = true
  192. break
  193. }
  194. }
  195. }
  196. let workStatus = 'form.workStatus'
  197. this.setData({
  198. workStatusArr: this.data.workStatusArr,
  199. [workStatus]: e.detail.value
  200. })
  201. },
  202. companyNaturePicker: function (e) {
  203. let companyNature = 'form.companyNature'
  204. this.setData({
  205. companyNatureLabel: this.data.companyNatureArr[e.detail.value],
  206. [companyNature]: this.data.companyNatureArrValue[e.detail.value]
  207. })
  208. },
  209. parentAssetsPicker(e) {
  210. let parentAssets = 'form.parentAssets'
  211. this.setData({
  212. parentAssetsLabel: this.data.parentAssetsArr[e.detail.value],
  213. [parentAssets]: this.data.parentAssetsArrValue[e.detail.value]
  214. })
  215. },
  216. compositionPicker(e) {
  217. let composition = 'form.composition'
  218. this.setData({
  219. [composition]: e.detail.value,
  220. compositionLabel: this.data.compositionArr[e.detail.value],
  221. })
  222. },
  223. isCommonPicker(e) {
  224. let isCommon = 'form.isCommon'
  225. this.setData({
  226. [isCommon]: e.detail.value,
  227. isCommonLabel: this.data.isCommonArr[e.detail.value]
  228. })
  229. },
  230. getInfos() {
  231. wx.request({
  232. url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/standard',
  233. method: "get",
  234. success: (res) => {
  235. console.log(res.data.standard, '我是获取的信息')
  236. let ageMin = 'form.ageMin';
  237. let ageMax = 'form.ageMax';
  238. let heightMin = 'form.heightMin';
  239. let heightMax = 'form.heightMax';
  240. let income = 'form.income';
  241. let nativePlace = 'form.nativePlace';
  242. let education = 'form.education';
  243. let marriage = 'form.marriage';
  244. let assetHouse = 'form.assetHouse';
  245. let assetHouseArea = 'form.assetHouseArea';
  246. let assetHouseLoan = 'form.assetHouseLoan';
  247. let assetCar = 'form.assetCar';
  248. let assetCarValue = 'form.assetCarValue';
  249. let assetCarLoan = 'form.assetCarLoan';
  250. let constellation = 'form.constellation';
  251. let workStatus = 'form.workStatus';
  252. let companyNature = 'form.companyNature';
  253. let composition = 'form.composition';
  254. let parentAssets = 'form.parentAssets';
  255. let isCommon = 'form.isCommon';
  256. let id = 'form.id'
  257. if (res.data.standard) {
  258. this.setData({
  259. [ageMin]: res.data.standard.ageMin,
  260. [ageMax]: res.data.standard.ageMax,
  261. [heightMin]: res.data.standard.heightMin,
  262. [heightMax]: res.data.standard.heightMax,
  263. nativePlaceLabel: this.data.nativePlaceArr[res.data.standard.nativePlace],
  264. [nativePlace]: res.data.standard.nativePlace,
  265. marriageLabel: this.data.marriageArr[res.data.standard.marriage],
  266. [marriage]: res.data.standard.marriage,
  267. assetHouseLabel: this.data.assetHouseArr[res.data.standard.assetHouse],
  268. [assetHouse]: res.data.standard.assetHouse,
  269. assetHouseAreaLabel: this.data.assetHouseAreaArr[res.data.standard.assetHouseArea],
  270. [assetHouseArea]: res.data.standard.assetHouseArea,
  271. assetHouseLoanLabel: this.data.assetHouseLoanArr[res.data.standard.assetHouseLoan],
  272. [assetHouseLoan]: res.data.standard.assetHouseLoan,
  273. assetCarLabel: this.data.assetCarArr[res.data.standard.assetCar],
  274. [assetCar]: res.data.standard.assetCar,
  275. assetCarLoanLabel: this.data.assetCarLoanArr[res.data.standard.assetCarLoan],
  276. [assetCarLoan]: res.data.standard.assetCarLoan,
  277. compositionLabel: this.data.compositionArr[res.data.standard.composition],
  278. [composition]: res.data.standard.composition,
  279. isCommonLabel: this.data.isCommonArr[res.data.standard.isCommon],
  280. [isCommon]: res.data.standard.isCommon,
  281. [id]: res.data.standard.id
  282. })
  283. }
  284. tool.formDetails('he_education').then(result => {
  285. console.log(result)
  286. this.setData({
  287. educationArr: ['咋的都行'].concat(result[0]),
  288. educationArrValue: [''].concat(result[1]),
  289. })
  290. if (res.data.standard) {
  291. for (let i = 0; i < [''].concat(result[1]).length; i++) {
  292. if (res.data.standard.education == [''].concat(result[1])[i]) {
  293. this.setData({
  294. educationLabel: ['咋的都行'].concat(result[0])[i],
  295. [education]: res.data.standard.education
  296. })
  297. }
  298. }
  299. }
  300. })
  301. tool.formDetails('he_income').then(result => {
  302. this.setData({
  303. incomeArr: ['咋的都行'].concat(result[0]),
  304. incomeArrValue: [''].concat(result[1])
  305. })
  306. if (res.data.standard) {
  307. for (let i = 0; i < [''].concat(result[1]).length; i++) {
  308. if (res.data.standard.income == [''].concat(result[1])[i]) {
  309. this.setData({
  310. incomeLabel: ['咋的都行'].concat(result[0])[i],
  311. [income]: res.data.standard.income
  312. })
  313. }
  314. }
  315. }
  316. })
  317. tool.formDetails('he_asset_house_area').then(result => {
  318. this.setData({
  319. assetHouseAreaArr: ['咋的都行'].concat(result[0]),
  320. assetHouseAreaArrValue: [''].concat(result[1])
  321. })
  322. if (res.data.standard) {
  323. for (let i = 0; i < [''].concat(result[1]).length; i++) {
  324. if (res.data.standard.assetHouseArea == [''].concat(result[1])[i]) {
  325. this.setData({
  326. assetHouseAreaLabel: ['咋的都行'].concat(result[0])[i],
  327. [assetHouseArea]: res.data.standard.assetHouseArea
  328. })
  329. }
  330. }
  331. }
  332. })
  333. tool.formDetails('he_asset_car_value').then(result => {
  334. this.setData({
  335. assetCarValueArr: ['咋的都行'].concat(result[0]),
  336. assetCarValueArrValue: [''].concat(result[1])
  337. })
  338. if (res.data.standard) {
  339. for (let i = 0; i < [''].concat(result[1]).length; i++) {
  340. if (res.data.standard.assetCarValue == [''].concat(result[1])[i]) {
  341. this.setData({
  342. assetCarValueLabel: ['咋的都行'].concat(result[0])[i],
  343. [assetCarValue]: res.data.standard.assetCarValue
  344. })
  345. }
  346. }
  347. }
  348. })
  349. tool.formDetails('he_astrology').then(result => {
  350. let constellationArr = result[0].map((item, index) => {
  351. return Object.assign({}, {
  352. 'name': item,
  353. 'value': item,
  354. 'checked': false
  355. })
  356. })
  357. console.log(result);
  358. if (res.data.standard) {
  359. let resComposition = res.data.standard.constellation.split(",");
  360. let resCompositionIndexArr = [];
  361. for (let i = 0; i < resComposition.length; i++) {
  362. for (let j = 0; j < result[1].length; j++) {
  363. if (resComposition[i] == result[1][j]) {
  364. resCompositionIndexArr.push(i)
  365. }
  366. }
  367. }
  368. let resCompositionLabel = [];
  369. for (let i = 0; i < resCompositionIndexArr.length; i++) {
  370. resCompositionLabel.push(result[0][resCompositionIndexArr[i]])
  371. }
  372. for (let i = 0; i < resCompositionLabel.length; i++) {
  373. if (resCompositionLabel[i] == constellationArr[i].value) {
  374. constellationArr[i].checked = true;
  375. }
  376. }
  377. this.setData({
  378. [constellation]: resCompositionLabel
  379. })
  380. }
  381. this.setData({
  382. constellationArr: constellationArr,
  383. constellationArrLabel: result[0],
  384. constellationArrValue: result[1],
  385. })
  386. })
  387. tool.formDetails('he_work_status').then(result => {
  388. let workStatusArr = result[0].map((item, index) => {
  389. return Object.assign({}, {
  390. 'name': item,
  391. 'value': item,
  392. 'checked': false
  393. })
  394. })
  395. if (res.data.standard) {
  396. let resWorkStatus = res.data.standard.workStatus.split(",");
  397. let resWorkStatusIndexArr = [];
  398. for (let i = 0; i < resWorkStatus.length; i++) {
  399. for (let j = 0; j < result[1].length; j++) {
  400. if (resWorkStatus[i] == result[1][j]) {
  401. resWorkStatusIndexArr.push(i)
  402. }
  403. }
  404. }
  405. let resWorkStatusLabel = [];
  406. for (let i = 0; i < resWorkStatusIndexArr.length; i++) {
  407. resWorkStatusLabel.push(result[0][resWorkStatusIndexArr[i]])
  408. }
  409. for (let i = 0; i < resWorkStatusLabel.length; i++) {
  410. if (resWorkStatusLabel[i] == workStatusArr[i].value) {
  411. workStatusArr[i].checked = true;
  412. }
  413. }
  414. this.setData({
  415. [workStatus]: resWorkStatusLabel
  416. })
  417. }
  418. this.setData({
  419. workStatusArr: workStatusArr,
  420. workStatusArrLabel: result[0],
  421. workStatusArrValue: result[1],
  422. })
  423. })
  424. tool.formDetails('he_company_nature').then(result => {
  425. this.setData({
  426. companyNatureArr: result[0],
  427. companyNatureArrValue: result[1]
  428. })
  429. if (res.data.standard) {
  430. for (let i = 0; i < [''].concat(result[1]).length; i++) {
  431. if (res.data.standard.companyNature == [''].concat(result[1])[i]) {
  432. this.setData({
  433. companyNatureLabel: ['咋的都行'].concat(result[0])[i],
  434. [companyNature]: res.data.standard.companyNature
  435. })
  436. }
  437. }
  438. }
  439. })
  440. tool.formDetails('he_parent_assets').then(result => {
  441. this.setData({
  442. parentAssetsArr: ['咋的都行'].concat(result[0]),
  443. parentAssetsArrValue: [''].concat(result[1])
  444. })
  445. if (res.data.standard) {
  446. for (let i = 0; i < [''].concat(result[1]).length; i++) {
  447. if (res.data.standard.parentAssets == [''].concat(result[1])[i]) {
  448. this.setData({
  449. parentAssetsLabel: ['咋的都行'].concat(result[0])[i],
  450. [parentAssets]: res.data.standard.parentAssets
  451. })
  452. }
  453. }
  454. }
  455. })
  456. }
  457. })
  458. },
  459. formSubmit(e) {
  460. const params = e.detail.value
  461. //校验表单
  462. // if (!this.WxValidate.checkForm(params)) {
  463. // const error = this.WxValidate.errorList[0]
  464. // this.showModal(error)
  465. // return false
  466. // }
  467. let constellation = 'form.constellation'
  468. let workStatus = 'form.workStatus'
  469. let indexArr = [];
  470. for (let i = 0; i < params.constellation.length; i++) {
  471. indexArr.push(this.data.constellationArrLabel.indexOf(params.constellation[i]))
  472. }
  473. let value = [];
  474. for (let i = 0; i < indexArr.length; i++) {
  475. value.push(this.data.constellationArrValue[indexArr[i]])
  476. }
  477. let str = '';
  478. for (let i = 0; i < value.length; i++) {
  479. str += value[i] + ','
  480. }
  481. let indexArr2 = [];
  482. for (let i = 0; i < params.workStatus.length; i++) {
  483. indexArr2.push(this.data.workStatusArrLabel.indexOf(params.workStatus[i]))
  484. }
  485. let value2 = [];
  486. for (let i = 0; i < indexArr2.length; i++) {
  487. value2.push(this.data.workStatusArrValue[indexArr2[i]])
  488. }
  489. let str2 = '';
  490. for (let i = 0; i < value2.length; i++) {
  491. str2 += value2[i] + ','
  492. }
  493. this.setData({
  494. [constellation]: str.slice(0, str.length - 1),
  495. [workStatus]: str2.slice(0, str2.length - 1)
  496. })
  497. console.log(this.data.form)
  498. wx.request({
  499. url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/standard',
  500. method: "POST",
  501. header: {
  502. 'content-type': 'application/x-www-form-urlencoded',
  503. },
  504. data: this.data.form,
  505. success: (res) => {
  506. console.log(res)
  507. if (res.data.code == 0) {
  508. wx.showModal({
  509. title: '上传成功',
  510. showCancel: false,
  511. success(res) {
  512. if (res.confirm) {
  513. wx.switchTab({
  514. url: '/pages/index/index',
  515. })
  516. }
  517. }
  518. });
  519. }
  520. }
  521. })
  522. },
  523. showModal(error) {
  524. wx.showModal({
  525. content: error.msg,
  526. showCancel: false,
  527. })
  528. },
  529. //验证函数
  530. initValidate() {
  531. const rules = {
  532. ageMin: {
  533. required: true
  534. },
  535. ageMax: {
  536. required: true
  537. },
  538. heightMin: {
  539. required: true
  540. },
  541. heightMax: {
  542. required: true
  543. },
  544. education: {
  545. required: true
  546. },
  547. income: {
  548. required: true
  549. },
  550. nativePlace: {
  551. required: true
  552. },
  553. marriage: {
  554. required: true
  555. },
  556. assetHouse: {
  557. required: true
  558. },
  559. assetHouseArea: {
  560. required: true
  561. },
  562. assetHouseLoan: {
  563. required: true
  564. },
  565. assetCar: {
  566. required: true
  567. },
  568. assetCarValue: {
  569. required: true
  570. },
  571. assetCarLoan: {
  572. required: true
  573. },
  574. constellation: {
  575. required: true
  576. },
  577. workStatus: {
  578. required: true
  579. },
  580. companyNature: {
  581. required: true
  582. },
  583. parentAssets: {
  584. required: true
  585. },
  586. composition: {
  587. required: true
  588. },
  589. isCommon: {
  590. required: true
  591. }
  592. }
  593. const messages = {
  594. ageMin: {
  595. required: '请输入您能接受的最小年纪'
  596. },
  597. ageMax: {
  598. required: '请输入您能接受的最大年纪'
  599. },
  600. heightMin: {
  601. required: '请输入您能接受的最低身高'
  602. },
  603. heightMax: {
  604. required: '请输入您能接受的最高身高'
  605. },
  606. education: {
  607. required: '请输入您能接受的教育程度'
  608. },
  609. income: {
  610. required: '请选择您能接受的收入'
  611. },
  612. nativePlace: {
  613. required: '请选择本地或者外地'
  614. },
  615. marriage: {
  616. required: '请选择您能接受的婚姻状态'
  617. },
  618. assetHouse: {
  619. required: '请选择您可以接受的房子状态'
  620. },
  621. assetHouseArea: {
  622. required: '请选择您可以接受的房子面积'
  623. },
  624. assetHouseLoan: {
  625. required: '请选择您可以接受的房子是否有贷款'
  626. },
  627. assetCar: {
  628. required: '请选择您可以接受的车子状态'
  629. },
  630. assetCarValue: {
  631. required: '请选择您可以接受的车子价值'
  632. },
  633. assetCarLoan: {
  634. required: '请选择您是否可以接受的车子有贷款'
  635. },
  636. constellation: {
  637. required: '请选择您的优先选择星座'
  638. },
  639. workStatus: {
  640. required: '请选择您能接受的工作状态'
  641. },
  642. companyNature: {
  643. required: '请选择您能接受的单位性质'
  644. },
  645. parentAssets: {
  646. required: '请选择您能接受的父母状态'
  647. },
  648. composition: {
  649. required: '请选择您可以接受的家庭构成'
  650. },
  651. isCommon: {
  652. required: '请选择您是否接受与父母同住'
  653. }
  654. }
  655. this.WxValidate = new WxValidate(rules, messages)
  656. },
  657. async onLoad(options) {
  658. this.initValidate()
  659. tool.openidStatus().then(result => {
  660. this.setData({
  661. openid: result[0],
  662. sessionkey: result[1]
  663. })
  664. // this.getForm();
  665. this.getInfos();
  666. })
  667. },
  668. /**
  669. * 生命周期函数--监听页面初次渲染完成
  670. */
  671. onReady: function () {
  672. },
  673. /**
  674. * 生命周期函数--监听页面显示
  675. */
  676. onShow: function () {
  677. },
  678. /**
  679. * 生命周期函数--监听页面隐藏
  680. */
  681. onHide: function () {
  682. },
  683. /**
  684. * 生命周期函数--监听页面卸载
  685. */
  686. onUnload: function () {
  687. },
  688. /**
  689. * 页面相关事件处理函数--监听用户下拉动作
  690. */
  691. onPullDownRefresh: function () {
  692. },
  693. /**
  694. * 页面上拉触底事件的处理函数
  695. */
  696. onReachBottom: function () {
  697. },
  698. /**
  699. * 用户点击右上角分享
  700. */
  701. onShareAppMessage: function () {
  702. }
  703. })