|
@@ -240,13 +240,28 @@
|
|
|
<view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
|
|
|
<view class="tagbox-item x-f tag-active">未打标签</view>
|
|
|
</view> -->
|
|
|
- <view class="x-bc" style="margin-top: 30px;">
|
|
|
- <view class="sharePop-item y-f " @click="shareimg" style="text-align: center;">
|
|
|
+ <!--#ifdef MP-WEIXIN-->
|
|
|
+ <view class="justify-center" style="margin-top: 10px;">
|
|
|
+ <!--#endif-->
|
|
|
+ <!--#ifdef H5-->
|
|
|
+ <view class="justify-center" style="margin-top: 10px;">
|
|
|
+ <!--#endif-->
|
|
|
+ <!-- <view class="x-bc " style="margin-top: 30px;"> -->
|
|
|
+ <!--#ifdef MP-WEIXIN-->
|
|
|
+ <view class="sharePop-item y-f " style="text-align: center;">
|
|
|
+ <!--#endif-->
|
|
|
+ <!--#ifdef H5-->
|
|
|
+ <view class="sharePop-item y-f card-share" @click="shareimg" style="text-align: center;">
|
|
|
+ <!--#endif-->
|
|
|
<image src="@/static/images/card_icon.png" mode="aspectFill"
|
|
|
style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
|
|
|
<view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
|
|
|
<view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <button open-type="share" class="share" @click="sharecard()">分享卡片</button>
|
|
|
+ <!-- #endif -->
|
|
|
</view>
|
|
|
+ <!--#ifdef H5-->
|
|
|
<view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
|
|
|
<image src="@/static/images/poster_icon.png" mode="aspectFill"></image>
|
|
|
<view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
|
|
@@ -257,6 +272,7 @@
|
|
|
<view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
|
|
|
<view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
|
|
|
</view>
|
|
|
+ <!--#endif-->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -523,9 +539,17 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- this.getjssdklist()
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ uni.showShareMenu({
|
|
|
+ withShareTicket: true,
|
|
|
+ menus: ['shareAppMessage']
|
|
|
+ });
|
|
|
+ // #endif
|
|
|
},
|
|
|
onShow() {
|
|
|
+ // #ifdef H5
|
|
|
+ this.getjssdklist()
|
|
|
+ // #endif
|
|
|
this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
|
|
|
this.getcompanyTag()
|
|
|
this.getvipListnum()
|
|
@@ -542,6 +566,32 @@
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ sharecard(){
|
|
|
+ console.log(123)
|
|
|
+ uni.share({
|
|
|
+ provider: 'weixin',
|
|
|
+ scene: 'WXSceneSession', // 分享到会话
|
|
|
+ type: 0,
|
|
|
+ title: this.user.userId+'邀请您成为会员!',
|
|
|
+ path: '/pages/user/users/becomeVIP?companyId='+
|
|
|
+ this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
|
|
|
+ imageUrl: this.imgs,
|
|
|
+ success: (res) => {
|
|
|
+ console.log('分享成功', res);
|
|
|
+ uni.showToast({
|
|
|
+ title: '分享成功',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ console.log('分享失败', err);
|
|
|
+ uni.showToast({
|
|
|
+ title: '分享失败,请稍后再试',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
changetagall() {
|
|
|
this.showTagSelect = !this.showTagSelect
|
|
|
this.tagchangekeywords = ''
|
|
@@ -1390,6 +1440,18 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .card-share{
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .share{
|
|
|
+ display: inline-block;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ opacity: 0;
|
|
|
+ }
|
|
|
.imgshe {
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse
|