绘智AI相机

main
gongdi 9 months ago
parent 416d184b78
commit 396c16a8a0

@ -4,6 +4,7 @@ import { onShow } from "@dcloudio/uni-app";
import { getChangeRecord } from "@/apis/api";
export default function () {
const token = uni.getStorageSync("token");
const rootFontSize = uni.getStorageSync("rootFontSize");
const data: any = reactive({
pageNum: 1,
pageSize: 10,
@ -16,6 +17,7 @@ export default function () {
contentnomore: "没有更多数据了~",
},
loadStatus: "more",
rfs: rootFontSize + "px",
});
onShow(() => {

@ -1,61 +1,67 @@
<template>
<view class="change-record-container">
<scroll-view
scroll-y
enable-flex
class="works-scroll-container"
@scrolltolower="toUpdateList"
>
<view
class="record-info"
v-for="record in data.recordList"
:key="record.id"
<page-meta :root-font-size="data.rfs">
<view class="change-record-container">
<scroll-view
scroll-y
enable-flex
class="works-scroll-container"
@scrolltolower="toUpdateList"
>
<!-- 动作充值 -->
<view v-if="record.type_id == 1">
<view class="row-style">动作充值</view>
<view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style">充值金额{{ record.total }} </view>
<view class="row-style"
>充值后金豆数{{ record.after_jd_count }} </view
>
<view class="row-style"
>充值前金豆数{{ record.before_jd_count }} </view
>
<view
class="record-info"
v-for="record in data.recordList"
:key="record.id"
>
<!-- 动作充值 -->
<view v-if="record.type_id == 1">
<view class="row-style">动作充值</view>
<view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style">充值金额{{ record.total }} </view>
<view class="row-style"
>充值后金豆数{{ record.after_jd_count }} </view
>
<view class="row-style"
>充值前金豆数{{ record.before_jd_count }} </view
>
</view>
<!-- 动作金豆消耗 -->
<view v-if="record.type_id == 2">
<view class="row-style">动作金豆消耗</view>
<view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style"
>本次消耗金豆{{ record.jd_count }} </view
>
<view class="row-style"
>消耗后金豆数{{ record.after_jd_count }} </view
>
<view class="row-style"
>消耗前金豆数{{ record.before_jd_count }} </view
>
</view>
<!-- 动作生成失败金豆返回 -->
<view v-if="record.type_id == 3">
<view class="row-style">动作生成失败金豆返回</view>
<view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style"
>本次返回金豆{{ record.jd_count }} </view
>
<view class="row-style"
>返回后金豆数{{ record.after_jd_count }} </view
>
<view class="row-style"
>返回前金豆数{{ record.before_jd_count }} </view
>
</view>
</view>
<!-- 动作金豆消耗 -->
<view v-if="record.type_id == 2">
<view class="row-style">动作金豆消耗</view>
<view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style">本次消耗金豆{{ record.jd_count }} </view>
<view class="row-style"
>消耗后金豆数{{ record.after_jd_count }} </view
>
<view class="row-style"
>消耗前金豆数{{ record.before_jd_count }} </view
>
</view>
<!-- 动作生成失败金豆返回 -->
<view v-if="record.type_id == 3">
<view class="row-style">动作生成失败金豆返回</view>
<view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style">本次返回金豆{{ record.jd_count }} </view>
<view class="row-style"
>返回后金豆数{{ record.after_jd_count }} </view
>
<view class="row-style"
>返回前金豆数{{ record.before_jd_count }} </view
>
</view>
</view>
<uni-load-more
class="load-more-container"
:status="data.loadStatus"
:contentText="data.loadContent"
@clickLoadMore="toUpdateList"
/>
</scroll-view>
</view>
<uni-load-more
class="load-more-container"
:status="data.loadStatus"
:contentText="data.loadContent"
@clickLoadMore="toUpdateList"
/>
</scroll-view>
</view>
</page-meta>
</template>
<script lang="ts" setup>
import getData from "./changeRecord";
@ -72,17 +78,20 @@ const { data, toUpdateList } = getData();
left: 0;
right: 0;
bottom: 0;
padding: $uni-spacing-col-base;
padding: 1.5rem;
box-sizing: border-box;
.record-info {
width: 100%;
border-bottom: 1px solid $uni-border-color;
margin-bottom: $uni-spacing-col-base;
border-bottom: 1px solid #eee;
margin-bottom: 1.5rem;
.row-style {
width: 100%;
height: 50rpx;
height: 2rem;
display: flex;
align-items: center;
font-family: "微软雅黑";
font-size: 1.5rem;
margin-bottom: 1rem;
}
}
}

@ -77,7 +77,7 @@ const pro = (url: string) => {
//设置根字体大小
export function caleRootFontSize() {
const clientWidth = uni.getSystemInfoSync().windowWidth;
const clientWidth = Math.min(uni.getSystemInfoSync().windowWidth, 1080);
const rootFontSize = (clientWidth / 1080) * 20;
uni.setStorageSync("rootFontSize", rootFontSize);
}

Loading…
Cancel
Save