becomeMember.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="become-member-page">
  3. <view class="become-member">
  4. <view class="success-title">恭喜您</view>
  5. <view class="member-title">成为超级鲸会员</view>
  6. <view class="valid-date"></view>
  7. <!-- <view class="valid-date">有效期至:{{endTime}}</view> -->
  8. <view class="benefit-btn" @tap="goIndex">开始享受会员特权</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. var util = require('../../../utils/util.js');
  14. var api = require('../../../config/api');
  15. var user = require('../../../utils/user.js');
  16. var app = getApp();
  17. export default {
  18. data() {
  19. return {
  20. endTime: ''
  21. };
  22. }
  23. /**
  24. * 生命周期函数--监听页面加载
  25. */,
  26. onLoad: function (options) {
  27. // let endTime=options.endTime;
  28. // this.setData({
  29. // endTime:endTime
  30. // });
  31. },
  32. /**
  33. * 生命周期函数--监听页面初次渲染完成
  34. */
  35. onReady: function () {},
  36. /**
  37. * 生命周期函数--监听页面显示
  38. */
  39. onShow: function () {},
  40. /**
  41. * 生命周期函数--监听页面隐藏
  42. */
  43. onHide: function () {},
  44. /**
  45. * 生命周期函数--监听页面卸载
  46. */
  47. onUnload: function () {},
  48. /**
  49. * 页面相关事件处理函数--监听用户下拉动作
  50. */
  51. onPullDownRefresh: function () {},
  52. /**
  53. * 页面上拉触底事件的处理函数
  54. */
  55. onReachBottom: function () {},
  56. /**
  57. * 用户点击右上角分享
  58. */
  59. onShareAppMessage: function () {},
  60. methods: {
  61. goIndex() {
  62. util.request(
  63. api.getMemberInfo,
  64. {
  65. userId: app.globalData.userInfo.id
  66. },
  67. 'GET'
  68. ).then((res) => {
  69. if (res.errno === 0) {
  70. uni.setStorageSync('userInfo', res.data.userInfo);
  71. uni.switchTab({
  72. url: '/pages/index/index'
  73. });
  74. }
  75. });
  76. }
  77. }
  78. };
  79. </script>
  80. <style>
  81. .become-member-page {
  82. background: #1b1b1b;
  83. height: 100vh;
  84. padding: 188rpx 0 0;
  85. }
  86. .become-member {
  87. background: url('https://jzmall.lifejingzhi.com/file/jzmall/weixin/new/become-member-bg.png') no-repeat center top;
  88. background-size: 100%;
  89. width: 662rpx;
  90. height: 532rpx;
  91. margin: 0 auto;
  92. display: flex;
  93. flex-direction: column;
  94. align-items: center;
  95. padding: 60rpx 0 0;
  96. }
  97. .success-title {
  98. color: #5d3a11;
  99. font-size: 60rpx;
  100. height: 60rpx;
  101. line-height: 60rpx;
  102. font-weight: bold;
  103. background: linear-gradient(180deg, #f1e3c8 0%, #e6cc8c 100%);
  104. -webkit-background-clip: text;
  105. -webkit-text-fill-color: transparent;
  106. margin: 0 0 16rpx 0;
  107. }
  108. .member-title {
  109. color: #5d3a11;
  110. font-size: 60rpx;
  111. height: 60rpx;
  112. line-height: 60rpx;
  113. font-weight: bold;
  114. background: linear-gradient(180deg, #ebd09c 0%, #e6bd57 100%);
  115. -webkit-background-clip: text;
  116. -webkit-text-fill-color: transparent;
  117. }
  118. .valid-date {
  119. height: 26rpx;
  120. line-height: 26rpx;
  121. font-size: 26rpx;
  122. color: #5d3a11;
  123. background: linear-gradient(181deg, #ebd09c 0%, #e6c162 100%);
  124. -webkit-background-clip: text;
  125. -webkit-text-fill-color: transparent;
  126. margin: 36rpx 0 120rpx;
  127. }
  128. .benefit-btn {
  129. width: 384rpx;
  130. height: 76rpx;
  131. line-height: 76rpx;
  132. background: linear-gradient(181deg, #f1e3c8, #e6c162);
  133. border-radius: 38rpx;
  134. font-size: 32rpx;
  135. color: #5d3a11;
  136. font-weight: bold;
  137. text-align: center;
  138. }
  139. </style>