Authored by Tao

Merge branch 'develop' of http://git.yoho.cn/fe/xianyu-ufo-app-web into develop

@@ -69,11 +69,11 @@ export default { @@ -69,11 +69,11 @@ export default {
69 methods: { 69 methods: {
70 ...mapActions(['fetchWallet']), 70 ...mapActions(['fetchWallet']),
71 onPullingDown() { 71 onPullingDown() {
72 - this.fetchWallet({isRefresh:true}) 72 + this.fetchWallet({isRefresh:true, tradeType: this.walletData.tradeType})
73 }, 73 },
74 onPullingUp() { 74 onPullingUp() {
75 if(!this.walletData.endReached) { 75 if(!this.walletData.endReached) {
76 - this.fetchWallet({isRefresh:false}) 76 + this.fetchWallet({isRefresh:false, tradeType: this.walletData.tradeType})
77 } else { 77 } else {
78 this.$refs.scroll.forceUpdate() 78 this.$refs.scroll.forceUpdate()
79 } 79 }
1 <template> 1 <template>
2 <div class="single-image"> 2 <div class="single-image">
3 - <a :href="data.url" class="link"> 3 + <LayoutLink :href="data.url" class="link">
4 <img :src="data.src" :alt="data.title" class="img" :style="style"> 4 <img :src="data.src" :alt="data.title" class="img" :style="style">
5 - </a> 5 + </LayoutLink>
6 </div> 6 </div>
7 </template> 7 </template>
8 8
1 <template> 1 <template>
2 - <LayoutApp :show-back="true"> 2 + <LayoutApp :show-back="true" title="支付成功">
3 <div class="body"> 3 <div class="body">
4 <div class="header"> 4 <div class="header">
5 <i class="iconfont iconOk icon-class"></i> 5 <i class="iconfont iconOk icon-class"></i>
1 <template> 1 <template>
2 - <LayoutApp :show-back="true"> 2 + <LayoutApp :show-back="true" title="确认订单">
3 <div class="body"> 3 <div class="body">
4 - <TitleComp txt="确认订单" class="title-class"></TitleComp>  
5 <AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo> 4 <AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo>
6 <ProductInfo :data="orderDetail.good" class="product-info order-item"></ProductInfo> 5 <ProductInfo :data="orderDetail.good" class="product-info order-item"></ProductInfo>
7 <Coupon class="order-item" v-if="couponList.length > 0" :data="orderDetail.recommendedCouponInfo" 6 <Coupon class="order-item" v-if="couponList.length > 0" :data="orderDetail.recommendedCouponInfo"
1 <template> 1 <template>
2 - <LayoutApp :show-back="true"> 2 + <LayoutApp :show-back="true" title="支付中">
3 <div class="timer-wrapper"> 3 <div class="timer-wrapper">
4 <div class="timer">{{count}}s</div> 4 <div class="timer">{{count}}s</div>
5 </div> 5 </div>
@@ -26,7 +26,7 @@ export default { @@ -26,7 +26,7 @@ export default {
26 props: ['orderCode', 'payParams', 'extra'], 26 props: ['orderCode', 'payParams', 'extra'],
27 data() { 27 data() {
28 return { 28 return {
29 - count: 10, 29 + count: 60,
30 page: null, 30 page: null,
31 timer: null 31 timer: null
32 }; 32 };
@@ -42,7 +42,7 @@ export default { @@ -42,7 +42,7 @@ export default {
42 this.page = JSON.parse(this.extra || '{}'); 42 this.page = JSON.parse(this.extra || '{}');
43 } 43 }
44 }, 44 },
45 - beforeDestroy() { 45 + beforeRouteLeave () {
46 if (this.timer) { 46 if (this.timer) {
47 clearTimeout(this.timer); 47 clearTimeout(this.timer);
48 } 48 }
1 <template> 1 <template>
2 - <LayoutApp :show-back="true"> 2 + <LayoutApp :show-back="true" title="上架成功">
3 <div class="body"> 3 <div class="body">
4 <div class="header"> 4 <div class="header">
5 <i class="iconfont iconOk icon-class"></i> 5 <i class="iconfont iconOk icon-class"></i>
1 <template> 1 <template>
2 - <LayoutApp :show-back="true"> 2 + <LayoutApp :show-back="true" title="确认出售">
3 <div class="body"> 3 <div class="body">
4 - <TitleComp txt="出售"></TitleComp>  
5 <ProductInfo :data="productDetail" class="product-info"></ProductInfo> 4 <ProductInfo :data="productDetail" class="product-info"></ProductInfo>
6 <InputPrice @input="changePrice" :value="price" class="input-price" @on-blur="compute"></InputPrice> 5 <InputPrice @input="changePrice" :value="price" class="input-price" @on-blur="compute"></InputPrice>
7 <OrderMargin class="order-item order-margin" :data="fee"></OrderMargin> 6 <OrderMargin class="order-item order-margin" :data="fee"></OrderMargin>
@@ -287,6 +287,7 @@ export default { @@ -287,6 +287,7 @@ export default {
287 this.showSizeSelectSheet = true; 287 this.showSizeSelectSheet = true;
288 }, 288 },
289 async onSelectTradeProduct(tradeProduct) { 289 async onSelectTradeProduct(tradeProduct) {
  290 + if (this.selectSizeConfig.type === 'buy') {
290 try { 291 try {
291 const info = await this.payment({ 292 const info = await this.payment({
292 skup: tradeProduct.skup, 293 skup: tradeProduct.skup,
@@ -316,7 +317,7 @@ export default { @@ -316,7 +317,7 @@ export default {
316 }, 317 },
317 onConfirm: () => { 318 onConfirm: () => {
318 this.$router.push({ 319 this.$router.push({
319 - name: this.selectSizeConfig.type === 'buy' ? 'OrderList' : 'InSaleOrderList', 320 + name: 'OrderList',
320 params: { 321 params: {
321 owner: this.selectSizeConfig.type, 322 owner: this.selectSizeConfig.type,
322 }, 323 },
@@ -328,6 +329,7 @@ export default { @@ -328,6 +329,7 @@ export default {
328 } catch (e) { 329 } catch (e) {
329 // e 330 // e
330 } 331 }
  332 + }
331 333
332 this.$router.push({ 334 this.$router.push({
333 name: this.selectSizeConfig.dest, 335 name: this.selectSizeConfig.dest,
@@ -141,15 +141,11 @@ export default function() { @@ -141,15 +141,11 @@ export default function() {
141 return tabList; 141 return tabList;
142 }, 142 },
143 getYearMonth(state) { 143 getYearMonth(state) {
144 - let beginTime = moment(  
145 - new Date(state.filterData.beginTime * 1000),  
146 - ).format('YYYY-MM');  
147 - let endTime = moment(new Date(state.filterData.endTime * 1000)).format(  
148 - 'YYYY-MM',  
149 - ); 144 + let beginTime = moment(new Date(state.filterData.beginTime * 1000)).format('YYYY-MM');
  145 + let endTime = moment(new Date(state.filterData.endTime * 1000)).format('YYYY-MM');
150 146
151 - var a = moment(endTime.split('-'));  
152 - var b = moment(beginTime.split('-')); 147 + let a = moment(endTime.split('-'));
  148 + let b = moment(beginTime.split('-'));
153 let yearNum = a.diff(b, 'years'); 149 let yearNum = a.diff(b, 'years');
154 let monthNum = a.diff(b, 'months'); 150 let monthNum = a.diff(b, 'months');
155 let beginYear = beginTime.split('-')[0]; 151 let beginYear = beginTime.split('-')[0];
@@ -239,9 +235,7 @@ export default function() { @@ -239,9 +235,7 @@ export default function() {
239 }, 235 },
240 addWallet(state, walletData) { 236 addWallet(state, walletData) {
241 walletData.list.map(item => { 237 walletData.list.map(item => {
242 - item.time = moment(new Date(item.createTime * 1000)).format(  
243 - 'YYYY.MM.DD HH:mm',  
244 - ); 238 + item.time = moment(new Date(item.createTime * 1000)).format('YYYY.MM.DD HH:mm');
245 item.amount = Number(Math.abs(item.amount)).toFixed(2); 239 item.amount = Number(Math.abs(item.amount)).toFixed(2);
246 return item; 240 return item;
247 }); 241 });
@@ -440,8 +434,7 @@ export default function() { @@ -440,8 +434,7 @@ export default function() {
440 let newList = [...oldList, ...data.list]; 434 let newList = [...oldList, ...data.list];
441 435
442 walletData.currentPage = data.page; 436 walletData.currentPage = data.page;
443 - walletData.endReached =  
444 - data.list.length === 0 || data.page === data.totalPage; 437 + walletData.endReached = data.list.length === 0 || data.page === data.totalPage;
445 walletData.list = newList; 438 walletData.list = newList;
446 commit('addWallet', walletData); 439 commit('addWallet', walletData);
447 } 440 }