You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
//导入leancloud库, 与后台交互
const AV = require ( './lib/av-live-query-weapp-min' ) ;
const login = require ( "./model/user" ) ;
//初始化
AV . init ( {
appId : 'eVHYNBdT5D2lDxNj5jtJXsWT-MdYXbMMI' ,
appKey : 'waM3bwf1ftpsMLjRBqqVyJIQ' ,
} ) ;
// test Appid
// appId: 'fQCxN98zS5thYY3AceKdI8Pj-MdYXbMMI',
// appKey: 'Tdi1DcLlVYrTabFiBaA00pjj',
App ( {
config : {
host : 'wsw1999.xyz'
} ,
onLaunch ( ) {
login ( ) . then ( ( user ) => {
console . log ( user ) ;
console . log ( AV . User . current ( ) ) ;
if ( ! user . get ( "name_setted" ) ) {
wx . navigateTo ( {
url : '../user/user' ,
} ) ;
wx . showToast ( {
title : '请修改你的姓名' ,
duration : 5000 ,
icon : "none"
} )
}
} ) ;
wx . cloud . init ( {
env : 'test-tkkvk'
} )
}
} ) ;