# 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() {
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: {
changeActiveIndex(index) {

View File

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

View File

@@ -5,6 +5,7 @@
:key="shopid"
:shopInfo="item"
:is-adshow="isADshow"
:adlinkPath="adlinkPath"
:show-style="showStyle"
:is-edit="isEdit"
@delItem="handleDel"
@@ -39,52 +40,98 @@
return true
}
},
adlinkPath: {
type: String,
default() {
return ''
}
},
isEdit: {
type: Boolean,
default() {
return false
}
},
//获取列表类型传递参数部分
listType:{
type: Number,
default() {
return 1
}
},
pageSize: {
type: Number,
default() {
return 5
}
},
pageNum: {
type: Number,
default() {
return 1
}
},
shopInfoList: {
type: Array,
default() {
return [
{
id: 1,
type: 1,
shopid: 1,
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
title: '琴行铺面转让',
promotionNum: 23,
price: 6000,
price: 5000,
date: '2023-11-02',
pos: '锦江区',
exactPos: '锦江区-汇源南路366号',
sqr: 100,
zrfText: "转让费20万",
zrfText: "转让费20000万",
category: '餐饮美食',
uname: "张先生",
phoneNum: 13348946108,
},
{
shopid: 2,
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
title: '琴行铺面转让',
promotionNum: 28,
price: 5000,
date: '2023-11-02',
pos: '锦江区',
exactPos: '锦江区-汇源南路366号',
sqr: 200,
zrfText: "转让费30万",
category: '餐饮美食',
uname: "王先生",
phoneNum: 13348946108,
"id": "1",
"pic": "3",
"tt": "333",
"type": "0",
"adress": "",
"trade1": "啊",
"trade2": "餐馆",
"btype1": "",
"btype2": "",
"area1": "青羊区",
"area2": "",
"mianji": "33",
"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: {
handleDel(shopid){
@@ -93,7 +140,21 @@
// TODO不能直接修改
// if(delindex !== -1) this.shopInfoList = this.shopInfoList.slice(delindex,1)
// 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>

View File

@@ -2,7 +2,7 @@
<view class="list-border">
<view class="list-container" @click="enterDetail()">
<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 class="text-area">
<text style="font-weight: 500;">{{shopInfo.title}}</text>
@@ -11,13 +11,13 @@
<view>
<u-image src="/static/shoplist/sy_icon_lbdw.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.pos}}</text>
<text>{{shopInfo.area1}}</text>
</view>
<view>
<view>
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.sqr}}m2</text>
<text>{{shopInfo.mianji}}m2</text>
</view>
</view>
<view v-else class="pos-and-sqr pos-only" >
@@ -25,41 +25,41 @@
<view>
<u-image src="/static/shoplist/dp_icon_hhhdw.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.exactPos}}</text>
<text>{{shopInfo.area2}}</text>
</view>
</view>
<view class="rent-and-date">
<text>租金{{shopInfo.price}}/</text>
<text v-if="showStyle==0">发布日期{{shopInfo.date}}</text>
<text v-else="showStyle==1 ">{{shopInfo.zrfText}}</text>
<text>租金{{shopInfo.zujin}}/</text>
<text v-if="showStyle == 0">发布日期{{shopInfo.create_time}}</text>
<text v-if="showStyle == 1">转让费{{shopInfo.zhuanrangfei}}</text>
</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>
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.sqr}}m2</text>
<text>{{shopInfo.mianji}}m2</text>
</view>
<view>
<view>
<u-image src="/static/shoplist/sy_icon_lblhy.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.category}}</text>
<text>{{shopInfo.trade1}}</text>
</view>
<view>
<view>
<u-image src="/static/shoplist/sy_icon_lbxm.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.uname}}</text>
<text>{{shopInfo.lianxiren}}</text>
</view>
<view>
<view>
<u-image src="/static/shoplist/sy_icon_lblxr.png" width="12px" height="15px"></u-image>
</view>
<text>{{shopInfo.phoneNum}}</text>
<text>{{shopInfo.mobile}}</text>
</view>
</view>
@@ -67,7 +67,7 @@
v-if="isADShow"
class="list-ads bottom-common"
style="font-size: 11px;"
@click="handleAD()"
@click="handleAD"
>
<view>
<text>已将该店推给</text>
@@ -78,11 +78,11 @@
</view>
<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>
<text>编辑</text>
</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>
<text>删除</text>
</view>
@@ -95,7 +95,8 @@
* @property {Object} shopInfo 传入商铺对象数据
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
* @property {Boolean} isADshow 是否显示推广广告
* @property {Boolean} isEdit 是否显示编辑和删除
* @property {Boolean} isEdit 是否显示编辑和删除
* @property {String} adlinkPath 推广广告链接
*/
export default {
props: {
@@ -107,24 +108,35 @@
}
}
},
// 展示商铺的样式类型
showStyle:{
type: Number,
default() {
return 0
}
},
// 是否展示推广广告
isADShow: {
type: Boolean,
default() {
return true
}
},
// 推广广告链接
adlinkPath: {
type: String,
default() {
return ''
}
},
// 是否可编辑
isEdit: {
type: Boolean,
default() {
return false
}
}
},
},
data() {
@@ -142,19 +154,34 @@
console.log("点击了编辑ID为",shopid);
},
handleDel(shopid) {
// 需完善删除请求
this.$emit('delItem', shopid)
},
enterDetail(){
// console.log("进入详情页面");
const query=this.$u.queryParams({
id: this.shopInfo.id,
type: this.shopInfo.type
})
// console.log("query",query);
uni.navigateTo({
url: '/pages/detail/detail'
url: '/pages/detail/detail' + `${query}`
})
},
handleAD(){
uni.navigateTo({
url: '/pages/publish/publishTransfer/publishTransfer'
})
// TODO 完成页面跳转
if (this.adlinkPath) {
uni.navigateTo({
url: this.adlinkPath
})
}else {
uni.navigateTo({
url: '/pages/publish/publishTransfer/publishTransfer'
})
}
}
}
},
}
</script>

View File

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

View File

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

View File

@@ -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}}</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;

View File

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

View File

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

View File

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

View File

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

View File

@@ -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'
}
})
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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 = {
get(url, data) {
@@ -128,9 +128,9 @@ const toast = {
}
const apiService = {
serverHost,
imgUrl:'https://spsp.feashow.com/',
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + `/upload/image/`,
imgUrl: 'https://spsp.feashow.com/',
key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + '/upload/image/',
//登录接口
login(data) {
const url = '/login/mnpLogin'
@@ -145,6 +145,13 @@ const apiService = {
resolve(service.post(url, data))
})
},
//地图
getMap(data) {
const url = '/home/map'
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
// 获取客服电话
getCsTel() {
const url = '/center/cfg?key=kf_phone'
@@ -153,10 +160,10 @@ const apiService = {
})
},
// 获取详情
getProductDetail(id) {
const url = `/home/pdetail/?productId=${id}`
getShopDetail(type,id) {
const url = `/home/adetail/?type=${type}&id=${id}`
return new Promise((resolve, reject) => {
resolve(service.get(url, id))
resolve(service.get(url))
})
},
//修改
@@ -197,17 +204,55 @@ const apiService = {
resolve(service.get(url))
})
},
//获取首页分析数据
getStat() {
const url = `/home/stat`
return new Promise((resolve, reject) => {
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`
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) => {
console.log(data);
resolve(service.post(url,data))
})
},
//获取商铺列表
getShopList(query){
const url = `/shop/alllist${query}`
return new Promise((resolve,reject) => {
resolve(service.get(url))
})
}
}
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