Skip to content

Commit

Permalink
添加收货地址,区县改为不必填
Browse files Browse the repository at this point in the history
  • Loading branch information
gooking committed May 22, 2017
1 parent 385c852 commit 61b8ca0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pages/address-add/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ Page({
})
return
}
var cityId = commonCityData.cityData[this.data.selProvinceIndex].cityList[this.data.selCityIndex].id;
var districtId;
if (this.data.selDistrict == "请选择"){
wx.showModal({
title: '提示',
content: '请选择地区',
showCancel:false
})
return
districtId = cityId;
} else {
districtId = commonCityData.cityData[this.data.selProvinceIndex].cityList[this.data.selCityIndex].districtList[this.data.selDistrictIndex].id;
}
if (address == ""){
wx.showModal({
Expand Down Expand Up @@ -92,8 +91,8 @@ Page({
token: app.globalData.token,
id: apiAddid,
provinceId: commonCityData.cityData[this.data.selProvinceIndex].id,
cityId:commonCityData.cityData[this.data.selProvinceIndex].cityList[this.data.selCityIndex].id,
districtId:commonCityData.cityData[this.data.selProvinceIndex].cityList[this.data.selCityIndex].districtList[this.data.selDistrictIndex].id,
cityId: cityId,
districtId: districtId,
linkMan:linkMan,
address:address,
mobile:mobile,
Expand Down

0 comments on commit 61b8ca0

Please sign in to comment.