小程序端推荐有礼

This commit is contained in:
齐天大圣 2023-12-21 17:50:14 +08:00
parent 536614d596
commit dbf7d7a72a

View File

@ -14,11 +14,11 @@
<view class="hbbox"> <view class="hbbox">
<view class="h-box"> <view class="h-box">
<view class="or-box"> <view class="or-box">
<view class="max-size">120.00</view> <view class="max-size">{{allAmount}}</view>
<view class="min-size">优惠券总额</view> <view class="min-size">优惠券总额</view>
</view> </view>
<view class="or-box"> <view class="or-box">
<view class="max-size">3</view> <view class="max-size">{{this.activeRecommendRecordsList.length}}</view>
<view class="min-size">邀请人数</view> <view class="min-size">邀请人数</view>
</view> </view>
</view> </view>
@ -41,18 +41,21 @@
<view class="bai-top"> <view class="bai-top">
邀请记录 邀请记录
</view> </view>
<view class="t-box" v-for="(item,index) in 3" :key="index"> <view class="t-box" v-for="(item,index) in activeRecommendRecordsList" :key="index">
<view class="diss"> <view class="diss">
<view class="touxiang"> <view class="touxiang">
<image src="../../static/imgs/myx.png" mode=""></image> <image src="../../static/imgs/myx.png" mode=""></image>
</view> </view>
<view class=""> <view class="">
<view class="name-t">泸沽寻梦</view> <view class="name-t">{{item.inviteeUserName}}</view>
<view class="h-size">2023-11-02</view> <!-- <view class="h-size"></view> -->
</view> </view>
</view> </view>
<view class="hong-size"> <!-- <view class="hong-size">
+100 +100
</view> -->
<view class="hong-size">
{{item.createTime}}
</view> </view>
</view> </view>
</view> </view>
@ -62,9 +65,12 @@
</template> </template>
<script> <script>
import request from "../../utils/request";
export default { export default {
data() { data() {
return { return {
allAmount: 0.0,
activeRecommendRecordsList: [],
title: '', title: '',
@ -73,8 +79,34 @@
components: { components: {
},
onShow() {
this.getAllAmount();
this.getActiveRecommendRecords();
}, },
methods: { methods: {
getAllAmount() {
request({
url: 'business/marketingActivity/activeRecommendRecords/selectAllAmount',
method: 'get',
}).then(res => {
console.log(res)
if (res.code == 200) {
this.allAmount = res.data
}
})
},
getActiveRecommendRecords() {
request({
url: 'business/marketingActivity/activeRecommendRecords',
method: 'get',
}).then(res => {
console.log(res)
if (res.code == 200) {
this.activeRecommendRecordsList = res.data.records
}
})
},
goback() { goback() {
uni.navigateBack() uni.navigateBack()
} }
@ -280,4 +312,4 @@
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
</style> </style>