1
This commit is contained in:
1 parent
f057fac4fb
commit
e688937e0d
1 file changed
+18
-1
@@ -71,7 +71,8 @@
|
||||
<image class="mt-30rpx" :src="state.posterPic" mode="widthFix" />
|
||||
<view class="mt-30rpx flex justify-between items-center text-xs">
|
||||
<view
|
||||
class="flex-1 text-center px-2 py-8rpx border-1px border-solid rounded-full border-color-theme active_cl_bg-color-theme">
|
||||
class="flex-1 text-center px-2 py-8rpx border-1px border-solid rounded-full border-color-theme active_cl_bg-color-theme"
|
||||
@tap="copyLink">
|
||||
复制链接
|
||||
</view>
|
||||
<view class="w-30rpx" />
|
||||
@@ -155,6 +156,7 @@ const state = reactive({
|
||||
],
|
||||
summary: {},
|
||||
posterPic: "",
|
||||
posterUrl: "",
|
||||
});
|
||||
|
||||
|
||||
@@ -208,11 +210,26 @@ const getMiniProgramPoster = async () => {
|
||||
let { code, data } = await BrokerageApi.getBrokerageCode();
|
||||
if (code != 0) throw new Error()
|
||||
state.posterPic = data?.posterPic || ''
|
||||
state.posterUrl = data?.url || ''
|
||||
} catch (error) {
|
||||
console.error("|获取分销海报|,意外的错误:", error);
|
||||
}
|
||||
}
|
||||
|
||||
// 复制海报
|
||||
const copyLink = () => {
|
||||
uni.setClipboardData({
|
||||
data: state.posterUrl,
|
||||
success: () => {
|
||||
uni.showToast({ title: '复制成功', icon: 'success' });
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({ title: '复制失败', icon: 'none' });
|
||||
console.error("|复制链接|,意外的错误:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 保存海报
|
||||
const savePoster = () => {
|
||||
if (!state.posterPic) {
|
||||
|
||||
Reference in new issue
Block a user