Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
350278e36e
10 changed files with 280 additions and 26 deletions
  1. +1
    -1
      App.vue
  2. +3
    -1
      main.js
  3. +29
    -0
      mixins/share.js
  4. +1
    -0
      pages/index/index.vue
  5. +1
    -0
      pages_order/components/list/renting/rentingItem.vue
  6. +9
    -2
      pages_order/components/list/scenicSpot/scenicSpotItem.vue
  7. +226
    -18
      pages_order/renting/addRenting.vue
  8. +8
    -2
      pages_order/scenicSpot/scenicSpotDetail.vue
  9. +1
    -1
      pages_order/work/addWork.vue
  10. +1
    -1
      store/store.js

+ 1
- 1
App.vue View File

@ -21,7 +21,7 @@
}
.page{
padding-top: var(--window-top);
padding-bottom: env(safe-area-inset-bottom);
}
.pageList{
/deep/ .uv-search__content__input{


+ 3
- 1
main.js View File

@ -15,7 +15,9 @@ import './config'
import './utils/index.js'
// 导入并挂载全局的分享方法
import share from '@/mixins/share.js'
Vue.mixin(share)
//组件注册
import configPopup from '@/components/config/configPopup.vue'


+ 29
- 0
mixins/share.js View File

@ -0,0 +1,29 @@
export default {
data() {
return {
// 默认的全局分享内容
share: {
title: '瑶都万能墙',
path: '/pages/index/index', // 全局分享的路径,比如 首页
// imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
}
}
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl,
}
},
//2.分享到朋友圈
onShareTimeline(res) {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl,
}
},
}

+ 1
- 0
pages/index/index.vue View File

@ -164,6 +164,7 @@
if(query.shareId){
uni.setStorageSync('shareId', query.shareId)
}
this.getData()
this.getIndexHeaderInfo()
this.getClassifyList()


+ 1
- 0
pages_order/components/list/renting/rentingItem.vue View File

@ -57,6 +57,7 @@
display: flex;
padding: 20rpx;
font-size: 24rpx;
border-bottom: 1px solid #00000012;
image{
width: 180rpx;
height: 180rpx;


+ 9
- 2
pages_order/components/list/scenicSpot/scenicSpotItem.vue View File

@ -9,9 +9,16 @@
</view>
<view>
</view>
<view class="createBy">
<!-- <view class="createBy">
{{ item.address }}
</view>
</view> -->
<addressSpot
:address="item.address"
:latitude="item.latitude"
:longitude="item.longitude"
/>
<view class="createTime">
{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
</view>


+ 226
- 18
pages_order/renting/addRenting.vue View File

@ -20,18 +20,50 @@
></uv-cell>
<uv-cell
title="所属工种"
title="朝向"
rightIconStyle="fontSize: 30rpx;"
value="请选择所属工种"
value="请选择朝向"
isLink
></uv-cell>
<uv-cell
title="装修"
rightIconStyle="fontSize: 30rpx;"
value="请选择装修"
isLink
></uv-cell>
<uv-cell
title="楼层"
rightIconStyle="fontSize: 30rpx;"
value="请选择楼层"
isLink
></uv-cell>
<view class="form-sheet-cell">
<view class="label">
户型
</view>
<view class="price">
<input placeholder="请输入户型(三室一厅)" v-model="form.home" />
</view>
</view>
<view class="form-sheet-cell">
<view class="label">
价格/
付款方式
</view>
<view class="price">
<input placeholder="请输入价格" v-model="form.price" />
<input placeholder="请输入付款方式(押一付三)" v-model="form.price" />
</view>
</view>
<view class="form-sheet-cell">
<view class="label">
租金/
</view>
<view class="price">
<input placeholder="请输入租金" type="number" v-model="form.money" />
</view>
</view>
@ -40,44 +72,61 @@
面积
</view>
<view class="price">
<input placeholder="请输入面积" v-model="form.price" />
<input placeholder="请输入面积(米平方)" type="number" v-model="form.crm" />
</view>
</view>
<view class="form-sheet-cell">
<view class="label">
结算方式
看房
</view>
<uv-radio-group v-model="radiovalue">
<view class="price">
<uv-radio
:customStyle="{margin: '8px'}"
v-for="(item, index) in priceType"
:key="index"
iconSize="30rpx"
size="40rpx"
labelSize="26rpx"
:label="item.name"
:name="item.name">
label="随时可看"
name="随时可看">
</uv-radio>
<uv-radio
:customStyle="{margin: '8px'}"
iconSize="30rpx"
size="40rpx"
labelSize="26rpx"
label="电话预约"
name="电话预约">
</uv-radio>
</view>
</uv-radio-group>
</view>
<view class="form-sheet-cell">
<view class="label">
看房
租房类型
</view>
<uv-radio-group v-model="radiovalue">
<uv-radio-group v-model="form.type">
<view class="price">
<uv-radio
:customStyle="{margin: '8px'}"
iconSize="30rpx"
size="40rpx"
labelSize="26rpx"
label="随时可看"
name="0">
label="整租"
name="整租">
</uv-radio>
<uv-radio
:customStyle="{margin: '8px'}"
iconSize="30rpx"
size="40rpx"
labelSize="26rpx"
label="合租"
name="合租">
</uv-radio>
</view>
</uv-radio-group>
@ -89,14 +138,49 @@
</view>
<input placeholder="请输入联系电话" v-model="form.phone" />
</view>
<view class="">
<view class="images box">
<view class="">
精选照片
</view>
<uv-upload
:fileList="fileList"
:maxCount="imageMax"
multiple
width="150rpx"
height="150rpx"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
<view class="category">
<view class="title">
选择地区
</view>
<view class="tagList">
<view
:class="{act : t.id == form.addId}"
@click="form.addId = t.id"
v-for="(t, i) in cityList"
:key="i">
{{ t.name }}
</view>
</view>
</view>
<!-- <view class="">
<uv-textarea
v-model="form.content"
count
:maxlength="300"
autoHeight
placeholder="请输入详细介绍"></uv-textarea>
</view>
</view> -->
<uv-picker ref="picker"
:columns="columns"
@confirm="pickerConfirm"></uv-picker>
<view class="uni-color-btn">
发布
@ -106,11 +190,14 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
form : {
addId : '',//id
address : '',//
crm : '',//
},
radiovalue : '',
priceType : [
@ -132,10 +219,100 @@
name : '月结',
},
],
fileList : [],
imageMax : 9,
picker : {
workYear : [
'不限',
],
school : [
'不限',
'初中',
'高中',
'专科',
'本科',
'研究生',
'博士',
],
},
}
},
onLoad() {
for (var i = 0; i < 30; i++) {
this.picker.workYear.push((i + 1) + '年')
}
this.form.addId = this.cityList[0].id
},
computed : {
columns(){
return [this.picker[this.pickerKey]]
},
...mapState(['cityList', 'category']),
},
methods: {
openPicker(key){
this.pickerKey = key
this.$refs.picker.open()
},
pickerConfirm(e){
this.form[this.pickerKey] = e.value[0]
},
deleteImage(e){
this.fileList.splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
//
selectAddr() {
Position.selectAddress(res => {
//
this.form.latitude = res.latitude
this.form.longitude = res.longitude
if (res.name) {
return this.form.address = res.name
}
this.form.address = ''
})
},
//
submit(){
if(this.fileList.length == 0){
return uni.showToast({
title: '请上传精选照片',
icon : 'none'
})
}
if (this.$utils.verificationAll(this.form, {
title: '请输入标题',
address : '请选择租房地点',
money : '请输入租金',
phone: '请输入联系电话',
titleSub : '请输入备注',
})) {
return
}
this.$api('publishJob', this.form, res => {
if(res.code == 200){
uni.showToast({
title: '发布成功!',
icon: 'none'
})
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
}
}
</script>
@ -184,6 +361,37 @@
margin-left: auto;
}
}
.images{
padding: 30rpx;
view{
padding-bottom: 20rpx;
}
}
}
.category{
padding: 20rpx;
.title{
// font-weight: 900;
// font-size: 30rpx;
}
.tagList{
display: flex;
flex-wrap: wrap;
padding: 10rpx 0;
view{
background: rgba($uni-color, 0.1);
padding: 10rpx 20rpx;
margin: 10rpx;
border-radius: 10rpx;
font-size: 26rpx;
}
.act{
color: #fff;
background: $uni-color;
}
}
}
}
</style>

+ 8
- 2
pages_order/scenicSpot/scenicSpotDetail.vue View File

@ -21,11 +21,17 @@
</view>
</view>
<view class="createBy">
<!-- <view class="createBy">
<view class="">
地址{{ detail.address }}
</view>
</view>
</view> -->
<addressSpot
:address="detail.address"
:latitude="detail.latitude"
:longitude="detail.longitude"
/>
<view class="content">


+ 1
- 1
pages_order/work/addWork.vue View File

@ -126,7 +126,7 @@
workYear : '',
minPrice : '',
maxPrice : '',
address : '123',
address : '',
},
radiovalue : '',
priceList : [


+ 1
- 1
store/store.js View File

@ -11,7 +11,7 @@ const store = new Vuex.Store({
configList: [], //配置列表
shop : false,
userInfo : {}, //用户信息
city : {},//城市列表
city : {},//当前城市
cityList : [],//城市列表
category : [],//动态分类
},


Loading…
Cancel
Save