Merge pull request '邓洁 : 注释log' (#122) from dj into master
Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/122
This commit is contained in:
@@ -16,7 +16,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item-border">
|
<view class="item-border">
|
||||||
<DropDownItem v-show="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop" @getQueryInfo="getQueryInfo"
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -40,8 +41,8 @@
|
|||||||
postlist: [
|
postlist: [
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
['全部','小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
|
['全部', '小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
|
||||||
['全部','面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
|
['全部', '面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
|
||||||
],
|
],
|
||||||
queryInfo: {
|
queryInfo: {
|
||||||
region: '',
|
region: '',
|
||||||
@@ -63,14 +64,14 @@
|
|||||||
tablist: function() {
|
tablist: function() {
|
||||||
return this.postlist[this.activeIndex]
|
return this.postlist[this.activeIndex]
|
||||||
},
|
},
|
||||||
setActiveTag: function(){
|
setActiveTag: function() {
|
||||||
if(this.activeIndex == 0){
|
if (this.activeIndex == 0) {
|
||||||
return this.currentClassActive
|
return this.currentClassActive
|
||||||
}else if(this.activeIndex == 1){
|
} else if (this.activeIndex == 1) {
|
||||||
return this.currentRegionActive
|
return this.currentRegionActive
|
||||||
}else if(this.activeIndex == 2){
|
} else if (this.activeIndex == 2) {
|
||||||
return this.currentAreaActive
|
return this.currentAreaActive
|
||||||
}else if(this.activeIndex == 3){
|
} else if (this.activeIndex == 3) {
|
||||||
return this.currentFilterActive
|
return this.currentFilterActive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
// this.postlist[3].unshift('全部')
|
// this.postlist[3].unshift('全部')
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
setActiveTag (reset){
|
setActiveTag(reset) {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -98,29 +99,29 @@
|
|||||||
cancelDrop() {
|
cancelDrop() {
|
||||||
this.activeIndex = -1;
|
this.activeIndex = -1;
|
||||||
},
|
},
|
||||||
cancelPageNum(){
|
cancelPageNum() {
|
||||||
this.$emit('cancelPageNum')
|
this.$emit('cancelPageNum')
|
||||||
},
|
},
|
||||||
getQueryInfo(querys) {
|
getQueryInfo(querys) {
|
||||||
|
|
||||||
console.log(querys, 'getquerysinfo');
|
// console.log(querys, 'getquerysinfo');
|
||||||
// 修改当前选择的各选项卡下标
|
// 修改当前选择的各选项卡下标
|
||||||
// 记忆各下拉框数据
|
// 记忆各下拉框数据
|
||||||
|
|
||||||
if (this.activeIndex === 0) {
|
if (this.activeIndex === 0) {
|
||||||
this.currentClassActive = querys.business
|
this.currentClassActive = querys.business
|
||||||
}else if (this.activeIndex === 1) {
|
} else if (this.activeIndex === 1) {
|
||||||
this.currentRegionActive = querys.region
|
this.currentRegionActive = querys.region
|
||||||
}else if (this.activeIndex === 2) {
|
} else if (this.activeIndex === 2) {
|
||||||
this.currentAreaActive = querys.areatype
|
this.currentAreaActive = querys.areatype
|
||||||
}else if (this.activeIndex === 3) {
|
} else if (this.activeIndex === 3) {
|
||||||
this.currentFilterActive = querys.sortType
|
this.currentFilterActive = querys.sortType
|
||||||
}
|
}
|
||||||
// 特殊处理行业、区域
|
// 特殊处理行业、区域
|
||||||
if(querys.business){
|
if (querys.business) {
|
||||||
querys.business = this.tablist[this.currentClassActive]
|
querys.business = this.tablist[this.currentClassActive]
|
||||||
}
|
}
|
||||||
if(querys.region){
|
if (querys.region) {
|
||||||
querys.region = this.tablist[this.currentRegionActive]
|
querys.region = this.tablist[this.currentRegionActive]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,11 +130,11 @@
|
|||||||
...querys
|
...querys
|
||||||
}
|
}
|
||||||
const query = this.$u.queryParams(this.queryInfo)
|
const query = this.$u.queryParams(this.queryInfo)
|
||||||
console.log(querys, 'dropquery');
|
// console.log(querys, 'dropquery');
|
||||||
this.$emit('getQueryInfo', this.queryInfo)
|
this.$emit('getQueryInfo', this.queryInfo)
|
||||||
},
|
},
|
||||||
resetInfo(){
|
resetInfo() {
|
||||||
console.log("重置了Dropdown");
|
// console.log("重置了Dropdown");
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
region: '',
|
region: '',
|
||||||
sortType: '',
|
sortType: '',
|
||||||
|
|||||||
@@ -44,48 +44,48 @@
|
|||||||
this.$emit('cancelDrop');
|
this.$emit('cancelDrop');
|
||||||
},
|
},
|
||||||
sendQueryInfo() {
|
sendQueryInfo() {
|
||||||
console.log(this.queryInfo);
|
// console.log(this.queryInfo);
|
||||||
console.log(this.type);
|
// console.log(this.type);
|
||||||
console.log(this.activeIndex);
|
// console.log(this.activeIndex);
|
||||||
|
|
||||||
if (this.type === '行业') {
|
if (this.type === '行业') {
|
||||||
if(this.list[this.activeIndex] == '全部'){
|
if (this.list[this.activeIndex] == '全部') {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
business: ''
|
business: ''
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
business: this.activeIndex
|
business: this.activeIndex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (this.type === '区域') {
|
} else if (this.type === '区域') {
|
||||||
if(this.list[this.activeIndex] == '全区域'){
|
if (this.list[this.activeIndex] == '全区域') {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
region: ''
|
region: ''
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
region: this.activeIndex
|
region: this.activeIndex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (this.type === '面积') {
|
} else if (this.type === '面积') {
|
||||||
if(this.list[this.activeIndex] == '任意面积'){
|
if (this.list[this.activeIndex] == '任意面积') {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
areatype: ''
|
areatype: ''
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
areatype: this.activeIndex
|
areatype: this.activeIndex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (this.type === '筛选') {
|
} else if (this.type === '筛选') {
|
||||||
if(this.list[this.activeIndex] == '全部'){
|
if (this.list[this.activeIndex] == '全部') {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
sortType: ''
|
sortType: ''
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
sortType: this.activeIndex
|
sortType: this.activeIndex
|
||||||
}
|
}
|
||||||
@@ -93,11 +93,11 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
// 发送queryInfo
|
// 发送queryInfo
|
||||||
console.log(this.queryInfo, 'sendqueryInfo');
|
// console.log(this.queryInfo, 'sendqueryInfo');
|
||||||
this.$emit('getQueryInfo', this.queryInfo);
|
this.$emit('getQueryInfo', this.queryInfo);
|
||||||
},
|
},
|
||||||
resetQueryInfo(){
|
resetQueryInfo() {
|
||||||
console.log("重置了DropdownItem");
|
// console.log("重置了DropdownItem");
|
||||||
this.currentClassActive = 0
|
this.currentClassActive = 0
|
||||||
this.currentRegionActive = 0
|
this.currentRegionActive = 0
|
||||||
this.currentAreaActive = 0
|
this.currentAreaActive = 0
|
||||||
@@ -170,6 +170,7 @@
|
|||||||
border-radius: 0px 0px 20px 20px;
|
border-radius: 0px 0px 20px 20px;
|
||||||
height: 320rpx;
|
height: 320rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
border-top: 1px solid #EEEEEE;
|
border-top: 1px solid #EEEEEE;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
},
|
},
|
||||||
handleClear(e) {
|
handleClear(e) {
|
||||||
|
|
||||||
console.log('handleClear', e);
|
// console.log('handleClear', e);
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {
|
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.getUserLocation();
|
this.getUserLocation();
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
uni.getFuzzyLocation({
|
uni.getFuzzyLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('res.latitude', res.latitude);
|
// console.log('res.latitude', res.latitude);
|
||||||
console.log('res.longitude', res.longitude);
|
// console.log('res.longitude', res.longitude);
|
||||||
uni.setStorageSync('latitude', res.latitude);
|
uni.setStorageSync('latitude', res.latitude);
|
||||||
uni.setStorageSync('longitude', res.longitude);
|
uni.setStorageSync('longitude', res.longitude);
|
||||||
qqmapsdk.reverseGeocoder({
|
qqmapsdk.reverseGeocoder({
|
||||||
@@ -123,12 +123,12 @@
|
|||||||
longitude: res.longitude
|
longitude: res.longitude
|
||||||
},
|
},
|
||||||
success: (re) => {
|
success: (re) => {
|
||||||
console.log("解析地址成功", re);
|
// console.log("解析地址成功", re);
|
||||||
console.log(re.result.ad_info.city);
|
// console.log(re.result.ad_info.city);
|
||||||
console.log(re.result.ad_info.district);
|
// console.log(re.result.ad_info.district);
|
||||||
let city = re.result.ad_info.city
|
let city = re.result.ad_info.city
|
||||||
let district = re.result.ad_info.district
|
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_code', re.result.ad_info.city_code.substring(3));
|
||||||
uni.setStorageSync('city', city.slice(0, 2));
|
uni.setStorageSync('city', city.slice(0, 2));
|
||||||
uni.setStorageSync('district', district);
|
uni.setStorageSync('district', district);
|
||||||
@@ -136,12 +136,12 @@
|
|||||||
// that.position = city.slice(0, 2) + district.slice(0, 2)
|
// that.position = city.slice(0, 2) + district.slice(0, 2)
|
||||||
},
|
},
|
||||||
fail: (re) => {
|
fail: (re) => {
|
||||||
console.log(re, '失败信息');
|
// console.log(re, '失败信息');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log("获取经纬度失败", err);
|
// console.log("获取经纬度失败", err);
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
this.$emit('updateItem', searchid)
|
this.$emit('updateItem', searchid)
|
||||||
},
|
},
|
||||||
handleDel(shopid) {
|
handleDel(shopid) {
|
||||||
console.log("删除了商铺", shopid);
|
// console.log("删除了商铺", shopid);
|
||||||
this.$emit('delItem', shopid)
|
this.$emit('delItem', shopid)
|
||||||
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
|
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
|
||||||
// TODO:不能直接修改
|
// TODO:不能直接修改
|
||||||
|
|||||||
@@ -150,14 +150,14 @@
|
|||||||
type: this.shopInfo.type,
|
type: this.shopInfo.type,
|
||||||
search: 1
|
search: 1
|
||||||
})
|
})
|
||||||
console.log("query", query);
|
// console.log("query", query);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/detail/detail' + `${query}`
|
url: '/pages/detail/detail' + `${query}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleEdit(searchid) {
|
handleEdit(searchid) {
|
||||||
// TODO 完成页面跳转
|
// TODO 完成页面跳转
|
||||||
console.log("点击了编辑ID为", searchid);
|
// console.log("点击了编辑ID为", searchid);
|
||||||
this.$emit('updateItem', searchid)
|
this.$emit('updateItem', searchid)
|
||||||
},
|
},
|
||||||
handleDel(searchid) {
|
handleDel(searchid) {
|
||||||
@@ -246,6 +246,7 @@
|
|||||||
|
|
||||||
>view {
|
>view {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
this.$emit('updateItem', shopid)
|
this.$emit('updateItem', shopid)
|
||||||
},
|
},
|
||||||
handleDel(shopid) {
|
handleDel(shopid) {
|
||||||
console.log("删除了商铺", shopid);
|
// console.log("删除了商铺", shopid);
|
||||||
this.$emit('delItem', shopid)
|
this.$emit('delItem', shopid)
|
||||||
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
|
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
|
||||||
// TODO:不能直接修改
|
// TODO:不能直接修改
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
...this.customQuery
|
...this.customQuery
|
||||||
})
|
})
|
||||||
console.log("query", query);
|
// console.log("query", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
this.shopInfoList.forEach(item => {
|
this.shopInfoList.forEach(item => {
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
handleEdit(shopid) {
|
handleEdit(shopid) {
|
||||||
// TODO 完成页面跳转
|
// TODO 完成页面跳转
|
||||||
console.log("点击了编辑ID为", shopid);
|
// console.log("点击了编辑ID为", shopid);
|
||||||
this.$emit('updateItem', shopid)
|
this.$emit('updateItem', shopid)
|
||||||
},
|
},
|
||||||
handleDel(shopid) {
|
handleDel(shopid) {
|
||||||
@@ -170,12 +170,12 @@
|
|||||||
this.$emit('delItem', shopid)
|
this.$emit('delItem', shopid)
|
||||||
},
|
},
|
||||||
enterDetail() {
|
enterDetail() {
|
||||||
console.log("进入详情页面", this.shopInfo.id, this.shopInfo.type);
|
// console.log("进入详情页面", this.shopInfo.id, this.shopInfo.type);
|
||||||
const query = this.$u.queryParams({
|
const query = this.$u.queryParams({
|
||||||
id: this.shopInfo.id,
|
id: this.shopInfo.id,
|
||||||
type: this.shopInfo.type
|
type: this.shopInfo.type
|
||||||
})
|
})
|
||||||
console.log("query", query);
|
// console.log("query", query);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/detail/detail' + `${query}`
|
url: '/pages/detail/detail' + `${query}`
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
...this.submitForm,
|
...this.submitForm,
|
||||||
uid: uni.getStorageSync('uid')
|
uid: uni.getStorageSync('uid')
|
||||||
}
|
}
|
||||||
console.log('成', data);
|
// console.log('成', data);
|
||||||
this.$api.toBePartner(data).then(res => {
|
this.$api.toBePartner(data).then(res => {
|
||||||
if (res.data.msg == "提交成功") {
|
if (res.data.msg == "提交成功") {
|
||||||
this.show = true
|
this.show = true
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (this.member == 2) {
|
} else if (this.member == 2) {
|
||||||
console.log('联系客服');
|
// console.log('联系客服');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
console.log('detail', options);
|
// console.log('detail', options);
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
if (options.search == "1") {
|
if (options.search == "1") {
|
||||||
this.search = false
|
this.search = false
|
||||||
@@ -115,13 +115,13 @@
|
|||||||
this.showM = true
|
this.showM = true
|
||||||
},
|
},
|
||||||
share() {
|
share() {
|
||||||
console.log('分享');
|
// console.log('分享');
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
this.$api.getShopDetail(type, id).then(res => {
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
console.log('data.pics', data.pics);
|
// console.log('data.pics', data.pics);
|
||||||
var arr = [];
|
var arr = [];
|
||||||
var arr1 = [];
|
var arr1 = [];
|
||||||
let obj = {}
|
let obj = {}
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
arr1.push(obj)
|
arr1.push(obj)
|
||||||
})
|
})
|
||||||
data.pics = arr1
|
data.pics = arr1
|
||||||
console.log('arr', arr1);
|
// console.log('arr', arr1);
|
||||||
data.avatar = this.$api.imgUrl + data.avatar
|
data.avatar = this.$api.imgUrl + data.avatar
|
||||||
this.shopInfo = data
|
this.shopInfo = data
|
||||||
}
|
}
|
||||||
@@ -144,10 +144,10 @@
|
|||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: phone,
|
phoneNumber: phone,
|
||||||
success: function() {
|
success: function() {
|
||||||
console.log('拨打电话成功');
|
// console.log('拨打电话成功');
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
console.log('打电话失败了');
|
// console.log('打电话失败了');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -99,10 +99,10 @@
|
|||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: phone,
|
phoneNumber: phone,
|
||||||
success: function() {
|
success: function() {
|
||||||
console.log('拨打电话成功');
|
// console.log('拨打电话成功');
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
console.log('打电话失败了');
|
// console.log('打电话失败了');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
this.$api.getSuccList().then(res => {
|
this.$api.getSuccList().then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
console.log(this.shopInfoList);
|
// console.log(this.shopInfoList);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
this.keyword = ''
|
this.keyword = ''
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
// console.log("触底加载");
|
||||||
} else if (this.shopListLength == 0) {
|
} else if (this.shopListLength == 0) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -104,12 +104,12 @@
|
|||||||
} else {
|
} else {
|
||||||
query = this.getQueryInfo(q)
|
query = this.getQueryInfo(q)
|
||||||
}
|
}
|
||||||
console.log("listquery", query);
|
// console.log("listquery", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||||
.includes('region') || this.refresh) {
|
.includes('region') || this.refresh) {
|
||||||
console.log('筛选');
|
// console.log('筛选');
|
||||||
// this.resetQuery(q)
|
// this.resetQuery(q)
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
this.refresh = false
|
this.refresh = false
|
||||||
@@ -119,15 +119,15 @@
|
|||||||
this.showNull = false
|
this.showNull = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('查询');
|
// console.log('查询');
|
||||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
console.log(this.shopInfoList);
|
// console.log(this.shopInfoList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQueryInfo(query) {
|
getQueryInfo(query) {
|
||||||
console.log("getQueryInfo", query);
|
// console.log("getQueryInfo", query);
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 3,
|
type: 3,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
this.keyword = ''
|
this.keyword = ''
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
// console.log("触底加载");
|
||||||
} else if (this.searchListLength == 0) {
|
} else if (this.searchListLength == 0) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
} else {
|
} else {
|
||||||
query = this.getQueryInfo(q)
|
query = this.getQueryInfo(q)
|
||||||
}
|
}
|
||||||
console.log("listquery", query);
|
// console.log("listquery", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||||
@@ -123,11 +123,11 @@
|
|||||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
console.log(this.shopInfoList);
|
// console.log(this.shopInfoList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQueryInfo(query) {
|
getQueryInfo(query) {
|
||||||
console.log("getQueryInfo", query);
|
// console.log("getQueryInfo", query);
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 4,
|
type: 4,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
} else {
|
} else {
|
||||||
query = this.getQueryInfo(q)
|
query = this.getQueryInfo(q)
|
||||||
}
|
}
|
||||||
console.log("listquery", query);
|
// console.log("listquery", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||||
@@ -122,11 +122,11 @@
|
|||||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
console.log(this.searchInfoList);
|
// console.log(this.searchInfoList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQueryInfo(query) {
|
getQueryInfo(query) {
|
||||||
console.log("getQueryInfo", query);
|
// console.log("getQueryInfo", query);
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 2,
|
type: 2,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
} else {
|
} else {
|
||||||
query = this.getQueryInfo(q)
|
query = this.getQueryInfo(q)
|
||||||
}
|
}
|
||||||
console.log("listquery", query);
|
// console.log("listquery", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||||
@@ -121,12 +121,12 @@
|
|||||||
console.log('查询');
|
console.log('查询');
|
||||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
console.log(this.shopInfoList);
|
// console.log(this.shopInfoList);
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQueryInfo(query) {
|
getQueryInfo(query) {
|
||||||
console.log("getQueryInfo", query);
|
// console.log("getQueryInfo", query);
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 1,
|
type: 1,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.getUserLocation();
|
this.getUserLocation();
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
this.shopSearchListLength = res.data.data.length
|
this.shopSearchListLength = res.data.data.length
|
||||||
// 用于触底刷新 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
|
// 用于触底刷新 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
|
||||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
console.log(this.searchInfoList);
|
// console.log(this.searchInfoList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getClassList() {
|
getClassList() {
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
uni.setStorageSync('regionList', JSON.stringify(res.data.result[0].map(item => item.fullname)));
|
uni.setStorageSync('regionList', JSON.stringify(res.data.result[0].map(item => item.fullname)));
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log('请求区域失败:', err);
|
// console.log('请求区域失败:', err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -178,8 +178,8 @@
|
|||||||
uni.getFuzzyLocation({
|
uni.getFuzzyLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('res.latitude', res.latitude);
|
// console.log('res.latitude', res.latitude);
|
||||||
console.log('res.longitude', res.longitude);
|
// console.log('res.longitude', res.longitude);
|
||||||
uni.setStorageSync('latitude', res.latitude);
|
uni.setStorageSync('latitude', res.latitude);
|
||||||
uni.setStorageSync('longitude', res.longitude);
|
uni.setStorageSync('longitude', res.longitude);
|
||||||
qqmapsdk.reverseGeocoder({
|
qqmapsdk.reverseGeocoder({
|
||||||
@@ -188,12 +188,12 @@
|
|||||||
longitude: res.longitude
|
longitude: res.longitude
|
||||||
},
|
},
|
||||||
success: (re) => {
|
success: (re) => {
|
||||||
console.log("解析地址成功", re);
|
// console.log("解析地址成功", re);
|
||||||
console.log(re.result.ad_info.city);
|
// console.log(re.result.ad_info.city);
|
||||||
console.log(re.result.ad_info.district);
|
// console.log(re.result.ad_info.district);
|
||||||
let city = re.result.ad_info.city
|
let city = re.result.ad_info.city
|
||||||
let district = re.result.ad_info.district
|
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_code', re.result.ad_info.city_code.substring(3));
|
||||||
uni.setStorageSync('city', city.slice(0, 2));
|
uni.setStorageSync('city', city.slice(0, 2));
|
||||||
uni.setStorageSync('district', district);
|
uni.setStorageSync('district', district);
|
||||||
@@ -201,12 +201,12 @@
|
|||||||
// that.position = city.slice(0, 2) + district.slice(0, 2)
|
// that.position = city.slice(0, 2) + district.slice(0, 2)
|
||||||
},
|
},
|
||||||
fail: (re) => {
|
fail: (re) => {
|
||||||
console.log(re, '失败信息');
|
// console.log(re, '失败信息');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log("获取经纬度失败", err);
|
// console.log("获取经纬度失败", err);
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.authSetting['scope.userFuzzyLocation']) {
|
if (res.authSetting['scope.userFuzzyLocation']) {
|
||||||
console.log('用户已经授权定位权限');
|
// console.log('用户已经授权定位权限');
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,12 +271,12 @@
|
|||||||
})
|
})
|
||||||
// that.getUserLocation()
|
// that.getUserLocation()
|
||||||
} else {
|
} else {
|
||||||
console.log('用户未授权定位权限');
|
// console.log('用户未授权定位权限');
|
||||||
uni.authorize({
|
uni.authorize({
|
||||||
scope: 'scope.userFuzzyLocation',
|
scope: 'scope.userFuzzyLocation',
|
||||||
success: function() {
|
success: function() {
|
||||||
this.isAuth = true
|
this.isAuth = true
|
||||||
console.log('授权成功');
|
// console.log('授权成功');
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (!res.locationEnabled || !res.locationAuthorized) {
|
if (!res.locationEnabled || !res.locationAuthorized) {
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: function() {
|
fail: function() {
|
||||||
console.log('授权失败');
|
// console.log('授权失败');
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启',
|
content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启',
|
||||||
confirmText: "确认",
|
confirmText: "确认",
|
||||||
@@ -319,12 +319,12 @@
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.openSetting({
|
uni.openSetting({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
that.getUserLocation();
|
that.getUserLocation();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,11 +129,11 @@
|
|||||||
zoomOnClick: true,
|
zoomOnClick: true,
|
||||||
gridSize: 60,
|
gridSize: 60,
|
||||||
complete(res) {
|
complete(res) {
|
||||||
console.log('initMarkerCluster', res)
|
// console.log('initMarkerCluster', res)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this._mapContext.on("markerClusterCreate", (e) => {
|
this._mapContext.on("markerClusterCreate", (e) => {
|
||||||
console.log("markerClusterCreate", e);
|
// console.log("markerClusterCreate", e);
|
||||||
});
|
});
|
||||||
//定时监听地图缩放
|
//定时监听地图缩放
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
scale(newVal, oldVal) {
|
scale(newVal, oldVal) {
|
||||||
console.log('thisscale', newVal, Math.round(newVal));
|
// console.log('thisscale', newVal, Math.round(newVal));
|
||||||
this.showShop = false
|
this.showShop = false
|
||||||
let ra = ''
|
let ra = ''
|
||||||
this.scaleM.forEach(item => {
|
this.scaleM.forEach(item => {
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
this.$api.getShopDetail(type, id).then(res => {
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
console.log('详情', res);
|
// console.log('详情', res);
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.shopList = {
|
this.shopList = {
|
||||||
@@ -183,24 +183,24 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRegionChange(e) {
|
handleRegionChange(e) {
|
||||||
console.log('地图缩放层级变化, 只能监听拖拽, 不能监听缩放', e);
|
// console.log('地图缩放层级变化, 只能监听拖拽, 不能监听缩放', e);
|
||||||
},
|
},
|
||||||
getMapList(radius) {
|
getMapList(radius) {
|
||||||
console.log('longitude', uni.getStorageSync('longitude'));
|
// console.log('longitude', uni.getStorageSync('longitude'));
|
||||||
console.log('latitude', uni.getStorageSync('latitude'));
|
// console.log('latitude', uni.getStorageSync('latitude'));
|
||||||
const realData = {
|
const realData = {
|
||||||
longitude: uni.getStorageSync('longitude'),
|
longitude: uni.getStorageSync('longitude'),
|
||||||
latitude: uni.getStorageSync('latitude'),
|
latitude: uni.getStorageSync('latitude'),
|
||||||
radius: radius * 1000
|
radius: radius * 1000
|
||||||
}
|
}
|
||||||
console.log('realData.radius', realData.radius);
|
// console.log('realData.radius', realData.radius);
|
||||||
const mockData = {
|
const mockData = {
|
||||||
longitude: 23.40,
|
longitude: 23.40,
|
||||||
latitude: 116.38,
|
latitude: 116.38,
|
||||||
radius: 1111111111
|
radius: 1111111111
|
||||||
}
|
}
|
||||||
this.$api.getMap(realData).then(res => {
|
this.$api.getMap(realData).then(res => {
|
||||||
console.log('getMap', res);
|
// console.log('getMap', res);
|
||||||
let obj = {}
|
let obj = {}
|
||||||
let arr = []
|
let arr = []
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
@@ -229,13 +229,13 @@
|
|||||||
},
|
},
|
||||||
...arr,
|
...arr,
|
||||||
]
|
]
|
||||||
console.log('this.marker', this.marker);
|
// console.log('this.marker', this.marker);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 图标点击
|
// 图标点击
|
||||||
markerClick(e) {
|
markerClick(e) {
|
||||||
console.log('标记点击', e);
|
// console.log('标记点击', e);
|
||||||
this.showShop = true
|
this.showShop = true
|
||||||
let markerId = e.markerId; //点击标记点, 获取id, 查询店铺详情, 展示在下方
|
let markerId = e.markerId; //点击标记点, 获取id, 查询店铺详情, 展示在下方
|
||||||
this.getDetail(1, markerId)
|
this.getDetail(1, markerId)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
code: code
|
code: code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
var data = res.data.data
|
var data = res.data.data
|
||||||
console.log('res.da',res);
|
// console.log('res.da',res);
|
||||||
// console.log('登录code换取的信息', data);
|
// console.log('登录code换取的信息', data);
|
||||||
uni.setStorageSync('loginToken', data.token);
|
uni.setStorageSync('loginToken', data.token);
|
||||||
that.$toast.success('登录成功')
|
that.$toast.success('登录成功')
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
code: e.detail.code
|
code: e.detail.code
|
||||||
}
|
}
|
||||||
that.$api.getMobile(codeData).then(res => {
|
that.$api.getMobile(codeData).then(res => {
|
||||||
console.log('code换手机号', res)
|
// console.log('code换手机号', res)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
||||||
prop="business">
|
prop="business">
|
||||||
<text @click="show2 = true" class="checkedtext" v-if="form.business">{{form.business}}-{{form.commercialForm}}</text>
|
<text @click="show2 = true" class="checkedtext"
|
||||||
|
v-if="form.business">{{form.business}}-{{form.commercialForm}}</text>
|
||||||
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
||||||
@@ -154,9 +155,9 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
// console.log('type, id', type, id);
|
||||||
this.$api.getShopDetail(type, id).then(res => {
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
console.log(',re', res);
|
// console.log(',re', res);
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -176,7 +177,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
preview(e) {
|
preview(e) {
|
||||||
console.log('预览', e);
|
// console.log('预览', e);
|
||||||
},
|
},
|
||||||
handleSearchAddress() {
|
handleSearchAddress() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -185,9 +186,9 @@
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.uForm.validate().then(res => {
|
this.$refs.uForm.validate().then(res => {
|
||||||
console.log("提交表单信息:", this.form, this.form.id)
|
// console.log("提交表单信息:", this.form, this.form.id)
|
||||||
this.$api.publishAddress(this.form).then(res => {
|
this.$api.publishAddress(this.form).then(res => {
|
||||||
console.log('发布找店地址', res);
|
// console.log('发布找店地址', res);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
@@ -198,7 +199,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
console.log("失败信息:", JSON.stringify(errors))
|
// console.log("失败信息:", JSON.stringify(errors))
|
||||||
// uni.$u.toast('校验失败')
|
// uni.$u.toast('校验失败')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -211,29 +212,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
const {
|
const {
|
||||||
columnIndex,
|
columnIndex,
|
||||||
value,
|
value,
|
||||||
values, // values为当前变化列的数组内容
|
values, // values为当前变化列的数组内容
|
||||||
index,
|
index,
|
||||||
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
||||||
picker = this.$refs.uPicker
|
picker = this.$refs.uPicker
|
||||||
} = e
|
} = e
|
||||||
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
||||||
console.log(e);
|
// console.log(e);
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
// picker为选择器this实例,变化第二列对应的选项
|
// picker为选择器this实例,变化第二列对应的选项
|
||||||
this.ClassCheckId = this.pid[index]
|
this.ClassCheckId = this.pid[index]
|
||||||
this.$api.getClassList(this.ClassCheckId).then(res => {
|
this.$api.getClassList(this.ClassCheckId).then(res => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
this.Karmacolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
})
|
})
|
||||||
picker.setColumnValues(1, this.Karmacolumns)
|
picker.setColumnValues(1, this.Karmacolumns)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRegionList() {
|
getRegionList() {
|
||||||
var that = this
|
var that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
@@ -243,7 +244,7 @@
|
|||||||
that.regionColumns = [res.data.result[0].map(item => item.fullname)]
|
that.regionColumns = [res.data.result[0].map(item => item.fullname)]
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log('请求区域失败:', err);
|
// console.log('请求区域失败:', err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -262,7 +263,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('修改找店地址', options);
|
// console.log('修改找店地址', options);
|
||||||
if (options.item) {
|
if (options.item) {
|
||||||
console.log('修改');
|
console.log('修改');
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
@@ -284,8 +285,8 @@
|
|||||||
this.$api.getClassList(9).then(res => {
|
this.$api.getClassList(9).then(res => {
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
this.Karmacolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
})
|
})
|
||||||
this.$refs.uPicker.setColumnValues(1,this.Karmacolumns)
|
this.$refs.uPicker.setColumnValues(1, this.Karmacolumns)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
||||||
prop="business">
|
prop="business">
|
||||||
<text @click="show2 = true" class="checkedtext" v-if="form.business">{{form.business}}-{{form.commercial}}</text>
|
<text @click="show2 = true" class="checkedtext"
|
||||||
|
v-if="form.business">{{form.business}}-{{form.commercial}}</text>
|
||||||
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
||||||
@@ -167,7 +168,7 @@
|
|||||||
this[`fileList${event.name}`].splice(event.index, 1)
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
},
|
},
|
||||||
preview(e) {
|
preview(e) {
|
||||||
console.log('预览', e);
|
// console.log('预览', e);
|
||||||
},
|
},
|
||||||
// 新增图片
|
// 新增图片
|
||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
@@ -182,9 +183,9 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
console.log('lists[i].url', lists[i].url);
|
// console.log('lists[i].url', lists[i].url);
|
||||||
const result = await this.uploadFilePromise(lists[i].url)
|
const result = await this.uploadFilePromise(lists[i].url)
|
||||||
console.log('result', result);
|
// console.log('result', result);
|
||||||
let item = this[`fileList${event.name}`][fileListLen]
|
let item = this[`fileList${event.name}`][fileListLen]
|
||||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
@@ -238,9 +239,9 @@
|
|||||||
region: this.form.region.split('-')[0],
|
region: this.form.region.split('-')[0],
|
||||||
images: temp.join(',')
|
images: temp.join(',')
|
||||||
}
|
}
|
||||||
console.log("项目招商:", data)
|
// console.log("项目招商:", data)
|
||||||
this.$api.publishInvestment(data).then(res => {
|
this.$api.publishInvestment(data).then(res => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
@@ -251,7 +252,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
console.log("失败信息:" + JSON.stringify(errors))
|
// console.log("失败信息:" + JSON.stringify(errors))
|
||||||
// uni.$u.toast('校验失败')
|
// uni.$u.toast('校验失败')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -309,12 +310,12 @@
|
|||||||
that1.$refs.regionPicker.setColumnValues(1, that1.regionSecondColumns)
|
that1.$refs.regionPicker.setColumnValues(1, that1.regionSecondColumns)
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log('请求区域失败:', err);
|
// console.log('请求区域失败:', err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log('请求区域失败:', err);
|
// console.log('请求区域失败:', err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -352,9 +353,9 @@
|
|||||||
this.form.region = e.value[0] + '-' + e.value[1]
|
this.form.region = e.value[0] + '-' + e.value[1]
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
// console.log('type, id', type, id);
|
||||||
this.$api.getShopDetail(type, id).then(res => {
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
console.log(',re', res);
|
// console.log(',re', res);
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -416,8 +417,8 @@
|
|||||||
this.$api.getClassList(9).then(res => {
|
this.$api.getClassList(9).then(res => {
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
this.Karmacolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
})
|
})
|
||||||
this.$refs.uPicker.setColumnValues(1,this.Karmacolumns)
|
this.$refs.uPicker.setColumnValues(1, this.Karmacolumns)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
this[`fileList${event.name}`].splice(event.index, 1)
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
},
|
},
|
||||||
preview(e) {
|
preview(e) {
|
||||||
console.log('预览', e);
|
// console.log('预览', e);
|
||||||
},
|
},
|
||||||
// 新增图片
|
// 新增图片
|
||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
@@ -196,9 +196,9 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
console.log('lists[i].url', lists[i].url);
|
// console.log('lists[i].url', lists[i].url);
|
||||||
const result = await this.uploadFilePromise(lists[i].url)
|
const result = await this.uploadFilePromise(lists[i].url)
|
||||||
console.log('result', result);
|
// console.log('result', result);
|
||||||
let item = this[`fileList${event.name}`][fileListLen]
|
let item = this[`fileList${event.name}`][fileListLen]
|
||||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
@@ -252,9 +252,9 @@
|
|||||||
region: this.form.region.split('-')[0],
|
region: this.form.region.split('-')[0],
|
||||||
images: temp.join(',')
|
images: temp.join(',')
|
||||||
}
|
}
|
||||||
console.log("提交表单信息:", data)
|
// console.log("提交表单信息:", data)
|
||||||
this.$api.publishRent(data).then(res => {
|
this.$api.publishRent(data).then(res => {
|
||||||
console.log('发布店铺出租', res);
|
// console.log('发布店铺出租', res);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('diz', res.data.result.location);
|
// console.log('diz', res.data.result.location);
|
||||||
if (res.data.message == "query ok") {
|
if (res.data.message == "query ok") {
|
||||||
// console.log('lat', res.data.result.location.lat);
|
// console.log('lat', res.data.result.location.lat);
|
||||||
that.form.latitude = res.data.result.location.lat
|
that.form.latitude = res.data.result.location.lat
|
||||||
@@ -375,12 +375,12 @@
|
|||||||
picker = this.$refs.uPicker
|
picker = this.$refs.uPicker
|
||||||
} = e
|
} = e
|
||||||
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
||||||
console.log(e);
|
// console.log(e);
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
// picker为选择器this实例,变化第二列对应的选项
|
// picker为选择器this实例,变化第二列对应的选项
|
||||||
this.ClassCheckId = this.pid[index]
|
this.ClassCheckId = this.pid[index]
|
||||||
this.$api.getClassList(this.ClassCheckId).then(res => {
|
this.$api.getClassList(this.ClassCheckId).then(res => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
this.Karmacolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
})
|
})
|
||||||
@@ -402,9 +402,9 @@
|
|||||||
this.form.region = e.value[0] + '-' + e.value[1]
|
this.form.region = e.value[0] + '-' + e.value[1]
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
// console.log('type, id', type, id);
|
||||||
this.$api.getShopDetail(type, id).then(res => {
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
console.log(',re', res);
|
// console.log(',re', res);
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -447,7 +447,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('修改出租', options);
|
// console.log('修改出租', options);
|
||||||
if (options.item) {
|
if (options.item) {
|
||||||
console.log('修改');
|
console.log('修改');
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
this[`fileList${event.name}`].splice(event.index, 1)
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
},
|
},
|
||||||
preview(e) {
|
preview(e) {
|
||||||
console.log('预览', e);
|
// console.log('预览', e);
|
||||||
},
|
},
|
||||||
// 新增图片
|
// 新增图片
|
||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
@@ -233,12 +233,12 @@
|
|||||||
if (this.fileList1.length > 0) {
|
if (this.fileList1.length > 0) {
|
||||||
this.fileList1.map(item => {
|
this.fileList1.map(item => {
|
||||||
const url = item.url
|
const url = item.url
|
||||||
console.log('url', url, this.$api.imgUrl);
|
// console.log('url', url, this.$api.imgUrl);
|
||||||
temp.push(url.replace(this.$api.imgUrl, ''))
|
temp.push(url.replace(this.$api.imgUrl, ''))
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('images---', temp.join(','));
|
// console.log('images---', temp.join(','));
|
||||||
if (this.form.latitude && this.form.longitude) {
|
if (this.form.latitude && this.form.longitude) {
|
||||||
console.log('经纬度都存在');
|
console.log('经纬度都存在');
|
||||||
} else {
|
} else {
|
||||||
@@ -252,9 +252,9 @@
|
|||||||
region: this.form.region.split('-')[0],
|
region: this.form.region.split('-')[0],
|
||||||
images: temp.join(',')
|
images: temp.join(',')
|
||||||
}
|
}
|
||||||
console.log('提交表单信息', data);
|
// console.log('提交表单信息', data);
|
||||||
this.$api.publishTransfer(data).then(res => {
|
this.$api.publishTransfer(data).then(res => {
|
||||||
console.log('发布店铺转让', res);
|
// console.log('发布店铺转让', res);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
@@ -351,7 +351,7 @@
|
|||||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('地址转经纬度', that.form.region, res.data);
|
// console.log('地址转经纬度', that.form.region, res.data);
|
||||||
if (res.data.message == "query ok") {
|
if (res.data.message == "query ok") {
|
||||||
// console.log('lat', res.data.result.location.lat);
|
// console.log('lat', res.data.result.location.lat);
|
||||||
that.form.latitude = res.data.result.location.lat
|
that.form.latitude = res.data.result.location.lat
|
||||||
@@ -376,12 +376,12 @@
|
|||||||
picker = this.$refs.uPicker
|
picker = this.$refs.uPicker
|
||||||
} = e
|
} = e
|
||||||
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
||||||
console.log(e);
|
// console.log(e);
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
// picker为选择器this实例,变化第二列对应的选项
|
// picker为选择器this实例,变化第二列对应的选项
|
||||||
this.ClassCheckId = this.pid[index]
|
this.ClassCheckId = this.pid[index]
|
||||||
this.$api.getClassList(this.ClassCheckId).then(res => {
|
this.$api.getClassList(this.ClassCheckId).then(res => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
this.Karmacolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
})
|
})
|
||||||
@@ -403,9 +403,9 @@
|
|||||||
this.form.region = e.value[0] + '-' + e.value[1]
|
this.form.region = e.value[0] + '-' + e.value[1]
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
// console.log('type, id', type, id);
|
||||||
this.$api.getShopDetail(type, id).then(res => {
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
console.log(',re', res);
|
// console.log(',re', res);
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -447,7 +447,7 @@
|
|||||||
this.$refs.uForm.setRules(this.rules)
|
this.$refs.uForm.setRules(this.rules)
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('修改转让', options);
|
// console.log('修改转让', options);
|
||||||
if (options.item) {
|
if (options.item) {
|
||||||
console.log('修改');
|
console.log('修改');
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
matchPageNum: 1,
|
matchPageNum: 1,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
refresh: false,
|
refresh: false,
|
||||||
showNull: false,
|
showNull: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
if (this.listId !== 4 && !this.refresh && this.searchListLength !== 0) {
|
if (this.listId !== 4 && !this.refresh && this.searchListLength !== 0) {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getMyPublished(this.listId + 1, this.pageSize, this.pageNum)
|
this.getMyPublished(this.listId + 1, this.pageSize, this.pageNum)
|
||||||
} else if (this.listId == 4 && !this.refresh &&this.matchListLength !== 0) {
|
} else if (this.listId == 4 && !this.refresh && this.matchListLength !== 0) {
|
||||||
this.matchPageNum++
|
this.matchPageNum++
|
||||||
this.getMatch(this.matchPageSize, this.matchPageNum)
|
this.getMatch(this.matchPageSize, this.matchPageNum)
|
||||||
} else if (this.searchListLength == 0) {
|
} else if (this.searchListLength == 0) {
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
|
|
||||||
if (this.listId !== 4) {
|
if (this.listId !== 4) {
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
title: val
|
title: val
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('发布信息', res);
|
// console.log('发布信息', res);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
@@ -109,9 +109,9 @@
|
|||||||
title: val
|
title: val
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.matchListLength = res.data.data.length
|
this.matchListLength = res.data.data[0].length
|
||||||
this.matchList = res.data.data[0]
|
this.matchList = res.data.data[0]
|
||||||
if (res.data.data.length == 0) {
|
if (res.data.data[0].length == 0) {
|
||||||
this.showNull = true
|
this.showNull = true
|
||||||
} else {
|
} else {
|
||||||
this.showNull = false
|
this.showNull = false
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDel(shopid) {
|
handleDel(shopid) {
|
||||||
console.log('页面删除', this.listId + 1, shopid);
|
// console.log('页面删除', this.listId + 1, shopid);
|
||||||
var that = this
|
var that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -176,22 +176,22 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
getMatch(pageSize,pageNum) {
|
getMatch(pageSize, pageNum) {
|
||||||
this.$api.getMyMatch({
|
this.$api.getMyMatch({
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
pageNum: pageNum
|
pageNum: pageNum
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.matchListLength = res.data.data.length
|
this.matchListLength = res.data.data[0].length
|
||||||
if(this.refresh){
|
if (this.refresh) {
|
||||||
this.refresh = false
|
this.refresh = false
|
||||||
if (res.data.data.length == 0) {
|
if (res.data.data[0].length == 0) {
|
||||||
this.showNull = true
|
this.showNull = true
|
||||||
} else {
|
} else {
|
||||||
this.showNull = false
|
this.showNull = false
|
||||||
}
|
}
|
||||||
this.matchList = res.data.data[0]
|
this.matchList = res.data.data[0]
|
||||||
}else{
|
} else {
|
||||||
this.matchList = [...this.matchList, ...res.data.data[0]]
|
this.matchList = [...this.matchList, ...res.data.data[0]]
|
||||||
}
|
}
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@@ -206,10 +206,10 @@
|
|||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
pageNum: pageNum
|
pageNum: pageNum
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('发布信息l', res, res.data.data.length);
|
// console.log('发布信息l', res, res.data.data.length);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
if (isDelete == 1|| this.refresh) {
|
if (isDelete == 1 || this.refresh) {
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
this.refresh = false
|
this.refresh = false
|
||||||
if (res.data.data.length == 0) {
|
if (res.data.data.length == 0) {
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function(option) {
|
onLoad: function(option) {
|
||||||
console.log('option', option.listId);
|
// console.log('option', option.listId);
|
||||||
this.listId = option.listId
|
this.listId = option.listId
|
||||||
wx.setNavigationBarTitle({
|
wx.setNavigationBarTitle({
|
||||||
title: option.titletext
|
title: option.titletext
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
} else {
|
} else {
|
||||||
query = this.getQueryInfo(q)
|
query = this.getQueryInfo(q)
|
||||||
}
|
}
|
||||||
console.log("listquery", query);
|
// console.log("listquery", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||||
@@ -119,15 +119,15 @@
|
|||||||
this.showNull = false
|
this.showNull = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('查询');
|
// console.log('查询');
|
||||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
console.log(this.searchInfoList);
|
// console.log(this.searchInfoList);
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQueryInfo(query) {
|
getQueryInfo(query) {
|
||||||
console.log("getQueryInfo", query);
|
// console.log("getQueryInfo", query);
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 2,
|
type: 2,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInput(val) {
|
getInput(val) {
|
||||||
console.log('搜索值', val);
|
// console.log('搜索值', val);
|
||||||
if (this.pageNum !== 1) {
|
if (this.pageNum !== 1) {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
} else {
|
} else {
|
||||||
query = this.getQueryInfo(q)
|
query = this.getQueryInfo(q)
|
||||||
}
|
}
|
||||||
console.log("listquery", query);
|
// console.log("listquery", query);
|
||||||
this.$api.getShopList(query).then(res => {
|
this.$api.getShopList(query).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
console.log(this.shopInfoList);
|
// console.log(this.shopInfoList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQueryInfo(query) {
|
getQueryInfo(query) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const service = {
|
|||||||
isOutTime(res);
|
isOutTime(res);
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
console.log('错误', err);
|
// console.log('错误', err);
|
||||||
reject(err)
|
reject(err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -261,7 +261,6 @@ const apiService = {
|
|||||||
toBePartner(data) {
|
toBePartner(data) {
|
||||||
const url = `/center/partner`
|
const url = `/center/partner`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log(data);
|
|
||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
export default{
|
export default {
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
return {}
|
return {
|
||||||
},
|
title: '分享出去的卡片标题'
|
||||||
onShareTimeline() {
|
}
|
||||||
return {}
|
},
|
||||||
}
|
onShareTimeline() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user