fix: 我的-》个人信息-》名称显示

This commit is contained in:
admin 2024-07-18 15:41:43 +08:00
parent b6838f3f8d
commit a0c55d0be1
3 changed files with 10 additions and 11 deletions

View File

@ -3,7 +3,7 @@
<up-col span="6" v-for="(item, index) in list" :key="index">
<view class="grid-item">
<up-image
:src="item.url"
:src="item.url || `${url}/static/110/error.jpg`"
:mode="'widthFix'"
:width="'100%'"
@click="showImage(index)"
@ -20,13 +20,14 @@
<script setup lang="ts">
import { PictureApi } from "@/services";
import { url } from "@/utils/data";
const props = defineProps<{
params: Object;
}>();
let list: any = ref([]);
const showImage = (index: number) => {
uni.previewImage({
urls: list.value.map((item: any) => item.url), //
urls: list.value.map((item: any) => item.url || `${url}/static/110/error.jpg`), //
current: index, //
indicator: "default", //
loop: true,

View File

@ -1,7 +1,7 @@
<template>
<view class="baseinfo">
<view class="box">
<view> 姓名 {{ profile.userName }} </view>
<view> 姓名 {{ profile.name }} </view>
<view> 性别 {{ profile.gender ? (profile.gender === 1 ? '男' : '女') :'未知' }} </view>
<view> 手机号码 {{ profile.phone }} </view>
</view>

View File

@ -13,11 +13,8 @@
>
<view class="time">{{ item.createTime }}</view>
<text class="tip">{{ getType(item.imagesType) }}过磅</text>
<image
:src="item.url"
:mode="'widthFix'"
@click="showImage(index)"
/>
<image :src="item.url || `${url}/static/110/error.jpg`" :mode="'widthFix'" @click="showImage(index)">
</image>
</view>
</up-col>
</up-row>
@ -31,6 +28,7 @@
import { onLoad } from "@dcloudio/uni-app";
import { PictureApi } from "@/services/index";
import { ImagesType } from "@/utils/enum";
import { url } from "@/utils/data";
let list: any = ref([]);
const getType = (v: number) => {
if (v === ImagesType.Tare) {
@ -44,7 +42,7 @@ const getType = (v: number) => {
const showImage = (index: number) => {
uni.previewImage({
urls: list.value.map((item:any) => item.url), //
urls: list.value.map((item: any) => item.url || `${url}/static/110/error.jpg`), //
current: index, //
indicator: "default", //
loop: true,