梁航:合并冲突,个人信息修改
This commit is contained in:
@@ -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,23 +26,27 @@
|
|||||||
*/
|
*/
|
||||||
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'],['附近的', '最新发布的', '其他']]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -55,29 +54,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 +89,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 +98,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 +109,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow {
|
.arrow {
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -110,7 +117,8 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-border{
|
|
||||||
|
.item-border {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -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,80 +17,90 @@
|
|||||||
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;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
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;
|
||||||
padding-left: 61rpx;
|
padding-left: 61rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -13,16 +13,15 @@
|
|||||||
</u-input>
|
</u-input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-swiper :list="headerBgList" height="300rpx" />
|
<u-swiper :list="bannerURL" height="300rpx" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import QQMapWX from "@/utils/qqmap-wx-jssdk.min.js"
|
|
||||||
export default {
|
export default {
|
||||||
name: "inputAndSwiper",
|
name: "inputAndSwiper",
|
||||||
props: {
|
props: {
|
||||||
headerBgList: {
|
bannerURL: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default () {
|
default () {
|
||||||
return [
|
return [
|
||||||
@@ -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: {
|
||||||
getUserLocation() {
|
|
||||||
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.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;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// wx.getSetting({
|
|
||||||
// success: (res) => {
|
|
||||||
// if (res.authSetting['scope.userLocation'] === false) {
|
|
||||||
// wx.showModal({
|
|
||||||
// title: '提示',
|
|
||||||
// content: '请打开定位服务后重新进入该页面',
|
|
||||||
// confirmText: '去设置',
|
|
||||||
// success: (res) => {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// wx.openSetting()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
97
pages.json
97
pages.json
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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,13 +75,63 @@
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
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) {
|
||||||
|
this.showM = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
customStyle="width:70vw"
|
customStyle="width:70vw"
|
||||||
color="#232323"
|
color="#232323"
|
||||||
icon=" "
|
icon=" "
|
||||||
|
direction="column"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -18,14 +19,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* @property {String} text 需要显示的消息
|
* @property {Array} text 需要显示的消息
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
text: {
|
text: {
|
||||||
type: String,
|
type: Array,
|
||||||
default() {
|
default() {
|
||||||
return ' '
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="text1">累计用户</text>
|
<text class="text1">累计用户</text>
|
||||||
<text class="num1">{{ sumUser.total }}</text>
|
<text class="num1">{{ statNum.all_user_num }}</text>
|
||||||
<view class="border border1"></view>
|
<view class="border border1"></view>
|
||||||
<text class="num11">昨日新增{{ sumUser.yesterday }}位</text>
|
<text class="num11">昨日新增{{ statNum.yesterday_user_num }}位</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
@@ -22,9 +22,9 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="text2">累计转店</text>
|
<text class="text2">累计转店</text>
|
||||||
<text class="num2">{{ sumTrans.total }}</text>
|
<text class="num2">{{ statNum.all_trans_num }}</text>
|
||||||
<view class="border border2"></view>
|
<view class="border border2"></view>
|
||||||
<text class="num21">昨日新增{{ sumTrans.yesterday }}位</text>
|
<text class="num21">昨日新增{{ statNum.yesterday_trans_num }}位</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="right2">
|
<view class="right2">
|
||||||
@@ -35,9 +35,9 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="text3">累计找店</text>
|
<text class="text3">累计找店</text>
|
||||||
<text class="num3">{{ sumSearch.total }}</text>
|
<text class="num3">{{ statNum.all_find_num }}</text>
|
||||||
<view class="border border3"></view>
|
<view class="border border3"></view>
|
||||||
<text class="num22">昨日新增{{ sumSearch.yesterday }}位</text>
|
<text class="num22">昨日新增{{ statNum.yesterday_find_num }}位</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -47,30 +47,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
sumUser:{
|
statNum :{
|
||||||
type:Object,
|
type:Object,
|
||||||
default: {
|
default(){
|
||||||
"total": 231753,
|
return {
|
||||||
"yesterday": 1345
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
sumTrans:{
|
|
||||||
type:Object,
|
|
||||||
default: {
|
|
||||||
"total": 231753,
|
|
||||||
"yesterday": 1345
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sumSearch:{
|
|
||||||
type:Object,
|
|
||||||
default: {
|
|
||||||
"total": 231753,
|
|
||||||
"yesterday": 1345
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<DropDown></DropDown>
|
<DropDown></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1"/>
|
<ShowShopList :showStyle="1"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<DropDown></DropDown>
|
<DropDown></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1"/>
|
<ShowShopList :showStyle="1"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="home-base-bg">
|
<view class="home-base-bg">
|
||||||
<InputAndSwiper type='0'></InputAndSwiper>
|
<InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper>
|
||||||
<view class="home-content">
|
<view class="home-content">
|
||||||
<view class="service">
|
<view class="service">
|
||||||
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/>
|
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/>
|
||||||
|
<button
|
||||||
|
open-type="contact"
|
||||||
|
bindcontact="handleContact"
|
||||||
|
session-from="sessionFrom"
|
||||||
|
class="service-btn"
|
||||||
|
>
|
||||||
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<HomeNavCard></HomeNavCard>
|
<HomeNavCard></HomeNavCard>
|
||||||
<HomeNoticeBar :text="notice" />
|
<HomeNoticeBar :text="notice" />
|
||||||
<Statistics :data="statisticsNum" />
|
<Statistics :statNum="statNum"/>
|
||||||
<view class="show-and-search">
|
<view class="show-and-search">
|
||||||
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
|
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
|
||||||
<text>店铺列表</text>
|
<text>店铺列表</text>
|
||||||
@@ -27,6 +34,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,
|
||||||
@@ -35,20 +43,128 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
notice: '寒雨连江夜入吴 平明送客楚山孤 洛阳亲友如相问 一片冰心在玉壶',
|
notice: [],
|
||||||
chooseIndex: 0,
|
chooseIndex: 0,
|
||||||
statisticsNum: [231753, 1345],
|
statNum: {},
|
||||||
swiperList:[]
|
swiperList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.getBanner()
|
||||||
|
this.getNotice()
|
||||||
|
this.getStat()
|
||||||
|
this.open()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getBanner(){
|
||||||
},
|
this.$api.getBanner().then(res=>{
|
||||||
computed: {
|
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)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getStat(){
|
||||||
|
this.$api.getStat().then(res=>{
|
||||||
|
this.statNum = 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;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -65,6 +181,18 @@
|
|||||||
right: 17rpx;
|
right: 17rpx;
|
||||||
top: 1109rpx;
|
top: 1109rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
.service-btn {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
background-color: inherit;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 108rpx;
|
||||||
|
height: 108rpx;
|
||||||
|
}
|
||||||
|
.service-btn::after {
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
132
pages/my/login/login.vue
Normal file
132
pages/my/login/login.vue
Normal 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>
|
||||||
104
pages/my/my.vue
104
pages/my/my.vue
@@ -1,58 +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>
|
||||||
<view class="username">{{username}}</view>
|
<view class="publish">
|
||||||
<view class="account">账号:{{account}}</view>
|
<u-cell-group>
|
||||||
</view>
|
<u-cell icon="/static/my/wo_icon_zr.png" title="发布的店铺转让" is-link="true"
|
||||||
<view class="publish">
|
@click="topublished('发布的店铺转让')"></u-cell>
|
||||||
<u-cell-group>
|
<u-cell icon="/static/my/wo_icon_xz.png" title="发布的找店选址" is-link="true"
|
||||||
<u-cell icon="/static/my/wo_icon_zr.png" title="发布的店铺转让" is-link="true" @click="topublished('发布的店铺转让')"></u-cell>
|
@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"
|
||||||
<u-cell icon="/static/my/wo_icon_cc.png" title="发布的店铺出租" is-link="true" @click="topublished('发布的店铺出租')"></u-cell>
|
@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_zs.png" title="发布的项目招商" is-link="true"
|
||||||
<u-cell icon="/static/my/wo_icon_hh.png" title="成功合伙人" is-link="true" @click="topartner"></u-cell>
|
@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 icon="/static/my/wo_icon_pppp.png" title="我的匹配" is-link="true" @click="topublished('我的匹配')"></u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</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:'',
|
account: '123456',
|
||||||
username:'未登录',
|
username: '用户名',
|
||||||
code:''
|
isLoad: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
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'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -61,7 +89,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%;
|
||||||
@@ -71,27 +99,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>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker>
|
<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>
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
|
||||||
ShopInfomation:{
|
ShopInfomation:{
|
||||||
city:'',
|
city:'',
|
||||||
area:'',
|
area:'',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker>
|
<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>
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
|
||||||
ShopInfomation:{
|
ShopInfomation:{
|
||||||
city:'',
|
city:'',
|
||||||
area:'',
|
area:'',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="region" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"></u-picker>
|
<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>
|
||||||
@@ -52,6 +52,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
|
||||||
ShopInfomation:{
|
ShopInfomation:{
|
||||||
city:'',
|
city:'',
|
||||||
area:'',
|
area:'',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<u-upload max-count="5" upload-icon="photo" :preview-full-image="true" :action="action"></u-upload>
|
<u-upload max-count="5" upload-icon="photo" :preview-full-image="true" :action="action"></u-upload>
|
||||||
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
|
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
|
||||||
</view>
|
</view>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title">
|
<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-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
|
||||||
@@ -58,6 +59,64 @@
|
|||||||
<view class="bug-figure"></view>
|
<view class="bug-figure"></view>
|
||||||
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle" class="submit-btn">发布</u-button>
|
<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="bug-figure"></view>
|
||||||
|
=======
|
||||||
|
|
||||||
|
<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" prop="region">
|
||||||
|
<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"
|
||||||
|
v-model="form.region"></u-picker>
|
||||||
|
</u-form-item>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<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" 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-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-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-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>
|
||||||
|
>>>>>>> remotes/origin/master
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -65,6 +124,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
<<<<<<< HEAD
|
||||||
action:'http://spsp.feashow.cn/api/upload/image/',
|
action:'http://spsp.feashow.cn/api/upload/image/',
|
||||||
form:{
|
form:{
|
||||||
title:'',
|
title:'',
|
||||||
@@ -78,38 +138,65 @@
|
|||||||
name:'',
|
name:'',
|
||||||
call:'',
|
call:'',
|
||||||
introduce:''
|
introduce:''
|
||||||
|
=======
|
||||||
|
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
|
||||||
|
ShopInfomation: {
|
||||||
|
city: '',
|
||||||
|
area: '',
|
||||||
|
count: 0,
|
||||||
|
|
||||||
},
|
},
|
||||||
columns:[
|
|
||||||
|
form: {
|
||||||
|
title: '',
|
||||||
|
region: '',
|
||||||
|
place: '',
|
||||||
|
trade: '',
|
||||||
|
karma: '',
|
||||||
|
size: '',
|
||||||
|
rent: '',
|
||||||
|
sell: '',
|
||||||
|
name: '',
|
||||||
|
call: '',
|
||||||
|
introduce: ''
|
||||||
|
>>>>>>> remotes/origin/master
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
|
||||||
],
|
],
|
||||||
show1:false,
|
show1: false,
|
||||||
show2:false,
|
show2: false,
|
||||||
show3:false,
|
show3: false,
|
||||||
rules:{
|
rules: {
|
||||||
'title':[{
|
'title': [{
|
||||||
type:'string',
|
type: 'string',
|
||||||
require:true,
|
require: true,
|
||||||
message:'请输入姓名',
|
message: '请输入姓名',
|
||||||
trigger: ['change','blur']
|
trigger: ['change', 'blur']
|
||||||
}],
|
}],
|
||||||
'place':[{
|
'place': [{
|
||||||
type:'string',
|
type: 'string',
|
||||||
require:true,
|
require: true,
|
||||||
message:'请输入地址',
|
message: '请输入地址',
|
||||||
trigger:['change','blur']
|
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() {
|
||||||
|
<<<<<<< HEAD
|
||||||
this.$refs.uForm.validate().then(res => {
|
this.$refs.uForm.validate().then(res => {
|
||||||
console.log("提交表单信息:" + JSON.stringify(this.form))
|
console.log("提交表单信息:" + JSON.stringify(this.form))
|
||||||
uni.$u.toast('发布成功')
|
uni.$u.toast('发布成功')
|
||||||
@@ -132,25 +219,59 @@
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getTradeInfo()
|
this.getTradeInfo()
|
||||||
|
=======
|
||||||
|
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)
|
||||||
|
>>>>>>> remotes/origin/master
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</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;
|
||||||
@@ -159,22 +280,27 @@
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
.checkedtext{
|
.checkedtext{
|
||||||
margin-top: 5rpx;
|
margin-top: 5rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@@ -182,12 +308,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.picker{
|
.picker{
|
||||||
|
=======
|
||||||
|
|
||||||
|
.picker {
|
||||||
|
>>>>>>> remotes/origin/master
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.arrow-icon{
|
|
||||||
|
.arrow-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
transform: translateY(-20rpx);
|
transform: translateY(-20rpx);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
const serverHost = 'http://spsp.feashow.cn/api'//http://xx.xxx.xx
|
const serverHost = 'http://spsp.feashow.cn/api'//http://xx.xxx.xx
|
||||||
|
=======
|
||||||
|
const serverHost = 'https://spsp.feashow.com/api/' //http://xx.xxx.xx
|
||||||
|
>>>>>>> remotes/origin/master
|
||||||
|
|
||||||
const service = {
|
const service = {
|
||||||
get(url, data) {
|
get(url, data) {
|
||||||
@@ -128,17 +132,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))
|
||||||
})
|
})
|
||||||
@@ -174,10 +187,31 @@ const apiService = {
|
|||||||
resolve(service.putWithFormData(url, data))
|
resolve(service.putWithFormData(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
<<<<<<< HEAD
|
||||||
getTradeInfo(data){
|
getTradeInfo(data){
|
||||||
const url = `/home/classlist?pid=0/`
|
const url = `/home/classlist?pid=0/`
|
||||||
return new Promise((resolve,reject) =>{
|
return new Promise((resolve,reject) =>{
|
||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
|
=======
|
||||||
|
// 获取轮播图
|
||||||
|
getBanner() {
|
||||||
|
const url = `/home/banner`
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.get(url))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取热门信息
|
||||||
|
getHotInfo() {
|
||||||
|
const url = `/news/nlists/`
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.get(url))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getStat() {
|
||||||
|
const url = `/home/stat`
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.get(url))
|
||||||
|
>>>>>>> remotes/origin/master
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user