Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
Tao
5 years ago
Commit
734e04a1fc6091ab88bc5c73ee64c655484ce843
2 parents
fbad6ab0
42bf9a7b
add channel
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
681 additions
and
318 deletions
apps/components/layout/layout-app.vue
apps/entry-client.js
apps/pages/category/category.vue
apps/pages/category/index.js
apps/pages/home/channel/channel.vue
apps/pages/home/index.js
apps/pages/home/indexPage/components/tabs.vue
apps/pages/home/indexPage/components/widget.vue
apps/pages/home/indexPage/index-page.vue
apps/pages/home/mine/mine.vue
apps/pages/home/news/news.vue
apps/pages/order/buy-pay-ok.vue
apps/pages/order/buyer-confirm.vue
apps/pages/order/order-list/in-sell-order-list.vue
apps/pages/order/order-list/order-list.vue
apps/pages/order/pay.vue
apps/pages/order/price-change/no-entry-detail.vue
apps/pages/order/sell-pay-ok.vue
apps/pages/order/seller-confirm.vue
apps/pages/product/components/size-list.vue
apps/pages/product/components/size-select-sheet.vue
apps/pages/product/product-detail.vue
apps/store/address/address/actions.js
apps/store/order/price-change/actions.js
apps/components/layout/layout-app.vue
View file @
734e04a
<template>
<div class="layout">
<slot name="header">
<LayoutHeader
<LayoutHeader
v-if="!hideHeader"
class="layout-header"
:title="title"
:opacity="opacity"
...
...
@@ -17,7 +17,7 @@
<script>
export default {
name:
"LayoutApp"
,
name:
'LayoutApp'
,
props: {
title: String,
opacity: {
...
...
@@ -31,6 +31,10 @@ export default {
showBack: {
type: Boolean,
default: true
},
hideHeader: {
type: Boolean,
default: false
}
}
};
...
...
apps/entry-client.js
View file @
734e04a
...
...
@@ -45,6 +45,8 @@ Vue.use(OrderCouponList);
Vue
.
use
(
OrderPromotionList
);
Vue
.
use
(
Bind
);
initClient
(
store
);
yoho
.
auth
=
async
loginUrl
=>
{
let
user
=
await
sdk
.
getUser
();
...
...
apps/pages/category/category.vue
View file @
734e04a
<template>
<LayoutApp :show-back="true">
<LayoutApp :show-back="true"
:hideHeader="hideHeader"
>
<div class="root-content">
<div class="left-content">
<Scroll>
<div class="category-left-item-root"
v-for="(item, index) in categoryParent"
:key="index"
:data-id="item"
@click="onClick(item)">
v-for="(item, index) in categoryParent"
:key="index"
: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 }" >
<p
class="category-left-item-title"
:class="{'category-left-item-select' : item.isSelect }">
{{item.name}}
</p>
</div>
...
...
@@ -24,16 +24,16 @@
<p class="sub-title">——— {{itemSub.name}} ———</p>
<div class="category-sub-root">
<div class="item-div"
v-for="(item, index) in itemSub.sub"
:key="index"
:data-id="item.id"
v-for="(item, index) in itemSub.sub"
:key="index"
:data-id="item.id"
>
<div class="item-imge-div" @click="goProductList(item)">
<ImgSize
class="item-imge"
:src="item.image"
:width="60"
:height="60"
class="item-imge"
:src="item.image"
:width="60"
:height="60"
/>
<p class="item-title">{{item.name}}</p>
</div>
...
...
@@ -48,22 +48,21 @@
</LayoutApp>
</template>
<script>
import { Scroll }from 'cube-ui'
import {createNamespacedHelpers} from 'vuex';
import { Scroll } from 'cube-ui';
import { createNamespacedHelpers } from 'vuex';
import Vue from 'vue';
import ImgSize from '../../components/img-size';
const {
mapState, mapActions
} = createNamespacedHelpers('category');
const {
mapState, mapActions
} = createNamespacedHelpers('category');
export default {
name: 'category',
props: ['hideHeader'],
components: {
Scroll,
ImgSize
},
data() {
return {
};
return {};
},
mounted() {
this.fetchCategoryParentList();
...
...
@@ -71,135 +70,150 @@ export default {
},
methods: {
...mapActions(['fetchCategoryParentList', 'selectCategoryParent', 'fetchBrandList', 'fetchCategorySubList']),
onClick(item){
if(!item.isSelect){
let id = item.id;
if(id === "-1"){
this.fetchBrandList({id});
}else {
this.fetchCategorySubList({id})
}
onClick(item) {
if (!item.isSelect) {
let id = item.id;
if (id === '-1') {
this.fetchBrandList({ id });
} else {
this.fetchCategorySubList({ id });
}
}
},
goProductList(item) {
let key = item.linkType;
let value = item.id;
this.$router.push({
name: "List",
let key = item.linkType;
let value = item.id;
this.$router.push({
name: 'List',
params: {
key
: value
key
: value
},
});
}
},
computed: {
...mapState(['categoryParent','categorySubList']),
...mapState(['categoryParent',
'categorySubList']),
},
};
</script>
<style>
.root-content{
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
background-color: #FFFFFF;
}
.left-right-split-line{
height: 100%;
width: 2px;
background-color: #EEEEEE;
}
.left-content{
width: 25%;
height: 100%;
}
.right-content{
display: flex;
flex-direction: column;
width: 75%;
height: 100%;
}
.category-left-item-root{
display: flex;
flex-direction: row;
width: 100%;
align-items: center;
margin-top: 28px;
margin-bottom: 28px;
}
.category-left-item-title{
color: #999999;
font-size: 30px;
width: 100%;
text-align: center;
}
.category-left-item-select{
font-size: 48px;
color: #000000;
.root-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
background-color: #FFFFFF;
}
.left-right-split-line {
height: 100%;
width: 2px;
background-color: #EEEEEE;
}
.left-content {
width: 25%;
height: 100%;
}
.right-content {
display: flex;
flex-direction: column;
width: 75%;
height: 100%;
}
.category-left-item-root {
display: flex;
flex-direction: row;
width: 100%;
align-items: center;
margin-top: 28px;
margin-bottom: 28px;
}
.category-left-item-title {
color: #999999;
font-size: 30px;
width: 100%;
text-align: center;
}
.category-left-item-select {
font-size: 48px;
color: #000000;
}
.category-left-item-select-flag {
width: 9px;
height: 48px;
margin-bottom: 10px;
margin-top: 10px;
background-color: #000000;
align-self: flex-start;
justify-self: flex-start;
width: 9px;
height: 48px;
margin-bottom: 10px;
margin-top: 10px;
background-color: #000000;
align-self: flex-start;
justify-self: flex-start;
}
.category-sub-root {
display: flex;
flex-flow: row wrap;
align-content: flex-start;
display: flex;
flex-flow: row wrap;
align-content: flex-start;
}
.sub-title{
font-size: 24px;
color: #000;
text-align: center;
.sub-title {
font-size: 24px;
color: #000;
text-align: center;
}
.item-div {
position: relative;
display: flex;
flex: 0 0 33%;
height: 195px;
}
.item-imge-div {
position: relative;
display: flex;
flex: 0 0 33%;
height: 195px;
}
.item-imge-div {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
position:absolute;
position:
absolute;
z-index: 1;
padding-top: 20px;
padding-bottom: 20px;
}
.item-imge {
object-fit: contain;
}
.item-title{
font-family: 'SFProText-Regular';
font-size: 22px;
color: #000000;
text-align: center;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
}
.item-a-div{
position:absolute;
}
.item-imge {
object-fit: contain;
}
.item-title {
font-family: 'SFProText-Regular';
font-size: 22px;
color: #000000;
text-align: center;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
}
.item-a-div {
position: absolute;
width: 100%;
height: 100%;
z-index: 99;
}
}
</style>
\ No newline at end of file
</style>
...
...
apps/pages/category/index.js
View file @
734e04a
export
default
[
{
name
:
'category'
,
path
:
'/xianyu/category'
,
component
:
()
=>
import
(
/* webpackChunkName: "notice" */
'./category'
)
}
];
\ No newline at end of file
{
name
:
'category'
,
path
:
'/xianyu/category'
,
component
:
()
=>
import
(
/* webpackChunkName: "notice" */
'./category'
)
}
];
...
...
apps/pages/home/channel/channel.vue
View file @
734e04a
<template>
<LayoutApp :show-back="true">
<div class="scroll-list-wrap">
<template v-if="!isShow">
<div v-for="(item, index) in channelList.list" v-if="item.template_name == 'guessLike'">
<ScrollNav :list="item.data.list" :cur="cur"></ScrollNav>
</div>
</template>
<Scroll
ref="scroll"
:scroll-events="scrollEvents"
@scroll="scrollHandler"
:options="options"
@pulling-up="onPullingUp"
:data="productList.list">
<div class="body" ref="body">
<div class="channel-top"></div>
<div class="marginTop">
<div v-for="(item, index) in channelList.list" :key="index" class="space-between">
<Swiper :list="item.data" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data.list" v-if="item.template_name == 'image_list'" />
<Banner :list="item.data" v-if="item.template_name == 'single_image'" />
<TwoBanner :list="item.data" v-if="item.template_name == 'twoPicture'" />
<template v-if="!isShow">
<div ref="sss" v-if="item.template_name == 'guessLike'">
<ScrollNav :list="item.data.list" :cur="cur" @transfer="getIndex"></ScrollNav>
</div>
</template>
</div>
</div>
<div :style="{minHeight: total + 'px'}">
<ProductList :list="productList.list" v-if="productList.list.length > 0" class="bgColor"></ProductList>
<UfoNoItem :tip="`暂无数据`" v-else></UfoNoItem>
<LayoutApp :show-back="true" :hide-header="hideHeader">
<div class="scroll-list-wrap">
<template v-if="!isShow">
<div v-for="(item, index) in channelList.list" v-if="item.template_name == 'guessLike'">
<ScrollNav :list="item.data.list" :cur="cur"></ScrollNav>
</div>
</template>
<Scroll
ref="scroll"
:scroll-events="scrollEvents"
@scroll="scrollHandler"
:options="options"
@pulling-up="onPullingUp"
:data="productList.list">
<div class="body" ref="body">
<div class="channel-top"></div>
<div class="marginTop">
<div v-for="(item, index) in channelList.list" :key="index" class="space-between">
<Swiper :list="item.data" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data.list" v-if="item.template_name == 'image_list'"/>
<Banner :list="item.data" v-if="item.template_name == 'single_image'"/>
<TwoBanner :list="item.data" v-if="item.template_name == 'twoPicture'"/>
<template v-if="!isShow">
<div ref="sss" v-if="item.template_name == 'guessLike'">
<ScrollNav :list="item.data.list" :cur="cur" @transfer="getIndex"></ScrollNav>
</div>
</template>
</div>
</div>
</Scroll>
</div>
<div :style="{minHeight: total + 'px'}">
<ProductList :list="productList.list" v-if="productList.list.length > 0" class="bgColor"></ProductList>
<UfoNoItem :tip="`暂无数据`" v-else></UfoNoItem>
</div>
</div>
</Scroll>
</div>
</LayoutApp>
</template>
<script>
import { Style, Scroll, Sticky } from 'cube-ui'
import { Style, Scroll, Sticky } from 'cube-ui'
;
import { createNamespacedHelpers } from 'vuex';
import Swiper from './components/swiper';
import Banner from './components/banner';
...
...
@@ -54,6 +54,7 @@ const { mapState, mapActions } = createNamespacedHelpers('home/channel');
const { mapState: mapStateList, mapActions: mapActionsList } = createNamespacedHelpers('list');
export default {
props: ['hideHeader'],
data() {
return {
options: {
...
...
@@ -70,7 +71,7 @@ export default {
total: 0,
marginTop: 0,
cur: 0,
}
}
;
},
computed: {
...mapState(['channelList']),
...
...
@@ -81,17 +82,16 @@ export default {
isPage: true,
isHome: true,
}
this.fetchChannelList().then((res)
=>
{
this.fetchChannelList().then((res)
=>
{
let windowH = document.documentElement.clientHeight || document.body.clientHeight;
this.navTop = this.$refs.sss[0].offsetTop;
this.navHeight = this.$refs.sss[0].offsetHeight;
this.total = windowH - this.navHeight;
});
this.fetchProductList(params);
},
created() {
},
methods: {
getIndex(index) {
...
...
@@ -100,7 +100,7 @@ export default {
},
scrollHandler({ y }) {
let scrollY = Math.abs(parseInt(y));
if(scrollY >= this.navTop) {
if
(scrollY >= this.navTop) {
this.isShow = true;
this.marginTop = 0;
} else {
...
...
@@ -115,9 +115,9 @@ export default {
const params = {
isReset: false,
isHome: true,
}
}
;
await this.fetchProductList(params);
this.$refs.scroll.forceUpdate()
this.$refs.scroll.forceUpdate()
;
}
},
components: {
...
...
@@ -143,9 +143,11 @@ export default {
height: 310px;
background: #08304B;
}
.marginTop {
margin-top: -150px;
}
.scroll-app {
position: absolute;
top: 0;
...
...
@@ -162,27 +164,33 @@ export default {
-webkit-flex-direction: column;
flex-direction: column;
}
.scroll-flex {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
overflow: hidden;
position: relative;
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
overflow: hidden;
position: relative;
}
.scroll-list-wrap {
height: 100%;
width: 100%;
}
.body {
height: 100%;
overflow-y: auto;
}
.space-between {
padding: 0 20px;
}
.bgColor {
background: #f5f5f5;
}
.navFixed {
width: 100%;
position: fixed;
...
...
apps/pages/home/index.js
View file @
734e04a
...
...
@@ -3,8 +3,78 @@ import Trade from './tradeIncome';
import
Favorite
from
'./favorite'
;
import
news
from
'./news'
;
import
Income
from
'./income'
;
export
default
[
{
name
:
'IndexPage'
,
path
:
'/xianyu/index'
,
component
:
()
=>
import
(
/* webpackChunkName: "index" */
'./indexPage/index-page'
),
redirect
:
{
name
:
'ChannelPage'
},
props
:
(
route
)
=>
{
switch
(
route
.
name
)
{
case
'ChannelPage'
:
{
return
{
tabIndex
:
0
};
}
case
'CategoryPage'
:
{
return
{
tabIndex
:
1
};
}
case
'NewsPage'
:
{
return
{
tabIndex
:
2
};
}
case
'MinePage'
:
{
return
{
tabIndex
:
3
};
}
default
:
{
return
{
tabIndex
:
0
};
}
}
},
children
:
[
{
name
:
'ChannelPage'
,
path
:
'channel'
,
component
:
()
=>
import
(
/* webpackChunkName: "index" */
'./channel/channel'
),
props
:
()
=>
({
hideHeader
:
true
,
}),
},
{
name
:
'CategoryPage'
,
path
:
'category'
,
component
:
()
=>
import
(
/* webpackChunkName: "index" */
'../category/category'
),
props
:
()
=>
({
hideHeader
:
true
,
}),
},
{
name
:
'NewsPage'
,
path
:
'news'
,
component
:
()
=>
import
(
/* webpackChunkName: "index" */
'./news/news'
),
props
:
()
=>
({
hideHeader
:
true
,
}),
},
{
name
:
'MinePage'
,
path
:
'mine'
,
component
:
()
=>
import
(
/* webpackChunkName: "index" */
'./mine/mine'
),
props
:
()
=>
({
hideHeader
:
true
,
}),
},
]
},
{
name
:
'channel'
,
path
:
'/xianyu/channel'
,
component
:
()
=>
import
(
/* webpackChunkName: "channel" */
'./channel/channel'
)
...
...
apps/pages/home/indexPage/components/tabs.vue
0 → 100644
View file @
734e04a
<template>
<div class="tabs-wrapper">
<Widget classes="iconhome" :class="active(0)" :index="0" desc="首页" @click="onClick"></Widget>
<Widget classes="iconcategoary" :class="active(1)" :index="1" desc="分类" @click="onClick"></Widget>
<Widget classes="iconmessage" :class="active(2)" :index="2" desc="消息" @click="onClick"></Widget>
<Widget classes="iconuser" :class="active(3)" :index="3" desc="我的" @click="onClick"></Widget>
</div>
</template>
<script>
import Widget from './widget';
export default {
name: 'IndexTab',
props: {
value: {
type: Number,
default: 0
}
},
components: {
Widget
},
computed: {
active() {
return (i) => {
return {
active: this.value === i
};
};
}
},
methods: {
onClick(index) {
this.$emit('click', index);
}
}
};
</script>
<style lang="scss" scoped>
.tabs-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 46px;
}
.active {
color: #08304b !important;
}
</style>
...
...
apps/pages/home/indexPage/components/widget.vue
0 → 100644
View file @
734e04a
<template>
<div class="widget" @click="onClick">
<i class="iconfont icon-class" :class="classes"></i>
<div class="desc">{{desc}}</div>
</div>
</template>
<script>
export default {
name: 'Widget',
props: {
classes: {
type: [Object, String],
default() {
return {
iconhome: true
};
}
},
desc: {
type: String,
default: '首页'
},
index: {
type: Number,
default: 0
}
},
data() {
return {};
},
computed: {
},
methods: {
onClick() {
this.$emit('click', this.index);
}
}
};
</script>
<style lang="scss" scoped>
.widget {
width: 98px;
height: 98px;
display: flex;
font-size: 0;
flex-direction: column;
align-items: center;
color: #8c8c8c;
}
.icon-class {
font-size: 50px;
margin-top: 5px;
}
.desc {
font-size: 20px;
margin-top: -10px;
}
</style>
...
...
apps/pages/home/indexPage/index-page.vue
0 → 100644
View file @
734e04a
<template>
<LayoutApp :show-back="false" title="球鞋">
<div class="body">
<div class="content">
<router-view></router-view>
</div>
<div class="footer">
<Tabs :value="tabIndex" @click="onClick"></Tabs>
</div>
</div>
</LayoutApp>
</template>
<script>
import Tabs from './components/tabs';
export default {
name: 'IndexPage',
props: ['tabIndex'],
components: {
Tabs
},
methods: {
onClick(index) {
switch (index) {
case 0: {
this.go('ChannelPage');
break;
}
case 1: {
this.go('CategoryPage');
break;
}
case 2: {
this.go('NewsPage');
break;
}
case 3: {
this.go('MinePage');
break;
}
default: {
this.go('ChannelPage');
}
}
},
go(name) {
this.$router.replace({
name
});
}
}
};
</script>
<style lang="scss" scoped>
* {
transition: none !important;
transform: none !important;
}
.body {
display: flex;
flex-direction: column;
height: 100%;
}
.content {
flex: 1;
overflow: hidden;
background-color: white;
position: relative;
}
.footer {
border-top: 1px solid #eee;
height: 100px;
width: 100%;
background-color: white;
}
</style>
...
...
apps/pages/home/mine/mine.vue
View file @
734e04a
<template>
<LayoutApp :show-back="true" title="我的">
<LayoutApp :show-back="true" title="我的"
:hideHeader="hideHeader"
>
<div class="body" ref="body">
<div v-for="(value, key) in getMineList" :key="key">
<tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey>
...
...
@@ -7,14 +7,14 @@
</tab-item>
<template v-else-if="key === 'resource1' || key === 'resource2'">
<div v-if="value.data.template_name ==='single_image'">
<singleImage
:data="value.data.data[0]"></singleImage>
<singleImage :data="value.data.data[0]"></singleImage>
</div>
</template>
<div v-else-if="key === 'order'" class="bg-bottom">
<order></order>
</div>
<div v-else-if="key === 'sale'" class="bg-top">
<tab-item
:data="value" noLine titleBold titleSmall></tab-item>
<tab-item :data="value" noLine titleBold titleSmall></tab-item>
</div>
<tab-item v-else :data="value"></tab-item>
</div>
...
...
@@ -29,34 +29,33 @@ import scroll from './components/scroll';
import singleImage from './components/singleImage';
import { createNamespacedHelpers } from 'vuex';
const {
mapGetters, mapActions
} = createNamespacedHelpers('home/mine');
const {
mapGetters, mapActions
} = createNamespacedHelpers('home/mine');
export default {
data() {
return {
}
},
computed:{
...mapGetters(['getMineList'])
},
created() {
this.fetchResource()
this.fetchFavoriteNum()
this.fetchOrderSummary()
this.fetchSellerOrder()
// this.fetchAssets(true)
this.fetchUserWalletInfo()
this.fetchCoupon()
},
methods: {
...mapActions(['fetchFavoriteNum','fetchResource','fetchSellerOrder','fetchOrderSummary', 'fetchAssets', 'fetchUserWalletInfo','fetchCoupon'])
},
components: {
tabItem,
order,
scroll,
singleImage
}
props: ['hideHeader'],
data() {
return {};
},
computed: {
...mapGetters(['getMineList'])
},
created() {
this.fetchResource();
this.fetchFavoriteNum();
this.fetchOrderSummary();
this.fetchSellerOrder();
// this.fetchAssets(true)
this.fetchUserWalletInfo();
this.fetchCoupon();
},
methods: {
...mapActions(['fetchFavoriteNum', 'fetchResource', 'fetchSellerOrder', 'fetchOrderSummary', 'fetchAssets', 'fetchUserWalletInfo', 'fetchCoupon'])
},
components: {
tabItem,
order,
scroll,
singleImage
}
};
</script>
...
...
@@ -67,16 +66,19 @@ export default {
background-color: white;
padding: 0 40px;
}
.bg-top,
.bg-bottom {
background-color: #F2F2F2;
}
.bg-top {
border-top-left-radius: 32px;
border-top-right-radius: 32px;
margin-top: 30px;
padding: 0 30px;
}
.bg-bottom {
border-bottom-left-radius: 32px;
border-bottom-right-radius: 32px;
...
...
apps/pages/home/news/news.vue
View file @
734e04a
<template>
<LayoutApp :show-back="true">
<LayoutApp :show-back="true"
:hideHeader="hideHeader"
>
<div class="scroll-list-wrap">
<Scroll
ref="scroll"
...
...
@@ -17,14 +17,16 @@
</template>
<script>
import { Style, Scroll } from 'cube-ui'
import { Style, Scroll } from 'cube-ui'
;
import { createNamespacedHelpers } from 'vuex';
import Title from './components/title';
import List from './components/list';
import Tab from './components/tab';
const { mapState, mapActions } = createNamespacedHelpers('home/news');
export default {
props: ['hideHeader'],
data() {
return {
options: {
...
...
@@ -34,7 +36,7 @@ export default {
pullUpLoad: true
},
msg: '消息',
}
}
;
},
computed: {
...mapState(['newsList']),
...
...
@@ -43,15 +45,15 @@ export default {
let params = {
type: '',
isPage: true
}
}
;
this.fetchNewsList(params);
this.fetchNewsTabList();
},
created() {
},
methods: {
...mapActions(['fetchNewsList','fetchNewsTabList']),
...mapActions(['fetchNewsList',
'fetchNewsTabList']),
async onPullingUp() {
await this.fetchNewsList();
this.$refs.scroll.forceUpdate();
...
...
@@ -72,6 +74,7 @@ export default {
height: 100%;
width: 100%;
}
.news-content {
padding: 0 40px;
}
...
...
apps/pages/order/buy-pay-ok.vue
View file @
734e04a
...
...
@@ -8,7 +8,7 @@
<div class="desc">如卖家原因导致交易失败,您可获赔付200元保证金,建议您设置支付宝账号作为赔偿收款账户,如未绑定银行卡则视为放弃赔偿</div>
<YohoButton :txt="txt" class="btn-class" @
on-
click="onClick"></YohoButton>
<YohoButton :txt="txt" class="btn-class" @click="onClick"></YohoButton>
<div class="info">
<div class="item" @click="goHome">随便逛逛</div>
...
...
@@ -28,13 +28,12 @@ export default {
},
methods: {
onClick() {
},
goPublish() {
this.goHome();
},
goHome() {
this.$router.replace({
name: 'channel'
});
}
}
};
...
...
apps/pages/order/buyer-confirm.vue
View file @
734e04a
...
...
@@ -200,8 +200,8 @@ export default {
}).show();
},
onClose(orderCode) {
this.$router.push({
name: 'orderDetail',
this.$router.replace({
name: 'buyOrderDetail',
params: {
owner: UserType.buy,
code: orderCode
...
...
apps/pages/order/order-list/in-sell-order-list.vue
View file @
734e04a
...
...
@@ -79,6 +79,9 @@ export default {
});
}
},
activated() {
this.fetchData();
},
methods: {
...mapActions(["fetchEntryOrderList", "fetchNotEntryOrderList"]),
fetchData() {
...
...
apps/pages/order/order-list/order-list.vue
View file @
734e04a
...
...
@@ -62,18 +62,24 @@ export default {
// store.dispatch("order/orderList/fetchOrderList", { owner, status });
},
mounted() {
const { params } = this.$route;
const { status } = params;
if (status) {
this.setOrderStatus(status);
}
this.fetchOrderList(params);
this.fetchData();
},
activated() {
this.fetchData();
},
methods: {
...mapActions(["fetchOrderList"]),
...mapMutations(["setOrderStatus"]),
fetchMore() {
this.fetchOrderList(this.$route.params);
},
fetchData() {
const { params } = this.$route;
const { status } = params;
if (status) {
this.setOrderStatus(status);
}
this.fetchOrderList(params);
}
},
watch: {
...
...
apps/pages/order/pay.vue
View file @
734e04a
...
...
@@ -27,7 +27,8 @@ export default {
data() {
return {
count: 10,
page: null
page: null,
timer: null
};
},
mounted() {
...
...
@@ -41,6 +42,11 @@ export default {
this.page = JSON.parse(this.extra || '{}');
}
},
beforeDestroy() {
if (this.timer) {
clearTimeout(this.timer);
}
},
methods: {
openPay() {
const url = config.alipayUrl + '?' + this.payParams;
...
...
@@ -49,7 +55,7 @@ export default {
},
setCount() {
if (this.count > 0) {
setTimeout(() => {
this.timer =
setTimeout(() => {
this.count = this.count - 1;
this.setCount();
}, 1000);
...
...
apps/pages/order/price-change/no-entry-detail.vue
View file @
734e04a
...
...
@@ -260,10 +260,11 @@ export default {
price: price,
desc: '保证金',
onCloseAction() {
that.clearData();
that.$router.replace({
name: '
PriceChangeEntry
',
name: '
InSaleOrderList
',
params: {
orderId: result.data.productId
code: result.data.orderCode
}
});
}
...
...
@@ -276,6 +277,24 @@ export default {
}
// console.log(result);
},
clearData() { // 清空数据状态
this.platformFeeModalVisible = false;
this.platformFee = {
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.calced = false;
this.earnestMoney = '¥0';
this.isAgree = false;
}
}
};
...
...
@@ -528,7 +547,6 @@ export default {
width: 100%;
border-top: 1px solid #f0f0f0;
background-color: #fff;
padding: 20px 48px;
a {
display: inline-block;
...
...
apps/pages/order/sell-pay-ok.vue
View file @
734e04a
...
...
@@ -48,12 +48,20 @@ export default {
methods: {
...mapOrderAction(['fetchOrderGoods']),
onClick() {
this.$router.replace({
name: 'ProductDetail',
params: {
productId: this.product.productId
}
});
},
goPublish() {
this.onClick();
},
goHome() {
this.$router.replace({
name: 'channel'
});
}
}
};
...
...
apps/pages/order/seller-confirm.vue
View file @
734e04a
...
...
@@ -166,8 +166,8 @@ export default {
}).show();
},
onClose(orderCode) {
this.$router.push({
name: 'orderDetail',
this.$router.replace({
name: 'sellOrderDetail',
params: {
owner: UserType.sell,
code: orderCode
...
...
apps/pages/product/components/size-list.vue
View file @
734e04a
...
...
@@ -95,13 +95,19 @@ export default {
const name = info.size_name.split(/\s+/);
// 区分交易(buy|sell),变现
const isTradable = info.storage_num > 0 && price !== '-';
const isMarketable = info.bid_moster_price > 0;
return {
size_id: info.size_id,
name: name[0],
subName: name[1],
price,
storage_id: info.storage_id,
available: info.storage_num > 0 && price !== '-',
available: isTradable || isMarketable,
isTradable,
isMarketable,
};
},
simplePriceMap(info) {
...
...
apps/pages/product/components/size-select-sheet.vue
View file @
734e04a
...
...
@@ -18,9 +18,9 @@
@select="onSelectSize"
@add="onAdd" />
<transition name="slide-up">
<div class="footer" v-if="is
Trad
able">
<div class="footer" v-if="is
Avail
able">
<cube-button v-if="config.type === 'sell'" @click="convertToCash" :class="{active: isMarketable}">变现<span> <i>¥</i>{{cashPrice}}</span></cube-button>
<cube-button @click="select"
class="active
">{{config.title}}</cube-button>
<cube-button @click="select"
:class="{active: isTradable}
">{{config.title}}</cube-button>
</div>
</transition>
</div>
...
...
@@ -87,11 +87,15 @@ export default {
return get(this.product, 'goods_list[0].canAddSize', false);
},
isAvailable() {
return this.selectedSize && this.selectedSize.size_id > 0;
},
/**
* 可交易(购买|出售)
*/
isTradable() {
return this.
selectedSize && this.selectedSize.size_id
;
return this.
isAvailable && this.selectedSize.storage_num > 0 && this.selectedSize.least_price !== '-'
;
},
/**
...
...
@@ -106,10 +110,11 @@ export default {
},
/**
* 是否可变现
* 可变现
* 通过bid_moster_price或bid_skup判断
*/
isMarketable() {
return this.cashPrice
!== '-' && this.cashPrice
> 0;
return this.cashPrice > 0;
}
},
mounted() {
...
...
@@ -140,6 +145,7 @@ export default {
productId: this.product.product_id,
storageId: this.selectedSize.storage_id,
skup: this.selectedSize.skup,
bid_skup: this.selectedSize.bid_skup,
});
},
convertToCash() {
...
...
apps/pages/product/product-detail.vue
View file @
734e04a
...
...
@@ -292,7 +292,13 @@ export default {
skup: tradeProduct.skup,
});
if (info.code !== 200) {
/**
* {
* "message": "您有未支付的订单,支付或取消后可提交新的订单",
* "code": 512
* }
*/
if (info.code === 512) {
return this.$createDialog({
type: 'confirm',
content: info.message,
...
...
@@ -310,7 +316,7 @@ export default {
},
onConfirm: () => {
this.$router.push({
name:
'
OrderList',
name:
this.selectSizeConfig.type === 'buy' ? 'OrderList' : 'InSale
OrderList',
params: {
owner: this.selectSizeConfig.type,
},
...
...
@@ -320,6 +326,7 @@ export default {
}).show();
}
} catch (e) {
// e
}
this.$router.push({
...
...
apps/store/address/address/actions.js
View file @
734e04a
...
...
@@ -9,9 +9,7 @@ export default {
async
fetchUserAddressList
({
commit
})
{
const
result
=
await
this
.
$api
.
get
(
'/api/address/gethidden'
,
{
uid
:
'500031912'
});
const
result
=
await
this
.
$api
.
get
(
'/api/address/gethidden'
);
if
(
result
.
code
===
200
)
{
commit
(
Types
.
FETCH_USER_ADDRESS_LIST
,
{
...
...
@@ -24,9 +22,7 @@ export default {
async
fetchAddressTags
({
commit
})
{
const
result
=
await
this
.
$api
.
get
(
'/api/address/getTags'
,
{
uid
:
'500031912'
});
const
result
=
await
this
.
$api
.
get
(
'/api/address/getTags'
);
if
(
result
.
code
===
200
)
{
commit
(
Types
.
FETCH_ADDRESS_TAGS
,
{
...
...
@@ -42,9 +38,7 @@ export default {
try
{
result
=
await
this
.
$api
.
get
(
'/api/address/getProvinces'
,
{
uid
:
'500031912'
,
id
,
debug
:
'XYZ'
});
}
catch
(
e
)
{
return
result
;
...
...
@@ -58,14 +52,12 @@ export default {
commit
},
data
)
{
const
result
=
await
this
.
$api
.
post
(
'/api/address/addAddress'
,
{
uid
:
'500031912'
,
address
:
data
.
address
,
area_code
:
data
.
area_code
,
consignee
:
data
.
consignee
,
mobile
:
data
.
mobile
,
tag_code
:
data
.
tag_code
,
is_default
:
data
.
is_default
,
debug
:
'XYZ'
});
return
result
||
{};
...
...
@@ -75,7 +67,6 @@ export default {
commit
},
data
)
{
const
result
=
await
this
.
$api
.
post
(
'/api/address/updateAddress'
,
{
uid
:
'500031912'
,
id
:
data
.
id
,
address
:
data
.
address
,
area_code
:
data
.
area_code
,
...
...
@@ -83,7 +74,6 @@ export default {
mobile
:
data
.
mobile
,
tag_code
:
data
.
tag_code
,
is_default
:
data
.
is_default
,
debug
:
'XYZ'
});
return
result
||
{};
...
...
@@ -93,9 +83,7 @@ export default {
commit
},
addressId
)
{
const
result
=
await
this
.
$api
.
post
(
'/api/address/delAddress'
,
{
uid
:
'500031912'
,
id
:
addressId
,
debug
:
'XYZ'
});
return
result
||
{};
...
...
apps/store/order/price-change/actions.js
View file @
734e04a
...
...
@@ -71,67 +71,82 @@ export default {
order
:
result
});
}
else
{
result
=
{
alg
:
'SALT_MD5'
,
code
:
200
,
data
:
{
attributes
:
1
,
bankTransferFee
:
'-¥0.29'
,
bidType
:
0
,
buttons
:
[
[
Object
],
[
Object
]
],
createTime
:
'2019-10-08 16:57:48'
,
earnestMoney
:
1.16
,
earnestMoneyStr
:
'¥1.16'
,
goodsInfo
:
{
batchNo
:
1232760577857
,
bidType
:
0
,
colorName
:
'黑色'
,
entryFlag
:
false
,
goodImg
:
'http://img11.static.yhbimg.com/goodsimg/2019/02/25/10/018b0d26a7e4bc0b39a93c329dd8c13d8e.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80'
,
goodPrice
:
'29.00'
,
leastPrice
:
29
,
leastPriceOfSkuTips
:
'最低现货价¥29'
,
price
:
29
,
productId
:
10001266
,
productName
:
'Air Jordan 1 复刻黑绿脚趾 范闲'
,
sizeName
:
'37'
,
skup
:
19356
,
storageId
:
10090816
},
income
:
'¥28.69'
,
isAdvance
:
'N'
,
isPaid
:
1
,
orderCode
:
1232760577857
,
payStartTime
:
1570525068
,
payment
:
2
,
paymentStr
:
'支付宝'
,
platformFee
:
{
amount
:
'-¥0.02'
,
appraiseFee
:
'¥0.01'
,
goodsPaymentRatePercent
:
'0.00%'
,
packageFee
:
'¥0.01'
,
payChannelPercentage
:
'1.00%'
,
serviceFee
:
'¥0.00'
},
secendLevelCreateTime
:
1570525068
,
statusDetail
:
{
detailDesc
:
'商品出售中,待买家购买'
,
expressShow
:
false
,
paymentTips
:
'交易成功后自动退还'
,
statuStr
:
'出售中'
,
status
:
1
},
submitOrderTimeStr
:
'2019-10-08 16:57:48'
,
uid
:
349709
,
userAddress
:
{
address
:
'嘉陵江东街18号南京国家广告产****17楼'
,
address_id
:
2396242
,
area
:
'江苏省 南京市 建邺区 建邺区新城科技园'
,
areaCode
:
'320105400'
,
consignee
:
'*骏'
,
isUpdate
:
'N'
,
mobile
:
'138****0257'
,
phone
:
''
,
zipCode
:
''
}
},
md5
:
'6ae15b6dee1a7ac6ba39244894671ad5'
,
message
:
'订单详情'
};
result
=
{
"alg"
:
"SALT_MD5"
,
"code"
:
200
,
"data"
:
{
"attributes"
:
1
,
"bankTransferFee"
:
"-¥0.19"
,
"bidType"
:
0
,
"buttons"
:
[{
"code"
:
"not_sold"
,
"confirmTips"
:
"您确定不卖此商品么?取消后保证金将原路退还至您的账户"
,
"name"
:
"NOT_SOLD"
,
"text"
:
"不卖了"
},
{
"code"
:
"not_entry_change_price"
,
"name"
:
"NOT_ENTRY_CHANGE_PRICE"
,
"text"
:
"调价"
}],
"createTime"
:
"2019-10-09 18:01:23"
,
"earnestMoney"
:
0.76
,
"earnestMoneyStr"
:
"¥0.76"
,
"goodsInfo"
:
{
"batchNo"
:
1233499619151
,
"bidType"
:
0
,
"colorName"
:
"黑色"
,
"entryFlag"
:
false
,
"goodImg"
:
"http://img11.static.yhbimg.com/goodsimg/2019/02/25/10/018b0d26a7e4bc0b39a93c329dd8c13d8e.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80"
,
"goodPrice"
:
"19.00"
,
"leastPrice"
:
19.00
,
"leastPriceOfSkuTips"
:
"最低现货价¥19"
,
"price"
:
19.00
,
"productId"
:
10001266
,
"productName"
:
"Air Jordan 1 复刻黑绿脚趾 范闲"
,
"sizeName"
:
"37"
,
"skup"
:
19466
,
"storageId"
:
10090816
},
"income"
:
"¥18.79"
,
"isAdvance"
:
"N"
,
"isPaid"
:
1
,
"orderCode"
:
1233499619151
,
"payStartTime"
:
1570615283
,
"payment"
:
9
,
"paymentStr"
:
"手机网站支付宝"
,
"platformFee"
:
{
"amount"
:
"-¥0.02"
,
"appraiseFee"
:
"¥0.01"
,
"goodsPaymentRatePercent"
:
"0.00%"
,
"packageFee"
:
"¥0.01"
,
"payChannelPercentage"
:
"1.00%"
,
"serviceFee"
:
"¥0.00"
},
"secendLevelCreateTime"
:
1570615283
,
"statusDetail"
:
{
"detailDesc"
:
"商品出售中,待买家购买"
,
"expressShow"
:
false
,
"paymentTips"
:
"交易成功后自动退还"
,
"statuStr"
:
"出售中"
,
"status"
:
1
},
"submitOrderTimeStr"
:
"2019-10-09 18:01:23"
,
"uid"
:
349709
,
"userAddress"
:
{
"address"
:
"嘉陵江东街18号南京国家广告产****17楼"
,
"address_id"
:
2396242
,
"area"
:
"江苏省 南京市 建邺区 建邺区新城科技园"
,
"areaCode"
:
"320105400"
,
"consignee"
:
"*骏"
,
"isUpdate"
:
"N"
,
"mobile"
:
"138****0257"
,
"phone"
:
""
,
"zipCode"
:
""
}
},
"md5"
:
"ab14db14196b6213d05d288179ecf9e2"
,
"message"
:
"订单详情"
};
commit
(
Types
.
FETCH_NOENTRY_ORDER_PRODUCT_SUCCESS
,
{
order
:
result
...
...
Please
register
or
login
to post a comment