# Conflicts:
#	pages/publish/publishTransfer/publishTransfer.vue
This commit is contained in:
hot777zz
2023-11-18 16:55:48 +08:00
22 changed files with 1529 additions and 507 deletions

View File

@@ -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) {

View File

@@ -13,7 +13,8 @@
</u-input> </u-input>
</view> </view>
</view> </view>
<u-swiper :list="bannerURL" height="300rpx" /> <u-swiper :list="bannerURL" keyName="img" height="300rpx" @change="e => currentNum = e.current"
@click="handleSwiperList(currentNum==''?0:currentNum,bannerURL)" />
</view> </view>
</template> </template>
@@ -38,19 +39,23 @@
}, },
data() { data() {
return { return {
position: uni.getStorageSync('city')+uni.getStorageSync('district').slice(0, 2) position: uni.getStorageSync('city') + uni.getStorageSync('district').slice(0, 2),
currentNum: ''
}; };
}, },
options: { options: {
styleIsolation: 'shared', // 解除样式隔离 styleIsolation: 'shared', // 解除样式隔离
}, },
created() { created() {
if (this.type !== '0') {
// this.open()
}
}, },
methods: { methods: {
//点击轮播图
handleSwiperList(currentNum, bannerURL) {
const item=bannerURL[currentNum]
uni.navigateTo({
url: item.link+`?id=${item.param}&type=${item.type}`
})
},
} }
} }
</script> </script>

View File

@@ -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,52 +40,98 @@
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: '琴行铺面转让',
promotionNum: 23, promotionNum: 23,
price: 6000, price: 5000,
date: '2023-11-02', date: '2023-11-02',
pos: '锦江区', pos: '锦江区',
exactPos: '锦江区-汇源南路366号', exactPos: '锦江区-汇源南路366号',
sqr: 100, sqr: 100,
zrfText: "转让费20万", zrfText: "转让费20000万",
category: '餐饮美食', category: '餐饮美食',
uname: "张先生", uname: "张先生",
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: 28, "type": "0",
price: 5000, "adress": "",
date: '2023-11-02', "trade1": "啊",
pos: '锦江区', "trade2": "餐馆",
exactPos: '锦江区-汇源南路366号', "btype1": "",
sqr: 200, "btype2": "",
zrfText: "转让费30万", "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>

View File

@@ -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,41 +25,41 @@
<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-else="showStyle==1 ">{{shopInfo.zrfText}}</text> <text v-if="showStyle == 1">转让费{{shopInfo.zhuanrangfei}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="cart-and-date bottom-common" v-if="showStyle==1"> <view class="cart-and-date bottom-common" v-if="showStyle == 1 || showStyle == 2">
<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> <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>

View File

@@ -125,6 +125,8 @@
"path": "pages/index/NavBarPages/zrxx/zrxx", "path": "pages/index/NavBarPages/zrxx/zrxx",
"style": { "style": {
"navigationBarTitleText": "转让信息", "navigationBarTitleText": "转让信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -132,6 +134,8 @@
"path": "pages/index/NavBarPages/zdxx/zdxx", "path": "pages/index/NavBarPages/zdxx/zdxx",
"style": { "style": {
"navigationBarTitleText": "找店信息", "navigationBarTitleText": "找店信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -139,6 +143,8 @@
"path": "pages/index/NavBarPages/czxx/czxx", "path": "pages/index/NavBarPages/czxx/czxx",
"style": { "style": {
"navigationBarTitleText": "出租信息", "navigationBarTitleText": "出租信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -146,6 +152,8 @@
"path": "pages/index/NavBarPages/xmzs/xmzs", "path": "pages/index/NavBarPages/xmzs/xmzs",
"style": { "style": {
"navigationBarTitleText": "项目招商", "navigationBarTitleText": "项目招商",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -153,6 +161,8 @@
"path": "pages/index/NavBarPages/cjal/cjal", "path": "pages/index/NavBarPages/cjal/cjal",
"style": { "style": {
"navigationBarTitleText": "成交案例", "navigationBarTitleText": "成交案例",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -162,17 +172,17 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "pages/my/edit/edit",
"style": {
"navigationBarTitleText": "修改个人信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false
}
} }
,{ ],
"path" : "pages/my/edit/edit",
"style" :
{
"navigationBarTitleText": "修改个人信息",
"enablePullDownRefresh": false
}
}
],
"tabBar": { "tabBar": {
"color": "#CCCCCC", "color": "#CCCCCC",
"borderStyle": "white", "borderStyle": "white",

View File

@@ -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>

View File

@@ -1,170 +1,215 @@
<template> <template>
<view class="detail" ref="viewref"> <view class="detail" ref="viewref">
<view class="swiper"> <view class="swiper">
<u-swiper :list="list" height="500rpx" radius="0"></u-swiper> <u-swiper :list="shopInfo.pics" keyName="pics" height="500rpx" radius="0"></u-swiper>
</view> </view>
<view class="sub-detail u-flex"> <view class="sub-detail u-flex">
<view class="title"> <view class="title">
{{title}} {{shopInfo.tt}}
</view> </view>
<view> <view>
<u-grid :col="3"> <u-grid :col="3">
<u-grid-item> <u-grid-item>
<view class="grid-textup">22</view> <view class="grid-textup">{{shopInfo.zujin}}/</view>
<view class="grid-text">租金</view> <view class="grid-text">租金</view>
</u-grid-item> </u-grid-item>
<u-grid-item> <u-grid-item>
<view class="grid-textup">22</view> <view class="grid-textup">{{shopInfo.zhuanrangfei}}万元</view>
<view class="grid-text">转让费</view> <view class="grid-text">转让费</view>
</u-grid-item> </u-grid-item>
<u-grid-item> <u-grid-item>
<view class="grid-textup">22</view> <view class="grid-textup">{{shopInfo.mianji}}</view>
<view class="grid-text">面积</view> <view class="grid-text">面积</view>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
</view> </view>
<view class="bgc"> <view class="bgc">
</view> </view>
<view class="location-detail"> <view class="location-detail">
<text>行业</text> <text>行业{{shopInfo.trade1}}</text>
<text>区域</text> <text>区域{{shopInfo.area1}}</text>
<text>地址</text> <text>地址{{shopInfo.adress}}</text>
</view> </view>
<view class="bug-figure"> <view class="bgc">
</view> </view>
<view class="seller-shop-detail"> <view class="seller-shop-detail">
<view class="avator"> <view class="avator">
<u-avatar :src="src"></u-avatar> <u-avatar :src="src"></u-avatar>
<u-cell title="张先生" label="123456" :border="false"></u-cell> <u-cell :title="shopInfo.lianxiren" :label="shopInfo.mobile" :border="false"></u-cell>
</view> </view>
<u-divider :height="20"></u-divider> <u-divider :height="5"></u-divider>
<u-cell title="店铺介绍" label="美食杂货店是一个主打食品和日用杂货的淘宝222222222222222222222美食杂货店是一个主打食品和日用杂货的淘宝美食杂货店是一个主打食品和日用杂货的淘宝" label-style="color = #5D5D5D"></u-cell> <u-cell title="店铺介绍" :label="shopInfo.content" label-style="color = #5D5D5D;font-size: 24rpx;"></u-cell>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="bot-tab"> <view class="bot-tab">
<view class="tab-left"> <view class="tab-left">
<view class="share" @click="share()"> <view class="share" @click="share()">
<u-icon name="share-fill" color="green"></u-icon> <image src="../../static/shoplist/share.png" style="width: 41rpx;height: 58rpx;"></image>
分享
</view>
<view class="customer" @click="assist()">
<u-icon name="server-fill" color="green"></u-icon>
客服
</view> </view>
<button open-type="contact" session-from="sessionFrom" class="service-btn">
<image src="../../static/shoplist/service.png" style="width: 41rpx;height: 58rpx;margin-top: 11px;"></image>
</button>
</view> </view>
<view class="tab-right" @click="phonecall()"> <view class="tab-right" @click="phonecall()">
<view class="call" > <view class="call">
<text>打电话</text> <text>打电话</text>
</view> </view>
</view> </view>
<u-modal :show="showM" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
@confirm="confirm" @cancel="cancel">
<view>
<!-- <view>{{shopInfo.mobile}}</view> -->
<text>是否拨打该联系人电话?</text>
</view>
</u-modal>
</view> </view>
</view> </view>
<view class="bug-figure"> <view class="bug-figure">
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props: {
list: {
type: Array,
default () {
return [
"https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg",
"https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg",
"https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg"
]
}
},
},
data() { data() {
return { return {
shopInfo:{ shopInfo: {},
showM: false
}
}
},
methods: {
phonecall(){
console.log('打电话');
},
share(){
console.log('分享');
},
assist(){
console.log('客服');
} }
}, },
onLoad: function(options) { onLoad: function(options) {
const shopInfomation = JSON.parse(decodeURIComponent(options.shopInfo)) console.log('detail', options);
console.log(shopInfomation); //点击轮播图跳转详情, 传递的参数id, type
this.shopInfo = shopInfomation if (options.id !== undefined && options.type !== undefined) {
this.getDetail(options.type, options.id)
}
},
methods: {
phonecall() {
this.showM = true
},
share() {
console.log('分享');
},
getDetail(type, id) {
this.$api.getShopDetail(type, id).then(res => {
const data = res.data.data
if (res.data.code == 1) {
data.pics = [this.$api.imgUrl + data.pics]
this.shopInfo = data
}
})
},
confirm() {
this.showM = false
let phone = this.shopInfo.mobile
phone = phone.toString()
uni.makePhoneCall({
phoneNumber: phone,
success: function() {
console.log('拨打电话成功');
},
fail() {
console.log('打电话失败了');
}
})
},
cancel() {
this.showM = false
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {
background-color: #F8F8F8; background-color: #F8F8F8;
} }
.sub-detail{
margin-bottom: 30rpx;
.service-btn {
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
} }
.bgc{
.service-btn::after {
border: none;
}
.sub-detail {
margin: 30rpx 16rpx;
}
.bgc {
background-color: #F8F8F8; background-color: #F8F8F8;
height: 30rpx; height: 30rpx;
} }
.detail{
.detail {
// background-color: #F8F8F8; // background-color: #F8F8F8;
height: 100%; height: 100%;
} }
.bug-figure{
height: 100rpx; .bug-figure {
height: 130rpx;
background-color: #F8F8F8; background-color: #F8F8F8;
} }
.swiper {
} .title {
.title{ font-size: 30rpx;
padding: 20rpx; font-weight: 500;
background-color: #fff; background-color: #fff;
margin-bottom: 50rpx;
} }
.grid-textup{
.grid-textup {
font-weight: 500;
color: #CC3333; color: #CC3333;
font-size: 20px; font-size: 30rpx;
} }
.grid-text{
.grid-text {
color: #B3B3B3; color: #B3B3B3;
font-size: 24rpx;
} }
.location-detail{
.location-detail {
display: flex; display: flex;
margin-top: 50rpx; // margin-top: 50rpx;
background-color: #fff; background-color: #fff;
flex-direction: column; flex-direction: column;
padding-left: 16rpx; padding-left: 16rpx;
line-height: 33px; line-height: 33px;
font-size: 15px; font-size: 15px;
} }
.seller-shop-detail{
margin-top: 50rpx; .seller-shop-detail {
/deep/ .u-divider {
margin: 28rpx 0 0 0 !important;
}
} }
.avator{
.avator {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-left: 16rpx; margin-left: 16rpx;
margin-top: 50rpx; margin-top: 28rpx;
/deep/ .u-cell__body {
padding: 0 12rpx !important;
}
} }
.bottom{
.bottom {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
background-color: #fff; background-color: #fff;
@@ -173,26 +218,22 @@
// height: 100rpx; // height: 100rpx;
// bottom: calc(var(--window-bottom) + 20px); // bottom: calc(var(--window-bottom) + 20px);
} }
.bot-tab{
.bot-tab {
display: flex; display: flex;
// flex: 1; // flex: 1;
justify-content: space-evenly; justify-content: space-evenly;
} }
.tab-left{
.tab-left {
width: 50%; width: 50%;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
height: 50px; height: 50px;
} }
.customer{
// height: 50px;
display: flex; .tab-right {
justify-content: center;
align-items: center;
flex-direction: column;
width: 50%;
}
.tab-right{
width: 50%; width: 50%;
height: 50px; height: 50px;
display: flex; display: flex;
@@ -200,14 +241,16 @@
align-items: center; align-items: center;
background-image: linear-gradient(to right, #E86262, #CC3333); background-image: linear-gradient(to right, #E86262, #CC3333);
} }
.share{
.share {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 50%; width: 50%;
} }
.call{
.call {
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@@ -111,7 +111,6 @@
}, },
getCsTel() { getCsTel() {
this.$api.getCsTel().then(res => { this.$api.getCsTel().then(res => {
console.log(res.data);
if (res.data.data) { if (res.data.data) {
this.mobile = res.data.data.kf_phone this.mobile = res.data.data.kf_phone
} }

View File

@@ -15,7 +15,7 @@
<DropDown></DropDown> <DropDown></DropDown>
</view> </view>
<view class="marginLR10"> <view class="marginLR10">
<ShowShopList :showStyle="1"/> <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: {

View File

@@ -15,7 +15,7 @@
<DropDown></DropDown> <DropDown></DropDown>
</view> </view>
<view class="marginLR10"> <view class="marginLR10">
<ShowShopList :showStyle="1"/> <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: {

View File

@@ -3,18 +3,13 @@
<InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper> <InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper>
<view class="home-content"> <view class="home-content">
<view class="service"> <view class="service">
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/> <u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx" />
<button <button open-type="contact" bindcontact="handleContact" session-from="sessionFrom" class="service-btn">
open-type="contact" </button>
bindcontact="handleContact"
session-from="sessionFrom"
class="service-btn"
>
</button>
</view> </view>
<HomeNavCard></HomeNavCard> <HomeNavCard></HomeNavCard>
<HomeNoticeBar :text="notice" /> <HomeNoticeBar :text="notice" />
<Statistics :statNum="statNum"/> <Statistics :statNum="statNum" />
<view class="show-and-search"> <view class="show-and-search">
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0"> <view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
<text>店铺列表</text> <text>店铺列表</text>
@@ -34,6 +29,7 @@
import HomeNoticeBar from "./HomeMainContent/HomeNoticeBar.vue" import HomeNoticeBar from "./HomeMainContent/HomeNoticeBar.vue"
import HomeNavCard from "./HomeMainContent/HomeNavCard.vue" import HomeNavCard from "./HomeMainContent/HomeNavCard.vue"
import Statistics from "./HomeMainContent/Statistics.vue" import Statistics from "./HomeMainContent/Statistics.vue"
import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js" import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js"
export default { export default {
components: { components: {
@@ -46,7 +42,7 @@
notice: [], notice: [],
chooseIndex: 0, chooseIndex: 0,
statNum: {}, statNum: {},
swiperList:[] swiperList: [],
} }
}, },
onLoad() { onLoad() {
@@ -54,22 +50,36 @@
this.getNotice() this.getNotice()
this.getStat() this.getStat()
this.open() this.open()
this.getClassList()
}, },
methods: { methods: {
getBanner(){ getBanner() {
this.$api.getBanner().then(res=>{ this.$api.getBanner().then(res => {
this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img) res.data.data.forEach(item=>{
item.img =this.$api.imgUrl + item.img
})
this.swiperList = res.data.data
// .map(item => this.$api.imgUrl + item.img)
}) })
}, },
getNotice(){ getNotice() {
this.$api.getHotInfo().then(res=>{ this.$api.getHotInfo().then(res => {
this.notice = res.data.data.map(item=>item.title) this.notice = res.data.data.map(item => item.title)
}) })
}, },
getStat(){ getStat() {
this.$api.getStat().then(res=>{ this.$api.getStat().then(res => {
this.statNum = res.data.data this.statNum = res.data.data
console.log(res.data.data); })
},
getClassList() {
this.$api.getClassList().then(res => {
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() {
@@ -95,6 +105,8 @@
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('longitude', res.longitude);
qqmapsdk.reverseGeocoder({ qqmapsdk.reverseGeocoder({
location: { location: {
latitude: res.latitude, latitude: res.latitude,
@@ -106,7 +118,7 @@
console.log(re.result.ad_info.district); console.log(re.result.ad_info.district);
let city = re.result.ad_info.city let city = re.result.ad_info.city
let district = re.result.ad_info.district let district = re.result.ad_info.district
console.log('city-code',re.result.ad_info.city_code.substring(3)); console.log('city-code', re.result.ad_info.city_code.substring(3));
uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3)); uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3));
uni.setStorageSync('city', city.slice(0, 2)); uni.setStorageSync('city', city.slice(0, 2));
uni.setStorageSync('district', district); uni.setStorageSync('district', district);
@@ -127,11 +139,11 @@
open() { open() {
var that = this var that = this
uni.getSetting({ uni.getSetting({
success: function (res) { success: function(res) {
if (res.authSetting['scope.userFuzzyLocation']) { if (res.authSetting['scope.userFuzzyLocation']) {
console.log('用户已经授权定位权限'); console.log('用户已经授权定位权限');
} else { } else {
console.log('用户未授权定位权限'); console.log('用户未授权定位权限');
uni.authorize({ uni.authorize({
scope: 'scope.userFuzzyLocation', scope: 'scope.userFuzzyLocation',
success: function() { success: function() {
@@ -161,8 +173,8 @@
return false; return false;
} }
}) })
} }
} }
}); });
} }
} }
@@ -176,11 +188,13 @@
.home-content { .home-content {
margin: 0 10px; margin: 0 10px;
.service { .service {
position: fixed; position: fixed;
right: 17rpx; right: 17rpx;
top: 1109rpx; top: 1109rpx;
z-index: 1; z-index: 1;
.service-btn { .service-btn {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -189,6 +203,7 @@
width: 108rpx; width: 108rpx;
height: 108rpx; height: 108rpx;
} }
.service-btn::after { .service-btn::after {
border: none; border: none;

View File

@@ -8,12 +8,12 @@
</view> </view>
</view> --> </view> -->
<view class="content"> <view class="content">
<map id="map" @markertap="markerClick" :markers="marker" :show-location="true" :latitude="lat" :longitude="lng" <map id="map" @markertap="markerClick" @regionchange="handleRegionChange()" :markers="marker" show-location="true"
: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>
@@ -21,29 +21,103 @@
export default { export default {
data() { data() {
return { return {
lat: '30.48772', radius: '',
lng: '104.080145', showShop: false,
marker: [{ scaleM: [{
id: 1, scale: 3,
latitude: 30.488573, milo: 1000000
longitude: 104.081248,
iconPath: '../../../static/map/sp_icon_dw.png',
width: '58rpx',
height: '72rpx',
rotate: 0,
alpha: 1
}, },
{ {
id: 2, scale: 4,
latitude: 30.48772, milo: 500000
longitude: 104.080145, },
// iconPath: '../../../static/map/sp_icon_dw.png', {
width: '58rpx', scale: 5,
height: '72rpx', milo: 200000
rotate: 0, }, {
alpha: 1 scale: 6,
milo: 100000
}, {
scale: 7,
milo: 50000
},
{
scale: 8,
milo: 50000
}, {
scale: 9,
milo: 20000
}, {
scale: 10,
milo: 10000
}, {
scale: 12,
milo: 2000
}, {
scale: 13,
milo: 1000
},
{
scale: 14,
milo: 500
},
{
scale: 15,
milo: 200
},
{
scale: 16,
milo: 100
},
{
scale: 17,
milo: 50
},
{
scale: 18,
milo: 50
},
{
scale: 19,
milo: 20
} }
], ],
scale: '',
lat: uni.getStorageSync('latitude'), //纬度
lng: uni.getStorageSync('longitude'), //经度
marker: [
// { //用户当前位置
// id: 1,
// latitude: uni.getStorageSync('latitude'),
// longitude: uni.getStorageSync('longitude'),
// // iconPath: '../../../static/map/sp_icon_hdw.png',
// width: '58rpx',
// height: '72rpx',
// rotate: 0,
// alpha: 1
// },
// { //用户当前位置
// id: 2,
// latitude: 30.48772,
// longitude: 104.080145,
// iconPath: '../../../static/map/sp_icon_dw.png',
// width: '58rpx',
// height: '72rpx',
// rotate: 0,
// 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,
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg', imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
@@ -75,17 +149,132 @@
this._mapContext.on("markerClusterCreate", (e) => { this._mapContext.on("markerClusterCreate", (e) => {
console.log("markerClusterCreate", e); console.log("markerClusterCreate", e);
}); });
//定时监听地图缩放
setInterval(() => {
this._mapContext.getScale({
success: res => {
// console.log('ressss', res);
this.scale = res.scale;
}
})
}, 500)
},
watch: {
scale(newVal, oldVal) {
console.log('thisscale', newVal, Math.round(newVal));
let ra = ''
this.scaleM.forEach(item => {
if (item.scale == Math.round(newVal)) {
ra = item.milo
}
})
this.getMapList(ra)
// let i = 16 //这是我在data里声明的缩放层级 这个i理解成16就行
// if (newVal >= i && oldVal < i) {
// console.log('如果新的缩放层级大于16并且旧的缩放层级小于16就触发这个添加icon的方法');
// // this.addMakers() //如果新的缩放层级大于16并且旧的缩放层级小于16就触发这个添加icon的方法
// } else if (newVal < i && oldVal >= i) {
// console.log('如果新的缩放层级小于16并且旧的大于16就触发删除icon的方法');
// // this.removerMakers() //如果新的缩放层级小于16并且旧的大于16就触发删除icon的方法
// }
}
},
created() {
// 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) {
console.log('地图缩放层级变化, 只能监听拖拽, 不能监听缩放', e);
},
getMapList(radius) {
console.log('longitude', uni.getStorageSync('longitude'));
console.log('latitude', uni.getStorageSync('latitude'));
const realData = {
longitude: uni.getStorageSync('longitude'),
latitude: uni.getStorageSync('latitude'),
radius: radius * 1000
}
console.log('realData.radius', realData.radius);
const mockData = {
longitude: 23.40,
latitude: 116.38,
radius: 1111111111
}
this.$api.getMap(realData).then(res => {
console.log('getMap', res);
let obj = {}
let arr = []
if (res.data.code == 1) {
res.data.data.forEach(item => {
obj = {
id: parseInt(item.id),
latitude: item.lat,
longitude: item.lng,
iconPath: '../../../static/map/sp_icon_dw.png',
width: '58rpx',
height: '72rpx',
rotate: 0,
alpha: 1
}
arr.push(obj)
})
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);
}
})
},
// 图标点击 // 图标点击
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'
} }
}) })
}, },

View File

@@ -1,15 +1,22 @@
<template> <template>
<view> <view>
<view class="avatar"> <view class="avatar">
<u-avatar @click="changeAvatar()" :src="avatar"></u-avatar> <u-avatar @click="changeAvatar()" size="140rpx" :src="Info.avatar"></u-avatar>
</view> </view>
<view class="name-edit"> <!-- <view class="name-edit">
<text>用户名</text> <text>用户名</text>
<u-input border="surround" v-model="username"></u-input> <u-input border="surround" v-model="Info.username"></u-input>
</view> </view> -->
<view class="send"> <view class="info-name">
<u-button @click="editInfo" color="linear-gradient(to right, #E86262, #CC3333)">提交</u-button> <u--form labelPosition="left" :model="Info">
<u-form-item label="修改昵称" prop="Info.username" borderBottom>
<u--input v-model="Info.username" border="none" placeholder="请输入您的昵称"
placeholderStyle="color: #CCCCCC;font-size: 26rpx;"></u--input>
</u-form-item>
</u--form>
</view> </view>
<view style="height: 100rpx;"></view>
<u-button @click="editInfo(Info)" color="#339967">提交</u-button>
</view> </view>
</template> </template>
@@ -17,50 +24,120 @@
export default { export default {
data() { data() {
return { return {
username:'', Info: {
avatar:'' avatar: '',
username: '',
avatarUrl: ''
}
} }
}, },
methods: { methods: {
changeAvatar(){ //获取头像昵称
// uni.uploadFile() getUserInfo() {
console.log(111); this.$api.getUser().then(res => {
const data = res.data.data
if (data) {
this.Info.avatar = this.$api.imgUrl + data.avatar
this.avatarUrl = data.avatar
this.Info.username = data.nickname
}
}).finally(_ => {})
}, },
editInfo(){ updatePromise(filePath) {
return new Promise((resolve, reject) => {
const token = uni.getStorageSync('loginToken')
const a = uni.uploadFile({
url: this.$api.uploadImgUrl,
filePath: filePath,
name: 'file',
header: {
"Content-Type": "multipart/form-data",
'Authorization': token
},
success: (res) => {
resolve(JSON.parse(res.data).data.url)
}
});
})
},
changeAvatar() {
uni.chooseImage({
count: 1, //默认选择1张图片
sizeType: ['original', 'compressed'], //original 原图compressed 压缩图,默认二者都有
success: (chooseImageRes) => {
this.Info.avatar = chooseImageRes.tempFilePaths[0] //更新本地浏览头像图片
if (chooseImageRes.tempFilePaths[0]) {
const result = this.updatePromise(chooseImageRes.tempFilePaths[0]) //上传图片
result.then(value => {
this.avatarUrl = '/' + value
})
}
}
});
},
editInfo() {
// let resdata = JSON.stringify(data);
// this.$api.editPersonInfo(resdata).then(res => {
// console.log(resdata);
// console.log(res)
// })
this.$api.editPersonInfo({ this.$api.editPersonInfo({
nickname:this.$data.nickname, nickname: this.Info.username,
avatar:this.$data.avatar, avatar: this.avatarUrl
Headers:wx.getStorageSync('token') }).then(res => {
}).then(res => { console.log('修改头像昵称==', res);
console.log(res); this.$toast.success(res.data.msg)
}) if (res.data.code == 1) {
} uni.reLaunch({
url: '/pages/my/my'
})
}
}).finally(_ => {})
},
}, },
onLoad() { onLoad() {
let that = this let that = this
this.$data.username = wx.getStorageSync('nickname') this.getUserInfo()
this.$data.avatar = wx.getStorageSync('avatar')
} }
} }
</script> </script>
<style> <style lang="scss">
.avatar{ page {
width: 100%; background-color: #f4f4f4;
height: 200rpx; }
.avatar {
margin: 60rpx 0;
/* width: 100%; */
/* height: 200rpx; */
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.name-edit{
.name-edit {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
} }
.send{
width: 50%;
transform: translateX(50%) translateY(50%);
.info-name {
.u-form-item {
background-color: #fff;
}
.u-form-item__body__left {
width: 80px !important;
margin-left: 20rpx;
}
} }
</style>
.u-button {
width: 644rpx !important;
height: 86rpx !important;
background: #0EBB5B;
border-radius: 20rpx !important;
}
</style>

View File

@@ -4,11 +4,13 @@
<view class="profile"> <view class="profile">
<image src="../../static/img/wo_bj_ll@2x.png" mode="aspectFit" class="profile-bgi"></image> <image src="../../static/img/wo_bj_ll@2x.png" mode="aspectFit" class="profile-bgi"></image>
<view class="avator"> <view class="avator">
<u-avatar :src="src"></u-avatar> <u-avatar :src="src" size="100rpx"></u-avatar>
</view> </view>
<view class="username">{{username}}</view> <view class="username">{{username}}</view>
<view class="account">账号:{{account}} <u-icon name="edit-pen" class="edit-icon" size="20" @click="toEdit"></u-icon></view> <view class="account">账号:{{account}}
<u-icon name="edit-pen" class="edit-icon" size="20" color="#fff" @click="toEdit"></u-icon>
</view>
</view> </view>
<view class="publish"> <view class="publish">
<u-cell-group> <u-cell-group>
@@ -54,8 +56,7 @@
return return
} }
this.isLoad = true this.isLoad = true
this.$data.account = wx.getStorageSync('account') this.getInfo()
this.$data.username = wx.getStorageSync('nickname')
}, },
methods: { methods: {
reOnLoad() { reOnLoad() {
@@ -65,6 +66,9 @@
return return
} }
this.isLoad = true this.isLoad = true
if (this.isLoad) {
this.getInfo()
}
}, },
failToLoad() { failToLoad() {
uni.reLaunch({ uni.reLaunch({
@@ -86,17 +90,22 @@
url: '/pages/Partnerships/Partnerships' url: '/pages/Partnerships/Partnerships'
}) })
}, },
toEdit(){ toEdit() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/my/edit/edit' url: '/pages/my/edit/edit'
})
},
//---------页面调用接口示例------------
getInfo() {
this.$api.getUser().then(res => {
var data = res.data.data
if (data) {
this.src = this.$api.imgUrl + data.avatar
this.username = data.nickname
this.account = data.sn
}
}) })
} }
//---------页面调用接口示例------------
// getInfo() {
// this.$api.getUserInfo().then(res => {
// console.log('userInfo', res);
// })
// }
} }
} }
</script> </script>
@@ -134,9 +143,8 @@
font-weight: 1rpx; font-weight: 1rpx;
display: flex; display: flex;
} }
.edit-icon{
.edit-icon {}
}
} }
</style> </style>

View File

@@ -1,46 +1,60 @@
<template> <template>
<view class="form"> <view class="form">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item label="标题" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
<u-input v-model="form.name" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" label-width="100%" right-icon="arrow-right"> <u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region" label-width="auto">
<text @click="show1 = true" class="checktext">请选择所属区域</text> <text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
<view class="arrow-icon"> <text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
<u-icon name="arrow-right" size="30px"></u-icon>
</view>
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker>
</u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="100%">
<text @click="show3 = true" class="checktext">请选择行业业态</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon>
</view>
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"></u-picker>
</u-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="100%">
<u-input v-model="form.name" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="100%">
<u-input v-model="form.name" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="预计投资" label-position="top" border-bottom="true" label-width="100%">
<u-input v-model="form.name" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%">
<u-input v-model="form.name" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%">
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="100%">
<u-input v-model="form.name" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
</u-form> <view class="arrow-icon">
<view class="bug-figure"></view> <u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle" class="submit-btn">发布</u-button> </view>
<view class="bug-figure"></view> <u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
v-model="form.region" @confirm="regionConfirm"></u-picker>
</u-form-item>
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto" prop="trade" >
<text @click="show2 = true" class="checkedtext" v-if="form.trade.length>0">{{form.trade}}</text>
<text @click="show2 = true" class="checktext" v-else>请选择行业</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
</view>
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" :columns="[Classcolumns]"
v-model="form.trade" @confirm="tradeConfirm"></u-picker>
</u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="karma">
<text @click="show3 = true" class="checkedtext" v-if="form.karma.length>0">{{form.karma}}</text>
<text @click="show3 = true" class="checktext" v-else>请选择业态</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="show3 = true"></u-icon>
</view>
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false" :columns="[Karmacolumns]"
v-model="form.karma" @confirm="karmaConfirm"></u-picker>
</u-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="size">
<u-input v-model="form.size" placeholder="请输入面积" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
<u-input v-model="form.rent" placeholder="请输入租金" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="预计投资" label-position="top" border-bottom="true" label-width="auto" prop="sell">
<u-input v-model="form.sell" placeholder="请输入预计投资" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="name">
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="call">
<u-input v-model="form.call" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="introduce">
<u-input v-model="form.introduce" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
</u-form>
<view class="bug-figure"></view>
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle"
class="submit-btn">发布</u-button>
<view class="bug-figure"></view>
</view> </view>
</template> </template>
@@ -48,53 +62,183 @@
export default { export default {
data() { data() {
return { return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
ShopInfomation:{ ShopInfomation: {
city:'', city: '',
area:'', area: '',
count:0, count: 0,
}, },
form:{ form: {
title:'' title: '',
region: '',
place: '',
trade: '',
karma: '',
size: '',
rent: '',
sell: '',
name: '',
call: '',
introduce: ''
},
Classcolumns: [],
ClassCheckId:'',
Karmacolumns: [],
pid:[],
show1: false,
show2: false,
show3: false,
rules: {
'title': [{
required: true,
message: '请输入标题',
trigger: ['change', 'blur']
}],
'trade': [{
required: true,
message: '请选择行业',
trigger: ['change', 'blur']
}],
'region': [{
required: true,
message: '请选择地区',
trigger: ['change', 'blur']
}],
'karma': [{
required: true,
message: '请选择业态',
trigger: ['change', 'blur']
}],
'name': [{
required: true,
message: '请输入姓名',
trigger: ['change', 'blur']
}],
'sell': [{
required: true,
message: '请输入转让金',
trigger: ['change', 'blur']
}],
'introduce': [{
required: true,
message: '请输入介绍',
trigger: ['change', 'blur']
}],
'size': [{
required: true,
message: '请输入面积',
trigger: ['change', 'blur']
}],
'rent': [{
required: true,
message: '请输入租金',
trigger: ['change', 'blur']
}],
'place': [{
required: true,
message: '请输入地址',
trigger: ['change', 'blur']
}],
'call':[{
required: true,
message: '请输入电话号码',
},
{
validator: (rule, value, callback) => {
if(value) {
return this.$u.test.mobile(value);
} else {
return true
}
},
message: '号码不正确',
trigger: ['change','blur'],
}]
}, },
columns:[
],
show1:false,
show2:false,
show3:false,
} }
}, },
methods: { methods: {
confirmArea(e) { handleSearchAddress() {
this.ShopInfomation.city = e.value[0] uni.navigateTo({
this.ShopInfomation.area = e.value[1] url: '/pages/publish/chooseAddress/chooseAddress'
this.show1 = false })
}, },
submit(){ submit() {
console.log('提交'); this.$refs.uForm.validate().then(res => {
console.log("提交表单信息:" + JSON.stringify(this.form))
uni.$u.toast('发布成功')
// 调用服务端入表接口W
}).catch(errors => {
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
},
tradeConfirm(e){
this.show2 = false
this.form.trade = e.value[0]
this.ClassCheckId = this.pid[e.indexs[0]]
this.$api.getClassList(this.ClassCheckId).then(res => {
// console.log(res);
this.Karmacolumns = res.data.data.map((item) => {
return item = item.name
})
})
},
karmaConfirm(e){
this.show3 = false
this.form.karma = e.value[0]
},
regionConfirm(e){
this.show1 = false
this.form.region = e.value[0]
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
this.$api.getClassList().then(res =>{
// console.log(res.data.data.length);
this.Classcolumns = res.data.data.map((item) => {
return item = item.name
})
this.pid = res.data.data.map((item) => {
return item = item.id
})
})
},
computed:{
isChecked(index){
if(index.length > 0)
return true;
else
return false;
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.count{ .count {}
} .form {
.form{
margin-left: 20px; margin-left: 20px;
margin-right: 20px; margin-right: 20px;
} }
.input-class{
.input-class {
font-size: 30rpx; font-size: 30rpx;
font-weight:1px; font-weight: 1px;
border-style: none; border-style: none;
} }
.upload{
.upload {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -103,30 +247,40 @@
height: 300rpx; height: 300rpx;
// margin-right: 20px; // margin-right: 20px;
} }
.submit-btn{
.submit-btn {
width: 80%; width: 80%;
} }
.bug-figure{
.bug-figure {
height: 100rpx; height: 100rpx;
} }
.checkbox1{
.checkbox1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.checktext{
.checktext {
margin-top: 5rpx; margin-top: 5rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight:1px; font-weight: 1px;
color: #c1c4c7; color: #c1c4c7;
} }
.checkedtext{
.picker{ margin-top: 5rpx;
font-size: 28rpx;
font-weight: 1px;
border-style: none;
}
.picker {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.arrow-icon{
.arrow-icon {
position: absolute; position: absolute;
right: 10rpx; right: 10rpx;
transform: translateY(-20rpx); transform: translateY(-20rpx);
} }
</style> </style>

View File

@@ -3,50 +3,57 @@
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<view class="upload"> <view class="upload">
<u-upload max-count="5" upload-icon="photo"></u-upload> <u-upload max-count="5" upload-icon="photo"></u-upload>
<text class="count">发布项目图片({{ShopInfomation.count}}/5)</text> <text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
</view> </view>
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="地址" label-position="top" border-bottom="true" prop="place" label-width="auto">
<u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
@change="changeAddress"></u-input>
</u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region" label-width="auto">
<text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
<u-form-item label="项目标题" label-position="top" border-bottom="true" label-width="100%"> <view class="arrow-icon">
<u-input v-model="form.name" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input> <u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
</u-form-item> </view>
<u-form-item label="区域" label-position="top" border-bottom="true" label-width="100%" right-icon="arrow-right"> <u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
<text @click="show1 = true" class="checktext">请选择所属区域</text> v-model="form.region" @confirm="regionConfirm"></u-picker>
<view class="arrow-icon"> </u-form-item>
<u-icon name="arrow-right" size="30px"></u-icon> <u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto" prop="trade" >
</view> <text @click="show2 = true" class="checkedtext" v-if="form.trade.length>0">{{form.trade}}</text>
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker> <text @click="show2 = true" class="checktext" v-else>请选择行业</text>
</u-form-item> <view class="arrow-icon">
<u-form-item label="项目地址" label-position="top" border-bottom="true" label-width="100%"> <u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
<u-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input> </view>
</u-form-item> <u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" :columns="[Classcolumns]"
<u-form-item label="行业" label-position="top" border-bottom="true" label-width="100%" class="picker"> v-model="form.trade" @confirm="tradeConfirm"></u-picker>
<text @click="show2 = true" class="checktext">请选择行业类型</text> </u-form-item>
<view class="arrow-icon"> <u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="karma">
<u-icon name="arrow-right" size="30px"></u-icon> <text @click="show3 = true" class="checkedtext" v-if="form.karma.length>0">{{form.karma}}</text>
</view> <text @click="show3 = true" class="checktext" v-else>请选择业态</text>
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"></u-picker> <view class="arrow-icon">
</u-form-item> <u-icon name="arrow-right" size="30px" @click="show3 = true"></u-icon>
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="100%"> </view>
<text @click="show3 = true" class="checktext">请选择行业业态</text> <u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false" :columns="[Karmacolumns]"
<view class="arrow-icon"> v-model="form.karma" @confirm="karmaConfirm"></u-picker>
<u-icon name="arrow-right" size="30px"></u-icon> </u-form-item>
</view> <u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="name">
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"></u-picker> <u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="call">
<u-input v-model="form.name" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.call" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="introduce">
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.introduce" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="100%"> </u-form>
<u-input v-model="form.name" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input> <view class="bug-figure"></view>
</u-form-item> <u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle"
class="submit-btn">发布</u-button>
</u-form> <view class="bug-figure"></view>
<view class="bug-figure"></view>
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle" class="submit-btn">发布</u-button>
<view class="bug-figure"></view>
</view> </view>
</template> </template>
@@ -54,53 +61,202 @@
export default { export default {
data() { data() {
return { return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
ShopInfomation:{ ShopInfomation: {
city:'', city: '',
area:'', area: '',
count:0, count: 0,
}, },
form:{ form: {
title:'' title: '',
region: '',
place: '',
trade: '',
karma: '',
size: '',
rent: '',
sell: '',
name: '',
call: '',
introduce: ''
},
Classcolumns: [],
ClassCheckId:'',
Karmacolumns: [],
pid:[],
show1: false,
show2: false,
show3: false,
rules: {
'title': [{
required: true,
message: '请输入标题',
trigger: ['change', 'blur']
}],
'trade': [{
required: true,
message: '请选择行业',
trigger: ['change', 'blur']
}],
'region': [{
required: true,
message: '请选择地区',
trigger: ['change', 'blur']
}],
'karma': [{
required: true,
message: '请选择业态',
trigger: ['change', 'blur']
}],
'name': [{
required: true,
message: '请输入姓名',
trigger: ['change', 'blur']
}],
'sell': [{
required: true,
message: '请输入转让金',
trigger: ['change', 'blur']
}],
'introduce': [{
required: true,
message: '请输入介绍',
trigger: ['change', 'blur']
}],
'size': [{
required: true,
message: '请输入面积',
trigger: ['change', 'blur']
}],
'rent': [{
required: true,
message: '请输入租金',
trigger: ['change', 'blur']
}],
'place': [{
required: true,
message: '请输入地址',
trigger: ['change', 'blur']
}],
'call':[{
required: true,
message: '请输入电话号码',
},
{
validator: (rule, value, callback) => {
if(value) {
return this.$u.test.mobile(value);
} else {
return true
}
},
message: '号码不正确',
trigger: ['change','blur'],
}]
}, },
columns:[
],
show1:false,
show2:false,
show3:false,
} }
}, },
methods: { methods: {
confirmArea(e) { handleSearchAddress() {
this.ShopInfomation.city = e.value[0] uni.navigateTo({
this.ShopInfomation.area = e.value[1] url: '/pages/publish/chooseAddress/chooseAddress'
this.show1 = false })
}, },
submit(){ changeAddress(e) {
console.log('提交'); // console.log('changeAddress', e);
this.getAddressList(e)
},
getAddressList(value) {
var that = this
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' +
that.$api.key,
success(res) {
console.log('diz', res.data.result.location);
console.log('lat', res.data.result.location.lat);
console.log('lng', res.data.result.location.lng);
},
fail(err) {
console.log('请求区域失败:', err);
}
})
},
submit() {
this.$refs.uForm.validate().then(res => {
console.log("提交表单信息:" + JSON.stringify(this.form))
uni.$u.toast('发布成功')
// 调用服务端入表接口W
}).catch(errors => {
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
},
tradeConfirm(e){
this.show2 = false
this.form.trade = e.value[0]
this.ClassCheckId = this.pid[e.indexs[0]]
this.$api.getClassList(this.ClassCheckId).then(res => {
// console.log(res);
this.Karmacolumns = res.data.data.map((item) => {
return item = item.name
})
})
},
karmaConfirm(e){
this.show3 = false
this.form.karma = e.value[0]
},
regionConfirm(e){
this.show1 = false
this.form.region = e.value[0]
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
this.$api.getClassList().then(res =>{
// console.log(res.data.data.length);
this.Classcolumns = res.data.data.map((item) => {
return item = item.name
})
this.pid = res.data.data.map((item) => {
return item = item.id
})
})
},
computed:{
isChecked(index){
if(index.length > 0)
return true;
else
return false;
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.count{ .count {}
} .form {
.form{
margin-left: 20px; margin-left: 20px;
margin-right: 20px; margin-right: 20px;
} }
.input-class{
.input-class {
font-size: 30rpx; font-size: 30rpx;
font-weight:1px; font-weight: 1px;
border-style: none; border-style: none;
} }
.upload{
.upload {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -109,30 +265,40 @@
height: 300rpx; height: 300rpx;
// margin-right: 20px; // margin-right: 20px;
} }
.submit-btn{
.submit-btn {
width: 80%; width: 80%;
} }
.bug-figure{
.bug-figure {
height: 100rpx; height: 100rpx;
} }
.checkbox1{
.checkbox1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.checktext{
.checktext {
margin-top: 5rpx; margin-top: 5rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight:1px; font-weight: 1px;
color: #c1c4c7; color: #c1c4c7;
} }
.checkedtext{
.picker{ margin-top: 5rpx;
font-size: 28rpx;
font-weight: 1px;
border-style: none;
}
.picker {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.arrow-icon{
.arrow-icon {
position: absolute; position: absolute;
right: 10rpx; right: 10rpx;
transform: translateY(-20rpx); transform: translateY(-20rpx);
} }
</style> </style>

View File

@@ -6,40 +6,45 @@
<text class="count">发布店铺图片({{ShopInfomation.count}}/5)</text> <text class="count">发布店铺图片({{ShopInfomation.count}}/5)</text>
</view> </view>
<u-form-item label="标题" label-position="top" border-bottom="true" > <u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
<u-input v-model="form.name" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right"> <u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region" label-width="auto">
<text @click="show1 = true" class="checktext">请选择所属区域</text> <text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
<view class="arrow-icon"> <view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon> <u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
</view> </view>
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker> <u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
v-model="form.region" @confirm="regionConfirm"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="地址" label-position="top" border-bottom="true" > <u-form-item label="地址" label-position="top" border-bottom="true" prop="place" label-width="auto">
<u-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="适合行业" label-position="top" border-bottom="true" class="picker" label-width="100%"> <u-form-item label="适合行业" label-position="top" border-bottom="true" class="picker" label-width="auto" prop="trade" >
<text @click="show2 = true" class="checktext">请选择行业类型</text> <text @click="show2 = true" class="checkedtext" v-if="form.trade.length>0">{{form.trade}}</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"></u-icon> <u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
</view> </view>
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"></u-picker> <u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" :columns="[Classcolumns]"
v-model="form.trade" @confirm="tradeConfirm"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" > <u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="size">
<u-input v-model="form.name" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.size" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
<u-input v-model="form.name" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="详情" label-position="top" border-bottom="true" > <u-form-item label="详情" label-position="top" border-bottom="true" label-width="auto" prop="introduce">
<u-input v-model="form.name" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.introduce" placeholder="请输入详情" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="name">
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="call">
<u-input v-model="form.name" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.call" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
</u-form> </u-form>
<view class="bug-figure"></view> <view class="bug-figure"></view>
@@ -60,14 +65,79 @@
}, },
form:{ form: {
title:'' title: '',
region: '',
place: '',
trade: '',
size: '',
rent: '',
name: '',
call: '',
introduce: ''
}, },
columns:[ Classcolumns:[],
],
show1:false, show1:false,
show2:false, show2:false,
show3:false, show3:false,
rules: {
'title': [{
required: true,
message: '请输入标题',
trigger: ['change', 'blur']
}],
'trade': [{
required: true,
message: '请选择行业',
trigger: ['change', 'blur']
}],
'region': [{
required: true,
message: '请选择地区',
trigger: ['change', 'blur']
}],
'name': [{
required: true,
message: '请输入姓名',
trigger: ['change', 'blur']
}],
'introduce': [{
required: true,
message: '请输入介绍',
trigger: ['change', 'blur']
}],
'size': [{
required: true,
message: '请输入面积',
trigger: ['change', 'blur']
}],
'rent': [{
required: true,
message: '请输入租金',
trigger: ['change', 'blur']
}],
'place': [{
required: true,
message: '请输入地址',
trigger: ['change', 'blur']
}],
'call':[{
required: true,
message: '请输入电话号码',
},
{
validator: (rule, value, callback) => {
if(value) {
return this.$u.test.mobile(value);
} else {
return true
}
},
message: '号码不正确',
trigger: ['change','blur'],
}]
},
} }
}, },
@@ -77,10 +147,37 @@
this.ShopInfomation.area = e.value[1] this.ShopInfomation.area = e.value[1]
this.show1 = false this.show1 = false
}, },
submit(){ submit() {
console.log('提交'); this.$refs.uForm.validate().then(res => {
console.log("提交表单信息:" + JSON.stringify(this.form))
uni.$u.toast('发布成功')
// 调用服务端入表接口W
}).catch(errors => {
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
},
tradeConfirm(e){
this.show2 = false
this.form.trade = e.value[0]
},
regionConfirm(e){
this.show1 = false
this.form.region = e.value[0]
} }
} },
onLoad() {
this.$api.getClassList().then(res =>{
// console.log(res.data.data.length);
this.Classcolumns = res.data.data.map((item) => {
return item = item.name
})
})
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
} }
</script> </script>
@@ -123,7 +220,12 @@
font-weight:1px; font-weight:1px;
color: #c1c4c7; color: #c1c4c7;
} }
.checkedtext{
margin-top: 5rpx;
font-size: 28rpx;
font-weight: 1px;
border-style: none;
}
.picker{ .picker{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

@@ -1,60 +1,62 @@
<template> <template>
<view class="form"> <view class="form">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item prop="image">
<view class="upload"> <view class="upload">
<u-upload max-count="5" upload-icon="photo"></u-upload> <u-upload max-count="5" upload-icon="photo"></u-upload>
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text> <text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title"> <u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" <u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region"> <u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region" label-width="auto">
<text @click="show1 = true" class="checktext">请选择所属区域</text> <text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
<view class="arrow-icon"> <view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon> <u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
</view> </view>
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false" <u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
v-model="form.region"></u-picker> v-model="form.region" @confirm="regionConfirm"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="地址" label-position="top" border-bottom="true" prop="place"> <u-form-item label="地址" label-position="top" border-bottom="true" prop="place" label-width="auto">
<u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none" <u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
@change="changeAddress"></u-input> @change="changeAddress"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker"> <u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto" prop="trade" >
<text @click="show2 = true" class="checktext">请选择行业类型</text> <text @click="show2 = true" class="checkedtext" v-if="form.trade.length>0">{{form.trade}}</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"></u-icon> <u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
</view> </view>
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" <u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" :columns="[Classcolumns]"
v-model="form.trade"></u-picker> v-model="form.trade" @confirm="tradeConfirm"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true"> <u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="karma">
<text @click="show3 = true" class="checktext">请选择行业业态</text> <text @click="show3 = true" class="checkedtext" v-if="form.karma.length>0">{{form.karma}}</text>
<text @click="show3 = true" class="checktext" v-else>请选择店铺业态</text>
<view class="arrow-icon"> <view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon> <u-icon name="arrow-right" size="30px" @click="show3 = true"></u-icon>
</view> </view>
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false" <u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false" :columns="[Karmacolumns]"
v-model="form.karma"></u-picker> v-model="form.karma" @confirm="karmaConfirm"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" prop="size"> <u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="size">
<u-input v-model="form.size" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.size" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="100%" prop="rent"> <u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="100%" prop="sell"> <u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="auto" prop="sell">
<u-input v-model="form.sell" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.sell" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%" prop="name"> <u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="name">
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="100%" prop="call"> <u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="call">
<u-input v-model="form.call" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.call" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%" prop="introduce"> <u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="introduce">
<u-input v-model="form.introduce" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.introduce" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
</u-form> </u-form>
@@ -90,25 +92,79 @@
call: '', call: '',
introduce: '' introduce: ''
}, },
columns: [ Classcolumns: [],
ClassCheckId:'',
], Karmacolumns: [],
pid:[],
show1: false, show1: false,
show2: false, show2: false,
show3: false, show3: false,
rules: { rules: {
'title': [{ 'title': [{
type: 'string', required: true,
require: true, message: '请输入标题',
trigger: ['change', 'blur']
}],
'trade': [{
required: true,
message: '请选择行业',
trigger: ['change', 'blur']
}],
'region': [{
required: true,
message: '请选择地区',
trigger: ['change', 'blur']
}],
'karma': [{
required: true,
message: '请选择业态',
trigger: ['change', 'blur']
}],
'name': [{
required: true,
message: '请输入姓名', message: '请输入姓名',
trigger: ['change', 'blur'] trigger: ['change', 'blur']
}], }],
'sell': [{
required: true,
message: '请输入转让金',
trigger: ['change', 'blur']
}],
'introduce': [{
required: true,
message: '请输入介绍',
trigger: ['change', 'blur']
}],
'size': [{
required: true,
message: '请输入面积',
trigger: ['change', 'blur']
}],
'rent': [{
required: true,
message: '请输入租金',
trigger: ['change', 'blur']
}],
'place': [{ 'place': [{
type: 'string', required: true,
require: true,
message: '请输入地址', message: '请输入地址',
trigger: ['change', 'blur'] trigger: ['change', 'blur']
}], }],
'call':[{
required: true,
message: '请输入电话号码',
},
{
validator: (rule, value, callback) => {
if(value) {
return this.$u.test.mobile(value);
} else {
return true
}
},
message: '号码不正确',
trigger: ['change','blur'],
}]
}, },
} }
@@ -119,11 +175,6 @@
url: '/pages/publish/chooseAddress/chooseAddress' url: '/pages/publish/chooseAddress/chooseAddress'
}) })
}, },
confirmArea(e) {
this.ShopInfomation.city = e.value[0]
this.ShopInfomation.area = e.value[1]
this.show1 = false
},
submit() { submit() {
this.$refs.uForm.validate().then(res => { this.$refs.uForm.validate().then(res => {
console.log("提交表单信息:" + JSON.stringify(this.form)) console.log("提交表单信息:" + JSON.stringify(this.form))
@@ -135,8 +186,8 @@
}) })
}, },
changeAddress(e) { changeAddress(e) {
console.log('changeAddress', e); // console.log('changeAddress', e);
// this.getAddressList(e) this.getAddressList(e)
}, },
getAddressList(value) { getAddressList(value) {
var that = this var that = this
@@ -153,9 +204,49 @@
} }
}) })
}, },
tradeConfirm(e){
this.show2 = false
this.form.trade = e.value[0]
this.ClassCheckId = this.pid[e.indexs[0]]
this.$api.getClassList(this.ClassCheckId).then(res => {
// console.log(res);
this.Karmacolumns = res.data.data.map((item) => {
return item = item.name
})
})
},
karmaConfirm(e){
this.show3 = false
this.form.karma = e.value[0]
},
regionConfirm(e){
this.show1 = false
this.form.region = e.value[0]
},
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules) this.$refs.uForm.setRules(this.rules)
},
onLoad() {
this.$api.getClassList().then(res =>{
// console.log(res.data.data.length);
this.Classcolumns = res.data.data.map((item) => {
return item = item.name
})
this.pid = res.data.data.map((item) => {
return item = item.id
})
})
},
computed:{
isChecked(index){
if(index.length > 0)
return true;
else
return false;
}
} }
} }
</script> </script>
@@ -203,7 +294,12 @@
font-weight: 1px; font-weight: 1px;
color: #c1c4c7; color: #c1c4c7;
} }
.checkedtext{
margin-top: 5rpx;
font-size: 28rpx;
font-weight: 1px;
border-style: none;
}
.picker { .picker {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

@@ -7,11 +7,13 @@
</u-input> </u-input>
</view> </view>
</view> </view>
<ShowShopList v-if="listId == 0" class="list" :isEdit="true"></ShowShopList> <view class="content">
<SearchShopList v-if="listId == 1" class="list" :is-edit="true"></SearchShopList> <ShowShopList v-if="listId == 0" class="list" :isEdit="true" :showStyle="1"></ShowShopList>
<ShowShopList v-if="listId == 2" class="list" :is-edit="true"></ShowShopList> <SearchShopList v-if="listId == 1" class="list" :is-edit="true" :showStyle="1"></SearchShopList>
<ShowShopList v-if="listId == 3" class="list" :is-edit="true"></ShowShopList> <ShowShopList v-if="listId == 2" class="list" :is-edit="true" :showStyle="2"></ShowShopList>
<ShowShopList v-if="listId == 4" class="list" ></ShowShopList> <ShowShopList v-if="listId == 3" class="list" :is-edit="true" :showStyle="2"></ShowShopList>
<ShowShopList v-if="listId == 4" class="list" :showStyle="0"></ShowShopList>
</view>
</view> </view>
</template> </template>
@@ -20,10 +22,17 @@
data() { data() {
return { return {
titletext:'', titletext:'',
listId:'' listId:'',
matchList:[]
} }
}, },
methods: { methods: {
getMatch(){
this.$api.getMyMatch().then(res => {
this.macthList = res.data.data
console.log(res);
})
}
}, },
onLoad: function (option) { onLoad: function (option) {
@@ -44,9 +53,10 @@
if(this.titletext == '发布的店铺出租'){ if(this.titletext == '发布的店铺出租'){
this.listId = 3 this.listId = 3
} }
if(this.titletext == '我的匹配') if(this.titletext == '我的匹配'){
this.listId = 4 this.listId = 4
this.getMatch()
}
}, },
computed:{ computed:{
@@ -87,4 +97,8 @@
page{ page{
background-color: #F8F8F8; background-color: #F8F8F8;
} }
.content{
margin: 0 10px;
}
</style> </style>

View File

@@ -1,4 +1,4 @@
const serverHost = 'https://spsp.feashow.com/api/' //http://xx.xxx.xx const serverHost = 'https://spsp.feashow.com/api' //http://xx.xxx.xx
const service = { const service = {
get(url, data) { get(url, data) {
@@ -128,9 +128,9 @@ const toast = {
} }
const apiService = { const apiService = {
serverHost, serverHost,
imgUrl:'https://spsp.feashow.com/', imgUrl: 'https://spsp.feashow.com/',
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB', key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + `/upload/image/`, uploadImgUrl: serverHost + '/upload/image/',
//登录接口 //登录接口
login(data) { login(data) {
const url = '/login/mnpLogin' const url = '/login/mnpLogin'
@@ -145,6 +145,13 @@ const apiService = {
resolve(service.post(url, data)) resolve(service.post(url, data))
}) })
}, },
//地图
getMap(data) {
const url = '/home/map'
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
// 获取客服电话 // 获取客服电话
getCsTel() { getCsTel() {
const url = '/center/cfg?key=kf_phone' const url = '/center/cfg?key=kf_phone'
@@ -153,10 +160,10 @@ const apiService = {
}) })
}, },
// 获取详情 // 获取详情
getProductDetail(id) { getShopDetail(type,id) {
const url = `/home/pdetail/?productId=${id}` const url = `/home/adetail/?type=${type}&id=${id}`
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(service.get(url, id)) resolve(service.get(url))
}) })
}, },
//修改 //修改
@@ -197,17 +204,55 @@ const apiService = {
resolve(service.get(url)) resolve(service.get(url))
}) })
}, },
//获取首页分析数据
getStat() { getStat() {
const url = `/home/stat` const url = `/home/stat`
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(service.get(url)) resolve(service.get(url))
}) })
}, },
editPersonInfo(data){ //获取个人信息
getUser() {
const url = '/center/userinfo'
return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
//修改个人信息
editPersonInfo(data) {
const url = `/center/userupdate` const url = `/center/userupdate`
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
//获取我的匹配
getMyMatch() {
const url = `/center/match/`
return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
//获取行业和业态
getClassList(pid) {
const url = `/home/classlist/?pid=${pid}`
return new Promise((resolve, reject) => {
resolve(service.post(url))
})
},
//招募合伙
toBePartner(data){
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))
}) })
},
//获取商铺列表
getShopList(query){
const url = `/shop/alllist${query}`
return new Promise((resolve,reject) => {
resolve(service.get(url))
})
} }
} }
export { export {

BIN
static/shoplist/service.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/shoplist/share.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB