Commit 9b9f044e authored by FE-安焕焕's avatar FE-安焕焕 👣

Merge branch 'master' of git.quantgroup.cn:ui/cauchy-ui

Conflicts:
	src/views/home/index.less
	src/views/vipLife/components/AccountInput.vue
parents 28d55cab c230cf61
...@@ -104,7 +104,6 @@ strong { ...@@ -104,7 +104,6 @@ strong {
} }
.Vl__panel-tips { .Vl__panel-tips {
color: @text-grey; color: @text-grey;
min-height: 143px;
p { p {
.text-14(); .text-14();
margin-bottom: @padding-xs; margin-bottom: @padding-xs;
......
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
@padding-xl: @padding-unit * 8; @padding-xl: @padding-unit * 8;
// Font // Font
@font-size-list: 10,11, 12, 13, 14, 15, 16, 17, 18, 20, 24, 26, 28, 30, 52; @font-size-list: 10,11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 52;
.generate-text(14); .generate-text(15);
.generate-text(@n, @i: 1) when (@i =< @n) { .generate-text(@n, @i: 1) when (@i =< @n) {
@font: extract(@font-size-list, @i); @font: extract(@font-size-list, @i);
.text-@{font} { .text-@{font} {
......
...@@ -56,6 +56,9 @@ export default { ...@@ -56,6 +56,9 @@ export default {
}; };
}, },
computed: { computed: {
maxLength() {
return this.info.type !== 101 ? 13 : 30;
},
accountMask: { accountMask: {
get() { get() {
return this.info.type !== 101 ? this.phoneFormat(this.value) : this.value; return this.info.type !== 101 ? this.phoneFormat(this.value) : this.value;
...@@ -81,6 +84,7 @@ export default { ...@@ -81,6 +84,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.Vl { .Vl {
&__account { &__account {
padding: 0 @padding-lg;
position: relative; position: relative;
@{deep} .cr-field { @{deep} .cr-field {
padding: @padding-xs + 2 0; padding: @padding-xs + 2 0;
......
...@@ -13,8 +13,12 @@ ...@@ -13,8 +13,12 @@
}" }"
@click="item.hasStock && parent.handleSkuSelected(item, index)" @click="item.hasStock && parent.handleSkuSelected(item, index)"
> >
<div v-font-resize class="Vl__sku-name"> <div v-if="props.showUnit" class="Vl__sku-name unit">
{{ props.threeCol ? item.salePrice : item.skuName }}{{ props.showUnit ? '' : '' }} {{ props.threeCol ? item.salePrice : item.skuName }}
<span></span>
</div>
<div v-else v-font-resize class="Vl__sku-name">
{{ props.threeCol ? item.salePrice : item.skuName }}
</div> </div>
<div class="Vl__sku-price">售价{{ item.price }}</div> <div class="Vl__sku-price">售价{{ item.price }}</div>
</div> </div>
...@@ -95,7 +99,7 @@ export default { ...@@ -95,7 +99,7 @@ export default {
content: ' '; content: ' ';
background: @gray-2; background: @gray-2;
.text-10(); .text-10();
border-radius: 0 @border-radius-sm - 2 0 @border-radius-sm - 2; border-radius: 0 @border-radius-sm - 4 0 @border-radius-sm - 2;
padding: 0 @padding-unit; padding: 0 @padding-unit;
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -150,6 +154,12 @@ export default { ...@@ -150,6 +154,12 @@ export default {
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
flex-shrink: 0; flex-shrink: 0;
overflow: hidden; overflow: hidden;
&.unit {
.text-22();
}
span {
.text-14();
}
} }
&-price { &-price {
color: @gray-5; color: @gray-5;
......
...@@ -170,6 +170,10 @@ export default { ...@@ -170,6 +170,10 @@ export default {
&_active { &_active {
box-shadow: 0px 2px 12px 0px rgba(100, 101, 102, 0.12); box-shadow: 0px 2px 12px 0px rgba(100, 101, 102, 0.12);
transform: scale(1.03); transform: scale(1.03);
.Vl__spu-name {
font-weight: @font-weight-bold;
color: @text-color;
}
} }
} }
&-name { &-name {
......
@import '../../style/mixins.less';
@bottom-height: 60px; @bottom-height: 60px;
.vip-life {
overflow: hidden;
}
@{deep} .Vl { @{deep} .Vl {
&__tabs {
.cr-tabs__item--active {
.cr-tabs__text {
font-weight: bold;
}
}
}
&__panel { &__panel {
height: 100%;
background-color: @white; background-color: @white;
border-radius: @border-radius-lx @border-radius-lx 0 0; border-radius: @border-radius-lx @border-radius-lx 0 0;
padding: @padding-lg @padding-lg @bottom-height; padding-top: @padding-lg;
min-height: 340px;
position: relative;
&-placeholder { &-placeholder {
margin-bottom: -@padding-lg; margin-bottom: -@padding-lg;
} }
...@@ -13,7 +23,18 @@ ...@@ -13,7 +23,18 @@
color: @text-color; color: @text-color;
.text-16(); .text-16();
font-weight: @font-weight-bold - 100; font-weight: @font-weight-bold - 100;
margin: @padding-lg + @padding-unit 0 @padding-sm; padding: @padding-lg + @padding-unit 0 @padding-sm;
}
&-content {
height: calc(100vh - @bottom-height - 121px - 44px - 48px);
padding: 0 @padding-lg;
overflow-y: scroll;
&::-webkit-scrollbar {
display:none;
}
&.has-input {
height: 47.6vh;
}
} }
&-loading { &-loading {
position: absolute; position: absolute;
...@@ -44,6 +65,13 @@ ...@@ -44,6 +65,13 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.iphonex-fix-padding();
.cr-button {
font-size: 16px;
span {
font-weight: @font-weight-bold;
}
}
} }
} }
\ No newline at end of file
<template> <template>
<div class="page page__nopad"> <div class="page page__nopad vip-life">
<cr-tabs v-model="currentTab" @click="handleTabChange"> <cr-tabs v-model="currentTab" class="Vl__tabs" @click="handleTabChange">
<cr-tab v-for="(item, index) in spuData" :key="index" :title="item.name" :name="+item.type" /> <cr-tab v-for="(item, index) in spuData" :key="index" :title="item.name" :name="+item.type" />
</cr-tabs> </cr-tabs>
<spu-list ref="spuList" :list="spuList" :info="spuInfo" @scroll="handleSpuScroll" /> <spu-list ref="spuList" :list="spuList" :info="spuInfo" @scroll="handleSpuScroll" />
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<account-input v-if="spuInfo.rechargeAccountType !== 2" v-model="account" :info="spuInfo" /> <account-input v-if="spuInfo.rechargeAccountType !== 2" v-model="account" :info="spuInfo" />
<div v-else class="Vl__panel-placeholder" /> <div v-else class="Vl__panel-placeholder" />
</template> </template>
<div class="Vl__panel-content" :class="{ 'has-input': spuInfo.rechargeAccountType !== 2 }">
<div class="Vl__panel-title">充值类型</div> <div class="Vl__panel-title">充值类型</div>
<sku-list :list="skuList" :info="skuInfo" :show-unit="false" /> <sku-list :list="skuList" :info="skuInfo" :show-unit="false" />
<div v-show="showLoading" class="Vl__panel-loading"> <div v-show="showLoading" class="Vl__panel-loading">
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
<p>充值类商品售出后无法进行退换,非充值用户请谨慎购买。</p> <p>充值类商品售出后无法进行退换,非充值用户请谨慎购买。</p>
</div> </div>
</div> </div>
</div>
<div class="Vl__bottom"> <div class="Vl__bottom">
<cr-button type="primary" block shape="circle" :disabled="disabled" @click="goOrder"> <cr-button type="primary" block shape="circle" :disabled="disabled" @click="goOrder">
立即充值 立即充值
...@@ -40,6 +42,7 @@ import SpuList from './components/SpuList.vue'; ...@@ -40,6 +42,7 @@ import SpuList from './components/SpuList.vue';
import SkuList from './components/SkuList.vue'; import SkuList from './components/SkuList.vue';
import AccountInput from './components/AccountInput.vue'; import AccountInput from './components/AccountInput.vue';
import { throttle } from '@/service/utils.service'; import { throttle } from '@/service/utils.service';
import { isPhone } from '@/service/validation.service';
import { ITEM_WIDTH } from './components/constant'; import { ITEM_WIDTH } from './components/constant';
export default { export default {
name: 'VipLife', name: 'VipLife',
...@@ -161,6 +164,9 @@ export default { ...@@ -161,6 +164,9 @@ export default {
goOrder: throttle(async function() { goOrder: throttle(async function() {
if (!this.account && this.spuInfo.rechargeAccountType !== 2) if (!this.account && this.spuInfo.rechargeAccountType !== 2)
return this.$toast.fail('请填写账号!'); return this.$toast.fail('请填写账号!');
if (this.spuInfo.type !== 101 && !isPhone(this.account)) {
return this.$toast.fail('请填写正确的手机号!');
}
if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!'); if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!');
this.$track.registeredEvents('h5_OtherRechargePageRechargeNowClick', { this.$track.registeredEvents('h5_OtherRechargePageRechargeNowClick', {
classify_name: this.spuData[this.currentTab - 1].name, classify_name: this.spuData[this.currentTab - 1].name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment