appraise.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view v-if="show" class="content">
  3. <view class="qrimg">
  4. <tki-qrcode ref="qrcode" :val="code.val" :size="code.size" :icon="code.icon" :iconSize="code.iconsize"
  5. :onval="code.onval" :loadMake="code.loadMake" :showLoading="code.showLoading"
  6. :loadingText="code.loadingText" />
  7. </view>
  8. <view class="title">
  9. 长按识别二维码跳转评价客服
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import {
  15. _API_GetVRLink
  16. } from '@/apis/user.js';
  17. import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
  18. export default {
  19. data() {
  20. return {
  21. show: false,
  22. code: {
  23. val: '',
  24. size: 400,
  25. icon: '',
  26. iconsize: 25,
  27. onval: true,
  28. loadMake: '',
  29. showLoading: true,
  30. loadingText: '二维码生成中...'
  31. },
  32. title: 'Hello'
  33. }
  34. },
  35. onLoad() {
  36. this.GetVRLinkM()
  37. },
  38. methods: {
  39. // 获取链接
  40. GetVRLinkM() {
  41. _API_GetVRLink().then(res => {
  42. if (res.code === 200) {
  43. this.code.val = res.data.appraise_service_url
  44. this.show = true
  45. } else {
  46. this.$message.error(res.message || '获取失败')
  47. }
  48. })
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. .content {
  55. padding-top: 200rpx;
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. justify-content: center;
  60. }
  61. .title {
  62. margin-top: 20rpx;
  63. }
  64. </style>