[商品分享微信好友和朋友圈处理邀请码和商品id]

This commit is contained in:
2021-10-29 16:17:05 +08:00
parent 18fc1f2239
commit 0682a04664
3 changed files with 492 additions and 424 deletions

View File

@@ -315,13 +315,16 @@
}, },
// 顶部菜单点击了分享功能 // 顶部菜单点击了分享功能
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
console.log('点击了分享功能。。。') let invite = this.goodsObj.user_invite || ''
let goods ='&GoodsId/$-?' + this.goodsObj.goods_id
let shareCode = invite === '' ?goods:invite.slice(0,2) + '$InviTaTiOn$CoDe/$-?' + invite.substring(2)+goods
console.log(shareCode)
uniShare.show({ uniShare.show({
content: { //公共的分享参数配置 类型type、链接herf、标题title、summary描述、imageUrl缩略图 content: {
type: 0, type: 0,
href: 'https://www.lianshang.vip/app?', href: 'https://www.lianshang.vip/app?parent_id=' + shareCode,
title: '链商星球共创未来,一起搭建链商经济的世界~', title: '链商星球 共创未来,一起搭建 链商经济的世界~',
summary: '链商星球app你值得拥有~天天签到领福利~', summary: '链商星球APP你值得拥有~每日签到领贡献值~',
imageUrl: config.apiUrls+'images/top_logo.png' imageUrl: config.apiUrls+'images/top_logo.png'
}, },
menus: [{ menus: [{
@@ -342,9 +345,10 @@
} }
], ],
cancelText: "取消分享", cancelText: "取消分享",
}, e => { //callback }, e => {
console.log(uniShare.isShow); if(uniShare.isShow){
console.log(e); console.log('shareCode',shareCode)
}
}) })
} }
} }

View File

@@ -7,27 +7,29 @@
<view class="code-lay" @click="coverCode"></view> <view class="code-lay" @click="coverCode"></view>
<image class="code-back-image" :src="item.cover" mode="aspectFill"></image> <image class="code-back-image" :src="item.cover" mode="aspectFill"></image>
<view class="codDate"> <view class="codDate">
<view class="codDate-year"> <view class="codDate-year">
{{item.date.solar.month}} {{item.date.solar.month}}
</view> </view>
<view class="codDate-day"> <view class="codDate-day">
{{item.date.solar.day}} {{item.date.solar.day}}
</view> </view>
<view class="codDate-lunar"> <view class="codDate-lunar">
{{item.date.lunar}} {{item.date.lunar}}
</view> </view>
</view> </view>
<view class="codeCont"> <view class="codeCont">
<image class="codeCont-avatar" :src="item.user_info.avatar ? item.user_info.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image> <image class="codeCont-avatar"
<view class="codeCont-text"> :src="item.user_info.avatar ? item.user_info.avatar : '/static/user/user-portrait.png'"
<view class="codeCont-name"> mode="aspectFill"></image>
{{item.user_info.nickname}} <view class="codeCont-text">
</view> <view class="codeCont-name">
<view class="codeCont-number"> {{item.user_info.nickname}}
邀请码{{item.invite}} </view>
</view> <view class="codeCont-number">
</view> 邀请码{{item.invite}}
<image class="codeCont-img" :src="item.code" mode="widthFix"></image> </view>
</view>
<image class="codeCont-img" :src="item.code" mode="widthFix"></image>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
@@ -37,454 +39,495 @@
<view class="hith">朋友通过你的邀请注册成功后将与您绑定好友关系通过成为平台用户你都可以获得贡献值奖励</view> <view class="hith">朋友通过你的邀请注册成功后将与您绑定好友关系通过成为平台用户你都可以获得贡献值奖励</view>
<view class="number"> <view class="number">
<view class="title">邀请码 : {{inviteData[0].invite}}</view> <view class="title">邀请码 : {{inviteData[0].invite}}</view>
<view class="value" @click="copyCenter(inviteData[0].invite)">复制邀请码</view> <view class="value" @click="copyCenter(inviteData[0].invite)">复制邀请码</view>
</view> </view>
<!-- <view class="button" @click="coverCode">生成分享海报</view> --> <!-- <view class="button" @click="coverCode">生成分享海报</view> -->
</view> </view>
<canvas class="my-canvas" canvas-id="myCanvas" id="myCanvas"/> <canvas class="my-canvas" canvas-id="myCanvas" id="myCanvas" />
<view v-if="posterShow"> <view v-if="posterShow">
<view class="posterBack"></view> <view class="posterBack"></view>
<view class="poster"> <view class="poster">
<view class="poster-img"> <view class="poster-img">
<image class="img" :src="posterImg" mode="widthFix" /> <image class="img" :src="posterImg" mode="widthFix" />
</view> </view>
<view class="poster-btn"> <view class="poster-btn">
<view class="operate operate-cancel" @click="saveImage">保存图片至相册</view> <view class="operate operate-cancel" @click="saveImage">保存图片至相册</view>
<view class="operate" @tap="posterShow = false">取消</view> <view class="operate" @tap="posterShow = false">取消</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { userInvite } from '@/apis/interfaces/user' import {
import { saveImageToPhotosAlbum, showToast, downloadFile } from '@/uni_modules/sakura-canvas/js_sdk/util' userInvite
import Draw from '@/uni_modules/sakura-canvas/js_sdk/draw' } from '@/apis/interfaces/user'
let draw = null import {
saveImageToPhotosAlbum,
showToast,
downloadFile
} from '@/uni_modules/sakura-canvas/js_sdk/util'
import Draw from '@/uni_modules/sakura-canvas/js_sdk/draw'
let draw = null
export default { export default {
data() { data() {
return { return {
Popinvite : {}, //下载海报数据 Popinvite: {}, //下载海报数据
inviteData: [] ,//二维码信息 inviteData: [], //二维码信息
codeIndex : 0, codeIndex: 0,
posterImg : '', posterImg: '',
defaultImg: '', defaultImg: '',
loaded : false, loaded: false,
posterShow: false posterShow: false
}; };
}, },
onLoad() { onLoad() {
// 获取二维码 // 获取二维码
this.inviteInfo() this.inviteInfo()
}, },
async created() {}, async created() {},
methods:{ methods: {
// 二维码 // 二维码
inviteInfo(){ inviteInfo() {
userInvite().then(res => { userInvite().then(res => {
this.loaded = true this.loaded = true
this.inviteData = res this.inviteData = res
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: err.message title: err.message
}) })
}) })
},
// 生成海报
async coverCode(){
let img = this.inviteData[this.codeIndex].code
let back = this.inviteData[this.codeIndex].cover
let name = this.inviteData[this.codeIndex].user_info.nickname
let invite = this.inviteData[this.codeIndex].invite
let avatar = this.inviteData[this.codeIndex].user_info.avatar || '/static/user/user-portrait.png'
let date = this.inviteData[this.codeIndex].date
draw = new Draw({
width: 375,
height: 667,
canvasId:'myCanvas',
_this: this,
background: {
type: 'color',
color: 'white',
w: 375,
h: 667,
},
})
let res = await draw.createdSharePoster(({ bgObj }) => {
let { width, height } = bgObj
this.Popinvite = bgObj
// 绘制内容
return [
// 背景
{
type: 'image',
x: 0,
y: 0,
src: back,
w: 375,
h: 667,
zIndex: 0,
},
// 日历-边框
{
type: 'rect',
x: 280,
y: 10,
w: 60, // 宽度 必填
h: 80, // 高度 必填
zIndex: 99,
isFill: false, // 是否是填充矩形, false: 线性矩形
lineWidth: 1 ,// 当矩形为线性时,矩形的边框宽度
color: '#ffffff',
},
// 日历-线条
{
type: 'line',
zIndex: 99,
x: 280,
y: 62,
w: 60, // 宽度 默认整个画布的宽度 - x轴的距离
color: '#ffffff', // 颜色 默认#000000 在不考虑字节跳动小程序的前提下可简写(#000)
alpha: 1, // 透明度 默认1 取值范围 0~1
lineType: 'solid', // 线条类型 默认 solid: 实线 可选 dashed: 虚线
lineWidth: 1, // 线条高度
lineCap: 'butt' // 线条端点样式 默认 butt 可选 round, square
},
// 日历-年月
{
type: 'text',
x: 284,
y: 18,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.month,
color: '#ffffff',
font: {
size: 14
}
},
// 日历-日
{
type: 'text',
x: 298,
y: 40,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.day,
color: '#ffffff',
font: {
size: 18,
weight: 'bold'
}
},
// 日历-农历日期
{
type: 'text',
x: 282,
y: 70,
zIndex: 99,
w: width - (20 * 2),
text: date.lunar,
color: '#ffffff',
font: {
size: 14
}
},
// 用户昵称
{
type: 'text',
x: 86,
y: 600,
zIndex: 99,
w: width - (20 * 2),
text: name,
color: '#ffffff',
font: {
size: 16
}
},
// 邀请码
{
type: 'text',
x: 86,
y: 628,
zIndex: 99,
w: width - (20 * 2),
text: '邀请码:' + invite,
color: '#c4a1cb',
font: {
size: 14
}
},
// 用户头像
{
type: 'image',
x: 24,
y: 598,
src: avatar,
w: 46,
h: 46,
drawType: 'arc',
zIndex: 99,
borderWidth: 5, // 图片边框大小 默认0
borderColor: '#ffffff' // 图片边框颜色 默认无颜色
},
// 二维码
{
type: 'image',
x: 280,
y: 585,
w: 72,
h: 72,
zIndex: 99,
src: img
}
]
})
if (!res.success) return
this.posterImg = res.data
this.posterShow = true
}, },
// 保存图片 // 生成海报
async saveImage() { async coverCode() {
let { posterImg } = this let img = this.inviteData[this.codeIndex].code
let res = await saveImageToPhotosAlbum(posterImg) let back = this.inviteData[this.codeIndex].cover
if (!res.success) return let name = this.inviteData[this.codeIndex].user_info.nickname
showToast('保存成功,去相册分享给朋友吧') let invite = this.inviteData[this.codeIndex].invite
this.posterShow = false let avatar = this.inviteData[this.codeIndex].user_info.avatar || '/static/user/user-portrait.png'
}, let date = this.inviteData[this.codeIndex].date
draw = new Draw({
// 复制邀请码 width: 375,
copyCenter(e) { height: 667,
canvasId: 'myCanvas',
_this: this,
background: {
type: 'color',
color: 'white',
w: 375,
h: 667,
},
})
let res = await draw.createdSharePoster(({
bgObj
}) => {
let {
width,
height
} = bgObj
this.Popinvite = bgObj
// 绘制内容
return [
// 背景
{
type: 'image',
x: 0,
y: 0,
src: back,
w: 375,
h: 667,
zIndex: 0,
},
// 日历-边框
{
type: 'rect',
x: 280,
y: 10,
w: 60, // 宽度 必填
h: 80, // 高度 必填
zIndex: 99,
isFill: false, // 是否是填充矩形, false: 线性矩形
lineWidth: 1, // 当矩形为线性时,矩形的边框宽度
color: '#ffffff',
},
// 日历-线条
{
type: 'line',
zIndex: 99,
x: 280,
y: 62,
w: 60, // 宽度 默认整个画布的宽度 - x轴的距离
color: '#ffffff', // 颜色 默认#000000 在不考虑字节跳动小程序的前提下可简写(#000)
alpha: 1, // 透明度 默认1 取值范围 0~1
lineType: 'solid', // 线条类型 默认 solid: 实线 可选 dashed: 虚线
lineWidth: 1, // 线条高度
lineCap: 'butt' // 线条端点样式 默认 butt 可选 round, square
},
// 日历-年月
{
type: 'text',
x: 284,
y: 18,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.month,
color: '#ffffff',
font: {
size: 14
}
},
// 日历-日
{
type: 'text',
x: 298,
y: 40,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.day,
color: '#ffffff',
font: {
size: 18,
weight: 'bold'
}
},
// 日历-农历日期
{
type: 'text',
x: 282,
y: 70,
zIndex: 99,
w: width - (20 * 2),
text: date.lunar,
color: '#ffffff',
font: {
size: 14
}
},
// 用户昵称
{
type: 'text',
x: 86,
y: 600,
zIndex: 99,
w: width - (20 * 2),
text: name,
color: '#ffffff',
font: {
size: 16
}
},
// 邀请码
{
type: 'text',
x: 86,
y: 628,
zIndex: 99,
w: width - (20 * 2),
text: '邀请码:' + invite,
color: '#c4a1cb',
font: {
size: 14
}
},
// 用户头像
{
type: 'image',
x: 24,
y: 598,
src: avatar,
w: 46,
h: 46,
drawType: 'arc',
zIndex: 99,
borderWidth: 5, // 图片边框大小 默认0
borderColor: '#ffffff' // 图片边框颜色 默认无颜色
},
// 二维码
{
type: 'image',
x: 280,
y: 585,
w: 72,
h: 72,
zIndex: 99,
src: img
}
]
})
if (!res.success) return
this.posterImg = res.data
this.posterShow = true
},
// 保存图片
async saveImage() {
let {
posterImg
} = this
let res = await saveImageToPhotosAlbum(posterImg)
if (!res.success) return
showToast('保存成功,去相册分享给朋友吧')
this.posterShow = false
},
// 复制邀请码
copyCenter(e) {
console.log(e)
// e.slice(0,2) + '$InviTaTiOn$CoDe/$-?' + e.substring(2) // e.slice(0,2) + '$InviTaTiOn$CoDe/$-?' + e.substring(2)
uni.setClipboardData({ uni.setClipboardData({
data: e, data: e,
success(){ success() {
uni.showToast({ uni.showToast({
title: '邀请码已复制', title: '邀请码已复制',
icon : 'none' icon: 'none'
}) })
} }
}) })
}, },
// 切换海报背景index // 切换海报背景index
swiperChange(e) { swiperChange(e) {
this.codeIndex = e.detail.current this.codeIndex = e.detail.current
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content{ .content {
background: white; background: white;
padding: $padding 0; padding: $padding 0;
box-sizing: border-box; box-sizing: border-box;
min-height: 100vh; min-height: 100vh;
@extend .vertical; @extend .vertical;
} }
// 轮播 // 轮播
.code{ .code {
position: relative; position: relative;
width: 100%; width: 100%;
padding-top: calc(183% - 280rpx - #{$padding * 2}); padding-top: calc(183% - 280rpx - #{$padding * 2});
.code-swiper{
.code-swiper {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
.code-item{
.code-item {
height: 100%; height: 100%;
width: 100%; width: 100%;
padding: 0 $padding/2; padding: 0 $padding/2;
.code-lay{
.code-lay {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 10; z-index: 10;
} }
.code-back-image{
.code-back-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
} }
} }
// 提示信息 // 提示信息
.footer{ .footer {
padding: 0 $padding + 10; padding: 0 $padding + 10;
.hith{
.hith {
color: $text-gray; color: $text-gray;
font-size: $title-size-sm; font-size: $title-size-sm;
padding-top: $padding + 10; padding-top: $padding + 10;
} }
.number {
background-color: $border-color-lg; .number {
padding: $padding - 5; background-color: $border-color-lg;
margin: $margin + 20 0; padding: $padding - 5;
font-size: $title-size-lg; margin: $margin + 20 0;
border-radius: 8rpx; font-size: $title-size-lg;
display: flex; border-radius: 8rpx;
.title { display: flex;
flex: 1;
} .title {
.value { flex: 1;
font-size: $title-size-m; }
color: $text-price;
} .value {
} font-size: $title-size-m;
.button { color: $text-price;
background: $text-price; }
border-radius: 0; }
height: 90rpx;
line-height: 90rpx; .button {
font-size: $title-size; background: $text-price;
color: white; border-radius: 0;
text-align: center; height: 90rpx;
border-radius: 8rpx; line-height: 90rpx;
} font-size: $title-size;
color: white;
text-align: center;
border-radius: 8rpx;
}
// number // number
// title // title
// value // value
// button // button
// title // title
} }
// 头像昵称 // 头像昵称
.codeCont { .codeCont {
position: absolute; position: absolute;
left: 10rpx; left: 10rpx;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
padding: 16rpx 30rpx 20rpx; padding: 16rpx 30rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
z-index: 9; z-index: 9;
.codeCont-avatar {
width: 80rpx; .codeCont-avatar {
height: 80rpx; width: 80rpx;
border-radius: 50%; height: 80rpx;
border: 4rpx solid #FFFFFF; border-radius: 50%;
} border: 4rpx solid #FFFFFF;
.codeCont-text { }
position: absolute;
width: 100%; .codeCont-text {
left: 0; position: absolute;
top: 0; width: 100%;
padding: 14rpx 40rpx 0 140rpx; left: 0;
box-sizing: border-box; top: 0;
.codeCont-name { padding: 14rpx 40rpx 0 140rpx;
color: #FFFFFF; box-sizing: border-box;
font-size: $title-size;
margin-bottom: 10rpx; .codeCont-name {
} color: #FFFFFF;
.codeCont-number { font-size: $title-size;
font-size: $title-size-sm; margin-bottom: 10rpx;
display: flex; }
color: #c4a1cb;
} .codeCont-number {
} font-size: $title-size-sm;
.codeCont-img { display: flex;
width: 120rpx; color: #c4a1cb;
height: 120rpx; }
position: absolute; }
right: 50rpx;
bottom: 10rpx; .codeCont-img {
} width: 120rpx;
} height: 120rpx;
position: absolute;
right: 50rpx;
bottom: 10rpx;
}
}
// 日历 // 日历
.codDate { .codDate {
position: absolute; position: absolute;
top: 15rpx; top: 15rpx;
right: 70rpx; right: 70rpx;
z-index: 9; z-index: 9;
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
border: 2rpx solid #fffefc; border: 2rpx solid #fffefc;
.codDate-year {
padding-top: 5rpx; .codDate-year {
} padding-top: 5rpx;
.codDate-day { }
padding: 5rpx 0;
font-size: 32rpx; .codDate-day {
font-weight: 600; padding: 5rpx 0;
border-bottom: 2rpx solid #a980c6; font-size: 32rpx;
} font-weight: 600;
.codDate-lunar { border-bottom: 2rpx solid #a980c6;
font-size: 24rpx; }
transform: scale(.9);
padding: 4rpx 0; .codDate-lunar {
} font-size: 24rpx;
} transform: scale(.9);
padding: 4rpx 0;
// canvas }
.my-canvas{ }
width: 375px;
height: 667px; // canvas
position: fixed; .my-canvas {
top: -99999999999rpx; width: 375px;
left: -99999999999rpx; height: 667px;
z-index: -99999999999; position: fixed;
opacity: 0; top: -99999999999rpx;
} left: -99999999999rpx;
.posterBack { z-index: -99999999999;
width: 100%; opacity: 0;
height: 100%; }
position: fixed;
background-color: rgba(0,0,0,.7); .posterBack {
left: 0; width: 100%;
top: 0; height: 100%;
} position: fixed;
.poster{ background-color: rgba(0, 0, 0, .7);
width: 100vw; left: 0;
height: 100vh; top: 0;
display: flex; }
flex-flow: column nowrap;
justify-content: center; .poster {
overflow: hidden; width: 100vw;
position: fixed; height: 100vh;
top: 0; display: flex;
left: 0; flex-flow: column nowrap;
z-index: 9; justify-content: center;
&-img{ overflow: hidden;
width: 580rpx; position: fixed;
position: relative; top: 0;
margin: 70rpx auto 20rpx; left: 0;
.img{ z-index: 9;
width: 100%;
} &-img {
} width: 580rpx;
&-btn{ position: relative;
padding: 0 $padding * 2; margin: 70rpx auto 20rpx;
.operate {
width: 100%; .img {
margin-bottom: 20rpx; width: 100%;
height: 80rpx; }
line-height: 80rpx; }
border-radius: 40rpx;
display: inline-block; &-btn {
text-align: center; padding: 0 $padding * 2;
color: #fff;
&-cancel{ .operate {
background-color: $text-price; width: 100%;
} margin-bottom: 20rpx;
} height: 80rpx;
} line-height: 80rpx;
} border-radius: 40rpx;
display: inline-block;
text-align: center;
color: #fff;
&-cancel {
background-color: $text-price;
}
}
}
}
</style> </style>

View File

@@ -31063,7 +31063,9 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 45)); /* WEBPACK VAR INJECTION */(function(__f__) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 45));
@@ -31124,7 +31126,13 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
var _user = __webpack_require__(/*! @/apis/interfaces/user */ 59); var _user = __webpack_require__(/*! @/apis/interfaces/user */ 59);
var _util = __webpack_require__(/*! @/uni_modules/sakura-canvas/js_sdk/util */ 270); var _util = __webpack_require__(/*! @/uni_modules/sakura-canvas/js_sdk/util */ 270);
var _draw = _interopRequireDefault(__webpack_require__(/*! @/uni_modules/sakura-canvas/js_sdk/draw */ 272));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};} var _draw = _interopRequireDefault(__webpack_require__(/*! @/uni_modules/sakura-canvas/js_sdk/draw */ 272));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
var draw = null;var _default = var draw = null;var _default =
{ {
@@ -31178,8 +31186,13 @@ var draw = null;var _default =
h: 667 } });_context2.next = 9;return ( h: 667 } });_context2.next = 9;return (
draw.createdSharePoster(function (_ref) {var bgObj = _ref.bgObj;var draw.createdSharePoster(function (_ref)
width = bgObj.width,height = bgObj.height;
{var bgObj = _ref.bgObj;var
width =
bgObj.width,height = bgObj.height;
_this2.Popinvite = bgObj; _this2.Popinvite = bgObj;
// 绘制内容 // 绘制内容
return [ return [
@@ -31325,7 +31338,9 @@ var draw = null;var _default =
// 保存图片 // 保存图片
saveImage: function saveImage() {var _this3 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {var posterImg, res;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0: saveImage: function saveImage() {var _this3 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {var posterImg, res;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
posterImg = _this3.posterImg;_context3.next = 3;return (
posterImg =
_this3.posterImg;_context3.next = 3;return (
(0, _util.saveImageToPhotosAlbum)(posterImg));case 3:res = _context3.sent;if ( (0, _util.saveImageToPhotosAlbum)(posterImg));case 3:res = _context3.sent;if (
res.success) {_context3.next = 6;break;}return _context3.abrupt("return");case 6: res.success) {_context3.next = 6;break;}return _context3.abrupt("return");case 6:
(0, _util.showToast)('保存成功,去相册分享给朋友吧'); (0, _util.showToast)('保存成功,去相册分享给朋友吧');
@@ -31334,6 +31349,7 @@ var draw = null;var _default =
// 复制邀请码 // 复制邀请码
copyCenter: function copyCenter(e) { copyCenter: function copyCenter(e) {
__f__("log", e, " at pages/user/code.vue:287");
// e.slice(0,2) + '$InviTaTiOn$CoDe/$-?' + e.substring(2) // e.slice(0,2) + '$InviTaTiOn$CoDe/$-?' + e.substring(2)
uni.setClipboardData({ uni.setClipboardData({
data: e, data: e,
@@ -31350,6 +31366,7 @@ var draw = null;var _default =
swiperChange: function swiperChange(e) { swiperChange: function swiperChange(e) {
this.codeIndex = e.detail.current; this.codeIndex = e.detail.current;
} } };exports.default = _default; } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/lib/format-log.js */ 39)["default"]))
/***/ }), /***/ }),
/* 270 */ /* 270 */
@@ -42450,13 +42467,16 @@ var _index = __webpack_require__(/*! @/apis/index.js */ 25);function _interopReq
}, },
// 顶部菜单点击了分享功能 // 顶部菜单点击了分享功能
onNavigationBarButtonTap: function onNavigationBarButtonTap() { onNavigationBarButtonTap: function onNavigationBarButtonTap() {
__f__("log", '点击了分享功能。。。', " at pages/goods/details.vue:318"); var invite = this.goodsObj.user_invite || '';
var goods = '&GoodsId/$-?' + this.goodsObj.goods_id;
var shareCode = invite === '' ? goods : invite.slice(0, 2) + '$InviTaTiOn$CoDe/$-?' + invite.substring(2) + goods;
__f__("log", shareCode, " at pages/goods/details.vue:321");
uniShare.show({ uniShare.show({
content: { //公共的分享参数配置 类型type、链接herf、标题title、summary描述、imageUrl缩略图 content: {
type: 0, type: 0,
href: 'https://www.lianshang.vip/app?', href: 'https://www.lianshang.vip/app?parent_id=' + shareCode,
title: '链商星球共创未来,一起搭建链商经济的世界~', title: '链商星球 共创未来,一起搭建 链商经济的世界~',
summary: '链商星球app你值得拥有~天天签到领福利~', summary: '链商星球APP你值得拥有~每日签到领贡献值~',
imageUrl: _index.config.apiUrls + 'images/top_logo.png' }, imageUrl: _index.config.apiUrls + 'images/top_logo.png' },
menus: [{ menus: [{
@@ -42477,9 +42497,10 @@ var _index = __webpack_require__(/*! @/apis/index.js */ 25);function _interopReq
cancelText: "取消分享" }, cancelText: "取消分享" },
function (e) {//callback function (e) {
__f__("log", uniShare.isShow, " at pages/goods/details.vue:346"); if (uniShare.isShow) {
__f__("log", e, " at pages/goods/details.vue:347"); __f__("log", 'shareCode', shareCode, " at pages/goods/details.vue:350");
}
}); });
} } };exports.default = _default; } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/lib/format-log.js */ 39)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/lib/format-log.js */ 39)["default"]))