Authored by Tao

modify channel

... ... @@ -55,7 +55,9 @@ export default {
let half = newVal.length / 2;
if (newVal.substring(0, half) === newVal.substring(half)) {
setTimeout(() => {
this.smsCode = newVal.substring(0, half);
}, 0);
}
}
}
... ...
... ... @@ -296,8 +296,10 @@ export default {
submitClick: debounce(function() {
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
.then(() => {
.then((res) => {
if (res && res.code == 200) {
this.showDialog();
}
});
}, 500, {leading: false, trailing: true}),
... ...
... ... @@ -25,7 +25,7 @@
<div class="item item2">
<span>商品包装费</span>
<span>{{data.platformFee.appraiseFee}}</span>
<span>{{data.platformFee.packageFee}}</span>
</div>
<div class="item item2">
... ...
... ... @@ -201,7 +201,9 @@ export default {
button {
font-size: 24px;
padding: 18.4px 64px;
// padding: 18.4px 64px;
width: 226px;
height: 80px;
color: #999;
letter-spacing: 0;
background: #fff;
... ...
... ... @@ -13,8 +13,13 @@ export default {
methods: {
...mapActions(['cancelTradeConfirmInfo', 'cancelTrade']),
...inSaleMapMutations(['filterInSaleOrderList']),
async onInSaleOrderAction({ action, order, isDetail = false } = {}) {
const { owner = ownType.SELL } = this.$route.params;
async onInSaleOrderAction({
action,
order,
isDetail = false, // 是否是详情
isInSale = false, // 是否是出售中
} = {}) {
const { owner = ownType.SELL, status } = this.$route.params;
const { orderCode, earnestMoney = 0 } = order;
switch (action.name) {
... ... @@ -42,7 +47,15 @@ export default {
if (isDetail) {
this.fetchOrderDetail(this.$route.params);
} else {
if (isInSale) {
this.filterInSaleOrderList(orderCode);
} else {
this.filterOrderList({
orderCode,
owner,
status,
});
}
}
}
},
... ...
... ... @@ -49,6 +49,7 @@ export default {
}
.count-down {
font-weight: bold;
font-size: 72px;
}
... ...
... ... @@ -12,8 +12,8 @@
<div class="item-info">
<div>
<div v-if="$route.params.owner === 'buy'" class="price-status">
<span class="price">¥{{ order.realPrice }}</span>
<span class="delivery-fee-tip" >{{order.statuStr == '求购中' ? '' : '(含运费)'}}</span>
<span class="price">¥{{specialBid ? goodsInfo.goodPrice : order.realPrice }}</span>
<span class="delivery-fee-tip" >{{specialBid ? '' : '(含运费)'}}</span>
</div>
<div v-else class="price-status">
<span class="price">¥{{ goodsInfo.goodPrice }}</span>
... ... @@ -56,6 +56,12 @@ export default {
params: { code: this.order.orderCode, owner }
};
},
specialBid: {
get() {
return this.order.bidType && (this.order.statuStr === '求购中' || this.order.statuStr === '待付定金')
}
}
}
};
</script>
... ...
... ... @@ -17,7 +17,10 @@
<order-actions
class="actions"
:order="order"
@on-action="action => onInSaleOrderAction({ action, order })"
@on-action="
action =>
onInSaleOrderAction({ action, order, isInSale: true })
"
/>
</div>
</li>
... ...
... ... @@ -451,6 +451,7 @@ export default {
}
.header {
padding-top: 60px;
padding-bottom: 60px;
border-bottom: 1px solid #eee;
margin-bottom: 38px;
... ...
... ... @@ -72,7 +72,7 @@ export default {
return `当前${this.skc.sizeName}码最低售价: ¥-`;
},
postLoading() {
console.log(this.fetchingChangePrice, this.calced);
// console.log(this.fetchingChangePrice, this.calced);
return this.fetchingChangePrice || !this.calced;
}
},
... ...
... ... @@ -49,7 +49,7 @@ export default {
},
methods: {
show({skc}) {
console.log(skc);
// console.log(skc);
this.skc = skc;
this.unStockNum = 1;
this.storageNum = skc.storageNum;
... ...
... ... @@ -97,7 +97,6 @@ export default {
&-content {
position: relative;
background-color: #fff;
/*top: 314px;*/
border: 0;
width: 600px;
background-clip: padding-box;
... ...
... ... @@ -37,7 +37,7 @@ export default {
}
},
mounted() {
console.log(this.value);
// console.log(this.value);
},
methods: {
onNoSale() {
... ...
... ... @@ -95,7 +95,7 @@ export default {
pageSize: this.pageSize
});
console.log(result);
// console.log(result);
const afterCount = this.skcs.length;
if (afterCount > beginCount) {
... ... @@ -155,7 +155,7 @@ export default {
this.$refs.modalUnstock.show({skc});
},
async onNoSaleSure({skc, num}) { // 商品下架确认
console.log(skc, num);
// console.log(skc, num);
const result = await this.postNoSale({
product_id: this.productInfo.productId,
storage_id: skc.storageId,
... ... @@ -179,7 +179,7 @@ export default {
}
},
async onChangePriceSure({skc, price}) {
console.log(skc, price);
// console.log(skc, price);
const result = await this.postChangePrice({
product_id: this.productInfo.productId,
storage_id: skc.storageId,
... ...
... ... @@ -2,34 +2,59 @@
<LayoutApp :title="title">
<div class="order-page">
<div class="product">
<ImgSize class="pro-img" :src="goodsInfo.goodImg || ''" :width="200" :height="200"></ImgSize>
<ImgSize
class="pro-img"
:src="goodsInfo.goodImg || ''"
:width="200"
:height="200"
></ImgSize>
<div class="pro-info">
<p class="pro-name">{{goodsInfo.colorName}}, {{goodsInfo.sizeName}}码</p>
<p class="stock-info ufo-font">最低售价: ¥{{goodsInfo.leastPrice || '-'}}</p>
<p class="pro-name">
{{ goodsInfo.colorName }}, {{ goodsInfo.sizeName }}码
</p>
<p class="stock-info ufo-font">
最低售价: ¥{{ goodsInfo.leastPrice || "-" }}
</p>
</div>
</div>
<div class="input-container">
<InputUfo type="number" placeholder="定价需以9结尾.例如1999"
:maxlength="8" class="ipt-number ufo-font" v-model="chgPrice" @blur="onChange">
<InputUfo
type="number"
placeholder="定价需以9结尾.例如1999"
:maxlength="8"
class="ipt-number ufo-font"
v-model="chgPrice"
@blur="onChange"
>
<span class="prepend" slot="prepend">¥</span>
</InputUfo>
</div>
<div class="earnest-container">
<p>需支付保证金:</p><p class="earnest-money">{{earnestMoney}}</p><i class="iconfont iconquestion icon-earnest" @click="showEarnestQuestion"></i>
<p class="desc">所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金</p>
<p>需支付保证金:</p>
<p class="earnest-money">{{ earnestMoney }}</p>
<i
class="iconfont iconquestion icon-earnest"
@click="showEarnestQuestion"
></i>
<p class="desc">
所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金
</p>
</div>
<div class="fee-container">
<div class="fee-line">
<p class="fee-title">平台费用: <i class="iconfont iconquestion" @click="showFeeDetail"></i></p>
<p class="fee-price">{{platformFee.amount}}</p>
<p class="fee-title">
平台费用:
<i class="iconfont iconquestion" @click="showFeeDetail"></i>
</p>
<p class="fee-price">{{ platformFee.amount }}</p>
</div>
<div class="fee-line">
<p class="fee-title">银行转账费(1%):</p>
<p class="fee-price">{{bankTransferFee}}</p>
<p class="fee-price">{{ bankTransferFee }}</p>
</div>
<div class="fee-line total">
<p class="fee-title">实际收入:</p>
<p class="fee-price">{{income}}</p>
<p class="fee-price">{{ income }}</p>
</div>
</div>
<div class="address-container">
... ... @@ -37,12 +62,12 @@
<i class="iconfont iconaddress"></i>
</div>
<div class="address-info">
<p class="user-name">{{userAddress.consignee}}</p>
<p class="user-name">{{ userAddress.consignee }}</p>
<p class="user-address">
{{userAddress.area}} {{userAddress.address}}
{{ userAddress.area }} {{ userAddress.address }}
</p>
<p class="user-phone">
{{userAddress.mobile}}
{{ userAddress.mobile }}
</p>
</div>
</div>
... ... @@ -54,29 +79,39 @@
<Checkbox :option="labelOption" shape="square" v-model="isAgree"></Checkbox>
</div>
<a @click="showAgreement">卖家协议</a>-->
<OrderCheck v-model="isAgree" :desc="`卖家协议`" :url="agreementURL"></OrderCheck>
<OrderCheck
v-model="isAgree"
:desc="`卖家协议`"
:url="agreementURL"
></OrderCheck>
</div>
<div :class="['submit-button', (isAgree && calced) ? 'active' : '']">
<div :class="['submit-button', isAgree && calced ? 'active' : '']">
<button @click="changePrice">提交</button>
</div>
</div>
<!--平台费用问号点击弹框-->
<Modal v-model="platformFeeModalVisible" :transfer="true" cancel-text="我知道了">
<Modal
v-model="platformFeeModalVisible"
:transfer="true"
cancel-text="我知道了"
>
<div class="fee-dialog-container">
<p class="modal-title">平台费用</p>
<p class="fee-line">
<span class="fee-title">商品鉴定费</span>
<span class="fee-price">{{platformFee.appraiseFee}}</span>
<span class="fee-price">{{ platformFee.appraiseFee }}</span>
</p>
<p class="fee-line">
<span class="fee-title">商品包装费</span>
<span class="fee-price">{{platformFee.packageFee}}</span>
<span class="fee-price">{{ platformFee.packageFee }}</span>
</p>
<p class="fee-line total">
<span class="fee-title">平台服务费({{platformFee.goodsPaymentRatePercent}})</span>
<span class="fee-price">{{platformFee.serviceFee}}</span>
<span class="fee-title"
>平台服务费({{ platformFee.goodsPaymentRatePercent }})</span
>
<span class="fee-price">{{ platformFee.serviceFee }}</span>
</p>
</div>
</Modal>
... ... @@ -87,22 +122,31 @@
import LayoutApp from '../../../components/layout/layout-app';
import ScrollView from '../../../components/layout/scroll-view';
import ImgSize from '../../../components/img-size';
import {createNamespacedHelpers} from 'vuex';
import { createNamespacedHelpers } from 'vuex';
import InputUfo from './components/input-ufo';
import {Checkbox} from 'cube-ui';
import {get} from 'lodash';
import { Checkbox } from 'cube-ui';
import { get } from 'lodash';
import Modal from './components/modal';
import OrderCheck from '../components/confirm/agree';
const {mapState, mapActions} = createNamespacedHelpers('order/priceChange');
const { mapState, mapActions } = createNamespacedHelpers('order/priceChange');
// orderCode = 1233499619151
export default {
name: 'noEntryDetail',
components: {OrderCheck, Modal, InputUfo, ScrollView, LayoutApp, ImgSize, Checkbox},
components: {
OrderCheck,
Modal,
InputUfo,
ScrollView,
LayoutApp,
ImgSize,
Checkbox
},
data() {
return {
title: '调价',
agreementURL: 'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE',
agreementURL:
'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE',
platformFeeModalVisible: false,
platformFee: {
amount: '-¥0',
... ... @@ -118,6 +162,8 @@ export default {
chgPrice: '',
calced: false,
earnestMoney: '¥0',
// 保证金
earnestPrice: 0,
isAgree: false,
labelOption: {
label: '我已阅读并同意'
... ... @@ -125,8 +171,10 @@ export default {
time: 15000
};
},
asyncData({store, router}) {
return store.dispatch('order/priceChange/fetchOrder', {orderCode: router.params.orderCode});
asyncData({ store, router }) {
return store.dispatch('order/priceChange/fetchOrder', {
orderCode: router.params.orderCode
});
},
mounted() {
// this.fetchOrder({orderCode: this.$route.params.orderCode});
... ... @@ -155,11 +203,15 @@ export default {
this.bankTransferFee = '-¥0';
this.income = '¥0';
this.earnestMoney = '¥0';
this.earnestPrice = 0;
}
},
methods: {
...mapActions(['fetchOrder', 'postNoEntryCalcPrice', 'postNoEntryChangePrice']),
...mapActions([
'fetchOrder',
'postNoEntryCalcPrice',
'postNoEntryChangePrice'
]),
checkPrice(price) {
let valid = false;
... ... @@ -177,7 +229,8 @@ export default {
console.log(this.errorTip, valid);
return valid;
},
changePrice() { // 点击提交按钮
changePrice() {
// 点击提交按钮
if (this.isAgree && this.calced) {
this.$createDialog({
type: 'confirm',
... ... @@ -185,7 +238,7 @@ export default {
confirmBtn: {
text: '我再想想',
active: true,
disabled: false,
disabled: false
},
cancelBtn: {
text: '重新出售',
... ... @@ -195,10 +248,10 @@ export default {
onCancel: () => {
this.onPriceChangeConfirm({
price: this.chgPrice,
earnestPrice: this.earnestPrice,
skup: this.goodsInfo.skup
});
}
}).show();
}
},
... ... @@ -215,6 +268,7 @@ export default {
this.bankTransferFee = get(result, 'data.bankTransferFee', '');
this.income = '¥' + get(result, 'data.income', '');
this.earnestMoney = '¥' + get(result, 'data.earnestMoney', '');
this.earnestPrice = get(result, 'data.earnestMoney', 0);
this.calced = true;
} else {
if (result.message) {
... ... @@ -228,7 +282,8 @@ export default {
}).show();
}
},
onChange(price) { // 价格改变时(文本框离开焦点)
onChange(price) {
// 价格改变时(文本框离开焦点)
if (this.checkPrice(price)) {
this.calcPrice(price);
} else {
... ... @@ -238,13 +293,15 @@ export default {
}).show();
}
},
showFeeDetail() { // 显示平台费用详情
showFeeDetail() {
// 显示平台费用详情
this.platformFeeModalVisible = true;
},
showEarnestQuestion() { // 跳转保证金说明页
showEarnestQuestion() {
// 跳转保证金说明页
console.log('showEarnest');
this.$xianyu.goXianyuNewPage({url: this.agreementURL});
this.$xianyu.goXianyuNewPage({ url: this.agreementURL });
},
/**
... ... @@ -253,7 +310,7 @@ export default {
* @param skup
* @returns {Promise<void>}
*/
async onPriceChangeConfirm({price, skup}) {
async onPriceChangeConfirm({ price, earnestPrice, skup }) {
const that = this;
const result = await this.postNoEntryChangePrice({
price,
... ... @@ -264,7 +321,7 @@ export default {
console.log(result);
this.$createOrderPayType({
orderCode: result.data.orderCode,
price: price,
price: parseFloat(`${earnestPrice}`).toFixed(2),
desc: '保证金',
extra: JSON.stringify({
type: 'sell',
... ... @@ -298,8 +355,9 @@ export default {
// console.log(result);
},
clearData() { // 清空数据状态
console.log(this.$router);
clearData() {
// 清空数据状态
// console.log(this.$router);
this.platformFeeModalVisible = false;
this.platformFee = {
amount: '-¥0',
... ... @@ -321,8 +379,8 @@ export default {
};
</script>
<style lang="scss" scoped>
.order-page {
<style lang='scss' scoped>
.order-page {
position: absolute;
left: 0;
top: 0;
... ... @@ -525,13 +583,13 @@ export default {
}
}
}
}
}
/deep/ .modal-content {
/deep/ .modal-content {
width: 570px;
}
}
.fee-dialog-container {
.fee-dialog-container {
width: 100%;
.modal-title {
... ... @@ -555,9 +613,9 @@ export default {
text-align: right;
}
}
}
}
.submit-container {
.submit-container {
width: 100%;
height: 180px;
position: fixed;
... ... @@ -610,9 +668,9 @@ export default {
border: none;
}
&.active button{
&.active button {
background-color: #0c2b48;
}
}
}
}
</style>
... ...
<template>
<LayoutApp :show-back="true" title="出售" :back-action="backAction">
<div class="body">
<Scroll :options="scrollOption">
<!-- <Scroll :options="scrollOption">-->
<ProductInfo :data="productDetail" class="product-info"></ProductInfo>
<InputPrice @input="changePrice"
:num="num" :value="price"
... ... @@ -12,7 +12,7 @@
<OrderMargin class="order-item order-margin" :data="fee" :super-sell="superSell" :url="tipUrl"></OrderMargin>
<OrderFee class="order-item" :data="fee"></OrderFee>
<AddressInfo :data="address" class="order-item"></AddressInfo>
</Scroll>
<!-- </Scroll>-->
</div>
<div class="footer">
<OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
... ... @@ -62,7 +62,8 @@ export default {
superSell: false,
addNumError: false,
scrollOption: {
bounce: false
bounce: false,
click: true
},
tipUrl: 'https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE'
};
... ... @@ -302,7 +303,7 @@ export default {
}
this.$createOrderPayType({
price: this.fee.earnestMoneyStr,
price: parseFloat(`${this.fee.earnestMoney}`).toFixed(2),
desc: '保证金',
orderCode: orderResult.data.orderCode,
extra: JSON.stringify({
... ...
... ... @@ -55,7 +55,7 @@ export default {
text-align: center;
font-size: 32px;
line-height: 3;
font-weight: normal;
font-weight: bold;
color: #333;
}
... ... @@ -66,7 +66,7 @@ export default {
}
span {
font-size: 0.7em;
font-size: 0.8em;
line-height: 1.4;
border: 1px solid #f00;;
color: #f00;
... ...
... ... @@ -59,6 +59,7 @@ export default {
.title {
font-size: 36px;
font-weight: bold;
color: #000;
}
... ...
... ... @@ -25,7 +25,7 @@
<div class="info-name">{{productDetail.product_name}}</div>
</div>
<a class="banner" v-if="resource" :href="resource.url">
<img-size :src="sizeImg(resource.src)" :width="300" :height="60"/>
<img-size :src="sizeImg(resource.src)"/>
</a>
<div class="info">
<div class="info-list">
... ... @@ -448,6 +448,7 @@ export default {
img {
width: 100%;
height: 132px;
}
}
... ...

1.36 KB | W: | H:

1.75 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.01 KB | W: | H:

1.59 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -164,11 +164,11 @@ export default function() {
},
[BUYER_ASK_SET_PRODUCTINFO](state, payload) {
state.originProductData = payload
state.originProductData = payload;
},
[BUYER_ASK_SET_STORAGEID](state, payload) {
state.storageId = payload
state.storageId = payload;
},
[BUYER_ASK_SET_SHOWTOAST](state, payload) {
... ... @@ -375,13 +375,12 @@ export default function() {
address_id,
}).then(result => {
if (result.code === 200) {
let payload = get(result, ['data', 'dialog'], null)
let payload = get(result, ['data', 'dialog'], null);
commit(BUYER_ASK_PREPUBLISH_SUCCESS, payload);
return payload;
} else {
commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message);
return null;
}
return result;
}, error => {
console.log(error);
commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP);
... ...
... ... @@ -179,14 +179,14 @@ export default function() {
},
actions: {
async fetchOrderAddress({ commit, state }, payload) {
const orderCount = await this.$api.get('/api/order/confirm/count', payload);
const orderCount = await this.$api.post('/api/order/confirm/count', payload);
if (state.address?.address_id) {
return;
}
if (get(orderCount, 'data.cnt', 0)) {
const addressInfo = await this.$api.get('/api/order/confirm/address');
const addressInfo = await this.$api.post('/api/order/confirm/address');
const address = find(get(addressInfo, 'data', []), { is_default: 'Y' });
... ... @@ -211,7 +211,7 @@ export default function() {
},
async fetchUserStatus() {
return this.$api.get('/api/order/user/status');
return this.$api.post('/api/order/user/status');
},
async submitOrder({ commit }, payload) {
... ... @@ -278,13 +278,13 @@ export default function() {
},
async fetchOrderGoods(ctx, { orderCode }) {
return this.$api.get('/api/order/goods', {
return this.$api.post('/api/order/goods', {
orderCode
});
},
async fetchOrderStatus(ctx, { orderCode }) {
return this.$api.get('/api/order/status', {
return this.$api.post('/api/order/status', {
orderCode
});
}
... ...
... ... @@ -115,11 +115,7 @@ module.exports = {
auth: true,
path: '/ufo-gateway/coupon',
api: 'ufo.coupons.list',
param: {
page: {type: Number},
limit: {type: Number},
type: {type: String},
}
param: {}
},
'/api/ufo/home/bindAliPayAccount': {
ufo: true,
... ...
... ... @@ -36,6 +36,8 @@ exports.createApp = async(app) => {
});
}
app.set('etag', false);
app.use('/xianyu/node/status.html', (req, res) => {
res.status(200).end();
});
... ...
... ... @@ -12,6 +12,8 @@ const log = global.yoho.logger;
const sign = global.yoho.sign;
const config = global.yoho.config;
const isProduction = process.env.NODE_ENV === 'production';
const loginPage = '//m.yohobuy.com/signin.html';
const homePage = `${config.siteUrl}/xianyu/index/channel`;
... ... @@ -240,6 +242,7 @@ const bind = {
let info = bind.getBindThirdInfo(bindCode);
if (info.type === 'taobao') {
if (isProduction) {
const timeKey = `${config.app}:bindsms:taobao:${info.openId}`;
let sendTimes = await redis.getAsync(timeKey);
... ... @@ -255,6 +258,7 @@ const bind = {
}
redis.setex(timeKey, 60 * 60 * 2, sendTimes);
}
req.ctx(passportModel).sendTaobaoBindCode(mobile, req.yoho.isAliApp ? 'xianyu' : '').then(res.json).catch(next);
} else {
res.json({
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-33",
"version": "0.0.2-beta-35",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...