Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop
Showing
20 changed files
with
103 additions
and
50 deletions
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | </template> | 7 | </template> |
8 | 8 | ||
9 | <script> | 9 | <script> |
10 | -import {mapState} from 'vuex'; | 10 | +import {mapState, mapMutations} from 'vuex'; |
11 | 11 | ||
12 | export default { | 12 | export default { |
13 | name: 'App', | 13 | name: 'App', |
@@ -29,10 +29,18 @@ export default { | @@ -29,10 +29,18 @@ export default { | ||
29 | // this.$xianyu.setXianyuWebview(); | 29 | // this.$xianyu.setXianyuWebview(); |
30 | this.$xianyu.setXianyuNav(); | 30 | this.$xianyu.setXianyuNav(); |
31 | 31 | ||
32 | - // queryString中携带bind_code,则弹出绑定弹框 | ||
33 | - if (this.$route.query.bind_code) { | ||
34 | - this.$root.$createThirdBind().open(); | ||
35 | - } | 32 | + |
33 | + this.$sdk.getUser().then(user => { | ||
34 | + if (user && user.uid) { | ||
35 | + this.SET_LOGIN_INFO(user); | ||
36 | + } else { | ||
37 | + // queryString中携带bind_code,则弹出绑定弹框 | ||
38 | + if (this.$route.query.bind_code) { | ||
39 | + this.$root.$createThirdBind().open(); | ||
40 | + } | ||
41 | + } | ||
42 | + }); | ||
43 | + | ||
36 | }, | 44 | }, |
37 | watch: { | 45 | watch: { |
38 | 'yoho.context.needLogin': function(newVal) { | 46 | 'yoho.context.needLogin': function(newVal) { |
@@ -40,6 +48,9 @@ export default { | @@ -40,6 +48,9 @@ export default { | ||
40 | this.$yoho.auth({ needLogin: newVal }); | 48 | this.$yoho.auth({ needLogin: newVal }); |
41 | } | 49 | } |
42 | }, | 50 | }, |
51 | + }, | ||
52 | + methods: { | ||
53 | + ...mapMutations(['SET_LOGIN_INFO']) | ||
43 | } | 54 | } |
44 | }; | 55 | }; |
45 | </script> | 56 | </script> |
@@ -105,6 +105,11 @@ export default { | @@ -105,6 +105,11 @@ export default { | ||
105 | this.sendBindSms({ | 105 | this.sendBindSms({ |
106 | mobile: this.phone, | 106 | mobile: this.phone, |
107 | bindCode: this.bindCode | 107 | bindCode: this.bindCode |
108 | + }).then(res => { | ||
109 | + if (res.code !== 200) { | ||
110 | + this.clearSendTimer(); | ||
111 | + this.toast(res.message || '发送失败'); | ||
112 | + } | ||
108 | }); | 113 | }); |
109 | }, | 114 | }, |
110 | clearSendTimer() { | 115 | clearSendTimer() { |
@@ -106,7 +106,8 @@ export default { | @@ -106,7 +106,8 @@ export default { | ||
106 | await this.delay(1500); | 106 | await this.delay(1500); |
107 | 107 | ||
108 | this.payAction({ | 108 | this.payAction({ |
109 | - orderCode: this.orderCode | 109 | + orderCode: this.orderCode, |
110 | + payment: this.$xianyu.isAliApp ? 2 : 9 | ||
110 | }).then((result) => { | 111 | }).then((result) => { |
111 | toast.hide(); | 112 | toast.hide(); |
112 | this.onSuccess(result); | 113 | this.onSuccess(result); |
@@ -92,7 +92,12 @@ yoho.auth = async (args) => { | @@ -92,7 +92,12 @@ yoho.auth = async (args) => { | ||
92 | if (user && user.uid) { | 92 | if (user && user.uid) { |
93 | return user; | 93 | return user; |
94 | } else { | 94 | } else { |
95 | - cookie.set('third_backurl', refer || location.href, { | 95 | + let ck = { |
96 | + s: refer || location.href, | ||
97 | + b: location.href | ||
98 | + }; | ||
99 | + | ||
100 | + cookie.set('ali_backurl', JSON.stringify(ck), { | ||
96 | domain: '.yohobuy.com', | 101 | domain: '.yohobuy.com', |
97 | path: '/', | 102 | path: '/', |
98 | }); | 103 | }); |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <meta name="description" content="" /> | 7 | <meta name="description" content="" /> |
8 | <meta | 8 | <meta |
9 | name="viewport" | 9 | name="viewport" |
10 | - content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" | 10 | + content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover" |
11 | /> | 11 | /> |
12 | <meta name="apple-mobile-web-app-status-bar-style" content="black" /> | 12 | <meta name="apple-mobile-web-app-status-bar-style" content="black" /> |
13 | <meta content="yes" name="apple-mobile-web-app-capable" /> | 13 | <meta content="yes" name="apple-mobile-web-app-capable" /> |
@@ -61,7 +61,7 @@ export default { | @@ -61,7 +61,7 @@ export default { | ||
61 | this.fetchTabList(); | 61 | this.fetchTabList(); |
62 | }, | 62 | }, |
63 | mounted() { | 63 | mounted() { |
64 | - | 64 | + |
65 | }, | 65 | }, |
66 | computed: { | 66 | computed: { |
67 | options: function() { | 67 | options: function() { |
@@ -71,14 +71,14 @@ export default { | @@ -71,14 +71,14 @@ export default { | ||
71 | } | 71 | } |
72 | }, | 72 | }, |
73 | created() { | 73 | created() { |
74 | - | 74 | + |
75 | }, | 75 | }, |
76 | methods: { | 76 | methods: { |
77 | ...mapActions(['fetchNewsList', 'fetchNewsTabList']), | 77 | ...mapActions(['fetchNewsList', 'fetchNewsTabList']), |
78 | 78 | ||
79 | async fetchList() { | 79 | async fetchList() { |
80 | let result = await this.fetchNewsList({ ...this.params }); | 80 | let result = await this.fetchNewsList({ ...this.params }); |
81 | - if (result.code && result.code == 200) { | 81 | + if (result && result.code && result.code == 200) { |
82 | if (!this.newsList.isMoreData) return; | 82 | if (!this.newsList.isMoreData) return; |
83 | this.newsList.list = this.newsList.list.concat(result.data.list); | 83 | this.newsList.list = this.newsList.list.concat(result.data.list); |
84 | this.params.page = this.params.page + 1; | 84 | this.params.page = this.params.page + 1; |
@@ -94,13 +94,13 @@ export default { | @@ -94,13 +94,13 @@ export default { | ||
94 | 94 | ||
95 | async fetchTabList() { | 95 | async fetchTabList() { |
96 | let result = await this.fetchNewsTabList(); | 96 | let result = await this.fetchNewsTabList(); |
97 | - if (result.code && result.code == 200) { | 97 | + if (result && result.code && result.code == 200) { |
98 | this.newsList.tabList = result.data; | 98 | this.newsList.tabList = result.data; |
99 | } | 99 | } |
100 | }, | 100 | }, |
101 | async onPullingUp() { | 101 | async onPullingUp() { |
102 | if (!this.newsList.isMoreData) { | 102 | if (!this.newsList.isMoreData) { |
103 | - this.$refs.scroll.forceUpdate() | 103 | + this.$refs.scroll.forceUpdate(); |
104 | return; | 104 | return; |
105 | } | 105 | } |
106 | this.fetchList(this.params); | 106 | this.fetchList(this.params); |
1 | <!--买家求购确认页--> | 1 | <!--买家求购确认页--> |
2 | <template> | 2 | <template> |
3 | - <LayoutApp :show-back="true" title=""> | 3 | + <LayoutApp :show-back="true" title="出价求购"> |
4 | <div class="body" ref="body"> | 4 | <div class="body" ref="body"> |
5 | <div class="topContainer"> | 5 | <div class="topContainer"> |
6 | - <div class="topView"> | ||
7 | - <div class="title">出价求购</div> | ||
8 | - </div> | 6 | + <!--<div class="topView">--> |
7 | + <!--<div class="title"></div>--> | ||
8 | + <!--</div>--> | ||
9 | <!--商品信息--> | 9 | <!--商品信息--> |
10 | <div class="productDetail"> | 10 | <div class="productDetail"> |
11 | <div class="productImageWrapper"> | 11 | <div class="productImageWrapper"> |
@@ -440,10 +440,12 @@ export default { | @@ -440,10 +440,12 @@ export default { | ||
440 | width: calc(100% - 120*2px - 10*2px); | 440 | width: calc(100% - 120*2px - 10*2px); |
441 | height: 120*2px; | 441 | height: 120*2px; |
442 | margin-left: 10*2px; | 442 | margin-left: 10*2px; |
443 | + justify-content: center; | ||
444 | + display: flex; | ||
445 | + flex-direction: column; | ||
443 | } | 446 | } |
444 | 447 | ||
445 | .size { | 448 | .size { |
446 | - margin-top: 37*2px; | ||
447 | font-family: "PingFang SC"; | 449 | font-family: "PingFang SC"; |
448 | font-size: 12*2px; | 450 | font-size: 12*2px; |
449 | color: #999; | 451 | color: #999; |
@@ -96,6 +96,13 @@ export default { | @@ -96,6 +96,13 @@ export default { | ||
96 | } | 96 | } |
97 | }, | 97 | }, |
98 | deep: true | 98 | deep: true |
99 | + }, | ||
100 | + watch: { | ||
101 | + 'yoho.context.isLogin': function(newVal) { | ||
102 | + if (newVal) { | ||
103 | + this.init(); | ||
104 | + } | ||
105 | + }, | ||
99 | } | 106 | } |
100 | }, | 107 | }, |
101 | methods: { | 108 | methods: { |
@@ -309,6 +316,7 @@ export default { | @@ -309,6 +316,7 @@ export default { | ||
309 | 316 | ||
310 | .product-info { | 317 | .product-info { |
311 | height: 260px; | 318 | height: 260px; |
319 | + display: flex; | ||
312 | } | 320 | } |
313 | 321 | ||
314 | .tip { | 322 | .tip { |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="input-comp"> | 2 | <div class="input-comp"> |
3 | <div class="input-wrapper"> | 3 | <div class="input-wrapper"> |
4 | <div class="price-symbol">¥</div> | 4 | <div class="price-symbol">¥</div> |
5 | - <input ref="input" :value="value" class="cube-input-field" type="text" placeholder="定价需以9结尾,例如¥1299" @blur="onBlur" | 5 | + <input ref="input" :value="value" class="tip" type="text" placeholder="定价需以9结尾,例如¥1299" @blur="onBlur" |
6 | @change="onChange"></input> | 6 | @change="onChange"></input> |
7 | </div> | 7 | </div> |
8 | <div class="num-wrapper" v-if="superSell"> | 8 | <div class="num-wrapper" v-if="superSell"> |
@@ -91,7 +91,7 @@ export default { | @@ -91,7 +91,7 @@ export default { | ||
91 | flex: 1; | 91 | flex: 1; |
92 | font-size: 56px; | 92 | font-size: 56px; |
93 | font-weight: 500; | 93 | font-weight: 500; |
94 | - line-height: 120px; | 94 | + line-height: 80px; |
95 | background: #f5f5f5; | 95 | background: #f5f5f5; |
96 | } | 96 | } |
97 | 97 | ||
@@ -119,7 +119,6 @@ export default { | @@ -119,7 +119,6 @@ export default { | ||
119 | .count { | 119 | .count { |
120 | color: black; | 120 | color: black; |
121 | } | 121 | } |
122 | - | ||
123 | } | 122 | } |
124 | 123 | ||
125 | </style> | 124 | </style> |
@@ -28,16 +28,16 @@ export default { | @@ -28,16 +28,16 @@ export default { | ||
28 | 28 | ||
29 | <style lang="scss" scoped> | 29 | <style lang="scss" scoped> |
30 | .product-wrapper { | 30 | .product-wrapper { |
31 | + display: flex; | ||
31 | height: 240px; | 32 | height: 240px; |
32 | overflow: hidden; | 33 | overflow: hidden; |
33 | } | 34 | } |
34 | 35 | ||
35 | .product-price { | 36 | .product-price { |
36 | - display: inline-block; | ||
37 | - vertical-align: top; | 37 | + display: flex; |
38 | height: 100%; | 38 | height: 100%; |
39 | margin-left: 20px; | 39 | margin-left: 20px; |
40 | - padding-top: 3%; | 40 | + align-items: center; |
41 | } | 41 | } |
42 | 42 | ||
43 | .price { | 43 | .price { |
1 | <!--卖家求购变现--> | 1 | <!--卖家求购变现--> |
2 | <template> | 2 | <template> |
3 | - <LayoutApp :show-back="true"> | 3 | + <LayoutApp :show-back="true" title="变现"> |
4 | <div class="body"> | 4 | <div class="body"> |
5 | - <TitleComp txt="变现"></TitleComp> | 5 | + <!--<TitleComp txt="变现"></TitleComp>--> |
6 | <ProductInfo :data="originProductData" class="product-info" :priceType="'现货最高求购价:'"></ProductInfo> | 6 | <ProductInfo :data="originProductData" class="product-info" :priceType="'现货最高求购价:'"></ProductInfo> |
7 | <div class="inputView"> | 7 | <div class="inputView"> |
8 | <span class="inputViewIcon"> | 8 | <span class="inputViewIcon"> |
@@ -88,7 +88,6 @@ export default { | @@ -88,7 +88,6 @@ export default { | ||
88 | this.isEntry = false; | 88 | this.isEntry = false; |
89 | this.fetchSellerEntryStatus({}) | 89 | this.fetchSellerEntryStatus({}) |
90 | .then((res)=> { | 90 | .then((res)=> { |
91 | - console.log(res); | ||
92 | if (res) { | 91 | if (res) { |
93 | this.isEntry = get(res, 'entrySellerType', 0) !== 0; | 92 | this.isEntry = get(res, 'entrySellerType', 0) !== 0; |
94 | } | 93 | } |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <LayoutApp :show-back="true" title="出售" :back-action="backAction"> | 2 | <LayoutApp :show-back="true" title="出售" :back-action="backAction"> |
3 | <div class="body"> | 3 | <div class="body"> |
4 | <ProductInfo :data="productDetail" class="product-info"></ProductInfo> | 4 | <ProductInfo :data="productDetail" class="product-info"></ProductInfo> |
5 | - <InputPrice @input="changePrice" class="input-price" | 5 | + <InputPrice @input="changePrice" |
6 | :num="num" :value="price" | 6 | :num="num" :value="price" |
7 | @on-blur="compute" :super-sell="superSell" | 7 | @on-blur="compute" :super-sell="superSell" |
8 | @on-num-change="onNumChange" | 8 | @on-num-change="onNumChange" |
@@ -110,9 +110,11 @@ export default { | @@ -110,9 +110,11 @@ export default { | ||
110 | return { | 110 | return { |
111 | goodImg: get(state.product.selectedProductInfo, 'product.goods_list[0].image_list[0].image_url', ''), | 111 | goodImg: get(state.product.selectedProductInfo, 'product.goods_list[0].image_list[0].image_url', ''), |
112 | productName: get(state.product.selectedProductInfo, 'product.product_name', ''), | 112 | productName: get(state.product.selectedProductInfo, 'product.product_name', ''), |
113 | + productId: get(state.product.selectedProductInfo, 'product.product_id', ''), | ||
113 | colorName: get(state.product.selectedProductInfo, 'product.goods_list[0].color_name', ''), | 114 | colorName: get(state.product.selectedProductInfo, 'product.goods_list[0].color_name', ''), |
114 | sizeName: get(state.product.selectedProductInfo, 'size.size_name', ''), | 115 | sizeName: get(state.product.selectedProductInfo, 'size.size_name', ''), |
115 | skup: get(state.product.selectedProductInfo, 'size.skup', ''), | 116 | skup: get(state.product.selectedProductInfo, 'size.skup', ''), |
117 | + bidSkup: get(state.product.selectedProductInfo, 'size.bid_skup', ''), | ||
116 | goodPrice, | 118 | goodPrice, |
117 | priceType, | 119 | priceType, |
118 | goodBidPrice, | 120 | goodBidPrice, |
@@ -149,11 +151,21 @@ export default { | @@ -149,11 +151,21 @@ export default { | ||
149 | disabled: false | 151 | disabled: false |
150 | }, | 152 | }, |
151 | onCancel: () => { | 153 | onCancel: () => { |
152 | - this.$router.replace({ | 154 | + this.$store.commit('order/sellerAskOrder/SELLER_ASK_SET_PRODUCTINFO', { |
155 | + goodImg: this.productDetail.goodImg, | ||
156 | + colorName: this.productDetail.colorName, | ||
157 | + sizeName: this.productDetail.sizeName, | ||
158 | + goodPrice: this.productDetail.bidPrice, | ||
159 | + productId: this.productDetail.productId, | ||
160 | + bid_moster_price: this.productDetail.bidPrice, | ||
161 | + }); | ||
162 | + | ||
163 | + // 跳转变现 | ||
164 | + this.$router.push({ | ||
153 | name: 'sellAskOrder', | 165 | name: 'sellAskOrder', |
154 | query: { | 166 | query: { |
155 | - skup: this.productDetail.skup, | ||
156 | - price: this.productDetail.bidPrice | 167 | + skup: this.productDetail.bidSkup, |
168 | + price: this.productDetail.bidPrice, | ||
157 | } | 169 | } |
158 | }); | 170 | }); |
159 | } | 171 | } |
@@ -375,6 +387,11 @@ export default { | @@ -375,6 +387,11 @@ export default { | ||
375 | padding: 0 50px; | 387 | padding: 0 50px; |
376 | } | 388 | } |
377 | 389 | ||
390 | +.product-info { | ||
391 | + height: 240px; | ||
392 | + margin-bottom: 20px; | ||
393 | +} | ||
394 | + | ||
378 | .submit-btn { | 395 | .submit-btn { |
379 | height: 80px; | 396 | height: 80px; |
380 | line-height: 80px; | 397 | line-height: 80px; |
@@ -211,6 +211,7 @@ export default { | @@ -211,6 +211,7 @@ export default { | ||
211 | 211 | ||
212 | .size-info, | 212 | .size-info, |
213 | .size-price { | 213 | .size-price { |
214 | + font-family: "Alte DIN 1451 Mittelschrift"; | ||
214 | color: #fff; | 215 | color: #fff; |
215 | } | 216 | } |
216 | } | 217 | } |
@@ -218,6 +219,7 @@ export default { | @@ -218,6 +219,7 @@ export default { | ||
218 | &.disabled { | 219 | &.disabled { |
219 | .size-info, | 220 | .size-info, |
220 | .size-price { | 221 | .size-price { |
222 | + font-family: "Alte DIN 1451 Mittelschrift"; | ||
221 | color: #ccc; | 223 | color: #ccc; |
222 | } | 224 | } |
223 | } | 225 | } |
@@ -221,6 +221,7 @@ export default { | @@ -221,6 +221,7 @@ export default { | ||
221 | .title { | 221 | .title { |
222 | font-size: 40px; | 222 | font-size: 40px; |
223 | line-height: 96px; | 223 | line-height: 96px; |
224 | + font-weight: bold; | ||
224 | 225 | ||
225 | i { | 226 | i { |
226 | float: right; | 227 | float: right; |
@@ -253,6 +254,7 @@ export default { | @@ -253,6 +254,7 @@ export default { | ||
253 | padding-top: 30px; | 254 | padding-top: 30px; |
254 | font-size: 32px; | 255 | font-size: 32px; |
255 | color: #000; | 256 | color: #000; |
257 | + font-family: "Alte DIN 1451 Mittelschrift"; | ||
256 | } | 258 | } |
257 | } | 259 | } |
258 | } | 260 | } |
@@ -344,6 +346,7 @@ export default { | @@ -344,6 +346,7 @@ export default { | ||
344 | font-size: 28px; | 346 | font-size: 28px; |
345 | 347 | ||
346 | i { | 348 | i { |
349 | + font-family: "Alte DIN 1451 Mittelschrift"; | ||
347 | font-size: 20px; | 350 | font-size: 20px; |
348 | font-style: normal; | 351 | font-style: normal; |
349 | } | 352 | } |
@@ -178,9 +178,9 @@ export default { | @@ -178,9 +178,9 @@ export default { | ||
178 | }, | 178 | }, |
179 | }, | 179 | }, |
180 | mounted() { | 180 | mounted() { |
181 | - if (this.isQiugouEnabled === null) { | ||
182 | - this.$store.dispatch('getSysConfigQiugou'); | ||
183 | - } | 181 | + // if (this.isQiugouEnabled === null) { |
182 | + this.$store.dispatch('getSysConfigQiugou'); | ||
183 | + // } | ||
184 | }, | 184 | }, |
185 | activated() { | 185 | activated() { |
186 | this.loadData(this.productId); | 186 | this.loadData(this.productId); |
@@ -264,10 +264,10 @@ export default function() { | @@ -264,10 +264,10 @@ export default function() { | ||
264 | return order; | 264 | return order; |
265 | }, | 265 | }, |
266 | 266 | ||
267 | - async payAction(ctx, { orderCode }) { | 267 | + async payAction(ctx, { orderCode, payment = 2 }) { |
268 | const payResult = await this.$api.post('/api/order/pay', { | 268 | const payResult = await this.$api.post('/api/order/pay', { |
269 | orderCode, | 269 | orderCode, |
270 | - payment: 2 | 270 | + payment |
271 | }); | 271 | }); |
272 | 272 | ||
273 | if (payResult.code !== 200) { | 273 | if (payResult.code !== 200) { |
@@ -34,12 +34,6 @@ const initClient = (store) => { | @@ -34,12 +34,6 @@ const initClient = (store) => { | ||
34 | } | 34 | } |
35 | }; | 35 | }; |
36 | img.src = 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA'; | 36 | img.src = 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA'; |
37 | - | ||
38 | - Vue.$sdk.getUser().then(user => { | ||
39 | - if (user && user.uid) { | ||
40 | - store.commit('SET_LOGIN_INFO', user); | ||
41 | - } | ||
42 | - }); | ||
43 | }; | 37 | }; |
44 | 38 | ||
45 | export { | 39 | export { |
@@ -13,7 +13,7 @@ const sign = global.yoho.sign; | @@ -13,7 +13,7 @@ const sign = global.yoho.sign; | ||
13 | const config = global.yoho.config; | 13 | const config = global.yoho.config; |
14 | 14 | ||
15 | const loginPage = '//m.yohobuy.com/signin.html'; | 15 | const loginPage = '//m.yohobuy.com/signin.html'; |
16 | -const homePage = `${config.siteUrl}/xianyu/channel`; | 16 | +const homePage = `${config.siteUrl}/xianyu/index/channel`; |
17 | 17 | ||
18 | const URL_BIND_KEY = 'bind_code'; | 18 | const URL_BIND_KEY = 'bind_code'; |
19 | const MAX_MSG_SEND_TIMES = 20; | 19 | const MAX_MSG_SEND_TIMES = 20; |
@@ -179,14 +179,21 @@ const login = { | @@ -179,14 +179,21 @@ const login = { | ||
179 | sourceTypeSecond: req.yoho.isAliApp ? 'xianyu' : '' | 179 | sourceTypeSecond: req.yoho.isAliApp ? 'xianyu' : '' |
180 | }).then(result => { | 180 | }).then(result => { |
181 | let redirectUrl = loginPage; | 181 | let redirectUrl = loginPage; |
182 | + let referUrl = {}; | ||
182 | 183 | ||
183 | - if (req.cookies.third_backurl) { | ||
184 | - redirectUrl += '?refer=' + encodeURIComponent(handleReferUrl(req.cookies.third_backurl)); | 184 | + if (req.cookies.ali_backurl) { |
185 | + try { | ||
186 | + referUrl = JSON.parse(req.cookies.ali_backurl); | ||
187 | + } catch(e) { | ||
188 | + log.debug(JSON.stringify(e)); | ||
189 | + } | ||
190 | + | ||
191 | + redirectUrl += '?refer=' + encodeURIComponent(handleReferUrl(referUrl.b || '')); | ||
185 | } | 192 | } |
186 | 193 | ||
187 | if (result.code === 200) { | 194 | if (result.code === 200) { |
188 | if (_.get(result, 'data.is_bind') === 'N') { | 195 | if (_.get(result, 'data.is_bind') === 'N') { |
189 | - redirectUrl = req.cookies.third_backurl ? req.cookies.third_backurl : homePage; | 196 | + redirectUrl = referUrl.b ? referUrl.b : homePage; |
190 | redirectUrl += redirectUrl.indexOf('?') > 0 ? '&' : '?'; | 197 | redirectUrl += redirectUrl.indexOf('?') > 0 ? '&' : '?'; |
191 | redirectUrl += URL_BIND_KEY + '=' + encodeURIComponent(aes.dynamicEncryption(`taobao::${user.open_uid}`)); | 198 | redirectUrl += URL_BIND_KEY + '=' + encodeURIComponent(aes.dynamicEncryption(`taobao::${user.open_uid}`)); |
192 | } else if (+_.get(result, 'data.uid') > 0) { | 199 | } else if (+_.get(result, 'data.uid') > 0) { |
@@ -199,7 +206,7 @@ const login = { | @@ -199,7 +206,7 @@ const login = { | ||
199 | res.cookie('third_backurl', '', { | 206 | res.cookie('third_backurl', '', { |
200 | domain: 'yohobuy.com' | 207 | domain: 'yohobuy.com' |
201 | }); | 208 | }); |
202 | - return res.redirect(handleReferUrl(req.cookies.third_backurl ? req.cookies.third_backurl : homePage)); | 209 | + return res.redirect(handleReferUrl(referUrl.s ? referUrl.s : homePage)); |
203 | }); | 210 | }); |
204 | } | 211 | } |
205 | } else { | 212 | } else { |
@@ -252,7 +259,7 @@ const bind = { | @@ -252,7 +259,7 @@ const bind = { | ||
252 | } else { | 259 | } else { |
253 | res.json({ | 260 | res.json({ |
254 | code: 200, | 261 | code: 200, |
255 | - message: `${info.type || ''} not found` | 262 | + message: '绑定信息异常' |
256 | }); | 263 | }); |
257 | } | 264 | } |
258 | }, | 265 | }, |
1 | { | 1 | { |
2 | "name": "xianyu-ufo-app-web", | 2 | "name": "xianyu-ufo-app-web", |
3 | - "version": "0.0.2-beta-31", | 3 | + "version": "0.0.2-beta-33", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "Xianyu Project With Express", | 5 | "description": "Xianyu Project With Express", |
6 | "repository": { | 6 | "repository": { |
-
Please register or login to post a comment