<template>
  <view class="invite-page">
    <web-view :src="URL"></web-view>
    <!-- <web-view :src="`http://localhost:8081/#/agent?customParam=${customParam}`" /> -->
  </view>
</template>

<script>
export default {
  name: "invite-page",
  onLoad() {
    const userInfo = uni.getStorageSync("userInfo");
    console.log(userInfo, "userInfo");
    const customParam = encodeURIComponent(JSON.stringify(userInfo));
    const timestamp = new Date().getTime();

    if(process.env.NODE_ENV === 'development') {
      this.URL = `http://nginx.test.luojigou.vip:8899/singlepage/#/agent?customParam=${customParam}&timestamp=${timestamp}`
    }else {
      this.URL = `https://luojigou.vip/singlepage/#/agent?customParam=${customParam}&timestamp=${timestamp}`;
    }

    console.log(this.URL, "URL");
  },
  data() {
    return {
      URL: "",
    };
  },
  methods: {},
};
</script>

<style lang="less" scoped>
</style>