|
@@ -28,11 +28,15 @@ export default defineComponent({
|
|
|
data() {
|
|
|
return {
|
|
|
image: null as any,
|
|
|
- codeUrl: ''
|
|
|
+ codeUrl: '',
|
|
|
+ subjectUrl: ''
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
|
try {
|
|
|
+ // this.subjectUrl = this.activeInfo.subjectUrl + `?t=${dayjs().unix()}`
|
|
|
+ this.subjectUrl = this.activeInfo.subjectUrl + '@base@tag=imgScale&w=570'
|
|
|
+ console.log(this.subjectUrl)
|
|
|
const shortRes = await request.post('/api-teacher/sysConfig/shortURL', {
|
|
|
requestType: 'form',
|
|
|
data: {
|
|
@@ -113,10 +117,21 @@ export default defineComponent({
|
|
|
class={styles.shareContainer}
|
|
|
id="share-preview-container"
|
|
|
style={{
|
|
|
- background: `url(${this.activeInfo.subjectUrl}) no-repeat top center ${this.activeInfo.backgroundUrl}`,
|
|
|
- backgroundSize: 'contain'
|
|
|
+ // backgroundImage: `url(${this.subjectUrl})`,
|
|
|
+ // backgroundPosition: 'top center',
|
|
|
+ backgroundColor: this.activeInfo.backgroundUrl
|
|
|
+ // backgroundRepeat: 'no-repeat',
|
|
|
+ // backgroundSize: 'contain'
|
|
|
}}
|
|
|
>
|
|
|
+ <img
|
|
|
+ class={[styles.cover]}
|
|
|
+ src={this.subjectUrl}
|
|
|
+ crossorigin="anonymous"
|
|
|
+ style={{
|
|
|
+ objectFit: 'cover'
|
|
|
+ }}
|
|
|
+ />
|
|
|
<div class={styles.reviewContainer}>
|
|
|
<div
|
|
|
class={[
|
|
@@ -146,16 +161,10 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={['btnGroup', styles.shareGroupBtn]}>
|
|
|
- <Button type="primary" plain round>
|
|
|
+ <Button type="primary" plain round onClick={this.onSaveImg}>
|
|
|
保存图片
|
|
|
</Button>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- round
|
|
|
- onClick={() => {
|
|
|
- // this.shareShow()
|
|
|
- }}
|
|
|
- >
|
|
|
+ <Button type="primary" round onClick={this.shareShow}>
|
|
|
立即分享
|
|
|
</Button>
|
|
|
</div>
|