修改设备详情

This commit is contained in:
18796357645 2025-07-15 16:37:09 +08:00
parent 73536a9cc1
commit 164138577c
3 changed files with 770 additions and 705 deletions

View File

@ -4,3 +4,5 @@ export const BASE_API_URL = "https://online.totustec.com/api";
// 静态数据 // 静态数据
export const BASE_IMG_URL = "https://online.totustec.com/upload"; export const BASE_IMG_URL = "https://online.totustec.com/upload";
export const BASE_STOKECT_URL = "ws://online.totustec.com/webSocket/vue"

File diff suppressed because it is too large Load Diff

View File

@ -17,9 +17,7 @@
<view class="profile_item"> <view class="profile_item">
<text class="item_label">头像</text> <text class="item_label">头像</text>
<view class="avatar_wrapper" @click="changeAvatar"> <view class="avatar_wrapper" @click="changeAvatar">
<image class="avatar" <image class="avatar" :src="userInfo.avatar || user" mode="aspectFill"></image>
:src="userInfo.avatar || user"
mode="aspectFill"></image>
</view> </view>
</view> </view>
@ -36,17 +34,20 @@
</template> </template>
<script> <script>
import { BASE_API_URL,BASE_IMG_URL } from "@/config.js"; import {
BASE_API_URL,
BASE_IMG_URL
} from "@/config.js";
export default { export default {
data() { data() {
return { return {
back:BASE_IMG_URL + "/minePage/back.png", // back: BASE_IMG_URL + "/minePage/back.png", //
user:BASE_IMG_URL + "/minePage/user.png", // user: BASE_IMG_URL + "/minePage/user.png", //
statusBarHeight: 0, statusBarHeight: 0,
userInfo: { userInfo: {
nikename: "", nikename: "",
avatar:"", avatar: "",
phone:"" phone: ""
} }
}; };
}, },
@ -86,8 +87,9 @@
}, },
success: (uploadRes) => { success: (uploadRes) => {
console.log(uploadRes) console.log(uploadRes)
this.userInfo.avatar= this.userInfo.avatar =
"https://online.totustec.com/upload/file/image/" + uploadRes.data; "https://online.totustec.com/upload/file/image/" + uploadRes
.data;
uni.showToast({ uni.showToast({
title: "头像上传成功" title: "头像上传成功"
}); });
@ -182,6 +184,7 @@
position: relative; position: relative;
z-index: 5; z-index: 5;
} }
.back_icon { .back_icon {
position: absolute; position: absolute;
left: 20rpx; left: 20rpx;