zhuxiuying
9 天以前 bf266f25cf258bc533eadf0f0377d76b7bc1f11a
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<template>
   <view class="login_page" v-if="isShow">
       <view class="login_bg"></view>
       <view class="page_decor_inner animated"  :class="{ zoomIn: isShow }">
           <view class="login_box">
               <image class="head" src="https://ossacmall.bluedeer.com.cn/app/static/images/app_logo2.png"></image>
               <view class="title">欢迎来到悦养商城,<br>您的专属福利已到!</view>
               <view class="info_box">
                   <view class="img"><image class="image" src="https://ossacmall.bluedeer.com.cn/app/static/images/i_fl.png" alt=""></view>
                   <view class="info_title">亲爱的会员,即刻解锁超给力优惠,福利直接领,下单超省钱~</view>
                   <view class="info_item info_item_first">臻享会员·福利天花板:<br>1.可享臻享专属价,全场通用随便省!<br>2.臻享专区商品直选,专属折扣别错过!</view>
                   <view class="info_item">悦享会员·优惠超实在:<br>可享悦享专属价,全场通用不设限!</view>
                   <view class="info_item">畅享会员·福利不缩水:<br>可享畅享专属价,全场通用超实惠!</view>
                   <view class="info_item">普通会员·福利不缩水:<br>可享专属价,全场通用享低价!<br>每月可获得1次臻享会员体验资格</view>
                   <view class="info_item info_item_last">具体内容请详见会员规则介绍</view>
               </view>
               <view class="btn" @click="agree">我知道了</view>
           </view>
       </view>
       
   </view>
</template>
<script>
   const app = getApp();
   import Routine from '@/libs/routine';
   import {
       loginMobile,
       registerVerify,
       getCodeApi
   } from "@/api/user";
   import {
       getLogo
   } from '@/api/public';
   export default {
       name: 'fuli',
       data() {
           return {
               isShow:false,
               isThird:false,
               authKey:'',
               thirdToken:'',
               isUpdating:false
           }
       },
       mounted() {},
       
       created() {
           if(!this.$store.getters.isLogin&&app.globalData.showLoginFl){
               this.show({
                   authKey:app.globalData.authKey,
                   thirdToken:app.globalData.thirdToken
               })
           }
           uni.showLoginFl=this.show;
       },
       methods: {
           show(thirdObj){
               if(thirdObj){
                   this.isThird=true;
                   this.authKey=thirdObj.authKey;
                   this.thirdToken=thirdObj.thirdToken;
               }else{
                   this.isThird=false;
               }
               this.isShow=true;
           },
           agree(){
               console.log(this.isThird);
               if(this.isThird){
                   this.authThirdUserInfo();
               }else{
                   this.hide();
               }
           },
           hide() {
               uni.$emit('loginFlSuccess',this.isThird?true:false);
               this.isShow=false;
           },
           authThirdUserInfo: function() {
               var that = this;
               uni.showLoading();
               if(that.isUpdating){
                   return false;
               }
               that.isUpdating=true;
               Routine.authThirdUserInfo({
                   'key': that.authKey,
                   'thirdToken': that.thirdToken
               }).then(res => {
                   that.isUpdating=false;
                   uni.hideLoading();
                   if (res.data.type === 'register') {
                       uni.showToast({
                           title: '登录失败',
                           icon: 'fail'
                       })
                   }else{
                       uni.showToast({
                           title: '登录成功',
                           icon: 'success'
                       })
                       that.$store.commit('UPDATE_LOGINSTATUS', res.data);
                       Routine.getLastUserInfo().then(()=>{
                           uni.$emit('registerSuccess', {});
                       });
                   }
                   that.hide();
               }).catch(()=>{
                   that.isUpdating=false;
               })
           },
       }
   }
</script>
 
<style lang="scss" scoped>
   .login_page {
       position: fixed;
       left: 0;
       top: 0;
       width: 100%;
       height: 100%;
       z-index: 9999;
   }
   
   .login_bg{
       width: 100%;
       height: 100%;
       background: rgba(0,0,0,.7);
   }
   .page_decor_inner{
       width: 100%;
       height: 100%;
       position: absolute;
       left: 0;
       top: 0;
   }
   .login_box {
       width: 570rpx;
       box-sizing: border-box;
       padding: 200rpx 45rpx 60rpx 45rpx;
       position: absolute;
       left: 50%;
       top: 50%;
       transform: translate(-50%,-50%);
       background: url("https://ossacmall.bluedeer.com.cn/app/static/images/login_top2.png") right top/130% 210rpx no-repeat;
       background-color: #FFE10A;
       border-radius: 40rpx;
       
       .head {
           width: 80rpx;
           height: 80rpx;
           left: 45rpx;
           top: 35rpx;
           position: absolute;
           border: 1rpx solid #F5F5F5;
           border-radius: 50%;
       }
 
       .title {
           font-size: 30rpx;
           line-height: 40rpx;
           position: absolute;
           left: 144rpx;
           top: 40rpx;
           color: #ffffff;
       }
 
       .info_box {
           font-size: 30rpx;
           line-height: 60rpx;
           color: #ffffff;
           position: relative;
           .img{
               width: 104rpx;
               height: 144rpx;
               position: absolute;
               left: 0;
               top: 0;
               .image{
                   width: 104rpx;
                   height: 144rpx;
               }
           }
           .info_title {
               padding-left: 130rpx;
               font-size: 38rpx;
               font-size: 24rpx;
               line-height: 40rpx;
               padding-bottom: 30rpx;;
               color: #016DCC;
               padding-top: 45rpx;
               // white-space: nowrap;
           }
           .info_subTitle{
               padding-left: 130rpx;
               line-height: 44rpx;
               font-size: 28rpx;
               color: #016DCC;
               margin-bottom: 30rpx;
               white-space: nowrap;
           }
           .info_item{
               background-color: #ffffff;
               margin-bottom: 10rpx;
               font-size: 23rpx;
               line-height: 36rpx;
               padding: 10rpx 20rpx;
               margin-bottom: 0;
               color: #000000;
               background-color: #ffffff;
           }
           .info_item_first{
               padding-top: 30rpx;
           }
           .info_item_last{
               color: #016DCC;
               padding-bottom: 30rpx;
           }
       }
 
       .private {
           padding-left: 50rpx;
           font-size: 25rpx;
           color: #000000;
           position: relative;
           margin-top: 40rpx;
           display: none;
 
           .private_icon {
               width: 90rpx;
               height: 90rpx;
               position: absolute;
               left: -22rpx;
               top: 50%;
               margin-top: -45rpx;
 
               &:before {
                   content: '';
                   display: block;
                   position: absolute;
                   width: 35rpx;
                   height: 35rpx;
                   background-color: #ffffff;
                   border-radius: 50%;
                   left: 50%;
                   top: 50%;
                   margin-left: -18rpx;
                   margin-top: -18rpx;
               }
 
               &.active:after {
                   content: '';
                   display: block;
                   position: absolute;
                   width: 18rpx;
                   height: 18rpx;
                   background-color: #016DCC;
                   border-radius: 50%;
                   left: 50%;
                   top: 50%;
                   margin-left: -9rpx;
                   margin-top: -9rpx;
               }
           }
 
           .private_btn {
               display: inline-block;
               border-bottom: 1rpx solid #000000;
           }
       }
       .btn {
           margin-top: 30rpx;
           font-size: 30rpx;
           line-height: 72rpx;
           text-align: center;
           color: #ffffff;
           border-radius: 8rpx;
           background-color: #016DCC;
       }
   }
 
   .animated {
       animation-duration: .4s
   }
</style>