worksheetinfo.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. // pages/worksheetinfo/worksheetinfo.js
  2. let Util = require("../../utils/util");
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. images: [],
  9. signs: [],
  10. worksheetinfo: {},
  11. chargstations: [],
  12. chargstationsindex: 0,
  13. pcitures: [],
  14. workstatus: [{
  15. value: 1,
  16. text: '新建'
  17. }, {
  18. value: 2,
  19. text: '指派人员'
  20. }, {
  21. value: 3,
  22. text: '指派确认'
  23. }, {
  24. value: 4,
  25. text: '施工前安全准备'
  26. }, {
  27. value: 5,
  28. text: '进行中'
  29. }
  30. , {
  31. value: 6,
  32. text: '完成工作内容'
  33. }
  34. ],
  35. workstatusindex: 0,
  36. workstatusFinished: false,
  37. workBigclass: [{
  38. value: 1,
  39. text: '售后服务'
  40. }, {
  41. value: 2,
  42. text: '工程实施'
  43. }],
  44. workBigclassindex: 0,
  45. wokSmallclass:[{
  46. value: 1,
  47. text: '日常巡站'
  48. }, {
  49. value: 2,
  50. text: '紧急维修'
  51. }, {
  52. value: 3,
  53. text: '施工准备'
  54. }, {
  55. value: 4,
  56. text: '工程进程'
  57. }, {
  58. value: 5,
  59. text: '施工过程'
  60. }, {
  61. value: 6,
  62. text: '工程竣工'
  63. }, {
  64. value: 7,
  65. text: '工程验收'
  66. }, {
  67. value: 8,
  68. text: '其他'
  69. }],
  70. wokSmallclassIndex: 1,
  71. breakdownType: [{
  72. value: 1,
  73. text: '车辆导致'
  74. }, {
  75. value: 2,
  76. text: '桩体导致'
  77. }, {
  78. value: 3,
  79. text: '人为导致'
  80. }, {
  81. value: 4,
  82. text: '基础设施问题'
  83. }, {
  84. value: 5,
  85. text: '其他'
  86. }],
  87. breakdownTypeindex: 1,
  88. exceptdate: null,
  89. excepttime: '00:00',
  90. finishdate: null,
  91. finishtime: '00:00',
  92. exceptparams:{
  93. placeholder: '请选择时间',
  94. startDateTime: '2020-01-01 00:00',
  95. endDateTime: '2040-01-01 00:00',
  96. pText: Util.formatTimePicker(new Date()) //'2022-04-30 00:00'
  97. },
  98. finishparams:{
  99. placeholder: '请选择时间',
  100. startDateTime: '2020-01-01 00:00',
  101. endDateTime: '2040-01-01 00:00',
  102. pText: Util.formatTimePicker(new Date()), //'2022-04-30 00:00'
  103. pTextOld: null,
  104. flag: true
  105. },
  106. workEndtimeParams:{
  107. placeholder: '请选择时间',
  108. startDateTime: '2020-01-01 00:00',
  109. endDateTime: '2040-01-01 00:00',
  110. pText: Util.formatTimePicker(new Date()) //'2022-04-30 00:00'
  111. // pText: '0000-00-00 00:00' //'2022-04-30 00:00'
  112. },
  113. accendantids: [],
  114. userNames:[],
  115. chargStationName:'',
  116. chargStationNameClearFlag: false
  117. },
  118. chargStationNameSelect:function(e){
  119. let url = `/pages/worksheetinfo/findstation`;
  120. wx.navigateTo({
  121. url
  122. });
  123. },
  124. bindChargstationsChange: function(e) {
  125. if (this.data.chargstationsindex != e.detail.value) {
  126. //console.log('picker发送选择改变,携带值为', e.detail.value)
  127. let chargstationid = this.data.chargstations[e.detail.value].id;
  128. let worksheetinfo = this.data.worksheetinfo;
  129. worksheetinfo.accendant = null;
  130. worksheetinfo.chargStationId = chargstationid;
  131. this.setData({
  132. chargstationsindex: e.detail.value,
  133. worksheetinfo
  134. })
  135. }
  136. },
  137. bindWorkstatusChange: function(e) {
  138. //console.log('picker发送选择改变,携带值为', e.detail.value)
  139. let workStatus = this.data.workstatus[e.detail.value].value;
  140. let worksheetinfo = this.data.worksheetinfo;
  141. worksheetinfo.workStatus = workStatus;
  142. this.setData({
  143. workstatusindex: e.detail.value,
  144. worksheetinfo
  145. });
  146. if(e.detail.value == 5){
  147. let finishparams = this.data.finishparams
  148. finishparams['pTextOld'] = this.data.finishparams.pText
  149. finishparams['pText'] = Util.formatTimePicker(new Date())
  150. finishparams['flag'] = false
  151. this.setData({
  152. finishparams: finishparams,
  153. });
  154. }
  155. console.log(this.data.finishparams);
  156. if(e.detail.value != 5 && !this.data.finishparams.flag){
  157. let finishparams = this.data.finishparams
  158. finishparams.pText = this.data.finishparams.pTextOld
  159. this.setData({
  160. finishparams: finishparams,
  161. });
  162. }
  163. },
  164. bindWorkBigclassChange: function(e) {
  165. //console.log('picker发送选择改变,携带值为', e.detail.value)
  166. let workBigclass = this.data.workBigclass[e.detail.value].value;
  167. let worksheetinfo = this.data.worksheetinfo;
  168. worksheetinfo.workBigclass = workBigclass;
  169. this.setData({
  170. workBigclassindex: e.detail.value,
  171. worksheetinfo
  172. });
  173. },
  174. bindwokSmallclassChange: function(e) {
  175. //console.log('picker发送选择改变,携带值为', e.detail.value)
  176. let wokSmallclass = this.data.wokSmallclass[e.detail.value].value;
  177. let worksheetinfo = this.data.worksheetinfo;
  178. worksheetinfo.wokSmallclass = wokSmallclass;
  179. this.setData({
  180. wokSmallclassindex: e.detail.value,
  181. worksheetinfo
  182. });
  183. },
  184. bindBreakdownType(e) {
  185. //console.log('picker发送选择改变,携带值为', e.detail.value)
  186. let breakdownType = this.data.breakdownType[e.detail.value].value;
  187. let worksheetinfo = this.data.worksheetinfo;
  188. worksheetinfo.breakdownType = breakdownType;
  189. this.setData({
  190. breakdownTypeindex: e.detail.value,
  191. worksheetinfo
  192. });
  193. },
  194. bindAccendantChange: function(e) {
  195. let chargstationid = this.data.worksheetinfo.chargStationId==null?0:this.data.worksheetinfo.chargStationId;
  196. let accendant = this.data.worksheetinfo.accendant;
  197. let url = `/pages/worksheetinfo/accendant?chargstationid=${chargstationid}&accendant=${accendant}`;
  198. wx.navigateTo({
  199. url
  200. });
  201. },
  202. bindExceptdateChange(e) {
  203. this.setData({
  204. exceptdate: e.detail.value
  205. })
  206. },
  207. bindExcepttimeChange(e) {
  208. this.setData({
  209. excepttime: e.detail.value
  210. })
  211. },
  212. bindFinishdateChange(e) {
  213. this.setData({
  214. finishdate: e.detail.value
  215. })
  216. },
  217. bindFinishtimeChange(e) {
  218. this.setData({
  219. finishtime: e.detail.value
  220. })
  221. },
  222. bindMainLocationInput(e) {
  223. let mainLocation = e.detail.value;
  224. let worksheetinfo = this.data.worksheetinfo;
  225. worksheetinfo.mainLocation = mainLocation;
  226. this.setData({
  227. worksheetinfo
  228. });
  229. },
  230. bindContentInput(e) {
  231. let content = e.detail.value;
  232. let worksheetinfo = this.data.worksheetinfo;
  233. worksheetinfo.content = content;
  234. this.setData({
  235. worksheetinfo
  236. });
  237. },
  238. bindWorkSheetSubmit(e) {
  239. let worksheetinfo = this.data.worksheetinfo;
  240. worksheetinfo.operatorName = this.data.userNames.length>0?this.data.userNames[0]:"";
  241. worksheetinfo.pams = this.data.accendantids;
  242. worksheetinfo.accendant = null;
  243. console.log(this.data.workstatusindex);
  244. console.log("工单状态");
  245. // if (this.data.exceptdate && this.data.excepttime) {
  246. // worksheetinfo.exceptTime = this.data.exceptdate + " " + this.data.excepttime + ":00";
  247. // }
  248. worksheetinfo.exceptTime = this.data.exceptparams.pText + ":00";
  249. // if (this.data.finishdate && this.data.finishtime){
  250. // worksheetinfo.finishTime = this.data.finishdate + " " + this.data.finishtime + ":00";
  251. // }
  252. worksheetinfo.finishTime = this.data.finishparams.pText=='0000-00-00 00:00'?null:this.data.finishparams.pText + ":00";
  253. worksheetinfo.workEndtime = this.data.workEndtimeParams.pText == '0000-00-00 00:00'? null : this.data.workEndtimeParams.pText + ":00";
  254. let images = this.data.images;
  255. var imgString = [];
  256. var pciString = [];
  257. this.data.pcitures.forEach((item, index) =>{
  258. pciString.push(item.src);
  259. });
  260. if(worksheetinfo.mainLocation == '' || worksheetinfo.mainLocation == undefined){
  261. wx.showModal({
  262. showCancel: false,
  263. content: '地址不能为空,请填写!',
  264. confirmColor:'#00AADD',
  265. });
  266. return;
  267. }
  268. if(worksheetinfo.pams.length == 0){
  269. wx.showModal({
  270. showCancel: false,
  271. content: '运维人员不能为空,请填写!',
  272. confirmColor:'#00AADD',
  273. });
  274. return;
  275. }
  276. if(worksheetinfo.content == '' || worksheetinfo.content == undefined){
  277. wx.showModal({
  278. showCancel: false,
  279. content: '工作内容不能为空,请填写!',
  280. confirmColor:'#00AADD',
  281. });
  282. return;
  283. }
  284. if( this.data.finishparams.pText=='0000-00-00 00:00'&& this.data.workstatusindex == 6){
  285. wx.showModal({
  286. showCancel: false,
  287. content: '请填写实际完成时间!',
  288. confirmColor:'#00AADD',
  289. });
  290. return;
  291. }
  292. let signs = this.data.signs;
  293. console.log(signs.length == 0);
  294. var signString = [];
  295. if (signs.length == 0) {
  296. //2021-1-1撤销校验
  297. // wx.showToast({
  298. // title: '请设置签名',
  299. // icon: 'loading',
  300. // duration: 2000,
  301. // mask: true,
  302. // success: function() {}
  303. // });
  304. // return;
  305. } else {
  306. console.info('上传签名')
  307. signs.forEach((item, index) => {
  308. wx.uploadFile({
  309. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/editWorkSheetImg',
  310. filePath: signs[index],
  311. name: 'imageFileName',
  312. success: function(res) {
  313. let result = JSON.parse(res.data);
  314. if (result.code == 500) {
  315. wx.showModal({
  316. showCancel: false,
  317. content: result.msg,
  318. confirmColor:'#00AADD',
  319. });
  320. } else {
  321. signString.push(result.msg);
  322. console.log(signString);
  323. }
  324. }
  325. });
  326. });
  327. }
  328. var uploadSignOverFlag = setInterval(function() {
  329. if (signString.length == signs.length) {
  330. clearInterval(uploadSignOverFlag);
  331. if (images.length == 0) {
  332. if (worksheetinfo.pciture) {
  333. console.log(worksheetinfo.pciture);
  334. worksheetinfo.pciture = (pciString.concat(imgString).concat(signString)).join(",");
  335. //worksheetinfo.pciture = ((worksheetinfo.pciture.split(",")).concat(signString)).join(",");
  336. console.log(worksheetinfo.pciture);
  337. }
  338. wx.request({
  339. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/editWorkSheet',
  340. data: worksheetinfo,
  341. method: 'POST',
  342. success(res) {
  343. //console.log(res);
  344. if (res.data.code == 500) {
  345. wx.showModal({
  346. showCancel: false,
  347. content: res.data.msg,
  348. confirmColor:'#00AADD',
  349. });
  350. } else {
  351. wx.navigateBack();
  352. }
  353. }
  354. });
  355. } else {
  356. images.forEach((item, index) => {
  357. wx.uploadFile({
  358. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/editWorkSheetImg',
  359. filePath: images[index],
  360. name: 'imageFileName',
  361. success: function(res) {
  362. let result = JSON.parse(res.data);
  363. if (result.code == 500) {
  364. wx.showModal({
  365. showCancel: false,
  366. content: result.msg,
  367. confirmColor:'#00AADD',
  368. });
  369. } else {
  370. imgString.push(result.msg);
  371. console.log(imgString);
  372. if (index == (images.length - 1)) {
  373. var uploadImgOverFlag = setInterval(function() {
  374. if (imgString.length == images.length) {
  375. clearInterval(uploadImgOverFlag);
  376. //worksheetinfo.pciture = ((worksheetinfo.pciture.split(",")).concat(signString)).join(",");
  377. worksheetinfo.pciture = (pciString.concat(imgString).concat(signString)).join(",");
  378. //var images = this.data.images.concat(res.tempFilePaths);
  379. wx.request({
  380. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/editWorkSheet',
  381. data: worksheetinfo,
  382. method: 'POST',
  383. success(res) {
  384. //console.log(res);
  385. if (res.data.code == 500) {
  386. wx.showModal({
  387. showCancel: false,
  388. content: res.data.msg,
  389. confirmColor:'#00AADD',
  390. });
  391. } else {
  392. wx.navigateBack();
  393. }
  394. }
  395. });
  396. }
  397. }, 100);
  398. }
  399. }
  400. },
  401. fail: function(data) {
  402. console.log(data);
  403. }
  404. });
  405. });
  406. }
  407. }
  408. }, 100);
  409. },
  410. openImage(e) {
  411. //var that = this;
  412. var imgCount = (9 - this.data.pcitures.length) < 0 ? 0 : 9 - this.data.pcitures.length;
  413. console.log(imgCount);
  414. wx.chooseImage({
  415. count: 9 - (this.data.pcitures.length + this.data.images.length),
  416. //sizeType: ['original', 'compressed'], //可选择原图或压缩后的图片
  417. //sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
  418. success: res => {
  419. //console.log(res);
  420. var images = this.data.images.concat(res.tempFilePaths);
  421. // 限制最多只能留下5张照片
  422. images = images.length <= imgCount ? images : images.slice(0, imgCount);
  423. if (images.length >= imgCount || imgCount<= 0){
  424. wx.showToast({
  425. title: '最多9张图片',
  426. icon:'none'
  427. });
  428. }
  429. this.setData({
  430. //pcitures: [],
  431. images
  432. });
  433. }
  434. });
  435. },
  436. removeImage(e) {
  437. //console.log(e);
  438. //console.log(this.data.images);
  439. let idx = e.currentTarget.dataset.idx;
  440. var images = this.data.images;
  441. images.splice(idx, 1);
  442. this.setData({
  443. images
  444. });
  445. },
  446. removePciture(e) {
  447. //console.log(e);
  448. //console.log(this.data.images);
  449. let idx = e.currentTarget.dataset.idx;
  450. var pcitures = this.data.pcitures;
  451. pcitures.splice(idx, 1);
  452. this.setData({
  453. pcitures
  454. });
  455. },
  456. removeSign(e) {
  457. //console.log(e);
  458. //console.log(this.data.images);
  459. let idx = e.currentTarget.dataset.idx;
  460. var signs = this.data.signs;
  461. signs.splice(idx, 1);
  462. this.setData({
  463. signs
  464. });
  465. },
  466. handlePcituresPreview(e) {
  467. console.info("ddddddddddd")
  468. const idx = e.target.dataset.idx
  469. const pcitures = this.data.pcitures.map(it=>it.url)
  470. console.info(this.data.pcitures)
  471. wx.previewImage({
  472. current: pcitures[idx], //当前预览的图片
  473. urls: pcitures, //所有要预览的图片
  474. })
  475. },
  476. handleImagePreview(e) {
  477. const idx = e.target.dataset.idx
  478. const images = this.data.images
  479. console.info(this.data.images)
  480. wx.previewImage({
  481. current: images[idx], //当前预览的图片
  482. urls: images, //所有要预览的图片
  483. })
  484. },
  485. handleSignPreview(e) {
  486. const idx = e.target.dataset.idx
  487. const signs = this.data.signs
  488. //console.log(idx);
  489. //console.log(signs);
  490. //console.log(signs[idx]);
  491. wx.previewImage({
  492. current: signs[idx], //当前预览的图片
  493. urls: signs, //所有要预览的图片
  494. })
  495. },
  496. clear_chargStationName(e){
  497. let worksheetinfo = this.data.worksheetinfo;
  498. worksheetinfo.chargStationId = null;
  499. worksheetinfo.pams = [];
  500. worksheetinfo.accendant = '';
  501. worksheetinfo.mainLocation = '';
  502. this.setData({
  503. worksheetinfo,
  504. chargStationNameClearFlag: true
  505. });
  506. },
  507. bindworkEndtimeParamsChange(e){
  508. let workEndtimeParams = this.data.workEndtimeParams;
  509. workEndtimeParams.pText = e.detail
  510. this.setData({
  511. workEndtimeParams:workEndtimeParams
  512. })
  513. console.info("workEndtimeParams " + workEndtimeParams.pText)
  514. },
  515. bindFinishparamsChange(e){
  516. let finishparams = this.data.finishparams;
  517. finishparams.pText = e.detail
  518. this.setData({
  519. finishparams:finishparams
  520. })
  521. console.info("finishparams " + finishparams.pText)
  522. },
  523. bindExceptparamsChange(e){
  524. let exceptparams = this.data.exceptparams;
  525. exceptparams.pText = e.detail
  526. this.setData({
  527. exceptparams:exceptparams
  528. })
  529. console.info("exceptparams " + exceptparams.pText)
  530. },
  531. /**
  532. * 生命周期函数--监听页面加载
  533. */
  534. onLoad: function(options) {
  535. //console.log(options);
  536. let {
  537. worksheet
  538. } = options;
  539. //console.log(worksheet);
  540. let worksheetinfo = JSON.parse(worksheet);
  541. //worksheetinfo.breakdownType = 2;
  542. this.setData({
  543. worksheetinfo
  544. });
  545. this.data.workstatus.forEach((item, index) => {
  546. if (item.value == worksheetinfo.workStatus) {
  547. this.setData({
  548. workstatusindex: index
  549. });
  550. }
  551. });
  552. this.data.workBigclass.forEach((item, index) => {
  553. if (item.value == worksheetinfo.workBigclass) {
  554. this.setData({
  555. workBigclassindex: index
  556. });
  557. }
  558. });
  559. this.data.wokSmallclass.forEach((item, index) => {
  560. if (item.value == worksheetinfo.wokSmallclass) {
  561. this.setData({
  562. wokSmallclassindex: index
  563. });
  564. }
  565. });
  566. if (worksheetinfo.exceptTime) {
  567. // let datetime = worksheetinfo.exceptTime.split(" ");
  568. // this.setData({
  569. // exceptdate: datetime[0],
  570. // excepttime: datetime[1].substr(0, 5)
  571. // });
  572. let exceptparams = this.data.exceptparams;
  573. exceptparams['pText'] = worksheetinfo.exceptTime.substr(0,16)
  574. this.setData({
  575. exceptparams: exceptparams
  576. });
  577. }
  578. if (worksheetinfo.workEndtime) {
  579. let workEndtimeParams = this.data.workEndtimeParams;
  580. workEndtimeParams['pText'] = worksheetinfo.workEndtime.substr(0,16)
  581. this.setData({
  582. workEndtimeParams: workEndtimeParams
  583. });
  584. }else{
  585. let workEndtimeParams = this.data.workEndtimeParams;
  586. workEndtimeParams['pText'] = '0000-00-00 00:00'
  587. this.setData({
  588. workEndtimeParams: workEndtimeParams
  589. });
  590. }
  591. if (worksheetinfo.finishTime) {
  592. // let datetime = worksheetinfo.finishTime.split(" ");
  593. // this.setData({
  594. // finishdate: datetime[0],
  595. // finishtime: datetime[1].substr(0, 5)
  596. // });
  597. let finishparams = this.data.finishparams;
  598. finishparams['pText'] = worksheetinfo.finishTime.substr(0,16)
  599. this.setData({
  600. finishparams: finishparams
  601. });
  602. }else{
  603. let finishparams = this.data.finishparams;
  604. finishparams['pText'] = Util.formatTimePicker(new Date())
  605. this.setData({
  606. finishparams: finishparams
  607. });
  608. }
  609. this.data.breakdownType.forEach((item, index) => {
  610. if (item.value == worksheetinfo.breakdownType) {
  611. this.setData({
  612. breakdownTypeindex: index
  613. });
  614. }
  615. });
  616. if (worksheetinfo.pciture) {
  617. let pcitures_src = worksheetinfo.pciture.split(",");
  618. var pcitures = [];
  619. pcitures_src.forEach((item, index) => {
  620. // pcitures[index] = { src: item, flag: item.indexOf('https://cdgl.pjnes.com/profile/station/') != -1};
  621. let url = getApp().globalData.postHeadAgreement
  622. url = url.replace("cloud/chargapi","") + "web/profile/station/" + item
  623. console.info(url)
  624. pcitures[index] = { url:url, src: item, flag: item.indexOf(getApp().globalData.postHeadAgreement) != -1};
  625. });
  626. this.setData({
  627. pcitures
  628. });
  629. }
  630. //console.log(worksheetinfo);
  631. if(worksheetinfo.workStatus==7){
  632. this.setData({
  633. workstatusFinished: true
  634. })
  635. }
  636. let userInfo = wx.getStorageSync('userInfo');
  637. let isLogin = wx.getStorageSync('isLogin');
  638. let that = this;
  639. //console.log(12345);
  640. if (userInfo && isLogin) {
  641. that.setData({
  642. chargStationName:worksheetinfo.chargStationName,
  643. worksheetinfo
  644. });
  645. if(!worksheetinfo.chargStationName){
  646. that.setData({
  647. chargStationNameClearFlag:true,
  648. });
  649. }
  650. }
  651. wx.request({
  652. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/getuserworksheet',
  653. data: worksheetinfo.id,
  654. method: 'POST',
  655. success(res) {
  656. //console.log(res);
  657. let accendantids = [];
  658. let userNames = [];
  659. res.data.forEach((item, index) => {
  660. accendantids.push(item.userId);
  661. userNames.push(item.userName);
  662. });
  663. that.setData({
  664. accendantids,
  665. userNames
  666. });
  667. }
  668. });
  669. },
  670. openSign(e) {
  671. let url = `/pages/sign/sign`;
  672. wx.navigateTo({
  673. url
  674. });
  675. },
  676. /**
  677. * 生命周期函数--监听页面初次渲染完成
  678. */
  679. onReady: function() {
  680. },
  681. /**
  682. * 生命周期函数--监听页面显示
  683. */
  684. onShow: function() {
  685. },
  686. /**
  687. * 生命周期函数--监听页面隐藏
  688. */
  689. onHide: function() {
  690. },
  691. /**
  692. * 生命周期函数--监听页面卸载
  693. */
  694. onUnload: function() {
  695. },
  696. /**
  697. * 页面相关事件处理函数--监听用户下拉动作
  698. */
  699. onPullDownRefresh: function() {
  700. },
  701. /**
  702. * 页面上拉触底事件的处理函数
  703. */
  704. onReachBottom: function() {
  705. },
  706. /**
  707. * 用户点击右上角分享
  708. */
  709. onShareAppMessage: function() {
  710. }
  711. })