<template>
  <view class="">
    <web-view v-if="src" :src="src"></web-view>
  </view>
</template>

<script setup>
import { ref } from "vue"
import { onLoad } from "@dcloudio/uni-app"

let url = 'https://crmeb-test.shop.lihaink.cn/api/view?uid=';  //地址
let uid = 9;  // 用户id
let navTo = '_|_navTo=_pages_index_index' // 回跳页面地址 _pages_index_index 中/替换成_  需要带上 _|_navTo 前缀
// let navTo = '_|_navTo=_pageQuota_quotation_detail' // 回跳页面地址 _pages_index_index 中/替换成_  需要带上 _|_navTo 前缀
const src = ref('')

onLoad(options=>{
  if(options.id) {
    uid = options.id;
  }
  // url = url + uid + navTo;
  url = url + uid;
  // 公众号绑定
  src.value = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe2428e8fe6767e45&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo&state=92efd21273559f62a614a3b49e2e3fcb&connect_redirect=1#wechat_redirect`
  console.log(src.value);
})
</script>

<style lang="scss">

</style>
