Commit 1f72cc2e authored by 刘文虎's avatar 刘文虎
parents afe71054 ed3d7e00
Pipeline #3244 canceled with stages
......@@ -9,6 +9,12 @@
<text>{{ info.backContext }}</text>
</view>
</view>
<l-painter
:board="posterSave"
isCanvasToTempFilePath
@success="handleCanvasSuccessSave"
custom-style="position: fixed; left: 200%"
/>
</view>
</template>
......@@ -24,7 +30,9 @@ export default {
},
data() {
return {
loading: true,
saveUrl: '',
posterSave: {},
currentBlock: () => {},
}
},
computed: {
......@@ -42,9 +50,117 @@ export default {
return this.baseUrl + 'muban3fanmian@3x.png'
}
},
currentPosterSave() {
return {
css: {
width: '702rpx',
height: '420rpx',
'border-radius': '16rpx',
'background-color': '#ffffff',
border: '2rpx solie #f6f7fa',
},
views: [
{
src: this.image,
type: 'image',
css: {
position: 'absolute',
top: '0',
right: '0',
width: '100%',
height: '100%',
'border-radius': '16rpx',
},
},
{
type: 'view',
css: {
position: 'absolute',
top: '8rpx',
right: '0',
height: '0',
width: '100%',
height: '100%',
},
views: [
{
type: 'text',
text: this.info.backTitle,
css: {
position: 'absolute',
height: '60rpx',
'line-height': '60rpx',
fontSize: '40rpx',
'font-weight': 'bold',
left: '32rpx',
color: '#ffffff',
textAlign: 'center',
top: '70rpx',
width: '638rpx',
},
},
{
type: 'text',
text: this.info.backContext,
css: {
position: 'absolute',
top: '180rpx',
left: '32rpx',
fontSize: '28rpx',
color: '#ffffff',
fontWeight: 'bold',
textAlign: 'center',
width: '638rpx',
},
},
],
},
],
}
},
},
methods: {},
methods: {
handleCanvasSuccessSave(url) {
this.saveUrl = url
this.currentBlock(url)
},
saveImage(type = 'save') {
this.currentBlock = (url) => {
uni.saveImageToPhotosAlbum({
filePath: url,
success: () => {
// this.$refs.uToast.show({
// title: '保存成功',
// type: 'success',
// duration: 1500,
// callback: () => {},
// })
},
fail: (err) => {
var str = err && err.errMsg
if (str && str.indexOf('cancel') != -1) {
str = '取消保存'
}
this.$refs.uToast.show({
title: str,
type: 'error',
duration: 1500,
callback: () => {},
})
},
complete: (res) => {
this.$emit('save', res)
},
})
}
if (this.saveUrl) {
this.currentBlock(this.saveUrl)
} else {
this.posterSave = this.currentPosterSave
}
},
},
}
</script>
<style scoped lang="scss">
......
......@@ -52,8 +52,6 @@ export default {
this.$refs.card.updateImage()
},
saveImage() {
this.$refs.card.saveImage()
return
this.$refs.cardBack.saveImage()
},
handleClickCard() {
......
......@@ -212,7 +212,7 @@ export default {
top: '180rpx',
left: '32rpx',
fontSize: '28rpx',
color: ' #333333',
color: '#333333',
fontWeight: 'bold',
textAlign: 'left',
},
......@@ -346,7 +346,7 @@ export default {
top: '200rpx',
left: '32rpx',
fontSize: '28rpx',
color: ' #333333',
color: '#333333',
fontWeight: 'bold',
textAlign: 'left',
},
......@@ -454,7 +454,7 @@ export default {
top: '40rpx',
left: '32rpx',
fontSize: '28rpx',
color: ' #333333',
color: '#333333',
fontWeight: 'bold',
textAlign: 'left',
},
......@@ -633,7 +633,7 @@ export default {
top: '180rpx',
left: '32rpx',
fontSize: '28rpx',
color: ' #333333',
color: '#333333',
fontWeight: 'bold',
textAlign: 'left',
},
......@@ -781,7 +781,7 @@ export default {
top: '200rpx',
left: '32rpx',
fontSize: '28rpx',
color: ' #333333',
color: '#333333',
fontWeight: 'bold',
textAlign: 'left',
},
......@@ -904,7 +904,7 @@ export default {
top: '40rpx',
left: '32rpx',
fontSize: '28rpx',
color: ' #333333',
color: '#333333',
fontWeight: 'bold',
textAlign: 'left',
},
......
......@@ -88,16 +88,18 @@ export default {
// this.initDate();
},
onReady() {
this.$refs['scroll-box']?.reloadList();
this.firstEnter = false;
this.firstEnter = false
},
onShow() {
console.log('onShow');
if (!this.firstEnter) {
if (this.current == 0) {
this.$refs['scroll-box']?.reloadList();
this.$nextTick(()=> {
this.$refs['scroll-box'].reloadList();
})
} else if (this.current == 1) {
this.$refs['chart-view']?.reloadData();
this.$nextTick(()=> {
this.$refs['chart-view'].reloadData();
})
}
// this.getMouthStatistics();
}
......
......@@ -153,7 +153,7 @@ export default {
let params = {
current: this.current,
size: this.size,
month: this.date
month: this.defaultDate
};
let res = await getList(params);
if (this.current === 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment