In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This "WeChat Mini Programs how to set wx.chooseimage for synchronization" article, the article example code introduction is very detailed, with a certain reference value, interested friends must refer to, for the "WeChat Mini Programs how to set wx.chooseimage for synchronization", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.
Select a picture from your local album or take a picture with a camera.
OBJECT parameter description:
Parameter type is required to indicate the maximum number of pictures that can be selected by countNumber. Default is 9sizeTypeStringArray No original original image, compressed compressed image. By default, both have sourceTypeStringArray No album to select images from albums, and camera uses camera. If both have successFunction, the list of local file paths returned to the picture will be returned by default. TempFilePathsfailFunction No API calls failed callback function completeFunction No API calls the finished callback function (successful or failed callback function will be executed)
Note: the temporary path of the file can be used normally during the startup of Mini Program. For lasting preservation, you need to call wx.saveFile actively and access it only when Mini Program is started next time.
Success return parameter description:
The parameter type describes the local file path list for the minimum version of the tempFilePathsStringArray picture, the local file list for the tempFilesObjectArray picture, and each item is a File object 1.2.0
The File object is structured as follows:
Field type description pathString local file path sizeNumber local file size in B
Sample code:
Wx.chooseImage ({count: 1, / / default 9 sizeType: ['original',' compressed'], / / you can specify the original image or compressed image. By default, both have sourceType: ['album',' camera'], / / you can specify whether the source is a photo album or a camera, and by default both have success: function (res) {/ / return the local file path list of the selected photo TempFilePath can be used as the src attribute of the img tag to display the picture var tempFilePaths = res.tempFilePaths}}) these are all the contents of the article "how to set wx.chooseimage to synchronization in WeChat Mini Programs". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.