Home > Mobile >  New - "always read a property & # x27; The database & # x27; Undefined,"
New - "always read a property & # x27; The database & # x27; Undefined,"

Time:05-26

New people start to learn the development of small programs, want to invoke tencent provide cloud development database, at the time of a page to load, comfortable database, but has been submitted to the "always read a property 'database of undefined;" And then find the experience of predecessors on the net, say to want to put cloud initialization, and then the cloud plus initialization steps, can be submitted to the init of undefined again, and do what is wrong? Haven't find a solution on the net, post consult,

OnLoad: function () {
Wx. Cloud. Init ({
Env: 'Eric - demo,
TraceUser: true
});
//initialize database
Const db=wx. Cloud. The database ()
},

CodePudding user response:

Find a solution, the records about his own answer, maybe can help to others,

According to the official website of the introduction, there may be compatibility problems, so need to app. Add the following json

"Cloud" : true

CodePudding user response:

This is very useful, thanks for the building

CodePudding user response:

Help you thank you thank you
  • Related