kefu.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view>
  3. <view style="color: #fff;">
  4. <tn-nav-bar :bottomShadow="false" backgroundColor="#207CF7">客服中心</tn-nav-bar>
  5. <view :style="{height: tobheight+'px'}"></view>
  6. </view>
  7. <view class="server">
  8. <image src="/static/images/kefu.png" mode=""></image>
  9. </view>
  10. <view v-if="appInfo.kf_tel" class="kefu">
  11. <view class="dian"></view>
  12. <view class="">客服手机号:{{appInfo.kf_tel}}</view>
  13. <view class="yijian"><u-button @click="bohao" color="#207CF7" size="mini" type="primary" shape="circle"
  14. text="一键拨号"></u-button></view>
  15. </view>
  16. <view v-if="appInfo.kf_wechat" class="kefu">
  17. <view class="dian"></view>
  18. <view>客服微信号:{{appInfo.kf_wechat}}</view>
  19. <view class="yijian"><u-button @click="fhuzhi" color="#207CF7" size="mini" type="primary" shape="circle"
  20. text="一键复制"></u-button></view>
  21. </view>
  22. <!-- <view class="sds">dfhsfsdh25</view> -->
  23. <block v-if="appInfo.kf_qrcode_path">
  24. <view class="kefu">
  25. <view class="dian"></view>
  26. <view class="">客服二维码</view>
  27. </view>
  28. <view class="qrcode_path">
  29. <image @click="viewsave(appInfo.kf_qrcode_path)" :src="appInfo.kf_qrcode_path" mode="widthFix"></image>
  30. <!-- <image src="@/static/images/head.jpg" mode="widthFix"></image> -->
  31. </view>
  32. </block>
  33. <wike-loading-page :isLoading="isLoading"></wike-loading-page>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. mapMutations,
  39. mapActions,
  40. mapState,
  41. mapGetters
  42. } from 'vuex';
  43. export default {
  44. data() {
  45. return {
  46. tobheight: 45,
  47. platform: this.$platform.get(),
  48. isLoading: true,
  49. themeColor: '#007AFF',
  50. codeBgColor: '#207CF7',
  51. content: 'if(daur){this.fhdj = fgjf}'
  52. }
  53. },
  54. computed: {
  55. ...mapGetters(['appInfo'])
  56. },
  57. watch: {
  58. appInfo: function(e) {
  59. let that = this;
  60. uni.setNavigationBarTitle({
  61. title: that.appInfo.site_name
  62. })
  63. }
  64. },
  65. onLoad() {
  66. if (this.platform == 'wxMiniProgram') {
  67. var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
  68. var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
  69. this.tobheight = (menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height)
  70. }
  71. this.isLoading = false
  72. },
  73. methods: {
  74. viewsave(e) {
  75. uni.previewImage({
  76. urls: [e],
  77. current: 0
  78. })
  79. },
  80. bohao() {
  81. var that = this;
  82. uni.makePhoneCall({
  83. phoneNumber: that.appInfo.kf_tel
  84. });
  85. },
  86. fhuzhi() {
  87. var that = this;
  88. uni.setClipboardData({
  89. data: that.appInfo.kf_wechat,
  90. success: function() {
  91. uni.showToast({
  92. title: '微信号已复制'
  93. })
  94. }
  95. });
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="scss">
  101. page {
  102. background: #F6F7FB;
  103. }
  104. .kefu {
  105. background: #ffffff;
  106. padding: 38rpx 30rpx;
  107. display: flex;
  108. align-items: center;
  109. font-weight: bold;
  110. // margin-top: 38rpx;
  111. font-size: 32rpx;
  112. border-bottom: 1px solid #ededed;
  113. .dian {
  114. width: 20rpx;
  115. height: 20rpx;
  116. border-radius: 50%;
  117. background: #207CF7;
  118. margin-right: 16rpx;
  119. }
  120. }
  121. .qrcode_path {
  122. width: 100%;
  123. // height: 800rpx;
  124. padding: 30rpx;
  125. background: #ffffff;
  126. display: flex;
  127. justify-content: center;
  128. image {
  129. width: 92%;
  130. height: 100%;
  131. }
  132. }
  133. .sds {
  134. background: #ffffff;
  135. padding: 0 30rpx;
  136. }
  137. .yijian {
  138. width: 150rpx;
  139. margin-left: 30rpx;
  140. }
  141. .server {
  142. display: flex;
  143. justify-content: center;
  144. margin: 60rpx 0;
  145. image {
  146. width: 100px;
  147. height: 100px;
  148. }
  149. }
  150. </style>