index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div class="aboutThePark">
  3. <div class="whiteBoard">
  4. <div class="parkBgBox">
  5. <swiper :indicator-dots="false" circular style="height: 320rpx;position: relative" autoplay>
  6. <swiper-item v-for="item in briefImg">
  7. <img :src="item.url" class="testImg"/>
  8. </swiper-item>
  9. </swiper>
  10. </div>
  11. <!-- <img :src="briefImg.url" class="testImg">-->
  12. <div class="info" v-html="form.content">
  13. </div>
  14. </div>
  15. <div class="whiteBoard">
  16. <div class="detailLi">
  17. <span class="liName">
  18. <span class="callName">招商电话:</span>
  19. <span class="callNumber">{{ form.attractPhone }}</span>
  20. </span>
  21. <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon" @tap="call">
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. import { getByGroupId } from "../../../js_sdk/http";
  28. export default {
  29. name: "index",
  30. data(){
  31. return{
  32. briefImg: [],
  33. form:{
  34. }
  35. }
  36. },
  37. mounted(){
  38. this.getById()
  39. },
  40. onLoad(options){
  41. },
  42. methods:{
  43. getById(){
  44. const data = {
  45. groupId : JSON.parse(uni.getStorageSync('selectGroup')).groupId
  46. }
  47. getByGroupId(data).then((res)=>{
  48. this.form = res
  49. this.briefImg = JSON.parse(res.briefImg)
  50. console.log('this.briefImg',this.briefImg)
  51. })
  52. },
  53. call(){
  54. uni.makePhoneCall({
  55. phoneNumber: this.form.attractPhone, // 电话号码
  56. success: function () {
  57. console.log('拨打电话成功');
  58. },
  59. fail: function () {
  60. console.log('拨打电话失败');
  61. }
  62. });
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss">
  68. .aboutThePark{
  69. .whiteBoard{
  70. background: white;
  71. margin: 24rpx 0;
  72. padding: 24rpx;
  73. .testImg{
  74. width: 702rpx;
  75. height: 300rpx;
  76. }
  77. .info{
  78. color: #333333;
  79. font-size: 28rpx;
  80. line-height: 42rpx;
  81. margin: 24rpx 0;
  82. word-wrap: break-word;
  83. }
  84. .detailLi{
  85. display: flex;
  86. justify-content: space-between;
  87. align-items: center;
  88. .liInfo{
  89. display: inline-block;
  90. text-align: right;
  91. max-width: 428rpx;
  92. color: rgba(102, 102, 102, 1);
  93. font-size: 32rpx;
  94. line-height: 38rpx;
  95. overflow: hidden;
  96. word-wrap: break-word;
  97. }
  98. .callNumber{
  99. color: rgba(24, 23, 42, 1);
  100. font-size: 36rpx;
  101. font-weight: 600;
  102. }
  103. .callName{
  104. color: rgba(102, 102, 102, 1);
  105. font-size: 28rpx;
  106. }
  107. .phoneIcon{
  108. width: 64rpx;
  109. height: 64rpx;
  110. }
  111. }
  112. }
  113. }
  114. </style>