1 回复
bmob我正在学,大神有空多上线啊!
//app.js
import Touches from
'./utils/Touches.js'
var
Bmob = require(
"utils/bmob.js"
);
var
common = require(
"utils/common.js"
);
const __utils = require(
'utils/util'
)
Bmob.initialize(
"dfe5345f6c26953b967f0a3882709df8"
,
"67edd99275755ff8676d67aed0fb121a"
);
App({
version:
'v2.2.4'
,
//版本号
onLaunch:
function
() {
var
that =
this
;
//调用系统API获取设备的信息
wx.getSystemInfo({
success:
function
(res) {
var
kScreenW = res.windowWidth / 375
var
kScreenH = res.windowHeight / 603
wx.setStorageSync(
'kScreenW'
, kScreenW)
wx.setStorageSync(
'kScreenH'
, kScreenH)
}
})
//调用API从本地缓存中获取数据
try
{
var
value = wx.getStorageSync(
'user_openid'
)
if
(value) {
}
else
{
console.log(
'执行login1'
)
wx.login({
success:
function
(res) {
if
(res.code) {
console.log(
'执行login2'
, res);
}
}
});
bmob实现对接的代码,可以讲解一下吗?