kefu.vue 3.5 KB

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