Authored by yyq

share info

... ... @@ -31,7 +31,8 @@
<a class="list clearfix" href="/3party/questionnaire">
<i class="tel-ico icon"></i>
<div>
<p class="title title-mid">调研中心</p>
<p class="title">调研中心</p>
<p class="tip">一起来参与,赢取更多惊喜!</p>
</div>
<i class="arr-ico iconfont">&#xe604;</i>
</a>
... ...
... ... @@ -2,7 +2,8 @@ require('3party/question-detail.page.css');
let $ = require('yoho-jquery'),
yoho = require('yoho-app'),
tipDg = require('plugin/tip');
tipDg = require('plugin/tip'),
share = require('common/share');
let question = {
$base: $('#qs-wrap'),
... ... @@ -11,20 +12,28 @@ let question = {
this.$item = $('.qs-item', this.$base);
this.startTime = Date.parse(new Date()) / 1000;
if (this.$base.length && yoho.isApp) {
if (this.$base.length) {
let data = this.$base.data();
yoho.ready(function() {
yoho.invokeMethod('get.pageType', {
pageType: 'questionnaire'
this.shareInfo = {
title: data.title,
link: 'http://m.yohobuy.com/3party/questionnaire/' + data.id,
desc: data.desc,
imgUrl: data.img
};
// 设置分享信息
share(this.shareInfo);
// 设置app页面信息及分享信息
if (yoho.isApp) {
yoho.ready(function() {
yoho.invokeMethod('get.pageType', {
pageType: 'questionnaire'
});
yoho.invokeMethod('set.shareInfo', this.shareInfo);
});
yoho.invokeMethod('set.shareInfo', {
title: data.title,
link: 'http://m.yohobuy.com/3party/questionnaire/' + data.id,
desc: data.desc,
imgUrl: data.img
});
});
}
}
this.bindEvent();
... ...