邓洁 : 注释log

This commit is contained in:
邓洁
2023-12-05 10:48:27 +08:00
parent 20f56b5d8d
commit 0612840cdc
27 changed files with 235 additions and 229 deletions

View File

@@ -16,7 +16,8 @@
</view>
<view class="item-border">
<DropDownItem v-show="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop" @getQueryInfo="getQueryInfo"
:type="title[activeIndex]" :activeChoose = "setActiveTag" :key="tablist" ref="dropdownitem" @cancelPageNum="cancelPageNum"/>
:type="title[activeIndex]" :activeChoose="setActiveTag" :key="tablist" ref="dropdownitem"
@cancelPageNum="cancelPageNum" />
</view>
</view>
</template>
@@ -40,8 +41,8 @@
postlist: [
[],
[],
['全部','小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
['全部','面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
['全部', '小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
['全部', '面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
],
queryInfo: {
region: '',
@@ -56,21 +57,21 @@
// 当前选中的面积下拉列表项
currentAreaActive: 0,
// 当前选中的筛选下拉列表项
currentFilterActive: 0,
currentFilterActive: 0,
};
},
computed: {
tablist: function() {
return this.postlist[this.activeIndex]
},
setActiveTag: function(){
if(this.activeIndex == 0){
setActiveTag: function() {
if (this.activeIndex == 0) {
return this.currentClassActive
}else if(this.activeIndex == 1){
} else if (this.activeIndex == 1) {
return this.currentRegionActive
}else if(this.activeIndex == 2){
} else if (this.activeIndex == 2) {
return this.currentAreaActive
}else if(this.activeIndex == 3){
} else if (this.activeIndex == 3) {
return this.currentFilterActive
}
}
@@ -84,8 +85,8 @@
// this.postlist[3].unshift('全部')
},
watch: {
setActiveTag (reset){
setActiveTag(reset) {
}
},
methods: {
@@ -98,29 +99,29 @@
cancelDrop() {
this.activeIndex = -1;
},
cancelPageNum(){
this.$emit('cancelPageNum')
cancelPageNum() {
this.$emit('cancelPageNum')
},
getQueryInfo(querys) {
console.log(querys, 'getquerysinfo');
// console.log(querys, 'getquerysinfo');
// 修改当前选择的各选项卡下标
// 记忆各下拉框数据
if (this.activeIndex === 0) {
this.currentClassActive = querys.business
}else if (this.activeIndex === 1) {
} else if (this.activeIndex === 1) {
this.currentRegionActive = querys.region
}else if (this.activeIndex === 2) {
} else if (this.activeIndex === 2) {
this.currentAreaActive = querys.areatype
}else if (this.activeIndex === 3) {
} else if (this.activeIndex === 3) {
this.currentFilterActive = querys.sortType
}
// 特殊处理行业、区域
if(querys.business){
if (querys.business) {
querys.business = this.tablist[this.currentClassActive]
}
if(querys.region){
if (querys.region) {
querys.region = this.tablist[this.currentRegionActive]
}
@@ -129,11 +130,11 @@
...querys
}
const query = this.$u.queryParams(this.queryInfo)
console.log(querys, 'dropquery');
// console.log(querys, 'dropquery');
this.$emit('getQueryInfo', this.queryInfo)
},
resetInfo(){
console.log("重置了Dropdown");
resetInfo() {
// console.log("重置了Dropdown");
this.queryInfo = {
region: '',
sortType: '',

View File

@@ -44,60 +44,60 @@
this.$emit('cancelDrop');
},
sendQueryInfo() {
console.log(this.queryInfo);
console.log(this.type);
console.log(this.activeIndex);
// console.log(this.queryInfo);
// console.log(this.type);
// console.log(this.activeIndex);
if (this.type === '行业') {
if(this.list[this.activeIndex] == '全部'){
if (this.list[this.activeIndex] == '全部') {
this.queryInfo = {
business: ''
}
}else{
} else {
this.queryInfo = {
business: this.activeIndex
}
}
} else if (this.type === '区域') {
if(this.list[this.activeIndex] == '全区域'){
if (this.list[this.activeIndex] == '全区域') {
this.queryInfo = {
region: ''
}
}else{
} else {
this.queryInfo = {
region: this.activeIndex
}
}
} else if (this.type === '面积') {
if(this.list[this.activeIndex] == '任意面积'){
if (this.list[this.activeIndex] == '任意面积') {
this.queryInfo = {
areatype: ''
}
}else {
} else {
this.queryInfo = {
areatype: this.activeIndex
}
}
} else if (this.type === '筛选') {
if(this.list[this.activeIndex] == '全部'){
if (this.list[this.activeIndex] == '全部') {
this.queryInfo = {
sortType: ''
}
}else{
} else {
this.queryInfo = {
sortType: this.activeIndex
}
}
}
// 发送queryInfo
console.log(this.queryInfo, 'sendqueryInfo');
this.$emit('getQueryInfo', this.queryInfo);
// console.log(this.queryInfo, 'sendqueryInfo');
this.$emit('getQueryInfo', this.queryInfo);
},
resetQueryInfo(){
console.log("重置了DropdownItem");
resetQueryInfo() {
// console.log("重置了DropdownItem");
this.currentClassActive = 0
this.currentRegionActive = 0
this.currentAreaActive = 0
@@ -170,6 +170,7 @@
border-radius: 0px 0px 20px 20px;
height: 320rpx;
overflow-y: auto;
.item {
border-top: 1px solid #EEEEEE;
font-weight: 500;

View File

@@ -78,7 +78,7 @@
},
handleClear(e) {
console.log('handleClear', e);
// console.log('handleClear', e);
},
open() {
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {
@@ -93,7 +93,7 @@
if (res.confirm) {
this.getUserLocation();
} else {
console.log('取消');
// console.log('取消');
return false;
}
}
@@ -113,8 +113,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({
@@ -123,12 +123,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);
@@ -136,12 +136,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) {
@@ -158,7 +158,7 @@
// }
// })
} else {
console.log('取消');
// console.log('取消');
return false;
}
}

View File

@@ -57,7 +57,7 @@
this.$emit('updateItem', searchid)
},
handleDel(shopid) {
console.log("删除了商铺", shopid);
// console.log("删除了商铺", shopid);
this.$emit('delItem', shopid)
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
// TODO不能直接修改

View File

@@ -150,14 +150,14 @@
type: this.shopInfo.type,
search: 1
})
console.log("query", query);
// console.log("query", query);
uni.navigateTo({
url: '/pages/detail/detail' + `${query}`
})
},
handleEdit(searchid) {
// TODO 完成页面跳转
console.log("点击了编辑ID为", searchid);
// console.log("点击了编辑ID为", searchid);
this.$emit('updateItem', searchid)
},
handleDel(searchid) {
@@ -246,6 +246,7 @@
>view {
display: flex;
>view {
display: flex;

View File

@@ -76,7 +76,7 @@
this.$emit('updateItem', shopid)
},
handleDel(shopid) {
console.log("删除了商铺", shopid);
// console.log("删除了商铺", shopid);
this.$emit('delItem', shopid)
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
// TODO不能直接修改
@@ -90,7 +90,7 @@
pageNum: this.pageNum,
...this.customQuery
})
console.log("query", query);
// console.log("query", query);
this.$api.getShopList(query).then(res => {
this.shopInfoList = res.data.data
this.shopInfoList.forEach(item => {

View File

@@ -162,7 +162,7 @@
methods: {
handleEdit(shopid) {
// TODO 完成页面跳转
console.log("点击了编辑ID为", shopid);
// console.log("点击了编辑ID为", shopid);
this.$emit('updateItem', shopid)
},
handleDel(shopid) {
@@ -170,12 +170,12 @@
this.$emit('delItem', shopid)
},
enterDetail() {
console.log("进入详情页面", this.shopInfo.id, this.shopInfo.type);
// console.log("进入详情页面", this.shopInfo.id, this.shopInfo.type);
const query = this.$u.queryParams({
id: this.shopInfo.id,
type: this.shopInfo.type
})
console.log("query", query);
// console.log("query", query);
uni.navigateTo({
url: '/pages/detail/detail' + `${query}`
})