2626 </div >
2727 </div >
2828 </div >
29- <div class =" menu-list" :class =" { 'menu-list-ani': isRotate }" >
30- <ul @click =" filterTab($event)" v-for =" item of tabs" :key =" item.key" >
31- <li :data-tab =" item.key" >{{ item.name }}</li >
32- </ul >
33- </div >
3429 <div
30+ v-if =" isScan"
3531 class =" cnode-menu-bar"
36- :class =" { 'cnode-menu-bar-ani': isRotate }"
37- @click =" changeRotate()"
38- >+</div >
32+ @click =" scanLogin()"
33+ >[ ]</div >
3934 </div >
4035</template >
4136
@@ -53,11 +48,6 @@ export default {
5348 topics: [],
5449 pageSize: 10 ,
5550 currentPage: 1 ,
56- isRotate: false ,
57- tabs: [
58- { name: ' 发帖' , key: ' publish' },
59- { name: ' 登录' , key: ' scan' },
60- ],
6151 };
6252 },
6353 methods: {
@@ -95,13 +85,6 @@ export default {
9585 url: ` ${ url} ?${ key} =${ value} ` ,
9686 });
9787 },
98- changeRotate () {
99- if (this .isRotate ) {
100- this .isRotate = false ;
101- } else {
102- this .isRotate = true ;
103- }
104- },
10588 scanLogin () {
10689 scanCode ().then ((res ) => {
10790 if (res .errMsg === ' scanCode:ok' ) {
@@ -120,16 +103,6 @@ export default {
120103 }
121104 });
122105 },
123- filterTab (event ) {
124- const { dataset: { tab } } = event .target ;
125- if (tab !== ' scan' ) {
126- wx .navigateTo ({
127- url: ' /pages/publish/main' ,
128- });
129- } else {
130- this .scanLogin ();
131- }
132- },
133106 },
134107 onReachBottom () {
135108 this .scrolltolower ();
@@ -138,6 +111,10 @@ export default {
138111 this .getTopics ();
139112 },
140113 mounted () {
114+ const accesstoken = wx .getStorageSync (' token' );
115+ if (accesstoken) {
116+ this .isScan = false ;
117+ }
141118 this .getTopics ();
142119 },
143120};
@@ -232,11 +209,12 @@ export default {
232209 right : 30px ;
233210 bottom : 30px ;
234211 color : #333 ;
235- font-size : 24 px ;
212+ font-size : 16 px ;
236213 position : fixed ;
237- line-height : 36 px ;
214+ line-height : 40 px ;
238215 text-align : center ;
239216 border-radius : 100% ;
217+ transform : rotate (90deg );
240218 background-color : #eeeeee ;
241219 transition : all 0.3s ease-in-out ;
242220}
0 commit comments