石广澎
2025-11-17 8771da2ccf6f7c3fd2a8c89a1a0e230c6386db7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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>