Authored by 杨延青

Merge branch 'feature/0430' into 'release/6.9.2'

Feature/0430



See merge request !64
... ... @@ -31,6 +31,7 @@ export default {
},
created() {
this.id = +this.$route.params.id;
this.columnType = +this.$route.query.columnType || 1001;
},
activated() {
let {columnType} = this.$route.query;
... ... @@ -52,7 +53,8 @@ export default {
return this.fetchArticleList({
articleId,
limit: 2,
thumb: true
thumb: true,
columnType: this.columnType
});
},
computed: {
... ...
... ... @@ -18,6 +18,7 @@
</template>
<script>
import {get} from 'lodash';
export default {
data() {
return {
... ... @@ -42,10 +43,14 @@ export default {
let style = {};
let stepPercent = this.stepPercent;
if (this.offsetLeft) {
if (!this.offsetLeft) {
this.updateTitleOffset();
}
if (get(this, '$yoho.isiOS')) {
style.transform = `translate3d(${-stepPercent * this.offsetLeft}px, 0, 0)`;
} else {
this.updateTitleOffset();
style.transform = `translate3d(${this.stepPercent > 0.86 ? -this.offsetLeft : 0}px, 0, 0)`;
}
return style;
... ...
... ... @@ -14,6 +14,14 @@ let jsApiList = [
'onMenuShareQZone'
];
const setWxShareData = function() {
window.wx.onMenuShareTimeline(shareData);
window.wx.onMenuShareAppMessage(shareData);
window.wx.onMenuShareQQ(shareData);
window.wx.onMenuShareQZone(shareData);
window.wx.onMenuShareWeibo(shareData);
};
function loadScript(url, success) {
const head = document.getElementsByTagName('head')[0];
let script = document.createElement('script');
... ... @@ -80,6 +88,10 @@ function init(qs) {
signature: res.signature,
jsApiList: jsApiList
});
window.wx.ready(function() {
setWxShareData();
});
}
})
});
... ... @@ -103,12 +115,18 @@ export default {
setShareInfo(data) {
Object.assign(shareData, data);
shareData.link = shareData.link || location.href;
if (window.wx) {
setWxShareData();
}
setTimeout(function() {
window.setShareInfo({
title: shareData.title,
summary: shareData.desc,
pic: shareData.imgUrl,
url: shareData.link || location.href
url: shareData.link
});
}, window.setShareInfo ? 0 : 300);
}
... ...