<!--
 * @Descripttion: 开始沟通按钮
 * @Company: 思宏科技
 * @version: v1.0
 * @Author: ZZB
 * @Date: 2021-2-23 16:28:11
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-02-25 17:54:49
-->
<template>
  <view class="wrapper">
    <view class="footer">
      <u-button
        class="pay-btn"
        type="primary"
        :loading="loading"
        @click="payMoney"
      >
        {{ payState ? '立即签署' : '立即支付' }}
      </u-button>
      <!-- <u-button type="primary" :loading="loading" @click="confirmVisit">
        开始沟通
      </u-button> -->
    </view>
  </view>
</template>

<script>
// import { mapState } from 'vuex'
// const app = getApp()

export default {
  components: {},
  props: {
    details: {
      type: [Object],
      default: null
    }
  },
  data() {
    return {
      loading: false,
      payState: false,
      showModal: false
    }
  },
  methods: {
    // 发起远程探视
    confirmVisit() {
      console.log('发起远程探视')
    },
    payMoney() {
      if (!this.payState) {
        this.payState = !this.payState
      } else {
        console.log('立即签署')
        wx.navigateToMiniProgram({
          shortLink: '',
          path: 'page/index/index?id=123',
          envVersion: 'develop',
          success(res) {
            console.log('sucess')
          }
        })
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.footer {
  width: 100%;
  padding: 30rpx;
  background-color: #ffffff;
  z-index: 9;
}
.pay-btn {
  padding-bottom: 100rpx !important;
}
</style>
