Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -7,18 +7,21 @@
<script>
const contentCode = require('content-code');
const qs = require('yoho-qs');
const cookie = require('yoho-cookie');
const tab = require('channel/tab.vue');
const resources = require('component/resources/index.vue');
const brandList = require('channel/brand-list.vue');
const brandSearch = require('channel/brand-search.vue');
const detaultChannel = qs.channel || cookie.get('_Channel') || 'men';
module.exports = {
data() {
return {
page: 'brand',
contentCode: contentCode.brand[qs.channel || 'men']
channel: detaultChannel,
contentCode: contentCode.brand[detaultChannel]
};
},
components: {
... ...
... ... @@ -22,15 +22,18 @@
<script>
const contentCode = require('content-code');
const qs = require('yoho-qs');
const cookie = require('yoho-cookie');
const tab = require('channel/tab.vue');
const resources = require('component/resources/index.vue');
const detaultChannel = qs.channel || cookie.get('_Channel') || 'men';
module.exports = {
data() {
return {
page: 'cate',
contentCode: contentCode.cate[qs.channel || 'men']
contentCode: contentCode.cate[detaultChannel]
};
},
components: {
... ...
... ... @@ -5,17 +5,20 @@
<script>
const qs = require('yoho-qs');
const cookie = require('yoho-cookie');
const contentCode = require('content-code');
const bus = require('common/vue-bus');
const tab = require('channel/tab.vue');
const resources = require('component/resources/index.vue');
const detaultChannel = qs.channel || cookie.get('_Channel') || 'men';
module.exports = {
data() {
return {
page: 'channel',
contentCode: contentCode.channel[qs.channel || 'men']
contentCode: contentCode.channel[detaultChannel]
};
},
components: {
... ...
... ... @@ -22,7 +22,7 @@
props: {
current: {
type: Number,
default: 0
default: +cookie.get('_ChannelIndex') || 0
},
page: {
type: String,
... ... @@ -62,6 +62,7 @@
this.current = index;
bus.$emit('channel.change', this.page, this.channel[index].channel);
cookie.set('_Channel', this.channel[index].channel);
cookie.set('_ChannelIndex', index);
}
}
};
... ...
... ... @@ -52,6 +52,7 @@
'use strict';
const $ = require('jquery');
const tip = require('common/tip');
const Modal = require('common/modal');
module.exports = {
data() {
... ... @@ -99,20 +100,23 @@
* @param type refundType 1为退货,2为换货
*/
cancelApply(id, type) {
$.ajax({
url: '/me/return/' + (Number(type) === 2 ? 'exchange' : 'refund') + '/cancel-apply',
type: 'post',
data: {
id: id
}
}).then(result => {
if (result.code === 200) {
location.reload();
} else {
tip(result.message);
}
}).fail(() => {
tip('操作失敗');
Modal.confirm('', '确认取消吗?', function() {
this.hide();
$.ajax({
url: '/me/return/' + (Number(type) === 2 ? 'exchange' : 'refund') + '/cancel-apply',
type: 'post',
data: {
id: id
}
}).then(result => {
if (result.code === 200) {
location.reload();
} else {
tip(result.message);
}
}).fail(() => {
tip('操作失敗');
});
});
}
}
... ...
... ... @@ -73,8 +73,8 @@
<p>(现金:&yen;{{detail.returnAmountTotal}} - YOHO币:{{detail.returnYohoCoin}} - 优惠券:{{detail.returnCouponAmount}})</p>
</div>
<div class="exchange-type">
<a href="" class="primary">退款方式<span class="right">{{detail.returnAmountModeName}}</span>
</a>
<span href="" class="primary">退款方式<span class="right">{{detail.returnAmountModeName}}</span>
</span>
<div class="amount-modeinfo" v-if="detail.returnAmountModeInfo && detail.returnAmountModeInfo.length">
<p v-if="detail.returnAmountModeInfo[0].bankName">银行 <span>{{detail.returnAmountModeInfo[0].bankName}}</span></p>
<p v-if="detail.returnAmountModeInfo[0].bankCard">卡号 <span>{{detail.returnAmountModeInfo[0].bankCard}}</span></p>
... ... @@ -91,8 +91,7 @@
<p>{{detail.province}}&nbsp;{{detail.city}}&nbsp;{{detail.county}} <br>{{detail.address}}</p>
</div>
<div class="exchange-type">
<a href="" class="primary">换货方式<span class="right">{{detail.deliveryTpyeName}}</span>
</a>
<span class="primary">换货方式<span class="right">{{detail.deliveryTpyeName}}</span></span>
</div>
</div>
<div class="exchange-order">
... ... @@ -111,6 +110,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const Modal = require('common/modal');
module.exports = {
props: ['applyid', 'type'],
... ... @@ -123,32 +123,33 @@
},
methods: {
cancel() {
if (!this.id) {
return false;
}
let id = this.id;
let url = '';
if (!id) {
return false;
}
if (this.type === 'refund') {
url = '/me/return/refund/cancel-apply';
} else if (this.type === 'exchange') {
url = '/me/return/exchange/cancel-apply';
}
$.ajax({
method: 'POST',
url: url,
data: {
id: this.id,
}
}).then(data => {
if (data.code === 200) {
interceptClick.intercept('/me/return');
} else if (data.code === 400) {
tip(data.message);
} else {
tip('取消失败');
}
Modal.confirm('', '确认取消吗?', function() {
this.hide();
$.ajax({
method: 'POST',
url: url,
data: {
id: id,
}
}).then(data => {
if (data.code === 200) {
interceptClick.intercept('/me/return');
} else {
tip(data.message);
}
});
});
}
},
... ...
... ... @@ -10,16 +10,16 @@
</template>
<style>
.blk-header-gap {
display: none;
}
.top-box {
.blk-header {
background-color: transparent;
color: #fff;
border-bottom: 0;
}
.blk-header-gap {
display: none;
}
}
.top-change {
... ...