Authored by htoooth

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

# Conflicts:
#	apps/entry-client.js
... ... @@ -48,7 +48,7 @@ export default {
outline: 0;
border: none;
color: #000;
transition: opacity 0.2s linear, background-color 0.2s linear, border 0.2s linear, box-shadow 0.2s linear;
transition: opacity 0.1s linear, background-color 0.1s linear, border 0.1s linear, box-shadow 0.1s linear;
background-color: #eee;
height: 60px;
padding-left: 40px;
... ...
... ... @@ -17,11 +17,6 @@ export default {
.replace('{width}', this.width)
.replace('{height}', this.height);
}
},
methods: {
onError() {
this.$el.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
}
}
};
</script>
... ...
... ... @@ -27,7 +27,7 @@
>
<div ref="pulldown" class="pulldown-wrapper" :style="pullDownStyle" v-if="pullDownRefresh">
<div class="before-trigger" v-if="beforePullDown">
<span :y="bubbleY">bubbleY</span>
<span>加载中</span>
</div>
<div class="after-trigger" v-else>
<div v-if="isPullingDown" class="loading">
... ...
... ... @@ -5,7 +5,7 @@ import {
} from 'store/yoho/types';
import {createApp} from './app';
import {createApi} from 'create-api';
import {Style, Toast} from 'cube-ui';
import {Style, Toast} from 'cube-ui'; //eslint-disable-line
import Lazy from 'vue-lazyload';
import 'statics/scss/common.scss';
import 'statics/font/iconfont.css';
... ... @@ -18,8 +18,9 @@ if (window.__INITIAL_STATE__) {
}
// Vue.prop('yoho', yoho);
Vue.use(Toast);
Vue.prop('api', createApi());
Vue.use(Lazy);
Vue.use(Lazy, {error: ''});
router.onReady(() => {
router.beforeResolve((to, from, next) => {
... ...
<template>
<CubeInput v-bind="$attrs" v-bind:value="value" v-on="inputListeners" :maxlength="8" class="input-number">
<span slot="prepend">
<slot name="prepend"></slot>
</span>
<span slot="append">
<slot name="append"></slot>
</span>
</CubeInput>
</template>
<script>
import {Input} from 'cube-ui';
export default {
name: 'InputUfo',
props: ['value'],
computed: {
inputListeners() {
return Object.assign({},
this.$listeners,
{
input: (value) => {
this.$emit('input', value);
}
}
);
}
},
components: {CubeInput: Input}
};
</script>
<style lang="scss">
.input-number {
margin-bottom: 15px;
background-color: #f5f5f5;
border-radius: 10px;
font-size: 40px;
&:after {
border-radius: 20px;
border-color: #f5f5f5;
}
/deep/ .cube-input-field {
font-weight: bold;
color: #000;
}
}
</style>
... ...
<template>
<div class="input-wrapper">
<span class="input-prefix">
<slot name="prefix"></slot>
</span>
<input type="text" :maxlength="maxlength" :readonly="readonly" class="input" :class="classes" :value="value" @input="onInput">
<span class="input-suffix">
<slot name="suffix"></slot>
</span>
</div>
</template>
<script>
export default {
data() {
return {
classes: {}
};
},
props: {
value: [String, Number],
maxlength: Number,
readonly: Boolean
},
methods: {
onInput(evt) {
this.$emit('input', evt.target.value);
}
},
mounted() {
if (this.$slots.prefix) {
this.classes['input-with-prefix'] = true;
}
if (this.$slots.suffix) {
this.classes['input-with-suffix'] = true;
}
}
};
</script>
<style lang="scss">
.input-wrapper {
position: relative;
vertical-align: middle;
line-height: normal;
.input {
width: 100%;
height: 100px;
background-color: #f5f5f5;
border-radius: 10px;
padding-left: 60px;
padding-right: 60px;
font-size: 40px;
&.input-with-prefix {
padding-left: 60px;
}
&.input-with-suffix {
padding-right: 60px;
}
}
.input-prefix {
width: 60px;
height: 100%;
font-size: 40px;
text-align: center;
position: absolute;
left: 0;
top: 0;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
}
.input-suffix {
width: 60px;
height: 100%;
text-align: center;
position: absolute;
right: 0;
top: 0;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>
... ... @@ -10,8 +10,8 @@
</div>
<div class="modal-footer">
<slot name="footer">
<Button class="btn" type="button" @click="onCancel">取消</Button>
<Button class="btn" type="button" @click="onSure">调整售价</Button>
<Button class="btn" type="button" @click="onCancel">{{cancelText}}</Button>
<Button class="btn" type="button" @click="onSure">{{sureText}}</Button>
</slot>
</div>
</div>
... ... @@ -27,7 +27,15 @@ export default {
props: {
transfer: [Boolean],
title: String,
value: Boolean
value: Boolean,
sureText: {
type: String,
default: '确认'
},
cancelText: {
type: String,
default: '取消'
}
},
methods: {
onTouchmove() {},
... ...
<template>
<Modal class="ufo-font" :value="value" @input="onInput" ref="modal" :transfer="true" @on-sure="onSure">
<Modal
class="ufo-font"
v-model="visiable"
sure-text="调整价格"
cancel-text="取消"
:transfer="true"
@on-sure="onSure">
<div class="change-price-modal">
<p class="modal-title">当前42码最低售价:¥1999.00</p>
<Inputx :maxlength="8" class="input-number">
<span slot="prefix">¥</span>
</Inputx>
<p class="modal-title">当前{{skc.sizeName}}码最低售价:¥{{skc.leastPrice}}</p>
<InputUfo type="number" :maxlength="8" class="input-number" v-model="chgPrice">
<span class="prepend" slot="prepend">¥</span>
</InputUfo>
<transition name="tips">
<p class="tips" v-show="showTips">价格过高!</p>
<p class="tips" v-show="errorTip">{{errorTip}}</p>
</transition>
<p class="price-line">
<span class="title">平台费用:</span>
<span class="price">-¥10.00</span>
</p>
<p class="price-line">
<span class="title">银行转账费用:</span>
<span class="price">-¥10.00</span>
</p>
<p class="total price-line">
<span class="title">实际收入:</span>
<span class="price">¥10.00</span>
<p class="price-line" v-for="(price, inx) in prices" :key="inx" :class="{total: price.total}">
<span class="title">{{price.label}}</span>
<span class="price">{{price.money}}</span>
</p>
</div>
</Modal>
</template>
<script>
import Inputx from '../../components/inputx.vue';
import {debounce} from 'lodash';
import InputUfo from '../../components/input-ufo';
import Modal from '../../components/modal.vue';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('ufo/order');
export default {
name: 'ModalPrice',
props: {
value: Boolean,
},
data() {
return {
showTips: false,
visiable: false,
skc: {},
prices: [],
errorTip: '',
chgPrice: '',
};
},
mounted() {
this.inputChange = debounce(this.onChange.bind(this), 500);
},
watch: {
chgPrice(newVal) {
this.inputChange(newVal);
}
},
methods: {
...mapActions(['postCalcPrice']),
show({skc, product}) {
this.skc = skc;
this.product = product;
this.visiable = true;
},
hide() {
this.skc = {};
this.product = {};
this.visiable = false;
},
onChange(price) {
if (this.checkPrice(price)) {
this.calcPrice(price);
}
},
async calcPrice(price) {
const result = await this.postCalcPrice({
product_id: this.product.productId,
storage_id: this.skc.storageId,
new_price: price,
old_price: this.skc.goodPrice,
num: this.skc.storageNum
});
if (result && result.code === 200) {
} else {
this.$createToast({
txt: result.message || '计算失败',
type: 'warn',
zIndex: 1000
}).show();
}
},
checkPrice(price) {
let valid = false;
if (!price) {
this.errorTip = '没有价格';
return false;
} else if (!/^\d+$/.test(price)) {
this.errorTip = '价格只能为正整数';
} else if (!/9$/.test(price)) {
this.errorTip = '出售价格必须以9结尾';
} else {
this.errorTip = '';
valid = true;
}
return valid;
},
onSure() {
this.$emit('on-sure');
this.showTips = !this.showTips;
if (!this.checkPrice(this.chgPrice)) {
this.$createToast({
txt: this.errorTip,
type: 'warn',
zIndex: 1000
}).show();
} else {
this.$emit('on-change-price', {skc: this.skc, price: this.chgPrice});
}
},
onInput(val) {
this.$emit('input', val);
}
},
components: {Modal, Inputx}
components: {Modal, InputUfo}
};
</script>
... ... @@ -80,10 +148,10 @@ export default {
}
.input-number {
margin-bottom: 15px;
/deep/ .input {
font-weight: bold;
/deep/ .prepend {
width: 40px;
margin-left: 20px;
text-align: left;
}
}
... ...
<template>
<Modal class="ufo-font" :value="visiable" @input="onInput" ref="modal" :transfer="true" @on-sure="onSure" @on-cancel="onCancel">
<Modal
class="ufo-font"
v-model="visiable"
:transfer="true"
@on-sure="onSure">
<div class="change-price-modal">
<p class="modal-title">选择你要下架的数量</p>
<Inputx v-model="unStockNum" :maxlength="8" :readonly="true" class="input-number">
<i slot="prefix" class="iconfont icon-plus-minus" @touchend="onChangeNum(-1)"></i>
<i slot="suffix" class="iconfont icon-i-add" @touchend="onChangeNum(1)"></i>
</Inputx>
<InputUfo v-model="unStockNum" :maxlength="8" :readonly="true" class="inp-unstock">
<i slot="prepend" class="iconfont icon-plus-minus" @touchend="onChangeNum(-1)"></i>
<i slot="append" class="iconfont icon-i-add" @touchend="onChangeNum(1)"></i>
</InputUfo>
<p class="stock-txt">
目前还有 {{storageNum}} 个库存
</p>
... ... @@ -17,7 +21,7 @@
</template>
<script>
import Inputx from '../../components/inputx.vue';
import InputUfo from '../../components/input-ufo';
import Modal from '../../components/modal.vue';
... ... @@ -27,7 +31,7 @@ export default {
return {
visiable: false,
unStockNum: 1,
storageNum: 6,
storageNum: 1,
};
},
methods: {
... ... @@ -35,12 +39,12 @@ export default {
this.storageNum = storageNum;
this.visiable = true;
},
onSure() {
this.$emit('on-sure', this.unStockNum);
hide() {
this.storageNum = 1;
this.visiable = false;
},
onCancel() {
this.visiable = false;
onSure() {
this.$emit('on-no-sale', this.unStockNum);
},
onInput(val) {
this.$emit('input', val);
... ... @@ -54,7 +58,7 @@ export default {
this.unStockNum = value;
}
},
components: {Modal, Inputx}
components: {Modal, InputUfo}
};
</script>
... ... @@ -69,25 +73,18 @@ export default {
color: #999;
}
.input-number {
.inp-unstock {
margin-bottom: 10px;
/deep/ .input-prefix,
/deep/ .input-suffix {
/deep/ .iconfont {
padding: 34px 40px;
width: 112px;
.iconfont {
font-size: 32px;
color: #999;
font-weight: bold;
}
font-size: 32px;
color: #999;
font-weight: bold;
}
/deep/ .input {
font-weight: bold;
padding-left: 112px;
padding-right: 112px;
/deep/ .cube-input-field {
text-align: center;
}
}
... ...
... ... @@ -67,7 +67,7 @@ export default {
this.$emit('on-no-sale', this.value.goodsInfo);
},
onChgPrice() {
this.$emit('on-chg-price', this.value.goodsInfo);
this.$emit('on-change-price', this.value.goodsInfo);
},
onTouchStart(evt) {
const {clientX, clientY} = evt.touches[0];
... ...
... ... @@ -5,84 +5,40 @@
:key="i"
:value="skc"
:slideValue="slideSkc"
@on-chg-price="onChgPrice"
@on-change-price="onChangePrice"
@on-no-sale="onNoSale"
@on-slide="onSlide"></ProductItem>
<ModalPrice
v-if="modalLoad"
ref="modalPrice"
v-model="showModalPrice"
@on-sure="onPriceSure">
</ModalPrice>
<ModalUnstock
v-if="modalLoad"
ref="modalUnstock"
v-model="showModalUnstock"
@on-sure="onUnstockSure">
</ModalUnstock>
</div>
</template>
<script>
import ModalPrice from './modal-price';
import ModalUnstock from './modal-unstock';
import ProductItem from './product-item';
import {createNamespacedHelpers} from 'vuex';
import Vue from 'vue';
import {Toast} from 'cube-ui';
Vue.use(Toast);
const {mapActions} = createNamespacedHelpers('ufo/order');
export default {
name: 'ProductList',
props: {
skcs: Array
skcs: Array,
},
data() {
return {
modalLoad: false,
showModalPrice: false,
showTips: false,
showModalUnstock: false,
slideSkc: {}
};
},
mounted() {
this.modalLoad = true;
},
methods: {
...mapActions(['postNoSale']),
onPriceSure() {
this.showTips = !this.showTips;
},
async onUnstockSure(product) {
const result = await this.postNoSale(product);
if (result.code === 200) {
this.$createToast({
txt: '下架成功',
time: 5000,
type: 'correct'
}).show();
} else {
this.$createToast({
txt: result.message || '下架失败',
type: 'warn'
}).show();
}
this.slideSkc = {};
},
onChgPrice() {
this.showModalPrice = true;
onChangePrice(params) {
this.$emit('on-change-price', params);
},
onNoSale(productInfo) {
this.$refs.modalUnstock.show(productInfo);
onNoSale(params) {
this.$emit('on-no-sale', params);
},
onSlide(val) {
this.slideSkc = val;
}
},
components: {ModalPrice, ModalUnstock, ProductItem}
components: {ProductItem}
};
</script>
... ...
<template>
<LayoutApp class="ufo-font" :class="classes">
<ScrollView ref="scroll" :observe-dom="false" :pull-up-load="true" :pull-down-refresh="true" @pullingUp="onPullingUp" @pullingDown="onPullingDown">
<ScrollView ref="scroll" :observe-dom="false" :pull-up-load="true" @pullingUp="onPullingUp">
<div class="order-page">
<div class="title">{{productInfo.statuStr}}</div>
<div class="title">出售中</div>
<div class="product">
<ImgSize class="pro-img" :src="productInfo.goodsImg"></ImgSize>
<ImgSize class="pro-img" :src="productInfo.imageUrl" :width="200" :height="200"></ImgSize>
<div class="pro-info">
<p class="pro-name">{{productInfo.productName}}</p>
<p class="stock-info">{{productInfo.sizeNum}}个尺码,{{productInfo.storageNum}}个商品库存</p>
<p class="stock-info">{{productInfo.colorName}},{{productInfo.sizeNum}}个尺码,{{productInfo.storageNum}}个商品库存</p>
</div>
</div>
<div class="arrival">
<p class="arrival-time"><i class="iconfont icon-info"></i><span>尺码列表左滑选择 不卖了 ,下架当前尺码商品</span></p>
<p class="arrival-time">
<i class="iconfont icon-info"></i>
<span>尺码列表左滑选择 不卖了 ,下架当前尺码商品</span>
</p>
</div>
<ProductList :skcs="sizes"></ProductList>
<ProductList
:skcs="skcs"
@on-change-price="onChangePrice"
@on-no-sale="onNoSale"
></ProductList>
</div>
</ScrollView>
<ModalPrice
v-if="modalLoad"
ref="modalPrice"
@on-change-price="onChangePriceSure">
</ModalPrice>
<ModalUnstock
v-if="modalLoad"
ref="modalUnstock"
@on-no-sale="onNoSaleSure">
</ModalUnstock>
</LayoutApp>
</template>
<script>
import ModalPrice from './components/modal-price';
import ModalUnstock from './components/modal-unstock';
import ImgSize from 'components/img-size';
import {Button} from 'cube-ui';
import ScrollView from 'components/scroll-view';
... ... @@ -28,51 +47,94 @@ import Vue from 'vue';
import {Toast} from 'cube-ui';
import {createNamespacedHelpers} from 'vuex';
import {Style} from 'cube-ui';
Vue.use(Toast);
const {mapState} = createNamespacedHelpers('ufo/order');
const {mapState, mapActions} = createNamespacedHelpers('ufo/order');
export default {
name: 'OrderPage',
data() {
return {
tick: 1,
classes: {},
page: 1,
modalLoad: false,
showModalPrice: false,
showModalUnstock: false,
};
},
mounted() {
this.modalLoad = true;
},
computed: {
...mapState(['orderInfo']),
productInfo() {
return this.orderInfo.productInfo || {};
},
sizes() {
return this.orderInfo.data || [];
}
...mapState(['productInfo', 'skcs']),
},
asyncData({store, router}) {
return store.dispatch('ufo/order/fetchProduct', {orderId: router.params.orderId});
return store.dispatch('ufo/order/fetchProduct', {productId: router.params.orderId});
},
methods: {
...mapActions(['fetchProduct', 'postChangePrice', 'postNoSale']),
onPullingUp() {
setTimeout(() => {
this.$refs.scroll.forceUpdate();
}, 500);
this.fetchProduct({
productId: this.$route.params.orderId,
page: this.page + 1
});
this.$refs.scroll.forceUpdate();
},
onPullingDown() {
setTimeout(() => {
this.$refs.scroll.forceUpdate();
}, 500);
onChangePrice(skc) {
this.$refs.modalPrice.show({skc, product: this.productInfo});
},
onClick() {
this.showModalUnstock = true;
onNoSale(productInfo) {
this.$refs.modalUnstock.show(productInfo);
},
async onChangePriceSure({skc, price}) {
const result = await this.postChangePrice({
product_id: this.productInfo.productId,
storage_id: skc.storageId,
new_price: price,
old_price: skc.goodPrice,
num: skc.storageNum
});
if (result && result.code === 200) {
this.$refs.modalPrice.hide();
this.$createToast({
txt: '调价成功',
type: 'success',
zIndex: 1000
}).show();
} else {
this.$createToast({
txt: result.message || '调价失败',
type: 'warn',
zIndex: 1000
}).show();
}
},
async onNoSaleSure({skc, price}) {
const result = await this.postNoSale({
product_id: this.productInfo.productId,
storage_id: skc.storageId,
new_price: price,
old_price: skc.goodPrice,
num: skc.storageNum
});
if (result.code === 200) {
this.$refs.modalUnstock.hide();
this.$createToast({
txt: '下架成功',
type: 'correct'
}).show();
} else {
this.$createToast({
txt: result.message || '下架失败',
type: 'warn',
zIndex: 1000
}).show();
}
this.slideSkc = {};
},
},
components: {Button, ScrollView, ProductList, ImgSize}
components: {Button, ScrollView, ProductList, ImgSize, ModalPrice, ModalUnstock}
};
</script>
... ...
... ... @@ -2,7 +2,7 @@ import Vue from 'vue';
import Vuex from 'vuex';
import {createApi} from 'create-api';
import storeYoho from './yoho';
import storeUfo from './ufo';
import storeUfo from './order';
import storeCoupon from './coupon';
Vue.use(Vuex);
... ...
import storeOrder from './order';
import storeOrder from './ufo';
export default function() {
return {
... ...
import * as Types from './types';
export default {
async fetchProduct({commit}, {productId, page = 1, refresh}) {
commit(Types.FETCH_ORDER_PRODUCT_REQUEST);
const result = await this.$api.get('/api/ufo/seller/entryGoodsSizeList', {
productId,
page
});
if (result && result.code === 200) {
commit(Types.FETCH_ORDER_PRODUCT_SUCCESS, {
order: result.data,
refresh
});
} else {
commit(Types.FETCH_ORDER_PRODUCT_FAILD);
}
},
async postNoSale({commit}, payload) {
commit(Types.POST_NOSALE_REQUEST);
const result = await this.$api.get('/api/ufo/sellerOrder/batchDownShelf', payload);
if (result && result.code === 200) {
commit(Types.POST_NOSALE_SUCCESS, {
order: result.data
});
} else {
commit(Types.POST_NOSALE_FAILD);
}
return result || {};
},
async postCalcPrice({commit}, payload) {
commit(Types.POST_CALCPRICE_REQUEST);
const result = await this.$api.get('/api/ufo/sellerOrder/computeAdjustPrice', payload);
if (result && result.code === 200) {
commit(Types.POST_CALCPRICE_SUCCESS, {
order: result.data
});
} else {
commit(Types.POST_CALCPRICE_FAILD);
}
return result || {};
},
async postChangePrice({commit}, payload) {
commit(Types.POST_CHANGEPRICE_REQUEST);
const result = await this.$api.get('/api/ufo/sellerOrder/batchAdjustPrice', payload);
if (result && result.code === 200) {
commit(Types.POST_CHANGEPRICE_SUCCESS, {
order: result.data
});
} else {
commit(Types.POST_CHANGEPRICE_FAILD);
}
return result || {};
}
};
... ...
... ... @@ -7,7 +7,10 @@ export default function() {
state: {
fetchingPro: false,
fetchingNoSale: false,
orderInfo: {},
fetchingChangePrice: false,
fetchingCalcPrice: false,
productInfo: {},
skcs: []
},
actions,
mutations
... ...
... ... @@ -8,9 +8,16 @@ export default {
[Types.FETCH_ORDER_PRODUCT_FAILD](state) {
state.fetchingPro = false;
},
[Types.FETCH_ORDER_PRODUCT_SUCCESS](state, {order}) {
[Types.FETCH_ORDER_PRODUCT_SUCCESS](state, {order, refresh}) {
state.fetchingPro = false;
state.orderInfo = order;
if (state.productInfo.productId !== order.productInfo.productId) {
state.productInfo = order.productInfo;
}
if (refresh) {
state.skcs = order.data;
} else {
state.skcs = state.skcs.concat(order.data);
}
},
[Types.POST_NOSALE_REQUEST](state) {
state.fetchingNoSale = true;
... ... @@ -22,12 +29,21 @@ export default {
state.fetchingNoSale = false;
},
[Types.POST_CHANGEPRICE_REQUEST](state) {
state.fetchingNoSale = true;
state.fetchingChangePrice = true;
},
[Types.POST_CHANGEPRICE_FAILD](state) {
state.fetchingNoSale = false;
state.fetchingChangePrice = false;
},
[Types.POST_NOSALE_SUCCESS](state) {
state.fetchingNoSale = false;
[Types.POST_CHANGEPRICE_SUCCESS](state) {
state.fetchingChangePrice = false;
},
[Types.POST_CALCPRICE_REQUEST](state) {
state.fetchingCalcPrice = true;
},
[Types.POST_CALCPRICE_FAILD](state) {
state.fetchingCalcPrice = false;
},
[Types.POST_CALCPRICE_SUCCESS](state) {
state.fetchingCalcPrice = false;
},
};
... ...
... ... @@ -9,3 +9,8 @@ export const POST_NOSALE_SUCCESS = 'POST_NOSALE_SUCCESS';
export const POST_CHANGEPRICE_REQUEST = 'POST_CHANGEPRICE_REQUEST';
export const POST_CHANGEPRICE_FAILD = 'POST_CHANGEPRICE_FAILD';
export const POST_CHANGEPRICE_SUCCESS = 'POST_CHANGEPRICE_SUCCESS';
export const POST_CALCPRICE_REQUEST = 'POST_CALCPRICE_REQUEST';
export const POST_CALCPRICE_FAILD = 'POST_CALCPRICE_FAILD';
export const POST_CALCPRICE_SUCCESS = 'POST_CALCPRICE_SUCCESS';
... ...
import * as Types from './types';
export default {
async fetchProduct({commit}, {productId}) {
commit(Types.FETCH_ORDER_PRODUCT_REQUEST);
// const result = await this.$api.get('/api/ufo/seller/entryGoodsSizeList', {
// productId,
// });
const result = {
"alg": "SALT_MD5",
"code": 200,
"data": {
productInfo:{
"productId": 10000078,
"productName": "Air Jordan XX9 Low “Chicago Bulls”",
"colorName":"红色",
"goodsImg" : "http://img11.static.yhbimg.com/goodsimg/2018/10/18/17/01699014e8981a532f27abc74730e40bbd.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"sizeNum":5,
"storageNum":100,
"statuStr": "出售中",
"status": 1,
},
"data": [
{
"buttons": [
{
"code": "batch_cancel_sold",
"name": "BATCH_CANCEL_SOLD",
"text": "不卖了"
},
{
"code": "change_price",
"name": "CHANGE_PRICE",
"text": "调价"
}
],
"createTime": "2018-11-05 15:03:27",
"goodsInfo": {
"colorName": "",
"goodImg": "",
"goodPrice": "9.00",
"storageNum":100,
"sizeName": "L",
"storageId": 10000162,
"leastPrice": 1119
},
"secendLevelCreateTime": 1541401407,
"uid": 500031152
}
],
"page": 1,
"pageSize": 20,
"pagetotal": 1,
"total": 2
},
"md5": "42a616d78633c19d80eb410da1ae4644",
"message": "列表"
}
if (result && result.code === 200) {
commit(Types.FETCH_ORDER_PRODUCT_SUCCESS, {
order: result.data
});
} else {
commit(Types.FETCH_ORDER_PRODUCT_FAILD);
}
},
async postNoSale({commit}, {product}) {
commit(Types.POST_NOSALE_REQUEST);
// const result = await this.$api.get('/api/ufo/sellerOrder/batchDownShelf', product);
const result = {
"alg": "SALT_MD5",
"code": 200,
"data": true,
"md5": "40f3824dd1e55b340dc5357dd7ccab72",
"message": "批量取消成功"
};
if (result && result.code === 200) {
commit(Types.POST_NOSALE_SUCCESS, {
order: result.data
});
} else {
commit(Types.POST_NOSALE_FAILD);
}
return result || {};
}
};