Authored by TaoHuang

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

... ... @@ -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>
... ...
... ... @@ -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;
}
}
... ...
<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;
... ...
... ... @@ -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"]),
... ...
... ... @@ -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;
}
}
... ...
... ... @@ -82,7 +82,7 @@ export default function() {
});
if (res.code === 200) {
commit('setEntryOrder', res.data);
commit('setNotEntryOrder', res.data);
}
},
},
... ...