storeDetail.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view class="container-body">
  3. <view class="storebox x-bc">
  4. <view class="x-f" style="align-items: flex-start;">
  5. <image class="logo" :src="storeInfo.logoUrl" mode="aspectFill"></image>
  6. <view class="storebox-r" @click="goStoreDetail">
  7. <view class="storename ellipsis2">{{storeInfo.storeName}}</view>
  8. <view class="storedesc">24小时营业 月售{{storeInfo.salesCount|| 0}}</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="storeInfo title">基础信息</view>
  13. <view class="storeInfo-item x-bc">
  14. <view class="label">名称</view>
  15. <view class="val">{{storeInfo.fullName|| ''}}</view>
  16. </view>
  17. <view class="storeInfo-item x-bc">
  18. <view class="label">电话</view>
  19. <view class="val">{{storeInfo.sendPhone|| ''}}</view>
  20. </view>
  21. <view class="storeInfo-item x-bc">
  22. <view class="label">地址</view>
  23. <view class="val">{{storeInfo.address|| ''}}</view>
  24. </view>
  25. <view class="storeInfo title">资质信息</view>
  26. <view class="storeInfo-item x-bc">
  27. <view class="label">营业执照</view>
  28. <view class="val x-f">
  29. <u-image
  30. v-if="storeInfo.businessLicense"
  31. shape="square"
  32. lazyLoad
  33. :src="storeInfo.businessLicense"
  34. width="100%"
  35. mode="widthFix"
  36. radius="6"
  37. @click="previewImage('businessLicense')"
  38. ></u-image>
  39. <view v-else>暂未上传</view>
  40. </view>
  41. </view>
  42. <view class="storeInfo-item x-bc" v-if="storeInfo.medicalDevice2">
  43. <view class="label">2类器械生产备案</view>
  44. <view class="val x-f">
  45. <u-image
  46. v-if="storeInfo.medicalDevice2"
  47. shape="square"
  48. lazyLoad
  49. :src="storeInfo.medicalDevice2"
  50. width="100%"
  51. mode="widthFix"
  52. radius="6"
  53. @click="previewImage('medicalDevice2')"
  54. ></u-image>
  55. <view v-else>暂未上传</view>
  56. </view>
  57. </view>
  58. <view class="storeInfo-item x-bc" v-if="storeInfo.medicalDevice1">
  59. <view class="label">1类医疗器械备案</view>
  60. <view class="val x-f">
  61. <u-image
  62. v-if="storeInfo.medicalDevice1"
  63. shape="square"
  64. lazyLoad
  65. :src="storeInfo.medicalDevice1"
  66. width="100%"
  67. mode="widthFix"
  68. radius="6"
  69. @click="previewImage('medicalDevice1')"
  70. ></u-image>
  71. <view v-else>暂未上传</view>
  72. </view>
  73. </view>
  74. <view class="storeInfo-item x-bc" v-if="storeInfo.medicalDevice3">
  75. <view class="label">3类器械经营许可证</view>
  76. <view class="val x-f">
  77. <u-image
  78. v-if="storeInfo.medicalDevice3"
  79. shape="square"
  80. lazyLoad
  81. :src="storeInfo.medicalDevice3"
  82. width="100%"
  83. mode="widthFix"
  84. radius="6"
  85. @click="previewImage('medicalDevice3')"
  86. ></u-image>
  87. <view v-else>暂未上传</view>
  88. </view>
  89. </view>
  90. <view class="storeInfo-item x-bc" v-if="storeInfo.foodLicense">
  91. <view class="label">食品经营许可证</view>
  92. <view class="val x-f">
  93. <u-image
  94. v-if="storeInfo.foodLicense"
  95. shape="square"
  96. lazyLoad
  97. :src="storeInfo.foodLicense"
  98. width="100%"
  99. mode="widthFix"
  100. radius="6"
  101. @click="previewImage('foodLicense')"
  102. ></u-image>
  103. <view v-else>暂未上传</view>
  104. </view>
  105. </view>
  106. <view class="storeInfo-item x-bc" v-if="storeInfo.medicalLicense">
  107. <view class="label">医疗机构执业许可证</view>
  108. <view class="val x-f">
  109. <u-image
  110. v-if="storeInfo.medicalLicense"
  111. shape="square"
  112. lazyLoad
  113. :src="storeInfo.medicalLicense"
  114. width="100%"
  115. mode="widthFix"
  116. radius="6"
  117. @click="previewImage('medicalLicense')"
  118. ></u-image>
  119. <view v-else>暂未上传</view>
  120. </view>
  121. </view>
  122. </view>
  123. </template>
  124. <script>
  125. import {storeDetail} from '@/api/index.js'
  126. export default {
  127. data() {
  128. return {
  129. storeId:'',
  130. storeInfo: {},
  131. }
  132. },
  133. onLoad(option) {
  134. this.storeId = option.storeId
  135. this.getStoreInfo()
  136. },
  137. methods: {
  138. getStoreInfo() {
  139. storeDetail(this.storeId).then(res=>{
  140. if(res.code==200) {
  141. this.storeInfo =res.data || {}
  142. }
  143. })
  144. },
  145. previewImage(type) {
  146. uni.previewImage({
  147. current: 0,
  148. urls: [this.storeInfo[type]]
  149. });
  150. },
  151. }
  152. }
  153. </script>
  154. <style>
  155. page {
  156. background-color: #fff;
  157. }
  158. </style>
  159. <style scoped lang="scss">
  160. .container-body {
  161. padding: 0 32rpx;
  162. font-family: PingFang SC, PingFang SC;
  163. font-weight: 400;
  164. font-size: 28rpx;
  165. color: #939599;
  166. }
  167. .businessLicense {
  168. height: 80rpx;
  169. width: 80rpx;
  170. border-radius: 8rpx;
  171. }
  172. .storeInfo {
  173. &-item {
  174. padding: 6rpx 0;
  175. .label {
  176. color: #222;
  177. }
  178. }
  179. }
  180. .title {
  181. font-family: PingFang SC, PingFang SC;
  182. font-weight: 600;
  183. font-size: 30rpx;
  184. color: #222222;
  185. padding: 24rpx 0;
  186. }
  187. .storebox {
  188. padding: 26rpx 0;
  189. font-family: PingFang SC, PingFang SC;
  190. color: #222;
  191. .logo {
  192. width: 150rpx;
  193. height: 150rpx;
  194. background: #222;
  195. border-radius: 16rpx 16rpx 16rpx 16rpx;
  196. margin-right: 26rpx;
  197. }
  198. .storename {
  199. font-weight: 500;
  200. font-size: 32rpx;
  201. }
  202. .storedesc {
  203. margin-top: 12rpx;
  204. font-weight: 400;
  205. font-size: 22rpx;
  206. }
  207. .storebox-r {
  208. flex: 1;
  209. overflow: hidden;
  210. }
  211. }
  212. </style>