product_detail.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div class="content">
  3. <div class="title">
  4. <div class="logo">
  5. <img :src="logo" alt="" />
  6. </div>
  7. <div class="name">
  8. {{ 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. logo:getApp().globalData.company_logo,
  31. name:getApp().globalData.company_name
  32. };
  33. },
  34. methods: {
  35. getRich(ids) {
  36. uni.request({
  37. url: `https://kiq.xazhima.com/content/company_product/${Math.floor(
  38. ids / 1000
  39. )}/${ids}.html`,
  40. method: "GET",
  41. header: {
  42. "content-type": "application/x-www-form-urlencoded",
  43. },
  44. success: (res) => {
  45. if (res.statusCode === 200) {
  46. this.company = res.data;
  47. }
  48. },
  49. fail: () => {
  50. console.log("连接失败");
  51. },
  52. });
  53. },
  54. },
  55. };
  56. </script>
  57. <style lang="scss">
  58. .content {
  59. padding: 4%;
  60. font-size: 30rpx;
  61. .title {
  62. display: flex;
  63. align-items: center;
  64. border-radius: 10rpx;
  65. margin-bottom: 50rpx;
  66. box-shadow: rgba(0, 0, 0, 0.35) 0rpx 5rpx 15rpx;
  67. .logo {
  68. image {
  69. width: 200rpx;
  70. height: 100rpx;
  71. margin: 0 30rpx;
  72. }
  73. }
  74. }
  75. }
  76. </style>