init
This commit is contained in:
10
xhs-mini-demos/component-case/share-detail/share-detail.css
Normal file
10
xhs-mini-demos/component-case/share-detail/share-detail.css
Normal file
@@ -0,0 +1,10 @@
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.view12 {
|
||||
display: none;
|
||||
font-size: larger;
|
||||
background-color: aqua;
|
||||
}
|
||||
26
xhs-mini-demos/component-case/share-detail/share-detail.js
Normal file
26
xhs-mini-demos/component-case/share-detail/share-detail.js
Normal file
@@ -0,0 +1,26 @@
|
||||
Page({
|
||||
data: {},
|
||||
onShareAppMessage(args) {
|
||||
console.log(' ==== onShareAppMessage 站内分享 log ===', args);
|
||||
const promise = new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
title: '这是测试 promise 转发标题',
|
||||
});
|
||||
}, 2000);
|
||||
});
|
||||
return {
|
||||
title: '这是测试转发标题',
|
||||
path: 'pages/index/detail?id=123',
|
||||
promise,
|
||||
};
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
console.log(' ==== onShareTimeline 微信朋友圈分享 log ===', res);
|
||||
return {
|
||||
title: '这是微信朋友圈测试标题',
|
||||
path: 'pages/index/detail?id=123',
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<view>
|
||||
<view>当前页面配置了 onShareTimeline, onShareAppMessage</view>
|
||||
|
||||
</view>
|
||||
Reference in New Issue
Block a user