|
|
import 'activity/coupon-list.page.css';
|
|
|
import $ from 'yoho-jquery';
|
|
|
import Page from 'yoho-page';
|
|
|
import share from 'common/share';
|
|
|
import yoho from 'yoho-app';
|
|
|
|
|
|
class CouponList extends Page {
|
|
|
constructor() {
|
...
|
...
|
@@ -18,8 +20,28 @@ class CouponList extends Page { |
|
|
|
|
|
init() {
|
|
|
this.bindEvents();
|
|
|
this.setShare();
|
|
|
}
|
|
|
|
|
|
setShare() {
|
|
|
let shareInfo = {
|
|
|
title: '假装这是一个很酷的主标题',
|
|
|
link: location.href,
|
|
|
desc: '假装这是一个很酷的副标题',
|
|
|
imgUrl: 'http://img11.static.yhbimg.com/taobaocms/2017/01/17/16/0108d724a0ef1f001d3ee6010aa79d960e.png'
|
|
|
};
|
|
|
|
|
|
if (yoho.isApp) {
|
|
|
yoho.ready(function() {
|
|
|
yoho.invokeMethod('get.pageType', {
|
|
|
pageType: 'questionnaire'
|
|
|
});
|
|
|
yoho.invokeMethod('set.shareInfo', shareInfo);
|
|
|
});
|
|
|
} else {
|
|
|
share(shareInfo);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
bindEvents() {
|
|
|
this.selector.$receiveTarget.on('click', this.receive.bind(this));
|
...
|
...
|
|