|
|
@@ -4,7 +4,6 @@
|
|
|
<view v-if="current == 0">
|
|
|
<activity-view :imgList="imgList"></activity-view>
|
|
|
</view>
|
|
|
-
|
|
|
<!--个人中心-->
|
|
|
<view v-if="current == 2">
|
|
|
<mine-view></mine-view>
|
|
|
@@ -17,11 +16,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {getUrlParams} from '../../common/utils/utils.js';
|
|
|
+ import {atUrl,getWXUserInfoUrl } from '../../common/conf/config.js';
|
|
|
import searchBar from "@/components/basic/search-bar.vue";
|
|
|
import bottomBar from "@/components/basic/bottom-bar.vue";
|
|
|
import activityView from "@/components/views/activity-view.vue";
|
|
|
import mineView from "@/components/views/mine-view.vue";
|
|
|
export default {
|
|
|
+ async onLoad(options) {
|
|
|
+ await this.authorization();
|
|
|
+ },
|
|
|
components: {
|
|
|
searchBar,
|
|
|
bottomBar,
|
|
|
@@ -39,6 +43,13 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ async authorization(){
|
|
|
+ let params = getUrlParams(window.location.search);
|
|
|
+ if(typeof params.code != 'undefined'){
|
|
|
+ this.current = 2;
|
|
|
+ console.log(params);
|
|
|
+ }
|
|
|
+ },
|
|
|
change(index) {
|
|
|
this.current = index;
|
|
|
}
|