Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6e057ab39 | ||
|
|
12a810cc0d | ||
|
|
93fc7ec6cf | ||
|
|
2199f88725 | ||
|
|
3d6eb0cafc | ||
|
|
0612840cdc | ||
|
|
20f56b5d8d | ||
|
|
d7e6a7a668 | ||
|
|
8d7cf8d8b2 | ||
|
|
19a699a968 | ||
|
|
f21f82ba6e | ||
|
|
2a0144d1bd | ||
|
|
97c1cbbded | ||
|
|
2000ce91af | ||
|
|
9f62244f16 | ||
|
|
93d2bb04c7 | ||
|
|
096440bbfc | ||
|
|
6ebb1fc8d8 | ||
|
|
c99a58c97f | ||
|
|
0411b70025 | ||
|
|
5e200924b9 | ||
|
|
d857a56aff | ||
|
|
d9f36c70f0 | ||
|
|
53939da52e | ||
|
|
448b198f28 | ||
|
|
0bbe5b6be6 | ||
|
|
e04e0a3859 | ||
|
|
9e561ac223 | ||
|
|
eee06e9f1d | ||
|
|
f7699ae669 | ||
|
|
690a4a50c4 | ||
|
|
6b95233940 |
@@ -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: '',
|
||||||
@@ -56,21 +57,21 @@
|
|||||||
// 当前选中的面积下拉列表项
|
// 当前选中的面积下拉列表项
|
||||||
currentAreaActive: 0,
|
currentAreaActive: 0,
|
||||||
// 当前选中的筛选下拉列表项
|
// 当前选中的筛选下拉列表项
|
||||||
currentFilterActive: 0,
|
currentFilterActive: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
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,8 +85,8 @@
|
|||||||
// this.postlist[3].unshift('全部')
|
// this.postlist[3].unshift('全部')
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
setActiveTag (reset){
|
setActiveTag(reset) {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -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,60 +44,60 @@
|
|||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 发送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;
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
<view class="input-and-swiper-root">
|
<view class="input-and-swiper-root">
|
||||||
<view class="search-box" v-if="type!=='0'">
|
<view class="search-box" v-if="type!=='0'">
|
||||||
<view class="search-box-input">
|
<view class="search-box-input">
|
||||||
<u-input v-model="keyword" placeholder="请输入店铺名称进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @clear="handleClear" clearable @change="changeInput">
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @clear="handleClear" clearable
|
||||||
|
@change="changeInput">
|
||||||
<template slot="suffix">
|
<template slot="suffix">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<u-icon name="map-fill" color="#329866" size="22"></u-icon>
|
<u-icon name="map-fill" color="#329866" size="22"></u-icon>
|
||||||
@@ -44,37 +45,40 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
position: uni.getStorageSync('city') + uni.getStorageSync('district').slice(0, 2),
|
position: uni.getStorageSync('city').slice(0, 2) + uni.getStorageSync('district').slice(0, 2),
|
||||||
currentNum: '',
|
currentNum: '',
|
||||||
keyword:''
|
keyword: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
styleIsolation: 'shared', // 解除样式隔离
|
styleIsolation: 'shared', // 解除样式隔离
|
||||||
},
|
},
|
||||||
watch: {
|
// watch: {
|
||||||
refresh(newVal, oldVal) {
|
// refresh(newVal, oldVal) {
|
||||||
console.log('newVal',newVal);
|
// console.log('newVal', newVal);
|
||||||
if(newVal){
|
// // if (newVal) {
|
||||||
this.keyword=''
|
// this.keyword = ''
|
||||||
}
|
// // }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.type !== '0') {
|
if (this.type !== '0') {
|
||||||
this.open()
|
this.open()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeInput(e){
|
resetInfo() {
|
||||||
this.$emit('getQueryInfo',e)
|
this.keyword = ''
|
||||||
},
|
},
|
||||||
handleClear(e){
|
changeInput(e) {
|
||||||
|
this.$emit('getQueryInfo', e)
|
||||||
console.log('handleClear',e);
|
},
|
||||||
|
handleClear(e) {
|
||||||
|
|
||||||
|
// console.log('handleClear', e);
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {
|
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {
|
||||||
@@ -89,7 +93,7 @@
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.getUserLocation();
|
this.getUserLocation();
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,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({
|
||||||
@@ -119,25 +123,25 @@
|
|||||||
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);
|
||||||
uni.setStorageSync('district', district);
|
uni.setStorageSync('district', district);
|
||||||
that.getRegionList()
|
that.getRegionList()
|
||||||
// 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) {
|
||||||
@@ -154,7 +158,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<SearchShopListItem v-for="item in searchInfoList" :key="searchid" :shopInfo="item" :show-style="showStyle"
|
<SearchShopListItem v-for="item in searchInfoList" :key="item.id" :shopInfo="item" :show-style="showStyle"
|
||||||
:isEdit="isEdit" @delItem="handleDel" @updateItem="handleUpdate"></SearchShopListItem>
|
:isEdit="isEdit" @delItem="handleDel" @updateItem="handleUpdate"></SearchShopListItem>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<ShowShopListItem v-for="item in shopInfoList" :shopInfo="item" :is-adshow="isADshow"
|
<ShowShopListItem v-for="item in shopInfoList" :key="item.id" :shopInfo="item" :is-adshow="isADshow"
|
||||||
:adlinkPath="adlinkPath" :show-style="showStyle" :is-edit="isEdit" @delItem="handleDel"
|
:adlinkPath="adlinkPath" :show-style="showStyle" :is-edit="isEdit" @delItem="handleDel"
|
||||||
@updateItem="hanldeUpdate"></ShowShopListItem>
|
@updateItem="hanldeUpdate"></ShowShopListItem>
|
||||||
</view>
|
</view>
|
||||||
@@ -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 => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<u-image :src="leftImage" width="80px" height="80px" radius="8px"></u-image>
|
<u-image :src="leftImage" width="80px" height="80px" radius="8px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-area">
|
<view class="text-area">
|
||||||
<u-text style="font-weight: 500;" :text="shopInfo.tt" :lines="2" ></u-text>
|
<u-text style="font-weight: 500;" :text="shopInfo.tt" :lines="2"></u-text>
|
||||||
<view v-if="showStyle == 0" class="pos-and-sqr">
|
<view v-if="showStyle == 0" class="pos-and-sqr">
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
@@ -142,14 +142,27 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
shopInfo(newVal, oldVal) {
|
||||||
|
if (newVal.pics.includes(",")) {
|
||||||
|
this.leftImage = this.$api.imgUrl + newVal.pics.split(',')[0]
|
||||||
|
} else {
|
||||||
|
this.leftImage = this.$api.imgUrl + newVal.pics
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.leftImage = this.$api.imgUrl + this.shopInfo.pics.split(',')[0]
|
if (this.shopInfo.pics.includes(",")) {
|
||||||
|
this.leftImage = this.$api.imgUrl + this.shopInfo.pics.split(',')[0]
|
||||||
|
} else {
|
||||||
|
this.leftImage = this.$api.imgUrl + this.shopInfo.pics
|
||||||
|
}
|
||||||
},
|
},
|
||||||
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) {
|
||||||
@@ -157,12 +170,12 @@
|
|||||||
this.$emit('delItem', shopid)
|
this.$emit('delItem', shopid)
|
||||||
},
|
},
|
||||||
enterDetail() {
|
enterDetail() {
|
||||||
// console.log("进入详情页面");
|
// 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}`
|
||||||
})
|
})
|
||||||
@@ -205,7 +218,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
>text, >u-text {
|
>text,
|
||||||
|
>u-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
main.js
@@ -9,6 +9,8 @@ Vue.use(uView)
|
|||||||
Vue.prototype.$api = apiService
|
Vue.prototype.$api = apiService
|
||||||
Vue.prototype.$toast = toast
|
Vue.prototype.$toast = toast
|
||||||
|
|
||||||
|
import share from './utils/share.js'
|
||||||
|
Vue.mixin(share)
|
||||||
// #ifndef VUE3
|
// #ifndef VUE3
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"navigationBarBackgroundColor": "#339967",
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/publish/publishTransfer/publishTransfer",
|
"path": "pages/publish/publishTransfer/publishTransfer",
|
||||||
|
|||||||
@@ -27,163 +27,163 @@
|
|||||||
<rich-text :nodes="content"></rich-text>
|
<rich-text :nodes="content"></rich-text>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
color: '#CC3333',
|
color: '#CC3333',
|
||||||
btnText: '提交审核',
|
btnText: '提交审核',
|
||||||
member: '',
|
member: '',
|
||||||
show: false,
|
show: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
btnDisabled: false,
|
btnDisabled: false,
|
||||||
content: `申请已提交, 请等待后台审核`,
|
content: `申请已提交, 请等待后台审核`,
|
||||||
submitForm: {
|
submitForm: {
|
||||||
real_name: '',
|
real_name: '',
|
||||||
idcard: ''
|
idcard: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.getInfo()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getInfo() {
|
|
||||||
this.$api.getUser().then(res => {
|
|
||||||
var data = res.data.data
|
|
||||||
if (data) {
|
|
||||||
this.member = data.member
|
|
||||||
if (data.member == 1) {
|
|
||||||
this.disabled = true
|
|
||||||
this.btnDisabled = true
|
|
||||||
this.color = "#C6C6C6"
|
|
||||||
this.btnText = "审核中…"
|
|
||||||
}
|
|
||||||
// else if (data.member == 2) {
|
|
||||||
// this.disabled = false
|
|
||||||
// this.btnDisabled = false
|
|
||||||
// this.color = "#CC3333"
|
|
||||||
// this.btnText = "联系客服"
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
confirm() {
|
onShow() {
|
||||||
uni.reLaunch({
|
this.getInfo()
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
// if (this.needAsk == 1) {
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url: '/pages/index/index'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
submit() {
|
methods: {
|
||||||
if (this.member == 0) {
|
getInfo() {
|
||||||
let reg =
|
this.$api.getUser().then(res => {
|
||||||
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; //正则表达式定义身份证号正确格式
|
var data = res.data.data
|
||||||
if (!reg.test(this.submitForm.idcard)) { //判断身份证号格式时候正确
|
if (data) {
|
||||||
this.$toast.warn('请输入正确的身份证号格式')
|
this.member = data.member
|
||||||
return false
|
if (data.member == 1) {
|
||||||
}
|
this.disabled = true
|
||||||
if (this.submitForm.real_name == "") {
|
this.btnDisabled = true
|
||||||
this.$toast.warn('请完善数据')
|
this.color = "#C6C6C6"
|
||||||
return false
|
this.btnText = "审核中…"
|
||||||
}
|
|
||||||
if (this.submitForm.real_name && this.submitForm.idcard) {
|
|
||||||
let data = {
|
|
||||||
...this.submitForm,
|
|
||||||
uid: uni.getStorageSync('uid')
|
|
||||||
}
|
|
||||||
console.log('成', data);
|
|
||||||
this.$api.toBePartner(data).then(res => {
|
|
||||||
if (res.data.msg == "提交成功") {
|
|
||||||
this.show = true
|
|
||||||
}
|
}
|
||||||
})
|
// else if (data.member == 2) {
|
||||||
|
// this.disabled = false
|
||||||
|
// this.btnDisabled = false
|
||||||
|
// this.color = "#CC3333"
|
||||||
|
// this.btnText = "联系客服"
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/my/my'
|
||||||
|
})
|
||||||
|
// if (this.needAsk == 1) {
|
||||||
|
// uni.reLaunch({
|
||||||
|
// url: '/pages/index/index'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
if (this.member == 0) {
|
||||||
|
let reg =
|
||||||
|
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; //正则表达式定义身份证号正确格式
|
||||||
|
if (!reg.test(this.submitForm.idcard)) { //判断身份证号格式时候正确
|
||||||
|
this.$toast.warn('请输入正确的身份证号格式')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.submitForm.real_name == "") {
|
||||||
|
this.$toast.warn('请完善数据')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.submitForm.real_name && this.submitForm.idcard) {
|
||||||
|
let data = {
|
||||||
|
...this.submitForm,
|
||||||
|
uid: uni.getStorageSync('uid')
|
||||||
|
}
|
||||||
|
// console.log('成', data);
|
||||||
|
this.$api.toBePartner(data).then(res => {
|
||||||
|
if (res.data.msg == "提交成功") {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.member == 2) {
|
||||||
|
// console.log('联系客服');
|
||||||
}
|
}
|
||||||
} else if (this.member == 2) {
|
|
||||||
console.log('联系客服');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
</script>
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.service-btn {
|
.service-btn {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background-color: #CC3333;
|
background-color: #CC3333;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.hhr {
|
|
||||||
margin-top: 50rpx;
|
|
||||||
margin-bottom: 50rpx;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.hhr-text {
|
|
||||||
margin-top: 28rpx;
|
|
||||||
width: 186rpx;
|
|
||||||
height: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: PingFang-SC, PingFang-SC;
|
|
||||||
font-weight: 800;
|
|
||||||
color: #F20C0C;
|
|
||||||
line-height: 50rpx;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.u-modal__button-group__wrapper--hover {
|
.hhr {
|
||||||
background: #0EBB5B !important;
|
margin-top: 50rpx;
|
||||||
}
|
margin-bottom: 50rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.input-class {
|
.hhr-text {
|
||||||
font-weight: 1rpx;
|
margin-top: 28rpx;
|
||||||
color: #A0A0A0;
|
// width: 186rpx;
|
||||||
}
|
height: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: PingFang-SC, PingFang-SC;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #F20C0C;
|
||||||
|
line-height: 50rpx;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.u-modal__button-group__wrapper--hover {
|
||||||
width: 80%;
|
background: #0EBB5B !important;
|
||||||
margin-top: 50rpx;
|
}
|
||||||
translate: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name,
|
.input-class {
|
||||||
.id {
|
font-weight: 1rpx;
|
||||||
padding: 10rpx;
|
color: #A0A0A0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.submit-btn {
|
||||||
margin-left: 20rpx;
|
width: 80%;
|
||||||
}
|
margin-top: 50rpx;
|
||||||
|
translate: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
.payment {
|
.name,
|
||||||
margin-top: 20rpx;
|
.id {
|
||||||
display: flex;
|
padding: 10rpx;
|
||||||
justify-content: space-between;
|
}
|
||||||
|
|
||||||
}
|
.text {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.left-payment {
|
.payment {
|
||||||
display: flex;
|
margin-top: 20rpx;
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
}
|
justify-content: space-between;
|
||||||
|
|
||||||
.label {
|
}
|
||||||
margin-top: 10rpx;
|
|
||||||
margin-left: 17rpx;
|
.left-payment {
|
||||||
color: #c1c1c1;
|
display: flex;
|
||||||
/* font-size: 27rpx; */
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.label {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
margin-left: 17rpx;
|
||||||
|
color: #c1c1c1;
|
||||||
|
/* font-size: 27rpx; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,6 +9,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<u-grid :col="3">
|
<u-grid :col="3">
|
||||||
|
<u-grid-item>
|
||||||
|
<view class="grid-textup">{{shopInfo.mianji}}m²</view>
|
||||||
|
<view class="grid-text">面积</view>
|
||||||
|
</u-grid-item>
|
||||||
<u-grid-item>
|
<u-grid-item>
|
||||||
<view class="grid-textup">{{shopInfo.zujin}}元/月</view>
|
<view class="grid-textup">{{shopInfo.zujin}}元/月</view>
|
||||||
<view class="grid-text">租金</view>
|
<view class="grid-text">租金</view>
|
||||||
@@ -18,10 +22,6 @@
|
|||||||
<view v-if="search" class="grid-text">转让费</view>
|
<view v-if="search" class="grid-text">转让费</view>
|
||||||
<view v-else class="grid-text">预计投资</view>
|
<view v-else class="grid-text">预计投资</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item>
|
|
||||||
<view class="grid-textup">{{shopInfo.mianji}}m²</view>
|
|
||||||
<view class="grid-text">面积</view>
|
|
||||||
</u-grid-item>
|
|
||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
<text>行业:{{shopInfo.trade1+'-'}}{{shopInfo.trade2}}</text>
|
<text>行业:{{shopInfo.trade1+'-'}}{{shopInfo.trade2}}</text>
|
||||||
<text>区域:{{shopInfo.area1}}</text>
|
<text>区域:{{shopInfo.area1}}</text>
|
||||||
<text v-if="search">地址:{{shopInfo.adress}}</text>
|
<text v-if="search">地址:{{shopInfo.adress}}</text>
|
||||||
|
<view class="xq_rz" v-if="shopInfo.is_auth=='1'">
|
||||||
|
<image src="../../static/shoplist/xq_rz.png" style="width: 240rpx;height: 171rpx;"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bgc">
|
<view class="bgc">
|
||||||
|
|
||||||
@@ -42,7 +45,14 @@
|
|||||||
<u-cell :title="shopInfo.lianxiren" :label="shopInfo.mobile" :border="false"></u-cell>
|
<u-cell :title="shopInfo.lianxiren" :label="shopInfo.mobile" :border="false"></u-cell>
|
||||||
</view>
|
</view>
|
||||||
<u-divider :height="5"></u-divider>
|
<u-divider :height="5"></u-divider>
|
||||||
<u-cell title="店铺介绍" :label="shopInfo.content" label-style="color = #5D5D5D;font-size: 24rpx;"></u-cell>
|
<u-cell title="店铺介绍" :label="shopInfo.content" label-style="color = #5D5D5D;font-size: 24rpx;">
|
||||||
|
<view slot="label" class="shop-content">
|
||||||
|
<view class="u-flex">
|
||||||
|
<view>{{ shopInfo.content }}</view>
|
||||||
|
<view style="color: #CC3333;">联系我时,请说是在速配商铺上看到的,谢谢!</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-cell>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
@@ -88,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
|
||||||
@@ -101,17 +111,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: this.shopInfo.tt,
|
||||||
|
imageUrl: this.shopInfo.pics[0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShareTimeline() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
phonecall() {
|
phonecall() {
|
||||||
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 = {}
|
||||||
@@ -121,7 +140,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
|
||||||
}
|
}
|
||||||
@@ -134,10 +153,10 @@
|
|||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: phone,
|
phoneNumber: phone,
|
||||||
success: function() {
|
success: function() {
|
||||||
console.log('拨打电话成功');
|
// console.log('拨打电话成功');
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
console.log('打电话失败了');
|
// console.log('打电话失败了');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -204,6 +223,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.location-detail {
|
.location-detail {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
// margin-top: 50rpx;
|
// margin-top: 50rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -211,6 +231,12 @@
|
|||||||
padding-left: 16rpx;
|
padding-left: 16rpx;
|
||||||
line-height: 33px;
|
line-height: 33px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
|
.xq_rz {
|
||||||
|
position: absolute;
|
||||||
|
top: 30rpx;
|
||||||
|
right: 15rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.seller-shop-detail {
|
.seller-shop-detail {
|
||||||
@@ -231,6 +257,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shop-content {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #5D5D5D;
|
||||||
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
@@ -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);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="search-box-bg">
|
<view class="sticky">
|
||||||
<view class="bug-fix"></view>
|
<view class="search-box-bg">
|
||||||
<view class="search-box">
|
<view class="bug-fix"></view>
|
||||||
<view class="search-box-input">
|
<view class="search-box">
|
||||||
<u-input v-model="keyword" placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<view class="search-box-input">
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
</u-input>
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||||
|
</u-input>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
|
||||||
</view>
|
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="3" :shopInfoList="shopInfoList" />
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="3" :shopInfoList="shopInfoList" />
|
||||||
</view>
|
</view>
|
||||||
@@ -56,15 +59,15 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.shopListLength !== 0) {
|
if (this.shopListLength !== 0) {
|
||||||
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
|
||||||
}
|
}
|
||||||
@@ -73,20 +76,25 @@
|
|||||||
this.getShopList()
|
this.getShopList()
|
||||||
},
|
},
|
||||||
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
|
||||||
}
|
}
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 3,
|
type: 3,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
kw:val
|
kw: val
|
||||||
})
|
})
|
||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -96,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
|
||||||
@@ -111,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,
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="search-box-bg">
|
<view class="sticky">
|
||||||
<view class="bug-fix"></view>
|
<view class="search-box-bg">
|
||||||
<view class="search-box">
|
<view class="bug-fix"></view>
|
||||||
<view class="search-box-input">
|
<view class="search-box">
|
||||||
<u-input v-model="keyword" placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<view class="search-box-input">
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
</u-input>
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||||
|
</u-input>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
|
||||||
</view>
|
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4" :shopInfoList="shopInfoList" />
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4" :shopInfoList="shopInfoList" />
|
||||||
</view>
|
</view>
|
||||||
@@ -56,7 +59,7 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -64,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
|
||||||
}
|
}
|
||||||
@@ -74,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
|
||||||
}
|
}
|
||||||
@@ -87,6 +90,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -96,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
|
||||||
@@ -115,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,
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="search-box-bg">
|
<view class="sticky">
|
||||||
<view class="bug-fix"></view>
|
<view class="search-box-bg">
|
||||||
<view class="search-box">
|
<view class="bug-fix"></view>
|
||||||
<view class="search-box-input">
|
<view class="search-box">
|
||||||
<u-input v-model="keyword" placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<view class="search-box-input">
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
</u-input>
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||||
|
</u-input>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
|
||||||
</view>
|
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||||
</view>
|
</view>
|
||||||
@@ -55,11 +58,12 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (!this.refresh && this.searchListLength !== 0) {
|
if (!this.refresh && this.searchListLength !== 0) {
|
||||||
this.keyword=''
|
this.keyword = ''
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
console.log("触底加载");
|
||||||
@@ -71,20 +75,25 @@
|
|||||||
this.getShopList()
|
this.getShopList()
|
||||||
},
|
},
|
||||||
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
|
||||||
}
|
}
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 2,
|
type: 2,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
kw:val
|
kw: val
|
||||||
})
|
})
|
||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -94,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
|
||||||
@@ -113,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,
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="search-box-bg">
|
<view class="sticky">
|
||||||
<view class="bug-fix"></view>
|
<view class="search-box-bg">
|
||||||
<view class="search-box">
|
<view class="bug-fix"></view>
|
||||||
<view class="search-box-input">
|
<view class="search-box">
|
||||||
<u-input v-model="keyword" placeholder="请输入店铺名称进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<view class="search-box-input">
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
</u-input>
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||||
|
</u-input>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
|
||||||
</view>
|
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList" />
|
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList" />
|
||||||
</view>
|
</view>
|
||||||
@@ -55,12 +58,12 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (!this.refresh && this.shopListLength !== 0) {
|
if (!this.refresh && this.shopListLength !== 0) {
|
||||||
this.keyword=''
|
this.keyword = ''
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
console.log("触底加载");
|
||||||
@@ -73,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
|
||||||
}
|
}
|
||||||
@@ -86,6 +89,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -95,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
|
||||||
@@ -113,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,
|
||||||
@@ -155,8 +163,6 @@
|
|||||||
|
|
||||||
.search-box-bg {
|
.search-box-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
|
||||||
z-index: 3;
|
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
|
|
||||||
.bug-fix {
|
.bug-fix {
|
||||||
|
|||||||
@@ -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,25 +188,27 @@
|
|||||||
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));
|
let province = re.result.ad_info.province
|
||||||
|
// 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);
|
||||||
uni.setStorageSync('district', district);
|
uni.setStorageSync('district', district);
|
||||||
|
uni.setStorageSync('province', province);
|
||||||
that.getRegionList()
|
that.getRegionList()
|
||||||
// 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 +225,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -242,7 +244,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 +261,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,12 +273,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 +300,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('取消');
|
// console.log('取消');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,7 +312,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: function() {
|
fail: function() {
|
||||||
console.log('授权失败');
|
// console.log('授权失败');
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启',
|
content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启',
|
||||||
confirmText: "确认",
|
confirmText: "确认",
|
||||||
@@ -319,12 +321,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,21 +118,7 @@
|
|||||||
// alpha: 1
|
// alpha: 1
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
shopList: {
|
shopList: {}
|
||||||
shopid: 1,
|
|
||||||
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
|
||||||
title: '琴行铺面转让',
|
|
||||||
promotionNum: 23,
|
|
||||||
price: 6000,
|
|
||||||
date: '2023-11-02',
|
|
||||||
pos: '锦江区',
|
|
||||||
exactPos: '锦江区-汇源南路366号',
|
|
||||||
sqr: 100,
|
|
||||||
zrfText: "转让费:20万",
|
|
||||||
category: '餐饮美食',
|
|
||||||
uname: "张先生",
|
|
||||||
phoneNum: 13348946108,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -143,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(() => {
|
||||||
@@ -161,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 => {
|
||||||
@@ -186,49 +172,35 @@
|
|||||||
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 = data
|
this.shopList = {
|
||||||
// {
|
...data,
|
||||||
// shopid: 1,
|
id: id
|
||||||
// pics: this.$api.imgUrl + data.pics,
|
}
|
||||||
// tt: data.tt,
|
|
||||||
// num: data.num,
|
|
||||||
// zujin: data.zujin,
|
|
||||||
// date: data.update_time,
|
|
||||||
// area1: data.area1,
|
|
||||||
// address: data.address,
|
|
||||||
// mianji: data.mianji,
|
|
||||||
// zhuanrangfei: "转让费:" + data.zhuanrangfei,
|
|
||||||
// trade: data.trade,
|
|
||||||
// lianxiren: data.lianxiren,
|
|
||||||
// mobile: data.mobile,
|
|
||||||
// }
|
|
||||||
// data.pics = [this.$api.imgUrl + data.pics]
|
|
||||||
// this.shopInfo = data
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
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) {
|
||||||
@@ -257,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)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -109,6 +109,9 @@
|
|||||||
uni.setStorageSync("uid", data.user_id)
|
uni.setStorageSync("uid", data.user_id)
|
||||||
uni.setStorageSync("member", data.member)
|
uni.setStorageSync("member", data.member)
|
||||||
}
|
}
|
||||||
|
if (res.data.msg == "登录超时,请重新登录") {
|
||||||
|
this.isLoad = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
||||||
@@ -279,13 +280,13 @@
|
|||||||
})
|
})
|
||||||
this.pid = res.data.data.map((item) => {
|
this.pid = res.data.data.map((item) => {
|
||||||
return item = item.id
|
return item = item.id
|
||||||
|
|
||||||
})
|
})
|
||||||
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,21 +310,25 @@
|
|||||||
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);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAddressList(value) {
|
getAddressList(value) {
|
||||||
|
let address = this.form.region.split('-')[1] + value
|
||||||
|
// console.log('uni.getStorageSync()', uni.getStorageSync('province'), uni.getStorageSync('city'));
|
||||||
var that = this
|
var that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
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=' + uni.getStorageSync('province') + uni
|
||||||
|
.getStorageSync('city') + that.form.region.split('-')[0] + address + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
|
// console.log('地址转经纬度', that.form.region.split('-')[0], address, 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
|
||||||
@@ -345,16 +350,16 @@
|
|||||||
},
|
},
|
||||||
karmaConfirm(e) {
|
karmaConfirm(e) {
|
||||||
this.show3 = false
|
this.show3 = false
|
||||||
|
|
||||||
},
|
},
|
||||||
regionConfirm(e) {
|
regionConfirm(e) {
|
||||||
this.show1 = false
|
this.show1 = false
|
||||||
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 = {
|
||||||
@@ -411,13 +416,13 @@
|
|||||||
})
|
})
|
||||||
this.pid = res.data.data.map((item) => {
|
this.pid = res.data.data.map((item) => {
|
||||||
return item = item.id
|
return item = item.id
|
||||||
|
|
||||||
})
|
})
|
||||||
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({
|
||||||
@@ -345,12 +345,16 @@
|
|||||||
uni.$u.toast('请先选择区域')
|
uni.$u.toast('请先选择区域')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
let address = this.form.region.split('-')[1] + value
|
||||||
|
// console.log('uni.getStorageSync()', uni.getStorageSync('province'), uni.getStorageSync('city'));
|
||||||
var that = this
|
var that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
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=' + uni.getStorageSync('province') + uni
|
||||||
|
.getStorageSync('city') + that.form.region.split('-')[0] + address + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('diz', res.data.result.location);
|
// console.log('地址转经纬度', that.form.region.split('-')[0], address, res.data);
|
||||||
|
// 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 +379,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 +406,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 +451,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({
|
||||||
@@ -345,13 +345,15 @@
|
|||||||
uni.$u.toast('请先选择区域')
|
uni.$u.toast('请先选择区域')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
let address = this.form.region.split('-')[1] + value
|
||||||
var that = this
|
var that = this
|
||||||
|
// console.log('uni.getStorageSync()', uni.getStorageSync('province'), uni.getStorageSync('city'));
|
||||||
uni.request({
|
uni.request({
|
||||||
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=' + uni.getStorageSync('province') + uni
|
||||||
|
.getStorageSync('city') + that.form.region.split('-')[0] + address + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('地址转经纬度', that.form.region, res.data);
|
// console.log('地址转经纬度', that.form.region.split('-')[0], address, 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 +378,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 +405,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 +449,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) {
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="search-box">
|
<view class="search-bg sticky">
|
||||||
<view class="search-box-input">
|
<view class="search-box">
|
||||||
<u-input placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<view class="search-box-input">
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true">
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
</u-input>
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||||
|
</u-input>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<ShowShopList v-if="listId == 0" :isEdit="true" :showStyle="1" :shopInfoList="searchInfoList" @delItem="handleDel"
|
<ShowShopList v-if="listId == 0" :isEdit="true" :showStyle="1" :shopInfoList="searchInfoList" @delItem="handleDel"
|
||||||
@updateItem="handleUpdate1"></ShowShopList>
|
@updateItem="handleUpdate1"></ShowShopList>
|
||||||
@@ -19,6 +22,10 @@
|
|||||||
@delItem="handleDel" @updateItem="handleUpdate4"></ShowShopList>
|
@delItem="handleDel" @updateItem="handleUpdate4"></ShowShopList>
|
||||||
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
|
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="showNull" class="showNull">
|
||||||
|
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -37,18 +44,84 @@
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
matchPageSize: 5,
|
matchPageSize: 5,
|
||||||
matchPageNum: 1,
|
matchPageNum: 1,
|
||||||
|
keyword: '',
|
||||||
|
refresh: false,
|
||||||
|
showNull: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.refresh = true
|
||||||
|
if (this.listId !== 4) {
|
||||||
|
this.getMyPublished(this.listId + 1, this.pageSize, 1)
|
||||||
|
} else {
|
||||||
|
this.getMatch(this.matchPageSize, 1)
|
||||||
|
}
|
||||||
|
this.keyword = ''
|
||||||
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.listId !== 4 && 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.matchListLength !== 0) {
|
} else if (this.listId == 4 && !this.refresh && this.matchListLength !== 0) {
|
||||||
this.matchPageNum++
|
this.matchPageNum++
|
||||||
this.getMatch()
|
this.getMatch(this.matchPageSize, this.matchPageNum)
|
||||||
|
} else if (this.searchListLength == 0) {
|
||||||
|
this.pageNum = 1
|
||||||
|
} else if (this.matchListLength == 0) {
|
||||||
|
this.matchPageNum = 1
|
||||||
}
|
}
|
||||||
|
this.keyword = ''
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getInput(val) {
|
||||||
|
// console.log('搜索值', val);
|
||||||
|
|
||||||
|
if (this.listId !== 4) {
|
||||||
|
if (this.pageNum !== 1) {
|
||||||
|
this.pageNum = 1
|
||||||
|
}
|
||||||
|
this.$api.getMyPublished({
|
||||||
|
type: this.listId + 1,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
title: val
|
||||||
|
}).then(res => {
|
||||||
|
// console.log('发布信息', res);
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
this.searchListLength = res.data.data.length
|
||||||
|
this.searchInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if (this.matchPageNum !== 1) {
|
||||||
|
this.matchPageNum = 1
|
||||||
|
}
|
||||||
|
this.$api.getMyMatch({
|
||||||
|
pageSize: this.matchPageSize,
|
||||||
|
pageNum: this.matchPageNum,
|
||||||
|
title: val
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
this.matchListLength = res.data.data[0].length
|
||||||
|
this.matchList = res.data.data[0]
|
||||||
|
if (res.data.data[0].length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
handleUpdate1(searchid) {
|
handleUpdate1(searchid) {
|
||||||
console.log('页面更新');
|
console.log('页面更新');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -78,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: '提示',
|
||||||
@@ -103,14 +176,25 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
getMatch() {
|
getMatch(pageSize, pageNum) {
|
||||||
this.$api.getMyMatch({
|
this.$api.getMyMatch({
|
||||||
pageSize: this.matchPageSize,
|
pageSize: pageSize,
|
||||||
pageNum: this.matchPageNum
|
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
|
||||||
this.matchList = [...this.matchList, ...res.data.data[0]]
|
if (this.refresh) {
|
||||||
|
this.refresh = false
|
||||||
|
if (res.data.data[0].length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
|
this.matchList = res.data.data[0]
|
||||||
|
} else {
|
||||||
|
this.matchList = [...this.matchList, ...res.data.data[0]]
|
||||||
|
}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
}
|
}
|
||||||
@@ -122,14 +206,21 @@
|
|||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
pageNum: pageNum
|
pageNum: pageNum
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('发布信息', res);
|
// 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) {
|
if (isDelete == 1 || this.refresh) {
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
|
this.refresh = false
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
}
|
}
|
||||||
@@ -137,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
|
||||||
@@ -162,9 +253,8 @@
|
|||||||
|
|
||||||
if (this.titletext == '我的匹配') {
|
if (this.titletext == '我的匹配') {
|
||||||
this.listId = 4
|
this.listId = 4
|
||||||
this.getMatch()
|
this.getMatch(this.matchPageSize, this.matchPageNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
@@ -173,6 +263,20 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.showNull {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100rpx;
|
||||||
|
color: darkgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bg {
|
||||||
|
height: 28px;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -182,7 +286,6 @@
|
|||||||
|
|
||||||
.search-box-input {
|
.search-box-input {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
margin-top: 20rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="root">
|
<view class="root">
|
||||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh"></InputAndSwiper>
|
<view class="sticky">
|
||||||
|
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" ref="input"></InputAndSwiper>
|
||||||
<view>
|
|
||||||
<view class="dropdown-bug">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
</view>
|
||||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
<view class="marginLR10">
|
||||||
</view>
|
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showNull" class="showNull">
|
<view v-if="showNull" class="showNull">
|
||||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||||
@@ -36,12 +32,12 @@
|
|||||||
customQuery: {},
|
customQuery: {},
|
||||||
searchListLength: '',
|
searchListLength: '',
|
||||||
showNull: false,
|
showNull: false,
|
||||||
refresh: false,
|
refresh: false
|
||||||
isRefresh: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.refresh = true
|
this.refresh = true
|
||||||
|
this.$refs.input.resetInfo()
|
||||||
// if (this.showNull = true) {
|
// if (this.showNull = true) {
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 2,
|
type: 2,
|
||||||
@@ -58,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (!this.refresh && this.searchListLength !== 0) {
|
if (!this.refresh && this.searchListLength !== 0) {
|
||||||
this.isRefresh = true
|
this.$refs.input.resetInfo()
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
console.log("触底加载");
|
||||||
@@ -81,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
|
||||||
}
|
}
|
||||||
@@ -94,6 +90,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -103,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
|
||||||
@@ -118,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,
|
||||||
@@ -143,7 +144,11 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.showNull {
|
.showNull {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -153,22 +158,10 @@
|
|||||||
color: darkgray;
|
color: darkgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
page {
|
|
||||||
background-color: $uni-bg-color-grey;
|
|
||||||
}
|
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-bug {
|
|
||||||
position: absolute;
|
|
||||||
background-color: $uni-bg-color-grey;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 100%;
|
|
||||||
transform: translateY(-20rpx);
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.marginLR10 {
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
|||||||
@@ -1,22 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="root">
|
<view class="root">
|
||||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh">
|
<view class="sticky">
|
||||||
</InputAndSwiper>
|
<InputAndSwiper @getQueryInfo="getInput" ref="input" :bannerURL="swiperList">
|
||||||
|
</InputAndSwiper>
|
||||||
<view>
|
<view class="marginLR10 ">
|
||||||
<view class="dropdown-bug">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="marginLR10">
|
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
|
||||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showNull" class="showNull">
|
<view class="marginLR10">
|
||||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
||||||
</text>
|
<view v-if="showNull" class="showNull">
|
||||||
|
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<TabBar :current-page="1"></TabBar>
|
<TabBar :current-page="1"></TabBar>
|
||||||
</view>
|
</view>
|
||||||
@@ -24,6 +20,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||||
|
import {
|
||||||
|
nextTick
|
||||||
|
} from "vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
DropDownItem
|
DropDownItem
|
||||||
@@ -37,8 +36,7 @@
|
|||||||
swiperList: [],
|
swiperList: [],
|
||||||
shopListLength: '',
|
shopListLength: '',
|
||||||
showNull: false,
|
showNull: false,
|
||||||
refresh: false,
|
refresh: false
|
||||||
isRefresh: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -54,11 +52,12 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.$refs.input.resetInfo()
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (!this.refresh && this.shopListLength !== 0) {
|
if (!this.refresh && this.shopListLength !== 0) {
|
||||||
this.isRefresh = true
|
this.$refs.input.resetInfo()
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
console.log("触底加载");
|
||||||
@@ -81,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
|
||||||
}
|
}
|
||||||
@@ -94,6 +93,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -103,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
|
||||||
@@ -121,8 +125,9 @@
|
|||||||
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) {
|
||||||
@@ -141,32 +146,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
page {
|
||||||
background-color: $uni-bg-color-grey;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss" scoped>
|
||||||
.showNull {
|
.showNull {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
color: darkgray;
|
color: darkgray;
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;
|
||||||
|
// background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-bug {
|
|
||||||
position: absolute;
|
|
||||||
background-color: $uni-bg-color-grey;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 100%;
|
|
||||||
transform: translateY(-20rpx);
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.marginLR10 {
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const serverHost = 'https://spsp.feashow.com/api' //http://xx.xxx.xx
|
const serverHost = 'https://spsp.feashow.com/api' //http://xx.xxx.xx
|
||||||
function isOutTime(res) {
|
function isOutTime(res) {
|
||||||
if (res.data.msg == '登录超时,请重新登录') {
|
if (res.data.msg == '登录超时,请重新登录') {
|
||||||
uni.showToast('登录信息已过期,请重新登录')
|
// uni.showToast('登录信息已过期,请重新登录')
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
@@ -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))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
BIN
static/shoplist/xq_rz.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 1008 B |
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
8
uni.scss
@@ -74,3 +74,11 @@ $uni-color-subtitle: #555555; // 二级标题颜色
|
|||||||
$uni-font-size-subtitle:26px;
|
$uni-font-size-subtitle:26px;
|
||||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||||
$uni-font-size-paragraph:15px;
|
$uni-font-size-paragraph:15px;
|
||||||
|
|
||||||
|
|
||||||
|
.sticky {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 9;
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
}
|
||||||
10
utils/share.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export default {
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: ' '
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShareTimeline() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||