supplierDetails.vue 7.3 KB

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