|
@@ -14,13 +14,13 @@
|
|
<swiper class="swiper" @change="change" :circular="swiper.circular" :current="fetch.index">
|
|
<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" >
|
|
<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">
|
|
<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>
|
|
</scroll-view>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
</swiper>
|
|
</swiper>
|
|
</block>
|
|
</block>
|
|
<block v-if="!show">
|
|
<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>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</dever-drawer-page>
|
|
</dever-drawer-page>
|
|
@@ -54,7 +54,7 @@
|
|
</view>
|
|
</view>
|
|
</dever-drawer-window>
|
|
</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>
|
|
<y-Fab v-if="!show" :bottom="20" :right="20" @click="goHome" :text="`更多`"></y-Fab>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -87,7 +87,9 @@ export default{
|
|
swiper : {
|
|
swiper : {
|
|
index : 0,
|
|
index : 0,
|
|
circular : true,
|
|
circular : true,
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+ page_index : 0,
|
|
|
|
+ page_text : '',
|
|
fetch: {
|
|
fetch: {
|
|
items : [],
|
|
items : [],
|
|
user : {},
|
|
user : {},
|
|
@@ -164,6 +166,7 @@ export default{
|
|
//this.Dever.login = 'user/login?code=' + option.code;
|
|
//this.Dever.login = 'user/login?code=' + option.code;
|
|
//this.Dever.checkLogin();
|
|
//this.Dever.checkLogin();
|
|
this.login = this.Dever.getToken();
|
|
this.login = this.Dever.getToken();
|
|
|
|
+ this.showPage(this.swiper.index);
|
|
this.Dever.config.name = option.name;
|
|
this.Dever.config.name = option.name;
|
|
this.Dever.config.code = option.code;
|
|
this.Dever.config.code = option.code;
|
|
this.Dever.config.system = uni.getSystemInfoSync();
|
|
this.Dever.config.system = uni.getSystemInfoSync();
|
|
@@ -261,6 +264,7 @@ export default{
|
|
},
|
|
},
|
|
change : function(e) {
|
|
change : function(e) {
|
|
this.fetch.index = this.swiper.index = parseInt(e.detail.current);
|
|
this.fetch.index = this.swiper.index = parseInt(e.detail.current);
|
|
|
|
+ this.showPage(this.swiper.index);
|
|
//用户记录
|
|
//用户记录
|
|
this.record();
|
|
this.record();
|
|
this.controlHandle();
|
|
this.controlHandle();
|
|
@@ -333,6 +337,16 @@ export default{
|
|
if (this.drawer.show) {
|
|
if (this.drawer.show) {
|
|
this.closeDrawer(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) {
|
|
showDrawer : function(key) {
|
|
this.getContentId();
|
|
this.getContentId();
|