diff --git a/App.vue b/App.vue index ea791f2..6428851 100644 --- a/App.vue +++ b/App.vue @@ -1,43 +1,37 @@ \ No newline at end of file diff --git a/common/global.js b/common/global.js index c3f706a..65ed34c 100644 --- a/common/global.js +++ b/common/global.js @@ -4,37 +4,37 @@ import { clothesRentUrl , bookUrl , workshopUrl , myOrderUrl} from "./globalImag export const stateList = [ { state: '待支付', - img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FFybMDtHR-dengdaifukuan.png', + img: myOrderUrl + '/myGeneralOrderDetail/dzf.png', msg: '等待买家付款', tips: '超时订单将自动关闭' }, { state: '待发货', - img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FEOzVqolp-fahuo.png', + img: myOrderUrl + '/myGeneralOrderDetail/dfh.png', msg: '等待卖家发货', tips: '耐心等待' }, { state: '已退款', - img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FlPnvgqCp-yituikuan.png', + img: myOrderUrl + '/myGeneralOrderDetail/ytk.png', msg: '订单已退款', tips: '钱款已退还' }, { state: '待收货', - img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FEOzVqolp-fahuo.png', + img: myOrderUrl + '/myGeneralOrderDetail/dsh.png', msg: '商品已发货,注意查收', tips: '工艺品即将送达,敬请耐心等候。' }, { state: '交易成功', - img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FaHDhacaI-dengdaifukuan.png', + img: myOrderUrl + '/myGeneralOrderDetail/jywc.png', msg: '订单完成,感谢您的支持', tips: '感谢您的支持' }, { state: '交易关闭', - img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Fuser_avatar%2F0%2FLPwbfbRj-cancel.png', + img: myOrderUrl + '/myGeneralOrderDetail/jygb.png', msg: '您的订单已关闭', tips: '请您在下次购买前仔细确认' } diff --git a/common/globalFont.js b/common/globalFont.js index 60b8f3f..788ed90 100644 --- a/common/globalFont.js +++ b/common/globalFont.js @@ -1,14 +1,37 @@ -export const getFonts =()=>{ - - //其他页面 - uni.loadFontFace({ - family: 'FangZhengFonts', - source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengFonts.ttf")`, - success:(res) =>{ - console.log('success',res); +import { bkgPubilcPath,loginUrl } from "./globalImagesUrl"; +import { ref } from 'vue'; +const bkgUrl = ref(loginUrl + '/bkg.png') +//缓存背景图片 +const bkgCache = 'bkgCache'; //缓存的键 + +export const getFonts =()=>{ //改为查询背景图片 +wx.getStorage({ + key: bkgCache, + success: (res) => { + console.log('缓存图片的路径--->',res.data); + bkgPubilcPath.value = res.data }, - fail:(err) => { - console.log('err',err); + 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); + } + }) } }) } diff --git a/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue b/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue index a3198fd..01744dc 100644 --- a/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue +++ b/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue @@ -1,5 +1,5 @@