shareCardPage.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <view class="share_body">
  3. <view class="share_card_info">
  4. <view class="share_title">
  5. <image class="title" src="../../static/icons/icon_share_title.png" mode=""></image>
  6. <image @click="back" class="close" src="../../static/icons/icon_close_share.png" mode=""></image>
  7. </view>
  8. <view class="share_desc">
  9. 项目背靠景区,在售建面约132-161㎡国风合院,均价20000元/㎡;建面约95㎡洋房…
  10. </view>
  11. <view class="share_copy">
  12. <image class="icon_share_copy" src="../../static/icons/icon_copy.png" mode=""></image>
  13. <text class="share_txt">复制发圈</text>
  14. </view>
  15. <image class="shareCard" :src="shareUrl" mode=""></image>
  16. </view>
  17. <view class="share_copy_txt">
  18. 长按图片保存至本地
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. shareUrl:"",
  27. type:"",
  28. projectId:"",
  29. page:"",
  30. };
  31. },
  32. created() {
  33. },
  34. onLoad(param) {
  35. this.page = param.page;
  36. this.projectId =param.projectId;
  37. this.type=param.type;
  38. this.getShareCard();
  39. },
  40. methods:{
  41. async getShareCard(){
  42. let ret = await this.$myRequest({
  43. url: "/share/shareCard",
  44. data: {
  45. "page": this.page,
  46. "projectId": this.projectId,
  47. "type":this.type
  48. }
  49. })
  50. if (ret.data.success) {
  51. this.shareUrl = ret.data.single
  52. }
  53. },
  54. back(){
  55. uni.reLaunch({
  56. url:"../homePage/homePage"
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .share_body{
  64. display: flex;
  65. flex-direction: column;
  66. justify-content: center;
  67. align-items: center;
  68. width: 100%;
  69. background: #4e4e4e;
  70. height: 100vh;
  71. }
  72. .share_card_info{
  73. width: 550rpx;
  74. display: flex;
  75. flex-direction: column;
  76. align-items: center;
  77. background-color: #FFFFFF;
  78. border-radius: 10rpx;
  79. .share_title{
  80. width: 100%;
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. margin-top: 30rpx;
  85. position: relative;
  86. .title{
  87. width: 292rpx;
  88. height: 34rpx;
  89. }
  90. .close{
  91. width: 24rpx;
  92. height: 24rpx;
  93. position: absolute;
  94. right: 20rpx;
  95. top: 5rpx;
  96. }
  97. }
  98. .share_desc{
  99. font-size: 24rpx;
  100. font-family: Verdana, Verdana-Regular;
  101. font-weight: 400;
  102. text-align: left;
  103. color: #7f7f7f;
  104. margin-top: 22rpx;
  105. padding-left: 30rpx;
  106. padding-right: 30rpx;
  107. }
  108. .share_copy{
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. margin-top: 12rpx;
  113. .icon_share_copy{
  114. width: 24rpx;
  115. height: 24rpx;
  116. }
  117. .share_txt{
  118. font-size: 24rpx;
  119. font-family: Verdana, Verdana-Regular;
  120. font-weight: 400;
  121. text-align: left;
  122. color: #2c2c2c;
  123. margin-left: 6rpx;
  124. }
  125. }
  126. .shareCard{
  127. width: 490rpx;
  128. height: 872rpx;
  129. margin-top: 10rpx;
  130. margin-bottom: 30rpx;
  131. }
  132. }
  133. .share_copy_txt{
  134. font-size: 28rpx;
  135. font-family: Verdana, Verdana-Regular;
  136. font-weight: 400;
  137. text-align: center;
  138. color: #ffffff;
  139. margin-top: 40rpx;
  140. }
  141. </style>