product_detail.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="content">
  3. <!--<div class="title">
  4. <div class="logo">
  5. <img :src="company.logo" alt="" />
  6. </div>
  7. <div class="name">
  8. {{ company.name }}
  9. </div>
  10. </div> -->
  11. <div class="fwb" v-html="company"></div>
  12. <!-- <div style="width: 100%">
  13. <footer-share
  14. style="width: 100%"
  15. :isCollection="true"
  16. @collectionPages="collectionPage"
  17. @sharePages="sharePage"
  18. ></footer-share>
  19. </div> -->
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. onLoad(option) {
  25. this.getRich(option.id);
  26. },
  27. data() {
  28. return {
  29. company:'',
  30. }
  31. },
  32. methods:{
  33. getRich(ids) {
  34. uni.request({
  35. url: `https://kiq.xazhima.com/content/company_product/${Math.floor(ids / 1000)}/${ids}.html`,
  36. method: "GET",
  37. header: {
  38. "content-type": "application/x-www-form-urlencoded",
  39. },
  40. success: (res) => {
  41. if (res.statusCode === 200) {
  42. this.company = res.data;
  43. }
  44. },
  45. fail: () => {
  46. console.log("连接失败");
  47. },
  48. });
  49. },
  50. }
  51. };
  52. </script>
  53. <style lang="scss">
  54. .content {
  55. padding: 4%;
  56. font-size: 30rpx;
  57. .title {
  58. display: flex;
  59. align-items: center;
  60. border-radius: 10rpx;
  61. margin-bottom: 50rpx;
  62. box-shadow: rgba(0, 0, 0, 0.35) 0rpx 5rpx 15rpx;
  63. .logo {
  64. image {
  65. width: 200rpx;
  66. height: 100rpx;
  67. margin: 0 30rpx;
  68. }
  69. }
  70. }
  71. }
  72. </style>