Authored by Aiden Xu

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

... ... @@ -31,7 +31,7 @@ yoho币 | /home/mycurrency |
关于我们 | /home/about |
物流详情 | /home/logistic?order_code=1609827614 |
退换货物流详情| /home/logistic?order_code=1609827614&type=refund|
退换货列表 | /home/refund/orders |
--------------------------------------------------------------------------------
----
... ...
... ... @@ -16,7 +16,7 @@ const exchange = {
// 订单 可换货商品列表
order(req, res, next) {
const uid = req.user.uid || 8050882;
const uid = 8041886;
const orderId = req.query.orderId;
if (!orderId) {
... ... @@ -48,6 +48,21 @@ const exchange = {
exchangeModel.submitExchange(uid, req.body).then(result => {
res.json(result);
}).catch(next);
},
/**
* 取消换货申请
* @param req
* @param res
* @param next
*/
cancelApply(req, res, next) {
let id = req.body.id;
let uid = req.user.id;
exchangeModel.cancelApply(uid, id).then(result => {
return res.json(result);
}).catch(next);
}
};
... ...
... ... @@ -4,21 +4,18 @@
*/
'use strict';
const favModel = require('../models/favorite');
const helpers = global.yoho.helpers;
const fav = {
favorite: (req, res) => {
if (req.query.tab === 'brand') {
res.render('favorite-brand', {
module: 'home',
page: 'favorite-brand',
brandUrl: helpers.urlFormat('/product/new')
page: 'favorite-brand'
});
} else {
res.render('favorite', {
module: 'home',
page: 'favorite',
productUrl: helpers.urlFormat('/product/new')
page: 'favorite'
});
}
},
... ...
... ... @@ -90,6 +90,27 @@ const refund = {
refundModel.getRefundOrders(param).then(result => {
return res.json(result);
});
},
/**
* 取消申请
* @param req
* @param res
*/
cancelApply(req, res) {
let uid = req.user.id;
let id = req.body.id;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
message: notLoginTip
});
}
refundModel.cancelRefundApply(uid, id).then(result => {
return res.json(result);
});
}
};
... ...
... ... @@ -36,6 +36,19 @@ const exchange = {
}, params);
return api.post('', data).then(global.yoho.camelCase);
},
/**
* 取消换货申请
* @param uid
* @param id
*/
cancelApply(uid, id) {
return api.post('', {
uid: uid,
id: id,
method: 'app.change.cancel'
}).then(global.yoho.camelCase);
}
};
... ...
... ... @@ -19,47 +19,7 @@ exports.getFavProductData = (uid, page, limit) => {
}, {
code: 200
}).then(result => {
var isend = true,
list = [],
data = result.data;
if (data && page <= data.page_total) {
data.product_list.forEach(function(d) {
if (!d.product_skn) {
return;
}
let link = '';
let discountPrice = false;
if (d.goodsId && d.cnAlphabet) {
link = helpers.urlFormat(`/product/pro_${d.product_id}_${d.goodsId}/${d.cnAlphabet}.html`);
}
if (Number(d.market_price) - Number(d.sales_price) > 0) {
discountPrice = '¥' + Number(Math.max(d.sales_price, 0)).toFixed(2);
}
list.push({
fav_id: d.product_id,
link: link,
imgUrl: d.image ? helpers.image(d.image) : '',
title: d.product_name,
price: '¥' + Number(Math.max(d.market_price, 0)).toFixed(2),
discountPrice: discountPrice,
sellOut: d.storage <= 0,
invalidGoods: d.status === 0
});
});
if (page < data.page_total) {
isend = false;
}
}
return {
isend: isend,
list: list
};
return result.data ? global.yoho.camelCase(result.data) : {};
});
};
... ... @@ -82,30 +42,7 @@ exports.getFavBrandData = (uid, gender, page, limit) => {
}, {
code: 200
}).then(result => {
var isend = true,
list = [],
data = result.data;
if (data && page <= data.page_total) {
data.brand_list.forEach(function(d) {
list.push({
fav_id: d.brand_id,
link: '', // todo
imgUrl: d.brand_ico ? helpers.image(d.brand_ico, 160, 125) : '',
brandName: d.brand_name,
down: d.status === 0
});
});
if (page < data.page_total) {
isend = false;
}
}
return {
isend: isend,
list: list
};
return result.data ? global.yoho.camelCase(result.data) : {};
});
};
... ...
... ... @@ -59,7 +59,7 @@ const _getInfoNumData = (uid) => {
}
return Object.assign(res, {
address_num: data[1].data.length ? data[1].data.length : ''
address_num: data[1].data && data[1].data.length ? data[1].data.length : ''
});
});
};
... ...
... ... @@ -50,7 +50,7 @@ exports.getOrderDetail = (uid, orderCode) => {
*/
exports.cancelOrder = (orderCode, reasonId, reason) => {
return api.get('057f5f856dff8b58.json', {
return api.post('', {
method: 'app.SpaceOrders.close',
order_code: orderCode,
reason_id: reasonId,
... ... @@ -67,7 +67,7 @@ exports.cancelOrder = (orderCode, reasonId, reason) => {
*/
exports.confirmOrder = (orderCode) => {
return api.get('', {
return api.post('', {
method: 'app.SpaceOrders.confirm',
order_code: orderCode
}).then(result => {
... ... @@ -82,7 +82,7 @@ exports.confirmOrder = (orderCode) => {
* @returns {Promise.<T>|*}
*/
exports.deleteOrder = (orderCode, uid) => {
return api.get('', {
return api.post('', {
method: 'app.SpaceOrders.delOrderByCode',
order_code: orderCode,
uid: uid
... ...
... ... @@ -52,6 +52,20 @@ const refund = {
cache: true,
code: 200
}).then(global.yoho.camelCase);
},
/**
* 取消退货申请
*
* @param uid 用户id
* @param id 退货id
*/
cancelRefundApply(uid, id) {
return api.post('', {
uid: uid,
id: id,
method: 'app.refund.cancel'
}).then(global.yoho.camelCase);
}
};
... ...
... ... @@ -46,6 +46,7 @@ router.get('/refund/order', refund.order); // 查询订单数据
router.post('/refund/submit', refund.submit); // 提交信息
router.get('/refund/logistics', refund.logistics); // 退换货 - 商品寄回信息
router.post('/save-logistics', refund.saveLogistics); // 退换货 - 添加寄回物流信息
router.post('/refund/cancel-apply', refund.cancelApply); // 退货 - 取消申请
router.get('/exchange-status', refund.exchangeGoods); // 退换货 - 换货状态
router.get('/refund/orders', refund.refundOrders); // 退换货 - 订单列表
... ... @@ -56,6 +57,7 @@ router.get('/exchange', exchange.exchange);
router.get('/exchange/order', exchange.order); // AJAX 获取订单 商品
router.get('/exchange/delivery', exchange.delivery); // AJAX 获取 退货方式
router.post('/exchange/submit', exchange.submit); // AJAX 提交换货 申请
router.post('/exchange/cancel-apply', exchange.cancelApply); // AJAX 取消换货申请
router.get('/mydetails', home.mydetails); // 个人信息
router.post('/save-mydetails', home.saveMydetails); // 保存个人信息
... ...
<div class="yoho-favorite-brand-page">
<div class="fav-content" id="fav-content">
<fav-brand-list brand-url='{{brandUrl}}'></fav-brand-list>
<fav-brand-list></fav-brand-list>
</div>
</div>
... ...
<div class="yoho-favorite-page">
<div class="fav-content" id="fav-content">
<fav-product-list product-url='{{productUrl}}'></fav-product-list>
<fav-product-list></fav-product-list>
</div>
</div>
... ...
... ... @@ -23,7 +23,7 @@ module.exports = {
getNewsList: (req, res, next) => {
let params = {
page: req.body.page,
gender: req.body.gender,
channel: req.body.channel,
uid: req.user.uid
};
... ...
... ... @@ -8,13 +8,25 @@
'use strict';
const serviceAPI = global.yoho.ServiceAPI;
const yhChannel = {
men: {
channel: '1,3'
},
women: {
channel: '2,3'
},
all: {
channel: '1,2,3'
}
};
module.exports = {
/* 资讯列表页数据获取 */
getNewsListData(params) {
return serviceAPI.get('guang/api/v2/article/getList', {
sort_id: '',
gender: params.gender,
gender: yhChannel[params.channel].channel,
uid: params.uid || '0',
page: params.page,
limit: '10'
... ...
... ... @@ -20,11 +20,11 @@ module.exports = {
domains: {
// api: 'http://192.168.102.202:8080/gateway/',
// service: 'http://192.168.102.202:8080/gateway/',
//api: 'http://testapi.yoho.cn:28078/',
//service: 'http://testservice.yoho.cn:28077/'
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/'
api: 'http://devapi.yoho.cn:58078/',
service: 'http://devservice.yoho.cn:58077/'
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
},
subDomains: {
host: '.m.yohoblk.com',
... ...
<div class="select">
<ul>
{{#each items}}
<li class="item-li {{#if disabled}} disabled {{/if}}" key="{{key}}" status="{{disabled}}">{{val}}</li>
<li class="item-li {{#if disabled}} disabled {{/if}}" key="{{key}}" status="{{disabled}}">{{{val}}}</li>
{{/each}}
<li class="item-del">
<span>取消</span>
... ...
... ... @@ -43,14 +43,14 @@ function Select(items) {
if (elem.parent().length === 0) {
const lis = elem.find('.item-li');
lis.each(function() {
if (!$(this).attr('status')) {
lis.each(function(index) {
if ($(this).attr('status') === 'false' || $(this).attr('status') === '') {
$(this).click(function(e) {
hide();
cb({
key: $(e.target).attr('key'),
val: e.target.innerHTML
});
cb(Object.assign({
key: e.target.getAttribute('key'),
val: e.target.innerText
}, items[index]));
});
}
});
... ...
... ... @@ -7,7 +7,8 @@
const $ = require('yoho-jquery');
$.ajax({
if (/MicroMessenger/i.test(navigator.userAgent)) {
$.ajax({
url: '//res.wx.qq.com/open/js/jweixin-1.1.0.js',
dataType: 'script',
cache: true,
... ... @@ -66,8 +67,8 @@ $.ajax({
}
});
}
});
});
}
module.exports = (shareData) => {
if (window.wx) {
window.wx.ready(function() {
... ...
... ... @@ -8,7 +8,7 @@ let Vue = require('yoho-vue');
*
* {value | resize 100 200 2} ==> /100/200/2
*/
Vue.filter('resize', (value, width, height, mode)=> {
Vue.filter('resize', (value, width, height, mode) => {
return value ? value.replace(/(\{width}|\{height}|\{mode})/g, function($0) {
const dict = {
'{width}': width,
... ... @@ -27,7 +27,7 @@ Vue.filter('resize', (value, width, height, mode)=> {
*
* {value | gender}
*/
Vue.filter('clothingGenderIdentity', (value)=> {
Vue.filter('clothingGenderIdentity', (value) => {
let ret = null;
switch (value) {
... ... @@ -49,7 +49,7 @@ Vue.filter('clothingGenderIdentity', (value)=> {
*
* @param value brand domain
*/
Vue.filter('brandUrl', (value)=> {
Vue.filter('brandUrl', (value) => {
return `/product/shop?domain=${value}`;
});
... ... @@ -57,6 +57,7 @@ Vue.filter('brandUrl', (value)=> {
* 产品 URL
*/
Vue.filter('goodsUrl', productId => {
if (!productId) return '';
return `/product/${productId}`;
});
... ...
... ... @@ -24,13 +24,11 @@ const cate = {
lifestyle: '6f7b590ed3844e680d4052fc5c4d98ad'
};
/* 资讯列表资源位 */
/* TODO 资讯列表资源位 */
const news = {
new: 'd4fdfcad1ec877d466d9780efaf4d296',
sports: 'e1f8dce8cb9de1a0977479c13c4d3dcc',
life: '5c0b9963d8b75e6fd788a2b49402be14',
sneakers: 'c4a62196c30cae5301e419aa3f77747b',
fashion: '70bc6b9d5c96bb7698eab85c7cd5ebbe'
all: 'd4fdfcad1ec877d466d9780efaf4d296',
men: 'e1f8dce8cb9de1a0977479c13c4d3dcc',
women: '5c0b9963d8b75e6fd788a2b49402be14'
};
module.exports = {
... ...
const Vue = require('yoho-vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const favBrandList = require('home/fav-brand-list.vue');
const VueTouch = require('vue-touch');
Vue.use(VueTouch)
require('common/vue-filter');
Vue.use(VueTouch)
Vue.use(infiniteScroll);
new Vue({
... ...
const Vue = require('yoho-vue');
const infiniteScroll = require('yoho-vue-infinite-scroll');
const favProductList = require('home/fav-product-list.vue');
const VueTouch = require('vue-touch');
Vue.use(VueTouch)
require('common/vue-filter');
Vue.use(VueTouch)
Vue.use(infiniteScroll);
new Vue({
... ...
... ... @@ -212,6 +212,7 @@ body {
border: 0 none;
background: $white;
font-size: 28px;
margin-right: 10px;
&.black {
width: 192px;
... ... @@ -237,3 +238,7 @@ body {
}
}
}
.select .overdue{
color: #b0b0b0;
}
\ No newline at end of file
... ...
... ... @@ -199,3 +199,40 @@ $white: #fff;
}
}
}
.order-empty {
width: 100%;
height: 100%;
text-align: center;
background: $white;
&:before {
content: "";
display: inline-block;
width: 153px;
height: 195px;
margin-top: 290px;
background: resolve("home/noorder.png") no-repeat;
background-size: 100%;
}
p{
color: #b0b0b0;
}
p:first-of-type{
font-size: 34px;
margin: 50px 0 20px;
}
a{
display: inline-block;
width: 414px;
height: 94px;
margin-top: 60px;
background: $black;
color: $white;
line-height: 94px;
font-size: 28px;
}
}
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@
<button class="button" @click='yoho.goNewPage({"url":"http://m.yohoblk.com"})'>新页面</button>
<button class="button" @click="yoho.goPay()">支付</button>
<button class="button" @click="yoho.goBack()">返回</button>
<button class="button" @click='yoho.goShare({"title":"标题","des":"描述","img":"http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg","url":"http://m.yohoblk.com/product/shop/share?domain=sctest1"})'>分享</button>
<button class="button" @click='yoho.goShare({"title":"标题","des":"描述","img":"http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg","url":"http://m.yohoblk.com/example/app"})'>分享</button>
<button class="button" @click='yoho.goSearch()'>搜索</button>
<button class="button" @click='yoho.goSetting()'>设置</button>
<button class="button" @click='yoho.goSetAvatar()'>设置头像</button>
... ... @@ -27,6 +27,7 @@
<script>
const yoho = require('yoho');
const modal = require('common/modal');
const share = require('common/share');
module.exports = {
data() {
... ... @@ -41,6 +42,12 @@
modal.alert('传递的信息是:' + data);
}
});
share({
title: '标题',
link: location.href,
desc: '我在BLK发现了一个不错的品牌,赶快来看看吧!',
imgUrl: 'http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg'
});
}
};
</script>
... ...
... ... @@ -8,9 +8,9 @@
<div class="fav-del-left {{editmodel ? 'delshow': ''}}" @click="showDelBtn(item.fav_id)">
<span class="fav-del-span"><span class="icon icon-edit-del"></span></span>
</div>
<a :href="item.link">
<a :href="item.link | brandUrl">
<div class="fav-img-box">
<img :src="item.imgUrl" alt=""/>
<img :src="item.imgUrl | resize 160 125" alt=""/>
</div>
<div class="fav-info-list">
<span class="title">{{item.brandName}}</span>
... ... @@ -29,7 +29,7 @@
<div class="fav-null-box {{ nullbox }}">
<span class="fav-null">您暂无收藏任何品牌</span>
<a slot="go-shopping" class="go-shopping" :href="brandUrl">随便逛逛</a>
<a slot="go-shopping" class="go-shopping" href="/product/new">随便逛逛</a>
</div>
</div>
</template>
... ... @@ -40,7 +40,6 @@
const yoho = require('yoho');
module.exports = {
props: ['brandUrl'],
data() {
return {
nullbox: 'hide',
... ... @@ -65,21 +64,26 @@
page: ++_this.page,
tab: 'brand'
}
}).then(result => {
if (result.isend) {
}).then(data => {
if (_this.page === data.pageTotal) {
_this.busy = true;
} else {
_this.busy = false;
}
if (result.list.length) {
result.list.forEach(function(o) {
if (!_this.keys[o.fav_id]) {
_this.keys[o.fav_id] = true;
_this.brandData.push(o);
}
data.brandList.forEach(function(o){
if (!_this.keys[o.brandId]) {
_this.keys[o.brandId] = true;
_this.brandData.push({
fav_id: o.brandId,
link: o.brandDomain,
imgUrl: o.brandIco,
brandName: o.brandName,
down: o.status === 0
});
}
})
_this.nullbox = _this.brandData.length ? 'hide' : '';
}).fail(() => {
... ...
... ... @@ -8,9 +8,9 @@
<div class="fav-del-left {{editmodel ? 'delshow': ''}}" @click="showDelBtn(item.fav_id)">
<span class="fav-del-span"><span class="icon icon-edit-del"></span></span>
</div>
<a :href="item.link">
<a :href="item.link | goodsUrl">
<div class="fav-img-box">
<img :src="item.imgUrl" alt=""/>
<img :src="item.imgUrl | resize 152 203" alt=""/>
</div>
<div class="fav-info-list">
<span class="title">{{item.title}}</span>
... ... @@ -34,7 +34,7 @@
</ul>
<div class="fav-null-box {{ nullbox }}">
<span class="fav-null">您暂无收藏任何商品</span>
<a slot="go-shopping" class="go-shopping" :href="productUrl">随便逛逛</a>
<a slot="go-shopping" class="go-shopping" href='/product/new'>随便逛逛</a>
</div>
</div>
</template>
... ... @@ -45,7 +45,6 @@
const yoho = require('yoho');
module.exports = {
props: ['productUrl'],
data() {
return {
nullbox: 'hide',
... ... @@ -69,21 +68,39 @@
data: {
page: ++_this.page
}
}).then(result => {
if (result.isend) {
}).then(data => {
if (_this.page === data.pageTotal) {
_this.busy = true;
} else {
_this.busy = false;
}
if (result.list.length) {
result.list.forEach(function(o) {
if (!_this.keys[o.fav_id]) {
_this.keys[o.fav_id] = true;
_this.productData.push(o);
data.productList.forEach(function(o){
if (!o.productSkn) {
return;
}
if (!_this.keys[o.productId]) {
_this.keys[o.productId] = true;
let discountPrice = false;
if (Number(o.marketPrice) - Number(o.salesPrice) > 0) {
discountPrice = '¥' + Number(Math.max(o.salesPrice, 0)).toFixed(2);
}
_this.productData.push({
fav_id: o.productId,
link: o.goodsId && o.cnAlphabet ? o.productId : '',
imgUrl: o.image,
title: o.productName,
price: '¥' + Number(Math.max(o.marketPrice, 0)).toFixed(2),
discountPrice: discountPrice,
sellOut: o.storage <= 0,
invalidGoods: o.status === 0
});
}
})
_this.nullbox = _this.productData.length ? 'hide' : '';
}).fail(() => {
... ...
... ... @@ -43,10 +43,11 @@
<div class="order-button" v-show="order.status != 1 && order.status != 2 && order.status != 3">
<button v-if="order.status == 0" @click="cancelOrder(order.orderCode)">取消订单</button>
<button v-if="order.status == 0 " class="countdown" @click="goBuy(order.orderCode)">去支付 <span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span></button>
<button v-if="order.status == 4 || order.status == 5 ">查看物流</button>
<button v-if="order.status == 4 || order.status == 5 " @click="seeExpress(order.orderCode)">查看物流</button>
<button v-if="order.status == 4 || order.status == 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
<button v-if="order.status == 6" @click="deleteOrder(order,index)">删除订单</button>
<button v-if="order.status == 6" class="normal">再次购买</button>
<button v-if="order.isSupportRefund == 'Y' || order.isSupportExchange == 'Y'" class="normal" @click="applyRefund()">申请售后</button>
</div>
</template>
<script>
... ... @@ -56,6 +57,7 @@
const tip = require('common/tip');
const Modal = require('common/modal');
const yohoAPI = require('yoho');
let genderSel = require('common/select');
module.exports = {
data() {
... ... @@ -76,6 +78,24 @@
}).then(result => {
if (result.code === 200) {
this.$set('order', result.data);
genderSel = genderSel([
{
key: this.order.isSupportRefund,
val: this.order.isSupportRefund === 'Y' ? '申请退货' : '<span class="overdue">申请退货(已过期限)</span>',
url: '/home/refund?orderId=' + this.order.orderCode,
disabled: this.order.isSupportRefund !== 'Y'
},
{
key: this.order.isSupportExchange,
val: this.order.isSupportExchange === 'Y' ? '申请换货' : '<span class="overdue">申请换货(已过期限)</span>',
url: '/home/exchange?orderId=' + this.order.orderCode,
disabled: this.order.isSupportExchange !== 'Y'
},
{
key: 'onlineService',
val: '在线客服'
}
]);
} else {
tip(result.message);
}
... ... @@ -161,8 +181,19 @@
goBuy(code) {
yohoAPI.goPay({orderid: code});
},
seeExpress() {
location.href = '';
seeExpress(code) {
location.href = '/home/logistic?order_code='+code;
},
/**
* 申请售后
*/
applyRefund(code) {
genderSel.show(function(item) {
console.log(item);
return;
location.href = item.url;
});
}
}
};
... ...
... ... @@ -30,7 +30,7 @@
<div class="options">
<button v-if="order.status === 0" @click="cancelOrder(order.orderCode)">取消订单</button>
<button v-if="order.status === 0 " class="countdown" @click="goBuy(order.orderCode)">去支付 <span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span></button>
<button v-if="order.status === 4 || order.status === 5 ">查看物流</button>
<button v-if="order.status === 4 || order.status === 5 " @click="seeExpress(order.orderCode)">查看物流</button>
<button v-if="order.status === 4 || order.status === 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
<button v-if="order.status === 6" @click="deleteOrder(order,index)">删除订单</button>
<button v-if="order.status === 6" class="normal">再次购买</button>
... ... @@ -39,6 +39,11 @@
</div>
</li>
</ul>
<div class="order-empty {{emptybox}}">
<p>您暂时还没有订单</p>
<p>Your do not have an order <br>for the time being</p>
<a href="">去购物</a>
</div>
</template>
<script>
... ... @@ -58,6 +63,7 @@
type: this.$parent.$data.type,
orderList: [],
busy: false,
emptybox: 'hide'
};
},
... ... @@ -86,7 +92,11 @@
if (result.data.orderList.length > 0) {
this.$set('orderList', _that.orderList.concat(result.data.orderList));
_that.pageTotal = result.data.pageTotal;
} else {
_that.emptybox = '';
}
} else {
_that.emptybox = '';
}
}).fail(() => {
tip('网络错误');
... ... @@ -172,8 +182,8 @@
goBuy(code) {
yohoAPI.goPay({orderid: code});
},
seeExpress() {
location.href = '';
seeExpress(code) {
location.href = '/home/logistic?order_code='+code;
}
}
};
... ...
... ... @@ -31,7 +31,7 @@
<div class="order-option" v-show="order.canCancel == 'Y'">
<div class="goods-total"></div>
<div class="options" v-show="order.canCancel == 'Y'">
<button v-if="order.canCancel == 'Y'" class="normal">取消申请</button>
<button v-if="order.canCancel == 'Y'" class="normal" @click="cancelApply(order.id, order.refundType)">取消申请</button>
</div>
</div>
</div>
... ... @@ -85,12 +85,17 @@
tip('网络错误');
});
},
cancelApply(code) {
/**
* 取消申请
* @param id
* @param type refundType 1为退货,2为换货
*/
cancelApply(id, type) {
$.ajax({
url: '/home/cancel-apply',
url: '/home/'+(type == 2 ? 'exchange' : 'refund')+'/cancel-apply',
type: 'post',
data: {
orderCode: code
id: id
}
}).then(result => {
if (result.code === 200) {
... ...
... ... @@ -77,15 +77,14 @@
module.exports = {
data() {
return {
contentCode: contentCode.news[qs.cate || 'new'],
contentCode: contentCode.news[qs.channel || 'all'],
newsList: [],
gender: qs.gender,
page: 0,
scrollDisabled: false
};
},
watch: {
gender() {
channel() {
this.getNewsList();
}
},
... ... @@ -96,9 +95,8 @@
$.post({
url: '/news/list.json',
data: {
sortId: this.crntCateId,
page: this.page++,
gender: this.gender || '1,2,3'
channel: qs.channel || 'all'
}
}).done(result => {
if (result.code === 200) {
... ...