<style lang="less">
.box {
  position: relative;
  padding: 118px 20px 120px;
  background-color: #ebf5fa;
  background-repeat: no-repeat;
  background-size: contain;

  .image {
    width: 100%;
  }
  .button {
    position: fixed;
    height: 50px;
    width: 335px;
    line-height: 50px;
    background: #3dcbcc;
    color: #fff;
    font-size: 16px;
    text-align: center;
    bottom: 35px;
    border-radius: 28px;
  }
}
</style>
<template>
<div class="box" :style="{'background-image': 'url('+h5StaticPath+'detailBack.jpg)'}">
  <navigationbar></navigationbar>
  <image class="image" :src="h5StaticPath+'resident.svg'" mode="widthFix"/>
  <div class="button"  @click="goEnv()">去设置常驻工区</div>
</div>
</template>

<script>
import wepy from '@wepy/core';
import store from '@/store';
import config from '@/config';

wepy.page({
  store,
  config: {},
  data: {
    h5StaticPath: config.h5StaticPath + '/page-home/',
    hasControlSpaces: 'no',
  },
  methods: {
    goEnv() {
      if (this.hasControlSpaces == 'no') {
        wx.showToast({
          title: '您还未配置可控空间',
          icon: 'none',
          duration: 4000,
        });
        return;
      }
      wx.navigateTo({
        url: `/packagesEnv/pages/officehome/index?from=homeSetSpace`,
      });
    },
  },
  created() {},
  onLoad: function(options) {
    console.log('optionsoptionsoptions', options.hasControlSpaces);
    this.hasControlSpaces = options.hasControlSpaces;
  },
});
</script>
<config>
{
"navigationStyle":"custom",
usingComponents: {
  "navigationbar":'./navigationbar',
}
}
</config>
