async setdefault(item) { uni.showLoading({ title: '加载中' }); try { let params = { id: item.id, consignee: item.consignee, phone: item.phone, province: item.province, city: item.city, district: item.district, street: item.street, addr: item.addr, status: 0, } let res = await shopapp_addr_edit(params); console.log("详情", res); this.showTip(res.msg); } catch (err) { this.showTip(res.data.message || "获取详情失败"); } uni.hideLoading(); let _customized_url = uni.getStorageSync('_customized_url'); uni.navigateTo({ url: _customized_url }) 上面这段代码起什么作用?

async setdefault(item) { uni.showLoading({ title: '加载中' }); try { let params = { id: item.id, consignee: item.consignee, phone: item.phone, province: item.province, city: item.city, district: item.district, street: item.street, addr: item.addr, status: 0, } let res = await shopapp_addr_edit(params); console.log("详情", res); this.showTip(res.msg); } catch (err) { this.showTip(res.data.message || "获取详情失败"); } uni.hideLoading(); let _customized_url = uni.getStorageSync('_customized_url'); uni.navigateTo({ url: _customized_url }) 上面这段代码起什么作用?
用户834492313
2024年01月12日
|
浏览 167

这段代码的作用是将给定的地址信息通过异步请求发送到服务器进行编辑,并在编辑成功后显示提示信息。如果编辑失败,则显示错误信息。最后,隐藏加载中的提示,获取自定义的URL并跳转到该URL。

我要提问
复制内容
分享给好友
AI编程问答网 免责声明:
以上内容除特别注明外均来源于网友提问,AI编程问答网回答,权益归原著者所有;
 
下一篇:证明1+2=3