supplierDetails.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template name="supplier">
  2. <!-- 供应商信息 -->
  3. <view class="supplier clearfix">
  4. <view class="product-supplier" @click="goSupplier">
  5. <view class="logo"
  6. ><img
  7. :src="shopData.logo ? shopData.logo : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'"
  8. alt=""
  9. /></view>
  10. <view class="main">
  11. <view class="name">{{ shopData.name }}</view>
  12. <view class="massgs">
  13. <view class="label">满意度:</view>
  14. <view class="p-stars">
  15. <uni-stars
  16. :stars="6"
  17. :iconClass="iconClass"
  18. :iconColor="iconColor"
  19. :fontSize="36"
  20. :widthInfo="176"
  21. ></uni-stars>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="sup-msg massage-t">
  27. <view class="sup-conte">
  28. <view class="conte-l"> <text class="tit-l">经营范围:</text> </view>
  29. <view class="conte-r" v-if="shopData.businessScopeArr.length > 0">
  30. <text class="age" v-for="(item, idx) in shopData.businessScopeArr" :key="idx">{{ item }}</text>
  31. </view>
  32. <view class="conte-r" v-else> <text class="tit">暂无</text> </view>
  33. </view>
  34. </view>
  35. <view class="sup-msg massage-t">
  36. <view class="sup-h1"> <text class="line">公司介绍</text> </view>
  37. <view class="sup-p" :class="[shopData.info == null ? 'center' : '']">
  38. {{ shopData.info ? shopData.info : '暂无内容' }}
  39. </view>
  40. </view>
  41. <view class="sup-msg massage-t">
  42. <view class="sup-h1"> <text class="line">主打系列产品说明</text> </view>
  43. <view class="sup-p" :class="[shopData.productDesc == null ? 'center' : '']">
  44. {{ shopData.productDesc == null ? '暂无内容' : shopData.productDesc }}
  45. </view>
  46. </view>
  47. <view class="sup-msg massage-t" v-if="shopData.businessLicense != null">
  48. <view class="sup-h1"> <text class="line">营业执照</text> </view>
  49. <view class="sup-img">
  50. <image
  51. :src="shopData.businessLicense"
  52. mode="aspectFill"
  53. @click="previewImg(shopData.businessLicense)"
  54. ></image>
  55. </view>
  56. </view>
  57. <view class="sup-msg massage-t">
  58. <view class="sup-h1"> <text class="line">公司资质</text> </view>
  59. <view class="sup-imgList clearfix">
  60. <view class="img" v-if="shopData.medicalPracticeLicense != null"
  61. ><image
  62. :src="shopData.medicalPracticeLicense"
  63. @click="previewImg(shopData.medicalPracticeLicense)"
  64. ></image
  65. ></view>
  66. <view class="img" v-if="shopData.medicalPracticeLicenseImg1 != null"
  67. ><image
  68. :src="shopData.medicalPracticeLicenseImg1"
  69. @click="previewImg(shopData.medicalPracticeLicenseImg1)"
  70. ></image
  71. ></view>
  72. <view class="img" v-if="shopData.medicalPracticeLicenseImg2 != null"
  73. ><image
  74. :src="shopData.medicalPracticeLicenseImg2"
  75. @click="previewImg(shopData.medicalPracticeLicenseImg2)"
  76. ></image
  77. ></view>
  78. <view class="img" v-if="shopData.medicalPracticeLicenseImg3 != null"
  79. ><image
  80. :src="shopData.medicalPracticeLicenseImg3"
  81. @click="previewImg(shopData.medicalPracticeLicenseImg3)"
  82. ></image
  83. ></view>
  84. </view>
  85. </view>
  86. <view class="sup-msg massage-t" v-if="shopData.certificate != null">
  87. <view class="sup-h1"> <text class="line">授权牌照</text> </view>
  88. <view class="sup-img">
  89. <image :src="shopData.certificate" mode="aspectFill" @click="previewImg(shopData.certificate)"></image>
  90. </view>
  91. </view>
  92. </view>
  93. </template>
  94. <script>
  95. import uniGrader from '@/components/uni-grade/uni-grade.vue'
  96. export default {
  97. name: 'supplier',
  98. components: {
  99. uniGrader
  100. },
  101. props: {
  102. shopId: {
  103. type: Number
  104. }
  105. },
  106. data() {
  107. return {
  108. shopData: {},
  109. iconClass: 'icon-aixin',
  110. iconColor: '#ff9100'
  111. }
  112. },
  113. created() {
  114. this.GetSupplierHomeDeatils(this.shopId)
  115. },
  116. onLoad() {},
  117. methods: {
  118. previewImg(url) {
  119. let mentuzArray = []
  120. mentuzArray.push(url)
  121. uni.previewImage({
  122. urls: mentuzArray,
  123. current: 0
  124. })
  125. },
  126. GetSupplierHomeDeatils(shopId) {
  127. //供应商详情
  128. this.ShopService.GetSupplierHomeDeatils({ shopId: shopId })
  129. .then(response => {
  130. this.shopData = response.data
  131. console.log(this.shopData)
  132. })
  133. .catch(error => {
  134. this.$util.msg(error.msg, 2000)
  135. })
  136. }
  137. },
  138. onShow() {}
  139. }
  140. </script>
  141. <style lang="scss">
  142. page {
  143. background: #ffffff;
  144. }
  145. .supplier {
  146. width: 100%;
  147. .sup-msg {
  148. width: 100%;
  149. padding: 24rpx 0;
  150. .sup-h1 {
  151. height: 80rpx;
  152. line-height: 80rpx;
  153. font-size: $font-size-28;
  154. color: $text-color;
  155. text-align: left;
  156. font-weight: bold;
  157. .line {
  158. position: relative;
  159. }
  160. }
  161. }
  162. .product-supplier {
  163. width: 100%;
  164. height: 140rpx;
  165. padding: 30rpx 24rpx;
  166. box-sizing: border-box;
  167. background-color: #ffffff;
  168. position: relative;
  169. box-sizing: border-box;
  170. .logo {
  171. width: 128rpx;
  172. height: 92rpx;
  173. float: left;
  174. border: 1px solid #efefef;
  175. border-radius: 6rpx;
  176. image {
  177. width: 100%;
  178. height: 100%;
  179. display: block;
  180. border-radius: 6rpx;
  181. }
  182. }
  183. .main {
  184. width: 470rpx;
  185. height: 92rpx;
  186. float: left;
  187. margin-left: 20rpx;
  188. .name {
  189. width: 100%;
  190. line-height: 46rpx;
  191. float: left;
  192. font-size: $font-size-28;
  193. color: $text-color;
  194. float: right;
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. white-space: nowrap;
  198. text-align: left;
  199. }
  200. .massgs {
  201. width: 100%;
  202. line-height: 46rpx;
  203. float: left;
  204. font-size: $font-size-24;
  205. color: #999999;
  206. .label {
  207. float: left;
  208. }
  209. .p-stars {
  210. float: left;
  211. margin-left: 20rpx;
  212. }
  213. }
  214. }
  215. }
  216. .massage-t {
  217. width: 702rpx;
  218. padding: 0 24rpx;
  219. height: auto;
  220. background: #ffffff;
  221. .sup-title {
  222. width: 100%;
  223. height: 40rpx;
  224. margin-top: 24rpx;
  225. text-align: left;
  226. display: inline-block;
  227. line-height: 40rpx;
  228. font-size: $font-size-28;
  229. color: $text-color;
  230. .tit-l {
  231. width: 142rpx;
  232. display: inline-block;
  233. }
  234. }
  235. .sup-stars {
  236. width: 100%;
  237. height: 40rpx;
  238. margin-top: 24rpx;
  239. text-align: left;
  240. display: inline-block;
  241. line-height: 40rpx;
  242. font-size: $font-size-28;
  243. color: $text-color;
  244. .tit-l {
  245. width: 114rpx;
  246. display: inline-block;
  247. text-align: right;
  248. float: left;
  249. }
  250. .p-stars {
  251. float: left;
  252. margin-left: 22rpx;
  253. }
  254. }
  255. .sup-conte {
  256. width: 100%;
  257. margin-top: 24rpx;
  258. .conte-l {
  259. width: 100%;
  260. margin-bottom: 15rpx;
  261. .tit-l {
  262. text-align: left;
  263. display: inline-block;
  264. line-height: 40rpx;
  265. font-size: $font-size-28;
  266. color: $text-color;
  267. font-weight: bold;
  268. }
  269. }
  270. .conte-r {
  271. width: 100%;
  272. .age {
  273. display: inline-block;
  274. padding: 0 20rpx;
  275. background: #86b2fb;
  276. height: 42rpx;
  277. line-height: 42rpx;
  278. text-align: center;
  279. font-size: $font-size-24;
  280. color: #ffffff;
  281. border-radius: 6rpx;
  282. margin-right: 24rpx;
  283. margin-bottom: 24rpx;
  284. }
  285. .tit {
  286. font-size: $font-size-28;
  287. color: $text-color;
  288. line-height: 40rpx;
  289. }
  290. }
  291. }
  292. .sup-p {
  293. line-height: 48rpx;
  294. text-align: left;
  295. font-size: $font-size-28;
  296. color: #666666;
  297. text-indent: 40rpx;
  298. &.center {
  299. text-align: center;
  300. }
  301. }
  302. .sup-img {
  303. width: 100%;
  304. height: 542rpx;
  305. padding: 24rpx 0;
  306. image {
  307. width: 100%;
  308. height: 100%;
  309. display: block;
  310. }
  311. }
  312. .sup-imgList {
  313. width: 100%;
  314. height: auto;
  315. padding: 24rpx 0;
  316. .img {
  317. width: 340rpx;
  318. height: 260rpx;
  319. float: left;
  320. margin-right: 22rpx;
  321. margin-bottom: 22rpx;
  322. &:nth-child(even) {
  323. margin-right: 0;
  324. }
  325. image {
  326. width: 100%;
  327. height: 100%;
  328. display: block;
  329. }
  330. }
  331. }
  332. }
  333. }
  334. </style>