charginfo.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. import * as echarts from '../../ec-canvas/echarts';
  2. import * as lf from '../../ec-canvas/echarts-liquidfill';
  3. let log = require('../../utils/log.js');
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. name:'',
  10. address:'',
  11. offlineServicecall:'',
  12. stationTagList:[],
  13. chargprice: '',
  14. serviceprice: '',
  15. chargid: '',
  16. sumprice: '',
  17. fastFree:0,
  18. slowFree:0,
  19. fastSum:0,
  20. slowSum:0,
  21. pagesize:10,
  22. pagenum:1,
  23. ele_pagenum:1,
  24. total:-1,
  25. ele_total:-1,
  26. loadTotal: 0,
  27. dataLoading: false,
  28. ele_dataLoading: false,
  29. finishedLoadTap: 0,
  30. ele_finishedLoadTap: 0,
  31. finishedLoadShowTimes: 0,
  32. ele_finishedLoadShowTimes: 0,
  33. chargList: [],
  34. ele_chargList: [],
  35. seeInfoChargPile:{},
  36. userInfo:{},
  37. chargfeatureList:[],
  38. isLogin: false,
  39. resultTable: [],
  40. // 是否减免停车费
  41. carParkingRate: false,
  42. // 停车时间
  43. parkTime: 0,
  44. activeTab: '0',
  45. scrollTop:0
  46. },
  47. execParking(that,stationId){
  48. wx.request({
  49. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/carParkingRate?stationId=' + stationId,
  50. // data: {
  51. // loginName: userInfo.loginName
  52. // },
  53. method: 'POST',
  54. success: function (res) {
  55. // 是否减免停车费
  56. // carParkingRate: false,
  57. // parkTime: 0,
  58. console.info(res)
  59. let reduceTime = res.data?.reduceTime;
  60. if(!reduceTime){
  61. that.setData({
  62. carParkingRate:false
  63. })
  64. return;
  65. }
  66. that.setData({
  67. carParkingRate:true
  68. })
  69. try{
  70. that.setData({
  71. parkTime: parseFloat((reduceTime/ 3600).toFixed(2))
  72. })
  73. }catch(e){
  74. that.setData({
  75. carParkingRate:false
  76. })
  77. }
  78. },
  79. fail(e) {
  80. console.log("用户数据同步失败");
  81. log.info('[扫码]', '[同步用户数据]', '[fail]', e);
  82. }
  83. });
  84. },
  85. /**
  86. * 生命周期函数--监听页面加载
  87. */
  88. onLoad: function(e) {
  89. let that = this;
  90. let stationTagList = [];
  91. let offlineServicecall ="";
  92. wx.getStorage({
  93. key: 'index_seeInfo_chargpile',
  94. success: function (res) {
  95. console.info(res)
  96. var seeInfoChargPile = res.data;
  97. stationTagList = seeInfoChargPile.stationTagList
  98. offlineServicecall = seeInfoChargPile.offlineServicecall
  99. that.setData({
  100. stationTagList,
  101. offlineServicecall,
  102. })
  103. console.info(stationTagList)
  104. // 异步更新
  105. console.info(seeInfoChargPile.chargStationId)
  106. that.execParking(that,seeInfoChargPile.chargStationId)
  107. let resultTable = seeInfoChargPile.resultList
  108. that.setData({
  109. resultTable
  110. })
  111. that.setData({
  112. resultTable
  113. })
  114. let chargfeatureList;
  115. if(seeInfoChargPile.chargfeatures){
  116. chargfeatureList = seeInfoChargPile.chargfeatures.split(',')
  117. }else{
  118. chargfeatureList = [];
  119. }
  120. seeInfoChargPile.sharpTotalPrice = parseFloat((seeInfoChargPile.sharpChargPrice==null || seeInfoChargPile.sharpServicePrice==null || seeInfoChargPile.sharpChargPrice=='暂无费用' || seeInfoChargPile.sharpServicePrice=='暂无费用')? null:(seeInfoChargPile.sharpChargPrice + seeInfoChargPile.sharpServicePrice).toFixed(6));
  121. seeInfoChargPile.peakTotalPrice = parseFloat((seeInfoChargPile.peakChargPrice==null || seeInfoChargPile.peakServicePrice==null || seeInfoChargPile.peakChargPrice=='暂无费用' || seeInfoChargPile.peakServicePrice=='暂无费用' )? null:(seeInfoChargPile.peakChargPrice + seeInfoChargPile.peakServicePrice).toFixed(6));
  122. seeInfoChargPile.flatTotalPrice = parseFloat((seeInfoChargPile.flatChargPrice==null || seeInfoChargPile.flatServicePrice==null || seeInfoChargPile.flatChargPrice=='暂无费用' || seeInfoChargPile.flatServicePrice=='暂无费用' )? null:(seeInfoChargPile.flatChargPrice + seeInfoChargPile.flatServicePrice).toFixed(6));
  123. seeInfoChargPile.valleyTotalPrice = parseFloat((seeInfoChargPile.valleyChargPrice==null || seeInfoChargPile.valleyServicePrice==null || seeInfoChargPile.valleyChargPrice=='暂无费用' || seeInfoChargPile.valleyServicePrice=='暂无费用' )? null:(seeInfoChargPile.valleyChargPrice + seeInfoChargPile.valleyServicePrice).toFixed(6));
  124. seeInfoChargPile.totalprice = parseFloat((seeInfoChargPile.chargprice==null || seeInfoChargPile.serviceprice==null || seeInfoChargPile.chargprice=='暂无费用' || seeInfoChargPile.serviceprice=='暂无费用')? null:(seeInfoChargPile.chargprice + seeInfoChargPile.serviceprice).toFixed(6));
  125. that.setData({
  126. seeInfoChargPile,
  127. chargfeatureList
  128. });
  129. console.info(seeInfoChargPile)
  130. console.info(chargfeatureList)
  131. wx.removeStorage({
  132. key: 'index_seeInfo_chargpile',
  133. success(res) {
  134. }
  135. });
  136. }
  137. });
  138. let { name, address, chargprice, serviceprice, chargid } = e;
  139. name = name=='null'?null:name;
  140. address = address=='null'?null:address;
  141. // stationTagList = !stationTagList?null:stationTagList;
  142. chargprice = chargprice=='null'?null:chargprice;
  143. serviceprice = serviceprice=='null'?null:serviceprice;
  144. chargid = chargid=='null'?null:chargid;
  145. // let sumprice = (chargprice==null || serviceprice==null)? null:chargprice+serviceprice;
  146. let sumprice = (chargprice==null || serviceprice==null)? null:chargprice+serviceprice;
  147. this.setData({
  148. name,
  149. address,
  150. // stationTagList,
  151. chargprice,
  152. serviceprice,
  153. chargid,
  154. sumprice
  155. });
  156. this.fastAndSlow()
  157. this.ori_getPage();
  158. this.ele_getPage();
  159. },
  160. fastAndSlow(e){
  161. let that = this;
  162. wx.request({
  163. url: getApp().globalData.postHeadAgreement +'/restapi/wechat/fastAndSlow',
  164. data: {
  165. id: that.data.chargid,
  166. ivType: 3,//统计桩和电池
  167. },
  168. method: 'POST',
  169. success(res) {
  170. that.setData({
  171. fastFree : res.data.fastFree,
  172. slowFree : res.data.slowFree,
  173. fastSum : res.data.fastSum,
  174. slowSum : res.data.slowSum
  175. });
  176. }
  177. });
  178. },
  179. previewImage(e){
  180. var that = this,
  181. //获取当前图片的下表
  182. index = e.currentTarget.dataset.index,
  183. //数据源
  184. pictures = this.data.chargfeatureList;
  185. wx.previewImage({
  186. //当前显示下表
  187. current: pictures[index],
  188. //数据源
  189. urls: pictures
  190. })
  191. },
  192. getPage(){
  193. let that = this;
  194. if(that.__data__.activeTab=='0'){
  195. that.ori_getPage();
  196. }else{
  197. that.ele_getPage();
  198. }
  199. },
  200. ori_getPage(){
  201. // ivType
  202. // 是否为无人车充电站(0否;1是)
  203. // 0:桩
  204. // 1:电池
  205. if(this.data.chargList.length == this.data.total){
  206. this.setData({
  207. finishedLoadTap:this.data.finishedLoadTap+1
  208. })
  209. if(this.data.finishedLoadTap>0 && this.data.finishedLoadShowTimes==0){
  210. this.setData({
  211. finishedLoadShowTimes:this.data.finishedLoadShowTimes+1
  212. })
  213. wx.showToast({
  214. title: '全部加载完毕',
  215. icon: 'success',
  216. duration: 2000
  217. })
  218. }
  219. return
  220. }
  221. if(this.data.dataLoading){
  222. return
  223. }
  224. this.setData({
  225. dataLoading: true
  226. })
  227. wx.showLoading({
  228. title: '数据加载中....',
  229. })
  230. let that = this;
  231. // 充电桩
  232. wx.request({
  233. url: getApp().globalData.postHeadAgreement +'/restapi/wechat/chargInfo',
  234. data: {
  235. id: that.data.chargid,
  236. pagenum: this.data.pagenum++,
  237. ivType: 0,
  238. pagesize: 10,
  239. },
  240. method: 'POST',
  241. success(res) {
  242. console.log(res);
  243. let chargList = res.data.chargList.rows;
  244. chargList.forEach(key => {
  245. let chargstatusname = '';
  246. let chargstatusclass = '';
  247. if(key.chargstatus == 2){
  248. chargstatusname='空闲中'
  249. chargstatusclass = 'chargstatus_kxz'
  250. }else if(key.chargstatus == 11){
  251. chargstatusname='已插枪'
  252. chargstatusclass = 'chargstatus_ycq'
  253. }else if(key.chargstatus == 3 || key.chargstatus == 10){
  254. chargstatusname='充电中'
  255. chargstatusclass = 'chargstatus_cdz'
  256. }else if(key.chargstatus == 0){
  257. chargstatusname='离线'
  258. chargstatusclass = 'chargstatus_lx'
  259. }else{
  260. chargstatusname='故障'
  261. chargstatusclass = 'chargstatus_gz'
  262. }
  263. key.chargstatusname = chargstatusname;
  264. key.chargstatusclass = chargstatusclass;
  265. })
  266. console.log(chargList);
  267. // that.rechargeTimeOrder(chargemoneylogs);
  268. wx.hideLoading()
  269. that.setData({
  270. chargList: that.data.chargList.concat(chargList),
  271. total: res.data.total,
  272. dataLoading: false,
  273. fastFree : res.data.fastFree,
  274. slowFree : res.data.slowFree,
  275. fastSum : res.data.fastSum,
  276. slowSum : res.data.slowSum
  277. });
  278. console.log("that.data:",that.data);
  279. }
  280. });
  281. },
  282. ele_getPage(){
  283. // ivType
  284. // 是否为无人车充电站(0否;1是)
  285. // 0:桩
  286. // 1:电池
  287. if(this.data.ele_chargList.length == this.data.ele_total){
  288. this.setData({
  289. ele_finishedLoadTap:this.data.ele_finishedLoadTap+1
  290. })
  291. if(this.data.ele_finishedLoadTap>0 && this.data.ele_finishedLoadShowTimes==0){
  292. this.setData({
  293. ele_finishedLoadShowTimes:this.data.ele_finishedLoadShowTimes+1
  294. })
  295. wx.showToast({
  296. title: '全部加载完毕',
  297. icon: 'success',
  298. duration: 2000
  299. })
  300. }
  301. return
  302. }
  303. if(this.data.ele_dataLoading){
  304. return
  305. }
  306. this.setData({
  307. ele_dataLoading: true
  308. })
  309. wx.showLoading({
  310. title: '数据加载中....',
  311. })
  312. let that = this;
  313. // that.setData({
  314. // pagenum:1
  315. // });
  316. // 充电桩
  317. wx.request({
  318. url: getApp().globalData.postHeadAgreement +'/restapi/wechat/chargInfo',
  319. data: {
  320. id: that.data.chargid,
  321. pagenum: this.data.ele_pagenum++,
  322. ivType: 1,
  323. pagesize: 10,
  324. },
  325. method: 'POST',
  326. success(res) {
  327. console.log(res);
  328. let chargList = res.data.chargList.rows;
  329. chargList.forEach(key => {
  330. let chargstatusname = '';
  331. let chargstatusclass = '';
  332. if(key.chargstatus == 2){
  333. chargstatusname='空闲中'
  334. chargstatusclass = 'chargstatus_kxz'
  335. }else if(key.chargstatus == 11){
  336. chargstatusname='已插枪'
  337. chargstatusclass = 'chargstatus_ycq'
  338. }else if(key.chargstatus == 3 || key.chargstatus == 10){
  339. chargstatusname='充电中'
  340. chargstatusclass = 'chargstatus_cdz'
  341. }else if(key.chargstatus == 0){
  342. chargstatusname='离线'
  343. chargstatusclass = 'chargstatus_lx'
  344. }else{
  345. chargstatusname='故障'
  346. chargstatusclass = 'chargstatus_gz'
  347. }
  348. key.chargstatusname = chargstatusname;
  349. key.chargstatusclass = chargstatusclass;
  350. })
  351. console.log(chargList);
  352. // that.rechargeTimeOrder(chargemoneylogs);
  353. wx.hideLoading()
  354. that.setData({
  355. ele_chargList: that.data.ele_chargList.concat(chargList),
  356. ele_total: res.data.chargList.total,
  357. ele_dataLoading: false,
  358. ele_fastFree : res.data.fastFree,
  359. ele_slowFree : res.data.slowFree,
  360. ele_fastSum : res.data.fastSum,
  361. ele_slowSum : res.data.slowSum
  362. });
  363. console.log("that.setData:",that.data);
  364. }
  365. });
  366. },
  367. refreshPage: function(e) {
  368. wx.showLoading({
  369. title: '数据加载中....',
  370. })
  371. let that = this;
  372. that.setData({
  373. pagenum:1
  374. });
  375. this.getPage()
  376. that.fastAndSlow()
  377. that.setData({
  378. scrollTop: 0
  379. });
  380. wx.hideLoading()
  381. },
  382. goEleCarMap(e){
  383. console.info("呼叫充电车");
  384. let that = this;
  385. wx.setStorageSync('eleCarMapPage', {
  386. chargid: that.data.chargid
  387. })
  388. let url = '/pages/charginfo/eleCarMap';
  389. wx.navigateTo({
  390. url
  391. });
  392. },
  393. goScanResult(e){
  394. // scan_result
  395. console.info('xxxxxxxxxxxxxx')
  396. let {
  397. keywords
  398. } = e.currentTarget.dataset;
  399. let userInfo = wx.getStorageSync('userInfo');
  400. let isLogin = wx.getStorageSync('isLogin');
  401. let chargid = keywords.chargPileId;
  402. let that = this;
  403. if(isLogin && userInfo.bindingPhone==0){
  404. console.info('xxxxxxxxxxxxxx1')
  405. wx.showModal({
  406. title: '提示',
  407. content: '当前账户未绑定手机号,请您进行手机号绑定操作',
  408. showCancel:false,
  409. confirmText: '去绑定',
  410. confirmColor:'#00AADD',
  411. success: function (res1) {
  412. let url = `/pages/bindPhone/bindPhone`;
  413. wx.navigateTo({
  414. url
  415. });
  416. }
  417. });
  418. return;
  419. }
  420. wx.showLoading({
  421. title: '努力加载中...',
  422. })
  423. if (!isLogin) {
  424. console.info('xxxxxxxxxxxxxx2')
  425. log.info('[首页]', '[未登陆跳转登录界面]');
  426. let url = `/pages/login/phone_login/phone_login`;
  427. wx.hideLoading();
  428. wx.navigateTo({
  429. url
  430. });
  431. // return;
  432. } else {
  433. log.info('[首页]', '[获取用户是否有未支付订单]', '[请求]', { userId: userInfo.userId });
  434. wx.request({
  435. url: getApp().globalData.postHeadAgreement + '/restapi/pileLog/wechatsettlement',
  436. data: {
  437. userId: userInfo.userId
  438. },
  439. method: 'POST',
  440. success(res) {
  441. let {
  442. data
  443. } = res;
  444. let {
  445. result: order
  446. } = data;
  447. log.info('[首页]', '[获取用户是否有未支付订单]', '[响应]', data);
  448. if (data && order && data.code == 200) {
  449. wx.hideLoading();
  450. log.info('[首页]', '[用户有未支付订单跳转订单支付界面]');
  451. wx.showModal({
  452. showCancel: false,
  453. content: '你有未支付的订单,请先支付',
  454. confirmColor:'#00AADD',
  455. success: function (res) {
  456. //console.log(res);
  457. if (!res.cancel) {
  458. //点击确定
  459. let url = `/pages/order/order?orderid=${order.orderid}&userId=${order.userId}&chargPileId=${order.chargPileId}`;
  460. wx.navigateTo({
  461. url
  462. });
  463. }
  464. }
  465. });
  466. //console.log(that.data.result);
  467. } else {
  468. //console.log('无订单');
  469. log.info('[首页]', '[用户无未支付订单]');
  470. wx.request({
  471. url: getApp().globalData.postHeadAgreement + '/restapi/wechat/chargPile',
  472. // data: scanResult,
  473. data: {
  474. chargPileId: chargid,
  475. userId: userInfo.userId
  476. },
  477. method: 'POST',
  478. success(res) {
  479. console.log(chargid);
  480. log.info('[首页]', '[获取扫一扫充电桩]', '[响应]', res.data);
  481. if (!res.data || res.data.code == 500) {
  482. that.scanFlag = false;
  483. wx.hideLoading();
  484. //没有该充电桩信息
  485. wx.showModal({
  486. showCancel: false,
  487. confirmColor:'#00AADD',
  488. content: res && res.data && res.data.msg ? res.data.msg :'无效的终端编号'
  489. });
  490. } else {
  491. res.data = res.data.result
  492. //充电状态0:离线、1:故障、2:空闲中、3:充电中、4:欠压故障、5:过压故障、6:过电流故障、8:预约、9:在线升级、10:操作中、11:已插枪等
  493. if (!res.data.chargstatus || res.data.chargstatus == 0 || res.data.chargstatus == 1 || res.data.chargstatus == 4 || res.data.chargstatus == 5 || res.data.chargstatus == 6 || res.data.chargstatus == 9) {
  494. //充电桩故障
  495. wx.showModal({
  496. showCancel: false,
  497. content: '终端故障,维修中',
  498. confirmColor:'#00AADD',
  499. });
  500. } else if (res.data.chargstatus == 3 || res.data.chargstatus == 8 || res.data.chargstatus == 10) {
  501. wx.showModal({
  502. showCancel: false,
  503. content: '正在充电中',
  504. confirmColor:'#00AADD',
  505. });
  506. } else if (res.data.chargstatus == 2 || res.data.chargstatus == 11) {
  507. wx.setStorage({
  508. key: "scan_chargpile",
  509. data: res.data
  510. });
  511. log.info('[首页]', '[扫一扫充电桩空闲跳转去充电界面]');
  512. let url = `/pages/scan_result/scan_result`;
  513. wx.hideLoading();
  514. wx.navigateTo({
  515. url
  516. });
  517. }
  518. wx.hideLoading();
  519. }
  520. },
  521. fail(e) {
  522. getApp().showNetworkError();
  523. }
  524. });
  525. }
  526. },
  527. fail(e) {
  528. that.scanFlag = false;
  529. wx.hideLoading();
  530. getApp().showNetworkError();
  531. }
  532. });
  533. }
  534. },
  535. seeReservation: function(e){
  536. let userInfo = wx.getStorageSync('userInfo');
  537. let isLogin = wx.getStorageSync('isLogin');
  538. let that = this;
  539. if(isLogin && userInfo.bindingPhone==0){
  540. console.info('xxxxxxxxxxxxxx1')
  541. wx.showModal({
  542. title: '提示',
  543. content: '当前账户未绑定手机号,请您进行手机号绑定操作',
  544. showCancel:false,
  545. confirmText: '去绑定',
  546. confirmColor:'#00AADD',
  547. success: function (res1) {
  548. let url = `/pages/bindPhone/bindPhone`;
  549. wx.navigateTo({
  550. url
  551. });
  552. }
  553. });
  554. return;
  555. }
  556. if (!isLogin) {
  557. console.info('xxxxxxxxxxxxxx2')
  558. log.info('[首页]', '[未登陆跳转登录界面]');
  559. let url = `/pages/login/phone_login/phone_login`;
  560. wx.hideLoading();
  561. wx.navigateTo({
  562. url
  563. });
  564. return;
  565. }
  566. let idx = e.currentTarget.dataset.idx;
  567. console.info(idx)
  568. let {
  569. chargStationId,
  570. chargPileName,
  571. chargPileId,
  572. chargStationName,
  573. id
  574. } = idx;
  575. let userId = userInfo.userId;
  576. let url = `/pages/reservation/reservation?chargStationId=` + chargStationId + `&chargPileName=` + chargPileName + `&chargPileId=` + chargPileId + `&chargPileIdId=` + id + "&chargStationName=" + chargStationName + "&userId=" + userId;
  577. wx.navigateTo({
  578. url
  579. });
  580. },
  581. /**
  582. * 生命周期函数--监听页面初次渲染完成
  583. */
  584. onReady: function() {
  585. },
  586. /**
  587. * 生命周期函数--监听页面显示
  588. */
  589. onShow: function(e) {
  590. let userInfo = wx.getStorageSync('userInfo');
  591. let isLogin = wx.getStorageSync('isLogin');
  592. //console.log(userInfo);
  593. // 页面显示
  594. if (userInfo && isLogin) {
  595. //userInfo.flag = true;
  596. this.setData({
  597. userInfo: userInfo,
  598. isLogin: isLogin
  599. });
  600. } else {
  601. //未登录信息
  602. this.setData({
  603. userInfo: {}
  604. });
  605. }
  606. },
  607. chargingLog(e){
  608. let idx = e.currentTarget.dataset.idx;
  609. let chargPileId = idx.chargPileId;
  610. console.info(chargPileId);
  611. let url = '/pages/ucenter/charginglog/opsCharginglog?chargPileId=' + chargPileId
  612. wx.navigateTo({
  613. url
  614. });
  615. return;
  616. },
  617. callphone(){
  618. let that = this
  619. let phonenum = that.data.offlineServicecall;
  620. wx.makePhoneCall({
  621. phoneNumber: that.data.offlineServicecall, //此号码并非真实电话号码,仅用于测试
  622. success:function(){
  623. console.log("拨打电话成功!" + phonenum)
  624. },
  625. fail:function(){
  626. console.log("拨打电话失败!" + phonenum)
  627. }
  628. })
  629. },
  630. toggleTabs(e){
  631. let idx = e.currentTarget.dataset.idx;
  632. this.setData({
  633. activeTab: idx
  634. })
  635. },
  636. /**
  637. * 生命周期函数--监听页面隐藏
  638. */
  639. onHide: function() {
  640. },
  641. /**
  642. * 生命周期函数--监听页面卸载
  643. */
  644. onUnload: function() {
  645. },
  646. bindScrollTolowerEvent: function(){
  647. this.getPage();
  648. console.log("触发滚动");
  649. },
  650. /**
  651. * 页面相关事件处理函数--监听用户下拉动作
  652. */
  653. onPullDownRefresh: function() {
  654. },
  655. /**
  656. * 页面上拉触底事件的处理函数
  657. */
  658. onReachBottom: function() {
  659. },
  660. /**
  661. * 用户点击右上角分享
  662. */
  663. onShareAppMessage: function() {
  664. }
  665. })