license.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. }
  36. },
  37. onLoad() {
  38. app = this;
  39. app.getLicense()
  40. },
  41. methods: {
  42. showImg(){
  43. return openimg(0,[app.license])
  44. },
  45. async getLicense(){
  46. app.loading = true;
  47. var res = await app.$api.home.license.get();
  48. app.loading = false;
  49. if (res.code !== 1) {
  50. return app.$dialog.showSuccess(res.msg,function(){
  51. uni.navigateBack()
  52. })
  53. }
  54. app.license = res.data.img;
  55. }
  56. }
  57. }
  58. </script>
  59. <style>
  60. page{background-color: #f8f8f8;}
  61. .info-item{background-color: #fff;padding: 20upx;margin-bottom: 20upx;}
  62. .info-item .title{font-size: 30upx;color: #333;font-weight: bold;line-height: 80upx;border-bottom: 2upx solid #f8f8f8;}
  63. .info-item .info{font-size: 28upx;color: #666;line-height: 60upx;}
  64. .info-item .info text{color: #f00;}
  65. .info-item image{width: 100%;}
  66. </style>