|
@@ -14,13 +14,13 @@
|
|
|
<swiper class="swiper" @change="change" :circular="swiper.circular" :current="fetch.index">
|
|
|
<swiper-item v-for="(v, k) in fetch.items" v-if="v.data" :key="k" >
|
|
|
<scroll-view scroll-y="true" scroll-x="true" class="scroll-height" @scrolltolower="bottomCall">
|
|
|
- <dream ref="dream" @showDrawer="showDrawer" :index="k" :item="v" :control="control" :bottom="bottom" class="item"></dream>
|
|
|
+ <dream ref="dream" @showDrawer="showDrawer" @showPage="showPage" :index="k" :item="v" :control="control" :bottom="bottom" class="item"></dream>
|
|
|
</scroll-view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</block>
|
|
|
<block v-if="!show">
|
|
|
- <dream ref="dream" @showDrawer="showDrawer" :index="fetch.index" :item="fetch.items[fetch.index]" :control="control" :bottom="bottom" class="item"></dream>
|
|
|
+ <dream ref="dream" @showDrawer="showDrawer" @showPage="showPage" :index="fetch.index" :item="fetch.items[fetch.index]" :control="control" :bottom="bottom" class="item"></dream>
|
|
|
</block>
|
|
|
</view>
|
|
|
</dever-drawer-page>
|
|
@@ -54,7 +54,7 @@
|
|
|
</view>
|
|
|
</dever-drawer-window>
|
|
|
|
|
|
- <y-Fab v-if="!drawer.show && fetch.user.avatar && show" :bottom="20" :right="20" :btnList="drawer.button" :bgmPlay="bgm.playing" @click="clickDrawerButton" :text="`P`+(swiper.index+1)" :icon_o="fetch.user.avatar"></y-Fab>
|
|
|
+ <y-Fab v-if="!drawer.show && fetch.user.avatar && show" :bottom="20" :right="20" :btnList="drawer.button" :bgmPlay="bgm.playing" @click="clickDrawerButton" :text="page_text" :icon_o="fetch.user.avatar"></y-Fab>
|
|
|
<y-Fab v-if="!show" :bottom="20" :right="20" @click="goHome" :text="`更多`"></y-Fab>
|
|
|
</view>
|
|
|
|
|
@@ -87,7 +87,9 @@ export default{
|
|
|
swiper : {
|
|
|
index : 0,
|
|
|
circular : true,
|
|
|
- },
|
|
|
+ },
|
|
|
+ page_index : 0,
|
|
|
+ page_text : '',
|
|
|
fetch: {
|
|
|
items : [],
|
|
|
user : {},
|
|
@@ -164,6 +166,7 @@ export default{
|
|
|
//this.Dever.login = 'user/login?code=' + option.code;
|
|
|
//this.Dever.checkLogin();
|
|
|
this.login = this.Dever.getToken();
|
|
|
+ this.showPage(this.swiper.index);
|
|
|
this.Dever.config.name = option.name;
|
|
|
this.Dever.config.code = option.code;
|
|
|
this.Dever.config.system = uni.getSystemInfoSync();
|
|
@@ -261,6 +264,7 @@ export default{
|
|
|
},
|
|
|
change : function(e) {
|
|
|
this.fetch.index = this.swiper.index = parseInt(e.detail.current);
|
|
|
+ this.showPage(this.swiper.index);
|
|
|
//用户记录
|
|
|
this.record();
|
|
|
this.controlHandle();
|
|
@@ -333,6 +337,16 @@ export default{
|
|
|
if (this.drawer.show) {
|
|
|
this.closeDrawer(this.drawer.show);
|
|
|
}
|
|
|
+ },
|
|
|
+ showPage : function(page, index) {
|
|
|
+ if (page >= 0) {
|
|
|
+ this.page_index = page;
|
|
|
+ }
|
|
|
+ if (index >= 0) {
|
|
|
+ this.page_text = 'P'+(this.page_index+1) + '.' + (index+1);
|
|
|
+ } else {
|
|
|
+ this.page_text = 'P'+(this.page_index+1);
|
|
|
+ }
|
|
|
},
|
|
|
showDrawer : function(key) {
|
|
|
this.getContentId();
|