Merge branch 'master' of http://git.feashow.cn/odjbin/city-store-transfer
# Conflicts: # pages/publish/publishTransfer/publishTransfer.vue
This commit is contained in:
@@ -29,15 +29,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import form from 'uview-ui/libs/config/props/form';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
submitForm:{
|
||||
name:'',
|
||||
idcode:''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit(){
|
||||
console.log('提交');
|
||||
console.log('提交',form);
|
||||
|
||||
//this.$u.api.submit( this.form )
|
||||
uni.$u.toast('提交成功')
|
||||
|
||||
},
|
||||
confirmCheckWay(e){
|
||||
|
||||
@@ -74,7 +84,7 @@
|
||||
margin-top: 10rpx;
|
||||
margin-left: 17rpx;
|
||||
color: #c1c1c1;
|
||||
font-size: 27rpx;
|
||||
/* font-size: 27rpx; */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,170 +1,215 @@
|
||||
<template>
|
||||
<view class="detail" ref="viewref">
|
||||
<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 class="sub-detail u-flex">
|
||||
<view class="title">
|
||||
{{title}}
|
||||
{{shopInfo.tt}}
|
||||
</view>
|
||||
<view>
|
||||
<u-grid :col="3">
|
||||
<u-grid-item>
|
||||
<view class="grid-textup">22</view>
|
||||
<view class="grid-text">租金</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<view class="grid-textup">22</view>
|
||||
<view class="grid-text">转让费</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<view class="grid-textup">22</view>
|
||||
<view class="grid-text">面积</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-grid-item>
|
||||
<view class="grid-textup">{{shopInfo.zujin}}元/月</view>
|
||||
<view class="grid-text">租金</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<view class="grid-textup">{{shopInfo.zhuanrangfei}}万元</view>
|
||||
<view class="grid-text">转让费</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<view class="grid-textup">{{shopInfo.mianji}}m²</view>
|
||||
<view class="grid-text">面积</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bgc">
|
||||
|
||||
|
||||
</view>
|
||||
<view class="location-detail">
|
||||
<text>行业:</text>
|
||||
<text>区域:</text>
|
||||
<text>地址:</text>
|
||||
<text>行业:{{shopInfo.trade1}}</text>
|
||||
<text>区域:{{shopInfo.area1}}</text>
|
||||
<text>地址:{{shopInfo.adress}}</text>
|
||||
</view>
|
||||
<view class="bug-figure">
|
||||
|
||||
<view class="bgc">
|
||||
|
||||
</view>
|
||||
<view class="seller-shop-detail">
|
||||
<view class="avator">
|
||||
<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>
|
||||
<u-divider :height="20"></u-divider>
|
||||
<u-cell title="店铺介绍" label="美食杂货店是一个主打食品和日用杂货的淘宝222222222222222222222美食杂货店是一个主打食品和日用杂货的淘宝美食杂货店是一个主打食品和日用杂货的淘宝" label-style="color = #5D5D5D"></u-cell>
|
||||
<u-divider :height="5"></u-divider>
|
||||
<u-cell title="店铺介绍" :label="shopInfo.content" label-style="color = #5D5D5D;font-size: 24rpx;"></u-cell>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bottom">
|
||||
<view class="bot-tab">
|
||||
<view class="tab-left">
|
||||
<view class="share" @click="share()">
|
||||
<u-icon name="share-fill" color="green"></u-icon>
|
||||
分享
|
||||
</view>
|
||||
<view class="customer" @click="assist()">
|
||||
<u-icon name="server-fill" color="green"></u-icon>
|
||||
客服
|
||||
<image src="../../static/shoplist/share.png" style="width: 41rpx;height: 58rpx;"></image>
|
||||
</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 class="tab-right" @click="phonecall()">
|
||||
<view class="call" >
|
||||
<view class="call">
|
||||
<text>打电话</text>
|
||||
</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 class="bug-figure">
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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() {
|
||||
return {
|
||||
shopInfo:{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
phonecall(){
|
||||
console.log('打电话');
|
||||
},
|
||||
share(){
|
||||
console.log('分享');
|
||||
},
|
||||
assist(){
|
||||
console.log('客服');
|
||||
shopInfo: {},
|
||||
showM: false
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
const shopInfomation = JSON.parse(decodeURIComponent(options.shopInfo))
|
||||
console.log(shopInfomation);
|
||||
this.shopInfo = shopInfomation
|
||||
console.log('detail', options);
|
||||
//点击轮播图跳转详情, 传递的参数id, type
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
page {
|
||||
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;
|
||||
height: 30rpx;
|
||||
}
|
||||
.detail{
|
||||
|
||||
.detail {
|
||||
// background-color: #F8F8F8;
|
||||
height: 100%;
|
||||
}
|
||||
.bug-figure{
|
||||
height: 100rpx;
|
||||
|
||||
.bug-figure {
|
||||
height: 130rpx;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
.swiper {
|
||||
}
|
||||
.title{
|
||||
padding: 20rpx;
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
background-color: #fff;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.grid-textup{
|
||||
|
||||
.grid-textup {
|
||||
font-weight: 500;
|
||||
color: #CC3333;
|
||||
font-size: 20px;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.grid-text{
|
||||
|
||||
.grid-text {
|
||||
color: #B3B3B3;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.location-detail{
|
||||
|
||||
.location-detail {
|
||||
display: flex;
|
||||
margin-top: 50rpx;
|
||||
// margin-top: 50rpx;
|
||||
background-color: #fff;
|
||||
flex-direction: column;
|
||||
padding-left: 16rpx;
|
||||
line-height: 33px;
|
||||
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;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-left: 16rpx;
|
||||
margin-top: 50rpx;
|
||||
margin-top: 28rpx;
|
||||
|
||||
/deep/ .u-cell__body {
|
||||
padding: 0 12rpx !important;
|
||||
}
|
||||
}
|
||||
.bottom{
|
||||
|
||||
.bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background-color: #fff;
|
||||
@@ -173,26 +218,22 @@
|
||||
// height: 100rpx;
|
||||
// bottom: calc(var(--window-bottom) + 20px);
|
||||
}
|
||||
.bot-tab{
|
||||
|
||||
.bot-tab {
|
||||
display: flex;
|
||||
// flex: 1;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.tab-left{
|
||||
|
||||
.tab-left {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
height: 50px;
|
||||
}
|
||||
.customer{
|
||||
// height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 50%;
|
||||
}
|
||||
.tab-right{
|
||||
|
||||
|
||||
.tab-right {
|
||||
width: 50%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
@@ -200,14 +241,16 @@
|
||||
align-items: center;
|
||||
background-image: linear-gradient(to right, #E86262, #CC3333);
|
||||
}
|
||||
.share{
|
||||
|
||||
.share {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 50%;
|
||||
}
|
||||
.call{
|
||||
|
||||
.call {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -111,7 +111,6 @@
|
||||
},
|
||||
getCsTel() {
|
||||
this.$api.getCsTel().then(res => {
|
||||
console.log(res.data);
|
||||
if (res.data.data) {
|
||||
this.mobile = res.data.data.kf_phone
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<DropDown></DropDown>
|
||||
</view>
|
||||
<view class="marginLR10">
|
||||
<ShowShopList :showStyle="1"/>
|
||||
<ShowShopList :showStyle="2" :adlinkPath = "adlinkPath"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -24,7 +24,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
adlinkPath: "/pages/publish/publishRent/publishRent"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<DropDown></DropDown>
|
||||
</view>
|
||||
<view class="marginLR10">
|
||||
<ShowShopList :showStyle="1"/>
|
||||
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -24,7 +24,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
adlinkPath: "/pages/publish/publishInvestment/publishInvestment"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -3,18 +3,13 @@
|
||||
<InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper>
|
||||
<view class="home-content">
|
||||
<view class="service">
|
||||
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/>
|
||||
<button
|
||||
open-type="contact"
|
||||
bindcontact="handleContact"
|
||||
session-from="sessionFrom"
|
||||
class="service-btn"
|
||||
>
|
||||
</button>
|
||||
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx" />
|
||||
<button open-type="contact" bindcontact="handleContact" session-from="sessionFrom" class="service-btn">
|
||||
</button>
|
||||
</view>
|
||||
<HomeNavCard></HomeNavCard>
|
||||
<HomeNoticeBar :text="notice" />
|
||||
<Statistics :statNum="statNum"/>
|
||||
<Statistics :statNum="statNum" />
|
||||
<view class="show-and-search">
|
||||
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
|
||||
<text>店铺列表</text>
|
||||
@@ -34,6 +29,7 @@
|
||||
import HomeNoticeBar from "./HomeMainContent/HomeNoticeBar.vue"
|
||||
import HomeNavCard from "./HomeMainContent/HomeNavCard.vue"
|
||||
import Statistics from "./HomeMainContent/Statistics.vue"
|
||||
|
||||
import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js"
|
||||
export default {
|
||||
components: {
|
||||
@@ -46,7 +42,7 @@
|
||||
notice: [],
|
||||
chooseIndex: 0,
|
||||
statNum: {},
|
||||
swiperList:[]
|
||||
swiperList: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -54,22 +50,36 @@
|
||||
this.getNotice()
|
||||
this.getStat()
|
||||
this.open()
|
||||
this.getClassList()
|
||||
},
|
||||
methods: {
|
||||
getBanner(){
|
||||
this.$api.getBanner().then(res=>{
|
||||
this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img)
|
||||
getBanner() {
|
||||
this.$api.getBanner().then(res => {
|
||||
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(){
|
||||
this.$api.getHotInfo().then(res=>{
|
||||
this.notice = res.data.data.map(item=>item.title)
|
||||
getNotice() {
|
||||
this.$api.getHotInfo().then(res => {
|
||||
this.notice = res.data.data.map(item => item.title)
|
||||
})
|
||||
},
|
||||
getStat(){
|
||||
this.$api.getStat().then(res=>{
|
||||
getStat() {
|
||||
this.$api.getStat().then(res => {
|
||||
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() {
|
||||
@@ -95,6 +105,8 @@
|
||||
success(res) {
|
||||
console.log('res.latitude', res.latitude);
|
||||
console.log('res.longitude', res.longitude);
|
||||
uni.setStorageSync('latitude', res.latitude);
|
||||
uni.setStorageSync('longitude', res.longitude);
|
||||
qqmapsdk.reverseGeocoder({
|
||||
location: {
|
||||
latitude: res.latitude,
|
||||
@@ -106,7 +118,7 @@
|
||||
console.log(re.result.ad_info.district);
|
||||
let city = re.result.ad_info.city
|
||||
let district = re.result.ad_info.district
|
||||
console.log('city-code',re.result.ad_info.city_code.substring(3));
|
||||
console.log('city-code', re.result.ad_info.city_code.substring(3));
|
||||
uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3));
|
||||
uni.setStorageSync('city', city.slice(0, 2));
|
||||
uni.setStorageSync('district', district);
|
||||
@@ -127,11 +139,11 @@
|
||||
open() {
|
||||
var that = this
|
||||
uni.getSetting({
|
||||
success: function (res) {
|
||||
if (res.authSetting['scope.userFuzzyLocation']) {
|
||||
console.log('用户已经授权定位权限');
|
||||
} else {
|
||||
console.log('用户未授权定位权限');
|
||||
success: function(res) {
|
||||
if (res.authSetting['scope.userFuzzyLocation']) {
|
||||
console.log('用户已经授权定位权限');
|
||||
} else {
|
||||
console.log('用户未授权定位权限');
|
||||
uni.authorize({
|
||||
scope: 'scope.userFuzzyLocation',
|
||||
success: function() {
|
||||
@@ -161,8 +173,8 @@
|
||||
return false;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -176,11 +188,13 @@
|
||||
|
||||
.home-content {
|
||||
margin: 0 10px;
|
||||
|
||||
.service {
|
||||
position: fixed;
|
||||
right: 17rpx;
|
||||
top: 1109rpx;
|
||||
z-index: 1;
|
||||
|
||||
.service-btn {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -189,6 +203,7 @@
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
}
|
||||
|
||||
.service-btn::after {
|
||||
border: none;
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="content">
|
||||
<map id="map" @markertap="markerClick" :markers="marker" :show-location="true" :latitude="lat" :longitude="lng"
|
||||
:show-scale="true"></map>
|
||||
<map id="map" @markertap="markerClick" @regionchange="handleRegionChange()" :markers="marker" show-location="true"
|
||||
:latitude="lat" :longitude="lng" :show-scale="true"></map>
|
||||
</view>
|
||||
<!-- <view class="down-shop">
|
||||
<view class="down-shop" v-if="showShop">
|
||||
<ShowShopListItem :shopInfo="shopList" :is-adshow="true" :show-style="0"></ShowShopListItem>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -21,29 +21,103 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lat: '30.48772',
|
||||
lng: '104.080145',
|
||||
marker: [{
|
||||
id: 1,
|
||||
latitude: 30.488573,
|
||||
longitude: 104.081248,
|
||||
iconPath: '../../../static/map/sp_icon_dw.png',
|
||||
width: '58rpx',
|
||||
height: '72rpx',
|
||||
rotate: 0,
|
||||
alpha: 1
|
||||
radius: '',
|
||||
showShop: false,
|
||||
scaleM: [{
|
||||
scale: 3,
|
||||
milo: 1000000
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
latitude: 30.48772,
|
||||
longitude: 104.080145,
|
||||
// iconPath: '../../../static/map/sp_icon_dw.png',
|
||||
width: '58rpx',
|
||||
height: '72rpx',
|
||||
rotate: 0,
|
||||
alpha: 1
|
||||
scale: 4,
|
||||
milo: 500000
|
||||
},
|
||||
{
|
||||
scale: 5,
|
||||
milo: 200000
|
||||
}, {
|
||||
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: {
|
||||
shopid: 1,
|
||||
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
||||
@@ -75,17 +149,132 @@
|
||||
this._mapContext.on("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: {
|
||||
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) {
|
||||
console.log('标记点击', e);
|
||||
this.showShop = true
|
||||
let markerId = e.markerId; //点击标记点, 获取id, 查询店铺详情, 展示在下方
|
||||
this.getDetail(1, markerId)
|
||||
this.marker.forEach(item => {
|
||||
if (markerId === item.id) {
|
||||
item.iconPath = ""
|
||||
item.iconPath = "../../../static/map/sp_icon_hdw.png"
|
||||
item.width = '58rpx'
|
||||
item.height = '72rpx'
|
||||
} else {
|
||||
item.iconPath = "../../../static/map/sp_icon_dw.png"
|
||||
item.width = '58rpx'
|
||||
item.height = '72rpx'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="avatar">
|
||||
<u-avatar @click="changeAvatar()" :src="avatar"></u-avatar>
|
||||
<u-avatar @click="changeAvatar()" size="140rpx" :src="Info.avatar"></u-avatar>
|
||||
</view>
|
||||
<view class="name-edit">
|
||||
<!-- <view class="name-edit">
|
||||
<text>用户名:</text>
|
||||
<u-input border="surround" v-model="username"></u-input>
|
||||
</view>
|
||||
<view class="send">
|
||||
<u-button @click="editInfo" color="linear-gradient(to right, #E86262, #CC3333)">提交</u-button>
|
||||
<u-input border="surround" v-model="Info.username"></u-input>
|
||||
</view> -->
|
||||
<view class="info-name">
|
||||
<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 style="height: 100rpx;"></view>
|
||||
<u-button @click="editInfo(Info)" color="#339967">提交</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -17,50 +24,120 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
username:'',
|
||||
avatar:''
|
||||
Info: {
|
||||
avatar: '',
|
||||
username: '',
|
||||
avatarUrl: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeAvatar(){
|
||||
// uni.uploadFile()
|
||||
console.log(111);
|
||||
//获取头像昵称
|
||||
getUserInfo() {
|
||||
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({
|
||||
nickname:this.$data.nickname,
|
||||
avatar:this.$data.avatar,
|
||||
Headers:wx.getStorageSync('token')
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
nickname: this.Info.username,
|
||||
avatar: this.avatarUrl
|
||||
}).then(res => {
|
||||
console.log('修改头像昵称==', res);
|
||||
this.$toast.success(res.data.msg)
|
||||
if (res.data.code == 1) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/my/my'
|
||||
})
|
||||
}
|
||||
}).finally(_ => {})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
this.$data.username = wx.getStorageSync('nickname')
|
||||
this.$data.avatar = wx.getStorageSync('avatar')
|
||||
|
||||
this.getUserInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.avatar{
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
margin: 60rpx 0;
|
||||
/* width: 100%; */
|
||||
/* height: 200rpx; */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.name-edit{
|
||||
|
||||
.name-edit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
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>
|
||||
@@ -4,11 +4,13 @@
|
||||
<view class="profile">
|
||||
<image src="../../static/img/wo_bj_ll@2x.png" mode="aspectFit" class="profile-bgi"></image>
|
||||
<view class="avator">
|
||||
<u-avatar :src="src"></u-avatar>
|
||||
<u-avatar :src="src" size="100rpx"></u-avatar>
|
||||
</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 class="publish">
|
||||
<u-cell-group>
|
||||
@@ -54,8 +56,7 @@
|
||||
return
|
||||
}
|
||||
this.isLoad = true
|
||||
this.$data.account = wx.getStorageSync('account')
|
||||
this.$data.username = wx.getStorageSync('nickname')
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
reOnLoad() {
|
||||
@@ -65,6 +66,9 @@
|
||||
return
|
||||
}
|
||||
this.isLoad = true
|
||||
if (this.isLoad) {
|
||||
this.getInfo()
|
||||
}
|
||||
},
|
||||
failToLoad() {
|
||||
uni.reLaunch({
|
||||
@@ -86,17 +90,22 @@
|
||||
url: '/pages/Partnerships/Partnerships'
|
||||
})
|
||||
},
|
||||
toEdit(){
|
||||
toEdit() {
|
||||
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>
|
||||
@@ -134,9 +143,8 @@
|
||||
font-weight: 1rpx;
|
||||
display: flex;
|
||||
}
|
||||
.edit-icon{
|
||||
|
||||
}
|
||||
|
||||
.edit-icon {}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,46 +1,60 @@
|
||||
<template>
|
||||
<view class="form">
|
||||
<u-form :model="form" ref="uForm">
|
||||
<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%" right-icon="arrow-right">
|
||||
<text @click="show1 = true" class="checktext">请选择所属区域</text>
|
||||
<view class="arrow-icon">
|
||||
<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-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" 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>
|
||||
<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 class="arrow-icon">
|
||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@@ -48,53 +62,183 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
|
||||
ShopInfomation:{
|
||||
city:'',
|
||||
area:'',
|
||||
count:0,
|
||||
|
||||
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
|
||||
ShopInfomation: {
|
||||
city: '',
|
||||
area: '',
|
||||
count: 0,
|
||||
|
||||
},
|
||||
|
||||
form:{
|
||||
title:''
|
||||
|
||||
form: {
|
||||
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: {
|
||||
confirmArea(e) {
|
||||
this.ShopInfomation.city = e.value[0]
|
||||
this.ShopInfomation.area = e.value[1]
|
||||
this.show1 = false
|
||||
},
|
||||
submit(){
|
||||
console.log('提交');
|
||||
handleSearchAddress() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/publish/chooseAddress/chooseAddress'
|
||||
})
|
||||
},
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
.count{
|
||||
|
||||
}
|
||||
.form{
|
||||
.count {}
|
||||
|
||||
.form {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.input-class{
|
||||
|
||||
.input-class {
|
||||
font-size: 30rpx;
|
||||
font-weight:1px;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
|
||||
|
||||
}
|
||||
.upload{
|
||||
|
||||
.upload {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
@@ -103,30 +247,40 @@
|
||||
height: 300rpx;
|
||||
// margin-right: 20px;
|
||||
}
|
||||
.submit-btn{
|
||||
|
||||
.submit-btn {
|
||||
width: 80%;
|
||||
}
|
||||
.bug-figure{
|
||||
|
||||
.bug-figure {
|
||||
height: 100rpx;
|
||||
}
|
||||
.checkbox1{
|
||||
|
||||
.checkbox1 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.checktext{
|
||||
|
||||
.checktext {
|
||||
margin-top: 5rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight:1px;
|
||||
font-weight: 1px;
|
||||
color: #c1c4c7;
|
||||
}
|
||||
|
||||
.picker{
|
||||
.checkedtext{
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
}
|
||||
.picker {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.arrow-icon{
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
transform: translateY(-20rpx);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -3,50 +3,57 @@
|
||||
<u-form :model="form" ref="uForm">
|
||||
<view class="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>
|
||||
<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%">
|
||||
<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%" right-icon="arrow-right">
|
||||
<text @click="show1 = true" class="checktext">请选择所属区域</text>
|
||||
<view class="arrow-icon">
|
||||
<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%">
|
||||
<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%" class="picker">
|
||||
<text @click="show2 = true" class="checktext">请选择行业类型</text>
|
||||
<view class="arrow-icon">
|
||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||
</view>
|
||||
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = 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>
|
||||
<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 class="arrow-icon">
|
||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||
</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="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>
|
||||
</template>
|
||||
|
||||
@@ -54,53 +61,202 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
|
||||
ShopInfomation:{
|
||||
city:'',
|
||||
area:'',
|
||||
count:0,
|
||||
|
||||
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
|
||||
ShopInfomation: {
|
||||
city: '',
|
||||
area: '',
|
||||
count: 0,
|
||||
|
||||
},
|
||||
|
||||
form:{
|
||||
title:''
|
||||
|
||||
form: {
|
||||
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: {
|
||||
confirmArea(e) {
|
||||
this.ShopInfomation.city = e.value[0]
|
||||
this.ShopInfomation.area = e.value[1]
|
||||
this.show1 = false
|
||||
},
|
||||
submit(){
|
||||
console.log('提交');
|
||||
handleSearchAddress() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/publish/chooseAddress/chooseAddress'
|
||||
})
|
||||
},
|
||||
changeAddress(e) {
|
||||
// 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>
|
||||
|
||||
<style lang="scss">
|
||||
.count{
|
||||
|
||||
}
|
||||
.form{
|
||||
.count {}
|
||||
|
||||
.form {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.input-class{
|
||||
|
||||
.input-class {
|
||||
font-size: 30rpx;
|
||||
font-weight:1px;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
|
||||
|
||||
}
|
||||
.upload{
|
||||
|
||||
.upload {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
@@ -109,30 +265,40 @@
|
||||
height: 300rpx;
|
||||
// margin-right: 20px;
|
||||
}
|
||||
.submit-btn{
|
||||
|
||||
.submit-btn {
|
||||
width: 80%;
|
||||
}
|
||||
.bug-figure{
|
||||
|
||||
.bug-figure {
|
||||
height: 100rpx;
|
||||
}
|
||||
.checkbox1{
|
||||
|
||||
.checkbox1 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.checktext{
|
||||
|
||||
.checktext {
|
||||
margin-top: 5rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight:1px;
|
||||
font-weight: 1px;
|
||||
color: #c1c4c7;
|
||||
}
|
||||
|
||||
.picker{
|
||||
.checkedtext{
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
}
|
||||
.picker {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.arrow-icon{
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
transform: translateY(-20rpx);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -6,40 +6,45 @@
|
||||
<text class="count">发布店铺图片({{ShopInfomation.count}}/5)</text>
|
||||
</view>
|
||||
|
||||
<u-form-item label="标题" label-position="top" border-bottom="true" >
|
||||
<u-input v-model="form.name" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
|
||||
<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" right-icon="arrow-right">
|
||||
<text @click="show1 = true" class="checktext">请选择所属区域</text>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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 label="地址" label-position="top" border-bottom="true" >
|
||||
<u-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input>
|
||||
<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>
|
||||
</u-form-item>
|
||||
<u-form-item label="适合行业" label-position="top" border-bottom="true" class="picker" label-width="100%">
|
||||
<text @click="show2 = true" class="checktext">请选择行业类型</text>
|
||||
<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"></u-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"></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 label="面积" label-position="top" border-bottom="true" >
|
||||
<u-input v-model="form.name" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
|
||||
<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="100%">
|
||||
<u-input v-model="form.name" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
|
||||
<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" >
|
||||
<u-input v-model="form.name" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input>
|
||||
<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-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-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 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>
|
||||
<view class="bug-figure"></view>
|
||||
@@ -60,14 +65,79 @@
|
||||
|
||||
},
|
||||
|
||||
form:{
|
||||
title:''
|
||||
form: {
|
||||
title: '',
|
||||
region: '',
|
||||
place: '',
|
||||
trade: '',
|
||||
size: '',
|
||||
rent: '',
|
||||
name: '',
|
||||
call: '',
|
||||
introduce: ''
|
||||
},
|
||||
columns:[
|
||||
],
|
||||
Classcolumns:[],
|
||||
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']
|
||||
}],
|
||||
'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.show1 = false
|
||||
},
|
||||
submit(){
|
||||
console.log('提交');
|
||||
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]
|
||||
},
|
||||
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>
|
||||
|
||||
@@ -123,7 +220,12 @@
|
||||
font-weight:1px;
|
||||
color: #c1c4c7;
|
||||
}
|
||||
|
||||
.checkedtext{
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
}
|
||||
.picker{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -1,60 +1,62 @@
|
||||
<template>
|
||||
<view class="form">
|
||||
<u-form :model="form" ref="uForm">
|
||||
<u-form-item prop="image">
|
||||
<view class="upload">
|
||||
<u-upload max-count="5" upload-icon="photo"></u-upload>
|
||||
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title">
|
||||
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class"
|
||||
border="none"></u-input>
|
||||
<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" right-icon="arrow-right" prop="region">
|
||||
<text @click="show1 = true" class="checktext">请选择所属区域</text>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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 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"
|
||||
@change="changeAddress"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker">
|
||||
<text @click="show2 = true" class="checktext">请选择行业类型</text>
|
||||
<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"></u-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"
|
||||
v-model="form.trade"></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 label="业态" label-position="top" border-bottom="true">
|
||||
<text @click="show3 = true" class="checktext">请选择行业业态</text>
|
||||
<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"></u-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"
|
||||
v-model="form.karma"></u-picker>
|
||||
<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" 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-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-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-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-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-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-form-item>
|
||||
</u-form>
|
||||
@@ -90,25 +92,79 @@
|
||||
call: '',
|
||||
introduce: ''
|
||||
},
|
||||
columns: [
|
||||
|
||||
],
|
||||
Classcolumns: [],
|
||||
ClassCheckId:'',
|
||||
Karmacolumns: [],
|
||||
pid:[],
|
||||
show1: false,
|
||||
show2: false,
|
||||
show3: false,
|
||||
rules: {
|
||||
'title': [{
|
||||
type: 'string',
|
||||
require: true,
|
||||
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': [{
|
||||
type: 'string',
|
||||
require: true,
|
||||
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'],
|
||||
}]
|
||||
|
||||
},
|
||||
}
|
||||
@@ -119,11 +175,6 @@
|
||||
url: '/pages/publish/chooseAddress/chooseAddress'
|
||||
})
|
||||
},
|
||||
confirmArea(e) {
|
||||
this.ShopInfomation.city = e.value[0]
|
||||
this.ShopInfomation.area = e.value[1]
|
||||
this.show1 = false
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
console.log("提交表单信息:" + JSON.stringify(this.form))
|
||||
@@ -135,8 +186,8 @@
|
||||
})
|
||||
},
|
||||
changeAddress(e) {
|
||||
console.log('changeAddress', e);
|
||||
// this.getAddressList(e)
|
||||
// console.log('changeAddress', e);
|
||||
this.getAddressList(e)
|
||||
},
|
||||
getAddressList(value) {
|
||||
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() {
|
||||
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>
|
||||
@@ -203,7 +294,12 @@
|
||||
font-weight: 1px;
|
||||
color: #c1c4c7;
|
||||
}
|
||||
|
||||
.checkedtext{
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
}
|
||||
.picker {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<ShowShopList v-if="listId == 0" class="list" :isEdit="true"></ShowShopList>
|
||||
<SearchShopList v-if="listId == 1" class="list" :is-edit="true"></SearchShopList>
|
||||
<ShowShopList v-if="listId == 2" class="list" :is-edit="true"></ShowShopList>
|
||||
<ShowShopList v-if="listId == 3" class="list" :is-edit="true"></ShowShopList>
|
||||
<ShowShopList v-if="listId == 4" class="list" ></ShowShopList>
|
||||
<view class="content">
|
||||
<ShowShopList v-if="listId == 0" class="list" :isEdit="true" :showStyle="1"></ShowShopList>
|
||||
<SearchShopList v-if="listId == 1" class="list" :is-edit="true" :showStyle="1"></SearchShopList>
|
||||
<ShowShopList v-if="listId == 2" class="list" :is-edit="true" :showStyle="2"></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>
|
||||
</template>
|
||||
|
||||
@@ -20,10 +22,17 @@
|
||||
data() {
|
||||
return {
|
||||
titletext:'',
|
||||
listId:''
|
||||
listId:'',
|
||||
matchList:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMatch(){
|
||||
this.$api.getMyMatch().then(res => {
|
||||
this.macthList = res.data.data
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onLoad: function (option) {
|
||||
@@ -44,9 +53,10 @@
|
||||
if(this.titletext == '发布的店铺出租'){
|
||||
this.listId = 3
|
||||
}
|
||||
if(this.titletext == '我的匹配')
|
||||
if(this.titletext == '我的匹配'){
|
||||
this.listId = 4
|
||||
|
||||
this.getMatch()
|
||||
}
|
||||
|
||||
},
|
||||
computed:{
|
||||
@@ -87,4 +97,8 @@
|
||||
page{
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.content{
|
||||
margin: 0 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user