Authored by ccbikai

Merge branch 'develop' into release/1.0

... ... @@ -18,10 +18,10 @@ const editorialList = params => {
let finalResult = {};
return editorialListApi.getEditorialListData(params).then(result => {
if (result.data && result.data.list) {
if (result && result.data) {
Object.assign(finalResult, {
data: {
list: result.data.list.artList,
list: result.data.list ? result.data.list.artList : [],
totalPage: result.data.totalPage
},
code: 200
... ...
... ... @@ -6,7 +6,6 @@
const refundModel = require('../models/refund');
const notLoginCode = 400;
const notLoginTip = '抱歉,您暂未登录!';
const testUid = 8039837; // 测试uid
const refund = {
refund(req, res) {
... ... @@ -16,7 +15,7 @@ const refund = {
});
},
order(req, res, next) {
const uid = req.user.uid || 8050882;
const uid = req.user.uid;
const orderCode = req.query.orderCode;
if (!orderCode) {
... ... @@ -28,7 +27,7 @@ const refund = {
}).catch(next);
},
submit(req, res, next) {
const uid = req.user.uid || 8050882;
const uid = req.user.uid;
refundModel.submitRefundData(uid, req.body).then(result => {
res.json(result);
... ... @@ -106,11 +105,10 @@ const refund = {
* @returns {*|{read, write}}
*/
getRefundOrders(req, res) {
let uid = req.query.id;
let uid = req.user.uid;
let page = req.query.page;
let limit = req.query.limit;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ... @@ -137,7 +135,6 @@ const refund = {
let uid = req.user.uid;
let id = req.body.id;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ...
... ... @@ -32,7 +32,7 @@ const refund = {
code: 200
});
},
setexpress(applyid, uid, expressCompany, expressNumber, expressId) {
setexpress(applyid, uid, expressCompany, expressId, expressNumber) {
return api.get('', {
method: 'app.refund.setexpress',
id: applyid,
... ...
<div class="logistics-page" id="logistics">
<components :is="currentView" :applyid="applyid" :company_id="company_id" :company_name="company_name" company_list='{{company_list}}' keep-alive></components>
<components :is="currentView" :company_id="company_id" :company_name="company_name" applyid='{{applyid}}' company_list='{{company_list}}' keep-alive></components>
</div>
... ...
... ... @@ -65,8 +65,6 @@ module.exports = {
shopId: req.body.shopId,
favId: req.body.favId,
uid: req.user.uid,
// uid: '8050882',
type: 'shop',
isFav: req.body.isFav
}).then(result => {
... ...
... ... @@ -20,7 +20,9 @@ const prettyFilter = require(`${global.utils}/beautify/filters`);
const getShopData = params => {
let finalResult = {};
return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => {
return shopApi.getBrandInfoByDomain({
domain: params.domain
}).then(result => {
if (result.data) {
... ... @@ -41,8 +43,6 @@ const getShopData = params => {
return shopApi.getShopInfoData({
shopId: result.data.shop_id,
uid: params.uid
// uid: '8050882'
}).then(subResult => {
if (subResult.data) {
... ... @@ -56,7 +56,9 @@ const getShopData = params => {
});
/* 取资源位店铺背景图 */
return shopApi.getShopsDecoratorList({shopId: result.data.shop_id}).then(thResult => {
return shopApi.getShopsDecoratorList({
shopId: result.data.shop_id
}).then(thResult => {
if (thResult.data) {
_.forEach(thResult.data.list, value => {
... ... @@ -97,7 +99,9 @@ const getShopData = params => {
const getBrandShopGoodsData = params => {
let finalResult = {};
return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => {
return shopApi.getBrandInfoByDomain({
domain: params.domain
}).then(result => {
if (result.data) {
return shopApi.getBrandShopGoodsOriginData(Object.assign(params, {
... ...
... ... @@ -27,14 +27,15 @@
}
.button-group {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: stretch;
height: 88px;
text-align: center;
a.modal-button {
flex: 1;
width: 45%;
display: inline-block;
margin-top: 0.5rem;
align-self: center;
text-align: center;
color: $blue;
... ...
... ... @@ -52,6 +52,9 @@
.num {
width: 440px;
text-align: right;
margin-top: 20px;
height: 50px;
line-height: 50px;
}
}
... ... @@ -84,11 +87,11 @@
border-bottom: 1px solid #e6e6e6;
input {
height: 56px;
height: 60px;
width: 100%;
padding-left: 25px;
border-radius: 20px;
font-size: 22px;
font-size: 26px;
color: #b0b0b0;
background: #eee;
border: none;
... ...
<template>
<tab v-bind:page="'cate'"></tab>
<brand-cate v-bind:category="category" v-bind:jump="true"></brand-cate>
<brand-cate v-bind:category="category" v-bind:jump="true" v-bind:gender="gender"></brand-cate>
</template>
<script>
const tip = require('common/tip');
const brandCate = require('channel/brand-cate.vue');
const tab = require('channel/tab.vue');
const $ = require('jquery');
const bus = require('common/vue-bus');
const channelTrans = {
men: {
key: 'MEN男士',
code: '1,3'
},
women: {
key: 'WOMEN女士',
code: '2,3'
},
lifestyle: {
key: 'LIFESTYLE生活',
code: '1,2,3'
}
};
module.exports = {
data() {
return {
category: {}
category: [],
categoryResult: {},
gender: '1,3'
};
},
components: {
... ... @@ -25,7 +43,8 @@
url: '/cate/list.json'
}).then(result => {
if (result.code === 200 && result.data) {
this.$set('category', result.data);
this.$set('categoryResult', result.data);
this.$set('category', this.categoryResult['MEN男士']);
}
}).fail(() => {
tip('网络错误');
... ... @@ -34,6 +53,11 @@
},
created() {
this.getCateList();
bus.$on('channel.change', (page, channel) => {
this.$set('gender', channelTrans[channel].code);
this.$set('category', this.categoryResult[channelTrans[channel].key]);
});
}
};
</script>
... ...
... ... @@ -204,49 +204,34 @@
<script>
const bus = require('common/vue-bus');
const channelTrans = {
men: {
key: 'MEN男士',
code: '1,3'
},
women: {
key: 'WOMEN女士',
code: '2,3'
},
lifestyle: {
key: 'LIFESTYLE生活',
code: '1,2,3'
}
};
module.exports = {
props: {
category: {
type: Object
type: Array
},
jump: {
type: Boolean
},
gender: {
type: String
}
},
data() {
return {
brandCate: [], // 频道切换时取数据使用
cateNavLeftData: [], // 左侧分类数据
cateNavRightData: [], // 右侧分类数据
leftcurrent: 0, // 标记当前左侧选中条目
gender: '1,2,3', // 跳转到商品列表页的参数
rightAll: {} // 全部XX
};
},
watch: {
category() {
this.$set('brandCate', this.category);
this.$set('cateNavLeftData', this.category['MEN男士']);
this.$set('cateNavRightData', this.category['MEN男士'] ? this.category['MEN男士'][0].sub : []);
this.$set('cateNavLeftData', this.category);
this.$set('cateNavRightData', this.cateNavLeftData ? this.cateNavLeftData[0].sub : []);
this.$set('rightAll', this.category['MEN男士'] ? {
sortId: this.category['MEN男士'][0].relationParameter.sort,
categoryName: this.category['MEN男士'][0].categoryName
this.$set('rightAll', this.cateNavLeftData ? {
sortId: this.cateNavLeftData[0].relationParameter.sort,
categoryName: this.cateNavLeftData[0].categoryName
} : {});
}
},
... ... @@ -267,17 +252,6 @@
name: categoryName
});
}
},
created() {
bus.$on('channel.change', (page, channel) => {
this.gender = channelTrans[channel].code;
this.cateNavLeftData = this.brandCate[channelTrans[channel].key];
this.cateNavRightData = this.cateNavLeftData ? this.cateNavLeftData[0].sub : [];
this.rightAll = {
sortId: this.cateNavLeftData[0].relationParameter.sort,
categoryName: this.cateNavLeftData[0].categoryName
};
});
}
};
</script>
... ...
<template>
<ul class="list-box">
<li v-for="item in items"><a href="#{{item.index}}">{{item.name}}</a></li>
<li v-for="item in items"><a class="no-intercept" href="#{{item.index}}">{{item.name}}</a></li>
</ul>
</template>
<style>
... ...
... ... @@ -203,6 +203,10 @@
},
created() {
yoho.addNativeMethod('editModel', () => {
if (!this.brandData.length) {
return false;
}
this.hideDelBth();
this.editmodel = !this.editmodel;
... ...
... ... @@ -221,6 +221,10 @@
},
created() {
yoho.addNativeMethod('editModel', () => {
if (!this.productData.length) {
return false;
}
this.hideDelBth();
this.editmodel = !this.editmodel;
... ...
... ... @@ -101,12 +101,10 @@
type: this.type
}
}).then(result => {
if (result.code === 200) {
if (result.data && result.data.orderList.length > 0) {
this.$set('orderList', this.orderList.concat(result.data.orderList));
this.pageTotal = result.data.pageTotal;
this.busy = false;
}
if (result.data && result.data.orderList.length > 0) {
this.$set('orderList', this.orderList.concat(result.data.orderList));
this.pageTotal = result.data.pageTotal;
this.busy = false;
}
if (this.orderList.length === 0) {
... ...
... ... @@ -80,12 +80,10 @@
limit: this.limit
}
}).then(result => {
if (result.code === 200) {
if (result.data && result.data.list.length > 0) {
this.$set('orderList', this.orderList.concat(result.data.list));
this.pageTotal = result.data.totalPage;
this.busy = false;
}
if (result.data && result.data.list.length > 0) {
this.$set('orderList', this.orderList.concat(result.data.list));
this.pageTotal = result.data.totalPage;
this.busy = false;
}
if (this.orderList.length === 0) {
... ...
... ... @@ -7,7 +7,7 @@
</label>
<label>
快递单号
<input class="num" type="number" v-model='num'>
<input class="num" maxlength="20" v-model='num'>
</label>
</form>
<div class="submit" @click="submit">确认</div>
... ...