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

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

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

Loading…
Cancel
Save