代码拉取完成,页面将自动刷新
同步操作将从 羲云网络工作室/羲云租车系统 微信小程序 同城租车或全国性租车管理系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
App({
onLaunch: function () {
var that=this;
this.globalData.view=[];//浏览
this.globalData.view.push({ac:'load',time:(new Date()).getTime()});
wx.showShareMenu({withShareTicket: true,menus: ['shareAppMessage', 'shareTimeline']})
//获取系统信息
wx.getSystemInfo({
success: (res) => {
if(res.system.indexOf('iOS')!=-1){that.globalData.os='iOS';}else{ that.globalData.os='AN'; }//系统
that.globalData.nav_top = res.statusBarHeight;
if(!res.safeArea.top){res.safeArea.top=44;}
that.globalData.safe_top=res.safeArea.top;
that.globalData.safe_bottom=res.screenHeight-res.safeArea.bottom-20;
}
});
//登录信息
var val = wx.getStorageSync('login_info');
if (val) {
var d = JSON.parse(val);
that.globalData.user_id = d.user_id;
that.globalData.session = d.session;
that.globalData.user_info = d;
}
var val = wx.getStorageSync('adm_login');//管理员登录
if (val) {
var d = JSON.parse(val);
that.globalData.adm_id = d.id;
that.globalData.adm_session = d.session;
}
var user_session=wx.getStorageSync('user_session');
if(!user_session){
user_session=Math.ceil((new Date).getTime()/1000);
try {
wx.setStorageSync('user_session', user_session)
} catch (e) { }
}
this.globalData.user_session=user_session;
},
//全局信息
globalData: {
server:"https://www.zjhn.top/car/",
map_key:"SJFBZ-VCPLJ-DUIFY-KTCLP-6N525-OWFYK",
web:"租车",
website:"https://s4.zjhn.top/",
upload:"https://upload.zjhn.top/upload.php",//图片上传服务器
shop_id:145,//门店
app_c:"tuan",
adm:10,//管理
app_id:84,
version:1.17
},
//消息提示
msg:function(t){wx.showToast({ title: t,icon: 'none',duration: 2000 });},
err: function (t) {console.log('消息');
wx.showModal({title: '提示',content: t,})
},onError:function(res){
var app=this.globalData.app;
if(!app){return;}
console.log('应用',app)
if(app.debug!=1){return;}
wx.showModal({title: '错误提示',content:res,});
//是否提交错误
wx.request({
url: this.globalData.server+'server.php',
header:{'content-type':'application/x-www-form-urlencoded'},
method:'POST',
enableHttp2:true,
data:{
ac:'send_err',
adm:this.globalData.adm,
app_id:this.globalData.app_id,
version:this.globalData.version?this.globalData.version:'',
val:res
},success(res){
}
})
},onHide(){//应用关闭时候推送信息
var app=this.globalData.app;
if(!this.globalData.view){return;}
if(!app){return;}
console.log('应用',app)
console.log(this.globalData.view)
wx.request({
url: this.globalData.server+'server.php',
header:{'content-type':'application/x-www-form-urlencoded'},
method:'POST',
enableHttp2:true,
data:{
ac:'app_view',
adm:this.globalData.adm,
app_id:this.globalData.app_id,
shop_id:this.globalData.shop_id,
user_id:this.globalData.user_id?this.globalData.user_id:0,
session:this.globalData.session?this.globalData.session:'',
user_session:this.globalData.user_session?this.globalData.user_session:'',
data:JSON.stringify(this.globalData.view),
},success(res){
console.log(res)
}
})
}
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。