Showing
15 changed files
with
88 additions
and
109 deletions
@@ -134,7 +134,7 @@ export default { | @@ -134,7 +134,7 @@ export default { | ||
134 | 134 | ||
135 | }, | 135 | }, |
136 | 136 | ||
137 | - beforeRouteEnter (to, from, next) { | 137 | + beforeRouteEnter(to, from, next) { |
138 | 138 | ||
139 | next(vm => { | 139 | next(vm => { |
140 | // 通过 `vm` 访问组件实例 | 140 | // 通过 `vm` 访问组件实例 |
@@ -161,12 +161,12 @@ export default { | @@ -161,12 +161,12 @@ export default { | ||
161 | this.showToast(); | 161 | this.showToast(); |
162 | } | 162 | } |
163 | }, | 163 | }, |
164 | - isShowDialog(val) { | ||
165 | 164 | ||
166 | - if (val) { | ||
167 | - this.showDialog(); | ||
168 | - } | ||
169 | - }, | 165 | + // isShowDialog(val) { |
166 | + // if (val) { | ||
167 | + // this.showDialog(); | ||
168 | + // } | ||
169 | + // }, | ||
170 | 170 | ||
171 | addressInfo(val) { | 171 | addressInfo(val) { |
172 | 172 | ||
@@ -174,6 +174,10 @@ export default { | @@ -174,6 +174,10 @@ export default { | ||
174 | this.computePrice(); | 174 | this.computePrice(); |
175 | } | 175 | } |
176 | 176 | ||
177 | + }, | ||
178 | + | ||
179 | + inputPrice(val) { | ||
180 | + console.log(val); | ||
177 | } | 181 | } |
178 | }, | 182 | }, |
179 | 183 | ||
@@ -245,6 +249,7 @@ export default { | @@ -245,6 +249,7 @@ export default { | ||
245 | 249 | ||
246 | showDialog() { | 250 | showDialog() { |
247 | this.BUYER_ASK_SET_SHOWDIALOG(false); | 251 | this.BUYER_ASK_SET_SHOWDIALOG(false); |
252 | + let that = this; | ||
248 | 253 | ||
249 | if (this.preTip) { | 254 | if (this.preTip) { |
250 | this.$createDialog({ | 255 | this.$createDialog({ |
@@ -265,7 +270,7 @@ export default { | @@ -265,7 +270,7 @@ export default { | ||
265 | }, | 270 | }, |
266 | 271 | ||
267 | onConfirm: () => { | 272 | onConfirm: () => { |
268 | - this.publishProduct(); | 273 | + that.publishProduct(); |
269 | }, | 274 | }, |
270 | 275 | ||
271 | onCancel: () => { | 276 | onCancel: () => { |
@@ -274,13 +279,16 @@ export default { | @@ -274,13 +279,16 @@ export default { | ||
274 | 279 | ||
275 | }).show(); | 280 | }).show(); |
276 | } else { | 281 | } else { |
277 | - this.publishProduct(); | 282 | + that.publishProduct(); |
278 | } | 283 | } |
279 | 284 | ||
280 | }, | 285 | }, |
281 | 286 | ||
282 | submitClick() { | 287 | submitClick() { |
283 | - this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id}); | 288 | + this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id}) |
289 | + .then(() => { | ||
290 | + this.showDialog(); | ||
291 | + }); | ||
284 | }, | 292 | }, |
285 | 293 | ||
286 | publishProduct() { | 294 | publishProduct() { |
@@ -291,7 +299,7 @@ export default { | @@ -291,7 +299,7 @@ export default { | ||
291 | 299 | ||
292 | computePrice() { | 300 | computePrice() { |
293 | if (!this.inputPrice) { | 301 | if (!this.inputPrice) { |
294 | - console.log('inputPrice is null') | 302 | + console.log('inputPrice is null'); |
295 | return; | 303 | return; |
296 | } | 304 | } |
297 | this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' }); | 305 | this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' }); |
@@ -27,7 +27,8 @@ export default { | @@ -27,7 +27,8 @@ export default { | ||
27 | }, | 27 | }, |
28 | data() { | 28 | data() { |
29 | return { | 29 | return { |
30 | - desc: '有货买家协议' | 30 | + desc: '有货买家协议', |
31 | + url: 'https://activity.yoho.cn/feature/3189.html?share_id=5853&title=ufo-%E4%B9%B0%E5%AE%B6%E5%8D%8F%E8%AE%AE' | ||
31 | }; | 32 | }; |
32 | }, | 33 | }, |
33 | computed: { | 34 | computed: { |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <i class="address-icon"></i> | 3 | <i class="address-icon"></i> |
4 | <div> | 4 | <div> |
5 | <p class="consignee">{{ userAddress.consignee }}</p> | 5 | <p class="consignee">{{ userAddress.consignee }}</p> |
6 | - <p class="area">{{ userAddress.area }}</p> | 6 | + <p class="area">{{ userAddress.area }}{{ userAddress.address || "" }}</p> |
7 | <p class="mobile">{{ userAddress.mobile }}</p> | 7 | <p class="mobile">{{ userAddress.mobile }}</p> |
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
@@ -26,7 +26,9 @@ | @@ -26,7 +26,9 @@ | ||
26 | <p class="consignee"> | 26 | <p class="consignee"> |
27 | {{ `回寄地址: ${userAddress.consignee || ""}` }} | 27 | {{ `回寄地址: ${userAddress.consignee || ""}` }} |
28 | </p> | 28 | </p> |
29 | - <p class="area">{{ userAddress.area }}</p> | 29 | + <p class="area"> |
30 | + {{ userAddress.area }}{{ userAddress.address || "" }} | ||
31 | + </p> | ||
30 | <p class="mobile">{{ userAddress.mobile }}</p> | 32 | <p class="mobile">{{ userAddress.mobile }}</p> |
31 | </div> | 33 | </div> |
32 | </div> | 34 | </div> |
@@ -56,10 +56,10 @@ | @@ -56,10 +56,10 @@ | ||
56 | <span>{{ orderDetail.orderCode }}</span> | 56 | <span>{{ orderDetail.orderCode }}</span> |
57 | <i ref="copy" class="copy"></i> | 57 | <i ref="copy" class="copy"></i> |
58 | </p> | 58 | </p> |
59 | - <p v-if="orderDetail.paymentStr"> | 59 | + <!-- <p v-if="orderDetail.paymentStr"> |
60 | <span class="label">支付方式:</span> | 60 | <span class="label">支付方式:</span> |
61 | <span>{{ orderDetail.paymentStr }}</span> | 61 | <span>{{ orderDetail.paymentStr }}</span> |
62 | - </p> | 62 | + </p> --> |
63 | <p v-if="orderDetail.earnestMoneyStr"> | 63 | <p v-if="orderDetail.earnestMoneyStr"> |
64 | <span class="label">保证金:</span> | 64 | <span class="label">保证金:</span> |
65 | <span class="earnest-price">{{ orderDetail.earnestMoneyStr }}</span> | 65 | <span class="earnest-price">{{ orderDetail.earnestMoneyStr }}</span> |
@@ -69,16 +69,6 @@ | @@ -69,16 +69,6 @@ | ||
69 | </p> | 69 | </p> |
70 | </div> | 70 | </div> |
71 | </div> | 71 | </div> |
72 | - <!-- 操作 --> | ||
73 | - <!-- <detail-footer> | ||
74 | - <template #tip="{orderDetail, statusDetail}"> | ||
75 | - <div v-if="statusDetail.status === 0"> | ||
76 | - <p class="earnest-price">{{ orderDetail.earnestMoneyStr }}</p> | ||
77 | - <p>{{ statusDetail.statuStr }}</p> | ||
78 | - </div> | ||
79 | - </template> | ||
80 | - </detail-footer> --> | ||
81 | - | ||
82 | <div v-if="actionList.length > 0" class="footer-wrapper"> | 72 | <div v-if="actionList.length > 0" class="footer-wrapper"> |
83 | <div v-if="statusDetail.status === 0"> | 73 | <div v-if="statusDetail.status === 0"> |
84 | <p class="earnest-price">{{ orderDetail.earnestMoneyStr }}</p> | 74 | <p class="earnest-price">{{ orderDetail.earnestMoneyStr }}</p> |
@@ -11,10 +11,13 @@ | @@ -11,10 +11,13 @@ | ||
11 | </div> | 11 | </div> |
12 | <div class="item-info"> | 12 | <div class="item-info"> |
13 | <div> | 13 | <div> |
14 | - <div class="price-status"> | 14 | + <div v-if="$route.params.owner === 'buy'" class="price-status"> |
15 | <span class="price">¥{{ order.realPrice }}</span> | 15 | <span class="price">¥{{ order.realPrice }}</span> |
16 | <span class="delivery-fee-tip">(含运费)</span> | 16 | <span class="delivery-fee-tip">(含运费)</span> |
17 | </div> | 17 | </div> |
18 | + <div v-else class="price-status"> | ||
19 | + <span class="price">¥{{ goodsInfo.goodPrice }}</span> | ||
20 | + </div> | ||
18 | <p class="item-name"> | 21 | <p class="item-name"> |
19 | {{ goodsInfo.productName }} | 22 | {{ goodsInfo.productName }} |
20 | </p> | 23 | </p> |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <AddressInfo :data="address" class="order-item"></AddressInfo> | 8 | <AddressInfo :data="address" class="order-item"></AddressInfo> |
9 | </div> | 9 | </div> |
10 | <div class="footer"> | 10 | <div class="footer"> |
11 | - <OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc"></OrderAgree> | 11 | + <OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree> |
12 | <div class="btn-wrapper"> | 12 | <div class="btn-wrapper"> |
13 | <YohoButton :txt="txt" class="submit-btn" @click="onClick" :disable="!agree"></YohoButton> | 13 | <YohoButton :txt="txt" class="submit-btn" @click="onClick" :disable="!agree"></YohoButton> |
14 | </div> | 14 | </div> |
@@ -49,7 +49,8 @@ export default { | @@ -49,7 +49,8 @@ export default { | ||
49 | txt: '提交', | 49 | txt: '提交', |
50 | error: false, | 50 | error: false, |
51 | num: 1, | 51 | num: 1, |
52 | - agreeDesc: '有货卖家协议' | 52 | + agreeDesc: '有货卖家协议', |
53 | + url: 'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE' | ||
53 | }; | 54 | }; |
54 | }, | 55 | }, |
55 | mounted() { | 56 | mounted() { |
1 | <template> | 1 | <template> |
2 | <div class="layout"> | 2 | <div class="layout"> |
3 | - <LayoutHeader class="layout-header" :show-back="true" :title="title" ref="header"> | ||
4 | - <transition name="fade"> | ||
5 | - <img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/> | ||
6 | - </transition> | ||
7 | - </LayoutHeader> | 3 | + <LayoutHeader class="layout-header" :show-back="true" :title="'\u200E'"></LayoutHeader> |
8 | <div class="layout-context fixscroll"> | 4 | <div class="layout-context fixscroll"> |
9 | - <cube-scroll :data="imageList" | ||
10 | - :scroll-events="['scroll']" | ||
11 | - @scroll="handleScroll"> | ||
12 | - <div class="slide"> | ||
13 | - <cube-slide ref="slide" :data="imageList"> | ||
14 | - <cube-slide-item v-for="(item, index) in imageList" :key="index"> | ||
15 | - <a click="javascript:void 0" class="square-img-container"> | ||
16 | - <square-img :src="item.image_url" :width="300" :height="300" /> | ||
17 | - </a> | ||
18 | - </cube-slide-item> | ||
19 | - <template slot="dots" slot-scope="props"> | ||
20 | - <span class="dot" :class="{active: props.current === index}" v-for="(item, index) in props.dots">{{index + 1}}</span> | ||
21 | - </template> | ||
22 | - </cube-slide> | ||
23 | - <div class="qiugou" v-if="isQiugouEnabled" @click="qiugou"></div> | ||
24 | - </div> | 5 | + <cube-scroll :data="imageList"> |
6 | + <div class="slide"> | ||
7 | + <cube-slide ref="slide" :data="imageList"> | ||
8 | + <cube-slide-item v-for="(item, index) in imageList" :key="index"> | ||
9 | + <a click="javascript:void 0" class="square-img-container"> | ||
10 | + <square-img :src="item.image_url" :width="300" :height="300" /> | ||
11 | + </a> | ||
12 | + </cube-slide-item> | ||
13 | + <template slot="dots" slot-scope="props"> | ||
14 | + <span class="dot" :class="{active: props.current === index}" v-for="(item, index) in props.dots">{{index + 1}}</span> | ||
15 | + </template> | ||
16 | + </cube-slide> | ||
17 | + <div class="qiugou" v-if="isQiugouEnabled" @click="qiugou"></div> | ||
18 | + </div> | ||
25 | 19 | ||
26 | - <div class="info"> | ||
27 | - <div class="info-price"> | ||
28 | - <template v-if="productDetail.least_price >= 0"> ¥{{productDetail.least_price}}</template> | ||
29 | - <template v-else> </template> | 20 | + <div class="info"> |
21 | + <div class="info-price"> | ||
22 | + <template v-if="productDetail.least_price >= 0"> ¥{{productDetail.least_price}}</template> | ||
23 | + <template v-else> </template> | ||
24 | + </div> | ||
25 | + <div class="info-name">{{productDetail.product_name}}</div> | ||
30 | </div> | 26 | </div> |
31 | - <div class="info-name">{{productDetail.product_name}}</div> | ||
32 | - </div> | ||
33 | - <a class="banner" v-if="resource" :href="resource.url"> | ||
34 | - <img-size :src="sizeImg(resource.src)" :width="300" :height="60"/> | ||
35 | - </a> | ||
36 | - <div class="info"> | ||
37 | - <div class="info-list"> | ||
38 | - <div class="info-list-item" v-if="activity && activity.length !== 0" @click="showActivity"> | ||
39 | - <div class="info-list-name">促销</div> | ||
40 | - <div class="info-list-value info-promote"> | ||
41 | - <span>{{activity[0].promotionTypeStr}}</span> | ||
42 | - <i class="cubeic-arrow"></i> | 27 | + <a class="banner" v-if="resource" :href="resource.url"> |
28 | + <img-size :src="sizeImg(resource.src)" :width="300" :height="60"/> | ||
29 | + </a> | ||
30 | + <div class="info"> | ||
31 | + <div class="info-list"> | ||
32 | + <div class="info-list-item" v-if="activity && activity.length !== 0" @click="showActivity"> | ||
33 | + <div class="info-list-name">促销</div> | ||
34 | + <div class="info-list-value info-promote"> | ||
35 | + <span>{{activity[0].promotionTypeStr}}</span> | ||
36 | + <i class="cubeic-arrow"></i> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="info-list-item" v-for="(desc, index) in productDec" :key="index"> | ||
40 | + <div class="info-list-name">{{desc.text}}</div> | ||
41 | + <div class="info-list-value">{{desc.value}}</div> | ||
43 | </div> | 42 | </div> |
44 | </div> | 43 | </div> |
45 | - <div class="info-list-item" v-for="(desc, index) in productDec" :key="index"> | ||
46 | - <div class="info-list-name">{{desc.text}}</div> | ||
47 | - <div class="info-list-value">{{desc.value}}</div> | ||
48 | - </div> | 44 | + <top-list v-if="topList && topList.length !== 0" :list="topList" @itemClick="gotoProduct" @allClick="gotoBrand" /> |
45 | + <img class="ref-img" v-lazy="prdDetailTip"/> | ||
49 | </div> | 46 | </div> |
50 | - <top-list v-if="topList && topList.length !== 0" :list="topList" @itemClick="gotoProduct" @allClick="gotoBrand" /> | ||
51 | - <img class="ref-img" v-lazy="prdDetailTip"/> | ||
52 | - </div> | ||
53 | 47 | ||
54 | - <img class="ref-img" v-lazy="prdDetailImage" /> | 48 | + <img class="ref-img" v-lazy="prdDetailImage" /> |
55 | 49 | ||
56 | - <div class="recommend" v-if="recommend"><h2>相关推荐</h2> | ||
57 | - <product-list :list="recommend" /> | ||
58 | - </div> | 50 | + <div class="recommend" v-if="recommend"><h2>相关推荐</h2> |
51 | + <product-list :list="recommend" /> | ||
52 | + </div> | ||
59 | </cube-scroll> | 53 | </cube-scroll> |
60 | </div> | 54 | </div> |
61 | <div class="footer"> | 55 | <div class="footer"> |
@@ -139,7 +133,6 @@ export default { | @@ -139,7 +133,6 @@ export default { | ||
139 | return { | 133 | return { |
140 | prdDetailTip, | 134 | prdDetailTip, |
141 | prdDetailImage, | 135 | prdDetailImage, |
142 | - headThumbnailVisible: false, | ||
143 | 136 | ||
144 | showActivitySheet: false, | 137 | showActivitySheet: false, |
145 | 138 | ||
@@ -184,16 +177,7 @@ export default { | @@ -184,16 +177,7 @@ export default { | ||
184 | return get(this.productDetail, 'product_name', '商品详情'); | 177 | return get(this.productDetail, 'product_name', '商品详情'); |
185 | }, | 178 | }, |
186 | }, | 179 | }, |
187 | - watch: { | ||
188 | - title: { | ||
189 | - handler() { | ||
190 | - this.setTitle(); | ||
191 | - }, | ||
192 | - immediate: true, | ||
193 | - }, | ||
194 | - }, | ||
195 | mounted() { | 180 | mounted() { |
196 | - this.imageHideThreadhold = -window.innerWidth * 0.693; | ||
197 | if (this.isQiugouEnabled === null) { | 181 | if (this.isQiugouEnabled === null) { |
198 | this.$store.dispatch('getSysConfigQiugou'); | 182 | this.$store.dispatch('getSysConfigQiugou'); |
199 | } | 183 | } |
@@ -205,21 +189,8 @@ export default { | @@ -205,21 +189,8 @@ export default { | ||
205 | }, | 189 | }, |
206 | methods: { | 190 | methods: { |
207 | ...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']), | 191 | ...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']), |
208 | - setTitle() { | ||
209 | - if (this.productId === this.productDetail.product_id) { | ||
210 | - if (this.$refs.header && this.$refs.header.setTitle) { | ||
211 | - this.$refs.header.setTitle(this.title); | ||
212 | - } else if (document) { | ||
213 | - document.title = this.title; | ||
214 | - } | ||
215 | - } | ||
216 | - }, | ||
217 | refresh() { | 192 | refresh() { |
218 | this.$refs.slide.refresh(); | 193 | this.$refs.slide.refresh(); |
219 | - this.headThumbnailVisible = false; | ||
220 | - }, | ||
221 | - handleScroll(e) { | ||
222 | - this.headThumbnailVisible = e.y < this.imageHideThreadhold; | ||
223 | }, | 194 | }, |
224 | sizeImg(src, width = 360, height = 72) { | 195 | sizeImg(src, width = 360, height = 72) { |
225 | if (src) { | 196 | if (src) { |
@@ -579,10 +550,6 @@ export default { | @@ -579,10 +550,6 @@ export default { | ||
579 | } | 550 | } |
580 | } | 551 | } |
581 | 552 | ||
582 | - .title-thumbnail { | ||
583 | - height: 100%; | ||
584 | - } | ||
585 | - | ||
586 | .footer { | 553 | .footer { |
587 | display: flex; | 554 | display: flex; |
588 | text-align: center; | 555 | text-align: center; |
@@ -117,7 +117,8 @@ export default function() { | @@ -117,7 +117,8 @@ export default function() { | ||
117 | name: 'buy', | 117 | name: 'buy', |
118 | title: '我的求购', | 118 | title: '我的求购', |
119 | num: state.askBuyNum, | 119 | num: state.askBuyNum, |
120 | - page: '', | 120 | + page: 'OrderList', |
121 | + params: { owner: ownType.BUY, status: 7 }, | ||
121 | }, | 122 | }, |
122 | collect: { | 123 | collect: { |
123 | name: 'collect', | 124 | name: 'collect', |
@@ -366,20 +366,24 @@ export default function() { | @@ -366,20 +366,24 @@ export default function() { | ||
366 | 366 | ||
367 | buyerPrePublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = ''} = {}) { | 367 | buyerPrePublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = ''} = {}) { |
368 | commit(BUYER_ASK_PREPUBLISH_REQUEST); | 368 | commit(BUYER_ASK_PREPUBLISH_REQUEST); |
369 | - this.$api.get('/api/order/buyeraskprepublish', { | 369 | + return this.$api.get('/api/order/buyeraskprepublish', { |
370 | price, | 370 | price, |
371 | storage_id, | 371 | storage_id, |
372 | uid, | 372 | uid, |
373 | address_id, | 373 | address_id, |
374 | }).then(result => { | 374 | }).then(result => { |
375 | if (result.code === 200) { | 375 | if (result.code === 200) { |
376 | - commit(BUYER_ASK_PREPUBLISH_SUCCESS, get(result, ['data', 'dialog'], null)); | 376 | + let payload = get(result, ['data', 'dialog'], null) |
377 | + commit(BUYER_ASK_PREPUBLISH_SUCCESS, payload); | ||
378 | + return payload; | ||
377 | } else { | 379 | } else { |
378 | commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message); | 380 | commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message); |
381 | + return null; | ||
379 | } | 382 | } |
380 | }, error => { | 383 | }, error => { |
381 | console.log(error); | 384 | console.log(error); |
382 | commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP); | 385 | commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP); |
386 | + return null; | ||
383 | }); | 387 | }); |
384 | }, | 388 | }, |
385 | 389 |
1 | { | 1 | { |
2 | "name": "xianyu-ufo-app-web", | 2 | "name": "xianyu-ufo-app-web", |
3 | - "version": "0.0.2-beta-18", | 3 | + "version": "0.0.2-beta-19", |
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