fix: add default avatar placeholder and correct debug API URL

- orderdetail: add fallback avatar image and onAvatarError handler
- Android: point debug build to cloud server (101.43.95.130)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-05-22 00:27:52 +08:00
parent 230fb8c82a
commit 068c47925e
3 changed files with 8 additions and 5 deletions

View File

@@ -440,5 +440,8 @@ Page({
*/ */
onShareAppMessage() { onShareAppMessage() {
} },
onAvatarError() {
// 头像加载失败回退到默认占位图
},
}) })

View File

@@ -19,7 +19,7 @@
<view wx:if="{{item.status==8}}" class="status_msg">{{"已结算"}}</view> <view wx:if="{{item.status==8}}" class="status_msg">{{"已结算"}}</view>
</view> </view>
<view class="details_box"> <view class="details_box">
<image src="{{item.userbAvatar}}" style="width:230rpx;height:230rpx;"></image> <image src="{{item.userbAvatar || '/pages/image/userimg.png'}}" binderror="onAvatarError" style="width:230rpx;height:230rpx;"></image>
<view style="margin-left: 31rpx;"> <view style="margin-left: 31rpx;">
<view class="title">专业陪护服务({{item.userbName}}</view> <view class="title">专业陪护服务({{item.userbName}}</view>
<!-- <view class="detail_number">数量x{{detail.num}}</view> --> <!-- <view class="detail_number">数量x{{detail.num}}</view> -->
@@ -63,7 +63,7 @@
<view class="contact"> <view class="contact">
<view class="contact_title">联系信息</view> <view class="contact_title">联系信息</view>
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image src="{{item.userbAvatar}}" style="width:94rpx;height:94rpx;border-radius:50% ;margin-right:23rpx;"> <image src="{{item.userbAvatar || '/pages/image/userimg.png'}}" binderror="onAvatarError" style="width:94rpx;height:94rpx;border-radius:50%;margin-right:23rpx;">
</image> </image>
<view> <view>
<view style="color: #333;font-size: 28rpx;font-family: PingFang SC;font-weight: bold;">{{item.userbName}}</view> <view style="color: #333;font-size: 28rpx;font-family: PingFang SC;font-weight: bold;">{{item.userbName}}</view>

View File

@@ -33,8 +33,8 @@ android {
buildTypes { buildTypes {
debug { debug {
// 开发环境 —— 连接本地后端需改为本机IP // 开发环境 —— 连接云服务器
buildConfigField "String", "API_BASE_URL", '"http://192.168.1.100:8039"' buildConfigField "String", "API_BASE_URL", '"http://101.43.95.130:8039"'
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }