receivedCard.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <template>
  2. <view class="container">
  3. <image style="height: 332rpx; width: 750rpx" src="https://jzmall.lifejingzhi.com/file/jzmall/weixin/memberCard-1229/member-received.png" mode="aspectFit"></image>
  4. <view class="first-buy-title" style="margin-bottom: 24rpx">
  5. <view>会员特惠</view>
  6. <view class="remark">领券后可再减</view>
  7. </view>
  8. <view class="good-list">
  9. <view class="good-item" v-for="(item, index) in imgList1" :key="index">
  10. <!-- url="/pages/goods/goods?id={{item.id}}" -->
  11. <navigator :url="item.link">
  12. <image class="good-img" :src="item.url" background-size="cover"></image>
  13. </navigator>
  14. </view>
  15. </view>
  16. <view class="first-buy-title" style="margin: 0rpx 0 36rpx">
  17. <view>会员活动</view>
  18. </view>
  19. <view class="banner-item" v-for="(item, index) in imgList2" :key="index">
  20. <navigator :url="item.link">
  21. <image class="banner-img" :src="item.url" background-size="cover"></image>
  22. </navigator>
  23. </view>
  24. <image
  25. style="height: 370rpx; width: 706rpx; margin: 0 auto"
  26. src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/member/add_qw.png"
  27. mode="aspectFit"
  28. :show-menu-by-longpress="true"
  29. ></image>
  30. <!-- <view class="recevie">
  31. <image class="arvator" src="{{avatarUrl}}"></image>
  32. <view class="content">
  33. <text class="name">好友「{{userName}}」</text>
  34. <text class="gift">送你价值199元超级鲸会员年卡</text>
  35. <image mode="widthFix" src="https://6a7a-jzmall-3gi3t6y452ddb0ff-1306484940.tcb.qcloud.la/member/received.png"></image>
  36. <view class="btn" bindtap="goIndex">立即下单 </view>
  37. <view class="des">你可以在鲸致生活小程序“我的-超级鲸会员”中查看</view>
  38. </view>
  39. </view> -->
  40. <!-- <view style="margin: 30rpx auto;display: flex;justify-content: center">
  41. <view style="width:400rpx">
  42. <cell bind:startmessage='startmessage' bind:completemessage="completemessage" plugid='{{plugid}}' />
  43. </view>
  44. </view> -->
  45. <!-- <view class="bottom">
  46. <text class="salgon">家政用鲸致,生活有品质</text>
  47. <text>在线点 · 鲸致到家 | 好服务送好友</text>
  48. </view> -->
  49. </view>
  50. </template>
  51. <script>
  52. var util = require('../../../../utils/util.js');
  53. var api = require('../../../../config/api');
  54. var user = require('../../../../utils/user.js');
  55. var app = getApp();
  56. export default {
  57. components: {},
  58. data() {
  59. return {
  60. rId: 0,
  61. userName: '',
  62. avatarUrl: '/static/images/member/get.png',
  63. plugid: '0775f898abc4d932f5e9a2f2b8f88bcb',
  64. //企微id
  65. imgList1: [],
  66. imgList2: []
  67. };
  68. },
  69. /**
  70. * 生命周期函数--监听页面加载
  71. */
  72. onLoad: function (options) {
  73. let rid = options.rId;
  74. if (rid) {
  75. this.setData({
  76. rId: rid
  77. });
  78. }
  79. this.getReferee();
  80. this.getMemberAd();
  81. },
  82. /**
  83. * 生命周期函数--监听页面初次渲染完成
  84. */
  85. onReady: function () {},
  86. /**
  87. * 生命周期函数--监听页面显示
  88. */
  89. onShow: function () {},
  90. /**
  91. * 生命周期函数--监听页面隐藏
  92. */
  93. onHide: function () {},
  94. /**
  95. * 生命周期函数--监听页面卸载
  96. */
  97. onUnload: function () {},
  98. /**
  99. * 页面相关事件处理函数--监听用户下拉动作
  100. */
  101. onPullDownRefresh: function () {},
  102. /**
  103. * 页面上拉触底事件的处理函数
  104. */
  105. onReachBottom: function () {},
  106. /**
  107. * 用户点击右上角分享
  108. */
  109. onShareAppMessage: function () {},
  110. methods: {
  111. goIndex() {
  112. uni.switchTab({
  113. url: '/pages/index/index'
  114. });
  115. },
  116. getReferee() {
  117. util.request(
  118. api.ReferrerRidInfo,
  119. {
  120. rId: this.rId
  121. },
  122. 'GET'
  123. ).then((res) => {
  124. if (res.errno == 0) {
  125. this.setData({
  126. userName: res.data.applyName,
  127. avatarUrl: res.data.avatar
  128. });
  129. app.globalData.recommend = {
  130. userName: res.data.applyName,
  131. avatarUrl: res.data.avatar
  132. };
  133. } else {
  134. util.showErrorToast(res.errmsg);
  135. }
  136. });
  137. },
  138. getMemberAd() {
  139. util.request(api.GetMemberAd, {}, 'GET').then((res) => {
  140. if (res.errno === 0) {
  141. this.setData({
  142. imgList1: res.data.firstPurchase,
  143. imgList2: res.data.memberActivity
  144. });
  145. }
  146. });
  147. }
  148. }
  149. };
  150. </script>
  151. <style>
  152. page {
  153. height: 100%;
  154. width: 100%;
  155. /* background: rgba(255, 216, 174, 1); */
  156. }
  157. .container {
  158. text-align: center;
  159. padding-bottom: 80rpx;
  160. /* margin: 20rpx; */
  161. }
  162. .first-buy-title {
  163. height: 34px;
  164. line-height: 34rpx;
  165. padding: 0 34rpx;
  166. display: flex;
  167. align-items: flex-end;
  168. font-size: 34rpx;
  169. font-weight: bold;
  170. }
  171. .first-buy-title .remark {
  172. margin-left: 16rpx;
  173. font-size: 20rpx;
  174. font-weight: normal;
  175. }
  176. .good-list {
  177. padding: 0 20rpx;
  178. display: flex;
  179. justify-content: space-between;
  180. flex-wrap: wrap;
  181. }
  182. .good-item {
  183. margin-bottom: 10rpx;
  184. }
  185. .good-img {
  186. width: 350rpx;
  187. height: 224rpx;
  188. }
  189. .banner-item {
  190. margin-bottom: 10rpx;
  191. }
  192. .banner-img {
  193. width: 712rpx;
  194. height: 190rpx;
  195. margin: 0 auto;
  196. }
  197. .arvator {
  198. width: 180rpx;
  199. height: 180rpx;
  200. border-radius: 50%;
  201. margin-top: -80rpx;
  202. }
  203. .recevie {
  204. margin: 0 50rpx;
  205. margin-top: 120rpx;
  206. background: #ffffff;
  207. border-radius: 40px;
  208. }
  209. .content {
  210. display: flex;
  211. flex-direction: column;
  212. }
  213. .name {
  214. font-size: 18px;
  215. font-weight: 400;
  216. color: #333;
  217. }
  218. .gift {
  219. height: 39px;
  220. font-size: 22px;
  221. font-weight: 400;
  222. color: #333;
  223. margin: 10rpx;
  224. }
  225. .content image {
  226. width: 360rpx;
  227. margin: 0 auto;
  228. }
  229. .btn {
  230. width: 302px;
  231. height: 45px;
  232. background: rgba(182, 117, 86, 1);
  233. border-radius: 22.5px;
  234. margin: 0 auto;
  235. line-height: 45px;
  236. font-size: 32rpx;
  237. font-size: 36rpx;
  238. color: #fff;
  239. margin-bottom: 20rpx;
  240. }
  241. .des {
  242. margin-bottom: 50rpx;
  243. color: rgba(171, 171, 171, 1);
  244. }
  245. .title {
  246. font-size: 30px;
  247. line-height: 39rpx;
  248. font-weight: 400;
  249. color: #b67556;
  250. margin: 20rpx 0rpx;
  251. }
  252. .txt {
  253. font-size: 15px;
  254. font-weight: 400;
  255. color: rgba(46, 46, 46, 1);
  256. margin: 30rpx;
  257. }
  258. .bottom {
  259. position: fixed;
  260. bottom: 20rpx;
  261. /* z-index: -1; */
  262. /* bottom: 0rpx; */
  263. width: 100%;
  264. height: 180rpx;
  265. /* background: #EECFB1; */
  266. text-align: center;
  267. padding-top: 20rpx;
  268. display: flex;
  269. flex-direction: column;
  270. }
  271. .salgon {
  272. height: 34px;
  273. font-size: 30px;
  274. font-weight: 600;
  275. color: #b67556;
  276. line-height: 42px;
  277. }
  278. .bottom text {
  279. height: 80rpx;
  280. line-height: 80rpx;
  281. color: rgba(182, 117, 86, 1);
  282. }
  283. </style>