Ajax request issued, the data changed, but did not enter the success function to replace success with complete

Source: Internet
Author: User

$ (function () {
$ (document). On (' Tap ', '. W-location-group. Mui-table-view-cell ', function () {
var bool = $ (this). Find (' Span.location-ico '). attr (' data-id ') = = 1;
var Boolen = $ ('. Write-del span '). Hasclass (' bianji504 ');
if (Boolen) {
$ ('. W-location-group. Mui-badge. Location-ico '). Removeclass (' duigou506 ');
$ (this). Find (' Span.location-ico '). addclass (' duigou506 ');
var Valtoken = json.parse (Localstorage.getitem (' token '));
var Addressid = $ (this). Find (' Span.mui-badge '). attr (' Data-id ');
var urlajax = '/api/address/' +addressid;
$.ajax ({
Url:urlajax,
DataType: ' JSON ',
Async:true,
Type: ' Put ',
headers:{' Accept ': ' Application/json ', ' Authorization ': ' Bearer ' + Valtoken},
complete:function (data) {
if (Data.responsetext = = ' success ') {
Layer.open ({
Content: ' Choose Success '
, Skin: ' msg '
, Time:2//2 seconds after automatic shutdown
});

Localstorage.removeitem (' defalutshopid ');
Localstorage.removeitem (' shopid ');
}
}
});
}

Ajax request issued, the data changed, but did not enter the success function to replace success with complete

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.