Authored by 郭成尧

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -186,7 +186,7 @@ gulp.task('postcss', ['assets'], () => {
// webpack dev server
gulp.task('webpack-dev-server', () => {
const isMac = process.platform === 'darwin';
const useDashboard = process.platform === 'darwin' || process.platform === 'linux';
const devConfig = Object.assign({}, webpackConfig, {
devtool: '#inline-source-map',
vue: {
... ... @@ -204,7 +204,7 @@ gulp.task('webpack-dev-server', () => {
});
// webpackDashboardPlugin
if (isMac) {
if (useDashboard) {
const dashboard = new Dashboard();
devConfig.plugins.push(new DashboardPlugin(dashboard.setData));
... ... @@ -216,7 +216,7 @@ gulp.task('webpack-dev-server', () => {
contentBase: '.',
publicPath: '//localhost:5004/',
inline: true,
quiet: isMac,
quiet: useDashboard,
stats: {
colors: true
},
... ...
<div class="modal {{styleClass}}">
<h2>{{title}}</h2>
<p>{{text}}</p>
<p>{{{text}}}</p>
<hr>
<div class="button-group">
{{#each buttons}}
... ...
... ... @@ -7,7 +7,6 @@
.edit-logistics {
display: inline-block;
margin-top: 20px;
padding: 0 30px;
width: 100%;
background: #fff;
... ...
... ... @@ -13,7 +13,7 @@
</div>
</li>
</ul>
<div v-if="detail.status == 20"
<div v-if="detail.status == 20 && detail.deliveryTpye != 20"
class="logistics-detail">
<template v-if="detail.notice">
<a href="/me/logistic?order_code={{sourceOrderCode}}&id={{applyid}}&type={{type}}">
... ... @@ -131,6 +131,7 @@
this.show = false;
this.detail = {};
yoho.store.remove('refundStatus');
$.ajax({
url: '/me/return/status-detail',
data: {
... ... @@ -170,7 +171,6 @@
url = '/me/return/exchange/cancel-apply';
}
Modal.confirm('', '确认取消吗?', function() {
this.hide();
$.ajax({
... ... @@ -193,7 +193,7 @@
this.reload();
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
if (!document.hidden && yoho.store.get('refundStatus')) {
this.reload();
}
});
... ...
<template>
<div class="edit-logistics-page">
<form class="edit-logistics">
<div class="edit-logistics">
<label @click="companylist">
选择快递公司<input class="company-val" type="text" value="{{company_name}}" readonly>
<span class="icon icon-right"></span>
... ... @@ -9,7 +9,7 @@
快递单号
<input class="num" maxlength="20" v-model='num'>
</label>
</form>
</div>
<div class="submit" @click="submit">确认</div>
</div>
</template>
... ... @@ -18,6 +18,7 @@
const $ = require('jquery');
const tip = require('common/tip');
const yoho = require('yoho');
const modal = require('common/modal');
module.exports = {
props: ['applyid', 'type', 'company_id', 'company_name'],
... ... @@ -42,27 +43,34 @@
return false;
}
$.ajax({
method: 'POST',
url: '/me/return/save-logistics',
data: {
applyid: this.applyid,
type: this.type,
expressId: this.company_id,
expressCompany: this.company_name,
expressNumber: this.num
}
}).then(res => {
if ($.type(res) !== 'object') {
res = {};
}
if (res.code !== 200) {
tip(res.message || '网络错误');
} else {
yoho.goBack();
}
const text = `快递公司:${this.company_name} <br>单号:${this.num}`;
const _this = this;
modal.confirm(text, '请确认寄回信息是否正确?', function() {
this.hide();
$.ajax({
url: '/me/return/save-logistics',
type: 'post',
data: {
applyid: _this.applyid,
type: _this.type,
expressId: _this.company_id,
expressCompany: _this.company_name,
expressNumber: _this.num
}
}).then(res => {
if ($.type(res) !== 'object') {
res = {};
}
if (res.code !== 200) {
tip(res.message || '网络错误');
} else {
yoho.goBack();
yoho.store.set('refundStatus', true);
return false;
}
});
});
return false;
}
}
};
... ...