时空网前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.0 KiB

  1. <template>
  2. <view class="content">
  3. <view class="lf-row-between item">
  4. <view class="lf-color-gray">在线客服</view>
  5. <button class="btn" open-type="contact">在线联系</button>
  6. </view>
  7. <view class="lf-row-between item">
  8. <view class="lf-color-gray">服务时间</view>
  9. <view>{{ info.service_period || '-' }}</view>
  10. </view>
  11. <view class="lf-row-between item" @click="makePhoneCall">
  12. <view class="lf-color-gray">客服电话</view>
  13. <view style="color: #1E89FF!important;">{{ info.phone || '-' }}</view>
  14. </view>
  15. <view class="lf-row-between item">
  16. <view class="lf-color-gray">联系地址</view>
  17. <view style="max-width: 500rpx;">{{ info.address || '-' }}</view>
  18. </view>
  19. <view class="lf-row-between item">
  20. <view class="lf-color-gray">客服微信</view>
  21. <view v-if="info.wechat">
  22. <text>{{ info.wechat }}</text>
  23. <text class="lf-m-l-20 lf-color-primary" @click="copy">复制</text>
  24. </view>
  25. <view v-else>-</view>
  26. </view>
  27. <view class="lf-row-between item">
  28. <view class="lf-color-gray">当前版本</view>
  29. <view>{{ version }}</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data(){
  36. return {
  37. version: '',
  38. info: {}
  39. }
  40. },
  41. onLoad(){
  42. this.version = this.API.VERSION;
  43. this.getInfo();
  44. },
  45. methods: {
  46. // 获取信息
  47. getInfo(){
  48. this.$http(this.API.API_CONTACT).then(res => {
  49. this.info = res.data || {};
  50. })
  51. },
  52. // 拨打电话
  53. makePhoneCall(){
  54. if(!this.info?.phone) return;
  55. uni.makePhoneCall({
  56. phoneNumber: this.info.phone
  57. })
  58. },
  59. // 复制
  60. copy(){
  61. uni.setClipboardData({
  62. data: this.info.wechat
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped="scoped">
  69. .content{
  70. width: 750rpx;
  71. height: auto;
  72. padding: 0 32rpx;
  73. box-sizing: border-box;
  74. .item{
  75. width: 100%;
  76. height: 104rpx;
  77. border-bottom: 1rpx solid #EEEEEE;
  78. .btn{
  79. margin: 0;
  80. width: 176rpx;
  81. height: 60rpx;
  82. background: #FE9903;
  83. border-radius: 30rpx;
  84. color: #FFFFFF;
  85. font-size: 28rpx;
  86. line-height: 60rpx;
  87. }
  88. }
  89. }
  90. </style>