12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- const app=getApp(),utils=require("../../../utils/http");
- var stoptime=0;
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- url:'',
- share_user_id:'',
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- // ?token='+app.globalData.token
- this.setData({
- share_user_id:options.share_user_id,
- url: app.globalData.webUrl + 'applet.html#/figureprice?share_user_id=' + options.share_user_id + '&token=' + app.globalData.token + '&client_type=' + app.globalData.clientype,
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- stoptime=0;
- setTimeout(function(){
- stoptime=stoptime*1+1;
- },1000)
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- var timearr=app.globalData.timearr,flag=false;
- for(var i=0;i<timearr.length;i++){
- if(timearr[i].type=='figureprice'){
- timearr[i].time=timearr[i].time*1+stoptime*1;
- flag=true;
- }
- }
- if(!flag){
- var obj={
- type:'figureprice',
- time:stoptime
- };
- app.globalData.timearr.push(obj);
- }else{
- app.globalData.timearr=timearr;
- }
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- // onShareAppMessage: function () {
- // return {
- // title: '我是'+app.globalData.sharename+",这是我的个人微网。",
- // imageUrl:"../../../img/weiw.png",
- // path: '/pages/microgrid/microgrid?share_user_id='+this.data.share_user_id+"&sharename="+app.globalData.sharename
- // }
- // }
- })
|