|
@@ -71,6 +71,14 @@ export default {
|
|
|
if(option.isBack){
|
|
|
this.isBack = option.isBack;
|
|
|
}
|
|
|
+ /* let that = this;
|
|
|
+ this.from = option.from;
|
|
|
+ uni.login({
|
|
|
+ provider: 'weixin',
|
|
|
+ success: function(loginRes) {
|
|
|
+ that.code = loginRes.code;
|
|
|
+ }
|
|
|
+ }); */
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
@@ -100,8 +108,9 @@ export default {
|
|
|
that.$api.getInfo().then(resdata => {
|
|
|
if(resdata.data.code == 200){
|
|
|
that.$store.state.userInfo = resdata.data.data;
|
|
|
- if(that.isBack){
|
|
|
- uni.switchTab({
|
|
|
+
|
|
|
+ if(!that.isBack){
|
|
|
+ uni.reLaunch({
|
|
|
url:'/pages/index/index'
|
|
|
})
|
|
|
}else{
|
|
@@ -158,8 +167,8 @@ export default {
|
|
|
that.$api.getInfo().then(resdata => {
|
|
|
if(resdata.data.code == 200){
|
|
|
that.$store.state.userInfo = resdata.data.data;
|
|
|
- if(that.isBack){
|
|
|
- uni.switchTab({
|
|
|
+ if(!that.isBack){
|
|
|
+ uni.reLaunch({
|
|
|
url:'/pages/index/index'
|
|
|
})
|
|
|
}else{
|
|
@@ -271,17 +280,8 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- onLoad(option) {
|
|
|
- let that = this;
|
|
|
- this.from = option.from;
|
|
|
- uni.login({
|
|
|
- provider: 'weixin',
|
|
|
- success: function(loginRes) {
|
|
|
- that.code = loginRes.code;
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
+
|
|
|
};
|
|
|
</script>
|
|
|
|