Merge branch 'test'

This commit is contained in:
LuoShijie
2023-11-15 21:01:07 +08:00
21 changed files with 798 additions and 358 deletions

View File

@@ -1,26 +1,21 @@
<template> <template>
<view class="container"> <view class="container">
<view class="tabs-bg"/> <view class="tabs-bg" />
<view class="tabs"> <view class="tabs">
<view <view class="title-view" v-for="(item, index) in title" :key="item" @click="changeActiveIndex(index)"
class="title-view" :class="{isActive: activeIndex === index}">
v-for="(item, index) in title"
:key="item"
@click="changeActiveIndex(index)"
:class="{isActive: activeIndex === index}"
>
<text>{{item}}</text> <text>{{item}}</text>
<view class="arrow" v-if="activeIndex !== index"> <view class="arrow" v-if="activeIndex !== index">
<u-image src="/static/dropdown/dp_icon_lxia.png" width="14rpx" height="11rpx"/> <u-image src="/static/dropdown/dp_icon_lxia.png" width="14rpx" height="11rpx" />
</view> </view>
<view class="arrow" v-if="activeIndex === index"> <view class="arrow" v-if="activeIndex === index">
<u-image src="/static/dropdown/dp_icon_hlxia.png" width="14rpx" height="11rpx"/> <u-image src="/static/dropdown/dp_icon_hlxia.png" width="14rpx" height="11rpx" />
</view> </view>
</view> </view>
</view> </view>
<view class="item-border"> <view class="item-border">
<DropDownItem v-if="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop"/> <DropDownItem v-if="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop" :type="'region'" />
</view> </view>
</view> </view>
</template> </template>
@@ -31,21 +26,26 @@
*/ */
import DropDownItem from "./DropDownItem.vue" import DropDownItem from "./DropDownItem.vue"
export default { export default {
name:"DropDown", name: "DropDown",
components: { components: {
DropDownItem DropDownItem
}, },
props: { props: {
postlist: { postlist: {
type:Array, type: Array,
default(){ default () {
return [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']] return [
['全部', '餐饮美食', '百货超市', '美容美发'],
['区域1', '区域2', '区域3', '区域4'],
['100m2', '200m2', '300m2'],
['附近的', '最新发布的', '其他']
]
} }
} }
}, },
data() { data() {
return { return {
title: ['行业','区域','面积','筛选'], title: ['行业', '区域', '面积', '筛选'],
activeIndex: -1, activeIndex: -1,
// postlist: [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']] // postlist: [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']]
}; };
@@ -55,29 +55,33 @@
return this.postlist[this.activeIndex] return this.postlist[this.activeIndex]
} }
}, },
created() {
this.postlist[1]=JSON.parse(uni.getStorageSync('regionList'))
},
methods: { methods: {
changeActiveIndex(index){ changeActiveIndex(index) {
if(this.activeIndex === index){ if (this.activeIndex === index) {
this.activeIndex = -1; this.activeIndex = -1;
}else } else
this.activeIndex = index this.activeIndex = index
}, },
cancelDrop() { cancelDrop() {
console.log("取消遮罩"); console.log("取消遮罩");
this.activeIndex = -1; this.activeIndex = -1;
} }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.isActive{ .isActive {
color: #CC3333; color: #CC3333;
} }
.container{
.container {
margin-top: 10px; margin-top: 10px;
position: relative; position: relative;
.tabs-bg { .tabs-bg {
position: absolute; position: absolute;
background-color: $uni-bg-color-grey; background-color: $uni-bg-color-grey;
@@ -86,7 +90,8 @@
transform: translateY(-20rpx); transform: translateY(-20rpx);
z-index: 2; z-index: 2;
} }
.tabs{
.tabs {
background-color: #fff; background-color: #fff;
height: 100rpx; height: 100rpx;
display: flex; display: flex;
@@ -94,8 +99,10 @@
position: relative; position: relative;
z-index: 3; z-index: 3;
} }
.title-view { .title-view {
display: flex; display: flex;
>text { >text {
font-size: 14px; font-size: 14px;
display: flex; display: flex;
@@ -103,6 +110,7 @@
justify-content: center; justify-content: center;
} }
} }
.arrow { .arrow {
margin-left: 8rpx; margin-left: 8rpx;
display: flex; display: flex;
@@ -110,7 +118,8 @@
justify-content: center; justify-content: center;
} }
} }
.item-border{
.item-border {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@@ -1,14 +1,12 @@
<template> <template>
<view class="root"> <view>
<view class="mask" @click="handleMask"/> <view class="root">
<view class="list-container"> <view class="mask" @click="handleMask"></view>
<view <view class="list-container">
class="item" <view class="item" v-for="(item,index) in list" :class="{isActive: activeIndex === index}"
v-for="(item,index) in list" @click="handleActive(index)">
:class="{isActive: activeIndex === index}" <text class="list-text">{{item}}</text>
@click="handleActive(index)" </view>
>
<text class="list-text">{{item}}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -19,58 +17,66 @@
props: { props: {
list: { list: {
type: Array, type: Array,
default(){ default () {
return [] return []
}
},
type: {
type: String,
default () {
return ''
} }
} }
}, },
data(){ data() {
return{ return {
activeIndex:-1 activeIndex: -1
} }
}, },
methods: { methods: {
handleMask() { handleMask() {
this.$emit('cancelDrop'); this.$emit('cancelDrop');
}, },
async handleActive(index) { async handleActive(index) {
this.activeIndex = index; this.activeIndex = index;
// 设置一个定时器等待200毫秒 // 设置一个定时器等待200毫秒
const delayPromise = this.delay(200); const delayPromise = this.delay(200);
// 等待定时器完成 // 等待定时器完成
await delayPromise; await delayPromise;
this.handleMask(); this.handleMask();
}, },
delay(ms) { delay(ms) {
return new Promise((resolve) => { return new Promise((resolve) => {
// 设置一个定时器并将定时器的ID存储在this.timerId中 // 设置一个定时器并将定时器的ID存储在this.timerId中
this.timerId = setTimeout(() => { this.timerId = setTimeout(() => {
resolve(); resolve();
// 清除定时器 // 清除定时器
clearTimeout(this.timerId); clearTimeout(this.timerId);
}, ms); }, ms);
}); });
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.isActive{ .isActive {
color: #CC3333; color: #CC3333;
} }
.mask{
position: fixed; .mask {
top: 0; position: fixed;
left: 0; top: 0;
width: 100%; left: 0;
height: 100%; width: 100%;
background-color: #000; height: 100%;
-webkit-backdrop-filter:saturate(150%) blur(8px); background-color: #000;
background-color:rgba(0,0,0,.3); -webkit-backdrop-filter: saturate(150%) blur(8px);
background-color: rgba(0, 0, 0, .3);
z-index: 20; z-index: 20;
} }
.root { .root {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -80,13 +86,15 @@
background-color: #fff; background-color: #fff;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
.list-container { .list-container {
position: relative; position: relative;
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
z-index: 21; z-index: 21;
border-radius: 0px 0px 20px 20px; border-radius: 0px 0px 20px 20px;
height: 320rpx;
overflow-y: auto;
.item { .item {
border-top: 1px solid #EEEEEE; border-top: 1px solid #EEEEEE;
font-weight: 500; font-weight: 500;

View File

@@ -18,7 +18,6 @@
</template> </template>
<script> <script>
import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js"
export default { export default {
name: "inputAndSwiper", name: "inputAndSwiper",
props: { props: {
@@ -39,98 +38,19 @@
}, },
data() { data() {
return { return {
position: '' position: uni.getStorageSync('city')+uni.getStorageSync('district').slice(0, 2)
}; };
}, },
options: { options: {
styleIsolation: 'shared', // 解除样式隔离 styleIsolation: 'shared', // 解除样式隔离
}, },
created() { created() {
this.open() if (this.type !== '0') {
// this.open()
}
}, },
methods: { methods: {
getLocation1() {
var that = this
let qqmapsdk = new QQMapWX({
key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB'
});
uni.getFuzzyLocation({
type: 'wgs84',
success(res) {
console.log('res.latitude', res.latitude);
console.log('res.longitude', res.longitude);
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: (re) => {
console.log("解析地址成功", re);
console.log(re.result.ad_info.city, );
console.log(re.result.ad_info.district, );
let city = re.result.ad_info.city
let district = re.result.ad_info.district
that.position = city.slice(0, 2) + district.slice(0, 2)
},
fail: (re) => {
console.log(re, '失败信息');
}
})
},
fail(err) {
console.log("获取经纬度失败", err);
},
});
},
//提示用户开启定位服务
open() {
var that = this
uni.authorize({
scope: 'scope.userFuzzyLocation',
success: function() {
console.log('授权成功');
that.getLocation1()
},
fail: function() {
console.log('授权失败');
uni.showModal({
content: '检测到您没打开获取信息功能权限,是否去设置打开?',
confirmText: "确认",
cancelText: '取消',
success: (res) => {
if (res.confirm) {
uni.openSetting({
success: (res) => {
console.log(res);
that.getLocation1();
}
})
} else {
console.log('取消');
return false;
}
}
})
return false;
}
})
// wx.getSetting({
// success: (res) => {
// if (res.authSetting['scope.userLocation'] === false) {
// wx.showModal({
// title: '提示',
// content: '请打开定位服务后重新进入该页面',
// confirmText: '去设置',
// success: (res) => {
// if (res.confirm) {
// wx.openSetting()
// }
// }
// })
// }
// }
// })
}
} }
} }
</script> </script>

View File

@@ -3,24 +3,32 @@
<view class="tabbar-bug"></view> <view class="tabbar-bug"></view>
<view class="tabbar-container"> <view class="tabbar-container">
<block> <block>
<view class="tabbar-item" v-for="(item,index) in tabbarList" :class="[item.centerItem ? ' center-item' : '']" <view class="tabbar-item" v-for="(item,index) in tabbarList" :class="[item.centerItem ? ' center-item' : '']"
@click="changeItem(item)"> @click="changeItem(item)">
<view class="item-top"> <view class="item-top">
<image :src="currentItem==item.id?item.selectIcon:item.icon"></image> <image :src="currentItem==item.id?item.selectIcon:item.icon"></image>
</view>
<view class="item-bottom" :class="[currentItem==item.id ? 'item-active' : '']">
<text>{{item.text}}</text>
</view>
</view> </view>
<view class="item-bottom" :class="[currentItem==item.id ? 'item-active' : '']"> </block>
<text>{{item.text}}</text> <publishSlide v-if="slideVisit" @quitSlide="quitSlide"></publishSlide>
</view> </view>
</view> <view>
</block> <u-overlay :show="!isLoad">
<publishSlide v-if="slideVisit" @quitSlide="quitSlide"></publishSlide> <login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import login from 'pages/my/login/login'
export default { export default {
components: {
login
},
props: { props: {
currentPage: { currentPage: {
type: Number, type: Number,
@@ -31,6 +39,7 @@
return { return {
slideVisit: false, slideVisit: false,
currentItem: 0, currentItem: 0,
isLoad: true,
tabbarList: [{ tabbarList: [{
id: 0, id: 0,
path: "/pages/index/index", path: "/pages/index/index",
@@ -72,18 +81,37 @@
uni.hideTabBar(); uni.hideTabBar();
}, },
methods: { methods: {
reOnLoad() {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
return
}
this.isLoad = true
if (this.isLoad) {
this.slideVisit = true
}
},
failToLoad() {
uni.reLaunch({
url: '/pages/index/index'
})
},
quitSlide() { quitSlide() {
this.slideVisit = false; this.slideVisit = false;
}, },
changeItem(item) { changeItem(item) {
if (item.id == 2) { if (item.id == 2) {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
return
}
this.isLoad = true
this.slideVisit = true this.slideVisit = true
} }
let _this = this;
uni.switchTab({ uni.switchTab({
url: item.path url: item.path
}); });
} }
} }
} }
@@ -94,6 +122,7 @@
width: 100%; width: 100%;
height: 98rpx; height: 98rpx;
} }
view { view {
padding: 0; padding: 0;
margin: 0; margin: 0;

View File

@@ -13,12 +13,12 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "速配商铺", "navigationBarTitleText": "速配商铺",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#339967",
//导航栏取消 //导航栏取消
// "navigationStyle": "custom", // "navigationStyle": "custom",
//是否开启下拉刷新 //是否开启下拉刷新
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
}, },
{ {
@@ -34,8 +34,8 @@
"path": "pages/shopTransfer/shopTransfer", "path": "pages/shopTransfer/shopTransfer",
"style": { "style": {
"navigationBarTitleText": "店铺转让", "navigationBarTitleText": "店铺转让",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -43,8 +43,8 @@
"path": "pages/shopAddress/shopAddress", "path": "pages/shopAddress/shopAddress",
"style": { "style": {
"navigationBarTitleText": "找店地址", "navigationBarTitleText": "找店地址",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@@ -52,47 +52,60 @@
"path": "pages/my/my", "path": "pages/my/my",
"style": { "style": {
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/detail/detail", "path": "pages/detail/detail",
"style": { "style": {
"navigationBarTitleText": "商品详情" "navigationBarTitleText": "商品详情",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/published/published", "path": "pages/published/published",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": true "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/publish/publishTransfer/publishTransfer", "path": "pages/publish/publishTransfer/publishTransfer",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "发布店铺转让",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/publish/publishAddress/publishAddress", "path": "pages/publish/publishAddress/publishAddress",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "发布找店地址",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/publish/publishRent/publishRent", "path": "pages/publish/publishRent/publishRent",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "发布店铺出租",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/publish/publishInvestment/publishInvestment", "path": "pages/publish/publishInvestment/publishInvestment",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "发布项目招商",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@@ -102,48 +115,52 @@
"path": "pages/Partnerships/Partnerships", "path": "pages/Partnerships/Partnerships",
"style": { "style": {
"navigationBarTitleText": "成功合伙人", "navigationBarTitleText": "成功合伙人",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path" : "pages/index/NavBarPages/zrxx/zrxx", "path": "pages/index/NavBarPages/zrxx/zrxx",
"style" : "style": {
{ "navigationBarTitleText": "转让信息",
"navigationBarTitleText" : "转让信息", "enablePullDownRefresh": false
"enablePullDownRefresh" : false
} }
}, },
{ {
"path" : "pages/index/NavBarPages/zdxx/zdxx", "path": "pages/index/NavBarPages/zdxx/zdxx",
"style" : "style": {
{ "navigationBarTitleText": "找店信息",
"navigationBarTitleText" : "找店信息", "enablePullDownRefresh": false
"enablePullDownRefresh" : false
} }
}, },
{ {
"path" : "pages/index/NavBarPages/czxx/czxx", "path": "pages/index/NavBarPages/czxx/czxx",
"style" : "style": {
{ "navigationBarTitleText": "出租信息",
"navigationBarTitleText" : "出租信息", "enablePullDownRefresh": false
"enablePullDownRefresh" : false
} }
}, },
{ {
"path" : "pages/index/NavBarPages/xmzs/xmzs", "path": "pages/index/NavBarPages/xmzs/xmzs",
"style" : "style": {
{ "navigationBarTitleText": "项目招商",
"navigationBarTitleText" : "项目招商", "enablePullDownRefresh": false
"enablePullDownRefresh" : false
} }
}, },
{ {
"path" : "pages/index/NavBarPages/cjal/cjal", "path": "pages/index/NavBarPages/cjal/cjal",
"style" : "style": {
{ "navigationBarTitleText": "成交案例",
"navigationBarTitleText" : "成交案例", "enablePullDownRefresh": false
"enablePullDownRefresh" : false }
},
{
"path": "pages/my/login/login",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
} }
} }
], ],

View File

@@ -23,19 +23,28 @@
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
</view>
<view class="bgc">
</view> </view>
<view class="location-detail"> <view class="location-detail">
<text>行业</text> <text>行业</text>
<text>区域</text> <text>区域</text>
<text>地址</text> <text>地址</text>
</view>
<view class="bug-figure">
</view> </view>
<view class="seller-shop-detail"> <view class="seller-shop-detail">
<view class="avator"> <view class="avator">
<u-avatar :src="src"></u-avatar> <u-avatar :src="src"></u-avatar>
<u-cell title="张先生" label="123456"></u-cell> <u-cell title="张先生" label="123456" :border="false"></u-cell>
</view> </view>
<u-divider :height="20"></u-divider>
<u-cell title="店铺介绍" label="美食杂货店是一个主打食品和日用杂货的淘宝222222222222222222222美食杂货店是一个主打食品和日用杂货的淘宝美食杂货店是一个主打食品和日用杂货的淘宝" label-style="color = #5D5D5D"></u-cell> <u-cell title="店铺介绍" label="美食杂货店是一个主打食品和日用杂货的淘宝222222222222222222222美食杂货店是一个主打食品和日用杂货的淘宝美食杂货店是一个主打食品和日用杂货的淘宝" label-style="color = #5D5D5D"></u-cell>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="bot-tab"> <view class="bot-tab">
<view class="tab-left"> <view class="tab-left">
@@ -105,12 +114,23 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{
background-color: #F8F8F8;
}
.sub-detail{
margin-bottom: 30rpx;
}
.bgc{
background-color: #F8F8F8;
height: 30rpx;
}
.detail{ .detail{
// background-color: #F8F8F8; // background-color: #F8F8F8;
height: 100%; height: 100%;
} }
.bug-figure{ .bug-figure{
height: 100rpx; height: 100rpx;
background-color: #F8F8F8;
} }
.swiper { .swiper {
} }
@@ -127,7 +147,7 @@
} }
.location-detail{ .location-detail{
display: flex; display: flex;
margin-top: 20rpx; margin-top: 50rpx;
background-color: #fff; background-color: #fff;
flex-direction: column; flex-direction: column;
padding-left: 16rpx; padding-left: 16rpx;
@@ -142,6 +162,7 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-left: 16rpx; margin-left: 16rpx;
margin-top: 50rpx;
} }
.bottom{ .bottom{
position: fixed; position: fixed;

View File

@@ -6,13 +6,32 @@
<view class="grid-text">{{ item.text }}</view> <view class="grid-text">{{ item.text }}</view>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
<u-modal :show="showM" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
@confirm="confirm" @cancel="cancel">
<view>
<view>{{mobile}}</view>
<text>是否拨打客服电话</text>
</view>
</u-modal>
<view>
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view>
</view> </view>
</template> </template>
<script> <script>
import login from 'pages/my/login/login'
export default { export default {
components: {
login
},
data() { data() {
return { return {
showM: false,
mobile: '',
isLoad: true,
navItems: [{ navItems: [{
icon: "/static/navbar/sy_icon_zrxx.png", icon: "/static/navbar/sy_icon_zrxx.png",
text: "转让信息", text: "转让信息",
@@ -46,7 +65,7 @@
{ {
icon: "/static/navbar/sy_icon_zmhb.png", icon: "/static/navbar/sy_icon_zmhb.png",
text: "招募合伙", text: "招募合伙",
url:'/pages/Partnerships/Partnerships' url: '/pages/Partnerships/Partnerships'
}, },
{ {
icon: "/static/navbar/sy_icon_lxwm.png", icon: "/static/navbar/sy_icon_lxwm.png",
@@ -56,21 +75,64 @@
] ]
}; };
}, },
created() {
this.getCsTel()
},
methods: { methods: {
reOnLoad() {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
return
}
this.isLoad = true
},
failToLoad() {
uni.reLaunch({
url: '/pages/index/index'
})
},
confirm() {
this.showM = false
let phone = this.mobile
phone = phone.toString()
uni.makePhoneCall({
phoneNumber: phone,
success: function() {
console.log('拨打电话成功');
},
fail() {
console.log('打电话失败了');
}
})
},
cancel() {
this.showM = false
},
getCsTel() {
this.$api.getCsTel().then(res => {
console.log(res.data);
if (res.data.data) {
this.mobile = res.data.data.kf_phone
}
}).finally(_ => {})
},
handleItemClick(index) { handleItemClick(index) {
// 跳转页面 // 跳转页面
if (index >= 0 && index <= 6) { if (index >= 0 && index <= 6) {
if (index == 4 || index == 6) {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
return
}
this.isLoad = true
}
uni.navigateTo({ uni.navigateTo({
url: this.navItems[index].url url: this.navItems[index].url
}) })
}else if (index == 7) { } else if (index == 7) {
uni.makePhoneCall({ this.showM = true
phoneNumber: '123456789',
success: (result) => {},
fail: (error) => {}
})
} }
} }
} }
}; };

View File

@@ -27,6 +27,7 @@
import HomeNoticeBar from "./HomeMainContent/HomeNoticeBar.vue" import HomeNoticeBar from "./HomeMainContent/HomeNoticeBar.vue"
import HomeNavCard from "./HomeMainContent/HomeNavCard.vue" import HomeNavCard from "./HomeMainContent/HomeNavCard.vue"
import Statistics from "./HomeMainContent/Statistics.vue" import Statistics from "./HomeMainContent/Statistics.vue"
import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js"
export default { export default {
components: { components: {
HomeNavCard, HomeNavCard,
@@ -45,11 +46,13 @@
this.getBanner() this.getBanner()
this.getNotice() this.getNotice()
this.getStat() this.getStat()
this.open()
}, },
methods: { methods: {
getBanner(){ getBanner(){
this.$api.getBanner().then(res=>{ this.$api.getBanner().then(res=>{
this.swiperList = res.data.data.map(item=>item.img) console.log('轮播图',res.data.data);
this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img)
}) })
}, },
getNotice(){ getNotice(){
@@ -62,10 +65,100 @@
this.statNum = res.data.data this.statNum = res.data.data
console.log(res.data.data); console.log(res.data.data);
}) })
},
getRegionList() {
var that = this
uni.request({
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' +
that.$api.key,
success(res) {
uni.setStorageSync('regionList', JSON.stringify(res.data.result[0].map(item => item.fullname)));
},
fail(err) {
console.log('请求区域失败:', err);
}
})
},
getUserLocation() {
var that = this
let qqmapsdk = new QQMapWX({
key: that.$api.key
});
uni.getFuzzyLocation({
type: 'wgs84',
success(res) {
console.log('res.latitude', res.latitude);
console.log('res.longitude', res.longitude);
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: (re) => {
console.log("解析地址成功", re);
console.log(re.result.ad_info.city);
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));
uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3));
uni.setStorageSync('city', city.slice(0, 2));
uni.setStorageSync('district', district);
that.getRegionList()
// that.position = city.slice(0, 2) + district.slice(0, 2)
},
fail: (re) => {
console.log(re, '失败信息');
}
})
},
fail(err) {
console.log("获取经纬度失败", err);
},
});
},
//提示用户开启定位服务
open() {
var that = this
uni.getSetting({
success: function (res) {
if (res.authSetting['scope.userFuzzyLocation']) {
console.log('用户已经授权定位权限');
} else {
console.log('用户未授权定位权限');
uni.authorize({
scope: 'scope.userFuzzyLocation',
success: function() {
console.log('授权成功');
that.getUserLocation()
},
fail: function() {
console.log('授权失败');
uni.showModal({
content: '检测到您没打开获取信息功能权限,是否去设置打开?',
confirmText: "确认",
cancelText: '取消',
success: (res) => {
if (res.confirm) {
uni.openSetting({
success: (res) => {
console.log(res);
that.getUserLocation();
}
})
} else {
console.log('取消');
return false;
}
}
})
return false;
}
})
}
}
});
} }
},
computed: {
} }
} }
</script> </script>

132
pages/my/login/login.vue Normal file
View File

@@ -0,0 +1,132 @@
<template>
<view class="login-content">
<view style="text-align: center;margin-bottom:30rpx;">
<text>{{loginText}}</text>
</view>
<view style="padding-left: 30rpx;padding-right: 30rpx;display: flex;">
<u-button type="info" :plain="true" size="nomal" @click="$emit('fail')">取消</u-button>
<u-button open-type="getPhoneNumber" size="nomal" color='#12CA64' @getphonenumber="getphonenumber">登录
</u-button>
</view>
</view>
</template>
<script>
import {
apiService,
loginSys
} from '@/service/request.js'
export default {
data() {
return {
loginText: '请登录后查看'
}
},
props: {
timoutText: {
type: String,
default: ''
}
},
created() {
if (this.timoutText == 1) {
this.loginText = "登录超时,请重新登录"
}
},
methods: {
login() {
var that = this
},
getphonenumber(e) {
var that = this
// console.log('getphonenumber', e)
if (e.detail.errMsg === 'getPhoneNumber:ok') {
//调用接口利用 e.detail.encryptedData, e.detail.iv 信息来解密手机号
uni.login({
"provider": "weixin",
"onlyAuthorize": true, // 微信登录仅请求授权认证
success: function(event) {
const {
code
} = event
// console.log('code', code);
that.$api.login({
code: code
}).then(res => {
var data = res.data.data
console.log('res.da',res);
// console.log('登录code换取的信息', data);
uni.setStorageSync('loginToken', data.token);
that.$toast.success('登录成功')
that.$emit('success')
//登录完成后使用手机code换取手机号,调用/user/getMobileByMnp接口
const codeData = {
code: e.detail.code
}
that.$api.getMobile(codeData).then(res => {
console.log('code换手机号', res)
})
})
},
fail: function(err) {
// 登录授权失败
// err.code是错误码
that.$emit('fail')
}
})
} else {
// 拒绝授权
that.$emit('fail')
}
}
// getphonenumber(e) {
// const {
// phoneCode
// } = e.detail;
// console.log("手机code : ", phoneCode);
// uni.login({
// "provider": "weixin",
// "onlyAuthorize": true, // 微信登录仅请求授权认证
// success: function(event) {
// const {
// code
// } = event
// console.log("登录code", code);
// //客户端成功获取授权临时票据code,向业务服务器发起登录请求。
// // 调用登录接口 拿到token 传手机code,更新手机号码
// loginSys(code).then(res => {
// console.log(res);
// //登录完成后使用手机code换取手机号,调用/user/getMobileByMnp接口
// //接口详细链接 https://docs.apipost.cn/preview/468be606f65cae75/3f2f988ddf82dd8e
// })
// },
// fail: function(err) {
// // 登录授权失败
// // err.code是错误码
// }
// })
// },
}
}
</script>
<style lang="less" scoped>
/deep/.u-button {
width: 40% !important;
}
.login-content {
width: 100%;
position: absolute;
top: 50%;
left: 50%;
padding: 50rpx 30rpx;
background-color: #fff;
transform: translate(-50%, -50%);
}
</style>

View File

@@ -1,56 +1,86 @@
<template> <template>
<view> <view>
<view class="my"> <view class="my">
<view class="profile"> <view class="profile">
<image src="../../static/img/wo_bj_ll@2x.png" mode="aspectFit" class="profile-bgi"></image> <image src="../../static/img/wo_bj_ll@2x.png" mode="aspectFit" class="profile-bgi"></image>
<view class="avator"> <view class="avator">
<u-avatar :src="src"></u-avatar> <u-avatar :src="src"></u-avatar>
</view>
<view class="username">{{username}}</view>
<view class="account">账号:{{account}}</view>
</view>
<view class="publish">
<u-cell-group>
<u-cell icon="/static/my/wo_icon_zr.png" title="发布的店铺转让" is-link="true"
@click="topublished('发布的店铺转让')"></u-cell>
<u-cell icon="/static/my/wo_icon_xz.png" title="发布的找店选址" is-link="true"
@click="topublished('发布的找店选址')"></u-cell>
<u-cell icon="/static/my/wo_icon_cc.png" title="发布的店铺出租" is-link="true"
@click="topublished('发布的店铺出租')"></u-cell>
<u-cell icon="/static/my/wo_icon_zs.png" title="发布的项目招商" is-link="true"
@click="topublished('发布的项目招商')"></u-cell>
<u-cell icon="/static/my/wo_icon_hh.png" title="成功合伙人" is-link="true" @click="topartner"></u-cell>
<u-cell icon="/static/my/wo_icon_pppp.png" title="我的匹配" is-link="true" @click="topublished('我的匹配')"></u-cell>
</u-cell-group>
</view> </view>
<view class="username">{{username}}</view>
<view class="account">账号:{{account}}</view>
</view>
<view class="publish">
<u-cell-group>
<u-cell icon="setting-fill" title="发布的店铺转让" is-link="true" @click="topublished('发布的店铺转让')"></u-cell>
<u-cell icon="integral-fill" title="发布的找店选址" is-link="true" @click="topublished('发布的找店选址')"></u-cell>
<u-cell icon="integral-fill" title="发布的店铺出租" is-link="true" @click="topublished('发布的店铺出租')"></u-cell>
<u-cell icon="integral-fill" title="发布的项目招商" is-link="true" @click="topublished('发布的项目招商')"></u-cell>
<u-cell icon="integral-fill" title="成功合伙人" is-link="true" @click="topartner"></u-cell>
<u-cell icon="integral-fill" title="我的匹配" is-link="true" @click="topublished('我的匹配')"></u-cell>
</u-cell-group>
</view>
</view> </view>
<TabBar :current-page="4"></TabBar> <TabBar :current-page="4"></TabBar>
<view>
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view>
</view> </view>
</template> </template>
<script> <script>
import login from 'pages/my/login/login'
export default { export default {
components: {
login
},
data() { data() {
return { return {
src: 'https://cdn.uviewui.com/uview/album/2.jpg', src: 'https://cdn.uviewui.com/uview/album/2.jpg',
account:'123456', account: '123456',
username:'用户名', username: '用户名',
isLoad: true
} }
}, },
onLoad() { onLoad() {
// this.getInfo() if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
return
}
this.isLoad = true
}, },
methods: { methods: {
topublished(title){ reOnLoad() {
uni.navigateTo({ if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
url:'/pages/published/published?titletext='+title this.$toast.warn('登录失败请重试')
this.isLoad = false
return
}
this.isLoad = true
},
failToLoad() {
uni.reLaunch({
url: '/pages/index/index'
}) })
}, },
todetail(){ topublished(title) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/detail/detail' url: '/pages/published/published?titletext=' + title
}) })
}, },
topartner(){ todetail() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/Partnerships/Partnerships' url: '/pages/detail/detail'
})
},
topartner() {
uni.navigateTo({
url: '/pages/Partnerships/Partnerships'
}) })
} }
//---------页面调用接口示例------------ //---------页面调用接口示例------------
@@ -64,7 +94,7 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.profile{ .profile {
color: #fff; color: #fff;
display: flex; display: flex;
width: 100%; width: 100%;
@@ -74,27 +104,27 @@
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
gap: 10rpx; gap: 10rpx;
.profile-bgi{
.profile-bgi {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 500px; height: 500px;
z-index: -1; z-index: -1;
} }
.avator{
.avator {
margin-top: 20rpx; margin-top: 20rpx;
} }
.username{
.username {
font-size: 18px; font-size: 18px;
font-weight: 1rpx; font-weight: 1rpx;
} }
.account{
.account {
font-size: 15px; font-size: 15px;
font-weight: 1rpx; font-weight: 1rpx;
} }
} }
</style> </style>

View File

@@ -6,10 +6,16 @@
</u-form-item> </u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" label-width="100%" right-icon="arrow-right"> <u-form-item label="区域" label-position="top" border-bottom="true" label-width="100%" right-icon="arrow-right">
<text @click="show1 = true" class="checktext">请选择所属区域</text> <text @click="show1 = true" class="checktext">请选择所属区域</text>
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker> <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>
<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="100%">
<text @click="show3 = true" class="checktext">请选择行业业态</text> <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-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="面积" label-position="top" border-bottom="true" label-width="100%">
@@ -42,6 +48,7 @@
export default { export default {
data() { data() {
return { return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{ ShopInfomation:{
city:'', city:'',
area:'', area:'',
@@ -118,6 +125,8 @@
justify-content: space-between; justify-content: space-between;
} }
.arrow-icon{ .arrow-icon{
float: right; position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
} }
</style> </style>

View File

@@ -11,18 +11,26 @@
</u-form-item> </u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" label-width="100%" right-icon="arrow-right"> <u-form-item label="区域" label-position="top" border-bottom="true" label-width="100%" right-icon="arrow-right">
<text @click="show1 = true" class="checktext">请选择所属区域</text> <text @click="show1 = true" class="checktext">请选择所属区域</text>
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker> <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>
<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="100%">
<u-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="行业" label-position="top" border-bottom="true" label-width="100%" class="picker"> <u-form-item label="行业" label-position="top" border-bottom="true" label-width="100%" class="picker">
<text @click="show2 = true" class="checktext">请选择行业类型</text> <text @click="show2 = true" class="checktext">请选择行业类型</text>
<!-- <u-icon name="arrow-right" class="arrow-icon" size="30px"></u-icon> --> <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-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="业态" label-position="top" border-bottom="true" label-width="100%">
<text @click="show3 = true" class="checktext">输入行业业态</text> <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-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%"> <u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%">
@@ -46,6 +54,7 @@
export default { export default {
data() { data() {
return { return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{ ShopInfomation:{
city:'', city:'',
area:'', area:'',
@@ -122,6 +131,8 @@
justify-content: space-between; justify-content: space-between;
} }
.arrow-icon{ .arrow-icon{
float: right; position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
} }
</style> </style>

View File

@@ -11,14 +11,19 @@
</u-form-item> </u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right"> <u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right">
<text @click="show1 = true" class="checktext">请选择所属区域</text> <text @click="show1 = true" class="checktext">请选择所属区域</text>
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker> <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>
<u-form-item label="地址" label-position="top" border-bottom="true" > <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-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="适合行业" label-position="top" border-bottom="true" class="picker" label-width="100%"> <u-form-item label="适合行业" label-position="top" border-bottom="true" class="picker" label-width="100%">
<text @click="show2 = true" class="checktext">请选择行业类型</text> <text @click="show2 = true" class="checktext">请选择行业类型</text>
<!-- <u-icon name="arrow-right" class="arrow-icon" size="30px"></u-icon> --> <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-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" > <u-form-item label="面积" label-position="top" border-bottom="true" >
@@ -47,6 +52,7 @@
export default { export default {
data() { data() {
return { return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{ ShopInfomation:{
city:'', city:'',
area:'', area:'',
@@ -123,6 +129,8 @@
justify-content: space-between; justify-content: space-between;
} }
.arrow-icon{ .arrow-icon{
float: right; position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
} }
</style> </style>

View File

@@ -6,47 +6,61 @@
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text> <text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
</view> </view>
<u-form-item label="标题" label-position="top" border-bottom="true" > <u-form-item label="标题" label-position="top" border-bottom="true" prop="title">
<u-input v-model="form.name" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input> <u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class"
</u-form-item> border="none"></u-input>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right"> </u-form-item>
<text @click="show1 = true" class="checktext">请选择所属区域</text> <u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region">
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker> <text @click="show1 = true" class="checktext">请选择所属区域</text>
</u-form-item> <view class="arrow-icon">
<u-form-item label="地址" label-position="top" border-bottom="true" > <u-icon name="arrow-right" size="30px"></u-icon>
<u-input v-model="form.name" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"></u-input> </view>
</u-form-item> <u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker"> v-model="form.region"></u-picker>
<text @click="show2 = true" class="checktext">请选择行业类型</text> </u-form-item>
<!-- <u-icon name="arrow-right" class="arrow-icon" size="30px"></u-icon> --> <u-form-item label="地址" label-position="top" border-bottom="true" prop="place">
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"></u-picker> <u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
</u-form-item> @change="changeAddress"></u-input>
<u-form-item label="业态" label-position="top" border-bottom="true" > </u-form-item>
<text @click="show3 = true" class="checktext">请输入行业业态</text> <u-form-item label="行业" label-position="top" border-bottom="true" class="picker">
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"></u-picker> <text @click="show2 = true" class="checktext">请选择行业类型</text>
</u-form-item> <view class="arrow-icon">
<u-form-item label="面积" label-position="top" border-bottom="true" > <u-icon name="arrow-right" size="30px"></u-icon>
<u-input v-model="form.name" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input> </view>
</u-form-item> <u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="100%"> v-model="form.trade"></u-picker>
<u-input v-model="form.name" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input> </u-form-item>
</u-form-item> <u-form-item label="业态" label-position="top" border-bottom="true">
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="100%"> <text @click="show3 = true" class="checktext">请选择行业业态</text>
<u-input v-model="form.name" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input> <view class="arrow-icon">
</u-form-item> <u-icon name="arrow-right" size="30px"></u-icon>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%"> </view>
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input> <u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"
</u-form-item> v-model="form.karma"></u-picker>
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="100%"> </u-form-item>
<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="size">
</u-form-item> <u-input v-model="form.size" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%"> </u-form-item>
<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="100%" prop="rent">
</u-form-item> <u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
</u-form> </u-form-item>
<view class="bug-figure"></view> <u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="100%" prop="sell">
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle" class="submit-btn">发布</u-button> <u-input v-model="form.sell" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input>
<view class="bug-figure"></view> </u-form-item>
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%" 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-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-input v-model="form.introduce" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
</u-form>
<view class="bug-figure"></view>
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle"
class="submit-btn">发布</u-button>
<view class="bug-figure"></view>
</view> </view>
</template> </template>
@@ -54,52 +68,113 @@
export default { export default {
data() { data() {
return { return {
ShopInfomation:{ regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
city:'', ShopInfomation: {
area:'', city: '',
count:0, area: '',
count: 0,
}, },
form:{ form: {
title:'' title: '',
region: '',
place: '',
trade: '',
karma: '',
size: '',
rent: '',
sell: '',
name: '',
call: '',
introduce: ''
}, },
columns:[ columns: [
], ],
show1:false, show1: false,
show2:false, show2: false,
show3:false, show3: false,
} rules: {
'title': [{
type: 'string',
require: true,
message: '请输入姓名',
trigger: ['change', 'blur']
}],
'place': [{
type: 'string',
require: true,
message: '请输入地址',
trigger: ['change', 'blur']
}],
},
}
}, },
methods: { methods: {
handleSearchAddress() {
uni.navigateTo({
url: '/pages/publish/chooseAddress/chooseAddress'
})
},
confirmArea(e) { confirmArea(e) {
this.ShopInfomation.city = e.value[0] this.ShopInfomation.city = e.value[0]
this.ShopInfomation.area = e.value[1] this.ShopInfomation.area = e.value[1]
this.show1 = false this.show1 = false
}, },
submit(){ submit() {
console.log('提交'); this.$refs.uForm.validate().then(res => {
} console.log("提交表单信息:" + JSON.stringify(this.form))
uni.$u.toast('发布成功')
// 调用服务端入表接口W
}).catch(errors => {
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
},
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);
}
})
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.count{ .count {}
} .form {
.form{
margin-left: 20px; margin-left: 20px;
margin-right: 20px; margin-right: 20px;
} }
.input-class{
.input-class {
font-size: 30rpx; font-size: 30rpx;
font-weight:1px; font-weight: 1px;
border-style: none; border-style: none;
} }
.upload{
.upload {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -108,28 +183,35 @@
height: 300rpx; height: 300rpx;
// margin-right: 20px; // margin-right: 20px;
} }
.submit-btn{
.submit-btn {
width: 80%; width: 80%;
} }
.bug-figure{
.bug-figure {
height: 100rpx; height: 100rpx;
} }
.checkbox1{
.checkbox1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.checktext{
.checktext {
margin-top: 5rpx; margin-top: 5rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight:1px; font-weight: 1px;
color: #c1c4c7; color: #c1c4c7;
} }
.picker{ .picker {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.arrow-icon{
float: right; .arrow-icon {
position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
} }
</style> </style>

View File

@@ -1,4 +1,4 @@
const serverHost = 'https://spsp.feashow.com/api/'//http://xx.xxx.xx const serverHost = 'https://spsp.feashow.com/api/' //http://xx.xxx.xx
const service = { const service = {
get(url, data) { get(url, data) {
@@ -128,17 +128,26 @@ const toast = {
} }
const apiService = { const apiService = {
serverHost, serverHost,
imgUrl:'https://spsp.feashow.com/',
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + `/upload/image/`, uploadImgUrl: serverHost + `/upload/image/`,
//登录接口 //登录接口
login(data) { login(data) {
const url = `/login` const url = '/login/mnpLogin'
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(service.post(url, data)) resolve(service.post(url, data))
}) })
}, },
// 展示用户信息 //code换手机号
getUserInfo() { getMobile(data) {
const url = '/user' const url = '/user/getMobileByMnp'
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
// 获取客服电话
getCsTel() {
const url = '/center/cfg?key=kf_phone'
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(service.get(url)) resolve(service.get(url))
}) })

BIN
static/my/wo_icon_cc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

BIN
static/my/wo_icon_hh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

BIN
static/my/wo_icon_pppp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

BIN
static/my/wo_icon_xz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

BIN
static/my/wo_icon_zr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

BIN
static/my/wo_icon_zs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B