mall-laonong/pagesB/integral-rule/integral-rule.vue

51 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view v-if="isLoading">
<status-nav :ifReturn="true" navBarTitle="积分规则" :marginBottom="0"></status-nav>
<!-- 内容 -->
<view class="disclaimers border-box" :style="{'min-height':disclaimersHeight}">
<view class="disclaimers-txt font24 color-8c">
<view class="txt">{{integral_rule.deduction_points_score}}积分可抵扣{{integral_rule.deduction_points_score_value}}</view>
<view class="txt">每下单{{integral_rule.place_order_score}}可获得{{integral_rule.place_order_score_value}}积分</view>
</view>
</view>
</view>
</template>
<script>
import {mapState} from 'vuex'//引入mapState
export default {
data() {
return {
disclaimersHeight: `calc(100vh - ${uni.getSystemInfoSync().statusBarHeight + 50}px)`,
integral_rule:{},
isLoading:false,
}
},
onLoad(op) {
// 查询积分明细
this.getDisclaimers();
},
methods: {
// 查询积分明细
getDisclaimers(){
uni.showLoading({
title:'加载中'
});
this.$requst.get('/api/user/integral-rule').then(res=>{
if(res.code==0){
this.integral_rule = res.data;
} else {
this.$toolAll.tools.showToast(res.msg);
}
uni.hideLoading();
this.isLoading =true;
})
}
}
}
</script>
<style>
</style>