-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfoo.vue
88 lines (68 loc) · 1.76 KB
/
foo.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<template>
<div>
<div class="share">
<text class="stxt" @click="text">文本分享</text>
</div>
<div class="share">
<text class="stxt" @click="img">图片分享</text>
</div>
<div class="share">
<text class="stxt" @click="music">音乐分享</text>
</div>
<div class="share">
<text class="stxt" @click="video">视频分享</text>
</div>
<div class="share">
<text class="stxt" @click="webpage">网页分享</text>
</div>
</div>
</template>
<script>
var share=weex.requireModule('sharemodule');
var textShare={scene:1,title:'标题',
descrption:'描述','text':"大家好"};
var imageShare={
scene:0,title:'标题',sharetype:2,
'thumb':"https://f11.baidu.com/it/u=3370260265,1231552087&fm=72",
descrption:'描述','text':"hellorold",'img':"https://f11.baidu.com/it/u=3370260265,1231552087&fm=72"};
var webShare={
scene:1,title:'标题web',sharetype:5,
'thumb':"https://f11.baidu.com/it/u=3370260265,1231552087&fm=72",
descrption:'描述web','weburl':"https://www.sxnxl.com/wap"};
module.exports = {
methods: {
text: function() {
share.share(1,textShare);
alert.toast({
message: 'This is a toast',
duration: 0.3
})
},
img: function() {
share.share(1,imageShare);
// share.share('1',{});
},
music: function() {
// share.share('1',{});
},
video: function() {
// share.share('1',{});
},
webpage: function() {
share.share('1',webShare);
}
}
}
</script>
<style scoped>
.stxt{
text-align: center;
line-height: 50px;
font-size: 50px;
}
.share{
width: 750px;
height: 100px;
border-width: 2px;
}
</style>