Authored by yyq

lint

Showing 35 changed files with 204 additions and 211 deletions
... ... @@ -37,11 +37,11 @@ export default {
}
});
const statusBarColor = get(this.$route, 'meta.statusBarColor');
const barColor = get(this.$route, 'meta.statusBarColor');
if (statusBarColor) {
if (barColor) {
this.SET_STATUS_BAR_COLOR({
color: statusBarColor
color: barColor
});
}
... ... @@ -50,9 +50,7 @@ export default {
const {statusBarColor} = this.yoho.window || {};
if (isApp && isiOS && !document.hidden && statusBarColor) {
this.$yoho.setStatusBar({
statusBarColor: statusBarColor
});
this.$yoho.setStatusBar({statusBarColor});
}
});
... ...
... ... @@ -41,7 +41,7 @@ export default {
...mapState(['yoho']),
statusBarHeight() {
if (this.yoho.window && this.yoho.window.statusBarStatus && this.yoho.window.statusBarHeight) {
return {paddingTop: this.yoho.window.statusBarHeight + 'px'}
return {paddingTop: this.yoho.window.statusBarHeight + 'px'};
}
return {};
... ...
... ... @@ -32,7 +32,7 @@
</template>
<script>
import {throttle, get} from 'lodash';
import {throttle} from 'lodash';
import {Loading} from 'cube-ui';
const EVENT_SCROLL = 'scroll';
... ... @@ -181,6 +181,7 @@ export default {
}
let lastIndex = list.length;
if (this.cols > 1) {
lastIndex = Math.max.apply(null, [1, list.length - Math.floor(this.cols * 2)]);
}
... ... @@ -220,7 +221,7 @@ export default {
cur.top = dom[0].offsetTop;
}
} catch (error) {
const message = `cur_${typeof cur}, dom_ ${typeof dom}, column_${i}, index_ ${index}, length_ ${this.items.length}, ${error ? error.message : ''}`;
const message = `cur_${typeof cur}, dom_ ${typeof dom}, column_${i}, index_ ${k}, length_ ${this.items.length}, ${error ? error.message : ''}`;
throw new Error(message);
}
... ... @@ -248,7 +249,7 @@ export default {
setTimeout(() => {
this.$nextTick(() => {
r();
this.colsHeight[index] = this.$refs['col'+index][0].offsetHeight;
this.colsHeight[index] = this.$refs['col' + index][0].offsetHeight;
});
}, 100);
});
... ...
... ... @@ -12,53 +12,53 @@
</template>
<script>
export default {
name: 'WidgetAvatarGroup',
props: {
avatars: Array,
option: {
type: Object,
default() {
return {
srcKey: 'src',
maxDisplayNum: 0
};
}
}
},
data() {
return {
hasMore: false
export default {
name: 'WidgetAvatarGroup',
props: {
avatars: Array,
option: {
type: Object,
default() {
return {
srcKey: 'src',
maxDisplayNum: 0
};
}
},
computed: {
avatarList() {
let list = [];
let length = this.avatars && this.avatars.length;
if (this.option.maxDisplayNum > 0 && this.avatars.length > this.option.maxDisplayNum) {
length = this.option.maxDisplayNum;
this.hasMore = true;
}
}
},
data() {
return {
hasMore: false
};
},
computed: {
avatarList() {
let list = [];
let length = this.avatars && this.avatars.length;
for (let i = 0; i < length; i++) {
let avt = this.avatars[i];
let src = avt;
if (this.option.maxDisplayNum > 0 && this.avatars.length > this.option.maxDisplayNum) {
length = this.option.maxDisplayNum;
this.hasMore = true;
}
if (this.option.srcKey && typeof avt !== 'string') {
src = avt[this.option.srcKey] || '';
}
for (let i = 0; i < length; i++) {
let avt = this.avatars[i];
let src = avt;
list.push({
src: src,
style: `z-index: ${length - i};`
});
if (this.option.srcKey && typeof avt !== 'string') {
src = avt[this.option.srcKey] || '';
}
return list;
list.push({
src: src,
style: `z-index: ${length - i};`
});
}
return list;
}
};
}
};
</script>
<style type="css">
... ...
... ... @@ -27,7 +27,7 @@ export default {
return {
imgSrc: this.src,
defaultSrc: '//img12.static.yhbimg.com/article/2019/02/26/16/02456ade977d8dfdbc4ca548b196c1d62b.png?imageView/2/w/{width}/h/{height}'
}
};
},
computed: {
imageSrc() {
... ...
... ... @@ -18,7 +18,7 @@ import {forEach, fill} from 'lodash';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('user');
const {mapActions: articleMapActions} = createNamespacedHelpers('article');
import cookie from 'yoho-cookie';
import YAS from 'utils/yas-constants';
import lottieJson from '../../statics/lottie/list-heart.json';
... ... @@ -42,18 +42,18 @@ const classMap = {
};
const defaultOption = {
canSelect: true, // 是否支持选中
selected: false, // 初始选中状态(不受是否支持选中控制)
color: '#444', // btn字体颜色
selectedColor: '#d90025', // btn选中状态字体颜色(不设置默认与非选中一致)
iconBold: false, // icon粗体
iconFontSize: 48, // icon字号(单位px)
textSelectedColor: '#444', // text选中状态字体颜色(不设置默认与selectedColor一致)
textFontSize: 20, // text字号(单位px)
textAlign: 'top', // text位置, 默认normal(支持normal, top, bottom)
textZoom: 0.9, // text缩放
textAutoChange: true, // text自动增减,只支持number类型(受是否支持选中控制)
emitName: '' // 点击触发事件名称
canSelect: true, // 是否支持选中
selected: false, // 初始选中状态(不受是否支持选中控制)
color: '#444', // btn字体颜色
selectedColor: '#d90025', // btn选中状态字体颜色(不设置默认与非选中一致)
iconBold: false, // icon粗体
iconFontSize: 48, // icon字号(单位px)
textSelectedColor: '#444', // text选中状态字体颜色(不设置默认与selectedColor一致)
textFontSize: 20, // text字号(单位px)
textAlign: 'top', // text位置, 默认normal(支持normal, top, bottom)
textZoom: 0.9, // text缩放
textAutoChange: true, // text自动增减,只支持number类型(受是否支持选中控制)
emitName: '' // 点击触发事件名称
};
export default {
... ... @@ -142,7 +142,7 @@ export default {
let textZoom = this.viewOption.textZoom;
if (Number(textZoom) !== NaN) {
if (!isNaN(Number(textZoom))) {
style += ` transform: scale(${textZoom}, ${textZoom});`;
}
... ... @@ -199,7 +199,7 @@ export default {
this.viewOption = {...this.viewOption};
},
setCurrentClass() {
let currentClass = classMap[this.type] || classMap['fav'];
let currentClass = classMap[this.type] || classMap.fav;
currentClass = {...currentClass};
currentClass.selected = currentClass.selected || currentClass.default;
... ...
... ... @@ -11,7 +11,7 @@ export default {
required: true
}
},
data () {
data() {
return {
style: {
width: '100%',
... ... @@ -19,7 +19,7 @@ export default {
overflow: 'hidden',
margin: '0 auto'
}
}
};
},
methods: {
init() {
... ...
... ... @@ -67,7 +67,7 @@ export default {
articleId: this.id,
singleDetail: 'Y',
thumb: true
})
});
}
return;
... ...
... ... @@ -85,6 +85,7 @@ export default {
this.$sdk.getUser().then(user => {
if (user && user.uid) {
this.userUid = +user.uid;
// this.fetchArticleProductFavs({
// articles: result.data.detailList
// });
... ...
... ... @@ -71,7 +71,7 @@ export default {
let line = 0;
let textArr = [];
forEach(this.trimIntro, (val, index) => {
forEach(this.trimIntro, (val) => {
let isEnter = /(\r\n)|(\n)/.test(val);
textArr[line] = textArr[line] || '';
... ...
... ... @@ -23,7 +23,7 @@ export default {
}
},
share: Boolean,
posId: {
posId: {
type: Number,
default() {
return 0;
... ...
... ... @@ -22,7 +22,7 @@
</template>
<script>
import {get, round} from 'lodash';
import {get} from 'lodash';
import YAS from 'utils/yas-constants';
import {getArticleImageSize} from 'utils/image-handler';
... ... @@ -34,7 +34,7 @@ export default {
data() {
return {
imgWidth: 500
}
};
},
props: {
data: {
... ... @@ -74,7 +74,7 @@ export default {
return img;
},
intro() {
return get(get(this.data, 'blockList', []).filter(block => block.templateKey === 'text'), '[0].contentData', this.data.content)
return get(get(this.data, 'blockList', []).filter(block => block.templateKey === 'text'), '[0].contentData', this.data.content);
},
actionUrl() {
if (this.data.sort === 3) {
... ...
... ... @@ -31,7 +31,7 @@ export default {
return this.defaultWidth / this.part;
},
height() {
return this.width * this.data.imageHeight / this.data.imageWidth;
return this.width * this.data.imageHeight / this.data.imageWidth;
},
blockStyle() {
return {height: this.height / 40 + 'rem'};
... ...
... ... @@ -130,7 +130,7 @@ export default {
headerFollowClass() {
return {
invisible: (this.currentAuthor.isAuthor === 'Y' || this.currentAuthor.hasAttention === 'Y')
}
};
}
},
methods: {
... ... @@ -247,7 +247,7 @@ export default {
if (data.authorUid === this.currentAuthor.authorUid) {
this.currentAuthor.hasAttention = follow ? 'Y' : 'N';
}
this.CHANGE_AUTHOR_FOLLOW({authorUid: data.authorUid, authorType: data.authorType, follow, type: this.type});
this.CHANGE_AUTHOR_FOLLOW({authorUid: data.authorUid, authorType: data.authorType, follow, type: this.type});
},
onResize(index) {
this.$nextTick(() => {
... ...
... ... @@ -37,7 +37,7 @@ export default {
optionFav() {
return {
selected: this.hasFavor === 'Y'
}
};
}
},
methods: {
... ...
... ... @@ -25,7 +25,7 @@ export default {
color: '#fff',
iconBold: true
}
}
};
},
props: [
'data',
... ... @@ -42,10 +42,10 @@ export default {
return {
background: `rgba(255,255,255,${this.stepPercent})`
}
};
},
blockTranslateY() {
return '-' + parseInt(`0${this.titleStep}`, 10) + '%';
return '-' + parseInt(`0${this.titleStep}`, 10) + '%';
}
},
mounted() {
... ...
... ... @@ -34,7 +34,7 @@ export default {
isIntroExpand: false,
isIntroAnimateing: false,
canRetract: false,
}
};
},
watch: {
'data.intro': function() {
... ... @@ -55,7 +55,7 @@ export default {
let line = 0;
let textArr = [];
forEach(this.trimIntro, (val, index) => {
forEach(this.trimIntro, (val) => {
let isEnter = /(\r\n)|(\n)/.test(val);
textArr[line] = textArr[line] || '';
... ...
... ... @@ -50,7 +50,7 @@
</template>
<script>
import {get, floor} from 'lodash';
import {floor} from 'lodash';
import ArticleItemHeader from '../article/article-item-header';
import ArticleItemTopics from '../article/article-item-topics';
import ArticleDetailFooter from './article-footer';
... ... @@ -84,8 +84,6 @@ export default {
};
},
mounted() {
let {clientHeight, clientWidth} = document.documentElement;
if (!this.$yoho.isiOS) {
this.downgrade = true;
}
... ... @@ -160,7 +158,7 @@ export default {
}
if (top && height) {
if (scrollTop >= top + height) {
if (scrollTop >= top + height) {
return 100;
} else if (scrollTop > top) {
let step = Math.round((scrollTop - top) / height * 100);
... ... @@ -197,7 +195,7 @@ export default {
praiseCount: this.articleState.praiseCount,
commentCount: this.articleState.commentCount,
hasFavor: this.articleState.hasFavor,
hasPraise: this.articleState.hasPraise,
hasPraise: this.articleState.hasPraise,
articleId: this.data.articleId
};
},
... ...
... ... @@ -90,7 +90,7 @@ export default {
commentPage: 1,
commentFetching: false,
showCommentMore: false
}
};
},
computed: {
...mapState(['articleStates', 'authorStates']),
... ... @@ -152,7 +152,7 @@ export default {
praiseCount: this.articleState.praiseCount,
commentCount: this.articleState.commentCount,
hasFavor: this.articleState.hasFavor,
hasPraise: this.articleState.hasPraise,
hasPraise: this.articleState.hasPraise,
articleId: this.data.articleId
};
},
... ...
... ... @@ -49,7 +49,7 @@ export default {
onFetching: false,
showMore: false,
moreCommentNum: 0
}
};
},
mounted() {
if (!this.yoho.context.userHeadIco) {
... ... @@ -116,10 +116,8 @@ export default {
}, this.page > 1 ? 800 : 0);
},
onReply({comment}) {
const parentId = comment.rootId || comment.parentId;
forEach(this.commentList, (val, index) => {
if (val.parentComment && val.parentComment.id == comment.parentId) {
forEach(this.commentList, (val) => {
if (val.parentComment && +val.parentComment.id === +comment.parentId) {
val.childrenComments.unshift(Object.assign(comment, {
id: comment.destId,
destId: this.articleId,
... ...
... ... @@ -104,13 +104,13 @@ export default {
text: '确定',
active: true,
disabled: false,
href: 'javascript:;'
href: 'javascript:;' // eslint-disable-line
},
cancelBtn: {
text: '取消',
active: false,
disabled: false,
href: 'javascript:;'
href: 'javascript:;' // eslint-disable-line
},
onConfirm: () => {
this.deleteArticle(this._article).then(res => {
... ... @@ -125,7 +125,7 @@ export default {
}
});
}
}).show()
}).show();
},
onClick(name) {
this[name] && this[name]();
... ...
... ... @@ -27,7 +27,7 @@ export default {
iconBold: true
},
offsetLeft: 0
}
};
},
props: [
'title',
... ...
... ... @@ -215,7 +215,7 @@ export default {
this._ttTimer && clearTimeout(this._ttTimer);
this._ttTimer = setTimeout(() => {
this.scrollEvent(params);
}, throttleTime)
}, throttleTime);
},
onDounceScroll({item, scrollTop, startIndex}) {
if (this.scrollTop === scrollTop) {
... ...
... ... @@ -104,6 +104,7 @@ export default {
this.$sdk.getUser().then(user => {
if (user && user.uid) {
this.userUid = +user.uid;
// this.fetchArticleProductFavs({
// articles: result.data.detailList
// });
... ...
... ... @@ -7,7 +7,7 @@
<script>
export default {
name: 'ErrorNotFound'
}
};
</script>
<style>
... ...
... ... @@ -8,13 +8,13 @@
export default {
name: 'Error',
created() {
console.log('400 created')
console.log('400 created');
},
mounted() {
console.log('400 mounted')
console.log('400 mounted');
},
components: {NotFound: () => import('./404')}
}
};
</script>
<style>
... ...
... ... @@ -43,97 +43,97 @@
<script>
export default {
name: 'fashionDetail',
data() {
return {
shareData: {},
avatars: [{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'}
],
commentInfos: [{
childrenComments: [
{
content: "fdsfdsfsdf对方水电费第三方",
id: 68,
isPraise: "Y",
parentId: 66,
parentUid: 500030381,
praiseTotal: "12",
rootId: 66,
status: 1,
uid: 600033622,
columnType: 1000,
destId: 600033622,
createTime: 111,
userName: "三只松鼠",
headIco: "//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75",
parentUserName: "",
articleType: 1
},
{
content: "fdsfdsfsdf对方水电费第三方",
id: 68,
isPraise: "Y",
parentId: 66,
parentUid: 500030381,
praiseTotal: "12",
rootId: 66,
status: 1,
uid: 600033622,
columnType: 1000,
destId: 600033622,
createTime: 111,
userName: "三只松鼠",
headIco: "//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75",
parentUserName: "大松鼠",
articleType: 1
},
{
content: "fdsfdsfsdf对方水电费第三方",
id: 68,
isPraise: "Y",
parentId: 66,
parentUid: 500030381,
praiseTotal: "12",
rootId: 66,
status: 1,
uid: 600033622,
columnType: 1000,
destId: 600033622,
createTime: 111,
userName: "三只松鼠",
headIco: "//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75",
parentUserName: "大松鼠",
articleType: 1
}
],
parentComment: {
articleType: 1,
content: "fsefs第三方",
createTime: 23213,
id: 66,
isPraise: "Y",
praiseTotal: "11",
status: 0,
uid: 500030381,
columnType: 1000,
destId: 600033622,
articleId: 123,
userName: "大松鼠",
headIco: '//img13.static.yhbimg.com/author/2018/12/10/10/02143c5a70e288801cda4ac4f3fa8b9d7b.jpg?imageView2/2/interlace/1/q/75',
}
}],
name: 'fashionDetail',
data() {
return {
shareData: {},
avatars: [{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'},
{src: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75'}
],
commentInfos: [{
childrenComments: [
{
content: 'fdsfdsfsdf对方水电费第三方',
id: 68,
isPraise: 'Y',
parentId: 66,
parentUid: 500030381,
praiseTotal: '12',
rootId: 66,
status: 1,
uid: 600033622,
columnType: 1000,
destId: 600033622,
createTime: 111,
userName: '三只松鼠',
headIco: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75',
parentUserName: '',
articleType: 1
},
{
content: 'fdsfdsfsdf对方水电费第三方',
id: 68,
isPraise: 'Y',
parentId: 66,
parentUid: 500030381,
praiseTotal: '12',
rootId: 66,
status: 1,
uid: 600033622,
columnType: 1000,
destId: 600033622,
createTime: 111,
userName: '三只松鼠',
headIco: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75',
parentUserName: '大松鼠',
articleType: 1
},
{
content: 'fdsfdsfsdf对方水电费第三方',
id: 68,
isPraise: 'Y',
parentId: 66,
parentUid: 500030381,
praiseTotal: '12',
rootId: 66,
status: 1,
uid: 600033622,
columnType: 1000,
destId: 600033622,
createTime: 111,
userName: '三只松鼠',
headIco: '//img10.static.yhbimg.com/author/2018/11/26/15/01fbe6e21e3b9120685834e1f6173e31c5.jpg?imageView2/2/interlace/1/q/75',
parentUserName: '大松鼠',
articleType: 1
}
],
parentComment: {
articleType: 1,
content: 'fsefs第三方',
createTime: 23213,
id: 66,
isPraise: 'Y',
praiseTotal: '11',
status: 0,
uid: 500030381,
columnType: 1000,
destId: 600033622,
articleId: 123,
userName: '大松鼠',
headIco: '//img13.static.yhbimg.com/author/2018/12/10/10/02143c5a70e288801cda4ac4f3fa8b9d7b.jpg?imageView2/2/interlace/1/q/75',
}
}
}
}],
};
}
};
</script>
<style scoped lang="scss">
... ...
... ... @@ -30,7 +30,7 @@ export default {
},
methods: {
onclick() {
console.log('click product')
console.log('click product');
}
},
};
... ...
... ... @@ -6,8 +6,6 @@
</template>
<script>
import {assign, get} from 'lodash';
import {Scroll, Loading} from 'cube-ui';
import UserList from './components/user-list';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('user');
... ... @@ -30,7 +28,7 @@ export default {
this.$refs.userList.init();
},
beforeRouteUpdate(to, from, next) {
this.init(to.params)
this.init(to.params);
this.$refs.userList.init();
next();
},
... ... @@ -52,5 +50,5 @@ export default {
components: {
UserList
}
}
};
</script>
... ...
... ... @@ -6,8 +6,6 @@
</template>
<script>
import {assign, get} from 'lodash';
import {Scroll, Loading} from 'cube-ui';
import UserList from './components/user-list';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('user');
... ... @@ -30,7 +28,7 @@ export default {
this.$refs.userList.init();
},
beforeRouteUpdate(to, from, next) {
this.init(to.params)
this.init(to.params);
this.$refs.userList.init();
next();
},
... ... @@ -52,5 +50,5 @@ export default {
components: {
UserList
}
}
};
</script>
... ...
... ... @@ -17,5 +17,5 @@ export default {
components: {
Author
}
}
};
</script>
... ...
... ... @@ -17,5 +17,5 @@ export default {
components: {
Author
}
}
};
</script>
... ...
... ... @@ -197,7 +197,7 @@ export default {
this.fetchData(+params.id, params.type || 1);
}
},
fetchData(authorUid, authorType, noBase) {
fetchData(authorUid, authorType) {
this.authorInfo = {authorUid, authorType};
this.fetchBaseInfo();
... ... @@ -232,8 +232,8 @@ export default {
function step(timestamp) {
if (!start) {
start = timestamp
};
start = timestamp;
}
let progress = Math.floor(timestamp - start);
... ... @@ -242,7 +242,7 @@ export default {
if (progress < self._animeDuration) {
window.requestAnimationFrame(step);
}
};
}
window.requestAnimationFrame(step);
... ...
... ... @@ -32,7 +32,7 @@ export default {
this.computetabsNum();
},
methods: {
changeType(index, isClick) {
changeType(index) {
if (!this.tabList[index]) {
index = 0;
}
... ... @@ -41,7 +41,7 @@ export default {
this.$emit('change', index);
},
computetabsNum(a) {
computetabsNum() {
let tabList = this.tabList;
for (let i = this.tabList.length - 1; i >= 0; i--) {
... ...
... ... @@ -102,7 +102,7 @@ export default {
setTimeout(() => {
this.$refs.scroll.refresh();
}, 100);
})
});
},
onFollow(follow, index) {
this.list[index].isAttention = follow;
... ...