Authored by TaoHuang

Merge remote-tracking branch 'origin/master'

@@ -612,6 +612,17 @@ const yoho = { @@ -612,6 +612,17 @@ const yoho = {
612 } else { 612 } else {
613 // tip(tipInfo); 613 // tip(tipInfo);
614 } 614 }
  615 + },
  616 +
  617 + setWebview(args, success, fail) {
  618 + if (this.isYohoBuy && window.yohoInterface) {
  619 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
  620 + method: 'set.webview',
  621 + arguments: args
  622 + });
  623 + } else {
  624 + // tip(tipInfo);
  625 + }
615 } 626 }
616 }; 627 };
617 628
@@ -53,6 +53,7 @@ export default { @@ -53,6 +53,7 @@ export default {
53 } 53 }
54 } 54 }
55 return (src || '') 55 return (src || '')
  56 + .replace('http://', '//')
56 .replace('{mode}', this.mode) 57 .replace('{mode}', this.mode)
57 .replace('{width}', this.width) 58 .replace('{width}', this.width)
58 .replace('{height}', this.height); 59 .replace('{height}', this.height);
@@ -25,7 +25,7 @@ export default { @@ -25,7 +25,7 @@ export default {
25 }, 25 },
26 computed: { 26 computed: {
27 imageSrc() { 27 imageSrc() {
28 - return this.src || '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif??imageView/2/w/{width}/h/{height}'; 28 + return this.src || '//img11.static.yhbimg.com/yhb-img01/2016/07/05/13/017ec560b82c132ab2fdb22f7cf6f42b83.png?imageView/2/w/{width}/h/{height}';
29 } 29 }
30 } 30 }
31 }; 31 };
@@ -25,9 +25,10 @@ @@ -25,9 +25,10 @@
25 class="main-container" 25 class="main-container"
26 ref="scroll" 26 ref="scroll"
27 :options="scrollOpts" 27 :options="scrollOpts"
28 - :scroll-events="['scroll', 'scroll-end']" 28 + :scroll-events="['scroll', 'scroll-end', 'before-scroll-start']"
29 @scroll="onScrollHandle" 29 @scroll="onScrollHandle"
30 - @scroll-end="onScrollEndHandle"> 30 + @scroll-end="onScrollEndHandle"
  31 + @before-scroll-start="beforeScrollStartHandle">
31 <div ref="authorProfile" class="author-profile"> 32 <div ref="authorProfile" class="author-profile">
32 <span class="avatar-box"> 33 <span class="avatar-box">
33 <WidgetAvatar :src="authorBaseData.headIco" :width="100" :height="100"></WidgetAvatar> 34 <WidgetAvatar :src="authorBaseData.headIco" :width="100" :height="100"></WidgetAvatar>
@@ -50,7 +51,7 @@ @@ -50,7 +51,7 @@
50 <FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock> 51 <FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
51 </div> 52 </div>
52 <div ref="contantList" class="contant-list" :style="`min-height: ${listMinHeight}px;`"> 53 <div ref="contantList" class="contant-list" :style="`min-height: ${listMinHeight}px;`">
53 - <p v-if="emptyTip" class="empty-tip" :height="emptyTipHeight">{{emptyTip}}</p> 54 + <p v-if="emptyTip" class="empty-tip">{{emptyTip}}</p>
54 <WaterFall class="pannel-wrap" :list="list" :params="params"></WaterFall> 55 <WaterFall class="pannel-wrap" :list="list" :params="params"></WaterFall>
55 <div v-if="loadStatus && !emptyTip" class="loading"> 56 <div v-if="loadStatus && !emptyTip" class="loading">
56 <Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading> 57 <Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading>
@@ -59,7 +60,7 @@ @@ -59,7 +60,7 @@
59 </div> 60 </div>
60 </cube-scroll> 61 </cube-scroll>
61 62
62 - <a v-if="isOwner" class="publish hover-opacity" :href="publishUrl"></a> 63 + <a v-if="isOwner" class="publish hover-opacity" :class="{'scroll-opacity': scrolling}" :href="publishUrl"></a>
63 </Layout> 64 </Layout>
64 </template> 65 </template>
65 66
@@ -78,6 +79,7 @@ @@ -78,6 +79,7 @@
78 data() { 79 data() {
79 return { 80 return {
80 scrollY: 0, 81 scrollY: 0,
  82 + scrolling: false,
81 mineInfoUrl: '//m.yohobuy.com/home/mydetails?openby:yohobuy={"action":"go.mineinfo"}', 83 mineInfoUrl: '//m.yohobuy.com/home/mydetails?openby:yohobuy={"action":"go.mineinfo"}',
82 publishUrl: '?openby:yohobuy={"action":"go.grasspublish"}', 84 publishUrl: '?openby:yohobuy={"action":"go.grasspublish"}',
83 autherInfo: {}, 85 autherInfo: {},
@@ -92,7 +94,6 @@ @@ -92,7 +94,6 @@
92 listMinHeight: 0, 94 listMinHeight: 0,
93 fetchInfo: {}, 95 fetchInfo: {},
94 loadStatus: '', 96 loadStatus: '',
95 - emptyTipHeight: '',  
96 emptyTip: '', 97 emptyTip: '',
97 scrollOpts: { 98 scrollOpts: {
98 bounce: false 99 bounce: false
@@ -109,7 +110,6 @@ @@ -109,7 +110,6 @@
109 this.init(this.$route.params); 110 this.init(this.$route.params);
110 111
111 this.listMinHeight = this.$el.offsetHeight - this.$refs.tabBlock.offsetHeight - $dom.offsetHeight; 112 this.listMinHeight = this.$el.offsetHeight - this.$refs.tabBlock.offsetHeight - $dom.offsetHeight;
112 - this.emptyTipHeight = this.$el.offsetHeight - this.$refs.contantList.offsetTop - $dom.offsetHeight - 40;  
113 113
114 if ($dom.offsetHeight) { 114 if ($dom.offsetHeight) {
115 this._animeDuration = 300; 115 this._animeDuration = 300;
@@ -238,6 +238,7 @@ @@ -238,6 +238,7 @@
238 this._animePlayed = animePlayed; 238 this._animePlayed = animePlayed;
239 }, 239 },
240 onScrollEndHandle(scroll) { 240 onScrollEndHandle(scroll) {
  241 + this.scrolling = false;
241 if (1000 - scroll.y > this.$refs.contantList.offsetHeight) { 242 if (1000 - scroll.y > this.$refs.contantList.offsetHeight) {
242 this._listTimer && clearTimeout(this._listTimer); 243 this._listTimer && clearTimeout(this._listTimer);
243 this._listTimer = setTimeout(() => { 244 this._listTimer = setTimeout(() => {
@@ -245,6 +246,9 @@ @@ -245,6 +246,9 @@
245 }, 50); 246 }, 50);
246 } 247 }
247 }, 248 },
  249 + beforeScrollStartHandle() {
  250 + this.scrolling = true;
  251 + },
248 changeTab(index) { 252 changeTab(index) {
249 if (this.activeIndex !== index) { 253 if (this.activeIndex !== index) {
250 this.activeIndex = index; 254 this.activeIndex = index;
@@ -550,13 +554,20 @@ @@ -550,13 +554,20 @@
550 white-space: nowrap; 554 white-space: nowrap;
551 } 555 }
552 556
  557 + .contant-list {
  558 + position: relative;
  559 + }
  560 +
553 .empty-tip { 561 .empty-tip {
  562 + width: 100%;
554 display: flex; 563 display: flex;
555 justify-content: center; 564 justify-content: center;
556 align-items: center; 565 align-items: center;
557 - height: 1000px;  
558 font-size: 28px; 566 font-size: 28px;
559 color: #ddd; 567 color: #ddd;
  568 + position: absolute;
  569 + top: 0;
  570 + bottom: 240px;
560 } 571 }
561 572
562 .loading { 573 .loading {
@@ -580,5 +591,10 @@ @@ -580,5 +591,10 @@
580 background-image: url('../../statics/image/userpage/publish.png'); 591 background-image: url('../../statics/image/userpage/publish.png');
581 background-size: 100% 100%; 592 background-size: 100% 100%;
582 z-index: 10; 593 z-index: 10;
  594 + transition: all 600ms ease-in-out;
  595 +
  596 + &.scroll-opacity {
  597 + opacity: 0.3;
  598 + }
583 } 599 }
584 </style> 600 </style>
@@ -38,6 +38,7 @@ export default { @@ -38,6 +38,7 @@ export default {
38 props: { 38 props: {
39 src: this.img, 39 src: this.img,
40 lazy: false, 40 lazy: false,
  41 + mode: 1,
41 width: 100, 42 width: 100,
42 height: 100 43 height: 100
43 } 44 }
@@ -48,4 +48,10 @@ export default store => { @@ -48,4 +48,10 @@ export default store => {
48 store.commit('SET_LOGIN_INFO', user); 48 store.commit('SET_LOGIN_INFO', user);
49 } 49 }
50 }); 50 });
  51 +
  52 + Vue.$yoho.ready(() => {
  53 + Vue.$yoho.setWebview({
  54 + bounces: false
  55 + });
  56 + });
51 }; 57 };