Showing
16 changed files
with
409 additions
and
137 deletions
1 | +<template><!--求购用调价对话框--> | ||
2 | + <div class="dialog-wrapper" :class="[visible ? 'show' : '']"> | ||
3 | + <div class="change-bid-price-wrapper"> | ||
4 | + <div class="change-bid-price-container"> | ||
5 | + <p class="price-item"> | ||
6 | + <span>我的求购价:</span> | ||
7 | + <span>¥{{ goodsInfo.goodPrice }}</span> | ||
8 | + </p> | ||
9 | + <p class="price-item"> | ||
10 | + <span>当前最高求购价:</span> | ||
11 | + <span>¥{{ goodsInfo.bidHighestPrice }}</span> | ||
12 | + </p> | ||
13 | + <p v-if="goodsInfo.leastPrice" class="price-item"> | ||
14 | + <span>最低现货价:</span> | ||
15 | + <span>¥{{ goodsInfo.leastPrice }}</span> | ||
16 | + </p> | ||
17 | + <InputUfo | ||
18 | + type="number" | ||
19 | + placeholder="定价需以9结尾 例如1999" | ||
20 | + :maxlength="8" | ||
21 | + :class="[errorTip ? 'ipt-number show-error' : 'ipt-number', 'ufo-font']" | ||
22 | + v-model="chgPrice" | ||
23 | + > | ||
24 | + <span class="prepend" slot="prepend">¥</span> | ||
25 | + </InputUfo> | ||
26 | + <p class="error-tip">{{ errorTip }}</p> | ||
27 | + <p | ||
28 | + :class=" | ||
29 | + i === computePriceList.length - 1 | ||
30 | + ? 'promotion-list-item last' | ||
31 | + : 'promotion-list-item' | ||
32 | + " | ||
33 | + v-for="(priceInfo, i) in computePriceList" | ||
34 | + :key="i" | ||
35 | + > | ||
36 | + <span>{{ priceInfo.promotion }}:</span> | ||
37 | + <span>{{ priceInfo.promotionAmount }}</span> | ||
38 | + </p> | ||
39 | + <p class="tip">Tip: 调整求购价成功后,当前的求购将被关闭</p> | ||
40 | + </div> | ||
41 | + | ||
42 | + <div class="buttons-container"> | ||
43 | + <button class="btn-cancel" @click="closeAction">取消</button> | ||
44 | + <button class="btn-confirm" @click="confirmAction">调整求购价</button> | ||
45 | + </div> | ||
46 | + </div> | ||
47 | + </div> | ||
48 | + | ||
49 | +</template> | ||
50 | + | ||
51 | +<script> | ||
52 | +import { createNamespacedHelpers } from 'vuex'; | ||
53 | +import InputUfo from './input-ufo'; | ||
54 | +import { debounce } from 'lodash'; | ||
55 | + | ||
56 | +const { mapActions } = createNamespacedHelpers('order/orderList'); | ||
57 | + | ||
58 | +export default { | ||
59 | + name: 'change-bid-price-dialog', | ||
60 | + components: { InputUfo }, | ||
61 | + props: { | ||
62 | + computePriceInfo: { | ||
63 | + type: Object, | ||
64 | + default: () => ({}) | ||
65 | + }, | ||
66 | + goodsInfo: { | ||
67 | + type: Object, | ||
68 | + default: () => ({}) | ||
69 | + }, | ||
70 | + orderCode: { | ||
71 | + type: Number, | ||
72 | + default: 0 | ||
73 | + } | ||
74 | + }, | ||
75 | + data() { | ||
76 | + return { | ||
77 | + visible: false, | ||
78 | + chgPrice: '', | ||
79 | + errorTip: '', | ||
80 | + computePrice: null, | ||
81 | + calced: false | ||
82 | + }; | ||
83 | + }, | ||
84 | + | ||
85 | + computed: { | ||
86 | + computePriceList() { | ||
87 | + const priceInfo = this.computePrice || this.computePriceInfo; | ||
88 | + | ||
89 | + return priceInfo.promotionFormulaList.filter( | ||
90 | + ({ promotion }) => promotion === "运费" || promotion === "实付金额" | ||
91 | + ); | ||
92 | + } | ||
93 | + }, | ||
94 | + mounted() { | ||
95 | + // debounce防抖动,输入数字后延迟500毫秒提交 | ||
96 | + this.inputChange = debounce(this.onChange.bind(this), 500); | ||
97 | + }, | ||
98 | + methods: { | ||
99 | + ...mapActions(["computeChangePrice"]), | ||
100 | + async onChange(price) { // 预先算费 | ||
101 | + if (this.checkPrice(price)) { | ||
102 | + const res = await this.computeChangePrice({ | ||
103 | + price, | ||
104 | + orderCode: this.orderCode | ||
105 | + }); | ||
106 | + if (typeof res === "string") { | ||
107 | + this.errorTip = res; | ||
108 | + this.calced = false; | ||
109 | + } else { | ||
110 | + this.computePrice = res; | ||
111 | + this.calced = true; | ||
112 | + } | ||
113 | + } | ||
114 | + }, | ||
115 | + show() { | ||
116 | + this.clearData(); | ||
117 | + this.visible = true; | ||
118 | + }, | ||
119 | + | ||
120 | + hide() { | ||
121 | + this.visible = false; | ||
122 | + }, | ||
123 | + checkPrice(price) { | ||
124 | + let valid = false; | ||
125 | + | ||
126 | + if (!price) { | ||
127 | + this.errorTip = '没有价格'; | ||
128 | + return false; | ||
129 | + } else if (!/^\d+$/.test(price)) { | ||
130 | + this.errorTip = '价格只能为正整数'; | ||
131 | + } else if (!/9$/.test(price)) { | ||
132 | + this.errorTip = '出售价格必须以9结尾'; | ||
133 | + } else if (+price === +this.goodsInfo.goodPrice) { | ||
134 | + this.errorTip = '前后价格没有变化'; | ||
135 | + } else { | ||
136 | + this.errorTip = ''; | ||
137 | + valid = true; | ||
138 | + } | ||
139 | + return valid; | ||
140 | + }, | ||
141 | + closeAction() { | ||
142 | + this.hide(); | ||
143 | + this.clearData(); | ||
144 | + this.$emit('closeAction'); | ||
145 | + }, | ||
146 | + confirmAction() { | ||
147 | + if (this.calced) { | ||
148 | + let price = this.chgPrice; | ||
149 | + | ||
150 | + this.hide(); | ||
151 | + this.clearData(); | ||
152 | + this.$emit('confirmAction', price); | ||
153 | + } | ||
154 | + | ||
155 | + }, | ||
156 | + clearData() { | ||
157 | + this.chgPrice = ''; | ||
158 | + this.errorTip = '', | ||
159 | + this.computePrice = null; | ||
160 | + this.calced = false; | ||
161 | + } | ||
162 | + | ||
163 | + }, | ||
164 | + watch: { | ||
165 | + chgPrice(newVal) { | ||
166 | + this.calced = false; | ||
167 | + this.inputChange(newVal); | ||
168 | + } | ||
169 | + } | ||
170 | +}; | ||
171 | +</script> | ||
172 | + | ||
173 | +<style lang="scss" scoped> | ||
174 | + .dialog-wrapper { | ||
175 | + position: fixed; | ||
176 | + width: 100%; | ||
177 | + height: 100%; | ||
178 | + left: 0; | ||
179 | + top: 0; | ||
180 | + background-color: rgba(0, 0, 0, 0.5); | ||
181 | + z-index: 99; | ||
182 | + display: none; | ||
183 | + align-items: center; | ||
184 | + justify-content: center; | ||
185 | + | ||
186 | + &.show { | ||
187 | + display: flex; | ||
188 | + } | ||
189 | + } | ||
190 | + | ||
191 | + .change-bid-price-wrapper { | ||
192 | + position: absolute; | ||
193 | + width: 600px; | ||
194 | + background-color: #fff; | ||
195 | + } | ||
196 | + | ||
197 | + .change-bid-price-container { | ||
198 | + background-color: #fff; | ||
199 | + font-size: 12px; | ||
200 | + color: #000; | ||
201 | + padding: 60px 38px 0 38px; | ||
202 | + letter-spacing: 0; | ||
203 | + | ||
204 | + .price-item { | ||
205 | + font-size: 24px; | ||
206 | + line-height: 34px; | ||
207 | + margin-bottom: 10px; | ||
208 | + } | ||
209 | + | ||
210 | + .ipt-number { | ||
211 | + margin: 30px 0; | ||
212 | + | ||
213 | + /deep/ .prepend { | ||
214 | + width: 40px; | ||
215 | + margin-left: 20px; | ||
216 | + text-align: left; | ||
217 | + } | ||
218 | + | ||
219 | + &.show-error { | ||
220 | + margin-bottom: 0; | ||
221 | + } | ||
222 | + } | ||
223 | + | ||
224 | + .error-tip { | ||
225 | + color: #d0021b; | ||
226 | + margin-bottom: 10px; | ||
227 | + } | ||
228 | + | ||
229 | + .promotion-list-item { | ||
230 | + display: flex; | ||
231 | + justify-content: space-between; | ||
232 | + align-items: center; | ||
233 | + color: #999; | ||
234 | + margin-bottom: 10px; | ||
235 | + | ||
236 | + &.last { | ||
237 | + color: #000; | ||
238 | + } | ||
239 | + } | ||
240 | + | ||
241 | + .tip { | ||
242 | + color: #999; | ||
243 | + margin: 40px auto; | ||
244 | + } | ||
245 | + } | ||
246 | + | ||
247 | + .buttons-container { | ||
248 | + width: 100%; | ||
249 | + height: 100px; | ||
250 | + display: flex; | ||
251 | + border-top: 1px solid #f0f0f0; | ||
252 | + | ||
253 | + button { | ||
254 | + width: 100%; | ||
255 | + text-align: center; | ||
256 | + line-height: 100px; | ||
257 | + font-size: 32px; | ||
258 | + } | ||
259 | + } | ||
260 | +</style> |
1 | +import ChangeBidPriceDialog from './change-bid-price-dialog'; | ||
2 | +import createApi from 'utils/create-api'; | ||
3 | + | ||
4 | +ChangeBidPriceDialog.install = function(Vue) { | ||
5 | + Vue.component(ChangeBidPriceDialog.name, ChangeBidPriceDialog); | ||
6 | + createApi( | ||
7 | + Vue, | ||
8 | + ChangeBidPriceDialog, | ||
9 | + ['closeAction', 'confirmAction'], | ||
10 | + true | ||
11 | + ); | ||
12 | +}; | ||
13 | + | ||
14 | +export default ChangeBidPriceDialog; |
1 | +<template> | ||
2 | + <CubeInput v-bind="$attrs" v-bind:value="value" v-on="inputListeners" :maxlength="8" class="input-number"> | ||
3 | + <span slot="prepend"> | ||
4 | + <slot name="prepend"></slot> | ||
5 | + </span> | ||
6 | + <span slot="append"> | ||
7 | + <slot name="append"></slot> | ||
8 | + </span> | ||
9 | + </CubeInput> | ||
10 | +</template> | ||
11 | + | ||
12 | +<script> | ||
13 | +import {Input} from 'cube-ui'; | ||
14 | + | ||
15 | +export default { | ||
16 | + name: 'InputUfo', | ||
17 | + props: ['value'], | ||
18 | + computed: { | ||
19 | + inputListeners() { | ||
20 | + return Object.assign({}, | ||
21 | + this.$listeners, | ||
22 | + { | ||
23 | + input: (value) => { | ||
24 | + this.$emit('input', value); | ||
25 | + }, | ||
26 | + blur: () => { | ||
27 | + this.$emit('blur', this.value); | ||
28 | + } | ||
29 | + } | ||
30 | + ); | ||
31 | + } | ||
32 | + }, | ||
33 | + methods: { | ||
34 | + }, | ||
35 | + components: {CubeInput: Input} | ||
36 | +}; | ||
37 | +</script> | ||
38 | + | ||
39 | +<style lang="scss" scoped> | ||
40 | + .input-number { | ||
41 | + margin-bottom: 15px; | ||
42 | + background-color: #f5f5f5; | ||
43 | + border-radius: 10px; | ||
44 | + font-size: 36px; | ||
45 | + | ||
46 | + &:after { | ||
47 | + border-radius: 20px; | ||
48 | + border-color: #f5f5f5; | ||
49 | + } | ||
50 | + | ||
51 | + /deep/ .cube-input-field { | ||
52 | + color: #000; | ||
53 | + } | ||
54 | + } | ||
55 | +</style> | ||
56 | + |
@@ -38,10 +38,14 @@ export default { | @@ -38,10 +38,14 @@ export default { | ||
38 | if (!setTitle) { | 38 | if (!setTitle) { |
39 | return this.title; | 39 | return this.title; |
40 | } | 40 | } |
41 | - if (this.title) { | ||
42 | - setTitle(this.title); | ||
43 | - this.$xianyu.setXianyuTitle({ title: this.title }); | ||
44 | - } | 41 | + |
42 | + setTimeout(() => { | ||
43 | + if (this.title) { | ||
44 | + setTitle(this.title); | ||
45 | + this.$xianyu.setXianyuTitle({ title: this.title }); | ||
46 | + } | ||
47 | + }, 100); | ||
48 | + | ||
45 | this.setTitle = setTitle; | 49 | this.setTitle = setTitle; |
46 | }, | 50 | }, |
47 | computed: { | 51 | computed: { |
@@ -25,6 +25,7 @@ import xianyu from 'common/xianyu'; | @@ -25,6 +25,7 @@ import xianyu from 'common/xianyu'; | ||
25 | import OrderPayType from 'components/order-pay-type'; | 25 | import OrderPayType from 'components/order-pay-type'; |
26 | import OrderCouponList from 'components/order-coupon-list'; | 26 | import OrderCouponList from 'components/order-coupon-list'; |
27 | import OrderPromotionList from 'components/order-promotion-list'; | 27 | import OrderPromotionList from 'components/order-promotion-list'; |
28 | +import ChangeBidPriceDialog from 'components/change-bid-price-dialog'; | ||
28 | import Bind from 'components/bind'; | 29 | import Bind from 'components/bind'; |
29 | import ConfirmDialog from 'components/confirm-dialog'; | 30 | import ConfirmDialog from 'components/confirm-dialog'; |
30 | import 'video.js/dist/video-js.css'; | 31 | import 'video.js/dist/video-js.css'; |
@@ -71,6 +72,7 @@ Vue.use(OrderCouponList); | @@ -71,6 +72,7 @@ Vue.use(OrderCouponList); | ||
71 | Vue.use(OrderPromotionList); | 72 | Vue.use(OrderPromotionList); |
72 | Vue.use(Bind); | 73 | Vue.use(Bind); |
73 | Vue.use(ConfirmDialog); | 74 | Vue.use(ConfirmDialog); |
75 | +Vue.use(ChangeBidPriceDialog); | ||
74 | 76 | ||
75 | initClient(store); | 77 | initClient(store); |
76 | 78 |
@@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
68 | checked="model.is_default" | 68 | checked="model.is_default" |
69 | v-model="model.is_default" | 69 | v-model="model.is_default" |
70 | ></Radio> | 70 | ></Radio> |
71 | - <div v-if="isUpdate && !isSeller" class="del-address" @click="delAddress">删除地址</div> | 71 | + <div v-if="isUpdate && !isBuyerOrSeller" class="del-address" @click="delAddress">删除地址</div> |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | <div :class="submitClass" @touchend="onSubmit">确 认</div> | 74 | <div :class="submitClass" @touchend="onSubmit">确 认</div> |
@@ -116,7 +116,7 @@ export default { | @@ -116,7 +116,7 @@ export default { | ||
116 | }, | 116 | }, |
117 | isShowProvince: false, | 117 | isShowProvince: false, |
118 | isUpdate: false, | 118 | isUpdate: false, |
119 | - isSeller: false, | 119 | + isBuyerOrSeller: false, |
120 | updateMobileNum: '', | 120 | updateMobileNum: '', |
121 | isMobileNumEdit: false, | 121 | isMobileNumEdit: false, |
122 | title: '', | 122 | title: '', |
@@ -319,7 +319,7 @@ export default { | @@ -319,7 +319,7 @@ export default { | ||
319 | let addressInfo = this.updateAddressInfo; | 319 | let addressInfo = this.updateAddressInfo; |
320 | 320 | ||
321 | //判断是否是出售订单,出售订单不显示“删除地址” | 321 | //判断是否是出售订单,出售订单不显示“删除地址” |
322 | - this.isSeller = this.$route.query.fromPage === 'OrderSellConfirm' ? true : false; | 322 | + this.isBuyerOrSeller = this.$route.query.fromPage === 'OrderSellConfirm' || this.$route.query.fromPage === 'OrderBuyConfirm' ? true : false; |
323 | 323 | ||
324 | this.isUpdate = addressInfo.isUpdate; | 324 | this.isUpdate = addressInfo.isUpdate; |
325 | this.orderCode = addressInfo.orderCode; | 325 | this.orderCode = addressInfo.orderCode; |
@@ -56,9 +56,10 @@ export default { | @@ -56,9 +56,10 @@ export default { | ||
56 | beforeRouteEnter (to, from, next) { | 56 | beforeRouteEnter (to, from, next) { |
57 | // 从我的绑定支付宝后进入交易明细 | 57 | // 从我的绑定支付宝后进入交易明细 |
58 | next(vm => { | 58 | next(vm => { |
59 | - if(from.name === 'bindAccount') { | 59 | + let isbind = vm.$store.state.home.bindAccount.validStatus === 1 |
60 | + if(isbind && from.name === 'bindAccount') { | ||
60 | vm.$router.push({name: 'tradeIncome'}) | 61 | vm.$router.push({name: 'tradeIncome'}) |
61 | - } | 62 | + } |
62 | }) | 63 | }) |
63 | }, | 64 | }, |
64 | methods: { | 65 | methods: { |
1 | -<template> | 1 | +<template functional> |
2 | <div class="income-detail-header"> | 2 | <div class="income-detail-header"> |
3 | <p class="total-income">收入明细</p> | 3 | <p class="total-income">收入明细</p> |
4 | <slot><div class="no-data">暂无收入明细</div></slot> | 4 | <slot><div class="no-data">暂无收入明细</div></slot> |
5 | </div> | 5 | </div> |
6 | </template> | 6 | </template> |
7 | 7 | ||
8 | -<script> | ||
9 | -export default { | ||
10 | - name: 'income-detail', | ||
11 | - props: { | ||
12 | - | ||
13 | - }, | ||
14 | - | ||
15 | - methods: { | ||
16 | - | ||
17 | - }, | ||
18 | -}; | ||
19 | -</script> | ||
20 | - | ||
21 | <style lang="scss" scoped> | 8 | <style lang="scss" scoped> |
22 | .income-detail-header { | 9 | .income-detail-header { |
23 | margin-top: 15px; | 10 | margin-top: 15px; |
1 | -<template> | 1 | +<template functional> |
2 | <div class="assets-record-container"> | 2 | <div class="assets-record-container"> |
3 | <div class='assets-record-info-detail-view'> | 3 | <div class='assets-record-info-detail-view'> |
4 | <div class='assets-record-left-view'> | 4 | <div class='assets-record-left-view'> |
5 | <div class='assets-record-middle-view'> | 5 | <div class='assets-record-middle-view'> |
6 | - <span class='assets-record-code-txt'>{{data.productName}}<span class="size">(尺码:{{data.sizeName}})</span></span> | ||
7 | - <span class='assets-record-time-txt'>{{data.time}}</span> | 6 | + <span class='assets-record-code-txt'>{{props.data.productName}}<span class="size">(尺码:{{props.data.sizeName}})</span></span> |
7 | + <span class='assets-record-time-txt'>{{props.data.time}}</span> | ||
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
10 | <div class='assets-record-right-view'> | 10 | <div class='assets-record-right-view'> |
11 | - <span class='assets-record-income-txt'>{{data.price}}</span> | ||
12 | - <span class='assets-record-income-tip-txt'>{{data.normalFlag ? '' : '打款失败'}}</span> | ||
13 | - <span class='assets-record-income-desc'>{{data.tradeTypeDesc}}</span> | 11 | + <span class='assets-record-income-txt'>{{props.data.price}}</span> |
12 | + <span class='assets-record-income-tip-txt'>{{props.data.normalFlag ? '' : '打款失败'}}</span> | ||
13 | + <span class='assets-record-income-desc'>{{props.data.tradeTypeDesc}}</span> | ||
14 | </div> | 14 | </div> |
15 | </div> | 15 | </div> |
16 | </div> | 16 | </div> |
17 | </template> | 17 | </template> |
18 | 18 | ||
19 | -<script> | ||
20 | - | ||
21 | -export default { | ||
22 | - name: 'income-item', | ||
23 | - props: { | ||
24 | - data: { | ||
25 | - type: Object, | ||
26 | - default: {} | ||
27 | - } | ||
28 | - }, | ||
29 | - data() { | ||
30 | - return { | ||
31 | - | ||
32 | - }; | ||
33 | - }, | ||
34 | -}; | ||
35 | -</script> | ||
36 | - | ||
37 | <style lang="scss" scoped> | 19 | <style lang="scss" scoped> |
38 | .assets-record-container { | 20 | .assets-record-container { |
39 | display: flex; | 21 | display: flex; |
@@ -132,7 +132,7 @@ export default { | @@ -132,7 +132,7 @@ export default { | ||
132 | 132 | ||
133 | <style lang="scss" scoped> | 133 | <style lang="scss" scoped> |
134 | .change-bid-price-wrapper { | 134 | .change-bid-price-wrapper { |
135 | - font-size: 12px; | 135 | + font-size: 12*2px; |
136 | color: #000; | 136 | color: #000; |
137 | padding: 0 38px; | 137 | padding: 0 38px; |
138 | letter-spacing: 0; | 138 | letter-spacing: 0; |
@@ -165,4 +165,4 @@ export default { | @@ -165,4 +165,4 @@ export default { | ||
165 | margin-top: 40px; | 165 | margin-top: 40px; |
166 | } | 166 | } |
167 | } | 167 | } |
168 | -</style> | ||
168 | +</style> |
@@ -190,67 +190,39 @@ export default { | @@ -190,67 +190,39 @@ export default { | ||
190 | }).show(); | 190 | }).show(); |
191 | return; | 191 | return; |
192 | } | 192 | } |
193 | + let that = this; | ||
193 | 194 | ||
194 | - this.$createDialog( | ||
195 | - { | ||
196 | - type: 'prompt', | ||
197 | - confirmBtn: { text: '调整求购价' }, | ||
198 | - cancelBtn: { active: true }, | ||
199 | - onConfirm: async () => { | ||
200 | - if (!this.changePrice) { | ||
201 | - return; | ||
202 | - } | ||
203 | - const { isOk, errMsg = '', bidData} = await this.confirmChangePrice({ | ||
204 | - price: this.changePrice, | ||
205 | - orderCode, | ||
206 | - }); | 195 | + this.$createChangeBidPriceDialog({ |
196 | + computePriceInfo, | ||
197 | + goodsInfo, | ||
198 | + orderCode, | ||
199 | + onCloseAction() { | ||
200 | + }, | ||
201 | + onConfirmAction: async(price) => { | ||
202 | + const { isOk, errMsg = '' } = await that.confirmChangePrice({ | ||
203 | + price: price, | ||
204 | + orderCode, | ||
205 | + }); | ||
207 | 206 | ||
208 | - if (isOk) { | ||
209 | - // 重新支付保证金 | ||
210 | - let forwardType = isDetail ? 'buyOrderDetail' : 'OrderList' | ||
211 | - console.log('---------->', forwardType) | ||
212 | - this.$createOrderPayType({ | ||
213 | - orderCode: bidData.orderCode, | ||
214 | - price: parseFloat(bidData.depositAmount), | ||
215 | - desc: '支付定金', | ||
216 | - extra: JSON.stringify({ | ||
217 | - forward: { | ||
218 | - name: forwardType, | ||
219 | - params: this.$route.params, | ||
220 | - }, | ||
221 | - }), | ||
222 | - }).show(); | ||
223 | 207 | ||
224 | - // if (isDetail) { | ||
225 | - // this.fetchOrderDetail(this.$route.params); | ||
226 | - // } else { | ||
227 | - // this.resetData(); | ||
228 | - // this.fetchData(this.$route.params); | ||
229 | - // } | 208 | + if (isOk) { |
209 | + if (isDetail) { | ||
210 | + that.$router.back(); | ||
211 | + // that.fetchOrderDetail(this.$route.params); | ||
230 | } else { | 212 | } else { |
231 | - if (errMsg) { | ||
232 | - this.$createToast({ | ||
233 | - type: 'alert', | ||
234 | - txt: errMsg, | ||
235 | - }); | ||
236 | - } | 213 | + that.resetData(); |
214 | + that.fetchData(this.$route.params); | ||
237 | } | 215 | } |
238 | - }, | ||
239 | - }, | ||
240 | - createElement => { | ||
241 | - return [ | ||
242 | - createElement(DialogChangeBidPrice, { | ||
243 | - props: { | ||
244 | - computePriceInfo, | ||
245 | - goodsInfo, | ||
246 | - orderCode, | ||
247 | - onChangePrice: v => (this.changePrice = v), | ||
248 | - }, | ||
249 | - slot: 'content', | ||
250 | - }), | ||
251 | - ]; | ||
252 | - }, | ||
253 | - ).show(); | 216 | + } else { |
217 | + if (errMsg) { | ||
218 | + that.$createToast({ | ||
219 | + type: 'alert', | ||
220 | + txt: errMsg, | ||
221 | + }); | ||
222 | + } | ||
223 | + } | ||
224 | + } | ||
225 | + }).show(); | ||
254 | break; | 226 | break; |
255 | } | 227 | } |
256 | default: | 228 | default: |
@@ -7,7 +7,6 @@ | @@ -7,7 +7,6 @@ | ||
7 | :options="options" | 7 | :options="options" |
8 | :data="orderList" | 8 | :data="orderList" |
9 | class="order-list-scroll-wrap" | 9 | class="order-list-scroll-wrap" |
10 | - v-show="!isShowEmpty" | ||
11 | > | 10 | > |
12 | <ul class="list-wrapper"> | 11 | <ul class="list-wrapper"> |
13 | <li v-for="(order, i) in orderList" :key="i"> | 12 | <li v-for="(order, i) in orderList" :key="i"> |
@@ -23,12 +22,13 @@ | @@ -23,12 +22,13 @@ | ||
23 | </div> | 22 | </div> |
24 | </li> | 23 | </li> |
25 | </ul> | 24 | </ul> |
25 | + | ||
26 | + <empty-list | ||
27 | + class="empty-wrapper" | ||
28 | + tip="这里什么都没有..." | ||
29 | + v-show="isShowEmpty" | ||
30 | + /> | ||
26 | </scroll> | 31 | </scroll> |
27 | - <empty-list | ||
28 | - class="empty-wrapper" | ||
29 | - tip="这里什么都没有..." | ||
30 | - v-show="isShowEmpty" | ||
31 | - /> | ||
32 | </div> | 32 | </div> |
33 | </layout-app> | 33 | </layout-app> |
34 | </template> | 34 | </template> |
@@ -71,7 +71,12 @@ export default { | @@ -71,7 +71,12 @@ export default { | ||
71 | options: function() { | 71 | options: function() { |
72 | return { | 72 | return { |
73 | pullUpLoad: this.pullUpLoad, | 73 | pullUpLoad: this.pullUpLoad, |
74 | - pullDownRefresh: true | 74 | + pullDownRefresh: this.isShowEmpty |
75 | + ? false | ||
76 | + : { | ||
77 | + txt: "更新成功" | ||
78 | + }, | ||
79 | + bounce: this.isShowEmpty ? false : true | ||
75 | }; | 80 | }; |
76 | }, | 81 | }, |
77 | isFetchEntryOrder() { | 82 | isFetchEntryOrder() { |
@@ -106,16 +111,13 @@ export default { | @@ -106,16 +111,13 @@ export default { | ||
106 | </script> | 111 | </script> |
107 | <style lang="scss" scoped> | 112 | <style lang="scss" scoped> |
108 | .content-wrapper { | 113 | .content-wrapper { |
109 | - height: calc(100vh - 100px); | 114 | + height: 100%; |
110 | overflow-x: hidden; | 115 | overflow-x: hidden; |
111 | overflow-y: auto; | 116 | overflow-y: auto; |
112 | -webkit-box-orient: vertical; | 117 | -webkit-box-orient: vertical; |
113 | 118 | ||
114 | .empty-wrapper { | 119 | .empty-wrapper { |
115 | - margin: auto 0; | ||
116 | - position: absolute; | ||
117 | - top: 0; | ||
118 | - bottom: 0; | 120 | + margin: 20vh 0; |
119 | } | 121 | } |
120 | 122 | ||
121 | .footer-wrapper { | 123 | .footer-wrapper { |
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
8 | :options="options" | 8 | :options="options" |
9 | :data="orderList" | 9 | :data="orderList" |
10 | class="order-list-scroll-wrap" | 10 | class="order-list-scroll-wrap" |
11 | - v-show="!isShowEmpty" | ||
12 | > | 11 | > |
13 | <ul class="list-wrapper"> | 12 | <ul class="list-wrapper"> |
14 | <li v-for="order in orderList" :key="order.orderCode"> | 13 | <li v-for="order in orderList" :key="order.orderCode"> |
@@ -39,14 +38,14 @@ | @@ -39,14 +38,14 @@ | ||
39 | </div> | 38 | </div> |
40 | </li> | 39 | </li> |
41 | </ul> | 40 | </ul> |
42 | - </scroll> | ||
43 | 41 | ||
44 | - <empty-list | ||
45 | - @touch.prevent | ||
46 | - class="empty-wrapper" | ||
47 | - tip="这里什么都没有..." | ||
48 | - v-show="isShowEmpty" | ||
49 | - /> | 42 | + <empty-list |
43 | + @touch.prevent | ||
44 | + class="empty-wrapper" | ||
45 | + tip="这里什么都没有..." | ||
46 | + v-show="isShowEmpty" | ||
47 | + /> | ||
48 | + </scroll> | ||
50 | </div> | 49 | </div> |
51 | </layout-app> | 50 | </layout-app> |
52 | </template> | 51 | </template> |
@@ -99,6 +98,7 @@ export default { | @@ -99,6 +98,7 @@ export default { | ||
99 | options: function() { | 98 | options: function() { |
100 | return { | 99 | return { |
101 | pullUpLoad: this.pullUpLoad, | 100 | pullUpLoad: this.pullUpLoad, |
101 | + bounce: this.isShowEmpty ? false : true, | ||
102 | pullDownRefresh: this.isShowEmpty | 102 | pullDownRefresh: this.isShowEmpty |
103 | ? false | 103 | ? false |
104 | : { | 104 | : { |
@@ -154,10 +154,7 @@ export default { | @@ -154,10 +154,7 @@ export default { | ||
154 | } | 154 | } |
155 | 155 | ||
156 | .empty-wrapper { | 156 | .empty-wrapper { |
157 | - margin: auto 0; | ||
158 | - position: absolute; | ||
159 | - top: 0; | ||
160 | - bottom: 0; | 157 | + margin: 20vh 0; |
161 | } | 158 | } |
162 | 159 | ||
163 | .order-list-scroll-wrap { | 160 | .order-list-scroll-wrap { |
@@ -286,13 +286,7 @@ export default { | @@ -286,13 +286,7 @@ export default { | ||
286 | onSizeSelectSheetHidden() { | 286 | onSizeSelectSheetHidden() { |
287 | this.showSizeSelectSheet = false; | 287 | this.showSizeSelectSheet = false; |
288 | }, | 288 | }, |
289 | - async buy() { | ||
290 | - const userInfo = await this.auth(); | ||
291 | - | ||
292 | - if (!userInfo) { | ||
293 | - return; | ||
294 | - } | ||
295 | - | 289 | + buy() { |
296 | this.resetSelectedSize(); | 290 | this.resetSelectedSize(); |
297 | this.selectSizeConfig = { | 291 | this.selectSizeConfig = { |
298 | dest: 'OrderBuyConfirm', | 292 | dest: 'OrderBuyConfirm', |
@@ -165,6 +165,7 @@ export default function() { | @@ -165,6 +165,7 @@ export default function() { | ||
165 | orderCode: `${orderCode}`, | 165 | orderCode: `${orderCode}`, |
166 | price: +price, | 166 | price: +price, |
167 | }); | 167 | }); |
168 | + console.log(res); | ||
168 | 169 | ||
169 | if (res.code === 200) { | 170 | if (res.code === 200) { |
170 | return { errMsg: '', isOk: true , bidData: res.data}; | 171 | return { errMsg: '', isOk: true , bidData: res.data}; |
1 | { | 1 | { |
2 | "name": "xianyu-ufo-app-web", | 2 | "name": "xianyu-ufo-app-web", |
3 | - "version": "0.0.2-beta-26", | 3 | + "version": "0.0.2-beta-27", |
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