index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view class="content">
  3. <view class="share_message">
  4. <view class="share_message_title">每邀请一位好友入驻可得</view>
  5. <view class="share_message_content">60元优惠券</view>
  6. <view class="share_message_small">好友入驻也可获得60元优惠券</view>
  7. </view>
  8. <button open-type="share" class="share_now">立即邀请</button>
  9. <!-- 我的邀请 -->
  10. <view class="my_share">
  11. <view class="my_share_title">我的邀请</view>
  12. <view class="my_share_title_small">已获得 <text>{{allData.totalMoney}}</text> 元奖励,成功邀请 <text>{{allData.peopleNum}}</text> 位新朋友入</view>
  13. <view class="my_share_list" v-if="totalMoney !== 0">
  14. <view class="my_share_list_item clear" v-for="item,index in allData.arr" :key="index">
  15. <view class="my_share_lf"><image :src="item.img"></image></view>
  16. <view class="my_share_rg">
  17. <view class="my_share_rg_top clear">
  18. <view class="my_share_rg_name">{{item.nickName}}</view>
  19. <view class="my_share_rg_text">{{item.enterTime}}</view>
  20. </view>
  21. <view class="my_share_rg_top clear">
  22. <view class="my_share_rg_name" style="font-size:26rpx;">{{item.phone}}</view>
  23. <view class="my_share_rg_text">{{item.msg}}</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 查看更多 -->
  29. <view class="look_more" @tap="lookMore">查看更多</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import api from "../../../../../api.js";
  35. let app = getApp();
  36. export default {
  37. data() {
  38. return {
  39. allData:null,//页面所有数据
  40. }
  41. },
  42. onLoad() {
  43. this.getData();
  44. },
  45. onShareAppMessage(res){
  46. if(res.from === 'button'){
  47. // console.log(res)
  48. let token = app.globalData.token;
  49. return {
  50. title: '附近养车网',
  51. desc: '邀请好友入驻可得30元优惠券哦',
  52. path: '/pages/packageOne/service/serviceView/serviceView?token=' + token // 路径,传递参数到指定页面
  53. }
  54. }
  55. },
  56. methods: {
  57. //加载数据
  58. getData(){
  59. let data = {
  60. token:app.globalData.token
  61. }
  62. api.getUserMyShare(data).then((res)=>{
  63. console.log(res);
  64. this.allData = res.data.data;
  65. })
  66. },
  67. //查看更多
  68. lookMore(){
  69. uni.navigateTo({
  70. url:'../list/list'
  71. })
  72. }
  73. }
  74. }
  75. </script>
  76. <style>
  77. .clear:after{
  78. content: "";
  79. display: block;
  80. clear: both;
  81. }
  82. page{
  83. width:100%;
  84. height:100%;
  85. }
  86. .content{
  87. width:100%;
  88. height:100%;
  89. background:url('https://wx.fujinyangche.com/nvrnetwork/images/share_friend_back.png') no-repeat;
  90. background-size: 100% 100%;
  91. overflow: hidden;
  92. position: relative;
  93. overflow-y: scroll;
  94. }
  95. .back_image{
  96. width:100%;
  97. height:100%;
  98. }
  99. .active_rule{
  100. width:130rpx;
  101. height:44rpx;
  102. background:rgba(255,255,255,1);
  103. border-radius:22rpx;
  104. opacity:0.4;
  105. text-align: center;
  106. line-height: 44rpx;
  107. font-size: 24rpx;
  108. color:#EFC666;
  109. position: absolute;
  110. z-index:100;
  111. right:30rpx;
  112. top:30rpx;
  113. }
  114. .share_message{
  115. width:638rpx;
  116. height:656rpx;
  117. overflow: hidden;
  118. margin:108rpx auto 0;
  119. background:url('https://wx.fujinyangche.com/nvrnetwork/images/share.png') no-repeat;
  120. background-size: 100%,100%;
  121. }
  122. .share_message_title{
  123. font-size: 32rpx;
  124. color:#000000;
  125. text-align: center;
  126. margin-top:78rpx;
  127. }
  128. .share_message_content{
  129. font-size: 60rpx;
  130. color:#E5471F;
  131. font-weight: bold;
  132. text-align: center;
  133. margin-top:10rpx;
  134. }
  135. .share_message_small{
  136. font-size: 22rpx;
  137. color:#5A5A5A;
  138. text-align: center;
  139. font-weight: bold;
  140. margin-top:24rpx;
  141. }
  142. .share_now{
  143. width:640rpx;
  144. height:94rpx;
  145. background:linear-gradient(122deg,rgba(253,227,146,1) 0%,rgba(239,198,102,1) 100%);
  146. box-shadow:0px 16rpx 40rpx 0px rgba(158,6,0,0.29);
  147. border-radius:48rpx;
  148. text-align: center;
  149. line-height: 94rpx;
  150. font-size: 38rpx;
  151. color:#F02526;
  152. font-weight: bold;
  153. margin:28rpx auto 0;
  154. }
  155. .my_share{
  156. width:100%;
  157. margin-top:60rpx;
  158. padding-bottom: 100rpx;
  159. box-sizing:border-box;
  160. }
  161. .my_share_title{
  162. text-align: center;
  163. font-size: 30rpx;
  164. color:#EFC666;
  165. padding:0 32rpx;
  166. }
  167. .my_share_list{
  168. padding:0 56rpx;
  169. box-sizing: border-box;
  170. margin-bottom:50rpx;
  171. margin-top:50rpx;
  172. /* height:420rpx; */
  173. overflow: hidden;
  174. }
  175. .my_share_list_item{
  176. width:100%;
  177. margin-bottom: 50rpx;
  178. }
  179. .my_share_lf{
  180. float:left;
  181. width:106rpx;
  182. height:106rpx;
  183. }
  184. .my_share_lf image{
  185. display: block;
  186. width:100%;
  187. height:100%;
  188. border-radius: 50%;
  189. border:2rpx solid rgba(255,213,164,1);
  190. }
  191. .my_share_rg{
  192. width:calc(100% - 126rpx);
  193. float:left;
  194. height:106rpx;
  195. overflow: hidden;
  196. margin-left: 20rpx;
  197. }
  198. .my_share_rg_top{
  199. font-size: 26rpx;
  200. color:#EFC666;
  201. margin-top:8rpx;
  202. }
  203. .my_share_rg_name{
  204. float:left;
  205. font-size: 32rpx;
  206. }
  207. .my_share_rg_text{
  208. float:right;
  209. }
  210. .look_more{
  211. width:240rpx;
  212. height:60rpx;
  213. border-radius:6rpx;
  214. border:1px solid rgba(239,200,102,1);
  215. box-sizing: border-box;
  216. text-align: center;
  217. line-height: 60rpx;
  218. font-size: 24rpx;
  219. color:#EFC866;
  220. margin:10rpx auto 0;
  221. }
  222. .my_share_title_small{
  223. text-align: center;
  224. font-size: 20rpx;
  225. color:#C1C1C1;
  226. margin-top:10rpx;
  227. }
  228. .my_share_title_small text{
  229. color:#F6C552;
  230. }
  231. </style>