Commit 7e693a36 authored by 肖健's avatar 肖健

Merge remote-tracking branch 'origin/dev_cd' into dev_jd

parents 079ff042 dc1c22b0
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
classification: "2" classification: "2"
}).then(res => { }).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let list = res.data.data.rows let list = res.data.data.rows || []
this.boutiqueMallList = [...this.boutiqueMallList, ...list]; this.boutiqueMallList = [...this.boutiqueMallList, ...list];
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)} // 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
classification: "2" classification: "2"
}).then(res => { }).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let list = res.data.data.rows let list = res.data.data.rows || []
this.boutiqueMallList = list; this.boutiqueMallList = list;
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)} // 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
classification: "1" classification: "1"
}).then(res => { }).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.mallList = res.data.data.rows this.mallList = res.data.data.rows || []
} }
}) })
}, },
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
pageNum:this.page pageNum:this.page
}).then(res => { }).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let data = res.data.data.rows; let data = res.data.data.rows || [];
data.forEach(elem=>{ data.forEach(elem=>{
this.boutiqueMallList.push(elem) this.boutiqueMallList.push(elem)
}) })
...@@ -235,8 +235,7 @@ export default { ...@@ -235,8 +235,7 @@ export default {
}; };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let data = [] let data = res.data.data || []
data = res.data.data
let imgList = [] let imgList = []
data.forEach(e => { data.forEach(e => {
imgList.push(e) imgList.push(e)
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.statusCode == 200) { if (res.statusCode == 200) {
uni.hideLoading() uni.hideLoading()
this.carList = res.data this.carList = res.data || []
} }
}) })
}, },
......
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
let opts = { url: '/app/moveLog/apply/list?pageSize='+paging.size+'&pageNum='+paging.page, method: 'get' }; let opts = { url: '/app/moveLog/apply/list?pageSize='+paging.size+'&pageNum='+paging.page, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
list = res.data.rows list = res.data.rows || []
this.items = [...this.items, ...list] this.items = [...this.items, ...list]
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)} // 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
let opts = { url: '/app/moveLog/apply/list?pageSize='+paging.size+'&pageNum='+paging.page, method: 'get' }; let opts = { url: '/app/moveLog/apply/list?pageSize='+paging.size+'&pageNum='+paging.page, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
list = res.data.rows list = res.data.rows || []
this.items = list this.items = list
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)} // 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
let opts = { url: '/app/moveCode/list?carNo=' + this.keyword, method: 'get' }; let opts = { url: '/app/moveCode/list?carNo=' + this.keyword, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.items = res.data.rows this.items = res.data.rows || []
} }
}) })
}, },
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}; };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
list = res.data.rows list = res.data.rows || []
this.items = [...this.items, ...list] this.items = [...this.items, ...list]
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)} // 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
this.$refs.list.loadSuccess({ this.$refs.list.loadSuccess({
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
}; };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
list = res.data.rows list = res.data.rows || []
this.items = [...this.items, ...list] this.items = [...this.items, ...list]
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)} // 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
this.$refs.list.refreshSuccess({ this.$refs.list.refreshSuccess({
......
...@@ -316,6 +316,8 @@ ...@@ -316,6 +316,8 @@
// 2)需要当前地理位置的经纬度 // 2)需要当前地理位置的经纬度
// 3)小程序的key值 // 3)小程序的key值
loadCity(longitude, latitude) { loadCity(longitude, latitude) {
// longitude = 113.740388
// latitude = 22.998617
const that = this const that = this
uni.request({ uni.request({
header: { header: {
...@@ -343,12 +345,17 @@ ...@@ -343,12 +345,17 @@
that.appBo.cityName = '' that.appBo.cityName = ''
} }
//区 //区
if (!Array.isArray(addressInfo.regeocode.addressComponent.district)){
that.appBo.countyName = addressInfo.regeocode.addressComponent.district that.appBo.countyName = addressInfo.regeocode.addressComponent.district
}
//街道 //街道
if (!Array.isArray(addressInfo.regeocode.addressComponent.township)){
that.appBo.township = addressInfo.regeocode.addressComponent.township that.appBo.township = addressInfo.regeocode.addressComponent.township
}
//号数 //号数
if (!Array.isArray(addressInfo.regeocode.addressComponent.streetNumber.number)){
that.appBo.number = addressInfo.regeocode.addressComponent.streetNumber.number that.appBo.number = addressInfo.regeocode.addressComponent.streetNumber.number
}
//console.log("当前位置: " + that.appBo.detailInfo + " " + that.appBo.provinceName + " " + " " + that.appBo.cityName + " " + that.appBo.countyName) //console.log("当前位置: " + that.appBo.detailInfo + " " + that.appBo.provinceName + " " + " " + that.appBo.cityName + " " + that.appBo.countyName)
} }
} else { } else {
......
...@@ -300,7 +300,7 @@ export default { ...@@ -300,7 +300,7 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.statusCode == 200) { if (res.statusCode == 200) {
uni.hideLoading() uni.hideLoading()
this.carList = res.data this.carList = res.data || []
this.selectCar = true this.selectCar = true
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment