license.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view>
  3. <block v-if="loading">
  4. <view class="skeleton">
  5. <view class="skeleton-line max animate" style="height: 200upx;"></view>
  6. <view class="skeleton-line animate"></view>
  7. <view class="skeleton-line min animate"></view>
  8. <view class="skeleton-line min animate"></view>
  9. <view class="skeleton-line max animate" style="height: 200upx;"></view>
  10. <view class="skeleton-line max animate" style="height: 200upx;"></view>
  11. </view>
  12. </block>
  13. <block v-else>
  14. <view class="info-item">
  15. <view class="title">营业执照</view>
  16. <view class="img"><image :src="license" mode="widthFix"></image></view>
  17. </view>
  18. <view class="info-item">
  19. <view class="title">特别提示</view>
  20. <view class="info">商家资质图片为官方展示<text>严禁下载复印</text>,违者后果自负</view>
  21. </view>
  22. </block>
  23. </view>
  24. </template>
  25. <script>
  26. var app;
  27. import {
  28. openimg
  29. } from '@/utils/js/index.js';
  30. export default {
  31. data() {
  32. return {
  33. loading:true,
  34. license:"",
  35. poiId:0
  36. }
  37. },
  38. onLoad({poi}) {
  39. app = this;
  40. app.poiId = poi;
  41. app.getLicense()
  42. },
  43. methods: {
  44. showImg(){
  45. return openimg(0,[app.license])
  46. },
  47. async getLicense(){
  48. app.loading = true;
  49. var res = await app.$api.home.license.get({"poi":app.poiId});
  50. app.loading = false;
  51. if (res.code !== 1) {
  52. return app.$dialog.showSuccess(res.msg,function(){
  53. uni.navigateBack()
  54. })
  55. }
  56. app.license = res.data.img;
  57. }
  58. }
  59. }
  60. </script>
  61. <style>
  62. page{background-color: #f8f8f8;}
  63. .info-item{background-color: #fff;padding: 20upx;margin-bottom: 20upx;}
  64. .info-item .title{font-size: 30upx;color: #333;font-weight: bold;line-height: 80upx;border-bottom: 2upx solid #f8f8f8;}
  65. .info-item .info{font-size: 28upx;color: #666;line-height: 60upx;}
  66. .info-item .info text{color: #f00;}
  67. .info-item image{width: 100%;}
  68. </style>