当前位置:网站首页>Wechat applet uploads the data obtained from database 1 to database 2

Wechat applet uploads the data obtained from database 1 to database 2

2022-06-11 05:01:00 CSDN Q & A

From database 1 How to call the data obtained in another function , utilize add Upload to database 2 When data How to define the data just obtained , Please solve your doubts , thank you

img




Take the answer :

stay onload Successfully obtained in the internal call this.addty(res.data);

 onLoad(){  wx.cloud.database().COLlECTION(xuesheng     .get()     THEN(RES =>       console.log( Data request successful ,res)       this.addty(res.data);       this.setDAtA({         lIST: res.data})}     .CATCH(RES =))       console.log( Data request failed ,res)} addty(data) {  wx.cloud.database().collection(zhanshi     addaf       DATA: 2     then(res=>       console.1og( Submit successfully ,res)       WX.showToAst(f         title:          Submit successfully ,     :CATCH(RES=       console.1og( Submit failed ,res)}

原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202231441064838.html