...
|
...
|
@@ -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,21 +12,29 @@ 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'
|
|
|
});
|
|
|
yoho.invokeMethod('set.shareInfo', {
|
|
|
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);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.bindEvent();
|
|
|
},
|
...
|
...
|
|