12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <template>
- <view>
- <web-view :src="src"></web-view>
- </view>
- </template>
- <script>
- import { getToken } from '@/utils/auth'
- export default {
- data() {
- return {
- src:'',
- params: {},
- webviewStyles: {
- progress: {
- color: "#FF3333"
- }
- }
- }
- },
- props: {
- // src: {
- // type: [String],
- // default: null
- // }
- },
- onLoad(e) {
- this.params = JSON.parse(decodeURIComponent(e.data))
- console.log(this.params,123)
- var token=getToken()
- // const token = await tokenInvalidReturnInfo(3)
- let data = {
- file_id: this.params.fileId,
- type: this.params.type,
- // handel_type: this.params.handelType,
- token: token
- }
- console.log(data,2)
- this.src = '/hybrid/html/web-office.html?data='+encodeURIComponent(JSON.stringify(data))
-
- // this.params = event
- // if (event.title) {
- // uni.setNavigationBarTitle({
- // title: event.title
- // })
- // }
- // wpsInit(){
-
- // }
- }
- }
- </script>
|