Authored by yyq

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

Showing 32 changed files with 414 additions and 253 deletions
<template>
<div v-transfer-dom :data-transfer="transfer" :class="actionCls">
<transition name="action-sheet-mask">
<div class="yoho-popup-mask" @click="maskClick" v-if="mask && isVisible"></div>
<div
class="yoho-popup-mask"
@click="maskClick"
v-if="mask && isVisible"
></div>
</transition>
<transition name="action-sheet-move">
<div class="yoho-popup" v-show="isVisible" :style="{'z-index': zIndex}">
<div class="yoho-popup-container" :style="{'max-height': maxHeight + 'px', 'height': contentHeight}">
<div class="yoho-popup" v-show="isVisible" :style="{ 'z-index': zIndex }">
<div
class="yoho-popup-container"
:style="{ 'max-height': maxHeight + 'px', height: contentHeight }"
>
<slot></slot>
</div>
</div>
... ... @@ -14,9 +21,9 @@
</template>
<script>
import {mapState} from 'vuex';
import { mapState } from "vuex";
export default {
name: 'YohoActionSheet',
name: "YohoActionSheet",
props: {
maskClosable: {
type: Boolean,
... ... @@ -48,29 +55,33 @@ export default {
},
mounted() {
this.maxHeight = document.documentElement.clientHeight;
this.$watch('visible', (newVal) => {
if (newVal) {
this.show();
} else {
this.hide();
this.$watch(
"visible",
newVal => {
if (newVal) {
this.show();
} else {
this.hide();
}
},
{
immediate: true
}
}, {
immediate: true
});
);
},
computed: {
...mapState(['yoho']),
...mapState(["yoho"]),
actionCls() {
return [{ 'yoho-action-sheet': this.full }];
return [{ "yoho-action-sheet": this.full }];
},
contentHeight() {
let {statusBarHeight, statusBarStatus} = this.yoho.window || {};
let { statusBarHeight, statusBarStatus } = this.yoho.window || {};
if (!statusBarStatus) {
statusBarHeight = 0;
}
return this.full ? `${this.maxHeight - 20 - statusBarHeight}px` : 'auto';
return this.full ? `${this.maxHeight - 20 - statusBarHeight}px` : "auto";
}
},
methods: {
... ... @@ -80,7 +91,7 @@ export default {
cancel() {
this.hide();
this.$emit('cancel');
this.$emit("cancel");
},
show() {
... ... @@ -92,80 +103,71 @@ export default {
}
}
};
</script>
<style lang="scss" scoped>
.action-sheet-move-enter,
.action-sheet-move-leave-active {
transform: translate3d(0, 100%, 0);
}
.action-sheet-move-enter,
.action-sheet-move-leave-to {
opacity: 0.5;
}
.action-sheet-move-enter-active {
transition: all 0.4s cubic-bezier(0, 0.96, 0.14, 1.06);
}
.action-sheet-move-leave-active {
transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.action-sheet-mask-enter,
.action-sheet-mask-leave-to {
opacity: 0;
}
.action-sheet-mask-enter-active {
transition: opacity 0.3s linear;
}
.action-sheet-mask-leave-active {
transition: opacity 0.1s linear;
.action-sheet-move-enter,
.action-sheet-move-leave-active {
transform: translate3d(0, 100%, 0);
}
.action-sheet-move-enter,
.action-sheet-move-leave-to {
opacity: 0.5;
}
.action-sheet-move-enter-active {
transition: all 0.4s cubic-bezier(0, 0.96, 0.14, 1.06);
}
.action-sheet-move-leave-active {
transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.action-sheet-mask-enter,
.action-sheet-mask-leave-to {
opacity: 0;
}
.action-sheet-mask-enter-active {
transition: opacity 0.3s linear;
}
.action-sheet-mask-leave-active {
transition: opacity 0.1s linear;
}
.yoho-popup-mask {
display: block;
position: absolute;
z-index: 99;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.yoho-popup {
width: 100%;
position: fixed;
bottom: 0;
.yoho-popup-container {
position: relative;
opacity: 1;
overflow: hidden;
}
.yoho-popup-mask {
display: block;
&:after {
content: "";
width: 100%;
height: 200px;
position: absolute;
z-index: 99;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.yoho-popup {
width: 100%;
position: fixed;
bottom: 0;
.yoho-popup-container {
background-color: #fff;
position: relative;
opacity: 1;
}
&:after {
content: "";
width: 100%;
height: 200px;
position: absolute;
left: 0;
bottom: -200px;
z-index: -1;
background: #fff;
}
}
.yoho-action-sheet {
.yoho-popup-container {
border-radius: 8PX 8PX 0 0;
overflow: hidden;
}
bottom: -200px;
z-index: -1;
background: #fff;
}
}
</style>
... ...
... ... @@ -22,8 +22,8 @@
</div>
</div>
</slot>
<div name="footer">
<YohoButton txt="确定" class="footer" @click="pay"></YohoButton>
<div class="footer">
<YohoButton txt="确定" class="btn-wrapper" @click="pay"></YohoButton>
</div>
</div>
</YohoActionSheet>
... ... @@ -80,6 +80,8 @@ export default {
position: relative;
display: flex;
flex-direction: column;
border-top-left-radius: 32px 32px;
border-top-right-radius: 32px 32px;
}
.header {
... ... @@ -127,6 +129,20 @@ export default {
.footer {
font-size: 32px;
height: 112px;
background-color: white;
border-top: 1px solid #eee;
display: flex;
align-items: center;
justify-content: center;
}
.btn-wrapper {
width: 640px;
height: 80px;
line-height: 80px;
font-size: 32px;
font-weight: bold;
}
.price-info {
... ...
import createAPI from 'utils/create-api';
export default function addPayType(Vue, PayType) {
createAPI(Vue, PayType, ['closeAction', 'confirmAction'], true);
createAPI(Vue, PayType, ['closeAction', 'confirmAction', 'payError', 'paySuccess'], true);
}
... ...
... ... @@ -22,8 +22,8 @@
</div>
</div>
</slot>
<div name="footer" class="footer">
<YohoButton txt="确定支付" @click="pay"></YohoButton>
<div class="footer">
<YohoButton txt="确定支付" class="btn-wrapper" @click="pay"></YohoButton>
</div>
</div>
</YohoActionSheet>
... ... @@ -37,11 +37,6 @@ import { createNamespacedHelpers } from 'vuex';
const { mapActions: mapOrderAction } = createNamespacedHelpers('order/orderConfirm');
// 支付方式
const PAYMENTS = {
ALIPAY: 18,
};
export default {
name: 'OrderPayType',
props: {
... ... @@ -93,13 +88,21 @@ export default {
this.hide();
this.$emit('closeAction');
},
pay() {
delay(ns) {
return new Promise(resolve => {
setTimeout(resolve, ns);
});
},
async pay() {
this.$emit('confirmAction');
const toast = this.$createToast({
txt: '正在调起支付宝'
txt: '正在调起支付宝',
mask: true
}).show();
await this.delay(1500);
this.payAction({
orderCode: this.orderCode
}).then((result) => {
... ... @@ -111,7 +114,7 @@ export default {
});
},
onError(result) {
this.$emit('on-pay-error');
this.$emit('payError');
this.$createToast({
txt: result.message,
time: 1500,
... ... @@ -120,7 +123,7 @@ export default {
},
onSuccess(result) {
this.hide();
this.$emit('on-pay-success');
this.$emit('paySuccess');
this.$router.push({
name: 'OrderPay',
... ... @@ -139,6 +142,8 @@ export default {
height: 714px;
background: white;
position: relative;
border-top-left-radius: 32px 32px;
border-top-right-radius: 32px 32px;
}
.header {
... ... @@ -172,7 +177,7 @@ export default {
}
.check {
font-size: 40px;
font-size: 50px;
}
.alipay {
... ... @@ -198,9 +203,16 @@ export default {
box-sizing: border-box;
}
.btn-wrapper {
height: 80px;
line-height: 80px;
font-size: 32px;
font-weight: bold;
}
.price-info {
margin-top: 40px;
margin-bottom: 60px;
margin-bottom: 40px;
}
.price {
... ...
... ... @@ -17,8 +17,8 @@
</div>
</div>
</slot>
<div name="footer">
<YohoButton txt="确定" class="footer" @click="pay"></YohoButton>
<div class="footer">
<YohoButton txt="确定" class="btn-wrapper" @click="pay"></YohoButton>
</div>
</div>
</YohoActionSheet>
... ... @@ -75,6 +75,8 @@ export default {
position: relative;
display: flex;
flex-direction: column;
border-top-left-radius: 32px 32px;
border-top-right-radius: 32px 32px;
}
.header {
... ... @@ -121,6 +123,20 @@ export default {
.footer {
font-size: 32px;
height: 112px;
background-color: white;
border-top: 1px solid #eee;
display: flex;
align-items: center;
justify-content: center;
}
.btn-wrapper {
width: 640px;
height: 80px;
line-height: 80px;
font-size: 32px;
font-weight: bold;
}
.price-info {
... ...
<template>
<div class="no-item" v-else>
<div class="no-item">
<div class="no-item-bg">
<div class="no-item-bg-top"></div>
<div class="no-item-bg-bottom"></div>
</div>
<p>{{tip}}</p>
<p>{{ tip }}</p>
</div>
</template>
<script>
export default {
name: 'UfoNoItem',
name: "UfoNoItem",
props: {
tip: String
}
... ... @@ -18,93 +18,93 @@ export default {
</script>
<style lang="scss" scoped>
.no-item {
.no-item {
position: relative;
display: flex;
width: 100%;
min-height: 8rem;
flex-direction: column;
align-items: center;
justify-content: center;
.no-item-bg {
position: relative;
display: flex;
width: 100%;
min-height: 8rem;
flex-direction: column;
align-items: center;
justify-content: center;
.no-item-bg {
position: relative;
width: 186px;
height: 242px;
width: 186px;
height: 242px;
background-size: 100% 100%;
&-top {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 2;
background-image: url("~statics/image/order/ufo-empty-top.png");
background-size: 100% 100%;
&-top {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 2;
background-image: url("~statics/image/order/ufo-empty-top.png");
background-size: 100% 100%;
animation: animateUFO 3s linear infinite;
}
&-bottom {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
background-image: url("~statics/image/order/ufo-empty-bottom.png");
background-size: 100% 100%;
animation: animateLight 3s linear infinite;
}
animation: animateUFO 3s linear infinite;
}
p {
color: #999;
line-height: 32px;
&-bottom {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
background-image: url("~statics/image/order/ufo-empty-bottom.png");
background-size: 100% 100%;
animation: animateLight 3s linear infinite;
}
}
@keyframes animateUFO {
0% {
transform: translateY(0px);
}
p {
color: #999;
line-height: 32px;
}
}
25% {
transform: translateY(10px);
}
@keyframes animateUFO {
0% {
transform: translateY(0px);
}
50% {
transform: translateY(0px);
}
25% {
transform: translateY(10px);
}
75% {
transform: translateY(10px);
}
50% {
transform: translateY(0px);
}
100% {
transform: translateY(0px);
}
75% {
transform: translateY(10px);
}
@keyframes animateLight {
0% {
transform: skewX(0deg);
}
100% {
transform: translateY(0px);
}
}
25% {
transform: skewX(10deg);
}
@keyframes animateLight {
0% {
transform: skewX(0deg);
}
50% {
transform: skewX(0deg);
}
25% {
transform: skewX(10deg);
}
75% {
transform: skewX(-10deg);
}
50% {
transform: skewX(0deg);
}
100% {
transform: skewX(0deg);
}
75% {
transform: skewX(-10deg);
}
100% {
transform: skewX(0deg);
}
}
</style>
... ...
... ... @@ -64,7 +64,7 @@ export default {
height: 80px;
top: 10px;
right: 0;
background: linear-gradient(#fff, #f0f0f0, #fff);
background: linear-gradient(#fff, #E0E0E0, #fff);
}
}
}
... ... @@ -76,7 +76,6 @@ export default {
}
.order-text {
padding-top: 10px;
font-size: 24;
color: #444;
text-align: center;
... ...
... ... @@ -73,7 +73,7 @@ export default {
width: 100%;
line-height: 90px;
font-size: 24px;
color: #D0021B;
color: #000;
padding-left: 20px;
overflow: hidden;
text-overflow: ellipsis;
... ...
<template>
<div class="tab-item" :class="itemClass" @click="goPage(data)">
<div class="title" :class="titleClass">{{ data.title }}</div>
<i v-if="icon" class="tab-icon" :class=icon></i>
<div v-if="data.title" class="title" :class="titleClass">{{ data.title }}</div>
<slot
><div class="text">{{ data.num }}</div></slot
>
... ... @@ -39,6 +40,10 @@ export default {
titleSmall: {
type: Boolean,
default: false
},
icon: {
type: String,
default: ''
}
},
data() {
... ... @@ -55,7 +60,7 @@ export default {
titleClass() {
return {
"title-bold": this.titleBold,
"title-size": this.titleSmall
"title-small": this.titleSmall
};
}
},
... ... @@ -89,14 +94,19 @@ export default {
height: 120px;
line-height: 120px;
}
.tab-icon {
font-size: 36px;
color: #444;
}
.small {
height: 90px;
line-height: 90px;
}
.title-small {
font-size: 30px;
}
.grey {
background-color: #f5f7f9;
background-color: #F2F2F2;
margin: 0 -40px;
padding: 0 40px;
}
... ... @@ -116,10 +126,6 @@ export default {
font-weight: bold;
}
.title-size {
font-size: 28px;
}
.text {
font-family: "Alte DIN 1451 Mittelschrift";
color: black;
... ... @@ -128,7 +134,7 @@ export default {
}
.cubeic-arrow {
color: #d8d8d8;
color: #999;
margin-left: 10px;
font-size: 32px;
}
... ...
... ... @@ -2,7 +2,7 @@
<LayoutApp :show-back="true">
<div class="body" ref="body">
<div v-for="(value, key) in getMineList" :key="key">
<tab-item v-if="key === 'board'" :data="value" noLine titleBold titleSmall small grey>
<tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey>
<scroll></scroll>
</tab-item>
<template v-else-if="key === 'resource1' || key === 'resource2'">
... ... @@ -10,9 +10,12 @@
<singleImage :data="value.data.data[0]"></singleImage>
</div>
</template>
<order v-else-if="key === 'order'"></order>
<tab-item v-else-if="key === 'sale'" :data="value" noLine titleBold></tab-item>
<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>
</div>
<tab-item v-else :data="value"></tab-item>
</div>
</div>
... ... @@ -64,4 +67,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;
margin-bottom: 20px;
}
</style>
... ...
... ... @@ -25,10 +25,10 @@ import ProductInfo from './components/confirm/buyer-product';
import AddressInfo from './components/confirm/address';
import TitleComp from './components/confirm/title';
import BuyerFeeInfo from './components/confirm/buyer-fee';
import OrderInfo from './components/confirm/order-info';
import OrderInfo from './components/confirm/buyer-order-info';
import OrderFooter from './components/confirm/buyer-order-footer';
import Coupon from './components/confirm/coupon';
import Promotion from './components/confirm/promotion';
import Coupon from './components/confirm/buyer-coupon';
import Promotion from './components/confirm/buyer-promotion';
import { Types, UserType } from 'store/order/order-confirm';
import { get } from 'lodash';
... ... @@ -213,7 +213,7 @@ export default {
.body {
height: 100%;
margin: 0 40px;
padding-bottom: 100px;
padding-bottom: 180px;
overflow-y: auto;
}
... ...
... ... @@ -19,6 +19,10 @@ export default {
desc: {
type: String,
default: ''
},
url: {
type: String,
default: ''
}
},
components: {
... ... @@ -41,7 +45,9 @@ export default {
this.$emit('input', this.val);
},
onLinkClick() {
if (this.url) {
}
}
}
};
... ... @@ -51,6 +57,10 @@ export default {
.agree {
font-size: 24px;
color: #999;
height: 76px;
background-color: white;
padding: 0 40px;
line-height: 76px;
}
.link {
... ...
... ... @@ -48,7 +48,7 @@ export default {
.red {
font-size: 36px;
color: red;
color: #d0021b;
font-weight: bold;
}
</style>
... ...
<template>
<div class="agree-wrapper">
<Agree :desc="desc" :value="buyAgree" @input="changeAgree"></Agree>
<div class="order-footer-wrapper">
<div class="btn1">
<span>待支付:<span class="red">¥{{amount}}</span></span>
<div>实付金额:<span class="red">¥{{amount}}</span></div>
<div class="desc">本次交易由闲鱼x有货提供服务</div>
</div>
<YohoButton class="btn2" txt="去支付" @click="onClick"></YohoButton>
<YohoButton class="btn2" txt="去支付" @click="onClick" :disable="!buyAgree"></YohoButton>
</div>
</div>
</template>
<script>
import Agree from './agree';
import { createNamespacedHelpers } from 'vuex';
import { Types } from 'store/order/order-confirm';
const { mapState: mapOrderState, mapMutations: mapOrderMutations } = createNamespacedHelpers('order/orderConfirm');
export default {
name: 'BuyerOrderFooter',
props: ['amount'],
components: {
Agree
},
data() {
return {
desc: '有货买家协议'
};
},
computed: {
...mapOrderState(['buyAgree'])
},
methods: {
...mapOrderMutations([Types.CHANGE_BUY_AGREE]),
onClick() {
this.$emit('click');
},
changeAgree(val) {
this[Types.CHANGE_BUY_AGREE](val);
}
}
};
... ... @@ -24,25 +49,39 @@ export default {
.order-footer-wrapper {
width: 100%;
border-top: 1px solid #eee;
padding: 0 40px;
height: 120px;
display: flex;
align-items: center;
}
.agree-wrapper {
border-top: 1px solid #eee;
}
.btn1 {
flex: 1;
font-size: 24px;
text-align: center;
line-height: 120px;
text-align: left;
}
.btn2 {
width: 300px;
font-size: 36px;
width: 220px;
height: 80px;
line-height: 80px;
font-size: 24px;
}
.red {
font-size: 36px;
color: red;
font-size: 28px;
color: #d0021b;
font-weight: bolder;
}
.desc {
margin-top: 8px;
font-size: 20px;
color: #999;
}
</style>
... ...
... ... @@ -40,7 +40,8 @@ export default {
.input-wrapper {
display: flex;
position: relative;
height: 100px;
overflow: hidden;
height: 120px;
background: #f5f5f5;
}
... ... @@ -50,18 +51,20 @@ export default {
margin-right: 10px;
font-size: 40px;
font-weight: bolder;
line-height: 100px;
line-height: 120px;
}
.tip {
flex: 1;
font-size: 28px;
line-height: 100px;
font-size: 56px;
font-weight: 500;
line-height: 120px;
background: #f5f5f5;
}
::placeholder {
color: #ccc;
font-size: 28px;
opacity: 1; /* Firefox */
}
... ...
... ... @@ -115,7 +115,7 @@ export default {
.fee {
font-size: 28px;
color: red;
color: #d0021b;
}
.icon-class {
... ...
... ... @@ -32,7 +32,7 @@ export default {
}
.red {
color: red;
color: #d0021b;
}
.tip2 {
... ...
... ... @@ -96,9 +96,10 @@ export default {
asyncData({ store, router }) {
// store.dispatch("order/orderDetail/fetchOrderDetail", router.params);
},
mounted() {
activated() {
this.fetchOrderDetail(this.$route.params);
},
mounted() {},
computed: {
...mapState(["orderDetail"]),
...mapGetters(["lastExpressInfo", "priceInfo", "actionList"])
... ... @@ -112,9 +113,9 @@ export default {
<style lang="scss" scoped>
.order-detail-wrapper {
// footer高度120px
padding: 24px 40px 144px 40px;
padding: 0 40px;
-webkit-box-orient: vertical;
height: 100vh;
height: calc(100vh - 90px);
overflow-x: hidden;
overflow-y: auto;
font-size: 24px;
... ...
... ... @@ -102,7 +102,8 @@ export default {
asyncData({ store, router }) {
// store.dispatch("order/orderDetail/fetchOrderDetail", router.params);
},
mounted() {
mounted() {},
activated() {
this.fetchOrderDetail(this.$route.params);
},
computed: {
... ... @@ -123,9 +124,9 @@ export default {
<style lang="scss" scoped>
.order-detail-wrapper {
// footer高度120px
padding: 24px 40px 144px 40px;
padding: 0 40px;
-webkit-box-orient: vertical;
height: 100vh;
height: calc(100vh - 90px);
overflow-x: hidden;
overflow-y: auto;
font-size: 24px;
... ...
... ... @@ -11,7 +11,7 @@ const ALIPAY_DOMAIN = 'https://openapi.alipay.com/gateway.do';
export default {
name: 'PayPage',
props: ['orderCode', 'payParams'],
props: ['orderCode', 'payParams', 'extra'],
mounted() {
if (this.payParams) {
const url = ALIPAY_DOMAIN + '?' + this.payParams;
... ...
... ... @@ -10,7 +10,9 @@
</div>
<div class="footer">
<OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc"></OrderAgree>
<YohoButton :txt="txt" @click="onClick" :disable="!agree"></YohoButton>
<div class="btn-wrapper">
<YohoButton :txt="txt" class="submit-btn" @click="onClick" :disable="!agree"></YohoButton>
</div>
</div>
</LayoutApp>
</template>
... ... @@ -162,13 +164,6 @@ export default {
</script>
<style lang="scss" scoped>
.footer {
position: absolute;
bottom: 0;
width: 100%;
z-index: 1;
}
.body {
height: 100%;
margin: 0 40px;
... ... @@ -185,11 +180,27 @@ export default {
border-top: 1px solid #eee;
}
.agree-wrapper {
height: 60px;
background-color: white;
.footer {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #eee;
z-index: 1;
}
.btn-wrapper {
margin-bottom: 40px;
padding: 0 40px;
line-height: 60px;
}
.agree-wrapper {
padding: 0 50px;
}
.submit-btn {
height: 80px;
line-height: 80px;
font-size: 28px;
}
</style>
... ...
... ... @@ -17,10 +17,12 @@
<size-list class="select-content size-list" :list="list" :addSize="canAddSize" :selected="selectedSize"
@select="onSelectSize"
@add="onAdd" />
<div class="footer">
<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: isTradable }">{{config.title}}</cube-button>
</div>
<transition name="slide-up">
<div class="footer" v-if="isTradable">
<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>
</div>
</transition>
</div>
</div>
</action-sheet>
... ... @@ -275,6 +277,7 @@ export default {
justify-content: space-between;
@include cube-ufo-btn;
span {
font-size: 28px;
... ... @@ -284,4 +287,14 @@ export default {
}
}
}
.slide-up-enter,
.slide-up-leave-to {
transform: translateY(60%);
opacity: 0;
}
.slide-up-enter-active,
.slide-up-leave-active {
transition: all 0.3s ease-in;
}
</style>
... ...
... ... @@ -261,6 +261,8 @@ export default {
this.showSizeSelectSheet = false;
},
buy() {
this.$yoho.auth();
this.selectSizeConfig = {
dest: 'OrderBuyConfirm',
type: 'buy',
... ... @@ -272,6 +274,8 @@ export default {
this.showBuySheet = false;
},
sell() {
this.$yoho.auth();
this.selectSizeConfig = {
dest: 'OrderSellConfirm',
type: 'sell',
... ... @@ -401,7 +405,7 @@ export default {
}
&-list {
line-height: 120px;
line-height: 104px; // PM: 60 -> 52
white-space: nowrap;
&-item {
... ...

1.72 KB | W: | H:

2.65 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.74 KB | W: | H:

2.66 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -92,7 +92,7 @@ export default function() {
},
getMineList(state) {
let tabList = {
board: { title: '公告栏', page: 'noticeList' },
board: { title: '', page: 'noticeList' },
sale: {
title: '出售中',
num: state.sellerNum,
... ... @@ -124,16 +124,16 @@ export default function() {
page: 'favorite',
},
coupon: {
name: 'coupon',
title: '我的优惠券',
num: state.couponNum,
page: ''
},
service: {
name: 'service',
title: '我的客服',
page: 'service'
},
name: 'coupon',
title: '我的优惠券',
num: state.couponNum,
page: ''
},
service: {
name: 'service',
title: '我的客服',
page: 'service'
},
resource2: { name: 'resource2', data: state.resource2 },
};
... ...
... ... @@ -11,7 +11,8 @@ export const Types = {
CHANGE_SELECT_COUPON_LIST: 'CHANGE_SELECT_COUPON_LIST',
CHANGE_SELECT_PROMOTION: 'CHANGE_SELECT_PROMOTION',
COMPUTE_ORDER: 'COMPUTE_ORDER',
UPDATE_ORDER: 'UPDATE_ORDER'
UPDATE_ORDER: 'UPDATE_ORDER',
CHANGE_BUY_AGREE: 'CHANGE_BUY_AGREE'
};
export const UserType = {
... ... @@ -40,6 +41,7 @@ export default function() {
userStatus: false,
price: '',
agree: false,
buyAgree: false,
orderDetail: {},
selectedCouponList: [],
... ... @@ -59,6 +61,9 @@ export default function() {
[Types.CHANGE_AGREE](state, data) {
state.agree = data;
},
[Types.CHANGE_BUY_AGREE](state, data) {
state.buyAgree = data;
},
[Types.FETCH_ORDER_BUY_ORDER](state, data) {
state.orderDetail = data;
},
... ...
... ... @@ -4,7 +4,12 @@ import { get } from 'lodash';
export default {
async fetchProductInfo({commit}, {productId}) {
const queryTasks = ['', '/fav', '/resource', '/activity', '/recommend'].map(path => {
return this.$api.get(`/api/ufo/product${path}`, {product_id: productId}).then(result => {
let paramKey = 'product_id';
if (path === '/fav') {
paramKey = 'productId';
}
return this.$api.get(`/api/ufo/product${path}`, {[paramKey]: productId}).then(result => {
if (result.code === 200) {
return result.data;
} else {
... ...
... ... @@ -12,10 +12,10 @@ module.exports = {
// 查询是否收藏
'/api/ufo/product/fav': {
ufo: true,
auth: false,
auth: true,
api: 'ufo.user.isFavorite',
params: {
product_id: {type: Number}, // 商品id
productId: {type: Number}, // 商品id
},
},
... ...