aptitude.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="aptitude-index iPhone-bottom flex-common-css box-border-box bgc-f">
  3. <Nav title='营业资质'></Nav>
  4. <view class="scroll-view-css info-list box-border-box p-24 mb-20">
  5. <view class="card-box box-border-box p-24">
  6. <view class="mb-20 fw-600 fs-32">营业资质</view>
  7. <image @click="lookImg(shopsInfo.license_img)"
  8. :src="shopsInfo.license_img" mode="scaleToFill"></image>
  9. </view>
  10. <view class="card-box box-border-box p-24">
  11. <view class="mb-20 fw-600 fs-32">许可证</view>
  12. <image @click="lookImg(shopsInfo.food_license_img)"
  13. :src="shopsInfo.food_license_img" mode="scaleToFill"></image>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import tools from "@/service/tools";
  20. import {shopInfo} from "@/api/shop";
  21. export default {
  22. data(){
  23. return{
  24. shopId:'',
  25. shopsInfo:{
  26. license_img:'',
  27. food_license_img:'',
  28. }
  29. }
  30. },
  31. onLoad(data) {
  32. console.log(data)
  33. if(data.shopId){
  34. this.shopId=data.shopId
  35. this.getShopInfo()
  36. }else {
  37. tools.leftClick()
  38. }
  39. },
  40. mounted() {
  41. },
  42. methods:{
  43. getShopInfo() {
  44. const operate_id = uni.getStorageSync('operate_id')
  45. shopInfo({
  46. operate_id: operate_id,
  47. shop_id: this.shopId
  48. }).then((res) => {
  49. if (res.code == 1) {
  50. this.shopsInfo = res.data
  51. } else {
  52. tools.error(res.msg)
  53. setTimeout(() => {
  54. uni.navigateBack({
  55. delta: 1
  56. })
  57. }, 1500)
  58. }
  59. })
  60. },
  61. lookImg(i){
  62. tools.lookBigImg(i,[this.shopsInfo.license_img,this.shopsInfo.food_license_img])
  63. },
  64. },
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. .aptitude-index{
  69. .info-list{
  70. height: 100%;
  71. background-color: #F5F4F9;
  72. .card-box{
  73. width: 100%;
  74. min-height: 572rpx;
  75. background: #FFFFFF;
  76. border-radius: 20rpx;
  77. image{
  78. width: 100%;
  79. height: 460rpx;
  80. margin-bottom: 20rpx;
  81. }
  82. }
  83. }
  84. }
  85. </style>