index.vue 732 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <view v-if="isShow">
  3. <button class="btn-normal" :open-type="setting.provider == 'mpwxkf' ? 'contact' : ''">
  4. <slot></slot>
  5. </button>
  6. </view>
  7. </template>
  8. <script>
  9. import SettingKeyEnum from '@/common/enum/setting/Key'
  10. import SettingModel from '@/common/model/Setting'
  11. export default {
  12. props: {},
  13. data() {
  14. return {
  15. isShow: false,
  16. setting: {}
  17. }
  18. },
  19. async created() {
  20. // 是否显示在线客服按钮
  21. this.isShow = await SettingModel.isShowCustomerBtn()
  22. // 商城客服设置
  23. this.setting = await SettingModel.item(SettingKeyEnum.CUSTOMER.value, true)
  24. },
  25. methods: {
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. </style>