jhwxapp/miniprogram/app.js.mine

71 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//app.js
//全局分享
!function(){
var PageTmp = Page;
Page =function (pageConfig) {
// 设置全局默认分享
pageConfig = Object.assign({
//右上角分享功能
onShareAppMessage () {
return {
title: '智能工地+',//分享标题
path: '/pages/login/login',//分享用户点开后页面
success (res) {
console.log('分享成功!')
}
}
}
},pageConfig);
PageTmp(pageConfig);
};
}();
App({
globalData: {
paramDeptId:'',
//请求地址参数
//reqUrl:"http://192.168.31.126:9981",
//reqUrl:'https://zngdtest.makalu.cc/',
reqUrl:'https://zngd.makalu.cc',
//地图相关参数
scale:'',
initialLon:'',
initialLat:'',
markers:[],
//页面跳转参数
type:'',
value1:'省',
value2:'市/区',
value3:'公司',
projectInfoList:{},
projectId:'',
projectName:'',
},
onLaunch: function () {
if (!wx.cloud) {
console.error('请使用 2.2.3 或以上的基础库以使用云能力')
} else {
wx.cloud.init({
// env 参数说明:
// env 参数决定接下来小程序发起的云开发调用wx.cloud.xxx会默认请求到哪个云环境的资源
// 此处请填入环境 ID, 环境 ID 可打开云控制台查看
// 如不填则使用默认环境(第一个创建的环境)
// env: 'my-env-id',
traceUser: true,
})
}
},
//页面弹窗
toast: function (msg) {
wx.showToast({
title: msg,
icon: 'none',
duration: 2000,
mask: true
});
}
})