| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <template>
- <view class="blacklog-container">
- <web-view v-if="isShow" :src="webViewUrl"></web-view>
- </view>
- </template>
- <script>
- import {
- getParentIdListByDeptId
- } from '@/api/common.js'
- export default{
- data(){
- return{
- isShow:false,
- webViewUrl:''
- }
- },
- async onLoad(option = {}) {
- let headers = {};
- const value = uni.getStorageSync("token"); //取存本地的token
- const apiInfo = uni.getStorageSync("apiInfo"); //取存本地的token
- headers = {
- "content-type": "application/json",
- "zoomwin-token": value,
- Authorization: value,
- "zoomwin-sid": uni.getStorageSync("userInfo").sessionId,
- serverInfo : apiInfo.protocal? apiInfo.protocal+ apiInfo.hostname+':'+apiInfo.port+'/api' :'',
- };
- //http://192.168.1.105:18086
- const params = JSON.parse(option.params)
- params.userInfo = uni.getStorageSync("userInfo")
- let html = params.type =='add'? 'a.html':'c.html'
- try{
- params.userInfo.groupIdList = await getParentIdListByDeptId(params.userInfo.groupId)
- }catch{
- params.userInfo.groupIdList = []
- }
- console.log(params.userInfo.groupIdList)
- setTimeout(()=>{
- this.webViewUrl = `/hybrid/html/${html}?params=${JSON.stringify(params)}&headers=${JSON.stringify(headers)}`
- this.isShow = true
- })
- },
- }
- </script>
- <style>
- </style>
|