product_detail.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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(
  36. ids / 1000
  37. )}/${ids}.html`,
  38. method: "GET",
  39. header: {
  40. "content-type": "application/x-www-form-urlencoded",
  41. },
  42. success: (res) => {
  43. if (res.statusCode === 200) {
  44. this.company = res.data;
  45. }
  46. },
  47. fail: () => {
  48. console.log("连接失败");
  49. },
  50. });
  51. },
  52. },
  53. };
  54. </script>
  55. <style lang="scss">
  56. .content {
  57. padding: 4%;
  58. font-size: 30rpx;
  59. .title {
  60. display: flex;
  61. align-items: center;
  62. border-radius: 10rpx;
  63. margin-bottom: 50rpx;
  64. box-shadow: rgba(0, 0, 0, 0.35) 0rpx 5rpx 15rpx;
  65. .logo {
  66. image {
  67. width: 200rpx;
  68. height: 100rpx;
  69. margin: 0 30rpx;
  70. }
  71. }
  72. }
  73. }
  74. </style>