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" @click="preview"><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 * as Api from "@/static/api/home.js";
  28. export default {
  29. data() {
  30. return {
  31. loading:true,
  32. license:""
  33. }
  34. },
  35. onLoad() {
  36. app = this;
  37. app.getLicense()
  38. },
  39. methods: {
  40. preview(){
  41. uni.previewImage({
  42. urls:[app.license]
  43. })
  44. },
  45. getLicense(){
  46. Api.license({}).then((res)=>{
  47. app.loading = false;
  48. if (res.code !== 1) {
  49. return app.$dialog.showSuccess(res.msg,function(){
  50. uni.navigateBack()
  51. })
  52. }
  53. app.license = res.data.img;
  54. })
  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: #fe2c56;}
  65. .info-item image{width: 100%;}
  66. </style>