zhaojs
2023-07-07 55803b1a7b478aade9b6e59ca6675777375e2a92
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<template>
    <view class="empower-container colCen">
        <view class="applogo-title rowCenCen">
            <image class="applogo" :src="applogo" mode="aspectFill"></image>
            <image class="jiantou" src="../static/images/app/jiantou.png" mode="aspectFill"></image>
            <image class="applogo" src="../static/images/app/pdd.png" mode="aspectFill"></image>
        </view>
        
        <view class="txt-tit">
            申请拼多多授权
        </view>
        
        <view class="txt-desc">
            应拼多多官方要求,获取推广收益前需要先进行官方授权,授权后方可告知您此商品是否涉及比价
        </view>
        
        <view class="pink-txt">
            比价定义:您在拼多多APP/网站访问了该商品的详情,再通过本APP进行转链自购的行为
        </view>
        
        <view class="blod-txt">
            比价订单,自购无佣金
        </view>
 
        <view class="btn-container rowCenBet">
            <view class="close-btn rowCenCen" @click="close()">
                <view>关闭</view>
            </view>
            <view class="confirm-btn rowCenCen" @tap="confirm()">
                <view>前往拼多多授权</view>
            </view>
        </view>
    </view>
</template>
 
<script>
    import util from '../utils/utils.js'
    const plug = uni.requireNativePlugin('xiguazhu-baichuan')
    export default {
        data() {
            return {
                applogo: ''
            }
        },
        created() {
            this.applogo = getApp().globalData.appinfo.logo
        },
        methods: {
            confirm() {
                var that = this;
                that.$u.api.getPddAuth({}).then(e => {
                    var res = e.data;
                    var pddurl = res.schema_url
                    var h5pddurl = res.mobile_url
                
                    that.close()
                    // #ifdef APP-PLUS
                    if (plus.os.name == 'Android') {
                        plus.runtime.openURL(pddurl, res => {
                            uni.navigateTo({
                                url: '/pages/webView/webView?url=' + encodeURIComponent(h5pddurl)
                            })
                        });
                    } else {
                        plus.runtime.launchApplication({
                            action: "pinduoduo://com.xunmeng.pinduoduo/" + pddurl.replace(/https:\/\/.*\//, "")
                        }, res => {
                            uni.navigateTo({
                                url: '/pages/webView/webView?url=' + encodeURIComponent(h5pddurl)
                            })
                        })
                    }
                    // #endif
                }).catch(function (err) {
                })
            },
            close() {
                this.$emit('closemodel')
            }
        }
    }
</script>
 
<style lang="scss">
    .empower-container {
        width: 564rpx;
        height: 720rpx;
        background: #FFFFFF;
        border-radius: 32rpx;
        padding: 0 20rpx;
 
        .applogo-title {
            margin-top: 60rpx;
 
            .applogo {
                width: 92rpx;
                height: 92rpx;
                border-radius: 50%;
            }
            .jiantou{
                width: 56rpx;
                height: 30rpx;
                margin: 0 30rpx;
            }
        }
 
        .txt-tit {
            margin-top: 30rpx;
            font-size: 34rpx;
            font-weight: bold;
            color: #333333;
        }
 
        .txt-desc {
            margin-top: 30rpx;
            width: 100%;
            padding: 0 45rpx;
            font-size: 24rpx;
            font-weight: 500;
            line-height: 46rpx;
            color: #333333;
        }
        .pink-txt{
            width: 100%;
            padding: 0 45rpx;
            font-size: 24rpx;
            font-weight: 500;
            line-height: 46rpx;
            color: #FD002F;
        }
        
        .blod-txt{
            width: 100%;
            padding: 0 45rpx;
            font-size: 24rpx;
            font-weight: bold;
            line-height: 46rpx;
            color: #FD002F;
        }
 
        .btn-container {
            width: 100%;
            margin-top: 30rpx;
            font-size: 30rpx;
            font-weight: 500;
            color: #FFFFFF;
 
            .close-btn {
                width: 158rpx;
                height: 76rpx;
                background: #E5E5E5;
                box-shadow: 0px 5rpx 9rpx 0px rgba(229, 229, 229, 0.33);
                opacity: 0.97;
                border-radius: 38rpx;
            }
 
            .confirm-btn {
                width: 260rpx;
                height: 76rpx;
                background: #FD002F;
                box-shadow: 0px 5rpx 9rpx 0px rgba(253, 0, 47, 0.33);
                opacity: 0.97;
                border-radius: 38rpx;
            }
        }
    }
</style>