kefu.vue 3.3 KB

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