邓洁 : 注释log
This commit is contained in:
@@ -99,10 +99,10 @@
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
success: function() {
|
||||
console.log('拨打电话成功');
|
||||
// console.log('拨打电话成功');
|
||||
},
|
||||
fail() {
|
||||
console.log('打电话失败了');
|
||||
// console.log('打电话失败了');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
this.$api.getSuccList().then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||
console.log(this.shopInfoList);
|
||||
// console.log(this.shopInfoList);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
this.keyword = ''
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
console.log("触底加载");
|
||||
// console.log("触底加载");
|
||||
} else if (this.shopListLength == 0) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
},
|
||||
methods: {
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
// console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
@@ -104,12 +104,12 @@
|
||||
} else {
|
||||
query = this.getQueryInfo(q)
|
||||
}
|
||||
console.log("listquery", query);
|
||||
// console.log("listquery", query);
|
||||
this.$api.getShopList(query).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||
.includes('region') || this.refresh) {
|
||||
console.log('筛选');
|
||||
// console.log('筛选');
|
||||
// this.resetQuery(q)
|
||||
this.shopInfoList = res.data.data
|
||||
this.refresh = false
|
||||
@@ -119,15 +119,15 @@
|
||||
this.showNull = false
|
||||
}
|
||||
} else {
|
||||
console.log('查询');
|
||||
// console.log('查询');
|
||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
console.log(this.shopInfoList);
|
||||
// console.log(this.shopInfoList);
|
||||
})
|
||||
},
|
||||
getQueryInfo(query) {
|
||||
console.log("getQueryInfo", query);
|
||||
// console.log("getQueryInfo", query);
|
||||
const q = this.$u.queryParams({
|
||||
type: 3,
|
||||
pageSize: this.pageSize,
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
this.keyword = ''
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
console.log("触底加载");
|
||||
// console.log("触底加载");
|
||||
} else if (this.searchListLength == 0) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
},
|
||||
methods: {
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
// console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
@@ -104,7 +104,7 @@
|
||||
} else {
|
||||
query = this.getQueryInfo(q)
|
||||
}
|
||||
console.log("listquery", query);
|
||||
// console.log("listquery", query);
|
||||
this.$api.getShopList(query).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||
@@ -123,11 +123,11 @@
|
||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
console.log(this.shopInfoList);
|
||||
// console.log(this.shopInfoList);
|
||||
})
|
||||
},
|
||||
getQueryInfo(query) {
|
||||
console.log("getQueryInfo", query);
|
||||
// console.log("getQueryInfo", query);
|
||||
const q = this.$u.queryParams({
|
||||
type: 4,
|
||||
pageSize: this.pageSize,
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
},
|
||||
methods: {
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
// console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
@@ -103,7 +103,7 @@
|
||||
} else {
|
||||
query = this.getQueryInfo(q)
|
||||
}
|
||||
console.log("listquery", query);
|
||||
// console.log("listquery", query);
|
||||
this.$api.getShopList(query).then(res => {
|
||||
this.searchListLength = res.data.data.length
|
||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||
@@ -122,11 +122,11 @@
|
||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
console.log(this.searchInfoList);
|
||||
// console.log(this.searchInfoList);
|
||||
})
|
||||
},
|
||||
getQueryInfo(query) {
|
||||
console.log("getQueryInfo", query);
|
||||
// console.log("getQueryInfo", query);
|
||||
const q = this.$u.queryParams({
|
||||
type: 2,
|
||||
pageSize: this.pageSize,
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
},
|
||||
methods: {
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
// console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
@@ -103,7 +103,7 @@
|
||||
} else {
|
||||
query = this.getQueryInfo(q)
|
||||
}
|
||||
console.log("listquery", query);
|
||||
// console.log("listquery", query);
|
||||
this.$api.getShopList(query).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||
@@ -121,12 +121,12 @@
|
||||
console.log('查询');
|
||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||
}
|
||||
console.log(this.shopInfoList);
|
||||
// console.log(this.shopInfoList);
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
getQueryInfo(query) {
|
||||
console.log("getQueryInfo", query);
|
||||
// console.log("getQueryInfo", query);
|
||||
const q = this.$u.queryParams({
|
||||
type: 1,
|
||||
pageSize: this.pageSize,
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
if (res.confirm) {
|
||||
this.getUserLocation();
|
||||
} else {
|
||||
console.log('取消');
|
||||
// console.log('取消');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@
|
||||
this.shopSearchListLength = res.data.data.length
|
||||
// 用于触底刷新 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
|
||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||
console.log(this.searchInfoList);
|
||||
// console.log(this.searchInfoList);
|
||||
})
|
||||
},
|
||||
getClassList() {
|
||||
@@ -166,7 +166,7 @@
|
||||
uni.setStorageSync('regionList', JSON.stringify(res.data.result[0].map(item => item.fullname)));
|
||||
},
|
||||
fail(err) {
|
||||
console.log('请求区域失败:', err);
|
||||
// console.log('请求区域失败:', err);
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -178,8 +178,8 @@
|
||||
uni.getFuzzyLocation({
|
||||
type: 'wgs84',
|
||||
success(res) {
|
||||
console.log('res.latitude', res.latitude);
|
||||
console.log('res.longitude', res.longitude);
|
||||
// console.log('res.latitude', res.latitude);
|
||||
// console.log('res.longitude', res.longitude);
|
||||
uni.setStorageSync('latitude', res.latitude);
|
||||
uni.setStorageSync('longitude', res.longitude);
|
||||
qqmapsdk.reverseGeocoder({
|
||||
@@ -188,12 +188,12 @@
|
||||
longitude: res.longitude
|
||||
},
|
||||
success: (re) => {
|
||||
console.log("解析地址成功", re);
|
||||
console.log(re.result.ad_info.city);
|
||||
console.log(re.result.ad_info.district);
|
||||
// console.log("解析地址成功", re);
|
||||
// console.log(re.result.ad_info.city);
|
||||
// console.log(re.result.ad_info.district);
|
||||
let city = re.result.ad_info.city
|
||||
let district = re.result.ad_info.district
|
||||
console.log('city-code', re.result.ad_info.city_code.substring(3));
|
||||
// console.log('city-code', re.result.ad_info.city_code.substring(3));
|
||||
uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3));
|
||||
uni.setStorageSync('city', city.slice(0, 2));
|
||||
uni.setStorageSync('district', district);
|
||||
@@ -201,12 +201,12 @@
|
||||
// that.position = city.slice(0, 2) + district.slice(0, 2)
|
||||
},
|
||||
fail: (re) => {
|
||||
console.log(re, '失败信息');
|
||||
// console.log(re, '失败信息');
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.log("获取经纬度失败", err);
|
||||
// console.log("获取经纬度失败", err);
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||
@@ -223,7 +223,7 @@
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
console.log('取消');
|
||||
// console.log('取消');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,7 @@
|
||||
uni.getSetting({
|
||||
success: function(res) {
|
||||
if (res.authSetting['scope.userFuzzyLocation']) {
|
||||
console.log('用户已经授权定位权限');
|
||||
// console.log('用户已经授权定位权限');
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||
@@ -259,7 +259,7 @@
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
console.log('取消');
|
||||
// console.log('取消');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -271,12 +271,12 @@
|
||||
})
|
||||
// that.getUserLocation()
|
||||
} else {
|
||||
console.log('用户未授权定位权限');
|
||||
// console.log('用户未授权定位权限');
|
||||
uni.authorize({
|
||||
scope: 'scope.userFuzzyLocation',
|
||||
success: function() {
|
||||
this.isAuth = true
|
||||
console.log('授权成功');
|
||||
// console.log('授权成功');
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||
@@ -298,7 +298,7 @@
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
console.log('取消');
|
||||
// console.log('取消');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -310,7 +310,7 @@
|
||||
})
|
||||
},
|
||||
fail: function() {
|
||||
console.log('授权失败');
|
||||
// console.log('授权失败');
|
||||
uni.showModal({
|
||||
content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启',
|
||||
confirmText: "确认",
|
||||
@@ -319,12 +319,12 @@
|
||||
if (res.confirm) {
|
||||
uni.openSetting({
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
that.getUserLocation();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('取消');
|
||||
// console.log('取消');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,11 +129,11 @@
|
||||
zoomOnClick: true,
|
||||
gridSize: 60,
|
||||
complete(res) {
|
||||
console.log('initMarkerCluster', res)
|
||||
// console.log('initMarkerCluster', res)
|
||||
}
|
||||
});
|
||||
this._mapContext.on("markerClusterCreate", (e) => {
|
||||
console.log("markerClusterCreate", e);
|
||||
// console.log("markerClusterCreate", e);
|
||||
});
|
||||
//定时监听地图缩放
|
||||
setInterval(() => {
|
||||
@@ -147,7 +147,7 @@
|
||||
},
|
||||
watch: {
|
||||
scale(newVal, oldVal) {
|
||||
console.log('thisscale', newVal, Math.round(newVal));
|
||||
// console.log('thisscale', newVal, Math.round(newVal));
|
||||
this.showShop = false
|
||||
let ra = ''
|
||||
this.scaleM.forEach(item => {
|
||||
@@ -172,7 +172,7 @@
|
||||
methods: {
|
||||
getDetail(type, id) {
|
||||
this.$api.getShopDetail(type, id).then(res => {
|
||||
console.log('详情', res);
|
||||
// console.log('详情', res);
|
||||
const data = res.data.data
|
||||
if (res.data.code == 1) {
|
||||
this.shopList = {
|
||||
@@ -183,24 +183,24 @@
|
||||
})
|
||||
},
|
||||
handleRegionChange(e) {
|
||||
console.log('地图缩放层级变化, 只能监听拖拽, 不能监听缩放', e);
|
||||
// console.log('地图缩放层级变化, 只能监听拖拽, 不能监听缩放', e);
|
||||
},
|
||||
getMapList(radius) {
|
||||
console.log('longitude', uni.getStorageSync('longitude'));
|
||||
console.log('latitude', uni.getStorageSync('latitude'));
|
||||
// console.log('longitude', uni.getStorageSync('longitude'));
|
||||
// console.log('latitude', uni.getStorageSync('latitude'));
|
||||
const realData = {
|
||||
longitude: uni.getStorageSync('longitude'),
|
||||
latitude: uni.getStorageSync('latitude'),
|
||||
radius: radius * 1000
|
||||
}
|
||||
console.log('realData.radius', realData.radius);
|
||||
// console.log('realData.radius', realData.radius);
|
||||
const mockData = {
|
||||
longitude: 23.40,
|
||||
latitude: 116.38,
|
||||
radius: 1111111111
|
||||
}
|
||||
this.$api.getMap(realData).then(res => {
|
||||
console.log('getMap', res);
|
||||
// console.log('getMap', res);
|
||||
let obj = {}
|
||||
let arr = []
|
||||
if (res.data.code == 1) {
|
||||
@@ -229,13 +229,13 @@
|
||||
},
|
||||
...arr,
|
||||
]
|
||||
console.log('this.marker', this.marker);
|
||||
// console.log('this.marker', this.marker);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 图标点击
|
||||
markerClick(e) {
|
||||
console.log('标记点击', e);
|
||||
// console.log('标记点击', e);
|
||||
this.showShop = true
|
||||
let markerId = e.markerId; //点击标记点, 获取id, 查询店铺详情, 展示在下方
|
||||
this.getDetail(1, markerId)
|
||||
|
||||
Reference in New Issue
Block a user