| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <template>
- <!--pages/web/web.wxml-->
- <view>
- <web-view :src="webUrl" v-if="webUrl!==''"></web-view>
- </view>
- </template>
- <script>
- // pages/web/web.js
- const req = require("../../utils/request");
- const app = getApp();
- export default {
- data() {
- return {
- webUrl: '',
- back: false,
- };
- },
- components: {},
- props: {},
- onLoad: function(options) {
- this.query = options;
- let that = this;
- let token = req.getStorage('AUTH_TOKEN');
- let webUrl = options.url
- this.webUrl = decodeURIComponent(webUrl)
- console.log('地址>>>>>',webUrl)
- // if (!req.getStorage('userInfo')) {
- // // console.log("111111111111111");
- // app.globalData.openPage('pages/authorize/authorize');
- // } else {
- // if (this.query.scene) {
- // let form = {
- // scene: this.query.scene
- // };
- // req.getRequest('/api/code/params', form, data => {
- // // console.log(
- // // "====================================================================================" +
- // // data.scene);
- // webUrl += '&orderId=' + data.scene;
- // this.setData({
- // webUrl: webUrl
- // });
- // // console.log(webUrl, "+++++++++++");
- // });
- // } else {
- // that.setData({
- // webUrl: webUrl
- // });
- // // console.log(webUrl);
- // }
- // }
- },
- onShow() {
- if (this.back) {
- uni.navigateBack();
- }
- },
- methods: {}
- };
- </script>
- <style>
- @import "./web.css";
- </style>
|