Micro letter applet stepped pit

  Recent research in micro letter applet, thinking about their knowledge of computers can help home-made products together. It took a few days to learn the WXML, WXSS, JS (equivalent of HTML, CSS, JS) and in general there is not much difficulty in learning C ++ language on the basis of their own fiddle for two weeks, and finally successfully made out a. In summary these days stepped pit.

  1. We sometimes want to display the contents of the database stored in the interface edge, and read out appears to be empty {{}}, this is your permissions to the database is not set, we need to set the permissions for all users to read only creator can read and write. As shown below, we will be able to access the data, and bearing in mind wx.cloud.database (). Collection ( 'cata'). Statement where the value returned is an array of objects, such as where we have a need to access image field we use res.data [0] .image form.

  2. Access data from other sites, this small program I need real-time information updates the current exchange rate, it used the wx.request this function, the general will have a dedicated website to provide these interfaces, such as weather ah, stocks, exchange these, you As long as he provided according to the format, such as my side wx.request Here is the content of this https://sapi.k780.com/?app=finance.rate&scur=USD&tcur=CNY&appkey=43429&sign=a572cb6be23a6a793e509d4dac6398cd&format=json url parameter ', each sections representing different information, appkey and sign the equivalent of website that provides an interface to each person's authentication information app = finace.rate request on your behalf is the exchange rate, representing the format returns json data format. Finally, the returned data as long as you handle it correctly, provide a general interface specification website uses quite detailed.

  3. I modified the submission of a local newspaper when such a mistake missing files, error: iconPath = image \ cata.png, file not found, the file is actually to find, but not this time before uploading problem, say the path is mostly read online format is wrong, but did not try a few times, and finally remembered updated version of the development tool of the last submitted version and then I rolled back a bit, it really is the problem. (Micro-channel Developer Tools -> Version rollback).

After the encounter continued to add it

 

Guess you like

Origin blog.csdn.net/wujiafei_njgcxy/article/details/94547060