index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="container">
  3. <navBar title="客服中心" :back="true" color="#333333" background="#FFFFFF" />
  4. <view class="server">
  5. <image src="../../../static/other/yhk.png" mode=""></image>
  6. </view>
  7. <view v-if="phone" class="kefu">
  8. <view class="dian"></view>
  9. <view class="">客服手机号:{{phone}}</view>
  10. <view class="yijian"><u-button @click="call(phone)" color="#207CF7" size="mini" type="primary" shape="circle"
  11. text="一键拨号"></u-button></view>
  12. </view>
  13. <view v-if="weiChat" class="kefu">
  14. <view class="dian"></view>
  15. <view>客服微信号:{{weiChat}}</view>
  16. <view class="yijian"><u-button @click="fhuzhi" color="#207CF7" size="mini" type="primary" shape="circle"
  17. text="一键复制"></u-button></view>
  18. </view>
  19. <!-- <view class="sds">dfhsfsdh25</view> -->
  20. <block v-if="code">
  21. <view class="kefu">
  22. <view class="dian"></view>
  23. <view class="">客服二维码</view>
  24. </view>
  25. <view class="qrcode_path">
  26. <image @click="viewsave(code)" :src="code" mode="widthFix"></image>
  27. <!-- <image src="@/static/images/head.jpg" mode="widthFix"></image> -->
  28. </view>
  29. </block>
  30. </view>
  31. </template>
  32. <script>
  33. // import navBar from '@/components/navBar/index.vue'
  34. export default {
  35. // components: {
  36. // navBar
  37. // },
  38. data() {
  39. return {
  40. phone:'15609038522',
  41. weiChat:'qweqwe',
  42. code:'https://img0.baidu.com/it/u=3232582821,3516640051&fm=253&fmt=auto&app=138&f=JPEG?w=625&h=500'
  43. }
  44. },
  45. onLoad() {
  46. },
  47. methods: {
  48. viewsave(e) {
  49. uni.previewImage({
  50. urls: [e],
  51. current: 0
  52. })
  53. },
  54. fhuzhi() {
  55. var that = this;
  56. uni.setClipboardData({
  57. data: that.weiChat,
  58. success: function() {
  59. uni.showToast({
  60. title: '微信号已复制'
  61. })
  62. }
  63. });
  64. },
  65. call(e){
  66. wx.makePhoneCall({
  67. phoneNumber: e //仅为示例,并非真实的电话号码
  68. })
  69. },
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. @import "./index.scss";
  75. </style>