Merge branch 'develop' of http://git.yoho.cn/fe/xianyu-ufo-app-web into develop
Showing
31 changed files
with
196 additions
and
96 deletions
1 | <template> | 1 | <template> |
2 | <div id="app"> | 2 | <div id="app"> |
3 | - <transition | ||
4 | - :name="`route-view-${yoho.direction}`"> | ||
5 | <keep-alive :max="20"> | 3 | <keep-alive :max="20"> |
6 | <router-view :key="routerViewKey"></router-view> | 4 | <router-view :key="routerViewKey"></router-view> |
7 | </keep-alive> | 5 | </keep-alive> |
8 | - </transition> | ||
9 | </div> | 6 | </div> |
10 | </template> | 7 | </template> |
11 | 8 | ||
12 | <script> | 9 | <script> |
13 | -import {mapState} from 'vuex'; | 10 | +import {mapState, mapMutations} from 'vuex'; |
14 | 11 | ||
15 | export default { | 12 | export default { |
16 | name: 'App', | 13 | name: 'App', |
@@ -32,10 +29,18 @@ export default { | @@ -32,10 +29,18 @@ export default { | ||
32 | // this.$xianyu.setXianyuWebview(); | 29 | // this.$xianyu.setXianyuWebview(); |
33 | this.$xianyu.setXianyuNav(); | 30 | this.$xianyu.setXianyuNav(); |
34 | 31 | ||
32 | + | ||
33 | + this.$sdk.getUser().then(user => { | ||
34 | + if (user && user.uid) { | ||
35 | + this.SET_LOGIN_INFO(user); | ||
36 | + } else { | ||
35 | // queryString中携带bind_code,则弹出绑定弹框 | 37 | // queryString中携带bind_code,则弹出绑定弹框 |
36 | if (this.$route.query.bind_code) { | 38 | if (this.$route.query.bind_code) { |
37 | this.$root.$createThirdBind().open(); | 39 | this.$root.$createThirdBind().open(); |
38 | } | 40 | } |
41 | + } | ||
42 | + }); | ||
43 | + | ||
39 | }, | 44 | }, |
40 | watch: { | 45 | watch: { |
41 | 'yoho.context.needLogin': function(newVal) { | 46 | 'yoho.context.needLogin': function(newVal) { |
@@ -43,6 +48,9 @@ export default { | @@ -43,6 +48,9 @@ export default { | ||
43 | this.$yoho.auth({ needLogin: newVal }); | 48 | this.$yoho.auth({ needLogin: newVal }); |
44 | } | 49 | } |
45 | }, | 50 | }, |
51 | + }, | ||
52 | + methods: { | ||
53 | + ...mapMutations(['SET_LOGIN_INFO']) | ||
46 | } | 54 | } |
47 | }; | 55 | }; |
48 | </script> | 56 | </script> |
1 | <template> | 1 | <template> |
2 | - <div v-if="dialogEnable" class="third-bind-wrapper"> | 2 | + <CubeScroll v-if="dialogEnable" class="third-bind-wrapper"> |
3 | <div class="bind-dialog"> | 3 | <div class="bind-dialog"> |
4 | <p class="bind-title">关联有货UFO账户</p> | 4 | <p class="bind-title">关联有货UFO账户</p> |
5 | <div class="under-row"> | 5 | <div class="under-row"> |
@@ -20,12 +20,12 @@ | @@ -20,12 +20,12 @@ | ||
20 | <CubeButton class="bind-btn" :disabled="submitDisable" @click="bindSubmit">登录</CubeButton> | 20 | <CubeButton class="bind-btn" :disabled="submitDisable" @click="bindSubmit">登录</CubeButton> |
21 | </div> | 21 | </div> |
22 | </div> | 22 | </div> |
23 | - </div> | 23 | + </CubeScroll> |
24 | </template> | 24 | </template> |
25 | 25 | ||
26 | <script> | 26 | <script> |
27 | 27 | ||
28 | -import { Button, Input } from 'cube-ui'; | 28 | +import { Button, Scroll, Input } from 'cube-ui'; |
29 | import { mapActions, mapState } from 'vuex'; | 29 | import { mapActions, mapState } from 'vuex'; |
30 | 30 | ||
31 | export default { | 31 | export default { |
@@ -48,6 +48,18 @@ export default { | @@ -48,6 +48,18 @@ export default { | ||
48 | return !(this.phone && this.smsCode); | 48 | return !(this.phone && this.smsCode); |
49 | } | 49 | } |
50 | }, | 50 | }, |
51 | + watch: { | ||
52 | + smsCode(newVal, oldVal) { | ||
53 | + // 解决ios自动填充验证码输入两遍的问题 | ||
54 | + if (this.$yoho.isiOS && newVal.length > 4 && newVal.length - oldVal.length > 1 && newVal.length % 2 === 0) { | ||
55 | + let half = newVal.length / 2; | ||
56 | + | ||
57 | + if (newVal.substring(0, half) === newVal.substring(half)) { | ||
58 | + this.smsCode = newVal.substring(0, half); | ||
59 | + } | ||
60 | + } | ||
61 | + } | ||
62 | + }, | ||
51 | methods: { | 63 | methods: { |
52 | ...mapActions(['sendBindSms', 'submitThirdBind']), | 64 | ...mapActions(['sendBindSms', 'submitThirdBind']), |
53 | open() { | 65 | open() { |
@@ -93,6 +105,11 @@ export default { | @@ -93,6 +105,11 @@ export default { | ||
93 | this.sendBindSms({ | 105 | this.sendBindSms({ |
94 | mobile: this.phone, | 106 | mobile: this.phone, |
95 | bindCode: this.bindCode | 107 | bindCode: this.bindCode |
108 | + }).then(res => { | ||
109 | + if (res.code !== 200) { | ||
110 | + this.clearSendTimer(); | ||
111 | + this.toast(res.message || '发送失败'); | ||
112 | + } | ||
96 | }); | 113 | }); |
97 | }, | 114 | }, |
98 | clearSendTimer() { | 115 | clearSendTimer() { |
@@ -119,6 +136,7 @@ export default { | @@ -119,6 +136,7 @@ export default { | ||
119 | } | 136 | } |
120 | }, | 137 | }, |
121 | components: { | 138 | components: { |
139 | + CubeScroll: Scroll, | ||
122 | CubeInput: Input, | 140 | CubeInput: Input, |
123 | CubeButton: Button | 141 | CubeButton: Button |
124 | } | 142 | } |
@@ -137,6 +155,7 @@ export default { | @@ -137,6 +155,7 @@ export default { | ||
137 | display: flex; | 155 | display: flex; |
138 | justify-content: center; | 156 | justify-content: center; |
139 | align-items: center; | 157 | align-items: center; |
158 | + overflow: hidden; | ||
140 | } | 159 | } |
141 | 160 | ||
142 | .bind-dialog { | 161 | .bind-dialog { |
@@ -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 | }); |
1 | <template> | 1 | <template> |
2 | <LayoutApp :show-back="true" title="我的" :hideHeader="hideHeader"> | 2 | <LayoutApp :show-back="true" title="我的" :hideHeader="hideHeader"> |
3 | <div class="body" ref="body"> | 3 | <div class="body" ref="body"> |
4 | + <Scroll> | ||
4 | <div v-for="(value, key) in getMineList" :key="key"> | 5 | <div v-for="(value, key) in getMineList" :key="key"> |
5 | <tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey> | 6 | <tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey> |
6 | - <scroll></scroll> | 7 | + <niticelScroll></niticelScroll> |
7 | </tab-item> | 8 | </tab-item> |
8 | <template v-else-if="key === 'resource1' || key === 'resource2'"> | 9 | <template v-else-if="key === 'resource1' || key === 'resource2'"> |
9 | - <div v-if="value.data.template_name ==='single_image'"> | 10 | + <div v-if="value.data.template_name ==='single_image'" class="marg"> |
10 | <singleImage :data="value.data.data[0]"></singleImage> | 11 | <singleImage :data="value.data.data[0]"></singleImage> |
11 | </div> | 12 | </div> |
12 | </template> | 13 | </template> |
13 | - <div v-else-if="key === 'order'" class="bg-bottom"> | 14 | + <div v-else-if="key === 'order'" class="bg-bottom marg"> |
14 | <order></order> | 15 | <order></order> |
15 | </div> | 16 | </div> |
16 | - <div v-else-if="key === 'sale'" class="bg-top"> | 17 | + <div v-else-if="key === 'sale'" class="bg-top marg"> |
17 | <tab-item :data="value" noLine titleBold titleSmall></tab-item> | 18 | <tab-item :data="value" noLine titleBold titleSmall></tab-item> |
18 | </div> | 19 | </div> |
19 | - <bind v-else-if="key === 'bindAccount'" :data="value"></bind> | ||
20 | - <tab-item v-else :data="value"></tab-item> | 20 | + <bind class="marg" v-else-if="key === 'bindAccount'" :data="value"></bind> |
21 | + <tab-item class="marg" v-else :data="value"></tab-item> | ||
21 | </div> | 22 | </div> |
22 | - | 23 | + </Scroll> |
23 | </div> | 24 | </div> |
24 | </LayoutApp> | 25 | </LayoutApp> |
25 | </template> | 26 | </template> |
@@ -30,6 +31,7 @@ import order from './components/order'; | @@ -30,6 +31,7 @@ import order from './components/order'; | ||
30 | import scroll from './components/scroll'; | 31 | import scroll from './components/scroll'; |
31 | import singleImage from './components/singleImage'; | 32 | import singleImage from './components/singleImage'; |
32 | import bind from './components/bind'; | 33 | import bind from './components/bind'; |
34 | +import {Style, Scroll} from 'cube-ui'; | ||
33 | import { createNamespacedHelpers } from 'vuex'; | 35 | import { createNamespacedHelpers } from 'vuex'; |
34 | 36 | ||
35 | const { mapGetters, mapActions } = createNamespacedHelpers('home/mine'); | 37 | const { mapGetters, mapActions } = createNamespacedHelpers('home/mine'); |
@@ -68,9 +70,12 @@ export default { | @@ -68,9 +70,12 @@ export default { | ||
68 | components: { | 70 | components: { |
69 | tabItem, | 71 | tabItem, |
70 | order, | 72 | order, |
71 | - scroll, | 73 | + niticelScroll: scroll, |
72 | singleImage, | 74 | singleImage, |
73 | - bind | 75 | + bind, |
76 | + Style, | ||
77 | + Scroll | ||
78 | + | ||
74 | } | 79 | } |
75 | }; | 80 | }; |
76 | </script> | 81 | </script> |
@@ -78,9 +83,12 @@ export default { | @@ -78,9 +83,12 @@ export default { | ||
78 | <style lang="scss" scoped> | 83 | <style lang="scss" scoped> |
79 | .body { | 84 | .body { |
80 | height: 100%; | 85 | height: 100%; |
81 | - overflow-y: auto; | 86 | + // overflow-y: auto; |
82 | background-color: white; | 87 | background-color: white; |
83 | - padding: 0 40px; | 88 | + // padding: 0 40px; |
89 | +} | ||
90 | +.marg { | ||
91 | + margin: 0 40px; | ||
84 | } | 92 | } |
85 | 93 | ||
86 | .bg-top, | 94 | .bg-top, |
@@ -78,7 +78,7 @@ export default { | @@ -78,7 +78,7 @@ export default { | ||
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 { |
@@ -24,7 +24,7 @@ export default { | @@ -24,7 +24,7 @@ export default { | ||
24 | ...mapMutations(['filterOrderList', 'resetData']), | 24 | ...mapMutations(['filterOrderList', 'resetData']), |
25 | 25 | ||
26 | async onAction({ action, order, isDetail = false } = {}) { | 26 | async onAction({ action, order, isDetail = false } = {}) { |
27 | - const { owner = ownType.SELL } = this.$route.params; | 27 | + const { owner = ownType.SELL, status } = this.$route.params; |
28 | const { | 28 | const { |
29 | orderCode, | 29 | orderCode, |
30 | realPrice = '', | 30 | realPrice = '', |
@@ -43,6 +43,7 @@ export default { | @@ -43,6 +43,7 @@ export default { | ||
43 | const isOk = await this.deleteOrder({ | 43 | const isOk = await this.deleteOrder({ |
44 | orderCode, | 44 | orderCode, |
45 | owner, | 45 | owner, |
46 | + status | ||
46 | }); | 47 | }); |
47 | 48 | ||
48 | if (isOk) { | 49 | if (isOk) { |
@@ -52,7 +53,7 @@ export default { | @@ -52,7 +53,7 @@ export default { | ||
52 | this.filterOrderList({ | 53 | this.filterOrderList({ |
53 | orderCode, | 54 | orderCode, |
54 | owner, | 55 | owner, |
55 | - status: this.status, | 56 | + status |
56 | }); | 57 | }); |
57 | } | 58 | } |
58 | } | 59 | } |
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) { | 181 | + // if (this.isQiugouEnabled === null) { |
182 | this.$store.dispatch('getSysConfigQiugou'); | 182 | this.$store.dispatch('getSysConfigQiugou'); |
183 | - } | 183 | + // } |
184 | }, | 184 | }, |
185 | activated() { | 185 | activated() { |
186 | this.loadData(this.productId); | 186 | this.loadData(this.productId); |
@@ -51,10 +51,8 @@ export default function() { | @@ -51,10 +51,8 @@ export default function() { | ||
51 | }, | 51 | }, |
52 | async fetchChannelList({ commit }) { | 52 | async fetchChannelList({ commit }) { |
53 | const result = await this.$api.get('/api/ufo/channel/channelList', { | 53 | const result = await this.$api.get('/api/ufo/channel/channelList', { |
54 | - content_code: 'f788335b57b67c1711f255648c744dab', | 54 | + content_code: 'cfcd8de156d3edc26c84091804c43e23', |
55 | }); | 55 | }); |
56 | - console.log(result); | ||
57 | - console.log("resultresultresult"); | ||
58 | if (result.code === 200) { | 56 | if (result.code === 200) { |
59 | commit(Types.FETCH_CHANNEL, { list: result.data }); | 57 | commit(Types.FETCH_CHANNEL, { list: result.data }); |
60 | return result.data; | 58 | return result.data; |
@@ -89,7 +89,7 @@ const DEFUALT_CONFIG_TIP = { | @@ -89,7 +89,7 @@ const DEFUALT_CONFIG_TIP = { | ||
89 | }; | 89 | }; |
90 | 90 | ||
91 | const TEST_PRODUCT_INFO = { | 91 | const TEST_PRODUCT_INFO = { |
92 | - least_price: 1119.00, | 92 | + least_price: 0, |
93 | max_price: 20000.00, | 93 | max_price: 20000.00, |
94 | max_sort_id: 10, | 94 | max_sort_id: 10, |
95 | min_price: 0.01, | 95 | min_price: 0.01, |
@@ -98,7 +98,9 @@ const TEST_PRODUCT_INFO = { | @@ -98,7 +98,9 @@ const TEST_PRODUCT_INFO = { | ||
98 | product_id: 10000068, | 98 | product_id: 10000068, |
99 | product_name: 'Timberland 红色女靴', | 99 | product_name: 'Timberland 红色女靴', |
100 | sale_time: '2016.01.01', | 100 | sale_time: '2016.01.01', |
101 | - image: 'http://img11.static.yhbimg.com/goodsimg/2018/10/18/17/0124eed582cab20be7047c796c314cbc76.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80' | 101 | + image: 'http://img11.static.yhbimg.com/goodsimg/2018/10/18/17/0124eed582cab20be7047c796c314cbc76.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80', |
102 | + sizeName: '', | ||
103 | + colorName: '', | ||
102 | }; | 104 | }; |
103 | 105 | ||
104 | export default function() { | 106 | export default function() { |
@@ -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) { |
@@ -55,15 +55,40 @@ export default function() { | @@ -55,15 +55,40 @@ export default function() { | ||
55 | orderState.pullUpLoad = false; | 55 | orderState.pullUpLoad = false; |
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | - filterOrderList(state, { orderCode, owner, status }) { | ||
59 | - const orderState = state.orderListByType[orderStatusKey(owner, status)]; | 58 | + filterOrderList(state, { |
59 | + orderCode, | ||
60 | + owner = ownType.SELL, | ||
61 | + status = 1 | ||
62 | + }) { | ||
63 | + let orderState = state.orderListByType[orderStatusKey(owner, status)]; | ||
64 | + | ||
60 | 65 | ||
61 | orderState.orderList = orderState.orderList.filter( | 66 | orderState.orderList = orderState.orderList.filter( |
62 | order => order.orderCode !== orderCode, | 67 | order => order.orderCode !== orderCode, |
63 | ); | 68 | ); |
64 | orderState.isShowEmpty = orderState.orderList.length === 0; | 69 | orderState.isShowEmpty = orderState.orderList.length === 0; |
65 | }, | 70 | }, |
66 | - resetData(state, { owner, status } = {}) { | 71 | + setOrderStatus(state, currentStatus) { |
72 | + state.currentStatus = +currentStatus; | ||
73 | + }, | ||
74 | + setRouteParamStatus(state, status = 1) { | ||
75 | + state.routeParamStatus = +status; | ||
76 | + }, | ||
77 | + resetPartialData(state, { | ||
78 | + owner = ownType.SELL, | ||
79 | + status = 1 | ||
80 | + }) { | ||
81 | + Object.assign(state.orderListByType[orderStatusKey(owner, status)], { | ||
82 | + page: 1, | ||
83 | + orderList: [], | ||
84 | + pagetotal: 0, | ||
85 | + pullUpLoad: true, | ||
86 | + }); | ||
87 | + }, | ||
88 | + resetData(state, { | ||
89 | + owner = ownType.SELL, | ||
90 | + status = 1 | ||
91 | + }) { | ||
67 | const orderListState = initialOrderState(); | 92 | const orderListState = initialOrderState(); |
68 | 93 | ||
69 | state.orderListByType[orderStatusKey(owner, status)] = orderListState; | 94 | state.orderListByType[orderStatusKey(owner, status)] = orderListState; |
@@ -79,10 +104,16 @@ export default function() { | @@ -79,10 +104,16 @@ export default function() { | ||
79 | * } | 104 | * } |
80 | * r | 105 | * r |
81 | */ | 106 | */ |
82 | - async fetchOrderList({ commit, state }, { owner, status }) { | 107 | + async fetchOrderList({ |
108 | + commit, | ||
109 | + state | ||
110 | + }, { | ||
111 | + owner = ownType.SELL, | ||
112 | + status = 1 | ||
113 | + }) { | ||
83 | const { page } = state.orderListByType[orderStatusKey(owner, status)]; | 114 | const { page } = state.orderListByType[orderStatusKey(owner, status)]; |
84 | 115 | ||
85 | - const res = await this.$api.get('/api/order/list', { | 116 | + const res = await this.$api.post('/api/order/list', { |
86 | tabType: owner, | 117 | tabType: owner, |
87 | type: status, | 118 | type: status, |
88 | page, | 119 | page, |
@@ -180,7 +211,7 @@ export default function() { | @@ -180,7 +211,7 @@ export default function() { | ||
180 | }); | 211 | }); |
181 | 212 | ||
182 | if (res.code === 200) { | 213 | if (res.code === 200) { |
183 | - return { errMsg: '', isOk: true, bidData: res.data }; | 214 | + return { errMsg: '', isOk: true, bidData: res.data}; |
184 | } else { | 215 | } else { |
185 | return { errMsg: res.message, isOk: false }; | 216 | return { errMsg: res.message, isOk: false }; |
186 | } | 217 | } |
@@ -30,7 +30,7 @@ const { | @@ -30,7 +30,7 @@ const { | ||
30 | } = Types; | 30 | } = Types; |
31 | 31 | ||
32 | const TEST_PRODUCT_INFO = { | 32 | const TEST_PRODUCT_INFO = { |
33 | - least_price: 1119.00, | 33 | + least_price: 0, |
34 | max_price: 20000.00, | 34 | max_price: 20000.00, |
35 | max_sort_id: 10, | 35 | max_sort_id: 10, |
36 | min_price: 0.01, | 36 | min_price: 0.01, |
@@ -40,9 +40,9 @@ const TEST_PRODUCT_INFO = { | @@ -40,9 +40,9 @@ const TEST_PRODUCT_INFO = { | ||
40 | product_name: 'Timberland 红色女靴', | 40 | product_name: 'Timberland 红色女靴', |
41 | sale_time: '2016.01.01', | 41 | sale_time: '2016.01.01', |
42 | goodImg: 'http://img11.static.yhbimg.com/goodsimg/2018/10/18/17/0124eed582cab20be7047c796c314cbc76.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80', | 42 | goodImg: 'http://img11.static.yhbimg.com/goodsimg/2018/10/18/17/0124eed582cab20be7047c796c314cbc76.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80', |
43 | - colorName: '黑色', | ||
44 | - sizeName: '42码', | ||
45 | - goodPrice: 1119.00, | 43 | + colorName: '', |
44 | + sizeName: '', | ||
45 | + goodPrice: 0, | ||
46 | priceType: '现货最高求购价:', | 46 | priceType: '现货最高求购价:', |
47 | }; | 47 | }; |
48 | 48 |
@@ -15,7 +15,7 @@ export default { | @@ -15,7 +15,7 @@ export default { | ||
15 | content_code: '05e4f5782dfc3a5e10d39b8f04a7dcb9', | 15 | content_code: '05e4f5782dfc3a5e10d39b8f04a7dcb9', |
16 | }; | 16 | }; |
17 | } | 17 | } |
18 | - return this.$api.get(`/api/ufo/product${path}`, params).then(result => { | 18 | + return this.$api.post(`/api/ufo/product${path}`, params).then(result => { |
19 | if (result.code === 200) { | 19 | if (result.code === 200) { |
20 | return result.data; | 20 | return result.data; |
21 | } else { | 21 | } else { |
@@ -35,7 +35,7 @@ export default { | @@ -35,7 +35,7 @@ export default { | ||
35 | })); | 35 | })); |
36 | }, | 36 | }, |
37 | async fetchRecommendProduct({ commit }, { productId }) { | 37 | async fetchRecommendProduct({ commit }, { productId }) { |
38 | - const result = await this.$api.get('/api/ufo/product/recommend', { product_id: productId }) | 38 | + const result = await this.$api.post('/api/ufo/product/recommend', { product_id: productId }) |
39 | 39 | ||
40 | return result?.data?.product_list ?? [] | 40 | return result?.data?.product_list ?? [] |
41 | }, | 41 | }, |
@@ -52,7 +52,7 @@ export default { | @@ -52,7 +52,7 @@ export default { | ||
52 | return false; | 52 | return false; |
53 | } | 53 | } |
54 | 54 | ||
55 | - const isFav = await this.$api.get('/api/ufo/product/fav', { productId }).then(result => { | 55 | + const isFav = await this.$api.post('/api/ufo/product/fav', { productId }).then(result => { |
56 | if (result.code === 200) { | 56 | if (result.code === 200) { |
57 | return result.data; | 57 | return result.data; |
58 | } else { | 58 | } else { |
@@ -63,7 +63,7 @@ export default { | @@ -63,7 +63,7 @@ export default { | ||
63 | commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav }); | 63 | commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav }); |
64 | }, | 64 | }, |
65 | async fetchTop3({ commit }, { productId }) { | 65 | async fetchTop3({ commit }, { productId }) { |
66 | - const result = await this.$api.get('/api/ufo/product/top', { product_id: productId }); | 66 | + const result = await this.$api.post('/api/ufo/product/top', { product_id: productId }); |
67 | 67 | ||
68 | if (result.code === 200) { | 68 | if (result.code === 200) { |
69 | const productList = result.data.product_list || []; | 69 | const productList = result.data.product_list || []; |
@@ -72,7 +72,7 @@ export default { | @@ -72,7 +72,7 @@ export default { | ||
72 | } | 72 | } |
73 | }, | 73 | }, |
74 | async toggleFav({ commit }, { productId, isFav }) { | 74 | async toggleFav({ commit }, { productId, isFav }) { |
75 | - const result = await this.$api.get(`/api/ufo/product/favorite/${isFav ? 'add' : 'cancel'}`, { productId }); | 75 | + const result = await this.$api.post(`/api/ufo/product/favorite/${isFav ? 'add' : 'cancel'}`, { productId }); |
76 | 76 | ||
77 | if (result && result.code === 200) { | 77 | if (result && result.code === 200) { |
78 | commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav }); | 78 | commit(Types.UPDATE_PRODUCT_FAV, { productId, isFav }); |
@@ -106,7 +106,7 @@ export default { | @@ -106,7 +106,7 @@ export default { | ||
106 | async requestSize({ state }, { product_id, goods_id, size_ids }) { | 106 | async requestSize({ state }, { product_id, goods_id, size_ids }) { |
107 | const selectedProduct = state.selectedProductInfo; | 107 | const selectedProduct = state.selectedProductInfo; |
108 | 108 | ||
109 | - await this.$api.get('/api/ufo/product/addsize', { | 109 | + await this.$api.post('/api/ufo/product/addsize', { |
110 | product_id, | 110 | product_id, |
111 | goods_id, | 111 | goods_id, |
112 | size_ids, | 112 | size_ids, |
@@ -24,6 +24,7 @@ export default function(mergeState = {}) { | @@ -24,6 +24,7 @@ export default function(mergeState = {}) { | ||
24 | isLogin: false, | 24 | isLogin: false, |
25 | userHeadIco: '', | 25 | userHeadIco: '', |
26 | userName: '', | 26 | userName: '', |
27 | + enableQiugou: null, // 是否启用求购,默认不启用, null: 初始状态标识,需要请求api, false: 不启用, true: 启用 | ||
27 | }, | 28 | }, |
28 | window: { | 29 | window: { |
29 | statusBarStatus: false, | 30 | statusBarStatus: false, |
@@ -39,11 +40,6 @@ export default function(mergeState = {}) { | @@ -39,11 +40,6 @@ export default function(mergeState = {}) { | ||
39 | direction: 'forword', | 40 | direction: 'forword', |
40 | homePage: true, | 41 | homePage: true, |
41 | user: {}, | 42 | user: {}, |
42 | - | ||
43 | - // 系统配置 | ||
44 | - sysConfig: { | ||
45 | - enableQiugou: null, // 是否启用求购,默认不启用, null: 初始状态标识,需要请求api, false: 不启用, true: 启用 | ||
46 | - } | ||
47 | }, | 43 | }, |
48 | mergeState, | 44 | mergeState, |
49 | ), | 45 | ), |
@@ -139,7 +135,7 @@ export default function(mergeState = {}) { | @@ -139,7 +135,7 @@ export default function(mergeState = {}) { | ||
139 | state.user.sellerInfo = sellerInfo || {}; | 135 | state.user.sellerInfo = sellerInfo || {}; |
140 | }, | 136 | }, |
141 | [Types.UPDATE_SYSTEM_CONFIG_QIUGOU](state, { enabled }) { | 137 | [Types.UPDATE_SYSTEM_CONFIG_QIUGOU](state, { enabled }) { |
142 | - state.sysConfig.enableQiugou = enabled; | 138 | + state.context.enableQiugou = enabled; |
143 | }, | 139 | }, |
144 | }, | 140 | }, |
145 | getters: { | 141 | getters: { |
@@ -147,7 +143,7 @@ export default function(mergeState = {}) { | @@ -147,7 +143,7 @@ export default function(mergeState = {}) { | ||
147 | return state.context.isLogin; | 143 | return state.context.isLogin; |
148 | }, | 144 | }, |
149 | isQiugouEnabled(state) { | 145 | isQiugouEnabled(state) { |
150 | - return state.sysConfig.enableQiugou; | 146 | + return state.context.enableQiugou; |
151 | }, | 147 | }, |
152 | }, | 148 | }, |
153 | actions: { | 149 | actions: { |
@@ -229,10 +225,10 @@ export default function(mergeState = {}) { | @@ -229,10 +225,10 @@ export default function(mergeState = {}) { | ||
229 | // /ufo-gateway/?method=ufo.resource.getConfigTypeContent&code=bid_switch_h5 | 225 | // /ufo-gateway/?method=ufo.resource.getConfigTypeContent&code=bid_switch_h5 |
230 | // {"alg":"SALT_MD5","code":200,"data":"1","md5":"c13a1ace2c5883be18643551bd17ebcd","message":"操作成功"} | 226 | // {"alg":"SALT_MD5","code":200,"data":"1","md5":"c13a1ace2c5883be18643551bd17ebcd","message":"操作成功"} |
231 | // H5是否打开求购 1代表打开 | 227 | // H5是否打开求购 1代表打开 |
232 | - let isEnabled = !!state.sysConfig.enableQiugou; | 228 | + let isEnabled = !!state.context.enableQiugou; |
233 | 229 | ||
234 | - if (state.sysConfig.enableQiugou === null) { | ||
235 | - const resp = await this.$api.get('/api/sys/config', { | 230 | + if (state.context.enableQiugou === null) { |
231 | + const resp = await this.$api.post('/api/sys/config', { | ||
236 | code: 'bid_switch_h5', | 232 | code: 'bid_switch_h5', |
237 | }); | 233 | }); |
238 | 234 |
@@ -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 { |
@@ -58,14 +58,14 @@ module.exports = { | @@ -58,14 +58,14 @@ module.exports = { | ||
58 | '/api/ufo/mine/order/summary': { | 58 | '/api/ufo/mine/order/summary': { |
59 | ufo: true, | 59 | ufo: true, |
60 | auth: true, | 60 | auth: true, |
61 | - path: '/ufo-gateway/shopping', | 61 | + path: 'shopping', |
62 | api: 'ufo.order.summary', | 62 | api: 'ufo.order.summary', |
63 | params: {}, | 63 | params: {}, |
64 | }, | 64 | }, |
65 | '/api/ufo/mine/coupon': { | 65 | '/api/ufo/mine/coupon': { |
66 | ufo: true, | 66 | ufo: true, |
67 | auth: true, | 67 | auth: true, |
68 | - path: '/ufo-gateway/coupon', | 68 | + path: 'coupon', |
69 | api: 'ufo.coupons.cnt', | 69 | api: 'ufo.coupons.cnt', |
70 | params: {}, | 70 | params: {}, |
71 | }, | 71 | }, |
@@ -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