Showing 42 changed files with 687 additions and 266 deletions
... ... @@ -19,9 +19,7 @@ export default {
},
mounted() {
if (this.yoho.context.needLogin) {
this.$yoho.ready(() => {
this.$sdk.goLogin();
});
this.$yoho.auth();
}
this.$yoho.setWebview({
... ...
<template>
<div v-if="showBind" class="third-bind-wrapper">
<div class="bind-dialog">
<p class="bind-title">关联有货UFO账户</p>
<div class="under-row">
<i class="iconfont iconphone2"></i>
<div class="select-block">
<div class="left-row-title">
<CubeSelect class="area-code-select" v-model="code" :options="options" :title="selectTitle"></CubeSelect>
</div>
<CubeInput class="bind-input" v-model="phone" placeholder="请输入手机号"></CubeInput>
<CubeInput class="bind-input" :class="phone ? '' : 'bind-input-phone'" v-model="phone"></CubeInput>
</div>
<div class="under-row">
<i class="iconfont iconyanzhengma"></i>
<CubeInput class="bind-input" v-model="smsCode" placeholder="请输入验证码"></CubeInput>
<div class="left-row-title">
验证码
</div>
<CubeInput class="bind-input" :class="smsCode ? '' : 'bind-input-code'" v-model="smsCode"></CubeInput>
<CubeButton class="send-sms-btn" :disabled="!!sendBtnText" @click="sendSMS">{{sendBtnText || '获取验证码'}}</CubeButton>
</div>
<div class="submit-row">
<CubeButton class="bind-btn" @click="bindSubmit">登录</CubeButton>
<CubeButton class="bind-btn" :disabled="submitDisable" @click="bindSubmit">登录</CubeButton>
</div>
</div>
</div>
... ... @@ -76,6 +78,11 @@ export default {
sendBtnText: ''
}
},
computed: {
submitDisable() {
return !(this.phone && this.smsCode);
}
},
methods: {
...mapActions(['sendBindSms', 'submitThirdBind']),
show() {
... ... @@ -96,13 +103,13 @@ export default {
let total = 60;
let timer = setInterval(() => {
if (--total) {
this.sendBtnText = '重新获取 ' + total;
this.sendBtnText = '重' + total;
} else {
this.sendBtnText = '';
clearInterval(timer);
}
}, 1000);
this.sendBtnText = '重新获取 ' + total;
this.sendBtnText = '重' + total;
this.sendBindSms({
mobile: this.phone,
... ... @@ -151,42 +158,30 @@ export default {
.bind-dialog {
width: 670px;
height: 600px;
padding: 100px 60px;
font-size: 24px;
padding: 64px 48px 80px;
font-size: 28px;
box-sizing: border-box;
background-color: #fff;
color: #444;
}
.bind-title {
font-size: 48px;
line-height: 66px;
font-weight: 500;
margin-bottom: 32px;
}
.under-row {
line-height: 80px;
line-height: 120px;
border-bottom: 1px solid #eaeaea;
margin-bottom: 20px;
display: flex;
justify-content: center;
align-items: center;
}
.iconfont {
font-size: 40px;
margin-right: 10px;
vertical-align: middle;
}
.select-block {
min-width: 130px;
position: relative;
margin-right: 10px;
&:after {
content: "";
width: 1px;
background-color: #eaeaea;
position: absolute;
right: 0;
top: 30%;
bottom: 30%;
.left-row-title {
width: 150px;
flex-shrink: 0;
color: #999;
}
}
... ... @@ -198,7 +193,7 @@ export default {
}
/deep/ .cube-select-text {
font-size: 12px;
font-size: 14px;
}
}
... ... @@ -206,22 +201,48 @@ export default {
flex-grow: 1;
&:after {
width: auto;
height: auto;
border: 0;
font-size: 28px;
line-height: 40px;
transform: scale(1);
top: 50%;
margin-top: -20px;
color: #ccc;
font-weight: 300;
}
/deep/ .cube-input-field {
font-size: 12px;
font-size: 20px;
padding: 10px 0;
color: #000;
font-weight: 500;
}
}
.bind-input-phone:after {
content: "请输入手机号";
}
.bind-input-code:after {
content: "请输入验证码";
}
.send-sms-btn {
width: 180px;
height: 54px;
line-height: 54px;
font-size: 28px;
padding: 0;
font-size: 12px;
border-radius: 27px;
transform: scale(0.9);
text-align: right;
background: none;
color: #000;
margin-left: 10px;
&.cube-btn_disabled {
color: #999;
}
&:after {
border: 0;
... ... @@ -233,12 +254,17 @@ export default {
}
.bind-btn {
height: 120px;
height: 90px;
font-size: 28px;
background: #022c46;
border-radius: 46px;
&.cube-btn_disabled {
background: #ccc;
}
&:after {
border: 0;
}
}
</style>
... ...
... ... @@ -59,6 +59,7 @@ export default {
text-align: center;
line-height: 120px;
color: #fff;
border-radius: 500px;
&.enable {
background: #002b47;
... ...
... ... @@ -56,11 +56,8 @@ yoho.auth = async(loginUrl) => {
domain: '.yohobuy.com',
path: '/'
});
console.log(location.href)
setTimeout(() => {
location.href = loginUrl || `${location.origin}/xianyu/passport/login/taobao`;
}, 100);
location.href = loginUrl || `${location.origin}/xianyu/passport/login/taobao`;
return;
}
}
... ...
... ... @@ -18,7 +18,7 @@ export default {
return {
pullDownRefresh: this.pullDownRefreshObj,
pullUpLoad: this.pullUpLoadObj,
scrollbar: true
scrollbar: false
};
},
pullDownRefreshObj: function() {
... ...
... ... @@ -4,18 +4,21 @@
<div class="scroll-list-wrap">
<Scroll
ref="scroll"
:scroll-events="scrollEvents"
@scroll="scrollHandler"
:options="options"
@pulling-up="onPullingUp"
:data="channelList.productlist">
<div class="body" ref="body">
<div class="channel-top"></div>
<!-- <div class="html">qwdwqdwq、</div> -->
<div v-for="(item, index) in channelList.list" :key="index">
<Slider :list="item.data" v-if="item.template_name == 'focus'" />
<Hot :list="item.data" v-if="item.template_name == 'hotSeries'" />
<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'" />
<ScrollNav :list="item.data.list" v-if="item.template_name == 'guessLike'"></ScrollNav>
</div>
<ScrollNav></ScrollNav>
<ProductList :list="channelList.productlist"></ProductList>
</div>
</Scroll>
... ... @@ -25,9 +28,9 @@
</template>
<script>
import { Style, Scroll } from 'cube-ui'
import { Style, Scroll, Sticky } from 'cube-ui'
import { createNamespacedHelpers } from 'vuex';
import Slider from './components/slider';
import Swiper from './components/swiper';
import Banner from './components/banner';
import TwoBanner from './components/twoBanner';
import Hot from './components/hot';
... ... @@ -45,6 +48,8 @@ export default {
},
pullUpLoad: true
},
scrollEvents: ['scroll'],
scrollY: 0,
}
},
computed: {
... ... @@ -56,11 +61,17 @@ export default {
}
this.fetchChannelList();
this.fetchProductList(params);
console.log(this.$refs.elememt);
console.log("elememt");
},
created() {
},
methods: {
scrollHandler({ y }) {
// console.log(y);
// this.scrollY = -y
},
...mapActions(['fetchChannelList','fetchProductList']),
async onPullingUp() {
const params = {
... ... @@ -71,13 +82,16 @@ export default {
}
},
components: {
Slider,
Swiper,
Banner,
TwoBanner,
Hot,
ScrollNav,
Style,
Scroll,
Sticky,
cubeSticky: Sticky,
cubeStickyEle: Sticky.Ele,
ProductList
}
};
... ... @@ -86,7 +100,7 @@ export default {
<style lang="scss" scoped>
.channel-top {
width: 100%;
height: 400px;
height: 310px;
background: #08304B;
}
.scroll-app {
... ... @@ -121,4 +135,9 @@ export default {
overflow-y: auto;
// padding: 0 40px;
}
.html {
margin-top: -250px;
margin-bottom: 20px;
}
</style>
... ...
... ... @@ -2,7 +2,7 @@
<div class="banner" v-if="list.length > 0">
<ul>
<li v-for="(item, index) in list" :key="index" @click="jump(item)">
<ImageFormat :lazy="false" :src="item.src" :alt="item.alt" :width="item.width" :height="item.height" />
<ImageFormat :data-secc="item.src" :lazy="false" :src="item.src" :alt="item.alt" :width="item.width || 750" :height="item.height || 160" />
</li>
</ul>
</div>
... ... @@ -23,12 +23,6 @@ export default {
console.log(src);
console.log(url);
}
// onClick() {
// this.$yoho.goNewPage({
// url: 'https://activity.yoho.cn/feature/5729.html?title=活动规则&openby:yohobuy={"action":"go.h5","params":{"title":"活动规则","url":"https://activity.yoho.cn/feature/5729.html"}}'
// });
// }
}
};
</script>
... ...
... ... @@ -3,13 +3,13 @@
<ul>
<li v-for="(item, index) in list" :key="index" @click="goProduct(item)">
<div class="hot-image">
<ImgSize class="item-imge" :src="item.image_url" :width="100" :height="80"/>
<ImageFormat :lazy="false" class="item-imge" :src="item.src" :alt="item.alt" :width="100" :height="100"></ImageFormat>
</div>
<div class="hot-name">{{item.series_name}}</div>
<div class="hot-name">{{item.title}}</div>
</li>
<li @click="goMore">
<div class="hot-image hot-more">更多</div>
<div class="hot-name">More</div>
<li @click="goMore" class="goMore">
<div class="hot-image">更多</div>
<div class="hot-name">MORE</div>
</li>
</ul>
</div>
... ... @@ -68,10 +68,22 @@ export default {
}
.hot-name {
margin-top: 20px;
font-size: 24px;
color: #555;
}
.hot-more {
line-height: 100px;
border: 1px solid #999;
&.goMore {
.hot-image {
width: 88px;
height: 56px;
line-height: 56px;
border: 1px solid #eee;
border-radius: 8px;
font-size: 22px;
margin-top: 25px;
}
.hot-name {
margin-top: 38px;
}
}
}
}
... ...
... ... @@ -18,15 +18,15 @@ const { mapState, mapActions } = createNamespacedHelpers('home/channel');
export default {
name: 'slide',
props: {
// list: {
// type: Array,
// default: true
// },
list: {
type: Array,
default: true
},
},
data() {
return {
index: 0,
current: '快车',
current: this.list[0].tab_name,
labels: [],
}
},
... ... @@ -39,18 +39,8 @@ export default {
},
mounted() {
// this.fetchProductList();
this.labels = [
'快车',
'小巴',
'专车',
'顺风车',
'代驾',
'公交',
'自驾租车',
'豪华车',
'二手车',
'出租车'
]
// 遍历ScrollNavBar的key值,组装到labels中;
this.list.map((res) => { this.labels.push(res.tab_name) });
},
created() {
... ... @@ -63,7 +53,8 @@ export default {
isReset: true,
}
this.fetchProductList(params);
console.log(index);
console.log(this.list[index].tab_name);
// console.log(index);
}
}
... ... @@ -72,7 +63,9 @@ export default {
<style lang="scss" scoped>
.ScrollNav {
position: relative;
top: 0;
left: 0;
}
</style>
... ...
<template>
<cube-slide ref="slide" :data="list">
<cube-slide-item v-for="(item, index) in list" :key="index" @click.native="clickHandler(item, index)">
<a :href="item.url">
<ImageFormat :lazy="false" class="item-imge" :src="item.src" :width="750" :height="200"></ImageFormat>
</a>
<cube-slide-item v-for="(item, index) in list" :key="index">
<ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="item.src" :width="750" :height="200"></ImageFormat>
</cube-slide-item>
</cube-slide>
</template>
... ... @@ -25,20 +23,7 @@ export default {
},
data() {
return {
items: [
{
url: 'http://www.didichuxing.com/',
image: '//webapp.didistatic.com/static/webapp/shield/cube-ui-examples-slide01.png'
},
{
url: 'http://www.didichuxing.com/',
image: '//webapp.didistatic.com/static/webapp/shield/cube-ui-examples-slide02.png'
},
{
url: 'http://www.didichuxing.com/',
image: '//webapp.didistatic.com/static/webapp/shield/cube-ui-examples-slide03.png'
}
]
}
},
components: {
... ... @@ -52,7 +37,9 @@ export default {
// ...mapState(['resource'])
},
methods: {
clickHandler(item) {
console.log(item);
}
}
};
</script>
... ...
<template>
<div class="swiper">
<div class="swiper-item swiper-item-left">
<a :href="list[0].url">
<ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[0].src" :width="302" :height="402"></ImageFormat>
</a>
</div>
<div class="swiper-item swiper-item-right">
<a :href="list[1].url">
<ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[1].src" :width="374" :height="196"></ImageFormat>
</a>
<a :href="list[2].url">
<ImageFormat style="margin-top: 4px" @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[2].src" :width="374" :height="196"></ImageFormat>
</a>
</div>
</div>
</template>
<script>
export default {
name: 'swiper',
props: {
list: {
type: Array,
default: true,
},
},
methods: {
jump(item) {
const { src, url } = item;
console.log(src);
console.log(url);
}
}
};
</script>
<style lang="scss" scoped>
.swiper {
// margin-top: -250px;
padding: 0 32px;
overflow: hidden;
.swiper-item {
&.swiper-item-left {
width: 301px;
float: left;
img {
height: 402px;
}
}
&.swiper-item-right {
width: 374px;
float: right;
img {
height: 196px;
}
}
img {
width: 100%;
display: block;
border-radius: 4px;
}
}
}
</style>
... ...
<template>
<div class="banner" v-if="list.length > 0">
<div class="twoBanner" v-if="list.length > 0">
<ul>
<li v-for="(item, index) in list" :key="index" class="oneImg" @click="jump(item)">
<ImageFormat :lazy="false" :src="item.src" :alt="item.alt" :width="200" :height="200" />
<li v-for="(item, index) in list" :key="index">
<a :href="item.url">
<ImageFormat :lazy="false" :src="item.src" :alt="item.alt" :width="344" :height="160" />
</a>
</li>
</ul>
</div>
... ... @@ -14,40 +16,31 @@ export default {
props: {
list: {
type: Array,
default: [1,2],
default: [],
},
},
methods: {
jump(item) {
const { src, url } = item;
console.log(src);
console.log(url);
}
// onClick() {
// this.$yoho.goNewPage({
// url: 'https://activity.yoho.cn/feature/5729.html?title=活动规则&openby:yohobuy={"action":"go.h5","params":{"title":"活动规则","url":"https://activity.yoho.cn/feature/5729.html"}}'
// });
// jump(item) {
// const { src, url } = item;
// console.log(src);
// console.log(url);
// }
}
};
</script>
<style lang="scss" scoped>
.banner {
width: 100%;
margin: 20px 0;
overflow: hidden;
.twoBanner {
ul {
display: flex;
justify-content: space-between;
li {
width: 50%;
&.oneImg {
max-width: 100%;
}
width: 49%;
img {
max-width: 100%;
display: block;
border-radius: 16px;
}
}
}
... ...
<template>
<div class="income-filter">
<div class="month-filter" @click="showDate">2019年9月 <i class="cubeic-select"></i></div>
<div class="type-filter" @click="showPicker"><span class="filter-img"></span><span>筛选</span></div>
<div class="month-filter" @click="showDate">{{monthPicker}}<i class="cubeic-select"></i></div>
<div class="type-filter" @click="showPicker"><span class="filter-img"></span><span>{{typeFilter}}</span></div>
</div>
</template>
... ... @@ -9,73 +9,64 @@
import { Style, Picker } from 'cube-ui';
import { createNamespacedHelpers } from 'vuex';
const {mapState, mapGetters, mapActions} = createNamespacedHelpers('home/mine');
import moment from 'moment';
export default {
name: 'income-filter',
data() {
return {
date: [
[{ text: '2019', value: '2019' }],
[{ text: '9', value: '9' }]
]
monthPicker: '2019年9月 ',
typeFilter: '筛选',
}
},
props: {
},
computed: {
...mapState(['filterData'])
...mapState(['filterData','walletData']),
...mapGetters(['getYearMonth'])
},
created() {
this.fetchWalletFilter()
},
methods: {
...mapActions(['fetchWalletFilter']),
...mapActions(['fetchWalletFilter','fetchWallet']),
showDate() {
if (!this.datePicker) {
this.datePicker = this.$createPicker({
data: this.date,
onSelect: this.selectHandle,
onCancel: this.cancelHandle
data: this.getYearMonth,
onSelect: this.selectHandle
})
}
this.datePicker.show()
},
selectHandle(selectedVal, selectedIndex, selectedText) {
this.$createDialog({
type: 'warn',
content: `Selected Item: <br/> - value: ${selectedVal.join(', ')} <br/> - index: ${selectedIndex.join(', ')} <br/> - text: ${selectedText.join(' ')}`,
icon: 'cubeic-alert'
}).show()
},
cancelHandle() {
this.$createToast({
type: 'correct',
txt: 'Picker canceled',
time: 1000
}).show()
},
this.monthPicker = selectedText[0]+'年'+selectedText[1] + '月 ';
let selected = selectedVal.join('-')
let days = moment(selected, "YYYY-MM").daysInMonth();
let startDay = selected+'-01';
let endDay = selected+'-'+days;
let startTime = moment(startDay).startOf('d').unix();
let endTime = moment(endDay).endOf('d').unix();
this.fetchWallet({isRefresh:true,tradeType: this.walletData.tradeType,startTime,endTime})
},
showPicker() {
if (!this.picker) {
this.picker = this.$createPicker({
title: 'Picker',
data: [this.filterData.tradeTypes],
onSelect: this.selectHandle1,
onCancel: this.cancelHandle1
onSelect: this.selectHandle1
})
}
this.picker.show()
},
selectHandle1(selectedVal, selectedIndex, selectedText) {
this.$createDialog({
type: 'warn',
content: `Selected Item: <br/> - value: ${selectedVal.join(', ')} <br/> - index: ${selectedIndex.join(', ')} <br/> - text: ${selectedText.join(' ')}`,
icon: 'cubeic-alert'
}).show()
this.typeFilter = selectedText.join(',');
let tradeType = selectedVal.join(',')
let {startTime,endTime} = this.walletData
this.fetchWallet({isRefresh:true,tradeType,startTime,endTime})
},
cancelHandle1() {
}
},
components: {
Style,
... ... @@ -89,7 +80,6 @@ export default {
.income-filter {
background-color: #F5F7F9;
padding: 0 40px;
margin: 0 -40px;
height: 90px;
line-height: 90px;
display: flex;
... ... @@ -109,6 +99,7 @@ export default {
.filter-img {
display: inline-block;
margin-right: 5px;
margin-top: -4px;
width: 28px;
height: 28px;
background: url(~statics/image/list/filter@3x.png) no-repeat;
... ...
... ... @@ -27,7 +27,7 @@ export default {
}
},
created(){
console.log(this.data)
},
computed: {
imgSrc() {
... ... @@ -45,7 +45,7 @@ export default {
<style lang="scss" scoped>
.assets-record-container {
display: flex;
width: 100%;
margin: 0 40px;
justify-content: space-between;
align-items: center;
padding-top: 30px;
... ...
<template>
<LayoutApp :show-back="true">
<div class="body" ref="body">
<incomeFilter></incomeFilter>
<Scroll
ref="scroll"
:data="walletData.list"
:options="options"
@pulling-down="onPullingDown"
@pulling-up="onPullingUp">
<incomeFilter></incomeFilter>
<template v-for="(item,index) in walletData.list">
<incomeItem :data="item" :key="index"></incomeItem>
</template>
... ... @@ -47,16 +48,16 @@ export default {
},
created() {
this.fetchWallet(true)
this.fetchWallet({isRefresh:true})
},
methods: {
...mapActions(['fetchWallet']),
onPullingDown() {
this.fetchWallet(true)
this.fetchWallet({isRefresh:true})
},
onPullingUp() {
if(!this.walletData.endReached) {
this.fetchWallet(false)
this.fetchWallet({isRefresh:false})
} else {
this.$refs.scroll.forceUpdate()
}
... ... @@ -77,7 +78,6 @@ export default {
height: 100%;
overflow-y: auto;
background-color: white;
padding: 0 40px;
color: #999;
}
</style>
... ...
... ... @@ -6,10 +6,11 @@
</div>
<div class="title">支付成功</div>
<div class="desc">如卖家原因导致交易失败,您可获赔付200元保证金,建议您设置支付宝账号作为赔偿收款账户,如未绑定银行卡则视为放弃赔偿</div>
<YohoButton :txt="txt" class="btn-class" @on-click="onClick"></YohoButton>
<div class="info">
<div class="item" @click="goPublish">继续发布</div>
<div class="item" @click="goHome">随便逛逛</div>
</div>
</div>
... ... @@ -19,10 +20,10 @@
<script>
export default {
name: 'PayOk',
name: 'BuyPayOk',
data() {
return {
txt: '查看商品'
txt: '返回首页'
};
},
methods: {
... ... @@ -42,13 +43,13 @@ export default {
<style lang="scss" scoped>
.body {
height: 100%;
margin: 0 74px;
margin: 0 32px;
padding-bottom: 140px;
overflow-y: auto;
}
.header {
margin-top: 170px;
margin-top: 80px;
text-align: center;
}
... ... @@ -62,6 +63,15 @@ export default {
line-height: 100px;
}
.desc {
width: 560px;
margin: 60px auto;
font-size: 24px;
color: #999;
text-align: center;
line-height: 40px;
}
.title {
font-size: 40px;
font-weight: bold;
... ... @@ -75,13 +85,9 @@ export default {
margin-top: 30px;
.item {
width: 50%;
width: 100%;
text-align: center;
}
.item + .item {
border-left: 1px solid black;
}
}
</style>
... ...
<template>
<div class="count-down-wrapper">
<span></span>
<div class="count-down-wrapper" v-if="countDown !== ''">
<i class="time-icon"></i>
<span>{{ countDown }}</span>
</div>
</template>
... ... @@ -14,29 +15,33 @@ export default {
},
data() {
return {
remainTime: this.props.leftTime,
remainTime: this.$props.leftTime,
countDown: "",
timeoutId: null
};
},
mounted() {
this.countDown = this.formatTime();
this.countDown = this.formatTime().join(":");
this.timeoutId = setInterval(() => {
this.remainTime--;
this.countDown = this.formatTime();
this.countDown = this.formatTime().join(":");
}, 1000);
},
destroyed() {
clearInterval(this.timeoutId);
},
computed: {
timeList: function() {}
watch: {
countDown(val) {
if (val === "") {
clearInterval(this.timeoutId);
}
}
},
methods: {
formatTime() {
if (this.remainTime < 0) {
return ["00", "00", "00"];
if (this.remainTime <= 0) {
return [];
}
let remainTime = this.remainTime;
... ... @@ -49,7 +54,7 @@ export default {
const numberOfSeconds = remainTime - numberOfMinutes * 60;
return [numberOfHour, numberOfMinute, numberOfSeconds].map(time => {
return [numberOfHours, numberOfMinutes, numberOfSeconds].map(time => {
return time < 10 ? `0${time}` : `${time}`;
});
}
... ... @@ -60,5 +65,21 @@ export default {
<style lang="scss" scoped>
.count-down-wrapper {
display: flex;
font-size: 32px;
font-weight: bold;
align-items: center;
& > i {
width: 30px;
height: 30px;
display: block;
background: url("~statics/image/order/time-icon@3x.png");
background-size: contain;
background-position: center;
}
& > span {
padding: 0 9px;
}
}
</style>
\ No newline at end of file
... ...
... ... @@ -161,7 +161,6 @@ export default {
.actions-wrapper {
display: flex;
justify-content: flex-end;
margin-top: 40px;
button {
font-size: 24px;
... ...
... ... @@ -31,9 +31,20 @@ export default [
})
},
{
name: 'PayOk',
path: '/xianyu/order/ok.html',
component: () => import(/* webpackChunkName: "order" */ './pay-ok'),
name: 'SellPayOk',
path: '/xianyu/order/sellpayok.html',
component: () => import(/* webpackChunkName: "order" */ './sell-pay-ok'),
props: route => ({
orderCode: route.query.orderCode,
})
},
{
name: 'BuyPayOk',
path: '/xianyu/order/buypayok.html',
component: () => import(/* webpackChunkName: "order" */ './buy-pay-ok'),
props: route => ({
orderCode: route.query.orderCode,
})
},
{
name: 'buyerAskOrder', // 买家求购确认
... ...
... ... @@ -59,7 +59,7 @@
</div>
<!-- 操作 -->
<div v-if="actionList.length" class="actions">
<order-actions class="detail-actions" :order="orderDetail" />
<order-actions :order="orderDetail" />
</div>
</div>
</template>
... ... @@ -215,10 +215,6 @@ export default {
box-shadow: inset 0 1px 0 0 #eee;
padding: 20px;
z-index: 10;
.detail-actions {
margin-top: 0;
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<div class="footer-wrapper">
<count-down :leftTime="order.leftTime" />
<order-actions class="actions" :order="order" />
</div>
</template>
<script>
import OrderActions from "../../components/order-actions";
import CountDown from "../../components/count-down";
export default {
props: {
order: {
type: Object,
default: {}
}
},
components: {
OrderActions,
CountDown
}
};
</script>
<style lang="scss" scoped>
.footer-wrapper {
display: flex;
margin-top: 40px;
.actions {
flex: 1;
}
}
</style>
\ No newline at end of file
... ...
... ... @@ -12,7 +12,7 @@
<order-info :order="order" />
<order-list-item :order="order" />
<!-- 订单操作 -->
<order-actions :order="order" />
<order-item-footer :order="order" />
</li>
</ul>
</scroll>
... ... @@ -27,8 +27,7 @@ import { createNamespacedHelpers } from "vuex";
import OrderListItem from "./components/order-item";
import OrderInfo from "./components/order-info.vue";
import EmptyList from "./components/empty";
import OrderActions from "../components/order-actions";
import OrderItemFooter from "./components/order-footer";
const { mapActions, mapState, mapGetters } = createNamespacedHelpers(
"order/inSaleOrderList"
... ... @@ -38,9 +37,9 @@ export default {
components: {
Scroll,
OrderListItem,
OrderActions,
OrderInfo,
EmptyList
EmptyList,
OrderItemFooter
},
computed: {
...mapState(["entryOrder", "notEntryOrder", "isShowEmpty"]),
... ...
... ... @@ -14,7 +14,7 @@
<order-info :order="order" />
<order-list-item :order="order" />
<!-- 订单操作 -->
<order-actions :order="order" />
<order-item-footer :order="order" />
</li>
</ul>
</scroll>
... ... @@ -31,8 +31,7 @@ import OrderListItem from "./components/order-item";
import StatusNav from "./components/status-nav";
import OrderInfo from "./components/order-info.vue";
import EmptyList from "./components/empty";
import OrderActions from "../components/order-actions";
import OrderItemFooter from "./components/order-footer";
const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
"order/orderList"
... ... @@ -43,9 +42,9 @@ export default {
Scroll,
OrderListItem,
StatusNav,
OrderActions,
OrderInfo,
EmptyList
EmptyList,
OrderItemFooter
},
computed: {
...mapState(["orderList", "pullUpLoad", "isShowEmpty"]),
... ...
... ... @@ -7,16 +7,16 @@
<script>
const ALIPAY_DOMAIN = 'https://mapi.alipay.com/gateway.do';
const ALIPAY_DOMAIN = 'https://openapi.alipay.com/gateway.do';
export default {
name: 'PayPage',
props: ['orderCode', 'payParams'],
mounted() {
if (this.payParams) {
const url = ALIPAY_DOMAIN + '?' + encodeURIComponent(this.payParams);
const url = ALIPAY_DOMAIN + '?' + this.payParams;
console.log(url);
window.location.href = url;
}
},
methods: {}
... ...
<template>
<CubeInput v-bind="$attrs" v-bind:value="value" v-bind:needBlur="needBlur" v-on="inputListeners" :maxlength="8" class="input-number">
<CubeInput v-bind="$attrs" v-bind:value="value" v-on="inputListeners" :maxlength="8" class="input-number">
<span slot="prepend">
<slot name="prepend"></slot>
</span>
... ... @@ -14,7 +14,7 @@ import {Input} from 'cube-ui';
export default {
name: 'InputUfo',
props: ['value', 'needBlur'],
props: ['value'],
computed: {
inputListeners() {
return Object.assign({},
... ... @@ -31,11 +31,6 @@ export default {
}
},
methods: {
onBlur() {
if (this.needBlur) {
}
}
},
components: {CubeInput: Input}
};
... ...
<template>
<div class="payment-confirm-wrapper">
</div>
</template>
<script>
export default {
name: 'paymentSheet'
};
</script>
<style lang="scss" scoped>
.payment-confirm-wrapper {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 99;
}
</style>
... ...
... ... @@ -67,7 +67,7 @@ export default {
<style lang="scss" scoped>
.item-content {
width: 100%;
height: 156px;
height: 158px;
overflow: hidden;
border-bottom: 1px solid #f0f0f0;
... ... @@ -115,7 +115,7 @@ export default {
box-sizing: border-box;
.button-container {
margin: 48px 0 0 62px;
margin: 48px 0 0 52px;
button {
width: 130px;
... ... @@ -135,6 +135,8 @@ export default {
background-color: #0c2b4a;
color: #fff;
border-radius: 30px;
border: none;
margin-left: 10px;
}
}
}
... ...
<template>
<div class="product-group">
<div class="product-group" v-if="skcs.length > 0">
<ProductItem
v-for="(skc, i) in skcs"
:key="i" :value="skc"
@on-change-price="onChangePrice"
@on-no-sale="onNoSale"></ProductItem>
</div>
<div class="no-item" v-else>
<div class="no-item-bg"></div>
<p>暂无数据</p>
</div>
</template>
<script>
... ... @@ -31,11 +35,33 @@ export default {
};
</script>
<style scoped>
<style lang="scss" scoped>
.product-group {
position: relative;
width: 690px;
margin: 0 auto;
overflow: hidden;
}
.no-item {
position: relative;
display: flex;
height: 70%;
flex-direction: column;
align-items: center;
justify-content: center;
.no-item-bg {
width: 186px;
height: 242px;
background-image: url("~statics/image/order/ufo-empty.png");
background-size: 100% 100%;
}
p {
color: #999;
line-height: 32px;
}
}
</style>
... ...
... ... @@ -2,7 +2,7 @@
<LayoutApp :title="title" :class="classes">
<ScrollView ref="scroll" :options="scrollOption" @pulling-up="onPullingUp" @pulling-down="onPullingDown">
<div class="order-page">
<div class="title">出售中</div>
<!-- <div class="title">出售中</div>-->
<!--商品详情-->
<div class="product" @click="onClickProduct">
<div class="pro-img">
... ... @@ -197,6 +197,9 @@ export default {
<style lang="scss" scoped>
.order-page {
position: absolute;
width: 100%;
height: 100%;
-webkit-font-smoothing: antialiased;
.title {
... ...
<template>
<LayoutApp :title="title">
<div class="order-page">
<div class="title">出售</div>
<div class="product">
<ImgSize class="pro-img" :src="noEntryOrderInfo.goodsInfo.goodImg || ''" :width="200" :height="200"></ImgSize>
<div class="pro-info">
... ... @@ -99,7 +98,7 @@ export default {
components: {Modal, InputUfo, ScrollView, LayoutApp, ImgSize, Checkbox},
data() {
return {
title: '',
title: '调价',
platformFeeModalVisible: false,
platformFee: {
amount: '-¥0',
... ... @@ -239,12 +238,35 @@ export default {
* @returns {Promise<void>}
*/
async onPriceChangeConfirm({price, skup}) {
const that = this;
const result = await this.postNoEntryChangePrice({
price,
skup
});
console.log(result);
if (result.code === 200 && result.data.orderCode) {
console.log(result);
this.$createOrderPayType({
orderCode: result.data.orderCode,
price: price,
desc: '保证金',
onCloseAction() {
that.$router.replace({
name: 'PriceChangeEntry',
params: {
orderId: result.data.productId
}
});
}
}).show();
} else {
this.$createToast({
txt: result.message || '调价失败',
type: 'txt'
}).show();
}
// console.log(result);
}
}
};
... ... @@ -524,17 +546,22 @@ export default {
}
.submit-button {
position: relative;
width: 100%;
height: 100px;
background-color: #ccc;
button {
width: 100%;
height: 100%;
display: block;
width: 670px;
height: 88px;
border-radius: 60px;
margin: 0 auto;
color: #fff;
background-color: #ccc;
border: none;
}
&.active {
&.active button{
background-color: #0c2b48;
}
}
... ...
<template>
<LayoutApp :show-back="true">
<div class="body">
<div class="header">
<i class="iconfont iconOk icon-class"></i>
</div>
<div class="title">上架成功</div>
<ProductInfo class="product-info" :data="product"></ProductInfo>
<YohoButton :txt="txt" class="btn-class" @on-click="onClick"></YohoButton>
<div class="info">
<div class="item" @click="goPublish">继续发布</div>
<div class="item" @click="goHome">随便逛逛</div>
</div>
</div>
</LayoutApp>
</template>
<script>
import ProductInfo from './components/confirm/buyer-product';
import { createNamespacedHelpers } from 'vuex';
const { mapActions: mapOrderAction } = createNamespacedHelpers('order/orderConfirm');
export default {
name: 'SellPayOk',
props: ['orderCode'],
data() {
return {
txt: '查看商品',
product: {}
};
},
components: {
ProductInfo
},
mounted() {
if (this.orderCode) {
this.fetchOrderGoods({ orderCode: this.orderCode }).then(result => {
this.product = result.data;
});
}
},
methods: {
...mapOrderAction(['fetchOrderGoods']),
onClick() {
},
goPublish() {
},
goHome() {
}
}
};
</script>
<style lang="scss" scoped>
.body {
height: 100%;
margin: 0 32px;
padding-bottom: 140px;
overflow-y: auto;
}
.header {
margin-top: 80px;
text-align: center;
}
.icon-class {
font-size: 120px;
}
.btn-class {
height: 100px;
font-size: 32px;
line-height: 100px;
}
.title {
font-size: 40px;
font-weight: bold;
text-align: center;
margin-bottom: 60px;
}
.product-info {
margin-top: 140px;
margin-bottom: 74px;
}
.info {
font-size: 28px;
display: flex;
margin-top: 30px;
.item {
width: 50%;
text-align: center;
}
.item + .item {
border-left: 1px solid black;
}
}
</style>
... ...
... ... @@ -93,6 +93,7 @@ export default {
txt: result.error,
type: 'txt'
}).show();
return;
}
this.error = false;
});
... ... @@ -122,13 +123,23 @@ export default {
if (orderResult.code !== 200) {
this.$createToast({
time: 1500,
txt: '创建订单失败',
txt: orderResult.message,
type: 'txt'
}).show();
return;
}
this.orderPay = this.$createOrderPayType({
// 从定金中走了钱,不用支付宝
if (orderResult.data.orderCode === 0) {
this.$createToast({
time: 1500,
txt: orderResult.message,
type: 'txt'
}).show();
return;
}
this.$createOrderPayType({
price: this.fee.earnestMoneyStr,
desc: '保证金',
orderCode: orderResult.data.orderCode,
... ...
... ... @@ -4,10 +4,14 @@
<div class="title">相关商品</div>
<div @click="onAllClick">全部 <i class="cubeic-arrow"></i></div>
</div>
<div class="product-item" v-for="(product, idx) in list" :key="idx" @click="onItemClick(product)">
<square-img :src="product.default_images" :width="300" :height="300" />
<div class="name"><span>{{product.product_name}}</span></div>
<div class="price"><i>¥</i>{{product.price}}</div>
<div class="row">
<div class="col" v-for="(product, idx) in list" :key="idx">
<div class="product-item" @click="onItemClick(product)">
<square-img :src="product.default_images" :width="300" :height="300" />
<div class="name"><span>{{product.product_name}}</span></div>
<div class="price"><i>¥</i>{{product.price}}</div>
</div>
</div>
</div>
</div>
</template>
... ... @@ -42,9 +46,6 @@ export default {
.associated-products {
margin-top: 30px;
display: flex;
flex-flow: wrap;
justify-content: space-between;
.header {
padding: 20px 0;
... ... @@ -61,9 +62,19 @@ export default {
color: #000;
}
.row {
overflow: hidden;
margin: -8px;
.col {
width: 33.3333%;
padding: 0 8px;
float: left;
}
}
.product-item {
margin-top: 10px;
width: 30%;
text-align: center;
overflow: hidden;
}
... ...
... ... @@ -174,18 +174,11 @@ export default {
return get(this.productDetail, 'goods_list[0].size_list', null);
},
},
beforeRouteUpdate(to, from, next) {
// const loading = this.createLoading();
this.loadData(to.params.productId);
next();
},
mounted() {
this.loadData(this.productId);
this.imageHideThreadhold = -window.innerWidth * 0.693;
},
activated() {
this.refresh();
this.loadData(this.productId);
},
methods: {
...mapActions(['fetchProductInfo', 'fetchTop3', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct']),
... ... @@ -239,11 +232,21 @@ export default {
});
},
gotoBrand() {
// type: 4,品牌;5,系列
const query = {
type: 5,
};
if (this.productDetail.seriesId) {
query.series = this.productDetail.seriesId;
} else {
query.type = 4;
query.brand = this.productDetail.brandId;
}
this.$router.push({
name: '',
params: {
productId: this.productDetail.product_id,
},
name: 'List',
query,
});
},
showActivity() {
... ... @@ -430,12 +433,13 @@ export default {
}
.recommend {
margin-top: 20px;
padding-top: 20px;
background: #f5f5f5;
h2 {
font-size: 36px;
line-height: 50px;
padding: 20px 0;
padding: 20px 0 0;
margin: 0 40px;
}
}
... ...
... ... @@ -53,7 +53,7 @@ export default function() {
},
async fetchChannelList({ commit }) {
const result = await this.$api.get('/api/ufo/channel/channelList', {
content_code: '9cb6138be8e60c96f48107da481816c3',
content_code: 'c07b807110b342a09bd65d13aeb118f6',
// uid: '64668089',
uid: '500031170',
});
... ...
... ... @@ -38,7 +38,10 @@ export default function() {
list: [],
currentPage: 1,
pageSize: 20,
endReached: false
endReached: false,
tradeType: 0,
startTime: 0,
endTime: 0
},
userWalletInfo: {
totalAmount: 0.00,
... ... @@ -72,7 +75,7 @@ export default function() {
sale: { title: '出售中', num: state.sellerNum, page: ''},
order: {name: 'order'},
resource1: {name: 'resource1', data: state.resource1},
income: {title: '交易收入', num: state.assetData.totalIncome, page: 'tradeIncome'},
income: {title: '交易收入', num: state.assetData.totalIncome, page: 'income'}, // 原交易收入 tradeIncome
buyOrder: {title: '我购买的订单', num: state.buyNum, page: ''},
buy: {name: 'buy', title: '我的求购', num: state.askBuyNum, page: ''},
collect: {name: 'collect', title: '我的收藏', num: state.favoriteNum, page: 'favorite'},
... ... @@ -80,6 +83,33 @@ export default function() {
};
return tabList;
},
getYearMonth(state) {
let beginTime = moment(new Date(state.filterData.beginTime * 1000)).format('YYYY-MM');
let endTime = moment(new Date(state.filterData.endTime * 1000)).format('YYYY-MM');
var a = moment(endTime.split('-'));
var b = moment(beginTime.split('-'));
let yearNum = a.diff(b, 'years');
let monthNum = a.diff(b, 'months');
let beginYear = beginTime.split('-')[0];
let beginMonth = beginTime.split('-')[1];
let yearsData = [];
let monthsData = [];
for (let i = 0; i <= yearNum; i++) {
let year = '' + (Number(beginYear) + i);
yearsData.push({text: year, value: year});
}
for (let i = 0; i <= monthNum; i++) {
let month = Number(beginMonth) + i;
month = month < 10 ? '0' + month : month;
monthsData.push({text: month, value: month});
}
return [yearsData, monthsData];
}
},
mutations: {
... ... @@ -153,6 +183,13 @@ export default function() {
});
state.walletData = Object.assign({}, state.walletData, walletData);
},
changeWalletType(state, data) {
state.walletData.tradeType = data;
},
changeWalletTime(state, {startTime, endTime}) {
state.walletData.startTime = startTime;
state.walletData.endTime = endTime;
},
addUserWalletInfo(state, data) {
state.userWalletInfo = data;
},
... ... @@ -267,9 +304,16 @@ export default function() {
}
},
async fetchWallet({ commit, state }, isRefresh) {
async fetchWallet({ commit, state }, {isRefresh, tradeType = 0, startTime = 0, endTime = 0}) {
if (isRefresh) {
commit('changeWalletType', tradeType);
commit('changeWalletTime', {startTime, endTime});
}
let {isFetching, endReached, currentPage, list, pageSize} = state.walletData;
tradeType = state.walletData.tradeType;
startTime = state.walletData.startTime;
endTime = state.walletData.endTime;
if (isFetching || (!isRefresh && endReached)) {
return;
}
... ... @@ -277,7 +321,7 @@ export default function() {
// commit('assetFetching', {isFetching: true});
let page = isRefresh ? 1 : currentPage + 1;
const result = await this.$api.get('/api/ufo/mine/wallet', {page, limit: pageSize, uid, tradeType: 0});
const result = await this.$api.get('/api/ufo/mine/wallet', {page, limit: pageSize, uid, tradeType, startTime, endTime});
// commit('assetFetching', {isFetching: false});
if (result.code === 200) {
... ...
... ... @@ -82,7 +82,7 @@ export default function() {
});
if (res.code === 200) {
commit('setEntryOrder', res.data);
commit('setNotEntryOrder', res.data);
}
},
},
... ...
... ... @@ -147,8 +147,7 @@ export default function() {
},
async fetchUserStatus() {
// const alipayStatus = await this.$api.get('/api/order/alipay/status');
// const userStatus = await this.$api.get('/api/order/user/status');
const userStatus = await this.$api.get('/api/order/user/status');
},
async submitOrder({ commit }, payload) {
... ... @@ -204,7 +203,7 @@ export default function() {
async payAction(ctx, { orderCode }) {
const payResult = await this.$api.post('/api/order/pay', {
orderCode,
payment: 2
payment: 9
});
if (payResult.code !== 200) {
... ... @@ -212,6 +211,12 @@ export default function() {
}
return payResult;
},
async fetchOrderGoods(ctx, { orderCode }) {
return this.$api.get('/api/order/goods', {
orderCode
});
}
},
getters: {},
... ...
... ... @@ -37,6 +37,8 @@ export default {
});
}
console.log(result);
if (result && result.code === 200) {
commit(Types.FETCH_ORDER_PRODUCT_SUCCESS, {
order: result.data,
... ...
... ... @@ -6,21 +6,25 @@ module.exports = {
},
'/api/ufo/mine/seller/orderSummary': {
ufo: true,
auth: true,
api: 'ufo.seller.orderSummary',
params: {},
},
'/api/ufo/mine/favoriteNum': {
ufo: true,
auth: true,
api: 'ufo.user.favoriteNum',
params: {},
},
'/api/ufo/mine/depositNum': {
ufo: true,
auth: true,
api: 'ufo.deposit.queryUserStorageCount',
params: {},
},
'/api/ufo/mine/assets': {
ufo: true,
auth: true,
api: 'ufo.asssets.details',
params: {
limit: { type: Number },
... ... @@ -29,6 +33,7 @@ module.exports = {
},
'/api/ufo/mine/wallet': {
ufo: true,
auth: true,
api: 'ufo.wallet.queryWalletDetailList',
params: {
tradeType: { type: Number },
... ... @@ -40,16 +45,19 @@ module.exports = {
},
'/api/ufo/mine/userWalletInfo': {
ufo: true,
auth: true,
api: 'ufo.wallet.queryUserWalletInfo',
params: {}
},
'/api/ufo/mine/walletFilter': {
ufo: true,
auth: true,
api: 'ufo.wallet.queryDateAndType',
params: {}
},
'/api/ufo/mine/order/summary': {
ufo: true,
auth: true,
path: '/ufo-gateway/shopping',
api: 'ufo.order.summary',
params: {
... ...
... ... @@ -302,6 +302,14 @@ module.exports = {
params: {}
},
// 定单商品详情
'/api/order/goods': {
ufo: true,
auth: true,
api: 'ufo.buyerOrder.goodsDetail',
params: {}
},
// 订单物流信息
'/api/order/express': {
ufo: true,
... ...