This commit is contained in:
hot777zz
2023-11-15 23:20:09 +08:00
9 changed files with 201 additions and 167 deletions

View File

@@ -47,7 +47,6 @@
return {
title: ['行业', '区域', '面积', '筛选'],
activeIndex: -1,
// postlist: [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']]
};
},
computed: {

View File

@@ -8,9 +8,9 @@
/>
</view>
<text class="text1">累计用户</text>
<text class="num1">{{ totalUser }}</text>
<text class="num1">{{ statNum.all_user_num }}</text>
<view class="border border1"></view>
<text class="num11">昨日新增{{ yesterdayUser }}</text>
<text class="num11">昨日新增{{ statNum.yesterday_user_num }}</text>
</view>
<view class="right">
@@ -22,9 +22,9 @@
/>
</view>
<text class="text2">累计转店</text>
<text class="num2">{{ totalTrans }}</text>
<text class="num2">{{ statNum.all_trans_num }}</text>
<view class="border border2"></view>
<text class="num21">昨日新增{{ yesterdayTrans }}</text>
<text class="num21">昨日新增{{ statNum.yesterday_trans_num }}</text>
</view>
<view class="right2">
@@ -35,9 +35,9 @@
/>
</view>
<text class="text3">累计找店</text>
<text class="num3">{{ totalSearch }}</text>
<text class="num3">{{ statNum.all_find_num }}</text>
<view class="border border3"></view>
<text class="num22">昨日新增{{ yesterdaySearch }}</text>
<text class="num22">昨日新增{{ statNum.yesterday_find_num }}</text>
</view>
</view>
@@ -47,27 +47,18 @@
</template>
<script>
export default {
props:{
totalUser:{
type:Number
},
yesterdayUser:{
type:Number
},
totalTrans:{
type:Number
},
yesterdayTrans:{
type:Number
},
totalSearch:{
type:Number
},
yesterdaySearch:{
type:Number
statNum :{
type:Object,
default(){
return {
}
}
}
},
}
}
</script>

View File

@@ -15,7 +15,7 @@
<DropDown></DropDown>
</view>
<view class="marginLR10">
<SearchShopList :showStyle="1"/>
<ShowShopList :showStyle="1"/>
</view>
</view>
</template>

View File

@@ -15,7 +15,7 @@
<DropDown></DropDown>
</view>
<view class="marginLR10">
<SearchShopList :showStyle="1"/>
<ShowShopList :showStyle="1"/>
</view>
</view>
</template>

View File

@@ -4,10 +4,17 @@
<view class="home-content">
<view class="service">
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/>
<button
open-type="contact"
bindcontact="handleContact"
session-from="sessionFrom"
class="service-btn"
>
</button>
</view>
<HomeNavCard></HomeNavCard>
<HomeNoticeBar :text="notice" />
<Statistics :data="statisticsNum" />
<Statistics :statNum="statNum"/>
<view class="show-and-search">
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
<text>店铺列表</text>
@@ -38,7 +45,7 @@
return {
notice: [],
chooseIndex: 0,
statisticsNum: [231753, 1345],
statNum: {},
swiperList:[]
}
},
@@ -47,13 +54,11 @@
this.getNotice()
this.getStat()
this.open()
this.getRegionList()
},
methods: {
getBanner(){
this.$api.getBanner().then(res=>{
console.log('lunbo',res.data.data);
this.swiperList = res.data.data.map(item=>item.img)
this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img)
})
},
getNotice(){
@@ -63,7 +68,8 @@
},
getStat(){
this.$api.getStat().then(res=>{
this.statisticsNum = res.data.data
this.statNum = res.data.data
console.log(res.data.data);
})
},
getRegionList() {
@@ -89,8 +95,6 @@
success(res) {
console.log('res.latitude', res.latitude);
console.log('res.longitude', res.longitude);
uni.setStorageSync('latitude', res.latitude);
uni.setStorageSync('longitude', res.longitude);
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
@@ -106,6 +110,7 @@
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) => {
@@ -176,6 +181,18 @@
right: 17rpx;
top: 1109rpx;
z-index: 1;
.service-btn {
position: absolute;
top: 0;
background-color: inherit;
border-radius: 50%;
width: 108rpx;
height: 108rpx;
}
.service-btn::after {
border: none;
}
}
}

View File

@@ -58,10 +58,6 @@
console.log('res.da',res);
// console.log('登录code换取的信息', data);
uni.setStorageSync('loginToken', data.token);
uni.setStorageSync('avatar', data.avatar);
uni.setStorageSync('nickname', data.nickname);
uni.setStorageSync('account', data.sn);
uni.setStorageSync('mobile', data.mobile);
that.$toast.success('登录成功')
that.$emit('success')
//登录完成后使用手机code换取手机号,调用/user/getMobileByMnp接口

View File

@@ -54,9 +54,6 @@
return
}
this.isLoad = true
this.src = uni.getStorageSync('avatar')
this.username = uni.getStorageSync('nickname')
this.account = uni.getStorageSync('account')
},
methods: {
reOnLoad() {

View File

@@ -5,56 +5,62 @@
<u-upload max-count="5" upload-icon="photo"></u-upload>
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
</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" ></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>
<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>
</view>
</template>
@@ -62,91 +68,113 @@
export default {
data() {
return {
regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
ShopInfomation:{
city:'',
area:'',
count:0,
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
ShopInfomation: {
city: '',
area: '',
count: 0,
},
form:{
title:'',
region:'',
place:'',
trade:'',
karma:'',
size:'',
rent:'',
sell:'',
name:'',
call:'',
introduce:''
form: {
title: '',
region: '',
place: '',
trade: '',
karma: '',
size: '',
rent: '',
sell: '',
name: '',
call: '',
introduce: ''
},
columns:[
columns: [
],
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']
}],
},
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
},
this.ShopInfomation.city = e.value[0]
this.ShopInfomation.area = e.value[1]
this.show1 = false
},
submit() {
this.$refs.uForm.validate().then(res => {
console.log("提交表单信息:" + JSON.stringify(this.form))
uni.$u.toast('发布成功')
// 调用服务端入表接口W
}).catch(errors => {
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
}
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)
},
onReady() {
this.$refs.uForm.setRules(this.rules)
}
}
</script>
<style lang="scss">
.count{
}
.form{
.count {}
.form {
margin-left: 20px;
margin-right: 20px;
}
.input-class{
.input-class {
font-size: 30rpx;
font-weight:1px;
font-weight: 1px;
border-style: none;
}
.upload{
.upload {
display: flex;
flex-direction: column;
justify-content: center;
@@ -155,30 +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{
.arrow-icon {
position: absolute;
right: 10rpx;
transform: translateY(-20rpx);
}
</style>
</style>

View File

@@ -128,6 +128,7 @@ const toast = {
}
const apiService = {
serverHost,
imgUrl:'https://spsp.feashow.com/',
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
uploadImgUrl: serverHost + `/upload/image/`,
//登录接口