license.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="license">
  3. <view class="box bg-white">
  4. <template v-if="images.length">
  5. <view v-for="(item, index) in images" :key="index" class="m-b-25" @click="viewImage(index)">
  6. <u-image :src="item" width="100%" height="348rpx">
  7. </u-image>
  8. </view>
  9. </template>
  10. <template v-else>
  11. <view class="data-null xs muted">
  12. <image src="../../../static/images/order_null.png" mode=""></image>
  13. <view>
  14. 商家暂时还没有上传资质哦~
  15. </view>
  16. </view>
  17. </template>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import {
  23. getCopyright
  24. } from "@/api/user";
  25. export default {
  26. data() {
  27. return {
  28. images: []
  29. }
  30. },
  31. methods: {
  32. getCopyrightFunc(id) {
  33. getCopyright({shop_id: id}).then(res => {
  34. this.images = res.data
  35. })
  36. },
  37. viewImage(current) {
  38. uni.previewImage({
  39. current,
  40. urls: this.images// 需要预览的图片http链接列表
  41. });
  42. }
  43. },
  44. onLoad() {
  45. const id = this.$Route.query.id;
  46. this.getCopyrightFunc(id)
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .license {
  52. padding: 30rpx;
  53. .box {
  54. padding: 30rpx;
  55. border-radius: 16rpx;
  56. .data-null {
  57. padding-top: 200rpx;
  58. height: 700rpx;
  59. text-align: center;
  60. image {
  61. width: 200rpx;
  62. height: 200rpx;
  63. }
  64. }
  65. }
  66. }
  67. </style>