Detailed description of wx. chooseAddress (OBJECT) instance in WeChat applet, chooselocation

Source: Internet
Author: User

Detailed description of wx. chooseAddress (OBJECT) instances in the applet, and chooselocation

1. wx. chooseAddress (OBJECT)

Overview

Call the Native Interface of the user to edit the shipping address, and return the address selected by the user after editing.

OBJECT parameter description

Code Implementation

If (wx. chooseAddress) {wx. chooseAddress ({success: function (res) {console. log (JSON. stringify (res)}, fail: function (err) {console. log (JSON. stringify (err) }})} else {console. log ('current version does not support chooseaddress ');}

Wx. chooseAddress: Native Interface for editing the shipping address

Each entry will have a disclaimer

Add address interface 1

If you do not have an address for the first time, the new address page is displayed.

Add address interface 2

When a saved address exists, the address page is displayed. When you click Finish, "errMsg": "chooseAddress: OK ". When you click return, "errMsg": "chooseAddress: cancel ".

My address Interface

Response parameters

Success response parameters

Success returned results

{"ErrMsg": "chooseAddress: OK", "userName": "Zhang San", "telNumber": "12345678901", "nationalCode": "510630", "postalCode ": "510000", "provinceName": "Guangdong Province", "cityName": "Guangzhou City", "countyName": "Tianhe District", "detailInfo": "A certain Lane "}

Fail returned results

{"errMsg":"chooseAddress:cancel"}

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.