123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template>
- <!-- 成长值 -->
- <view class="">
- <view style="background-color: $color-white !important;">
- <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle" back-icon-color="#fff" title-color="#fff"
- :background="background" title-width="300" :title="i18n('getGrowList')"></u-navbar>
- </view>
- <uni-list v-for="(listDetail,index) in growDetails" :key="index">
- <uni-list-item :title="$i18n.locale=='zh'?listDetail.title:listDetail.titleEn"
- :note="listDetail.createDate|time('YYYY-MM-DD HH:mm:ss')" :rightText="`+${listDetail.growth}`" />
- </uni-list>
- <view v-show="growDetails==null">
- <view class="text-title">{{$i18n.locale=='zh'?'暂无记录':'No record'}}......</view>
- </view>
- </view>
- </template>
- <script>
- import moment from 'moment'
- export default {
- components: {
- moment
- },
- data() {
- return {
- background: {
- backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
- },
- backStyle: {
- color: '#FFFFFF',
- },
- growDetails: [],
- // page: 1,
- // flag: false,
- };
- },
- onShow() {
- this.getGrowDetail();
- },
- filters: {
- twoDecimal(value) {
- return parseFloat(string(value)).toFixed(2);
- },
- time(data, type) {
- return moment(data).format(type);
- }
- },
- methods: {
- i18n(data) {
- return this.$t('common.' + data);
- },
- async getGrowDetail() {
- const res = await this.$myRequest({
- url: '/uc/umsUserGrowthDetailss/getGrowthDetailsPage',
- data: {
- }
- });
- // console.log(res, '--------------------------');
- if (res.data) {
- this.growDetails = res.data.umsUserGrowthDetailss
- } else {
- this.growDetails = {}
- }
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .text-title {
- width: 92%;
- margin-left: 4%;
- text-align: center;
- margin-top: 20rpx;
- font-size: 32rpx;
- color: #b0b0b0;
- }
- </style>
|