瑶都万能墙
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.

187 lines
3.5 KiB

  1. <template>
  2. <view class="customer-service">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="客服中心" />
  4. <view class="content">
  5. <!-- 客服介绍 -->
  6. <view class="intro">
  7. <view class="title">我们为您提供贴心服务</view>
  8. <view class="desc">如有任何问题请随时联系我们的客服团队</view>
  9. </view>
  10. <!-- 客服列表 -->
  11. <view class="service-list">
  12. <view
  13. class="service-item"
  14. v-for="(item, index) in list"
  15. :key="index"
  16. @click="showQRCode(item)"
  17. >
  18. <image class="avatar" :src="item.headImage" mode="aspectFill"></image>
  19. <view class="info">
  20. <view class="name">{{ item.nickName }}</view>
  21. <view class="contact">{{ item.phone }}</view>
  22. </view>
  23. <uv-icon name="arrow-right"
  24. v-if="item.wxCode"
  25. size="24rpx" color="#999"></uv-icon>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 微信二维码弹窗 -->
  30. <uv-popup ref="qrPopup" :round="20" bgColor="#fff">
  31. <view class="qr-popup">
  32. <view class="qr-header">
  33. <view class="title">{{ currentService.nickName }}</view>
  34. <view class="subtitle">扫码添加微信</view>
  35. </view>
  36. <view class="qr-content">
  37. <image class="qr-code" :src="currentService.wxCode" mode="aspectFit"></image>
  38. <view class="qr-tips">长按保存二维码微信扫码添加</view>
  39. </view>
  40. <view class="qr-actions">
  41. <uv-button type="primary" @click="$refs.qrPopup.close()">知道了</uv-button>
  42. </view>
  43. </view>
  44. </uv-popup>
  45. </view>
  46. </template>
  47. <script>
  48. import mixinsList from '@/mixins/list.js'
  49. export default {
  50. mixins: [mixinsList],
  51. data() {
  52. return {
  53. mixinsListApi: 'getMyService',
  54. currentService: {},
  55. }
  56. },
  57. methods: {
  58. // 显示二维码弹窗
  59. showQRCode(service) {
  60. if(service.wxCode){
  61. this.currentService = service
  62. this.$refs.qrPopup.open('center')
  63. }
  64. }
  65. }
  66. }
  67. </script>
  68. <style scoped lang="scss">
  69. .customer-service {
  70. background-color: #f5f5f5;
  71. min-height: 100vh;
  72. .content {
  73. padding: 20rpx;
  74. }
  75. .intro {
  76. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  77. padding: 40rpx;
  78. border-radius: 20rpx;
  79. margin-bottom: 30rpx;
  80. .title {
  81. color: #fff;
  82. font-size: 36rpx;
  83. font-weight: bold;
  84. margin-bottom: 10rpx;
  85. }
  86. .desc {
  87. color: rgba(255, 255, 255, 0.8);
  88. font-size: 28rpx;
  89. }
  90. }
  91. .service-list {
  92. background-color: #fff;
  93. border-radius: 20rpx;
  94. padding: 20rpx;
  95. margin-bottom: 30rpx;
  96. .service-item {
  97. display: flex;
  98. align-items: center;
  99. padding: 30rpx 20rpx;
  100. border-bottom: 1rpx solid #f0f0f0;
  101. &:last-child {
  102. border-bottom: none;
  103. }
  104. .avatar {
  105. width: 80rpx;
  106. height: 80rpx;
  107. border-radius: 50%;
  108. margin-right: 20rpx;
  109. }
  110. .info {
  111. flex: 1;
  112. .name {
  113. font-size: 32rpx;
  114. font-weight: bold;
  115. color: #333;
  116. margin-bottom: 8rpx;
  117. }
  118. .contact {
  119. font-size: 26rpx;
  120. color: #666;
  121. }
  122. }
  123. }
  124. }
  125. .qr-popup {
  126. padding: 40rpx;
  127. text-align: center;
  128. width: 600rpx;
  129. .qr-header {
  130. margin-bottom: 30rpx;
  131. .title {
  132. font-size: 36rpx;
  133. font-weight: bold;
  134. color: #333;
  135. margin-bottom: 10rpx;
  136. }
  137. .subtitle {
  138. font-size: 28rpx;
  139. color: #666;
  140. }
  141. }
  142. .qr-content {
  143. margin-bottom: 30rpx;
  144. .qr-code {
  145. width: 400rpx;
  146. height: 400rpx;
  147. border-radius: 20rpx;
  148. margin-bottom: 20rpx;
  149. }
  150. .qr-tips {
  151. font-size: 24rpx;
  152. color: #999;
  153. line-height: 1.5;
  154. }
  155. }
  156. .qr-actions {
  157. display: flex;
  158. justify-content: center;
  159. }
  160. }
  161. }
  162. </style>