| | |
| | | return { |
| | | currentPage:1, |
| | | total:0, |
| | | shop:{}, |
| | | active:0, |
| | | hasNext:true, |
| | | dataList:[], |
| | | countData:{}, |
| | | hasNext:true, |
| | | shop:{}, |
| | | active:0, |
| | | backHeadImage:'', |
| | | backImage: require('@/static/images/jifen_bg@2x.png') |
| | | }; |
| | |
| | | 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 |
| | |
| | | font-weight: 400; |
| | | font-size: 28rpx; |
| | | color: #222222; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 1; /* 限制文本为2行 */ |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | } |
| | | &:nth-child(2) { |
| | | font-weight: 400; |