梁航:合并冲突
This commit is contained in:
@@ -55,7 +55,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.postlist[1]=JSON.parse(uni.getStorageSync('regionList'))
|
this.postlist[0]=JSON.parse(uni.getStorageSync('classList'))
|
||||||
|
// this.postlist[1]=JSON.parse(uni.getStorageSync('regionList'))
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeActiveIndex(index) {
|
changeActiveIndex(index) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
:key="shopid"
|
:key="shopid"
|
||||||
:shopInfo="item"
|
:shopInfo="item"
|
||||||
:is-adshow="isADshow"
|
:is-adshow="isADshow"
|
||||||
|
:adlinkPath="adlinkPath"
|
||||||
:show-style="showStyle"
|
:show-style="showStyle"
|
||||||
:is-edit="isEdit"
|
:is-edit="isEdit"
|
||||||
@delItem="handleDel"
|
@delItem="handleDel"
|
||||||
@@ -39,17 +40,44 @@
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
adlinkPath: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
isEdit: {
|
isEdit: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//获取列表类型传递参数部分
|
||||||
|
listType:{
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageSize: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageNum: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
},
|
||||||
shopInfoList: {
|
shopInfoList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
id: 1,
|
||||||
|
type: 1,
|
||||||
shopid: 1,
|
shopid: 1,
|
||||||
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
||||||
title: '琴行铺面转让',
|
title: '琴行铺面转让',
|
||||||
@@ -65,26 +93,45 @@
|
|||||||
phoneNum: 13348946108,
|
phoneNum: 13348946108,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shopid: 2,
|
"id": "1",
|
||||||
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
"pic": "3",
|
||||||
title: '琴行铺面转让',
|
"tt": "333",
|
||||||
promotionNum: 23,
|
"type": "0",
|
||||||
price: 5000,
|
"adress": "",
|
||||||
date: '2023-11-02',
|
"trade1": "啊",
|
||||||
pos: '锦江区',
|
"trade2": "餐馆",
|
||||||
exactPos: '锦江区-汇源南路366号',
|
"btype1": "",
|
||||||
sqr: 200,
|
"btype2": "",
|
||||||
zrfText: "转让费:20000万",
|
"area1": "青羊区",
|
||||||
category: '餐饮美食',
|
"area2": "",
|
||||||
uname: "王先生",
|
"mianji": "33",
|
||||||
phoneNum: 13348946108,
|
"zhuanrangfei": "44",
|
||||||
|
"zujin": "44",
|
||||||
|
"hits": "0",
|
||||||
|
"58url": "",
|
||||||
|
"personurl": "",
|
||||||
|
"kw": "",
|
||||||
|
"remark": "",
|
||||||
|
"content": "44vv",
|
||||||
|
"pics": "",
|
||||||
|
"user_level_id": "1",
|
||||||
|
"lianxiren": "3333",
|
||||||
|
"mobile": "44444",
|
||||||
|
"status": "1",
|
||||||
|
"shangpulx": "1",
|
||||||
|
"zhuangtai": "1",
|
||||||
|
"lng": "2222.00000000",
|
||||||
|
"lat": "3333.00000000",
|
||||||
|
"pub_time": "0",
|
||||||
|
"create_time": "1699973131",
|
||||||
|
"update_time": "1699973131",
|
||||||
|
"delete_time": "0",
|
||||||
|
"userid": "1",
|
||||||
|
"success": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDel(shopid){
|
handleDel(shopid){
|
||||||
@@ -93,7 +140,21 @@
|
|||||||
// TODO:不能直接修改
|
// TODO:不能直接修改
|
||||||
// if(delindex !== -1) this.shopInfoList = this.shopInfoList.slice(delindex,1)
|
// if(delindex !== -1) this.shopInfoList = this.shopInfoList.slice(delindex,1)
|
||||||
// console.log(this.shopInfoList);
|
// console.log(this.shopInfoList);
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
const query = this.$u.queryParams({
|
||||||
|
type: this.listType,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum
|
||||||
|
})
|
||||||
|
this.$api.getShopList(query).then(res => {
|
||||||
|
console.log("shoplist",res.data.data);
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="list-border">
|
<view class="list-border">
|
||||||
<view class="list-container" @click="enterDetail()">
|
<view class="list-container" @click="enterDetail()">
|
||||||
<view class="shop-list-img" >
|
<view class="shop-list-img" >
|
||||||
<u-image width="80px" height="80px" :src="shopInfo.imageUrl" radius="8px"></u-image>
|
<u-image width="80px" height="80px" :src="shopInfo.pics" radius="8px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-area">
|
<view class="text-area">
|
||||||
<text style="font-weight: 500;">{{shopInfo.title}}</text>
|
<text style="font-weight: 500;">{{shopInfo.title}}</text>
|
||||||
@@ -11,13 +11,13 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/sy_icon_lbdw.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/sy_icon_lbdw.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.pos}}</text>
|
<text>{{shopInfo.area1}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.sqr}}m2</text>
|
<text>{{shopInfo.mianji}}m2</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="pos-and-sqr pos-only" >
|
<view v-else class="pos-and-sqr pos-only" >
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/dp_icon_hhhdw.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/dp_icon_hhhdw.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.exactPos}}</text>
|
<text>{{shopInfo.area2}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rent-and-date">
|
<view class="rent-and-date">
|
||||||
<text>租金:{{shopInfo.price}}元/月</text>
|
<text>租金:{{shopInfo.zujin}}元/月</text>
|
||||||
<text v-if="showStyle == 0">发布日期:{{shopInfo.date}}</text>
|
<text v-if="showStyle == 0">发布日期:{{shopInfo.create_time}}</text>
|
||||||
<text v-if="showStyle == 1">{{shopInfo.zrfText}}</text>
|
<text v-if="showStyle == 1">转让费:{{shopInfo.zhuanrangfei}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -41,25 +41,25 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.sqr}}m2</text>
|
<text>{{shopInfo.mianji}}m2</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/sy_icon_lblhy.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/sy_icon_lblhy.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.category}}</text>
|
<text>{{shopInfo.trade1}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/sy_icon_lbxm.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/sy_icon_lbxm.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.uname}}</text>
|
<text>{{shopInfo.lianxiren}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<u-image src="/static/shoplist/sy_icon_lblxr.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/sy_icon_lblxr.png" width="12px" height="15px"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<text>{{shopInfo.phoneNum}}</text>
|
<text>{{shopInfo.mobile}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
v-if="isADShow"
|
v-if="isADShow"
|
||||||
class="list-ads bottom-common"
|
class="list-ads bottom-common"
|
||||||
style="font-size: 11px;"
|
style="font-size: 11px;"
|
||||||
@click="handleAD()"
|
@click="handleAD"
|
||||||
>
|
>
|
||||||
<view>
|
<view>
|
||||||
<text>已将该店推给</text>
|
<text>已将该店推给</text>
|
||||||
@@ -78,11 +78,11 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="isEdit" class="del-and-edit bottom-common">
|
<view v-if="isEdit" class="del-and-edit bottom-common">
|
||||||
<view class="edit" @click="handleEdit(shopInfo.shopid)">
|
<view class="edit" @click="handleEdit(shopInfo.id)">
|
||||||
<u-image src="/static/shoplist/dp_icon_pj.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/dp_icon_pj.png" width="12px" height="15px"></u-image>
|
||||||
<text>编辑</text>
|
<text>编辑</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="del" @click="handleDel(shopInfo.shopid)">
|
<view class="del" @click="handleDel(shopInfo.id)">
|
||||||
<u-image src="/static/shoplist/dp_icon_sc.png" width="12px" height="15px"></u-image>
|
<u-image src="/static/shoplist/dp_icon_sc.png" width="12px" height="15px"></u-image>
|
||||||
<text>删除</text>
|
<text>删除</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -95,7 +95,8 @@
|
|||||||
* @property {Object} shopInfo 传入商铺对象数据
|
* @property {Object} shopInfo 传入商铺对象数据
|
||||||
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
|
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
|
||||||
* @property {Boolean} isADshow 是否显示推广广告
|
* @property {Boolean} isADshow 是否显示推广广告
|
||||||
* @property {Boolean} isEdit 是否显示编辑和删除
|
* @property {Boolean} isEdit 是否显示编辑和删除
|
||||||
|
* @property {String} adlinkPath 推广广告链接
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -107,24 +108,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 展示商铺的样式类型
|
||||||
showStyle:{
|
showStyle:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 是否展示推广广告
|
||||||
isADShow: {
|
isADShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 推广广告链接
|
||||||
|
adlinkPath: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 是否可编辑
|
||||||
isEdit: {
|
isEdit: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -142,19 +154,34 @@
|
|||||||
console.log("点击了编辑ID为",shopid);
|
console.log("点击了编辑ID为",shopid);
|
||||||
},
|
},
|
||||||
handleDel(shopid) {
|
handleDel(shopid) {
|
||||||
|
// 需完善删除请求
|
||||||
this.$emit('delItem', shopid)
|
this.$emit('delItem', shopid)
|
||||||
},
|
},
|
||||||
enterDetail(){
|
enterDetail(){
|
||||||
|
// console.log("进入详情页面");
|
||||||
|
const query=this.$u.queryParams({
|
||||||
|
id: this.shopInfo.id,
|
||||||
|
type: this.shopInfo.type
|
||||||
|
})
|
||||||
|
// console.log("query",query);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/detail/detail'
|
url: '/pages/detail/detail' + `${query}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAD(){
|
handleAD(){
|
||||||
uni.navigateTo({
|
// TODO 完成页面跳转
|
||||||
url: '/pages/publish/publishTransfer/publishTransfer'
|
if (this.adlinkPath) {
|
||||||
})
|
uni.navigateTo({
|
||||||
|
url: this.adlinkPath
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/publish/publishTransfer/publishTransfer'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -29,15 +29,25 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import form from 'uview-ui/libs/config/props/form';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
|
submitForm:{
|
||||||
|
name:'',
|
||||||
|
idcode:''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit(){
|
submit(){
|
||||||
console.log('提交');
|
console.log('提交',form);
|
||||||
|
|
||||||
|
//this.$u.api.submit( this.form )
|
||||||
|
uni.$u.toast('提交成功')
|
||||||
|
|
||||||
},
|
},
|
||||||
confirmCheckWay(e){
|
confirmCheckWay(e){
|
||||||
|
|
||||||
@@ -74,7 +84,7 @@
|
|||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
margin-left: 17rpx;
|
margin-left: 17rpx;
|
||||||
color: #c1c1c1;
|
color: #c1c1c1;
|
||||||
font-size: 27rpx;
|
/* font-size: 27rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<DropDown></DropDown>
|
<DropDown></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2"/>
|
<ShowShopList :showStyle="2" :adlinkPath = "adlinkPath"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
adlinkPath: "/pages/publish/publishRent/publishRent"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<DropDown></DropDown>
|
<DropDown></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2"/>
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
adlinkPath: "/pages/publish/publishInvestment/publishInvestment"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
notice: [],
|
notice: [],
|
||||||
chooseIndex: 0,
|
chooseIndex: 0,
|
||||||
statNum: {},
|
statNum: {},
|
||||||
swiperList: []
|
swiperList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -74,7 +74,12 @@
|
|||||||
},
|
},
|
||||||
getClassList() {
|
getClassList() {
|
||||||
this.$api.getClassList().then(res => {
|
this.$api.getClassList().then(res => {
|
||||||
console.log(res.data.data);
|
let data = res.data.data
|
||||||
|
data.sort((a,b)=>{
|
||||||
|
return a.id - b.id
|
||||||
|
})
|
||||||
|
data = data.map(item => item.name)
|
||||||
|
uni.setStorageSync('classList', JSON.stringify(data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getRegionList() {
|
getRegionList() {
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<map id="map" @markertap="markerClick" @regionchange="handleRegionChange()" :markers="marker"
|
<map id="map" @markertap="markerClick" @regionchange="handleRegionChange()" :markers="marker" show-location="true"
|
||||||
:show-location="true" :latitude="lat" :longitude="lng" :show-scale="true"></map>
|
:latitude="lat" :longitude="lng" :show-scale="true"></map>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="down-shop">
|
<view class="down-shop" v-if="showShop">
|
||||||
<ShowShopListItem :shopInfo="shopList" :is-adshow="true" :show-style="0"></ShowShopListItem>
|
<ShowShopListItem :shopInfo="shopList" :is-adshow="true" :show-style="0"></ShowShopListItem>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
radius: '',
|
radius: '',
|
||||||
|
showShop: false,
|
||||||
scaleM: [{
|
scaleM: [{
|
||||||
scale: 3,
|
scale: 3,
|
||||||
milo: 1000000
|
milo: 1000000
|
||||||
@@ -82,29 +83,40 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
scale: '',
|
scale: '',
|
||||||
lat: '30.48772', //纬度
|
lat: uni.getStorageSync('latitude'), //纬度
|
||||||
lng: '104.080145', //经度
|
lng: uni.getStorageSync('longitude'), //经度
|
||||||
marker: [{ //用户当前位置
|
marker: [
|
||||||
id: 1,
|
// { //用户当前位置
|
||||||
latitude: 30.48772,
|
// id: 1,
|
||||||
longitude: 104.080145,
|
// latitude: uni.getStorageSync('latitude'),
|
||||||
iconPath: '../../../static/map/sp_icon_dw.png',
|
// longitude: uni.getStorageSync('longitude'),
|
||||||
width: '58rpx',
|
// // iconPath: '../../../static/map/sp_icon_hdw.png',
|
||||||
height: '72rpx',
|
// width: '58rpx',
|
||||||
rotate: 0,
|
// height: '72rpx',
|
||||||
alpha: 1
|
// rotate: 0,
|
||||||
},
|
// alpha: 1
|
||||||
//周围标记点
|
// },
|
||||||
{
|
// { //用户当前位置
|
||||||
id: 2,
|
// id: 2,
|
||||||
latitude: 30.488573,
|
// latitude: 30.48772,
|
||||||
longitude: 104.081248,
|
// longitude: 104.080145,
|
||||||
// iconPath: '../../../static/map/sp_icon_dw.png',
|
// iconPath: '../../../static/map/sp_icon_dw.png',
|
||||||
width: '58rpx',
|
// width: '58rpx',
|
||||||
height: '72rpx',
|
// height: '72rpx',
|
||||||
rotate: 0,
|
// rotate: 0,
|
||||||
alpha: 1
|
// alpha: 1
|
||||||
}
|
// },
|
||||||
|
// //周围标记点
|
||||||
|
// {
|
||||||
|
// id: 2,
|
||||||
|
// latitude: 30.488573,
|
||||||
|
// longitude: 104.081248,
|
||||||
|
// // iconPath: '../../../static/map/sp_icon_dw.png',
|
||||||
|
// width: '58rpx',
|
||||||
|
// height: '72rpx',
|
||||||
|
// rotate: 0,
|
||||||
|
// alpha: 1
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
shopList: {
|
shopList: {
|
||||||
shopid: 1,
|
shopid: 1,
|
||||||
@@ -149,9 +161,9 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
scale(newVal, oldVal) {
|
scale(newVal, oldVal) {
|
||||||
console.log('thisscale',newVal, Math.round(newVal));
|
console.log('thisscale', newVal, Math.round(newVal));
|
||||||
let ra=''
|
let ra = ''
|
||||||
this.scaleM.forEach(item => {
|
this.scaleM.forEach(item => {
|
||||||
if (item.scale == Math.round(newVal)) {
|
if (item.scale == Math.round(newVal)) {
|
||||||
ra = item.milo
|
ra = item.milo
|
||||||
}
|
}
|
||||||
@@ -168,35 +180,63 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getMapList()
|
// this.getMapList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDetail(type, id) {
|
||||||
|
this.$api.getShopDetail(type, id).then(res => {
|
||||||
|
console.log('详情', res);
|
||||||
|
const data = res.data.data
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
this.shopList = data
|
||||||
|
// {
|
||||||
|
// shopid: 1,
|
||||||
|
// 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('this.radius',radius);
|
console.log('longitude', uni.getStorageSync('longitude'));
|
||||||
|
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: 100
|
radius: radius * 1000
|
||||||
}
|
}
|
||||||
|
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(mockData).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.statusCode === 200) {
|
if (res.data.code == 1) {
|
||||||
res.data.data.forEach(item => {
|
res.data.data.forEach(item => {
|
||||||
obj = {
|
obj = {
|
||||||
id: parseInt(item.id),
|
id: parseInt(item.id),
|
||||||
latitude: item.lat,
|
latitude: item.lat,
|
||||||
longitude: item.lng,
|
longitude: item.lng,
|
||||||
// iconPath: '../../../static/map/sp_icon_dw.png',
|
iconPath: '../../../static/map/sp_icon_dw.png',
|
||||||
width: '58rpx',
|
width: '58rpx',
|
||||||
height: '72rpx',
|
height: '72rpx',
|
||||||
rotate: 0,
|
rotate: 0,
|
||||||
@@ -204,7 +244,18 @@
|
|||||||
}
|
}
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
})
|
})
|
||||||
// this.marker=arr
|
this.marker = [{ //用户当前位置
|
||||||
|
id: 1,
|
||||||
|
latitude: realData.latitude,
|
||||||
|
longitude: realData.longitude,
|
||||||
|
iconPath: '../../../static/map/sp_icon_hdw.png',
|
||||||
|
width: '58rpx',
|
||||||
|
height: '72rpx',
|
||||||
|
rotate: 0,
|
||||||
|
alpha: 1
|
||||||
|
},
|
||||||
|
...arr,
|
||||||
|
]
|
||||||
console.log('this.marker', this.marker);
|
console.log('this.marker', this.marker);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -212,12 +263,18 @@
|
|||||||
// 图标点击
|
// 图标点击
|
||||||
markerClick(e) {
|
markerClick(e) {
|
||||||
console.log('标记点击', e);
|
console.log('标记点击', e);
|
||||||
|
this.showShop = true
|
||||||
let markerId = e.markerId; //点击标记点, 获取id, 查询店铺详情, 展示在下方
|
let markerId = e.markerId; //点击标记点, 获取id, 查询店铺详情, 展示在下方
|
||||||
|
this.getDetail(1, markerId)
|
||||||
this.marker.forEach(item => {
|
this.marker.forEach(item => {
|
||||||
if (markerId === item.id) {
|
if (markerId === item.id) {
|
||||||
item.iconPath = ""
|
item.iconPath = "../../../static/map/sp_icon_hdw.png"
|
||||||
|
item.width = '58rpx'
|
||||||
|
item.height = '72rpx'
|
||||||
} else {
|
} else {
|
||||||
item.iconPath = "../../../static/map/sp_icon_dw.png"
|
item.iconPath = "../../../static/map/sp_icon_dw.png"
|
||||||
|
item.width = '58rpx'
|
||||||
|
item.height = '72rpx'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
|
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
|
||||||
account: '123',
|
account: '',
|
||||||
username: '用户名',
|
username: '',
|
||||||
isLoad: true
|
isLoad: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -56,6 +56,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.isLoad = true
|
this.isLoad = true
|
||||||
|
this.getInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reOnLoad() {
|
reOnLoad() {
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.isLoad = true
|
this.isLoad = true
|
||||||
if(this.isLoad){
|
if (this.isLoad) {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user