提交 d2c694b9 编写于 作者: api工厂's avatar api工厂

添加收货地址支持没省份的情况

上级 eb44da87
module.exports = {
version: '10.2.2',
note: '添加收货地址增加智能识别、下单增加积分抵扣选择', // 这个为版本描述,无需修改
version: '10.2.3',
note: '添加收货地址支持没省份的情况', // 这个为版本描述,无需修改
subDomain: 'tz', // 此处改成你自己的专属域名。什么是专属域名?请看教程 https://www.it120.cc/help/qr6l4m.html
sdkAppID: 1400450467, // 腾讯实时音视频应用编号,请看教程 https://www.it120.cc/help/nxoqsl.html
}
\ No newline at end of file
......@@ -204,6 +204,7 @@ Page({
}
},
async onLoad(e) {
// this.initFromClipboard('广州市天河区天河东路6号粤电广场北塔2302,徐小姐,18588998859')
const _this = this
if (e.id) { // 修改初始化数据库数据
const res = await WXAPI.addressDetail(wx.getStorageSync('token'), e.id)
......
......@@ -143,6 +143,7 @@ async function smatrAddress(event) {
matchCity.push({
city: res.name,
cityCode: res.id,
pid: res.pid,
matchValue: matchAddress,
province: smartObj.province,
provinceCode: smartObj.provinceCode
......@@ -206,10 +207,13 @@ async function smatrAddress(event) {
smartObj.cityCode = city.cityCode;
// smartObj.county = city.county;
// smartObj.countyCode = city.countyCode;
// if (!smartObj.province) {
// smartObj.province = city.province;
// smartObj.provinceCode = city.provinceCode;
// }
if (!smartObj.province) {
const _province = provinceList.find(ele => {
return ele.id == city.pid
})
smartObj.province = _province.name;
smartObj.provinceCode = city.pid;
}
address = address.replace(city.matchValue, "");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册