Authored by TaoHuang

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

... ... @@ -8,7 +8,15 @@
export default {
name: 'LayoutLink',
props: {
href: String
href: String,
report: {
type: Object,
}
},
watch: {
'report': function(newVal) {
console.log(newVal);
}
},
methods: {
jumpTo() {
... ...
... ... @@ -165,6 +165,7 @@ export default {
.coupon-name {
font-size: 24px;
font-weight: bold;
color: #002b47;
margin-bottom: 10px;
}
... ...
... ... @@ -6,9 +6,9 @@
<div class="category-left-item-root"
v-for="(item, index) in categoryParent"
:key="index"
:class="{'category-left-item-select-flag' : item.isSelect }"
:data-id="item"
@click="onClick(item)">
<div :class="{'category-left-item-select-flag' : item.isSelect }"></div>
<p
class="category-left-item-title"
:class="{'category-left-item-select' : item.isSelect }">
... ... @@ -17,7 +17,6 @@
</div>
</Scroll>
</div>
<div class="left-right-split-line"></div>
<div class="right-content">
<Scroll>
<div v-for="(itemSub, index) in categorySubList" :key="index">
... ... @@ -35,8 +34,8 @@
:width="60"
:height="60"
/>
<p class="item-title">{{item.name}}</p>
</div>
<p class="item-title">{{item.name}}</p>
<LayoutLink v-if="item.isShow" class="item-a-div" :href="item.link"></LayoutLink>
</div>
</div>
... ... @@ -114,22 +113,19 @@ export default {
background-color: #FFFFFF;
}
.left-right-split-line {
height: 100%;
width: 2px;
background-color: #EEEEEE;
}
.left-content {
width: 30%;
width: 28%;
height: 100%;
border-right: 1px solid #EEEEEE;
flex-shrink: 0;
}
.right-content {
display: flex;
flex-direction: column;
width: 70%;
flex-grow: 1;
height: 100%;
margin: 0 20px;
}
.category-left-item-root {
... ... @@ -139,6 +135,7 @@ export default {
align-items: center;
height: 104px;
line-height: 104px;
position: relative;
}
.category-left-item-title {
... ... @@ -154,17 +151,19 @@ export default {
}
.category-left-item-select {
font-size: 48px;
font-size: 44px;
color: #000000;
}
.category-left-item-select-flag {
width: 9px;
.category-left-item-select-flag:before {
content: "";
width: 6px;
height: 48px;
margin-bottom: 10px;
margin-top: 10px;
position: absolute;
left: 0;
top: 50%;
margin-top: -24px;
background-color: #000000;
justify-self: flex-start;
}
.category-sub-root {
... ... @@ -182,21 +181,17 @@ export default {
.item-div {
position: relative;
display: flex;
flex: 0 0 33%;
height: 195px;
padding: 20px 0;
}
.item-imge-div {
height: 100%;
width: 100%;
height: 130px;
display: flex;
flex-direction: column;
justify-content: space-between;
position: absolute;
z-index: 1;
padding-top: 20px;
padding-bottom: 20px;
align-items: center;
justify-content: center;
position: relative;
}
.item-imge {
... ... @@ -213,7 +208,6 @@ export default {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
}
.item-a-div {
... ...
<template>
<LayoutApp :show-back="true" title="绑定支付宝">
<div class="body" ref="body">
<Scroll class="scroll-content">
<div class="account-form">
<p class="form-title">账号</p>
<div class="form-input-block">
... ... @@ -14,6 +15,7 @@
<div class="account-footer">
<CubeButton class="submit-btn" :disabled="canSubmit" @click="submitBind">提交</CubeButton>
</div>
</Scroll>
</div>
<myDialog :isShow="dialogShow" :data="{name,account}" @cancel-click="cancel" @confirm-click="confirm"></myDialog>
</LayoutApp>
... ... @@ -22,7 +24,7 @@
<script>
import { createNamespacedHelpers } from 'vuex';
import {Input, Button, Style} from 'cube-ui';
import {Input, Button, Scroll, Style} from 'cube-ui';
import myDialog from './components/bindModel';
const {mapState, mapActions} = createNamespacedHelpers('home/bindAccount');
export default {
... ... @@ -70,6 +72,7 @@ export default {
},
components: {
Style,
Scroll,
CubeInput: Input,
CubeButton: Button,
myDialog
... ... @@ -85,6 +88,9 @@ export default {
background-color: white;
padding: 0 40px;
}
/deep/ .cube-scroll-content {
height: 100%;
}
.account-form {
margin-top: 40px;
}
... ... @@ -117,8 +123,8 @@ export default {
.account-footer {
position: absolute;
padding: 28px 0;
left: 40px;
right: 40px;
left: 0;
right: 0;
bottom: 40px;
.submit-btn {
height: 88px;
... ...
... ... @@ -17,7 +17,7 @@
<input class="search-input" type="search" disabled="true" placeholder="搜索商品名称或货号"/>
</div>
<template v-for="(item, index) in channelList.list">
<Swiper @click="getParams" :list="item.data" :key="index" v-if="item.template_name == 'threePicture'"/>
<Swiper :list="item" :index="index" :key="index" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data" :key="index" v-if="item.template_name == 'image_list'"/>
<Banner :list="item.data" :key="index" v-if="item.template_name == 'single_image'"/>
<TwoBanner :list="item.data" :key="index" v-if="item.template_name == 'twoPicture'"/>
... ... @@ -56,6 +56,7 @@ export default {
props: ['hideHeader'],
data() {
return {
reportParams: {},
options: {
pullUpLoad: true,
// pullDownRefresh: true,
... ... @@ -73,7 +74,6 @@ export default {
listBaseParams: {
isHome: true,
},
productList: {
showErrorPage: false,
isFetching: false,
... ... @@ -118,13 +118,11 @@ export default {
if (!this.channelList.list || !this.channelList.list.length) {
this.fetchChannelList();
}
this.init();
},
async serverPrefetch() {
return this.fetchChannelList();
},
mounted() {
this.init();
},
methods: {
...mapActions(['fetchChannelList']),
...mapActionsList(['fetchProductList']),
... ... @@ -225,9 +223,26 @@ export default {
});
},
getParams() {
console.log("2222");
getParams(params) {
this.reportParams = params;
console.log(this.reportParams);
}
// getReportParams(item, index) {
// let { template_id, template_name } = item;
// let PAGE_URL = window.location.href;
// this.searchParams = {
// F_ID: template_id,
// PAGE_URL,
// F_INDEX: index + 1,
// F_NAME: template_name,
// I_INDEX: '',
// F_URL: '',
// }
// console.log(item);
// console.log(this.searchParams);
// }
// onPullingDown() {
// let params = this.searchParams;
... ...
<template>
<div v-if="list.length" class="swiper">
<div class="swiper" v-if="list.data && list.data.length > 0">
<div class="swiper-item swiper-item-left">
<LayoutLink :href="list[0].url" :report="reportParams" class="img-link">
<ImageFormat :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat>
<LayoutLink :href="list.data[0].url" class="img-link" :report="{...params, I_INDEX: 1, F_URL: list.data[0].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[0].src" :width="310" :height="402"></ImageFormat>
</LayoutLink>
</div>
<div class="swiper-item swiper-item-right">
<LayoutLink :href="list[1].url" class="img-link">
<ImageFormat :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat>
<LayoutLink :href="list.data[1].url" class="img-link" :report="{...params, I_INDEX: 2, F_URL: list.data[1].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[1].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
<LayoutLink :href="list[2].url" class="img-link">
<ImageFormat :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat>
<LayoutLink :href="list.data[2].url" class="img-link" :report="{...params, I_INDEX: 3, F_URL: list.data[2].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[2].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
</div>
</div>
... ... @@ -21,24 +21,37 @@ export default {
name: 'swiper',
props: {
list: {
type: Array,
default: []
type: Object,
},
index: {
type: Number,
}
},
data() {
return {
reportParams: {
P_NAME: 'XY_UFOHome',
P_PARAM: 'f788335b57b67c1711f255648c744dab',
PAGE_URL: '当前页面URL',
F_ID: '楼层唯一id',
F_NAME: '楼层名称',
F_INDEX: '楼层顺序号',
I_INDEX: '楼层内部顺序号,从1开始,所有more按钮传0',
ACTION_URL: '跳转URL',
},
params: {},
}
},
mounted() {
console.log(this.list)
},
activated() {
let { template_id, template_name } = this.list;
let PAGE_URL = window.location.href;
let F_INDEX = this.index + 1;
let params = {
P_NAME: 'XY_UFOHome',
P_PARAM: 'cfcd8de156d3edc26c84091804c43e23',
F_ID: template_id,
PAGE_URL,
F_INDEX,
F_NAME: template_name,
}
this.params = params;
},
methods: {
},
};
</script>
... ...
<template>
<LayoutApp>
<LayoutApp title="我的优惠券">
<div class="tab">
<div class="item right-line" :class="type ==='unused' ? 'item-selected' : 'item-default'"
@click="onChangeList('unused')">未使用{{unused.total && '('+ unused.total + ')' || null}}
... ... @@ -84,7 +84,8 @@ export default {
bounce: {
top: false
},
pullUpLoad: true
pullUpLoad: true,
pullDownRefresh: false
},
type: 'unused',
list: [],
... ... @@ -218,6 +219,7 @@ export default {
.item-price {
font-size: 72px;
font-weight: bold;
color: #002B47;
}
... ...
<template>
<LayoutApp :show-back="true" :title="title">
<LayoutApp :show-back="true" :title="title" class="favorite-wrapper">
<Scroll
ref="scrolllist"
:scroll-events="['scroll-end','scroll']"
:scroll-events="['scroll-end', 'scroll']"
@scroll-end="fetchList(isMore)"
v-if="favoriteProductList.list.length"
class="fav-scroll-bg"
... ... @@ -10,20 +10,20 @@
<ProductList :list="favoriteProductList.list"></ProductList>
</Scroll>
<!-- <empty-list v-show="!isShowEmpty" /> -->
<UfoNoItem :tip="`暂无数据`" v-else></UfoNoItem>
<UfoNoItem class="empty" :tip="`暂无数据`" v-else></UfoNoItem>
</LayoutApp>
</template>
<script>
import ProductList from '../../list/components/productList';
import ProductList from "../../list/components/productList";
import EmptyList from "../../order/order-list/components/empty";
import UfoNoItem from '../../../components/ufo-no-item'
import {Scroll} from 'cube-ui';
import {createNamespacedHelpers} from 'vuex';
import UfoNoItem from "../../../components/ufo-no-item";
import { Scroll } from "cube-ui";
import { createNamespacedHelpers } from "vuex";
const {mapState, mapActions} = createNamespacedHelpers('home/favorite');
const { mapState, mapActions } = createNamespacedHelpers("home/favorite");
export default {
name: 'list',
name: "list",
components: {
ProductList,
Scroll,
... ... @@ -34,22 +34,22 @@ export default {
return {
scrollToY: -200,
scrollToTime: 700,
scrollToEasing: 'bounce',
scrollToEasing: "bounce",
scrollToEasingOptions: [
{
text: 'bounce',
value: 'bounce'
text: "bounce",
value: "bounce"
},
{
text: 'swipe',
value: 'swipe'
text: "swipe",
value: "swipe"
},
{
text: 'swipeBounce',
value: 'swipeBounce'
text: "swipeBounce",
value: "swipeBounce"
}
],
title: '我的收藏',
title: "我的收藏",
scrollOptions: {
bounce: {
top: false
... ... @@ -62,39 +62,38 @@ export default {
// mounted() {
// this.fetchFavoriteList();
// },
activated(){
console.log('favorite====activated')
activated() {
console.log("favorite====activated");
let params = {
isReset: true,
isReset: true
};
this.fetchFavoriteList({isReset: true});
this.fetchFavoriteList({ isReset: true });
// this.scrollToTop();
},
methods: {
...mapActions(['fetchFavoriteList']),
...mapActions(["fetchFavoriteList"]),
scrollToTop() {
// let height = this.$refs.scroll.scrollHeight
console.log(this.$refs)
console.log(this.$refs.scrolllist)
console.log(this.$refs);
console.log(this.$refs.scrolllist);
this.$refs.scroll.scrollTo(
0,
this.scrollToY,
this.scrollToTime,
ease[this.scrollToEasing]
)
);
},
async fetchList(isMore) {
if(this.isMore){
if (this.isMore) {
let params = {
isReset: false,
isReset: false
};
await this.fetchFavoriteList({isReset: false});
await this.fetchFavoriteList({ isReset: false });
}
}
},
// scroll({ y }) {
// const height = this.$refs.banner.$el.offsetHeight + this.$refs.header.offsetHeight;
... ... @@ -107,13 +106,25 @@ export default {
},
computed: {
...mapState(['favoriteProductList','isMore']),
},
...mapState(["favoriteProductList", "isMore"])
}
};
</script>
<style scoped>
.fav-scroll-bg {
background-color: #f5f5f5;
<style lang="scss" scoped>
.favorite-wrapper {
/deep/ .layout-context {
display: flex;
flex-direction: column;
}
.empty {
flex: 1;
}
}
.fav-scroll-bg {
background-color: #f5f5f5;
}
</style>
... ...
... ... @@ -4,7 +4,7 @@
<Scroll>
<div v-for="(value, key) in getMineList" :key="key">
<tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey>
<niticelScroll></niticelScroll>
<noticeScroll></noticeScroll>
</tab-item>
<template v-else-if="key === 'resource1' || key === 'resource2'">
<div v-if="value.data.template_name ==='single_image'" class="marg">
... ... @@ -70,7 +70,7 @@ export default {
components: {
tabItem,
order,
niticelScroll: scroll,
noticeScroll: scroll,
singleImage,
bind,
Style,
... ...
... ... @@ -36,6 +36,7 @@ export default {
.news-list-title {
margin-top: 60px;
font-size: 40px;
font-weight: bold;
color: #000000;
}
.news-list-content {
... ...
... ... @@ -55,9 +55,11 @@ export default {
watch: {
"incomeData.list": function(val) {
if(val.length === 0) {
this.$refs.scroll.disable()
this.options.pullUpLoad.txt.noMore = ''
// this.$refs.scroll.disable()
} else {
this.$refs.scroll.enable()
this.options.pullUpLoad.txt.noMore = '到底啦~'
// this.$refs.scroll.enable()
}
}
},
... ...
<template>
<div class="bg">
<div class="item" v-if="list.length" v-for="(product,index) in list" @click="goDetail(product)"
<div class="product-list-item" v-if="list.length" v-for="(product,index) in list" @click="goDetail(product, index)"
:key="index" :class="(index) % 2 === 0 && 'magrin-right'">
<div class="item-top">
<div class="item-price">
... ... @@ -21,15 +21,87 @@ import ImgSize from '../../../components/img-size';
export default {
props: {
list: Array,
param: Object,
},
data: function() {
return {
yasFirstId: 0,
};
},
methods: {
goDetail(product) {
goDetail(product, index) {
this.yasDetail(product.id,index);
this.$router.push({
name: 'ProductDetail',
params: {
productId: product.id,
}
});
},
yasShowEvent(height) {
// 获取列表单个元素高度
let index = 0;
if (height) {
// 获取第一个曝光元素
let item = document.querySelector('.product-list-item');
let itemHeight = item.offsetHeight;
let row = parseInt((height - 12) / itemHeight) + 1;
index = row * 2 - 2;
}
// 获取曝光列表
let list = [];
for (let i = 0; i < 6; i++) {
if (this.list[i + index]) {
list.push(this.list[i + index]);
}
}
// 判断是否是重复曝光
if (list.length && list[0].id !== this.yasFirstId) {
this.yasFirstId = list[0].id;
// 1.P_NAME:页面名称,XY_UFOSearchList,XY_UFOSeriesList,XY_UFOBrandList、XY_UFOProductPoolList等;
// 2.TYPE_ID:列表页入口类型,1-搜索结果页,2-系列,3-品牌,4-商品池;
// 3.P_PARAM:页面参数,搜索关键词,系列ID,品牌ID,商品池ID;
// 4.TAB_ID:tab切id,1-人气,2-价格,3-新品;
// 5.TAB_NAME:tab切名称,人气,价格,新品;
// 6.I_INDEX:曝光顺序;
// 7.PRD_ID:商品id;
let DATA = [];
list.map((value, i) => {
DATA.push({...this.param, I_INDEX: i + index, PRD_ID: value.id});
});
console.log(DATA)
this.$store.dispatch('reportYas', {
params: {
param: {DATA},
appop: 'XY_UFO_SHOW_EVENT'
}
});
}
},
yasDetail(id, index) {
// XY_UFO_PRD_LIST_C
// 1.P_NAME:页面名称,XY_UFOSearchList,XY_UFOSeriesList,XY_UFOBrandList、XY_UFOProductPoolList等;
// 2.TYPE_ID:列表页入口类型,1-搜索结果页,2-系列,3-品牌,4-商品池;
// 3.P_PARAM:页面参数,搜索关键词,系列ID,品牌ID,商品池ID;
// 4.TAB_ID:tab切id,1-人气,2-价格,3-新品;
// 5.TAB_NAME:tab切名称,人气,价格,新品;
// 6.I_INDEX:商品顺序号,从1开始递增;
// 7.PRD_ID:商品id
console.log({...this.param, I_INDEX: index, PRD_ID: id })
this.$store.dispatch('reportYas', {
params: {
param: {...this.param, I_INDEX: index, PRD_ID: id },
appop: 'XY_UFO_SHOW_EVENT'
}
});
}
},
components: {
... ... @@ -44,7 +116,7 @@ export default {
margin-right: 14px;
}
.item {
.product-list-item {
border-radius: 16px;
width: 344px;
padding: 24px;
... ...
... ... @@ -169,7 +169,6 @@ export default {
for (let key in filter) {
filterParams[key] = filter[key];
}
console.log(filterParams);
this.filterParams = filterParams;
}
},
... ...
... ... @@ -19,12 +19,14 @@
</div>
</div>
<Scroll ref="scroll" class="product-list" v-show="!productList.isEmpty"
:scroll-events="['scroll-end']"
:options="scrollOptions"
:data="productList.list"
@scroll-end="scrollHandler"
@pulling-up="onPullingUp">
<ProductList :list="productList.list"></ProductList>
<ProductList ref="product" :list="productList.list" :param="yasParams"></ProductList>
</Scroll>
<EmptyList class="empty-wrapper product-list" :tip="`暂无数据`" v-show="productList.isEmpty" >
<EmptyList class="empty-wrapper product-list" :tip="`暂无数据`" v-show="productList.isEmpty">
</EmptyList>
</LayoutApp>
<Filtrate ref="filtrate"></Filtrate>
... ... @@ -48,19 +50,21 @@ export default {
Filtrate,
EmptyList
},
data() {
data: function () {
return {
scrollOptions: {
bounce: {
top: false
},
pullUpLoad: true
pullUpLoad: true,
pullDownRefresh: false
},
fixed: false,
selectedType: 2, // tab类型高亮
priceDesc: true,
arrowImage: '',
title: '',
yasParams: {P_NAME: 'XY_UFOSearchList', TYPE_ID: 1},
productList: {
showErrorPage: false,
isFetching: false,
... ... @@ -98,6 +102,7 @@ export default {
this.changeArrow();
let params = {...this.$route.query};
this.setYasParam({param: params, tab: {index: 1, name: '人气'}});
if (params.title) {
this.title = params.title;
delete params.title;
... ... @@ -120,6 +125,12 @@ export default {
await this.fetchList();
},
scrollHandler({y}) {
let height = -y;
this.$refs.product.yasShowEvent(height);
},
// 查询商品列表
fetchList: async function(params) {
let searchParams = this.searchParams;
... ... @@ -190,18 +201,21 @@ export default {
this.selectedType = flag;
if (flag === 1) {
this.setYasParam({tab: {index: 2, name: '价格'}});
this.priceDesc = !this.priceDesc;
params.order = this.priceDesc ? 'p_desc' : 'p_asc';
params.order = this.priceDesc ? 'availableNowPrice:asc' : 'availableNowPrice:desc';
} else if (flag === 2) {
this.setYasParam({tab: {index: 1, name: '人气'}});
this.priceDesc = true;
params.order = 'sale_desc';
} else if (flag === 3) {
this.setYasParam({tab: {index: 3, name: '新品'}});
this.priceDesc = true;
params.order = 'st_desc';
}
params.isReset = true;
this.fetchList(params);
this.$refs.scroll.scrollTo(0, 0, 300)
this.$refs.scroll.scrollTo(0, 0, 300);
this.changeArrow();
},
goSearch() {
... ... @@ -215,8 +229,44 @@ export default {
},
goFilter() {
this.$refs.filtrate.show();
},
setYasParam: function({param, tab}) {
if (param && typeof param === 'object' && Object.keys(param).length) {
let P_NAME = 'XY_UFOSearchList', TYPE_ID = 1;
for (let key in param) {
if (key === 'brand' && param[key] && param.type !== 6) {
P_NAME = 'XY_UFOBrandList';
TYPE_ID = 3;
}
if (key === 'series' && param[key] && param.type !== 6) {
P_NAME = 'XY_UFOSeriesList';
TYPE_ID = 2;
}
if (key === 'productPool' && param[key] && param.type !== 6) {
P_NAME = 'XY_UFOProductPoolList';
TYPE_ID = 4;
}
if (!param[key]) {
delete param[key];
}
}
Object.assign(this.yasParams, {
P_NAME,
P_PARAM: JSON.stringify(param),
TYPE_ID,
TAB_ID: this.tabIndex || '',
TAB_NAME: this.tabName || ''
});
}
if(tab && typeof tab === 'object' && Object.keys(tab).length) {
this.yasParams.TAB_ID = tab.index;
this.yasParams.TAB_NAME = tab.name;
}
},
}
};
</script>
... ...
<!--买家求购确认页-->
<template>
<LayoutApp :show-back="true" title="出价求购">
<Scroll :options="options">
<div class="body" ref="body">
<div class="topContainer">
<!--<div class="topView">-->
<!--<div class="title"></div>-->
... ... @@ -73,6 +75,7 @@
<div class="line"></div>
</div>
</div>
<div class="bottomContainer">
<OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
... ... @@ -80,12 +83,13 @@
<YohoButton class="submit-btn" :txt="submitText" :disable="!isAgreeTerms" @click="submitClick"></YohoButton>
</div>
</div>
</Scroll>
</LayoutApp>
</template>
<script>
import {Input, Button} from 'cube-ui';
import {Input, Button, Scroll} from 'cube-ui';
import OrderAddress from './components/confirm/address';
import DayChoose from './components/askorder/day-choose';
import OrderAgree from './components/confirm/agree';
... ... @@ -103,6 +107,7 @@ export default {
Input,
OrderAddress,
Button,
Scroll,
},
data() {
return {
... ... @@ -111,6 +116,7 @@ export default {
url: 'https://activity.yoho.cn/feature/6775.html?share_id=9481&title=%E9%97%B2%E9%B1%BC%E4%B9%B0%E5%AE%B6%E5%8D%8F%E8%AE%AE',
agreeDesc: '有货买家协议',
submitText: '提交',
options: {pullDownRefresh: false}
};
},
... ...
... ... @@ -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.bidType && (order.statuStr == '求购中' || 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>
... ...
... ... @@ -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,
... ...
... ... @@ -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,35 +144,35 @@ 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
};
},
asyncData({ store, router }) {
return store.dispatch("order/priceChange/fetchOrder", {
return store.dispatch('order/priceChange/fetchOrder', {
orderCode: router.params.orderCode
});
},
... ... @@ -181,7 +181,7 @@ export default {
// this.inputChange = debounce(this.onChange.bind(this), 500);
},
computed: {
...mapState(["noEntryOrderInfo"]),
...mapState(['noEntryOrderInfo']),
goodsInfo() {
return this.noEntryOrderInfo.goodsInfo || {};
},
... ... @@ -193,37 +193,37 @@ 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;
}
},
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);
... ... @@ -233,15 +233,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
},
... ... @@ -264,11 +264,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) {
... ... @@ -278,7 +278,7 @@ export default {
this.$createToast({
txt: this.errorTip,
type: "txt"
type: 'txt'
}).show();
}
},
... ... @@ -289,7 +289,7 @@ export default {
} else {
this.$createToast({
txt: this.errorTip,
type: "txt"
type: 'txt'
}).show();
}
},
... ... @@ -300,7 +300,7 @@ export default {
showEarnestQuestion() {
// 跳转保证金说明页
console.log("showEarnest");
console.log('showEarnest');
this.$xianyu.goXianyuNewPage({ url: this.agreementURL });
},
... ... @@ -322,14 +322,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
}
... ... @@ -338,9 +338,9 @@ export default {
onCloseAction() {
that.clearData();
that.$router.replace({
name: "sellOrderDetail",
name: 'sellOrderDetail',
params: {
owner: "sell",
owner: 'sell',
code: result.data.orderCode
}
});
... ... @@ -348,8 +348,8 @@ export default {
}).show();
} else {
this.$createToast({
txt: result.message || "调价失败",
type: "txt"
txt: result.message || '调价失败',
type: 'txt'
}).show();
}
... ... @@ -357,29 +357,29 @@ export default {
},
clearData() {
// 清空数据状态
console.log(this.$router);
// 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;
}
}
};
</script>
<style lang="scss" scoped>
<style lang='scss' scoped>
.order-page {
position: absolute;
left: 0;
... ...
<!--卖家求购变现-->
<template>
<LayoutApp :show-back="true" title="变现">
<Scroll :options="options">
<div class="body">
<!--<TitleComp txt="变现"></TitleComp>-->
<ProductInfo :data="originProductData" class="product-info" :priceType="'现货最高求购价:'"></ProductInfo>
<div class="inputView">
<span class="inputViewIcon">
... ... @@ -13,13 +15,16 @@
<OrderMargin class="order-item order-margin" :data="computeTip" :url="url" :superSell="isEntry" ></OrderMargin>
<OrderFee class="order-item" :data="computeTip"></OrderFee>
<AddressInfo :data="addressInfo" class="order-item"></AddressInfo>
</div>
</Scroll>
<div class="footer">
<OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
<div class="btn-wrapper">
<YohoButton :txt="submitText"class="submit-btn" :disable="!isAgreeTerms" @click="submitClick"></YohoButton>
</div>
</div>
</LayoutApp>
</template>
... ... @@ -64,6 +69,7 @@ export default {
url: 'http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3187.html?title=卖家协议\"}}',
isEntry: false,
submitText: '提交',
options: {pullDownRefresh: false},
};
},
... ...
... ... @@ -66,7 +66,7 @@ export default {
}
span {
font-size: 0.8em;
font-size: 0.7em;
line-height: 1.4;
border: 1px solid #f00;;
color: #f00;
... ... @@ -91,7 +91,7 @@ export default {
.sub {
color: #999;
font-size: 0.8em;
font-size: 22px;
}
}
</style>
... ...
... ... @@ -113,7 +113,7 @@ module.exports = {
'/api/ufo/coupon/list': {
ufo: true,
auth: true,
path: '/ufo-gateway/coupon',
path: 'coupon',
api: 'ufo.coupons.list',
param: {}
},
... ...
... ... @@ -4,4 +4,14 @@ module.exports = [
cacheTime: 60,
cache: true,
},
{
route: /xianyu\/index/,
cacheTime: 60,
cache: true,
},
{
route: /xianyu\/index\/category/,
cacheTime: 30,
cache: true,
},
];
... ...