Authored by yyq

merge

<template>
<div ref="layout" class="layout" @touchstart="webviewScrollStart" @touchmove="webviewScrollMove" @touchend="webviewScrollEnd">
<div ref="layout" class="layout">
<slot name="header">
<LayoutHeader
v-if="!hideHeader"
... ... @@ -19,7 +19,7 @@
<script>
export default {
name: "LayoutApp",
name: 'LayoutApp',
props: {
title: String,
opacity: {
... ... @@ -65,7 +65,10 @@ export default {
this.touchMoveY = e.changedTouches[0].pageY;
if (scrollTop <= 0 && this.touchMoveY > this.touchStartY) {
e.stopPropagation();
e.preventDefault();
}
}
},
... ...
<template>
<Scroll ref="scroll" class="scroll-view" v-bind="attrMerge" v-on="listenerMerge">
<Scroll
ref="scroll"
class="scroll-view"
v-bind="attrMerge"
v-on="listenerMerge"
>
<slot slot="default"></slot>
<template slot="pulldown" slot-scope="props">
<div v-if="props.pullDownRefresh"
<!-- <div
v-if="props.pullDownRefresh"
class="pulldown-wrapper"
:style="props.pullDownStyle">
:style="props.pullDownStyle"
>
<div class="pulldown-content">
<div v-show="props.beforePullDown">
<div id="beforePullDown"></div>
... ... @@ -13,37 +20,35 @@
<div id="afterPullDown"></div>
</div>
</div>
</div>
</div> -->
</template>
</Scroll>
</template>
<script>
import {Scroll} from 'cube-ui';
import { Scroll } from "cube-ui";
export default {
name: 'ScrollView',
name: "ScrollView",
mounted() {
this.$nextTick(() => {
this._initLottie();
// this._initLottie();
});
},
computed: {
attrMerge() {
return Object.assign({},
return Object.assign(
{},
{
scrollEvents: ['scroll']
scrollEvents: ["scroll"]
},
this.$attrs,
this.$attrs
);
},
listenerMerge() {
return Object.assign({},
this.$listeners,
{
scroll: this.onScroll.bind(this)
}
);
return Object.assign({}, this.$listeners, {
scroll: this.onScroll.bind(this)
});
}
},
methods: {
... ... @@ -57,31 +62,31 @@ export default {
this.lottieBefore.goToAndStop(0);
}
}
this.$emit('scroll', pos);
this.$emit("scroll", pos);
},
forceUpdate(dirty) {
this.$refs.scroll.forceUpdate(dirty);
},
_initLottie() {
import(/* webpackChunkName: "lottie-web" */ 'lottie-web').then(lottie => {
import(/* webpackChunkName: "lottie-web" */ "lottie-web").then(lottie => {
this.lottieBefore = lottie.loadAnimation({
container: document.getElementById('beforePullDown'), // the dom element that will contain the animation
renderer: 'svg',
container: document.getElementById("beforePullDown"), // the dom element that will contain the animation
renderer: "svg",
loop: false,
autoplay: false,
path: 'https://cdn.yoho.cn/mapp/lottie/ufo-pull-1227.json' // the path to the animation json
path: "https://cdn.yoho.cn/mapp/lottie/ufo-pull-1227.json" // the path to the animation json
});
this.lottieAfter = lottie.loadAnimation({
container: document.getElementById('afterPullDown'), // the dom element that will contain the animation
renderer: 'svg',
container: document.getElementById("afterPullDown"), // the dom element that will contain the animation
renderer: "svg",
loop: true,
autoplay: true,
path: 'https://cdn.yoho.cn/mapp/lottie/ufo-refresh-1227.json' // the path to the animation json
path: "https://cdn.yoho.cn/mapp/lottie/ufo-refresh-1227.json" // the path to the animation json
});
});
}
},
components: {Scroll}
components: { Scroll }
};
</script>
... ...
... ... @@ -77,6 +77,7 @@ export default {
};
},
async mounted() {
this.pay();
},
methods: {
...mapOrderAction(['payAction']),
... ... @@ -207,7 +208,7 @@ export default {
<style lang="scss" scoped>
.pay-type-wrapper {
height: 714px;
height: 0;
background: white;
position: relative;
border-top-left-radius: 32px 32px;
... ...
... ... @@ -18,15 +18,19 @@
</Scroll>
</div>
<div class="right-content">
<Scroll>
<Scroll ref="subScroll"
:scroll-events="scrollEvents"
@scroll-end="onScrollEndHandler"
>
<div v-for="(itemSub, index) in categorySubList" :key="index">
<CategoryTitle>{{itemSub.name}}</CategoryTitle>
<div class="category-sub-root" :class="'sub-type-' + itemSub.type">
<div class="item-div"
v-for="(item, index) in itemSub.sub"
:key="index"
:data-id="item.id">
<LayoutLink :href="item.url">
:data-id="item.id"
ref="index">
<LayoutLink :href="item.url" >
<div class="item-imge-div" @click="goProductList(item,index, itemSub)">
<ImgSize
class="item-imge"
... ... @@ -65,28 +69,75 @@ export default {
},
data() {
return {
scrollEvents: ['scroll-end'],
sortItem:{
id:'-1',
name:'brand',
index: 0
}
};
},
mounted() {
this.fetchCategoryParentList();
let categorySubResult = this.fetchBrandList({});
// this.reportPaser(categorySubResult);
// console.log('categorySubList')
// console.log(...categorySubResult)
this.fetchBrandList({});
},
activated(){
this.reportYas(0);
},
methods: {
...mapActions(['fetchCategoryParentList', 'selectCategoryParent', 'fetchBrandList', 'fetchCategorySubList']),
onScrollEndHandler({y}) {
let scrollHeight = Math.abs(y)
this.reportYas(scrollHeight);
},
reportYas(scrollY) {
let scrollHeight = this.$refs.subScroll.$el.offsetHeight; // 滚动区高度
let reportParams = [];
this.categorySubList.forEach((item) => {
let subItemList = item.sub;
// console.log('item'+scrollY)
// console.log(item)
subItemList.forEach((val, index) => {
let eleTop = this.$refs.index[index].offsetTop;
let eleHeight = this.$refs.index[index].offsetHeight;
// console.log(eleHeight+'item'+scrollY)
let firstHeight = 0;
if(scrollY > eleHeight){
firstHeight = scrollY - eleHeight;
}
let lastViewHeight = scrollHeight + scrollY;
// console.log("firstHeight:"+firstHeight+'==scrollHeight='+scrollHeight+"==eleTop=="+eleTop+"==lastViewHeight="+lastViewHeight);
if(firstHeight < eleTop && scrollHeight + scrollY > eleTop){
let reportItem = {
CATE_ID: this.sortItem.id,
CATE_NM: this.sortItem.name,
CATE_INDEX: this.sortItem.index,
F_ID: item.id,
F_NAME: item.name,
F_INDEX: item.index,
I_INDEX: index,
TO_TYPE: val.linkType,
TO_ID: val.link,
};
// console.log(reportItem)
reportParams.push(reportItem)
}
});
});
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_SHOW_EVENT',
param: reportParams
}
});
},
onClick(item) {
if (!item.isSelect) {
this.sortItem = item;
let id = item.id;
let name = item.name;
// console.log('onClick==item')
// console.log(item)
this.$store.dispatch('reportYas', {
params: {
... ... @@ -97,13 +148,13 @@ export default {
}
}
});
this.reportYas(scrollHeight);
let subList ;
if (id === '-1') {
subList = this.fetchBrandList({ id });
} else {
subList = this.fetchCategorySubList({ id, name });
}
// this.reportPaser(subList);
}
},
goProductList(item, index, itemSub) {
... ... @@ -125,8 +176,8 @@ export default {
});
},
reportPaser(subList) {
console.log('reportPaser')
console.log(...subList);
// console.log('reportPaser')
// console.log(...subList);
if(subList && subList.length > 0){
let reportSub = [];
subList.forEach((val, index) => {
... ...
... ... @@ -119,6 +119,13 @@ export default {
},
activated() {
this.PAGE_URL = window.location.href;
// 首页进入上报
this.$store.dispatch('reportYas', {
params: {
param: { },
appop: 'XY_UFO_MAIN_START'
}
});
if (!this.channelList.list || !this.channelList.list.length) {
this.fetchChannelList();
}
... ... @@ -247,28 +254,34 @@ export default {
delete searchParams[key];
}
}
let result = await this.fetchProductList({
...searchParams,
page,
pageSize
});
let {data} = result;
try{
let result = await this.fetchProductList({
...searchParams,
page,
pageSize
});
if (result.code === 200) {
let {data} = result;
data.endReached = (data.page === data.page_total) && (data.page_size !== 1) || !data.page_total;
if (result.code === 200) {
}
data.endReached = (data.page === data.page_total) && (data.page_size !== 1) || !data.page_total;
if (typeof data === 'object' && Object.keys(data).length) {
for (let key in data) {
if (key === 'product_list') {
list.list = data.page > 1 ? list.list.concat(data.product_list) : data.product_list;
} else {
list[key] = data[key];
}
if (typeof data === 'object' && Object.keys(data).length) {
for (let key in data) {
if (key === 'product_list') {
list.list = data.page > 1 ? list.list.concat(data.product_list) : data.product_list;
} else {
list[key] = data[key];
}
}
this.productList = list;
}
this.productList = list;
}catch(e) {
console.log(e);
this.productList.list = [];
}
},
... ... @@ -324,6 +337,10 @@ export default {
background-color: #fefefe;
overflow: hidden;
}
&.fixed-nav:after {
display: none;
}
}
.channel-scroll {
... ... @@ -341,7 +358,7 @@ export default {
&:before {
content: "";
width: 100%;
height: 330px;
height: 400px;
background: #08304B;
position: absolute;
top: 0;
... ... @@ -403,7 +420,7 @@ export default {
background: #f5f5f5;
height: 64px;
font-size: 28px;
color: #999;
color: #000;
flex: 1;
border-radius: 4px;
padding: 14px 14px 14px 10px;
... ...
... ... @@ -103,6 +103,7 @@ export default {
right: 10px;
bottom: 10px;
height: 3px;
border-radius: 1.5px;
background-color: #000;
}
}
... ...
... ... @@ -11,7 +11,8 @@
@click="onChangeList('overtime')">已失效{{overtime.total && '('+ overtime.total + ')' || null}}
</div>
</div>
<Scroll class="coupon-list"
<Scroll ref="couponlist"
class="coupon-list"
:options="scrollOptions"
:data="list"
@pulling-up="onPullingUp" v-show="!showEmpty">
... ... @@ -102,6 +103,7 @@ export default {
// 切换list
this.list = this[type].list;
this.showEmpty = this[type].isEmpty;
this.$refs.couponlist.scrollTo(0, 0);
},
handleShowNotice(item, index) {
... ... @@ -122,7 +124,8 @@ export default {
return this.$router.push({
name: 'List',
query: {
coupon_token
coupon_token,
type: 8
}
});
}
... ...
... ... @@ -61,10 +61,10 @@ export default {
content: "";
position: absolute;
width: 1px;
height: 80px;
top: 10px;
height: 40px;
top: 20px;
right: 0;
background: linear-gradient(#fff, #e0e0e0, #fff);
background: #e0e0e0;
}
}
}
... ...
... ... @@ -22,7 +22,7 @@ export default {
},
isTitle: {
type: Boolean,
default: true,
default: false,
}
},
methods: {
... ...
... ... @@ -5,11 +5,10 @@
ref="scroll"
:options="options"
@pulling-up="onPullingUp"
:data="newsList.list"
v-if="newsList.list && newsList.list.length > 0">
:data="newsList.list">
<div class="news-content">
<Tab v-if="newsList.tabList.length > 0" :list="newsList.tabList || []"></Tab>
<List v-if="newsList.list && newsList.list.length > 0" :list="newsList.list || []"></List>
<List v-if="newsList.list && newsList.list.length > 0" isTitle :list="newsList.list || []"></List>
<UfoNoItem v-else :tip="`暂无数据`" style="margin-top: 60px"></UfoNoItem>
</div>
</Scroll>
... ...
... ... @@ -5,8 +5,7 @@
ref="scroll"
:options="options"
@pulling-up="onPullingUp"
:data="newsList.list"
v-if="newsList.list && newsList.list.length > 0">
:data="newsList.list">
<div class="news-content">
<Title :title="title"></Title>
<List v-if="newsList.list && newsList.list.length > 0" :list="newsList.list || []"></List>
... ...
... ... @@ -213,11 +213,11 @@ export default {
]),
onTextChange: debounce(function() {
if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
this.showBuyDialog();
} else {
// if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
// this.showBuyDialog();
// } else {
this.computePrice();
}
// }
}, 500, {leading: false, trailing: true}),
showToast() {
... ... @@ -258,7 +258,7 @@ export default {
});
},
onCancel: () => {
this.computePrice();
// this.computePrice();
}
}).show();
},
... ... @@ -301,6 +301,11 @@ export default {
},
submitClick: debounce(function() {
if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
this.showBuyDialog();
return;
}
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
.then((res) => {
if (res && res.code == 200) {
... ...
... ... @@ -50,6 +50,7 @@ export default {
}
.icon-right {
font-size: 24px;
color: #999;
}
... ...
... ... @@ -28,7 +28,7 @@ export default {
data() {
return {
desc: '有货买家协议',
url: 'https://activity.yoho.cn/feature/3189.html?share_id=5853&title=ufo-%E4%B9%B0%E5%AE%B6%E5%8D%8F%E8%AE%AE'
url: 'https://activity.yoho.cn/feature/6775.html?nodownload=1'
};
},
computed: {
... ...
... ... @@ -50,6 +50,7 @@ export default {
}
.icon-right {
font-size: 24px;
color: #999;
}
... ...
... ... @@ -209,27 +209,33 @@ export default {
orderCode,
onCloseAction() {},
onConfirmAction: async price => {
const { isOk, errMsg = '' } = await that.confirmChangePrice({
const { isOk, errMsg = '', bidData } = await that.confirmChangePrice({
price: price,
orderCode,
});
if (isOk) {
if (isDetail) {
that.$router.back();
} else {
that.resetData(this.$route.params);
that.fetchData(this.$route.params);
}
// 重新支付保证金
this.$createOrderPayType({
orderCode: bidData.orderCode,
price: parseFloat(bidData.depositAmount),
desc: '支付定金',
extra: JSON.stringify({
forward: {
name: isDetail ? 'buyOrderDetail' : 'OrderList',
params: this.$route.params,
},
}),
}).show();
} else {
if (errMsg) {
that.$createToast({
type: 'alert',
txt: errMsg,
});
}).show();
}
}
},
}
}).show();
break;
}
... ...
... ... @@ -4,7 +4,8 @@
ref="scroll"
:data="detailList"
:options="scrollOption"
@pulling-down="onPullingDown">
@pulling-down="onPullingDown"
>
<div class="logistics-wrapper">
<div class="header">
<img class="step" alt="" :src="stageImgUrl" />
... ... @@ -19,15 +20,15 @@
<p>
<span class="label">快递公司:</span>
<span>
{{ logisticInfo.expressCompanyName }}
</span>
{{ logisticInfo.expressCompanyName }}
</span>
<!-- <span class="platform-info">{{ platformName }}</span> -->
</p>
<p>
<span class="label">快递单号:</span>
<span>
{{ logisticInfo.wayBillCode }}
</span>
{{ logisticInfo.wayBillCode }}
</span>
<i ref="copy" class="copy"></i>
</p>
</div>
... ... @@ -39,29 +40,32 @@
:key="i"
>
<span class="title">{{ detailInfo.title }}</span>
<time-line :isGoingOn="i === 0" :deliveryList="detailInfo.detailList">
<time-line
:isGoingOn="i === 0"
:deliveryList="detailInfo.detailList"
>
<template v-slot:content="{ detail: { miniFaultConfirm } }">
<div class="judge-content-wrapper" v-if="miniFaultConfirm">
<p class="tip">
<span
:class="[miniFaultConfirm.showBtn ? '' : 'tipTextGray']"
>{{ miniFaultConfirm.text }}</span
>
<span
:class="[miniFaultConfirm.showBtn ? '' : 'tipTextGray']"
>{{ miniFaultConfirm.text }}</span
>
<span v-if="miniFaultConfirm.showBtn">
,请在<count-down
:leftTime="miniFaultConfirm.leftTime"
:isShowIcon="false"
class="judge-count-down"
/>之前确定是否接受
</span>
,请在<count-down
:leftTime="miniFaultConfirm.leftTime"
:isShowIcon="false"
class="judge-count-down"
/>之前确定是否接受
</span>
</p>
<div class="img-container">
<ul class="img-wrapper">
<li
v-for="(imgUrl, i) in miniFaultConfirm.imageUrls.slice(
0,
3
)"
0,
3
)"
:key="i"
@click="showBigImage(miniFaultConfirm, i)"
>
... ... @@ -77,7 +81,7 @@
<Button
class="more"
@click="showBigImage(miniFaultConfirm, 3)"
>查看更多</Button
>查看更多</Button
>
</li>
</ul>
... ... @@ -92,12 +96,13 @@
</div>
</div>
</div>
<template slot="pulldown" slot-scope="props">
<div v-if="props.pullDownRefresh"
class="cube-pulldown-wrapper"
:style="props.pullDownStyle">
</div>
</template>
<!-- <template slot="pulldown" slot-scope="props">
<div
v-if="props.pullDownRefresh"
class="cube-pulldown-wrapper"
:style="props.pullDownStyle"
></div>
</template> -->
</scroll-view>
</layout-app>
</template>
... ... @@ -120,24 +125,25 @@ export default {
TimeLine,
CountDown,
ScrollView,
Button,
Button
},
data() {
return {
stageImgUrl: '',
stageImgUrl: "",
imageUrls: [],
scrollOption: {
pullDownRefresh: {
threshold: 70,
stop: 90
stop: 90,
txt: "更新成功"
},
observeDOM: false,
pullUpLoad: false,
},
pullUpLoad: false
}
};
},
computed: {
...mapState(['logisticInfo']),
...mapState(["logisticInfo"]),
platformName() {
const { expressType: type } = this.logisticInfo;
... ... @@ -219,7 +225,7 @@ export default {
this.imageUrls.push(val.replace(/{width}x{height}/, "750x"));
});
this.$createImagePreview({
this.preView = this.$createImagePreview({
imgs: this.imageUrls,
initialIndex: index
}).show();
... ... @@ -285,16 +291,24 @@ export default {
}).show();
});
}
},
beforeDestroy() {
if (this.preView) {
this.preView.hide && this.preView.hide()
}
},
beforeRouteLeave(to, from, next) {
if (this.preView) {
this.preView.hide && this.preView.hide()
}
}
};
</script>
<style lang="scss" scoped>
.logistics-wrapper {
height: calc(100vh - 90px);
-webkit-box-orient: vertical;
overflow-x: auto;
/deep/ .time-line-wrapper .time-line-item {
padding-right: 0;
}
... ... @@ -348,7 +362,7 @@ export default {
.judge-count-down {
color: #d0021b;
font-size: 12*2px;
font-size: 12 * 2px;
display: inline-block;
}
... ...
... ... @@ -83,6 +83,12 @@ export default {
computed: {
...mapState(['productInfo', 'skcs']),
},
beforeRouteLeave(from, to, next) {
console.log('from', from);
console.log('to', to);
this.$refs.modalPrice.hide();
next();
},
methods: {
...mapMutations(['MERGE_CHANGEPRICE_DATA']),
...mapActions(['fetchProduct', 'postNoSale', 'postChangePrice']),
... ...
... ... @@ -119,20 +119,20 @@
</template>
<script>
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 InputUfo from "./components/input-ufo";
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");
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 InputUfo from './components/input-ufo';
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');
// orderCode = 1233499619151
export default {
name: "noEntryDetail",
name: 'noEntryDetail',
components: {
OrderCheck,
Modal,
... ... @@ -144,36 +144,36 @@ export default {
},
data() {
return {
title: "调价",
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",
'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",
appraiseFee: "¥0.00",
packageFee: "¥0.00",
serviceFee: "¥0.00",
goodsPaymentRatePercent: "0.00%",
payChannelPercentage: "0.00%"
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
},
bankTransferFee: "-¥0",
income: "¥0",
errorTip: "",
chgPrice: "",
bankTransferFee: '-¥0',
income: '¥0',
errorTip: '',
chgPrice: '',
calced: false,
earnestMoney: "¥0",
earnestMoney: '¥0',
// 保证金
earnestPrice: 0,
isAgree: false,
labelOption: {
label: "我已阅读并同意"
label: '我已阅读并同意'
},
time: 15000,
isStopScrollPrevent: false // 是否停止layout阻止滚动事件
};
},
asyncData({ store, router }) {
return store.dispatch("order/priceChange/fetchOrder", {
return store.dispatch('order/priceChange/fetchOrder', {
orderCode: router.params.orderCode
});
},
... ... @@ -182,7 +182,7 @@ export default {
// this.inputChange = debounce(this.onChange.bind(this), 500);
},
computed: {
...mapState(["noEntryOrderInfo"]),
...mapState(['noEntryOrderInfo']),
goodsInfo() {
return this.noEntryOrderInfo.goodsInfo || {};
},
... ... @@ -194,37 +194,41 @@ export default {
chgPrice() {
this.calced = false;
this.platformFee = {
amount: "-¥0",
appraiseFee: "¥0.00",
packageFee: "¥0.00",
serviceFee: "¥0.00",
goodsPaymentRatePercent: "0.00%",
payChannelPercentage: "0.00%"
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
};
this.bankTransferFee = "-¥0";
this.income = "¥0";
this.earnestMoney = "¥0";
this.bankTransferFee = '-¥0';
this.income = '¥0';
this.earnestMoney = '¥0';
this.earnestPrice = 0;
}
},
beforeRouteLeave(from, to, next) {
this.clearData();
next();
},
methods: {
...mapActions([
"fetchOrder",
"postNoEntryCalcPrice",
"postNoEntryChangePrice"
'fetchOrder',
'postNoEntryCalcPrice',
'postNoEntryChangePrice'
]),
checkPrice(price) {
let valid = false;
if (!price) {
this.errorTip = "没有价格";
this.errorTip = '没有价格';
return false;
} else if (!/^\d+$/.test(price)) {
this.errorTip = "价格只能为正整数";
this.errorTip = '价格只能为正整数';
} else if (!/9$/.test(price)) {
this.errorTip = "出售价格必须以9结尾";
this.errorTip = '出售价格必须以9结尾';
} else {
this.errorTip = "";
this.errorTip = '';
valid = true;
}
console.log(this.errorTip, valid);
... ... @@ -234,15 +238,15 @@ export default {
// 点击提交按钮
if (this.isAgree && this.calced) {
this.$createDialog({
type: "confirm",
content: "重新出售后本次出售保证金原路返回",
type: 'confirm',
content: '重新出售后本次出售保证金原路返回',
confirmBtn: {
text: "我再想想",
text: '我再想想',
active: true,
disabled: false
},
cancelBtn: {
text: "重新出售",
text: '重新出售',
active: false,
disabled: false
},
... ... @@ -265,11 +269,11 @@ export default {
console.log(result);
if (result && result.code === 200) {
this.platformFee = get(result, "data.platformFee", "");
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.platformFee = get(result, 'data.platformFee', '');
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) {
... ... @@ -279,7 +283,7 @@ export default {
this.$createToast({
txt: this.errorTip,
type: "txt"
type: 'txt'
}).show();
}
},
... ... @@ -290,7 +294,7 @@ export default {
} else {
this.$createToast({
txt: this.errorTip,
type: "txt"
type: 'txt'
}).show();
}
},
... ... @@ -301,7 +305,7 @@ export default {
showEarnestQuestion() {
// 跳转保证金说明页
console.log("showEarnest");
console.log('showEarnest');
this.$xianyu.goXianyuNewPage({ url: this.agreementURL });
},
... ... @@ -323,14 +327,14 @@ export default {
this.$createOrderPayType({
orderCode: result.data.orderCode,
price: parseFloat(`${earnestPrice}`).toFixed(2),
desc: "保证金",
desc: '保证金',
extra: JSON.stringify({
type: "sell",
type: 'sell',
back: {
name: "InSaleOrderList"
name: 'InSaleOrderList'
},
forward: {
name: "SellPayOk",
name: 'SellPayOk',
query: {
orderCode: result.data.orderCode
}
... ... @@ -339,9 +343,9 @@ export default {
onCloseAction() {
that.clearData();
that.$router.replace({
name: "sellOrderDetail",
name: 'sellOrderDetail',
params: {
owner: "sell",
owner: 'sell',
code: result.data.orderCode
}
});
... ... @@ -349,8 +353,8 @@ export default {
}).show();
} else {
this.$createToast({
txt: result.message || "调价失败",
type: "txt"
txt: result.message || '调价失败',
type: 'txt'
}).show();
}
... ... @@ -361,25 +365,26 @@ export default {
// console.log(this.$router);
this.platformFeeModalVisible = false;
this.platformFee = {
amount: "-¥0",
appraiseFee: "¥0.00",
packageFee: "¥0.00",
serviceFee: "¥0.00",
goodsPaymentRatePercent: "0.00%",
payChannelPercentage: "0.00%"
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
};
this.bankTransferFee = "-¥0";
this.income = "¥0";
this.errorTip = "";
this.chgPrice = "";
this.bankTransferFee = '-¥0';
this.income = '¥0';
this.errorTip = '';
this.chgPrice = '';
this.calced = false;
this.earnestMoney = "¥0";
this.earnestMoney = '¥0';
this.isAgree = false;
},
checkScroll(e) {
if (e.currentTarget.scrollTop > 0) {
this.isStopScrollPrevent = true;
} else {
e.stopPropagation();
this.isStopScrollPrevent = false;
}
}
... ...
... ... @@ -211,50 +211,6 @@ export default {
this.submit();
},
compute() {
if (
this.productDetail.bidPrice &&
Number(this.price) > 0 &&
Number(this.price) <= this.productDetail.bidPrice
) {
this.$createDialog({
type: "confirm",
title: `最高求购价${this.productDetail.bidPrice}`,
content: "已有求购高于您的出价,可直接变现",
confirmBtn: {
text: "我再想想",
active: true,
disabled: false
},
cancelBtn: {
text: "确定变现",
active: false,
disabled: false
},
onCancel: () => {
this.$store.commit(
"order/sellerAskOrder/SELLER_ASK_SET_PRODUCTINFO",
{
goodImg: this.productDetail.goodImg,
colorName: this.productDetail.colorName,
sizeName: this.productDetail.sizeName,
goodPrice: this.productDetail.bidPrice,
productId: this.productDetail.productId,
bid_moster_price: this.productDetail.bidPrice
}
);
// 跳转变现
this.$router.push({
name: "sellAskOrder",
query: {
skup: this.productDetail.bidSkup,
price: this.productDetail.bidPrice
}
});
}
}).show();
return;
}
return this.fetchOrderPrice({
address_id: this.address?.address_id,
... ... @@ -300,6 +256,56 @@ export default {
this[Types.CHANGE_AGREE](val);
},
submit() {
//低于变现价格强制出售
if (
this.productDetail.bidPrice &&
Number(this.price) > 0 &&
Number(this.price) <= this.productDetail.bidPrice
) {
this.$createDialog({
type: "confirm",
title: `最高求购价${this.productDetail.bidPrice}`,
content: "已有求购高于您的出价,可直接变现",
confirmBtn: {
text: "我再想想",
active: true,
disabled: false
},
cancelBtn: {
text: "确定变现",
active: false,
disabled: false
},
onConfirm: () => {
},
onCancel: () => {
this.$store.commit(
"order/sellerAskOrder/SELLER_ASK_SET_PRODUCTINFO",
{
goodImg: this.productDetail.goodImg,
colorName: this.productDetail.colorName,
sizeName: this.productDetail.sizeName,
goodPrice: this.productDetail.bidPrice,
productId: this.productDetail.productId,
bid_moster_price: this.productDetail.bidPrice
}
);
// 跳转变现
this.$router.push({
name: "sellAskOrder",
query: {
skup: this.productDetail.bidSkup,
price: this.productDetail.bidPrice
}
});
}
}).show();
return;
}
if (this.productDetail.isSuggest) {
if (Number(this.price) > this.productDetail.suggestHighPrice) {
this.$createDialog({
... ...
... ... @@ -425,12 +425,16 @@ export default {
}
.dot {
width: 10px;
height: 10px;
margin: 0 5px;
width: 8px;
height: 8px;
margin: 0 10px 2px;
border-radius: 50%;
&.active {
margin: 2px 10px 0;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #08304b;
}
}
... ... @@ -491,7 +495,7 @@ export default {
}
.info {
padding: 14px 40px;
padding: 46px 40px 10px;
&-price {
color: #d0021b;
... ... @@ -509,6 +513,7 @@ export default {
}
&-name {
margin-top: 14px;
font-size: 28px;
color: #999;
text-align: center;
... ...
... ... @@ -34,7 +34,7 @@ export default function() {
data.category.forEach((val, index) => {
if(val && val.sub){
val.index = index;
val.index = index + 1;
val.sub.forEach(item => {
if(item.linkType === 'h5'){
item.isShow = true;
... ... @@ -97,7 +97,6 @@ export default function() {
}
sub.push(subItem);
});
let category = [{
id: '0',
... ... @@ -105,6 +104,7 @@ export default function() {
type: 'brand',
linkType:'brand',
name:'全部品牌',
index: 0,
sub: sub,
}];
state.categorySubList = category;
... ...
... ... @@ -53,11 +53,6 @@ export default function() {
Vue.set(state.channelList, 'productlist', state.channelList.productlist.concat(productlist.product_list));
Vue.set(state.channelList, 'page', productlist.page);
},
addReport(state, {report}) {
console.log(state);
console.log(report);
console.log("++++++++");
},
},
actions: {
async fetchProductList({ commit, state }, obj) {
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-38",
"version": "0.0.1-beta-39",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...
... ... @@ -49,9 +49,7 @@ const getParams = (params, apiInfo) => {
}
return;
}
if (!assetType(paramItem, v.type)) {
throw Error(`${k} params is not ${getType(v.type)}`);
}
//
props[k] = paramItem;
});
}
... ...