123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
- <c-nav-bar title="房型列表" :showIcon="false" :titleStyle="titleStyle"></c-nav-bar>
- <!-- 房型数量 -->
- <view class="typeNum">
- <text style="font-size: 24rpx; color: #777;">共{{roomType.length}}个房型</text>
- </view>
- <!-- 房型选择 -->
- <view class="type" v-for="item in roomType" :key="item.houseBaseId" @click="goEditTypeInfo(item.houseBaseId)">
- <view class="top">
- <text style="font-size: 30rpx; color: #333;" >{{item.name}}</text>
- <u-icon name="arrow-right"></u-icon>
- </view>
- <view class="under">
- <text style="font-size: 24rpx; color: #777;">大床房</text>
- <text style="font-size: 24rpx; color: #777;">{{item.roomCount}}间</text>
- </view>
-
- </view>
-
- <!-- 新增按钮 -->
- <view class="btn" @click="addType(id)">
- 新增
- </view>
- </view>
- </template>
- <script>
- export default {
- data(){
- return {
- homestayId:this.$store.state.moduleHouse.homestayId,
- roomType:[]
- }
- },
- onLoad(){
- // console.log(this.homestayId)
- this.getHomestayId()
- },
- methods:{
- // 获取房型列表信息
- getHomestayId(){
-
-
- this.$api.get(`/merchant/hotel/mine/getHouseBaseList/${this.homestayId}`,{
- homestayId:this.homestayId
- }).then((res)=>{
- // console.log(res)
- this.roomType=res.data.data
-
- // let roomSymbleName=this.roomType.name
- // console.log(roomSymbleName)
- // console.log(this.roomType)
- })
- },
- // 新增房型
- addType(id){
- uni.navigateTo({
- url:`/pages/my/houseList?id=${this.homestayId}`
- })
- },
- // 修改房型信息
- goEditTypeInfo(houseBaseId){
- uni.navigateTo({
- url:`/pages/my/houseList?houseBaseId=${houseBaseId}`
- })
- console.log(houseBaseId)
- }
- }
- }
- </script>
- <style lang="scss">
- .page {
- background: #F3F4F4;
- padding-bottom: 260rpx;
- box-sizing: border-box;
- overflow-y: auto;
- overflow-x: auto;
- }
- .typeNum{
- width: 100%;
- height: 73rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .type{
- margin: 0 auto;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- width: 86%;
- height: 155rpx;
- background-color: #fff;
- padding: 30rpx;
- margin-bottom: 20rpx;
- }
- .top{
- display: flex;
- justify-content: space-between;
- }
- .under{
- margin-top: 40rpx;
- display: flex;
- justify-content: space-between;
- }
- .btn{
- width: 690rpx;
- height: 96rpx;
- background-color: #1372FF;
- color: #fff;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 34rpx;
- position: fixed;
- bottom: 40rpx;
- margin-top: 30rpx;
- margin-left: 30rpx;
- border-radius: 48rpx;
- }
- </style>
|