123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <view class="page">
- <view class="topBody">
- <view class="header">
- </view>
- <view class="myinfo">
- <view class="line"></view>
- <view class="numlist" v-if="type == 'GMM'">
- <view class="left">
- <view class="num">
- <text>{{num}}</text>
- <view class="name">{{$t('txt.M币数量')}}</view>
- </view>
- </view>
- <view class="right">
- <view class="buyBtn" @click="goPage('/pages/my/M_purchase')">
- <text>{{$t('txt.立即充值')}}</text>
- </view>
- </view>
- <image class="icon" src="../../static/me/M_coin_bg1.png" mode="heightFix" />
- </view>
- <view style="padding-top: 20rpx;margin-left: 40rpx;">
- <text style="color:#FFFFFF;font-size: 32rpx;">{{$t('txt.进出明细')}}</text>
- </view>
- <view class="mingxiList" v-if="false">
- <view class="left">
- <text style="font-size: 28rpx;color: #999999;">{{$t('txt.明细类型')}}</text>
- <image class="icon" src="../../static/me/arrow_down_gray.png" mode="heightFix" />
- </view>
- <view class="right">
- <text style="font-size: 28rpx;color: #999999;">{{$t('txt.开始时间-结束时间')}}</text>
- <image class="icon" src="../../static/me/arrow_down_gray.png" mode="heightFix" />
- </view>
- </view>
- <view class="numlist2">
- <view class="item" v-for="(item, index) in list" :key="index">
- <view class="left">
- <view class="num">
- <text>{{ $t(item.name) }}</text>
- <view class="data">{{item.create_time}}</view>
- </view>
- </view>
- <view class="right">
- <view v-if="item.num>0" class="num1">
- <text>+{{ item.num }}</text>
- </view>
- <view v-else class="num1 num2">
- <text>-{{ item.num }}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="no-content" v-if="hasNo">
- <image class="icon" mode="widthFix" src="../../static/home/no.png"></image>
- <text>还没有消息</text>
- </view>
- </view>
- <view class="blankHeight"></view>
- </view>
- <!-- 提示框 -->
- <DialogBox ref="DialogBox"></DialogBox>
- </view>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- type: 'GMM',
- num: '0',
- sel: 1,
- M_coinInfo: {
- myMcoin: 0
- },
- list: [],
- page: 1,
- hasNo: true,
- }
- },
- onLoad(parms) {
- this.type = parms.type || 'GMM';
- },
- onShow() {
- this.loadData();
- },
- methods: {
- onBack() {},
- goPage(page) {
- uni.navigateTo({
- url: page,
- })
- },
- chkSel() {
- if (this.sel == 1) {
- this.sel = 0;
- } else {
- this.sel = 1;
- }
- },
- loadData() {
- var offset = (this.page - 1) * 20;
- uni.request({
- url: this.$apiHost + '/My/recordlist',
- data: {
- uuid: getApp().globalData.uuid,
- type: this.type,
- offset: offset,
- },
- header: {
- 'content-type': 'application/json'
- },
- success: (res) => {
- console.log("res", res.data)
- this.num = res.data.num;
- if (res.data.list != null && res.data.list != undefined) {
- if (res.data.list.length > 0) {
- this.hasNo = false;
- }
- if (this.page <= 1) {
- this.list = res.data.list;
- } else {
- this.list = this.list.concat(res.data.list);
- }
- }
- uni.setNavigationBarTitle({
- title: res.data.name
- })
- }
- });
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'recordList.scss';
- </style>
|