绘智AI相机

main
gongdi 10 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,4 +1,5 @@
<template> <template>
<page-meta :root-font-size="data.rfs">
<view class="change-record-container"> <view class="change-record-container">
<scroll-view <scroll-view
scroll-y scroll-y
@ -27,7 +28,9 @@
<view v-if="record.type_id == 2"> <view v-if="record.type_id == 2">
<view class="row-style">动作金豆消耗</view> <view class="row-style">动作金豆消耗</view>
<view class="row-style">时间{{ record.happen_time }}</view> <view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style">本次消耗金豆{{ record.jd_count }} </view> <view class="row-style"
>本次消耗金豆{{ record.jd_count }} </view
>
<view class="row-style" <view class="row-style"
>消耗后金豆数{{ record.after_jd_count }} </view >消耗后金豆数{{ record.after_jd_count }} </view
> >
@ -39,7 +42,9 @@
<view v-if="record.type_id == 3"> <view v-if="record.type_id == 3">
<view class="row-style">动作生成失败金豆返回</view> <view class="row-style">动作生成失败金豆返回</view>
<view class="row-style">时间{{ record.happen_time }}</view> <view class="row-style">时间{{ record.happen_time }}</view>
<view class="row-style">本次返回金豆{{ record.jd_count }} </view> <view class="row-style"
>本次返回金豆{{ record.jd_count }} </view
>
<view class="row-style" <view class="row-style"
>返回后金豆数{{ record.after_jd_count }} </view >返回后金豆数{{ record.after_jd_count }} </view
> >
@ -56,6 +61,7 @@
/> />
</scroll-view> </scroll-view>
</view> </view>
</page-meta>
</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