index.vue 899 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!--
  2. * @Author: zhanghaifeng
  3. * @Date: 2025-07-08 13:31:49
  4. * @LastEditors: zhanghaifeng
  5. * @LastEditTime: 2025-10-14 17:01:04
  6. * @Description:
  7. * @FilePath: /jiangbei-mini-h5/src/pages/index/index.vue
  8. -->
  9. <script setup lang="ts">
  10. import globalConfig from '@/config/global'
  11. import { onMounted } from 'vue';
  12. onMounted(() => {
  13. const redirect = encodeURIComponent(
  14. `${window.location.origin}/#/pages/home/index`
  15. );
  16. const corpId = globalConfig.corpid;
  17. const url =
  18. `https://open.weixin.qq.com/connect/oauth2/authorize` +
  19. `?appid=${corpId}&redirect_uri=${redirect}&response_type=code&agentid=1000003` +
  20. `&scope=snsapi_privateinfo&state=1#wechat_redirect`;
  21. window.location.replace(url);
  22. })
  23. </script>
  24. <template>
  25. <view class="box">
  26. </view>
  27. </template>
  28. <style lang="scss" scoped>
  29. .box{
  30. position: relative;
  31. width: 100%;
  32. height: 100vh;
  33. background: #f6f6f6;
  34. }
  35. </style>