123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <div>
- <div>
- <div>title</div>
- <div>
- <button @click="$router.push('/inspire')">inspire</button>
- </div>
- <div class="justify-end">
- <button @click="getContentByType()">getContentByType</button>
- <button @click="message()">message</button>
- </div>
- </div>
- <div class="">{{ FILE_PREFIX }}</div>
- <img
- :src="
- $file.getUrl({
- fileKey: 'LowLevelMultipartUpload_18706407955405619211',
- type: 'popup',
- })
- "
- alt=""
- />
- </div>
- </template>
- <script>
- import agreement from '~/api/public/agreement.js';
- export default {
- name: 'IndexPage',
- auth: false,
- // asyncData({ $snackbar }) {
- // $snackbar({
- // app: true,
- // content: '123456798',
- // });
- // },
- data() {
- return {
- FILE_PREFIX: process.env.FILE_PREFIX,
- FILE_UPLOAD_KEY: process.env.FILE_UPLOAD_KEY,
- };
- },
- fetch() {},
- mounted() {},
- methods: {
- async getContentByType() {
- const data = await agreement(this).getContentByType('XYPZYHXY2004', 1);
- console.log(
- '🚀 ~ file: index.vue ~ line 24 ~ getContentByType ~ data',
- data,
- );
- },
- message() {
- this.$message({
- app: true,
- content: '123456798',
- icon: '$success',
- });
- },
- },
- };
- </script>
|