|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
-<view class="pages" :style="{'height':(h)+'px','padding-top':mt+'px'}">
|
|
|
+ <view class="pages" :style="{'height':(h)+'px','padding-top':mt+'px'}">
|
|
|
<c-nav-bar title="酒店民宿信息" :showIcon="true"></c-nav-bar>
|
|
|
<view class="content">
|
|
|
<view class="card" @click="goToPosition()">
|
|
@@ -8,21 +8,23 @@
|
|
|
</view>
|
|
|
<view class="card">
|
|
|
<text class="label">联系电话</text>
|
|
|
- <u--input inputAlign="right" placeholder="请输入内容" border="none" v-model="stayInfo.landlinePhone" style="text-align: right;"></u--input>
|
|
|
+ <u--input inputAlign="right" placeholder="请输入内容" border="none" v-model="stayInfo.landlinePhone"
|
|
|
+ style="text-align: right;"></u--input>
|
|
|
</view>
|
|
|
<view class="card c2">
|
|
|
<view class="tit">酒店简介</view>
|
|
|
<view>
|
|
|
- <u--textarea customStyle="font-size:28rpx;line-height:28rpx" border='none' maxlength="300" count v-model="stayInfo.introduction" :value="stayInfo.introduction"
|
|
|
- placeholder="请输入酒店简介" height='360' ></u--textarea>
|
|
|
+ <u--textarea customStyle="font-size:28rpx;line-height:28rpx" border='none' maxlength="300" count
|
|
|
+ v-model="stayInfo.introduction" :value="stayInfo.introduction" placeholder="请输入酒店简介"
|
|
|
+ height='360'></u--textarea>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="card c2">
|
|
|
<view class="tit">内饰照片</view>
|
|
|
<view class="imgs">
|
|
|
<!-- <image src="" v-for="(item,index) in imgUrlList" :key="index"></image> -->
|
|
|
- <u-upload ref="uUpload" uploadText="上传图片" :fileList="imgUrlList" :maxSize="10 * 1024 * 1024" width="180"
|
|
|
- height="120" @afterRead="afterRead" @delete="deletePic">
|
|
|
+ <u-upload ref="uUpload" uploadText="上传图片" :fileList="imgUrlList" :maxSize="10 * 1024 * 1024"
|
|
|
+ width="180" height="120" @afterRead="afterRead" @delete="deletePic">
|
|
|
</u-upload>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -39,7 +41,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- homestayId: uni.getStorageSync('homestayId')||0,
|
|
|
+ homestayId: uni.getStorageSync('homestayId') || 0,
|
|
|
value: '',
|
|
|
value1: '',
|
|
|
fileList: [],
|
|
@@ -79,7 +81,7 @@
|
|
|
})
|
|
|
},
|
|
|
getStayInfo() {
|
|
|
- this.$api.get('/merchant/hotel/mine/getMerchantHomestayInfo/'+this.homestayId).then(res => {
|
|
|
+ this.$api.get('/merchant/hotel/mine/getMerchantHomestayInfo/' + this.homestayId).then(res => {
|
|
|
if (res.data.code == 0) {
|
|
|
this.stayInfo = res.data.data;
|
|
|
this.stayInfo.picList.forEach((item) => {
|
|
@@ -135,18 +137,18 @@
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
- save(){
|
|
|
- if(!this.$u.test.mobile(this.stayInfo.landlinePhone)){
|
|
|
+ save() {
|
|
|
+ if (!this.$u.test.mobile(this.stayInfo.landlinePhone)) {
|
|
|
this.$showToast('请输入正确手机号');
|
|
|
return
|
|
|
}
|
|
|
- this.stayInfo.picList=[];
|
|
|
- this.imgUrlList.forEach((i)=>{
|
|
|
- if(i.url){
|
|
|
+ this.stayInfo.picList = [];
|
|
|
+ this.imgUrlList.forEach((i) => {
|
|
|
+ if (i.url) {
|
|
|
this.stayInfo.picList.push(i.url)
|
|
|
}
|
|
|
})
|
|
|
- this.$api.post('/merchant/hotel/mine/updMHomestayInfo',this.stayInfo).then(res=>{
|
|
|
+ this.$api.post('/merchant/hotel/mine/updMHomestayInfo', this.stayInfo).then(res => {
|
|
|
console.log(res)
|
|
|
})
|
|
|
}
|
|
@@ -154,18 +156,33 @@
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="less">
|
|
|
+ .u-upload__wrap__preview__image {
|
|
|
+ width: 190rpx !important;
|
|
|
+ height: 120rpx !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .u-upload__button {
|
|
|
+ width: 190rpx !important;
|
|
|
+ height: 120rpx !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
/deep/.u-cell__body {
|
|
|
padding: 0;
|
|
|
}
|
|
|
- ::v-deep .u-icon__icon{
|
|
|
- font-size: 40rpx!important;
|
|
|
+
|
|
|
+ ::v-deep .u-icon__icon {
|
|
|
+ font-size: 30rpx !important;
|
|
|
margin-bottom: 10rpx;
|
|
|
- }
|
|
|
- ::v-deep .u-upload__button__text{
|
|
|
- color:#B9C2D0!important;
|
|
|
- font-size: 20rpx!important;
|
|
|
+ left: 2rpx !important;
|
|
|
+ top: 6rpx !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .u-upload__button__text {
|
|
|
+ color: #B9C2D0 !important;
|
|
|
+ font-size: 20rpx !important;
|
|
|
}
|
|
|
|
|
|
::v-deep .u-cell__body {
|
|
@@ -187,9 +204,11 @@
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- &.c2{
|
|
|
+
|
|
|
+ &.c2 {
|
|
|
display: block;
|
|
|
}
|
|
|
+
|
|
|
.label {
|
|
|
font-size: 30rpx;
|
|
|
}
|
|
@@ -225,12 +244,14 @@
|
|
|
}
|
|
|
|
|
|
.bottom {
|
|
|
+ z-index: 99999;
|
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
background: #fff;
|
|
|
width: 100%;
|
|
|
padding: 20rpx 0 30rpx;
|
|
|
box-sizing: border-box;
|
|
|
+
|
|
|
.btn {
|
|
|
background: #33AFFC;
|
|
|
color: white;
|