xiaoe_mp_npm 0.1.4 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miniprogram_dist/SharePoster/PosterDom/index.js +37 -2
- package/miniprogram_dist/SharePoster/PosterDom/index.wxml +2 -2
- package/miniprogram_dist/SharePoster/PosterDom/index.wxss +3 -3
- package/miniprogram_dist/SharePoster/components/saveTip/index.js +40 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.less +0 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.wxml +6 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.wxss +21 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.js +38 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.less +0 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.wxml +9 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.wxss +45 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.js +35 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.wxml +5 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.wxss +35 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.js +35 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.wxml +11 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.wxss +51 -0
- package/miniprogram_dist/SharePoster/sharePopup/index.js +327 -5
- package/miniprogram_dist/SharePoster/sharePopup/index.json +5 -1
- package/miniprogram_dist/SharePoster/sharePopup/index.wxml +37 -28
- package/miniprogram_dist/SharePoster/sharePopup/index.wxss +27 -13
- package/package.json +1 -1
- package/src/SharePoster/PosterDom/index.js +37 -2
- package/src/SharePoster/PosterDom/index.wxml +2 -2
- package/src/SharePoster/PosterDom/index.wxss +3 -3
- package/src/SharePoster/components/saveTip/index.js +40 -0
- package/src/SharePoster/components/saveTip/index.json +5 -0
- package/src/SharePoster/components/saveTip/index.less +0 -0
- package/src/SharePoster/components/saveTip/index.wxml +6 -0
- package/src/SharePoster/components/saveTip/index.wxss +21 -0
- package/src/SharePoster/components/settingModal/index.js +38 -0
- package/src/SharePoster/components/settingModal/index.json +5 -0
- package/src/SharePoster/components/settingModal/index.less +0 -0
- package/src/SharePoster/components/settingModal/index.wxml +9 -0
- package/src/SharePoster/components/settingModal/index.wxss +46 -0
- package/src/SharePoster/components/shareCircleTip/index.js +35 -0
- package/src/SharePoster/components/shareCircleTip/index.json +5 -0
- package/src/SharePoster/components/shareCircleTip/index.wxml +5 -0
- package/src/SharePoster/components/shareCircleTip/index.wxss +35 -0
- package/src/SharePoster/components/unauthorizedModal/index.js +35 -0
- package/src/SharePoster/components/unauthorizedModal/index.json +5 -0
- package/src/SharePoster/components/unauthorizedModal/index.wxml +11 -0
- package/src/SharePoster/components/unauthorizedModal/index.wxss +52 -0
- package/src/SharePoster/sharePopup/index.js +327 -5
- package/src/SharePoster/sharePopup/index.json +5 -1
- package/src/SharePoster/sharePopup/index.wxml +37 -28
- package/src/SharePoster/sharePopup/index.wxss +27 -13
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import objToPoster from '../createPoster/index'
|
|
2
2
|
import { posterInfo } from '../libs/positionMap';
|
|
3
3
|
import { TYPES,POSTER_CLS, } from '../libs/constant';
|
|
4
|
+
import { sensorLog } from "live-mp-tools";
|
|
4
5
|
const computedBehavior = require('miniprogram-computed').behavior;
|
|
5
6
|
const POSTER_WIDTH = 750;
|
|
6
7
|
const POSTER_HEIGHT = 1344;
|
|
@@ -39,6 +40,14 @@ Component({
|
|
|
39
40
|
showPopup:{
|
|
40
41
|
type: Boolean,
|
|
41
42
|
value: false
|
|
43
|
+
},
|
|
44
|
+
sensorReportParams: {
|
|
45
|
+
type: Object,
|
|
46
|
+
value: () => {}
|
|
47
|
+
},
|
|
48
|
+
roomInfo: {
|
|
49
|
+
type: Object,
|
|
50
|
+
value: () => {}
|
|
42
51
|
}
|
|
43
52
|
},
|
|
44
53
|
observers: {
|
|
@@ -88,6 +97,7 @@ Component({
|
|
|
88
97
|
posterItemData:{},
|
|
89
98
|
posterStyle:"",
|
|
90
99
|
defaultAvatarUrl: 'https://wechatavator-1252524126.cos.ap-shanghai.myqcloud.com/dasda.jpg',
|
|
100
|
+
longPressCount: 0
|
|
91
101
|
},
|
|
92
102
|
computed:{
|
|
93
103
|
posterData(data) {
|
|
@@ -180,6 +190,31 @@ Component({
|
|
|
180
190
|
* 组件的方法列表
|
|
181
191
|
*/
|
|
182
192
|
methods: {
|
|
193
|
+
longPress() {
|
|
194
|
+
try{
|
|
195
|
+
let params = {
|
|
196
|
+
page_id: 'e_alive#mini#first#alive_room',
|
|
197
|
+
l_program: '鹅直播',
|
|
198
|
+
page_name: '直播间页面',
|
|
199
|
+
page_path: '鹅直播#小程序#首页#直播间页面',
|
|
200
|
+
app_id: this.properties.roomInfo.appId,
|
|
201
|
+
page_button: "长按保存海报",
|
|
202
|
+
c_user_id: this.properties.roomInfo.userId,
|
|
203
|
+
union_id:this.properties.roomInfo.unionId,
|
|
204
|
+
resource_id: this.properties.roomInfo.aliveId,
|
|
205
|
+
current_role:this.properties.sensorReportParams.current_role,
|
|
206
|
+
type:this.properties.sensorReportParams.type,
|
|
207
|
+
cmm1:this.properties.sensorReportParams.alive_type,
|
|
208
|
+
cmm2:this.properties.sensorReportParams.version_type,
|
|
209
|
+
comm2:this.properties.sensorReportParams.pay_type,
|
|
210
|
+
cmm3:'鹅直播增长'
|
|
211
|
+
}
|
|
212
|
+
sensorLog.sensors.track('click_butt', params);
|
|
213
|
+
console.log("当前长按了 保存图片" + Number(++this.data.longPressCount) +"次",params);
|
|
214
|
+
}catch(e) {
|
|
215
|
+
console.log("埋点", e)
|
|
216
|
+
}
|
|
217
|
+
},
|
|
183
218
|
getPosterData() {
|
|
184
219
|
let temInfo = this.data.posterItemData;
|
|
185
220
|
let defaultPoster = this.data.posterMapInfo[this.data.posterItemData.default_poster_mark];
|
|
@@ -311,7 +346,7 @@ Component({
|
|
|
311
346
|
isSwitchBtnShow: isShow,
|
|
312
347
|
isVisible: false
|
|
313
348
|
})
|
|
314
|
-
that.triggerEvent('drawPosterFulfilled');
|
|
349
|
+
that.triggerEvent('drawPosterFulfilled', that.imageUrl);
|
|
315
350
|
}
|
|
316
351
|
}else{
|
|
317
352
|
that.wxWriteFile(response,random)
|
|
@@ -365,7 +400,7 @@ Component({
|
|
|
365
400
|
this.setData({
|
|
366
401
|
isSwitchBtnShow:isShow
|
|
367
402
|
})
|
|
368
|
-
this.triggerEvent('drawPosterFulfilled');
|
|
403
|
+
this.triggerEvent('drawPosterFulfilled', this.data.imageUrl);
|
|
369
404
|
},
|
|
370
405
|
fail:(error)=>{
|
|
371
406
|
console.log(error);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<view>
|
|
3
3
|
<canvas class="canvasPosition" wx-if="{{isVisible}}" type="2d" style="height: 1344px; width:750px;" id='customCanvas'></canvas>
|
|
4
4
|
</view>
|
|
5
|
-
<view class="posterDetail
|
|
6
|
-
<image lazy-load="true" class="posterContent" src="{{imageUrl}}" show-menu-by-longpress="true" alt=""></image>
|
|
5
|
+
<view class="posterDetail">
|
|
6
|
+
<image lazy-load="true" class="posterContent" src="{{imageUrl}}" show-menu-by-longpress="true" alt="" bindlongpress="longPress"></image>
|
|
7
7
|
<view class="saveDes">
|
|
8
8
|
<image class="finger-print" src="../../common/assets/images/fingerprint.png"></image>
|
|
9
9
|
<view>长按上方图片保存并分享</view>
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
position: fixed;
|
|
8
8
|
left: 50%;
|
|
9
9
|
transform: translateX(-50%);
|
|
10
|
-
bottom:
|
|
10
|
+
bottom: 512rpx;
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
}
|
|
14
14
|
.posterDetail .posterContent {
|
|
15
|
-
height: calc(100vh -
|
|
15
|
+
height: calc(100vh - 616rpx);
|
|
16
16
|
border-radius: 16rpx;
|
|
17
17
|
box-shadow: 0rpx 12rpx 20rpx 0rpx rgba(0, 0, 0, 0.08);
|
|
18
|
-
width: calc((100vh -
|
|
18
|
+
width: calc((100vh - 616rpx)*9/16);
|
|
19
19
|
}
|
|
20
20
|
.posterDetail .saveDes .finger-print,
|
|
21
21
|
.posterDetail .switch-motive-btn .finger-print,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
/**
|
|
3
|
+
* 组件的属性列表
|
|
4
|
+
*/
|
|
5
|
+
properties: {
|
|
6
|
+
firstContent: {
|
|
7
|
+
type: String,
|
|
8
|
+
value: ''
|
|
9
|
+
},
|
|
10
|
+
secondContent: {
|
|
11
|
+
type: String,
|
|
12
|
+
value: ''
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 组件的初始数据
|
|
18
|
+
*/
|
|
19
|
+
data: {
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 生命周期函数--监听页面显示
|
|
24
|
+
*/
|
|
25
|
+
ready: function () {
|
|
26
|
+
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 计算属性
|
|
31
|
+
*/
|
|
32
|
+
computed: {
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 组件的方法列表
|
|
37
|
+
*/
|
|
38
|
+
methods: {
|
|
39
|
+
}
|
|
40
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.setting-modal {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 999;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
.content-box {
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
13
|
+
padding: 24rpx 32rpx;
|
|
14
|
+
border-radius: 8rpx;
|
|
15
|
+
margin-bottom: 176rpx;
|
|
16
|
+
font-size: 28rpx;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 40rpx;
|
|
19
|
+
color: #fff;
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
/**
|
|
3
|
+
* 组件的属性列表
|
|
4
|
+
*/
|
|
5
|
+
properties: {
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 组件的初始数据
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 生命周期函数--监听页面显示
|
|
16
|
+
*/
|
|
17
|
+
ready: function () {
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 计算属性
|
|
23
|
+
*/
|
|
24
|
+
computed: {
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 组件的方法列表
|
|
29
|
+
*/
|
|
30
|
+
methods: {
|
|
31
|
+
closeModal() {
|
|
32
|
+
this.triggerEvent('close')
|
|
33
|
+
},
|
|
34
|
+
confirm(){
|
|
35
|
+
this.triggerEvent('confirm')
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<view class="setting-modal" catchtap="closeModal">
|
|
2
|
+
<view class="content-box" catchtap>
|
|
3
|
+
<view class="content">无法访问相册,请前往设置允许鹅直播访问你的照片</view>
|
|
4
|
+
<view class="btn">
|
|
5
|
+
<view class="cancel" catchtap="closeModal">取消</view>
|
|
6
|
+
<view class="confirm" catchtap="confirm">去设置</view>
|
|
7
|
+
</view>
|
|
8
|
+
</view>
|
|
9
|
+
</view>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.setting-modal {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 999;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
background: rgba(0, 0, 0, 0.4);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
.content-box {
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
width: 576rpx;
|
|
15
|
+
border-radius: 16rpx;
|
|
16
|
+
margin-bottom: 176rpx;
|
|
17
|
+
}
|
|
18
|
+
.content-box .content {
|
|
19
|
+
padding: 48rpx;
|
|
20
|
+
font-size: 28rpx;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
line-height: 40rpx;
|
|
23
|
+
color: #000;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
.content-box .btn {
|
|
27
|
+
display: flex;
|
|
28
|
+
}
|
|
29
|
+
.content-box .btn .cancel,
|
|
30
|
+
.content-box .btn .confirm {
|
|
31
|
+
flex: 1;
|
|
32
|
+
height: 96rpx;
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
color: #999;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
}
|
|
39
|
+
.content-box .btn .cancel {
|
|
40
|
+
box-shadow: inset 0 0.1rpx 0 0 #ebebeb;
|
|
41
|
+
}
|
|
42
|
+
.content-box .btn .confirm {
|
|
43
|
+
color: #1472FF;
|
|
44
|
+
box-shadow: inset 0 0.1rpx 0 0 #ebebeb, inset 0.1rpx 0 0 0 #ebebeb;
|
|
45
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
/**
|
|
3
|
+
* 组件的属性列表
|
|
4
|
+
*/
|
|
5
|
+
properties: {
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 组件的初始数据
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 生命周期函数--监听页面显示
|
|
16
|
+
*/
|
|
17
|
+
ready: function () {
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 计算属性
|
|
23
|
+
*/
|
|
24
|
+
computed: {
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 组件的方法列表
|
|
29
|
+
*/
|
|
30
|
+
methods: {
|
|
31
|
+
closeModal() {
|
|
32
|
+
this.triggerEvent('close')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.setting-modal {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 999;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
background: rgba(0, 0, 0, 0.4);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
.instructor {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 16rpx;
|
|
15
|
+
color: #fff;
|
|
16
|
+
border-radius: 8rpx;
|
|
17
|
+
background-color: #1472FF;
|
|
18
|
+
padding: 24rpx 32rpx;
|
|
19
|
+
font-size: 28rpx;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
line-height: 44rpx;
|
|
22
|
+
box-shadow: 0 -4rpx 80rpx 0 rgba(51, 51, 51, 0.2);
|
|
23
|
+
}
|
|
24
|
+
.instructor:after {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: -30rpx;
|
|
28
|
+
right: 60rpx;
|
|
29
|
+
border: 16rpx solid #1472FF;
|
|
30
|
+
border-color: transparent;
|
|
31
|
+
border-bottom-color: #1472FF;
|
|
32
|
+
}
|
|
33
|
+
.instructor .share-tip {
|
|
34
|
+
width: 624rpx;
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
/**
|
|
3
|
+
* 组件的属性列表
|
|
4
|
+
*/
|
|
5
|
+
properties: {
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 组件的初始数据
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 生命周期函数--监听页面显示
|
|
16
|
+
*/
|
|
17
|
+
ready: function () {
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 计算属性
|
|
23
|
+
*/
|
|
24
|
+
computed: {
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 组件的方法列表
|
|
29
|
+
*/
|
|
30
|
+
methods: {
|
|
31
|
+
closeModal() {
|
|
32
|
+
this.triggerEvent('close')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
})
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<view class="setting-modal" catchtap="closeModal">
|
|
2
|
+
<view class="main-box">
|
|
3
|
+
<view class="content-box" catchtap>
|
|
4
|
+
<view class="title">无法保存</view>
|
|
5
|
+
<view class="content">请在iPhone的“设置-隐私-照片”选项中,允许微信访问你的照片。</view>
|
|
6
|
+
</view>
|
|
7
|
+
<view class="btn">
|
|
8
|
+
<view class="cancel" catchtap="closeModal">好</view>
|
|
9
|
+
</view>
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.setting-modal {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 999;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
background: rgba(0, 0, 0, 0.4);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
.main-box {
|
|
13
|
+
width: 576rpx;
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
border-radius: 16rpx;
|
|
16
|
+
margin-bottom: 176rpx;
|
|
17
|
+
}
|
|
18
|
+
.content-box {
|
|
19
|
+
background-color: #fff;
|
|
20
|
+
border-radius: 16rpx;
|
|
21
|
+
padding: 48rpx;
|
|
22
|
+
}
|
|
23
|
+
.setting-modal .title {
|
|
24
|
+
color: #333;
|
|
25
|
+
font-size: 32rpx;
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
text-align: center;
|
|
28
|
+
line-height: 48rpx;
|
|
29
|
+
margin-bottom: 16rpx;
|
|
30
|
+
}
|
|
31
|
+
.content-box .content {
|
|
32
|
+
font-size: 28rpx;
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
line-height: 40rpx;
|
|
35
|
+
color: #666;
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
.setting-modal .btn {
|
|
39
|
+
display: flex;
|
|
40
|
+
}
|
|
41
|
+
.setting-modal .btn .cancel {
|
|
42
|
+
flex: 1;
|
|
43
|
+
height: 96rpx;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
align-items: center;
|
|
47
|
+
color: #1472FF;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
line-height: 48rpx;
|
|
50
|
+
box-shadow: inset 0 0.1rpx 0 0 #ebebeb;
|
|
51
|
+
}
|