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

View File

@@ -1,17 +1,15 @@
<template>
<view>
<view class="root">
<view class="mask" @click="handleMask"/>
<view class="mask" @click="handleMask"></view>
<view class="list-container">
<view
class="item"
v-for="(item,index) in list"
:class="{isActive: activeIndex === index}"
@click="handleActive(index)"
>
<view class="item" v-for="(item,index) in list" :class="{isActive: activeIndex === index}"
@click="handleActive(index)">
<text class="list-text">{{item}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
@@ -19,14 +17,20 @@
props: {
list: {
type: Array,
default(){
default () {
return []
}
},
type: {
type: String,
default () {
return ''
}
}
},
data(){
return{
activeIndex:-1
data() {
return {
activeIndex: -1
}
},
methods: {
@@ -57,20 +61,22 @@
</script>
<style lang="scss" scoped>
.isActive{
.isActive {
color: #CC3333;
}
.mask{
.mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
-webkit-backdrop-filter:saturate(150%) blur(8px);
background-color:rgba(0,0,0,.3);
-webkit-backdrop-filter: saturate(150%) blur(8px);
background-color: rgba(0, 0, 0, .3);
z-index: 20;
}
.root {
position: absolute;
top: 0;
@@ -80,13 +86,15 @@
background-color: #fff;
position: absolute;
z-index: 1;
.list-container {
position: relative;
background-color: #fff;
width: 100%;
z-index: 21;
border-radius: 0px 0px 20px 20px;
height: 320rpx;
overflow-y: auto;
.item {
border-top: 1px solid #EEEEEE;
font-weight: 500;

View File

@@ -18,7 +18,6 @@
</template>
<script>
import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js"
export default {
name: "inputAndSwiper",
props: {
@@ -39,98 +38,19 @@
},
data() {
return {
position: ''
position: uni.getStorageSync('city')+uni.getStorageSync('district').slice(0, 2)
};
},
options: {
styleIsolation: 'shared', // 解除样式隔离
},
created() {
this.open()
if (this.type !== '0') {
// this.open()
}
},
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>

View File

@@ -15,12 +15,20 @@
</block>
<publishSlide v-if="slideVisit" @quitSlide="quitSlide"></publishSlide>
</view>
<view>
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view>
</view>
</template>
<script>
import login from 'pages/my/login/login'
export default {
components: {
login
},
props: {
currentPage: {
type: Number,
@@ -31,6 +39,7 @@
return {
slideVisit: false,
currentItem: 0,
isLoad: true,
tabbarList: [{
id: 0,
path: "/pages/index/index",
@@ -72,18 +81,37 @@
uni.hideTabBar();
},
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() {
this.slideVisit = false;
},
changeItem(item) {
if (item.id == 2) {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
return
}
this.isLoad = true
this.slideVisit = true
}
let _this = this;
uni.switchTab({
url: item.path
});
}
}
}
@@ -94,6 +122,7 @@
width: 100%;
height: 98rpx;
}
view {
padding: 0;
margin: 0;

View File

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

View File

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

View File

@@ -6,13 +6,32 @@
<view class="grid-text">{{ item.text }}</view>
</u-grid-item>
</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>
</template>
<script>
import login from 'pages/my/login/login'
export default {
components: {
login
},
data() {
return {
showM: false,
mobile: '',
isLoad: true,
navItems: [{
icon: "/static/navbar/sy_icon_zrxx.png",
text: "转让信息",
@@ -46,7 +65,7 @@
{
icon: "/static/navbar/sy_icon_zmhb.png",
text: "招募合伙",
url:'/pages/Partnerships/Partnerships'
url: '/pages/Partnerships/Partnerships'
},
{
icon: "/static/navbar/sy_icon_lxwm.png",
@@ -56,21 +75,64 @@
]
};
},
created() {
this.getCsTel()
},
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) {
// 跳转页面
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({
url: this.navItems[index].url
})
}else if (index == 7) {
uni.makePhoneCall({
phoneNumber: '123456789',
success: (result) => {},
fail: (error) => {}
})
} else if (index == 7) {
this.showM = true
}
}
}
};

View File

@@ -27,6 +27,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: {
HomeNavCard,
@@ -45,11 +46,13 @@
this.getBanner()
this.getNotice()
this.getStat()
this.open()
},
methods: {
getBanner(){
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(){
@@ -62,10 +65,100 @@
this.statNum = res.data.data
console.log(res.data.data);
})
}
},
computed: {
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;
}
})
}
}
});
}
}
}
</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,6 +1,5 @@
<template>
<view>
<view class="my">
<view class="profile">
<image src="../../static/img/wo_bj_ll@2x.png" mode="aspectFit" class="profile-bgi"></image>
@@ -12,45 +11,76 @@
</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 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>
<TabBar :current-page="4"></TabBar>
<view>
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view>
</view>
</template>
<script>
import login from 'pages/my/login/login'
export default {
components: {
login
},
data() {
return {
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
account:'123456',
username:'用户名',
account: '123456',
username: '用户名',
isLoad: true
}
},
onLoad() {
// this.getInfo()
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
return
}
this.isLoad = true
},
methods: {
topublished(title){
uni.navigateTo({
url:'/pages/published/published?titletext='+title
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'
})
},
todetail(){
topublished(title) {
uni.navigateTo({
url:'/pages/detail/detail'
url: '/pages/published/published?titletext=' + title
})
},
topartner(){
todetail() {
uni.navigateTo({
url:'/pages/Partnerships/Partnerships'
url: '/pages/detail/detail'
})
},
topartner() {
uni.navigateTo({
url: '/pages/Partnerships/Partnerships'
})
}
//---------页面调用接口示例------------
@@ -64,7 +94,7 @@
</script>
<style lang="scss" scoped>
.profile{
.profile {
color: #fff;
display: flex;
width: 100%;
@@ -74,27 +104,27 @@
align-items: center;
flex-direction: column;
gap: 10rpx;
.profile-bgi{
.profile-bgi {
position: absolute;
width: 100%;
height: 500px;
z-index: -1;
}
.avator{
.avator {
margin-top: 20rpx;
}
.username{
.username {
font-size: 18px;
font-weight: 1rpx;
}
.account{
.account {
font-size: 15px;
font-weight: 1rpx;
}
}
</style>

View File

@@ -6,10 +6,16 @@
</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>
<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 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%">
@@ -42,6 +48,7 @@
export default {
data() {
return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{
city:'',
area:'',
@@ -118,6 +125,8 @@
justify-content: space-between;
}
.arrow-icon{
float: right;
position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
}
</style>

View File

@@ -11,18 +11,26 @@
</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>
<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 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>
<!-- <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-form-item>
<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-form-item>
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%">
@@ -46,6 +54,7 @@
export default {
data() {
return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{
city:'',
area:'',
@@ -122,6 +131,8 @@
justify-content: space-between;
}
.arrow-icon{
float: right;
position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
}
</style>

View File

@@ -11,14 +11,19 @@
</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-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 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>
<u-form-item label="适合行业" label-position="top" border-bottom="true" class="picker" label-width="100%">
<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-form-item>
<u-form-item label="面积" label-position="top" border-bottom="true" >
@@ -47,6 +52,7 @@
export default {
data() {
return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{
city:'',
area:'',
@@ -123,6 +129,8 @@
justify-content: space-between;
}
.arrow-icon{
float: right;
position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
}
</style>

View File

@@ -6,46 +6,60 @@
<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">
<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">
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region">
<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"
v-model="form.region"></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">
<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-icon name="arrow-right" class="arrow-icon" size="30px"></u-icon> -->
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"></u-picker>
<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"
v-model="form.trade"></u-picker>
</u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true" >
<text @click="show3 = true" class="checktext">输入行业业态</text>
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"></u-picker>
<u-form-item label="业态" label-position="top" border-bottom="true">
<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"
v-model="form.karma"></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="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="100%" 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%">
<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="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%">
<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%">
<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="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%">
<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="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>
<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,52 +68,113 @@
export default {
data() {
return {
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: ''
},
columns:[
columns: [
],
show1:false,
show2:false,
show3:false,
}
show1: false,
show2: false,
show3: false,
rules: {
'title': [{
type: 'string',
require: true,
message: '请输入姓名',
trigger: ['change', 'blur']
}],
'place': [{
type: 'string',
require: true,
message: '请输入地址',
trigger: ['change', 'blur']
}],
},
}
},
methods: {
handleSearchAddress() {
uni.navigateTo({
url: '/pages/publish/chooseAddress/chooseAddress'
})
},
confirmArea(e) {
this.ShopInfomation.city = e.value[0]
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('校验失败')
})
},
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>
<style lang="scss">
.count{
.count {}
}
.form{
.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;
@@ -108,28 +183,35 @@
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{
.picker {
display: flex;
justify-content: space-between;
}
.arrow-icon{
float: right;
.arrow-icon {
position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
}
</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,17 +128,26 @@ const toast = {
}
const apiService = {
serverHost,
imgUrl:'https://spsp.feashow.com/',
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + `/upload/image/`,
//登录接口
login(data) {
const url = `/login`
const url = '/login/mnpLogin'
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
// 展示用户信息
getUserInfo() {
const url = '/user'
//code换手机号
getMobile(data) {
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) => {
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