You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
853 B
39 lines
853 B
<template>
|
|
<view>
|
|
<web-view :src="urlParams" @message="addMessage" id="myWebView"></web-view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { getCode } from "@/api/jn/login.js"
|
|
export default {
|
|
data() {
|
|
return {
|
|
urlParams:"",
|
|
};
|
|
},
|
|
mounted() {
|
|
let token = uni.getStorageSync("token")
|
|
if (token) {
|
|
getCode({"accesstoken":token}).then(res=>{
|
|
console.log(res,'获取code的');
|
|
this.urlParams = `https://t-kd-process-app.jsszkd.com/pages/oauth2/login?code=${res.data.code}&clientId=221224176384&redirect=/pages/tasks/tasksManage`
|
|
console.log(this.urlParams,"urlParams");
|
|
})
|
|
}
|
|
},
|
|
methods: {
|
|
addMessage(event){
|
|
if(event.detail.data[0].action == 'to-home') {
|
|
console.log("进入判断了");
|
|
this.$tab.switchTab("/pages/mine/index");
|
|
}
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
</style>
|