This commit is contained in:
蔡同学
2025-08-25 11:20:35 +08:00
parent 25df08ec69
commit 6df8112e7b
251 changed files with 34346 additions and 0 deletions
+123
View File
@@ -0,0 +1,123 @@
<template>
<uni-popup ref="share" type="bottom">
<view class="shareCont">
<view class="shareHeader">
<text class="shareTitle">分享到</text>
<text class="shareClose" @click="closeShare">取消</text>
</view>
<view class="shareList">
<view class="shareItem" @click="shareApp('WXSceneTimeline')">
<image src="../../../static/wechart.png" mode="widthFix" class="shareIcon" />
<text class="shareText">朋友圈</text>
</view>
<view class="shareItem" @click="shareApp('WXSceneSession')">
<image src="../../../static/wechart.png" mode="widthFix" class="shareIcon" />
<text class="shareText">微信好友</text>
</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: "share",
props:{
videoInfo:{
type:Object,
default:function(){
return {}
}
}
},
data() {
return {
userInfo:{},
};
},
mounted() {
this.userInfo = uni.getStorageSync('userInfo')
},
methods: {
closeShare() {
this.$refs.share.close();
},
showSharePup() {
this.$refs.share.open();
},
shareApp(type) {
let that = this;
uni.share({
provider: 'weixin',
scene: type,
type: 0,
imageUrl:that.videoInfo.coverImg, //此处图片可以更换
title: "柠檬短剧",
summary:`我正在看 ${this.videoInfo.name} 超好看,一起来看看吧`,
href:"https://baogu.hnjrdzkj.xyz/h5/#/pages/promotion/promotion?id="+this.userInfo.id,
success: res => {
console.log(JSON.stringify(res));
},
fail(err) {
console.log(err)
}
});
}
}
}
</script>
<style scoped lang="scss">
.shareCont{
background-color: #FFFFFF;
width: 750rpx;
padding: 34rpx;
border-radius: 34rpx 34rpx 0 0;
}
.shareHeader{
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row;
}
.shareTitle{
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 44rpx;
}
.shareClose{
font-weight: 500;
font-size: 28rpx;
color: #666666;
line-height: 44rpx;
}
.shareList{
padding: 60rpx 0 130rpx 0 ;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
}
.shareIcon{
width: 100rpx;
height: 100rpx;
}
.shareText{
text-align: center;
font-weight: 500;
font-size: 24rpx;
color: #333333;
line-height: 34rpx;
padding-top: 12rpx;
}
.shareItem{
display: flex;
flex-direction: column;
}
</style>