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.

90 lines
1.6 KiB

1 year ago
  1. <template>
  2. <view class="contactCustomerService">
  3. <u-navbar :title="$route.query.title">
  4. <view slot="left" class="back">
  5. <u-icon @click="toLogin()" name="arrow-left"></u-icon>
  6. </view>
  7. </u-navbar>
  8. <view class="img">
  9. <img width="200px" :src="kf.keyImage" alt="" />
  10. </view>
  11. <view class="text">
  12. {{ $t('page.contactCustomerService.text') }}
  13. </view>
  14. <view class="text">
  15. {{ kf.keyPhone }}
  16. </view>
  17. <button class="btn" @click="copy">
  18. {{ $t('page.contactCustomerService.copy') }}
  19. </button>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. kf: {}
  27. };
  28. },
  29. onShow() {
  30. this.getData()
  31. },
  32. methods: {
  33. getData() {
  34. this.request('getKeFu').then(res => {
  35. this.kf = res.result
  36. })
  37. },
  38. toLogin() {
  39. let query = this.$route.query;
  40. if (query.url && query.id) {
  41. return uni.navigateTo({
  42. url: query.url + '?id=' + query.id
  43. })
  44. }
  45. uni.navigateTo({
  46. url: '/pages/login/login'
  47. })
  48. },
  49. copy() {
  50. uni.setClipboardData({
  51. data: this.kf.keyPhone,
  52. success: () => {
  53. uni.showToast({
  54. title: this.$t('success-operation'),
  55. icon: 'none'
  56. })
  57. }
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .contactCustomerService {
  65. height: 100vh;
  66. width: 100%;
  67. background-color: #fff;
  68. display: flex;
  69. flex-direction: column;
  70. justify-content: center;
  71. align-items: center;
  72. flex-wrap: wrap;
  73. .text {
  74. box-sizing: border-box;
  75. padding: 10px;
  76. text-align: center;
  77. }
  78. .btn {
  79. border-radius: 5px;
  80. height: 30px;
  81. font-size: 13px;
  82. line-height: 30px;
  83. background-color: #ED762F;
  84. color: #fff;
  85. }
  86. }
  87. </style>