<template>
<view class="content">
<image class="logo" src="/static/logo.png" />
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script setup>
import { ref } from "vue";
import { onShareAppMessage } from "@dcloudio/uni-app";
const title = ref("Hello");
onShareAppMessage(() => {
return {
title: "11",
path: /pages/index/index
,
imageUrl:
"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202002%2F10%2F20200210120355_snutr.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1665846069&t=247f575138e711bf4835f630329a8af3", //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
};
});
</script>
<style>
</style>
3***@qq.com
老铁,我也遇到这个问题,真的是坑啊
2023-03-26 11:07
3***@qq.com
换成新版本也可以解决
2023-03-26 11:14