解决了iPhone背景图片发白的问题

This commit is contained in:
yuanteng0011 2025-04-19 18:05:58 +08:00
parent aabda4cca2
commit 939b49072c
10 changed files with 43 additions and 70 deletions
App.vue
common
manifest.json
pages
Shopping-cart/productmain
home
mine/main
store-home/main
subPack/book/myPhotoProductsOrderDetail

View File

@ -6,7 +6,6 @@
import { onLaunch } from '@dcloudio/uni-app'
import { reactive } from 'vue'
//
const globalData = reactive({});
onLaunch( async ()=>{
if (!wx.cloud) {
console.error('请使用 2.2.3 或以上的基础库以使用云能力');

View File

@ -26,7 +26,6 @@ text {
width: 100vw;
height: 100vh;
}
.flex-row {
display: flex;
flex-direction: row;

View File

@ -1,39 +1,40 @@
import { bkgPubilcPath,loginUrl } from "./globalImagesUrl";
import { ref } from 'vue';
const bkgUrl = ref(loginUrl + '/bkg.png')
// const bkgUrl = ref('https://www.carboner.cn:8888/api/file/downloadFile?objectKey=feiyi/miniProgram/login/bkg.png')
//缓存背景图片
const bkgCache = 'bkgCache'; //缓存的键
// const bkgCache = 'bkgCache'; //缓存的键
export const getFonts =()=>{ //改为查询背景图片
wx.getStorage({
key: bkgCache,
success: (res) => {
// console.log('缓存图片的路径--->',res.data);
bkgPubilcPath.value = res.data
},
fail: ()=> {
wx.downloadFile({
url: bkgUrl.value,
success: (res) => {
console.log('成功res--->',res);
if(res.statusCode === 200) {
const filePath = res.tempFilePath;
wx.setStorage({
key: bkgCache,
data: filePath
});
// console.log('图片下载并缓存成功,本地路径--->',filePath);
bkgPubilcPath.value= filePath
} else {
console.log('图片下载失败');
}
},
fail: (err) => {
console.log('下载失败',err);
}
})
}
})
// wx.getStorage({
// key: bkgCache,
// success: (res) => {
// console.log('缓存图片的路径--->',res.data);
// bkgPubilcPath.value = res.data
// },
// fail: ()=> {
// wx.downloadFile({
// url: 'https://www.carboner.cn:8888/api/file/downloadFile?objectKey=feiyi/miniProgram/login/bkg.png',
// success: (res) => {
// console.log('成功res--->',res);
// if(res.statusCode === 200) {
// const filePath = res.tempFilePath;
// wx.setStorage({
// key: bkgCache,
// data: filePath
// });
// console.log('图片下载并缓存成功,本地路径--->',filePath);
// bkgPubilcPath.value= filePath
// } else {
// console.log('图片下载失败');
// }
// },
// fail: (err) => {
// console.log('下载失败',err);
// }
// })
// }
// })
}

View File

@ -16,4 +16,4 @@ export const storeHomeUrl = publicPath + subPath + '/store-home'
export const mineUrl = publicPath + subPath + '/mine'
export const clothesRentUrl = publicPath + subPath + '/clothesRent'
export const bkgPubilcPath = ref('')
export const bkgPubilcPath = ref('https://www.carboner.cn:8888/api/file/downloadFile?objectKey=feiyi/miniProgram/login/bkg.png')

View File

@ -53,8 +53,8 @@
"appid" : "wx61b63e27bddf4ea2",
"setting" : {
"urlCheck" : false,
"minified" : true,
"es6" : false,
"minified" : false,
"es6" : true,
"postcss" : true
},
"usingComponents" : true,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,8 @@
<view class="flex-col group">
<view class="flex-row items-center group_2">
<button class="avatar_button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" >
<image class="avatar_son" mode="aspectFill" :src="publicPath + myAvatar" />
<image v-if="nickName === '未登录'" class="avatar_son" mode="aspectFill" :src="myAvatar" />
<image v-if="nickName !== '未登录'" class="avatar_son" mode="aspectFill" :src="publicPath + myAvatar" />
</button>

File diff suppressed because one or more lines are too long

View File

@ -150,6 +150,7 @@
id: val
}
})
console.log('订单信息--->',res.data.data);
order.value = res.data.data
orderStatusObj.value = photoOrderMap.get(res.data.data.orderStatus)
console.log('orderStatusObj--->',orderStatusObj.value);
@ -158,7 +159,7 @@
} else if (order.value.orderStatus === '待发货') {
order.value.operationList = [false, false, true]
} else if (order.value.orderStatus === '已退款') {
order.value.operationList = [false, false, true]
order.value.operationList = [false, true, false]
} else if (order.value.orderStatus === '交易成功') {
order.value.operationList = [false, false, true]
} else if (order.value.orderStatus === '交易关闭') {