|
@@ -1,24 +1,43 @@
|
|
|
-import { defineComponent } from "vue";
|
|
|
-import styles from './index.module.less'
|
|
|
-import func from './images/function.png'
|
|
|
-import btnImg from './images/button-bg.png'
|
|
|
-import MSticky from "@/components/m-sticky";
|
|
|
+import { defineComponent } from 'vue';
|
|
|
+import styles from './index.module.less';
|
|
|
+import func from './images/function.png';
|
|
|
+import btnImg from './images/button-bg.png';
|
|
|
+import MSticky from '@/components/m-sticky';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'activation-download',
|
|
|
setup() {
|
|
|
- return () => <div class={styles.activationDownload}>
|
|
|
- <div class={styles.section}>
|
|
|
- <img src="https://oss.dayaedu.com/ktyq/1733226456374.png" class={styles.qrCodeImg} />
|
|
|
+ const onDownload = () => {
|
|
|
+ // @ts-ignore
|
|
|
+ window.wx.downloadImage('https://oss.dayaedu.com/ktyq/1733226456374.png')
|
|
|
+ }
|
|
|
+ const onDownload2 = () => {
|
|
|
+ console.log('发送消息')
|
|
|
+ window.parent.postMessage({
|
|
|
+ type: 'downloadImageRequest',
|
|
|
+ data: {
|
|
|
+ url: 'https://oss.dayaedu.com/ktyq/1733226456374.png'
|
|
|
+ }
|
|
|
+ }, '*');
|
|
|
+ }
|
|
|
+ return () => (
|
|
|
+ <div class={styles.activationDownload}>
|
|
|
+ <div class={styles.section}>
|
|
|
+ <img
|
|
|
+ src="https://oss.dayaedu.com/ktyq/1733226456374.png"
|
|
|
+ class={styles.qrCodeImg}
|
|
|
+ />
|
|
|
|
|
|
-<img src={func} class={styles.func} />
|
|
|
- </div>
|
|
|
-
|
|
|
- <MSticky position="bottom">
|
|
|
- <div class={styles.btnGroup}>
|
|
|
- <img src={btnImg} class={styles.btnImg} />
|
|
|
+ <img src={func} class={styles.func} />
|
|
|
</div>
|
|
|
- </MSticky>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <MSticky position="bottom">
|
|
|
+ <div class={styles.btnGroup}>
|
|
|
+ <img src={btnImg} class={styles.btnImg} onClick={onDownload} />
|
|
|
+ <img src={btnImg} class={styles.btnImg} onClick={onDownload2} />
|
|
|
+ </div>
|
|
|
+ </MSticky>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
}
|
|
|
-})
|
|
|
+});
|