diff --git a/gasStation-uni/pagesMy/invite/details.vue b/gasStation-uni/pagesMy/invite/details.vue index 5252d5c47..82e9bc48e 100644 --- a/gasStation-uni/pagesMy/invite/details.vue +++ b/gasStation-uni/pagesMy/invite/details.vue @@ -3,44 +3,44 @@ 活动名称 - - 推荐会员消费有礼 + + {{activeInfo.name}} 活动时间 - + 长期有效 推荐人等级 - - 普通会员、白金会员 + + {{activeInfo.userGradeName}} 支付方式 - + 微信、支付宝、云闪付、现金、pos刷卡 赠送优惠券 - + 50元优惠券 赠送积分 - - 20分 + + {{activeInfo.points || 0}}分 赠送成长值 - - 2成长值 + + {{activeInfo.growaValue || 0}}成长值 @@ -57,10 +57,9 @@ pageNo: 1, pageSize: 10, totalPage: '', - + activeInfo: {} } }, - onLoad() {}, onPullDownRefresh() { //下拉刷新 uni.stopPullDownRefresh() @@ -73,11 +72,28 @@ this.pageNo++ } }, - + onLoad() {}, + onShow() { + this.getInfo() + }, components: { }, methods: { + getInfo() { + request({ + url: '/business/marketingActivity/activeApplet/getRecommendedByStoreId', + method: 'get', + params: { + storeId: uni.getStorageSync("storeId") + } + }).then(res => { + console.log(res, 319) + if (res.code == 200) { + this.activeInfo = res.data + } + }) + }, goback() { uni.navigateBack() } diff --git a/gasStation-uni/pagesMy/invite/invite.vue b/gasStation-uni/pagesMy/invite/invite.vue index ab0b21344..40e6aef41 100644 --- a/gasStation-uni/pagesMy/invite/invite.vue +++ b/gasStation-uni/pagesMy/invite/invite.vue @@ -10,7 +10,7 @@ - + 分享二维码 @@ -25,15 +25,18 @@ 推荐会员消费有礼 - + 详情 - - 赠送优惠券 - 50元优惠券 + + + 赠送优惠券 + {{item.giftCardName}} + + 会员卡详情 @@ -41,7 +44,7 @@ 特权说明 - 加油立享优惠 + {{activeInfo.discountActiveDescribe}} 有效期 @@ -92,7 +95,7 @@ - + @@ -101,7 +104,7 @@ - + @@ -130,6 +133,7 @@ storeId: '' }, allAmount: 0.0, + activeInfo: {}, activeRecommendRecordsList: [], title: '', userId: '', @@ -165,6 +169,11 @@ // console.log(codes); // this.query.storeId = uni.getStorageSync("storeId"); }, + onShow() { + this.getAllAmount(); + this.getActiveRecommendRecords(); + this.getAddress(uni.getStorageSync("storeId")) + }, onShareAppMessage(res) { if (res.from === 'button') { // 来自页面内分享按钮 console.log(res.target) @@ -219,12 +228,44 @@ } }, - onShow() { - this.getAllAmount(); - this.getActiveRecommendRecords(); - this.getAddress(uni.getStorageSync("storeId")) - }, methods: { + // 复制链接 + copyLink() { + const link = this.options.code; + uni.setClipboardData({ + data: link, + success: () => { + uni.showToast({ + title: '链接已复制', + icon: 'success', + duration: 2000 + }); + }, + fail: () => { + uni.showToast({ + title: '复制失败', + icon: 'none' + }); + } + }); + }, + // 下载图片 + savePicture() { + console.log(230); + // 下载图片 + uni.downloadFile({ + url: 'https://www.example.com/file/test', //仅为示例,并非真实的资源 + success: (res) => { + if (res.statusCode === 200) { + console.log('下载成功'); + } + }, + fail: (err) => { + console.log(err, 240); + } + }); + }, + // 去导航 goGoGo() { let lat = Number(this.lat) let lon = Number(this.lon) @@ -311,13 +352,15 @@ }, getAllAmount() { request({ - url: 'business/marketingActivity/activeRecommendRecords/selectAllAmount', + url: '/business/marketingActivity/activeApplet/getRecommendedByStoreId', method: 'get', - params: this.query + params: { + storeId: uni.getStorageSync("storeId") + } }).then(res => { - console.log(res) + console.log(res, 319) if (res.code == 200) { - this.allAmount = res.data + this.activeInfo = res.data } }) }, @@ -603,6 +646,12 @@ margin: 15px auto; } + .d-s1 { + display: flex; + align-items: center; + justify-content: center; + } + .backf { background: #fff; width: 95%;