石广澎
2025-11-17 8771da2ccf6f7c3fd2a8c89a1a0e230c6386db7f
pages/pay/login.vue
New file
@@ -0,0 +1,42 @@
<template>
   <view>
   </view>
</template>
<script>
   import {
      config,
      ACCESSTOKEN
   } from '@/common/config.js';
   export default {
      data() {
         return {
            platform: this.$utils.getPlat()
         };
      },
      onLoad(opt) {
         uni.clearStorage()
         const redirect_uri = encodeURIComponent(`${config.webURL}/pages/pay/scanpay?cid=${opt.cid}`)
         if (this.platform == 2) {
            window.location.href =
               `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
         } else if (this.platform == 5) {
            window.location.href =
               `https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
         } else if (this.platform == 15) {
            window.location.href =
               `https://qr.95516.com/qrcGtwWeb-web/api/userAuth?version=1.0.0&redirectUrl=${redirect_uri}`
         } else {
            uni.reLaunch({
               url: `/pages/pay/scanpay?cid=${opt.cid}`
            })
         }
      }
   }
</script>
<style lang="scss">
</style>