| | |
| | | this.backHeadImage = '' |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getBase64Img('/static/images/jifen_bg@2x.png') |
| | | }, |
| | | onShow() { |
| | | this.shop ={} |
| | | this.checkShopLogin() |
| | |
| | | this.getFirstPageData() |
| | | }, |
| | | methods:{ |
| | | getBase64Img(path){ |
| | | var that =this |
| | | uni.getFileSystemManager().readFile({ |
| | | filePath: path, // 替换为你的图片路径 |
| | | encoding: 'base64', |
| | | success: (res) => { |
| | | const base64Data = 'data:image/png;base64,' + res.data; // 拼接前缀,用于页面显示 |
| | | console.log('图片Base64编码:', base64Data); |
| | | // 可以将 base64Data 绑定到 data 中,用于页面展示 |
| | | that.backImage = base64Data; |
| | | }, |
| | | fail: (err) => { |
| | | console.error('读取图片失败:', err); |
| | | } |
| | | }); |
| | | }, |
| | | getFirstPageData(){ |
| | | this.currentPage = 0 |
| | | this.hasNext=true |