|
@@ -44,7 +44,8 @@
|
|
</view>
|
|
</view>
|
|
<view class="footer">
|
|
<view class="footer">
|
|
<view class="btn" @click="handleDownload">保存图片</view>
|
|
<view class="btn" @click="handleDownload">保存图片</view>
|
|
- <view class="share btn" @click="handleShare">去分享</view>
|
|
|
|
|
|
+ <!-- <view class="share btn" @click="handleShare">去分享</view> -->
|
|
|
|
+ <button class="share btn" open-type="share">去分享</button>
|
|
</view>
|
|
</view>
|
|
<view class="close">
|
|
<view class="close">
|
|
<up-icon name="close-circle-fill" size="30" @click="showPopup = false"
|
|
<up-icon name="close-circle-fill" size="30" @click="showPopup = false"
|
|
@@ -61,7 +62,10 @@
|
|
watch
|
|
watch
|
|
} from "vue";
|
|
} from "vue";
|
|
// import savePhotoPopup from "@/components/common/savePhotoPopup.vue";
|
|
// import savePhotoPopup from "@/components/common/savePhotoPopup.vue";
|
|
- import TREE from '@/api/tree.js'
|
|
|
|
|
|
+ import TREE from '@/api/tree.js'
|
|
|
|
+ import {
|
|
|
|
+ onShareAppMessage
|
|
|
|
+ } from '@dcloudio/uni-app'
|
|
import config from "@/api/config.js"
|
|
import config from "@/api/config.js"
|
|
const resize = "?x-oss-process=image/resize,w_1000";
|
|
const resize = "?x-oss-process=image/resize,w_1000";
|
|
|
|
|
|
@@ -100,15 +104,13 @@
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
- const handleShare = () => {
|
|
|
|
- const params = {
|
|
|
|
- sampleId: props.sampleId,
|
|
|
|
- farmBuyId: props.farmBuyId,
|
|
|
|
- };
|
|
|
|
- // wx.miniProgram.navigateTo({
|
|
|
|
- // url: `/pages/subPages/share_page/index?type=treeExample&pageParams=${JSON.stringify(params)}`,
|
|
|
|
- // });
|
|
|
|
- };
|
|
|
|
|
|
+ onShareAppMessage((res) => {
|
|
|
|
+ return {
|
|
|
|
+ title: '我分享了我的果树,快来查看吧~',
|
|
|
|
+ path: `/pages/tabBar/tree/subPages/friendTree?sampleId=${props.sampleId}`, // 分享的小程序页面路径
|
|
|
|
+ imageUrl: `http://birdseye-api.feiniaotech.sysuimars.cn/mini/z_farm_buy/genImage/${props.farmBuyId}?key=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&x1=25&y1=220&fontSize1=40&x2=55&y2=250&fontSize2=16×tamp=${Date.now()}`,
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
const showPopup = ref(false);
|
|
const showPopup = ref(false);
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
@@ -129,7 +131,7 @@
|
|
const contentDom = ref(null);
|
|
const contentDom = ref(null);
|
|
|
|
|
|
const handleDownload = () => {
|
|
const handleDownload = () => {
|
|
- savePhotoDom.value.handleDownload(contentDom.value);
|
|
|
|
|
|
+ // savePhotoDom.value.handleDownload(contentDom.value);
|
|
};
|
|
};
|
|
|
|
|
|
const getPosterData = (farmBuyId) => {
|
|
const getPosterData = (farmBuyId) => {
|
|
@@ -307,7 +309,8 @@
|
|
border: 1px solid #fff;
|
|
border: 1px solid #fff;
|
|
background: #fff;
|
|
background: #fff;
|
|
text-align: center;
|
|
text-align: center;
|
|
- color: #000;
|
|
|
|
|
|
+ color: #000;
|
|
|
|
+ line-height: inherit;
|
|
}
|
|
}
|
|
|
|
|
|
.share {
|
|
.share {
|