Browse Source

Merge branch 'master' of http://8.134.10.79:3000/Leadfyy.co/ec.uniapp-master

# Conflicts:
#	pages.json
#	pages/store/cart/cart.vue
master
Enzo 4 years ago
parent
commit
7eb3bdb5e0
  1. 8
      common/styles/iconfont.css
  2. 1
      components/index-banner/index-banner.vue
  3. 54
      components/lf-code/helper.js
  4. 2
      components/lf-code/index.js
  5. 88
      components/lf-code/lf-barcode.vue
  6. 85
      components/lf-code/lf-qrcode.vue
  7. 31
      components/lf-indexFind/lf-indexFind.vue
  8. 104
      components/lf-indexShopMatrix/lf-indexShopMatrix.vue
  9. 11
      components/lf-multiColumnAd/lf-multiColumnAd.vue
  10. 8
      components/lf-nav/lf-nav.vue
  11. 8
      components/lf-seckill/lf-seckill.vue
  12. 149
      components/lf-tabbar/animate.scss
  13. 182
      components/lf-tabbar/lf-tabbar-box.vue
  14. 259
      components/lf-tabbar/lf-tabbar-item.vue
  15. 128
      components/lf-tabbar/lf-tabbar.vue
  16. 121
      components/lf-tabbar/style.scss
  17. 10
      components/lf-tabbar/utils.js
  18. 38
      pages.json
  19. 5
      pages/discover/discover.vue
  20. 5
      pages/index/category/category.vue
  21. 142
      pages/index/eventRegistration/eventRegistration.vue
  22. 34
      pages/index/index/index.vue
  23. 279
      pages/point/shoppingMall/shoppingMall.vue
  24. 199
      pages/user/member/code.vue
  25. 9
      pages/user/my/center.vue
  26. 1
      pages/user/my/my.vue
  27. 2
      pages/user/my/myEventRegistrationList.vue
  28. 5
      pages/user/personal/personal.vue
  29. 16
      store/index.js

8
common/styles/iconfont.css

@ -1,11 +1,11 @@
@font-face {
font-family: "lf-iconfont"; /* Project id 2779107 */
src: url('//at.alicdn.com/t/font_2779107_oxe2x6h7xg.woff2?t=1630658615119') format('woff2'),
url('//at.alicdn.com/t/font_2779107_oxe2x6h7xg.woff?t=1630658615119') format('woff'),
url('//at.alicdn.com/t/font_2779107_oxe2x6h7xg.ttf?t=1630658615119') format('truetype');
src: url('//at.alicdn.com/t/font_2779107_qs77qtmfs2o.woff2?t=1630663119031') format('woff2'),
url('//at.alicdn.com/t/font_2779107_qs77qtmfs2o.woff?t=1630663119031') format('woff'),
url('//at.alicdn.com/t/font_2779107_qs77qtmfs2o.ttf?t=1630663119031') format('truetype');
}
.iconfont {
.lf-iconfont {
font-family: "lf-iconfont" !important;
font-size: 16px;
font-style: normal;

1
components/index-banner/index-banner.vue

@ -143,7 +143,6 @@ export default {
height: 100% !important;
object-fit: cover;
vertical-align: middle !important;
border-radius: 0 0 30rpx 30rpx;
}
}

54
components/lf-code/helper.js

@ -0,0 +1,54 @@
// 判断arr是否为一个数组,返回一个bool值
function isArray(arr) {
return Object.prototype.toString.call(arr) === '[object Array]';
}
// 深度克隆
function deepClone(obj) {
// 对常见的“非”值,直接返回原来值
if ([null, undefined, NaN, false].includes(obj)) return obj;
if (typeof obj !== "object" && typeof obj !== 'function') {
//原始类型直接返回
return obj;
}
var o = isArray(obj) ? [] : {};
for (let i in obj) {
if (obj.hasOwnProperty(i)) {
o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
}
}
return o;
}
function getUUid(len = 32, firstU = true, radix = null) {
let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
let uuid = [];
radix = radix || chars.length;
if (len) {
// 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
} else {
let r;
// rfc4122标准要求返回的uuid中,某些位为固定的字符
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4';
for (let i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
}
}
}
// 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
if (firstU) {
uuid.shift();
return 'u' + uuid.join('');
} else {
return uuid.join('');
}
}
export {
deepClone,
getUUid
};

2
components/lf-code/index.js
File diff suppressed because it is too large
View File

88
components/lf-code/lf-barcode.vue

@ -0,0 +1,88 @@
<template>
<view>
<!-- #ifdef MP-WEIXIN -->
<canvas :canvas-id="item.id" :id="item.id" :style="{width:width,height: height}" v-for="(item,index) in listCode" :key="item.id" />
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<canvas :canvas-id="id" :id="id" :style="{width:width,height: height}" />
<!-- #endif -->
</view>
</template>
<script>
import QRCODE from './index.js';
import { getUUid, deepClone } from './helper.js'
export default {
name: 'WBarcode',
props:{
options:{
type: Object,
required: true,
default: () =>{
return {
}
}
}
},
data () {
return {
listCode: [],
id: getUUid(),
height: null,
width: null,
}
},
created() {
// https://ext.dcloud.net.cn/plugin?id=4662
this.height = this.options.height + 'rpx';
this.width = this.options.width + 'rpx';
this.SpecialTreatment(this.options)
this.$nextTick(()=>{
this.generateCode();
})
},
watch: {
options:{
deep: true,
handler (val) {
this.height = val.height + 'rpx';
this.width = val.width + 'rpx';
this.SpecialTreatment(val)
// #ifdef H5
setTimeout(()=>{// h5canvas
this.generateCode();
},50)
// #endif
// #ifdef APP-NVUE || APP-PLUS || MP || QUICKAPP-WEBVIEW || QUICKAPP-WEBVIEW-HUAWEI || QUICKAPP-WEBVIEW-UNION
this.generateCode();
// #endif
}
}
},
methods: {
SpecialTreatment (val) {//canvas
// #ifdef MP-WEIXIN
let obj = deepClone(val);
this.id = obj.id = getUUid();
this.listCode = [obj]
// #endif
},
generateCode () {
try{
const parameter = {...this.options,id: this.id,ctx: this};
QRCODE.BarCode(parameter,(res)=>{
this.$emit('generate',res)
})
}catch(err){}
},
async saveImg (){
try{
const res = await QRCODE.SaveImg({id: this.id,width: this.width,height: this.width,ctx: this});
return res
}catch(e){}
}
}
}
</script>

85
components/lf-code/lf-qrcode.vue

@ -0,0 +1,85 @@
<template>
<view>
<!-- #ifdef MP-WEIXIN -->
<canvas :canvas-id="item.id" :id="item.id" :style="{width:size,height: size}" v-for="(item,index) in listCode" :key="item.id" />
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<canvas :canvas-id="id" :id="id" :style="{width:size,height: size}" />
<!-- #endif -->
</view>
</template>
<script>
import QRCODE from './index.js';
import { getUUid, deepClone } from './helper.js'
export default {
name: 'WQrcode',
props:{
options:{
type: Object,
required: true,
default: () =>{
return {
}
}
}
},
data () {
return {
listCode:[],
id: getUUid(),
size: null,
}
},
created() {
// https://ext.dcloud.net.cn/plugin?id=4662
this.size = this.options.size + 'rpx';
this.SpecialTreatment(this.options)
this.$nextTick(()=>{
this.generateCode();
})
},
watch: {
options:{
deep: true,
handler (val) {
this.size = val.size +'rpx';
this.SpecialTreatment(val)
// #ifdef H5
setTimeout(()=>{// h5canvas
this.generateCode();
},50)
// #endif
// #ifdef APP-NVUE || APP-PLUS || MP || QUICKAPP-WEBVIEW || QUICKAPP-WEBVIEW-HUAWEI || QUICKAPP-WEBVIEW-UNION
this.generateCode();
// #endif
}
}
},
methods: {
SpecialTreatment (val) {//canvas
// #ifdef MP-WEIXIN
let obj = deepClone(val);
this.id = obj.id = getUUid();
this.listCode = [obj]
// #endif
},
generateCode () {
try{
const parameter = {...this.options,id: this.id,ctx: this};
QRCODE.QRCode(parameter,(res)=>{
this.$emit('generate',res)
})
}catch(err){}
},
async saveImg (){
try{
const res = await QRCODE.SaveImg({id: this.id,width: this.size,height: this.size,ctx: this});
return res
}catch(e){}
}
}
}
</script>

31
components/lf-indexFind/lf-indexFind.vue

@ -1,13 +1,16 @@
<template>
<scroll-view class="find-scroll" :scroll-x="true">
<view class="find-content">
<view class="find-item" :class="{'max-item': index == 0}" v-for="(item, index) in 5" :key="index">
<image class="img" src="https://picsum.photos/200/300"></image>
<view class="lf-line-2 info">南边开风儿吹北边放花儿开西边来春归去东边来北边跑</view>
<view class="centent">
<view class="title">精选发现好物</view>
<scroll-view class="find-scroll" :scroll-x="true">
<view class="find-content">
<view class="find-item" :class="{'max-item': index == 0}" v-for="(item, index) in 5" :key="index">
<image class="img" src="https://picsum.photos/200/300"></image>
<view class="lf-line-2 info">南边开风儿吹北边放花儿开西边来春归去东边来北边跑</view>
</view>
</view>
</view>
<view style="height: 10rpx;"></view>
</scroll-view>
<view style="height: 10rpx;"></view>
</scroll-view>
</view>
</template>
<script>
@ -27,8 +30,18 @@
</script>
<style lang="scss" scoped="scoped">
.centent{
padding-top: 60rpx;
}
.title{
font-size: 36rpx;
font-weight: bold;
text-align: center;
color: #222222;
margin-bottom: 30rpx;
}
.find-scroll{
padding: 30rpx 32rpx;
padding: 0rpx 32rpx;
width: 750rpx;
height: max-content;
box-sizing: border-box;

104
components/lf-indexShopMatrix/lf-indexShopMatrix.vue

@ -1,10 +1,13 @@
<template>
<view class="content">
<view class="item" v-for="(item, index) in 16" :key="index">
<image class="bg-img" src="https://picsum.photos/200/300"></image>
<view class="shop">
<image src="../../static/recommend-r.png"></image>
<view class="lf-line-1">DIOR迪奥</view>
<view class="title">大牌不停推</view>
<view class="flex-box">
<view class="item" v-for="(item, index) in 16" :key="index">
<image class="bg-img" src="https://picsum.photos/200/300"></image>
<view class="shop">
<image src="../../static/recommend-r.png"></image>
<view class="lf-line-1">DIOR迪奥</view>
</view>
</view>
</view>
</view>
@ -31,50 +34,59 @@
width: 750rpx;
height: max-content;
box-sizing: border-box;
padding: 30rpx 32rpx;
display: flex;
flex-wrap: wrap;
.item{
width: 165rpx;
height: 165rpx;
border: 1rpx solid #979797;
margin-right: 9rpx;
position: relative;
&:nth-child(4n){
margin-right: 0rpx;
}
&:nth-child(n+5){
margin-top: 8rpx;
}
.bg-img{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.shop{
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 60rpx 32rpx 0;
.title{
font-size: 36rpx;
font-weight: bold;
text-align: center;
color: #222222;
margin-bottom: 30rpx;
}
.flex-box{
display: flex;
flex-wrap: wrap;
.item{
width: 165rpx;
height: 165rpx;
border: 1rpx solid #979797;
margin-right: 9rpx;
position: relative;
z-index: 2;
&>image{
width: 70rpx;
height: 70rpx;
border-radius: 50%;
background-color: #FFFFFF;
&:nth-child(4n){
margin-right: 0rpx;
}
&:nth-child(n+5){
margin-top: 8rpx;
}
.bg-img{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
&>view{
font-size: 24rpx;
color: #FFFFFF;
margin-top: 4rpx;
.shop{
width: 100%;
text-align: center;
height: 100%;
background-color: rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
z-index: 2;
&>image{
width: 70rpx;
height: 70rpx;
border-radius: 50%;
background-color: #FFFFFF;
}
&>view{
font-size: 24rpx;
color: #FFFFFF;
margin-top: 4rpx;
width: 100%;
text-align: center;
}
}
}
}

11
components/lf-multiColumnAd/lf-multiColumnAd.vue

@ -35,7 +35,7 @@
width: 750rpx;
height: max-content;
box-sizing: border-box;
padding: 30rpx 32rpx;
padding: 60rpx 32rpx 0rpx;
display: flex;
justify-content: space-between;
.left{
@ -45,6 +45,7 @@
width: 100%;
height: 100%;
background: #D8D8D8;
border-radius: 20rpx 0rpx 0rpx 20rpx;
}
}
.right{
@ -54,8 +55,16 @@
width: 228rpx;
height: 208rpx;
background: #D8D8D8;
&:nth-child(1n){
border-radius: 0rpx 20rpx 0rpx 0rpx;
}
&:nth-child(2n){
margin-top: 20rpx;
border-radius: 0rpx 0rpx 20rpx 0rpx;
}
&>image{
width: 100%;
height: 100%;
}
}
}

8
components/lf-nav/lf-nav.vue

@ -9,8 +9,8 @@
</block>
<block v-else>
<view class="head-nav" :style="{'top': headHeight - 40 + 'px'}" v-if="showIcon">
<text class="le lf-icon-jiantouzuo font-40size" @click="clickDropOut"></text>
<text class="le lf-icon-home font-40size" @click="clickHome"></text>
<text class="lf-iconfont icon-daifukuan font-40size" @click="clickDropOut"></text>
<text class="lf-iconfont icon-sousuo font-40size" @click="clickHome"></text>
</view>
<view class="title-box" :style="{'margin': headHeight - 36 + 'px auto 0'}">
<input class="search" placeholder="搜你想要的" confirm-type="search" v-model="value" @confirm="onSearch" v-if="search" />
@ -99,7 +99,7 @@
let pages = getCurrentPages();
if(pages.length <= 1){
uni.redirectTo({
url: '/pages/index/index'
url: '/pages/index/index/index'
})
return;
}
@ -109,7 +109,7 @@
//
clickHome(){
uni.reLaunch({
url: '/pages/index/index'
url: '/pages/index/index/index'
})
},
//

8
components/lf-seckill/lf-seckill.vue

@ -1,5 +1,6 @@
<template>
<view class="content">
<view class="title">剁手不心疼</view>
<view class="card">
<view class="title">秒杀购</view>
<view class="desc">低价不等人快来秒杀啦</view>
@ -41,6 +42,13 @@
width: 750rpx;
height: max-content;
box-sizing: border-box;
.title{
font-size: 36rpx;
font-weight: bold;
text-align: center;
color: #222222;
margin-bottom: 30rpx;
}
.card{
width: 686rpx;
height: 471rpx;

149
components/lf-tabbar/animate.scss

@ -1,149 +0,0 @@
.animate__animated {
animation-duration: 0.5s;
animation-fill-mode: both;
}
@keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
50% {
opacity: 1;
}
}
.animate__zoomIn {
animation-name: zoomIn;
}
@keyframes bounce {
from,
20%,
53%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
40%,
43% {
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
transform: translate3d(0, -30px, 0) scaleY(1.1);
}
70% {
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
transform: translate3d(0, -15px, 0) scaleY(1.05);
}
80% {
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transform: translate3d(0, 0, 0) scaleY(0.95);
}
90% {
transform: translate3d(0, -4px, 0) scaleY(1.02);
}
}
.animate__bounce {
animation-name: bounce;
transform-origin: center bottom;
}
@keyframes rubberBand {
from {
transform: scale3d(1, 1, 1);
}
30% {
transform: scale3d(1.25, 0.75, 1);
}
40% {
transform: scale3d(0.75, 1.25, 1);
}
50% {
transform: scale3d(1.15, 0.85, 1);
}
65% {
transform: scale3d(0.95, 1.05, 1);
}
75% {
transform: scale3d(1.05, 0.95, 1);
}
to {
transform: scale3d(1, 1, 1);
}
}
.animate__rubberBand {
animation-name: rubberBand;
}
@keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
transform: scale3d(0.97, 0.97, 0.97);
}
to {
opacity: 1;
transform: scale3d(1, 1, 1);
}
}
.animate__bounceIn {
animation-name: bounceIn;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.animate__fadeIn {
animation-name: fadeIn;
}

182
components/lf-tabbar/lf-tabbar-box.vue

@ -1,182 +0,0 @@
<template>
<view class="lb-tabbar">
<view :class="[
'lb-tabbar-content',
fixed ? 'lb-tabbar--fixed' : ''
]"
:style="{
backgroundColor: bgColor,
paddingBottom: `${safeAreaHeight}px`
}">
<view v-if="border"
class="lb-tabbar-border"
:style="{
backgroundColor: borderColor,
top: raisedeHeight + 'px'
}">
</view>
<slot></slot>
</view>
<view v-if="placeholder"
class="lb-tabbar-placeholder"
:style="{
height: `${tabbarHeight}px`
}">
</view>
</view>
</template>
<script>
// git https://github.com/liub1934/uni-lb-tabbar/tree/master/pages/demos
// demo https://github.liubing.me/uni-lb-tabbar/#/
// fileDes https://ext.dcloud.net.cn/plugin?id=4124
const SAFE_AREA_INSET_BOTTOM = 34
import { getPx } from './utils'
export default {
props: {
value: [String, Number],
height: {
type: String,
default: '50px'
},
iconSize: {
type: String,
default: '22px'
},
textSize: {
type: String,
default: '12px'
},
textTop: {
type: String,
default: '5px'
},
dotColor: {
type: String,
default: '#F56C6C'
},
fixed: {
type: Boolean,
default: true
},
placeholder: {
type: Boolean,
default: true
},
animate: {
type: String,
default: 'rubberBand'
},
closeAnimateOnRaisede: {
type: Boolean,
default: true
},
border: {
type: Boolean,
default: true
},
borderColor: {
type: String,
default: '#DCDFE6'
},
bgColor: {
type: String,
default: '#FFF'
},
inactiveColor: {
type: String,
default: '#909399'
},
activeColor: {
type: String,
default: '#186c6b'
},
inactiveTextColor: String,
activeTextColor: String,
safeAreaInsetBottom: {
type: Boolean,
default: true
},
hideTabbar: {
type: Boolean,
default: true
},
raisedeScale: {
type: Number,
default: 2
}
},
data () {
return {
active: this.value,
activeItem: {},
tabbarItems: [],
hasRaisede: false,
isIphoneX: false
}
},
computed: {
tabbarItemsLength () {
return this.tabbarItems.length
},
safeAreaHeight () {
return this.isIphoneX && this.safeAreaInsetBottom ? SAFE_AREA_INSET_BOTTOM : 0 // X
},
iconHeight () {
return getPx(this.iconSize)
},
raisedeHeight () {
return this.hasRaisede ? this.iconHeight * this.raisedeScale / 2 : 0 //
},
tabbarHeight () {
const height = getPx(this.height) //
const raisedeHeight = this.hasRaisede ? this.iconHeight * this.raisedeScale / 2 : 0 //
const tabbarHeight = height + this.safeAreaHeight + raisedeHeight //
return tabbarHeight
}
},
provide () {
return {
tabbar: this
}
},
created () {
if (this.hideTabbar) {
uni.hideTabBar()
}
const res = uni.getSystemInfoSync()
const { model, statusBarHeight } = res
if (
(model.indexOf('iPhone') > -1 && statusBarHeight > 20) ||
model.indexOf('iPhone X') > -1 ||
model.indexOf('iPhone 1') > -1
) {
this.isIphoneX = true
}
this.getTabbarHeight()
},
methods: {
getTabbarHeight () {
return this.tabbarHeight
}
},
watch: {
value (newVal) {
this.active = newVal
},
active (newVal) {
this.activeItem = this.tabbarItems.find(item => item.name === newVal)
this.$emit('input', newVal)
this.$emit('change', this.activeItem)
},
tabbarItemsLength () {
this.hasRaisede = !!this.tabbarItems.find(item => item.raisede)
}
}
}
</script>
<style lang="scss" scoped>
@import "./style.scss";
</style>

259
components/lf-tabbar/lf-tabbar-item.vue

@ -1,259 +0,0 @@
<template>
<view ref="item"
:class="[
'lb-tabbar-item',
'animate__animated',
isActive ? 'lb-tabbar-item--active' : ''
]"
:style="{
paddingTop: paddingBT + raisedeHeight + 'px',
paddingBottom: paddingBT + 'px',
width: '100%'
}"
@tap="handleTap">
<view :class="[
'lb-tabbar-item__icon',
`lb-tabbar-item__icon--${raisede ? 'raisede' : 'default'}`,
isAnimate ? `animate__animated animate__${tabbarInfo.animate}` : '',
isActive ? 'lb-my-active' : ''
]"
:style="{
height: tabbarInfo.iconSize,
lineHeight: tabbarInfo.iconSize,
transform: raisede ? `translateY(-${ty}px) scale(${tabbarInfo.raisedeScale})` : ''
}">
<!-- 图片图标 -->
<image v-if="isImage"
class="lb-tabbar-item__image"
:src="icon"
:style="{
width: tabbarInfo.iconSize,
height: tabbarInfo.iconSize
}">
</image>
<!-- icon图标 -->
<text v-else
:class="[
'lf-iconfont',
iconPrefix,
`${iconPrefix}-${icon}`,
isActive ? 'lb-tabbar-item__icon--active' : ''
]"
:style="{
width: tabbarInfo.iconSize,
height: tabbarInfo.iconSize,
lineHeight: tabbarInfo.iconSize,
fontSize: tabbarInfo.iconSize,
color: isActive ? tabbarInfo.activeColor : tabbarInfo.inactiveColor
}">{{ iconCode }}</text>
<!-- 非nvue dot info显示 -->
<!-- #ifndef APP-NVUE -->
<text v-if="dot || hasInfo"
:class="[
dot && !hasInfo ? 'lb-tabbar-item__dot' : '',
hasInfo ? 'lb-tabbar-item__dot--info' : '',
'lb-tabbar-item__dot--style'
]"
:style="{
backgroundColor: tabbarInfo.dotColor
}">{{ hasInfo ? info : '' }}</text>
<!-- #endif -->
</view>
<!-- nvue dot info 显示 -->
<!-- #ifdef APP-NVUE -->
<text v-if="dot || hasInfo"
:class="[
'lb-tabbar-item__dot--nvue',
'lb-tabbar-item__dot--style',
dot && !hasInfo ? 'lb-tabbar-item__dot' : '',
hasInfo ? 'lb-tabbar-item__dot--info' : '',
hasInfo ? 'lb-tabbar-item__dot--info' : '',
nvueDotShow ? 'lb-tabbar-item__dot--show' : ''
]"
:style="{
backgroundColor: tabbarInfo.dotColor,
top: paddingBT + raisedeHeight + 'px',
right: dotLeft + 'px'
}">{{ hasInfo ? info : '' }}</text>
<!-- #endif -->
<!-- 非nvue图标文字 -->
<!-- #ifndef APP-NVUE -->
<view :class="[
'lb-tabbar-item__text',
isActive ? 'lb-tabbar-item__text--active' : ''
]"
:style="{
fontSize: tabbarInfo.textSize,
lineHeight: tabbarInfo.textSize,
maxHeight: tabbarInfo.textSize,
marginTop: tabbarInfo.textTop,
color: isActive
? tabbarInfo.activeTextColor || tabbarInfo.activeColor
: tabbarInfo.inactiveTextColor || tabbarInfo.inactiveColor
}">
<slot></slot>
<view v-if="raisede"
class="lb-tabbar-item__text--block"
:style="{
height: tabbarInfo.textSize
}">
</view>
</view>
<!-- #endif -->
<!-- nvue图标文字 -->
<!-- #ifdef APP-NVUE -->
<text v-if="text || raisede"
:class="[
'lb-tabbar-item__text',
isActive ? 'lb-tabbar-item__text--active' : ''
]"
:style="{
fontSize: tabbarInfo.textSize,
height: tabbarInfo.textSize,
lineHeight: tabbarInfo.textSize,
marginTop: tabbarInfo.textTop,
color: isActive
? tabbarInfo.activeTextColor || tabbarInfo.activeColor
: tabbarInfo.inactiveTextColor || tabbarInfo.inactiveColor
}">{{ text || '' }}</text>
<!-- #endif -->
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom')
// #endif
import { getPx } from './utils'
export default {
props: {
name: [String, Number],
text: [String, Number],
icon: String,
iconPrefix: String,
dot: Boolean,
info: [String, Number],
raisede: Boolean,
path: String
},
inject: ['tabbar'],
data () {
return {
tabbarInfo: {},
itemWidth: 0,
dotLeft: 0,
nvueDotShow: false
}
},
computed: {
isImage () {
return this.icon && this.icon.indexOf('/') > -1
},
isActive () {
return this.tabbarInfo.value === this.name
},
isAnimate () {
return (
this.isActive &&
this.tabbarInfo.animate &&
!(this.raisede && this.tabbarInfo.closeAnimateOnRaisede)
)
},
height () {
return getPx(this.tabbarInfo.height)
},
iconHeight () {
return getPx(this.tabbarInfo.iconSize)
},
textSize () {
return getPx(this.tabbarInfo.textSize)
},
textTop () {
return getPx(this.tabbarInfo.textTop)
},
ty () {
return this.height / 2 - (this.textSize + this.textTop) / 2
},
iconCode () {
let code = ''
// #ifdef APP-NVUE
code = this.icon
// #endif
return code
},
hasInfo () {
return this.info || this.info === 0
},
paddingBT () {
return (this.height - this.iconHeight - this.textSize - this.textTop) / 2
},
hasRaisede () {
return this.tabbar.hasRaisede
},
raisedeHeight () {
return this.hasRaisede ? this.iconHeight * this.tabbarInfo.raisedeScale / 2 : 0 //
},
infoLength () {
return this.hasInfo ? (this.info + '').length : 0
}
},
created () {
this.tabbarInfo = this.tabbar._props
this.tabbar.tabbarItems.push(this._props)
},
mounted() {
// #ifdef APP-NVUE
this.setNvueDot()
// #endif
},
methods: {
handleTap () {
this.tabbar.active = this.name
this.$emit('click', this._props)
},
// #ifdef APP-NVUE
setNvueDot () {
if (this.dot || this.hasInfo) {
this.$nextTick(() => {
const $el = this.$refs.item
dom.getComponentRect($el, res => {
this.itemWidth = res.size.width
const halfWidth = this.itemWidth / 2
if (this.dot) {
this.dotLeft = halfWidth - 8
}
if (this.hasInfo) {
const length = this.infoLength > 1 ? this.infoLength -1 : this.infoLength
this.dotLeft = halfWidth - 8 * length
}
this.nvueDotShow = true
})
})
}
}
// #endif
},
// #ifdef APP-NVUE
watch: {
dot () {
this.setNvueDot()
},
info () {
this.setNvueDot()
}
}
// #endif
}
</script>
<style lang="scss" scoped>
@import "./style.scss";
/* #ifndef APP-NVUE */
@import "./animate.scss";
/* #endif */
</style>

128
components/lf-tabbar/lf-tabbar.vue

@ -1,42 +1,37 @@
<template>
<view>
<lf-tabbar-box :value="currentTabBar"
v-if="isShowTabBar"
:close-animate-on-raisede="false">
<lf-tabbar-item v-for="item in tabbars"
:key="item.name"
:name="item.name"
:icon="item.icon"
:dot="item.dot"
:info="item.info"
:path="item.path"
:raisede="item.raisede"
:style="{'width': 100 / tabbars.length +'%'}"
@click="handleClick"
icon-prefix="icon">
{{ item.text }}
</lf-tabbar-item>
</lf-tabbar-box>
<view class="occupy-position"></view>
<view class="content">
<view class="tabbar-box">
<view class="tab-item"
:class="{'tab-active': currentTabBar == index}"
:style="{'width': 100 / tabbars.length +'%'}"
@click="clickTab(item, index)"
v-for="(item, index) in tabbars" :key="index">
<view class="tab-icon">
<text class="lf-font-40 lf-iconfont" :class="item.icon"></text>
</view>
<view class="tab-name">{{ item.text }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import lfTabbarBox from "./lf-tabbar-box.vue"
import lfTabbarItem from "./lf-tabbar-item.vue"
import { mapGetters } from "vuex";
export default {
name: 'lf-tabbar',
components: {
lfTabbarBox,
lfTabbarItem
},
props: {
type: {
type: String, // redirectswitch
default: 'redirect'
}
},
data(){
return {
}
},
computed: {
...mapGetters(['currentTabBar', 'tabbars', 'isShowTabBar'])
},
@ -44,24 +39,89 @@
// currentTabBar
let pages = getCurrentPages();
let page = pages[pages.length - 1].route;
let tabbar_name = '';
this.tabbars.map(item => {
let tabbars = this.tabbars;
let tabbar_name = tabbars[this.currentTabBar].path;
let current = 0;
tabbars.map((item, index) => {
if(item.path == '/'+ page){
tabbar_name = item.name;
current = index;
}
})
if(tabbar_name != this.currentTabBar){
this.$store.commit('setCurrentTabBar', tabbar_name);
if(tabbar_name != '/'+ page){
this.$store.commit('setCurrentTabBar', current);
}
},
methods: {
handleClick (options) {
this.$store.commit('setCurrentTabBar', options.name);
this.$url(options.path, {type: this.type});
clickTab(item, index){
if(this.currentTabBar == index) return;
this.$store.commit('setCurrentTabBar', index);
this.$url(item.path, {type: this.type});
}
}
}
</script>
<style>
<style lang="scss" scoped="scoped">
.lf-font-40{
font-size: 40rpx;
}
.occupy-position{
width: 750rpx;
height: 120rpx;
box-sizing: content-box;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.content{
width: 750rpx;
height: 120rpx;
background-color: #FFFFFF;
border-radius: 60rpx 60rpx 0 0;
box-shadow: 0rpx -2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
position: fixed;
bottom: 0;
left: 0;
z-index: 99999;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
display: flex;
align-items: center;
box-sizing: content-box;
.tabbar-box{
width: 100%;
height: 100rpx;
display: flex;
.tab-item{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.tab-name{
font-size: 24rpx;
color: #777777;
}
&.tab-active{
.tab-icon{
background-color: #15716E;
width: 60rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
transform: translateY(-20rpx) scale(1.4);
border-radius: 50%;
color: #FFFFFF;
overflow: hidden;
text{
transform: scale(0.6);
}
}
.tab-name{
color: #15716E;
font-weight: bold;
}
}
}
}
}
</style>

121
components/lf-tabbar/style.scss

@ -1,121 +0,0 @@
.lb-tabbar-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
}
.lb-tabbar--fixed {
position: fixed;
left: 0;
right: 0;
bottom: 0;
}
.lb-tabbar-border {
height: 1px;
position: absolute;
left: 0;
right: 0;
top: 0;
transform: scaleY(0.5);
}
/* #ifndef APP-NVUE */
lb-tabbar-item {
flex: 1;
}
/* #endif */
.lb-tabbar-item {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
// justify-content: flex-end;
}
.lb-tabbar-item__text {
overflow: hidden;
}
.lb-tabbar-item__text--active {
transition-property: color;
transition-duration: 0.3s;
}
.lb-tabbar-item__icon {
position: relative;
}
.lb-tabbar-icon {
position: relative;
/* #ifndef APP-NVUE */
line-height: 1;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
/* #endif */
}
.lb-tabbar-item__icon--active {
transition-property: color;
transition-duration: 0.3s;
}
.lb-my-active{
transform: translateY(-16.5px) scale(2) !important;
color: yellow;
}
.lb-tabbar-item__icon--raisede {
background-color: #fff;
border-radius: 9999px;
position: relative;
/* #ifndef APP-NVUE */
z-index: 1;
/* #endif */
}
.lb-tabbar-item__dot--style {
border-radius: 9999px;
position: absolute;
top: 0;
right: 0;
}
.lb-tabbar-item__dot {
width: 8px;
height: 8px;
}
.lb-tabbar-item__dot--nvue {
opacity: 0;
transition-property: opacity;
transition-duration: 0.1s;
}
.lb-tabbar-item__dot--show {
opacity: 1;
}
.lb-tabbar-item__dot--info {
height: 14px;
line-height: 14px;
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
margin-top: 5px;
font-size: 12px;
padding-left: 4px;
padding-right: 4px;
text-align: center;
color: #fff;
transform: translate(50%, -50%);
}

10
components/lf-tabbar/utils.js

@ -1,10 +0,0 @@
export function getPx (val) {
if (!val) return 0
if (val.indexOf('rpx') > -1) {
val = +val.replace('rpx', '')
val = uni.upx2px(val)
} else {
val = +val.replace('px', '')
}
return val
}

38
pages.json

@ -3,6 +3,14 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index/index",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh":true,
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/goodsdetail",
"style": {
@ -38,7 +46,6 @@
"path": "pages/article/details",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
@ -118,14 +125,6 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index/index",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh":true,
"navigationStyle": "custom"
}
},
{
"path": "pages/index/microPages/microPages",
"style": {
@ -796,6 +795,27 @@
"navigationBarTitleText": "我的报名",
"navigationStyle": "custom"
}
},
{
"path" : "pages/index/eventRegistration/eventRegistration",
"style" : {
"navigationBarTitleText": "热门活动",
"navigationStyle": "custom"
}
},
{
"path" : "pages/user/member/code",
"style" : {
"navigationBarTitleText": "会员码",
"navigationStyle": "custom"
}
},
{
"path" : "pages/point/shoppingMall/shoppingMall",
"style" : {
"navigationBarTitleText": "积分商城",
"navigationStyle": "custom"
}
}
],
"globalStyle": {

5
pages/discover/discover.vue

@ -39,11 +39,16 @@
</view>
<self-line/>
</view>
<lf-tabbar></lf-tabbar>
</view>
</template>
<script>
import lfTabbar from '@/components/lf-tabbar/lf-tabbar.vue';
export default {
components: {
lfTabbar
},
data() {
return {
tab_list: [

5
pages/index/category/category.vue

@ -101,10 +101,11 @@
},
computed: {
autoHeight(){
return `calc(${this.scrollH}px - 50px - ${this.nav_height}px - 90rpx)`;
return `calc(${this.scrollH}px - ${this.nav_height}px - 90rpx - 120rpx)`;
},
otherHeight(){
return `calc(${this.scrollH}px - 50px - ${this.nav_height}px - 90rpx - 105rpx)`;
// - - tabs - tabbar -
return `calc(${this.scrollH}px - ${this.nav_height}px - 90rpx - 120rpx - 105rpx)`;
}
},
components: {

142
pages/index/eventRegistration/eventRegistration.vue

@ -0,0 +1,142 @@
<template>
<view>
<lf-nav title="热门活动" :showIcon="true" bgColor="#fff" @changeHeight="e => nav_height = e"></lf-nav>
<view v-if="tab_list.length">
<u-tabs :list="tab_list" active-color="#15716E" inactive-color='#777777' :is-scroll="true" :current="tab_current" @change="tabChange"></u-tabs>
</view>
<swiper :style="{height: autoHeight}" :current="tab_current" @change="swiperChange">
<swiper-item v-for="(item, index) in tab_list" :key="index">
<scroll-view :style="{height: autoHeight}" :scroll-y="true">
<view class="scroll-content">
<view class="card" v-for="(item, index) in 3" :key="index">
<view class="cover">
<image class="img"></image>
</view>
<view class="info">
<view class="title">海蓝之谜美颜会 9月15日场10:30</view>
<view class="date">2021.09.01-2021.09.15</view>
</view>
</view>
</view>
<view style="height: 30rpx;"></view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data(){
let _public = {
page: 1,
isPage: true,
loadingClass: true,
loadingText: '正在加载中'
}
return {
tab_current: 0,
tab_list: [{
name: '正在进行',
list: [],
..._public
},{
name: '往期回顾',
list: [],
..._public
}],
scrollH: 0,
nav_height: 0
}
},
computed: {
autoHeight(){
return `calc(${this.scrollH}px - ${this.nav_height}px - 86rpx)`;
}
},
onLoad(){
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
},
methods: {
tabChange(event){
this.tab_current = event;
},
swiperChange(event){
this.tab_current = event.detail.current;
}
}
}
</script>
<style lang="scss" scoped="scoped">
.scroll-content{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
.card{
width: 686rpx;
height: max-content;
background-color: #FFFFFF;
box-shadow: 1rpx 1rpx 6rpx 3rpx #e5e5e5;
margin-top: 30rpx;
border-radius: 20rpx;
overflow: hidden;
.cover{
width: 686rpx;
height: 300rpx;
position: relative;
.img{
width: 100%;
height: 100%;
background-color: #EEEEEE;
}
}
.info{
width: 686rpx;
height: max-content;
padding: 20rpx 30rpx;
box-sizing: border-box;
.title{
font-size: 28rpx;
color: #222222;
font-weight: bold;
}
.date{
margin-top: 20rpx;
font-size: 24rpx;
color: #555555;
}
}
}
}
// tabs
/deep/.u-scroll-box {
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
/deep/.u-scroll-box .u-tab-bar {
background-color: #15716E!important;
width: 80rpx!important;
position: absolute;
left: 0;
bottom: -12rpx;
}
/deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
background-color: #15716E!important;
width: 56rpx!important;
position: absolute;
height: 5rpx!important;
left: 8rpx;
bottom: -4rpx;
}
/deep/ .u-tab-item {
font-size: 28rpx!important;
}
</style>

34
pages/index/index/index.vue

@ -9,7 +9,7 @@
<text class="lf-iconfont icon-nv"></text>
<text class="lf-m-l-4">停车</text>
</view>
<view class="lf-nav-capsule lf-bg-gray">
<view class="lf-nav-capsule lf-bg-search">
<text class="lf-iconfont icon-nv"></text>
<text class="lf-m-l-4">搜索</text>
</view>
@ -78,12 +78,13 @@
<view v-if="item.name == 'micro_page_componet_nav' && item.value && item.value.length">
<indexNav :nav-data="item.value" :meta="item.meta"></indexNav>
</view>
<!-- 服务升级 TODO 暂时借用快捷导航字段判断 -->
<!-- 今日头条 TODO 暂时借用快捷导航字段判断 -->
<view class="fuwu-tips" v-if="item.name == 'micro_page_componet_nav' && item.value && item.value.length">
<view class="fuwu-tips-title">服务升级</view>
<view class="fuwu-tips-title">今日头条</view>
<view>
<text class="fuwu-tips-desc1">线上商城全场限时包邮</text>
<text class="fuwu-tips-desc2">(部分品牌满额包邮)</text>
<text class="fuwu-tips-desc1">来自太阳的宝石-8月生辰石</text>
<!-- <text class="fuwu-tips-desc1">线上商城全场限时包邮</text>
<text class="fuwu-tips-desc2">(部分品牌满额包邮)</text> -->
</view>
</view>
<!-- 活动页入口 TODO -->
@ -108,6 +109,7 @@
</view>
<!-- TODO 店铺商品展示模块 -->
<view v-if="item.name == 'micro_page_componet_nav' && item.value && item.value.length">
<view class="lf-module-title">好物种草间</view>
<lf-shop-goods-card v-for="(d_item,d_index) in 2" :key="d_index"></lf-shop-goods-card>
</view>
<!--图片魔方-->
@ -124,6 +126,7 @@
</view>
<!-- TODO 为你推荐模块 -->
<view v-if="item.name == 'micro_page_componet_nav' && item.value && item.value.length">
<view class="lf-module-title">为你推荐</view>
<lf-waterfall :list="recommend_list"></lf-waterfall>
</view>
</view>
@ -368,6 +371,8 @@
</view>
<!-- ad广告弹出组件 TODO 暂时先注释 -->
<!-- <lf-ad-modal :value.sync="show_ad"></lf-ad-modal> -->
<!-- 回到顶部组件 -->
<u-back-top :scrollTop="pageScrollTop"></u-back-top>
<!-- tabbar组件 -->
<lf-tabbar />
</block>
@ -1115,6 +1120,9 @@
<style rel="stylesheet/less" lang="less">
/*@import "index.less";*/
.lf-bg-search{
background-color: rgba(0,0,0,0.5) !important;
}
.lf-nav-capsule{
width: 120rpx;
height: 50rpx;
@ -1136,7 +1144,7 @@
background-color: #eff6f7;
margin: 60rpx auto 0;
display: flex;
justify-content: space-between;
// justify-content: space-between;
box-sizing: border-box;
align-items: center;
padding: 0 30rpx;
@ -1144,9 +1152,13 @@
.fuwu-tips-title{
font-size: 36rpx;
color: #186c6b;
margin-right: 15rpx;
font-weight: bold;
font-family: '华文行楷';
}
.fuwu-tips-desc1{
font-size: 28rpx;
color: #222222;
}
.fuwu-tips-desc2{
font-size: 22rpx;
@ -1157,9 +1169,19 @@
width: 686rpx;
height: 350rpx;
margin: 60rpx auto 0;
border-radius: 10rpx;
overflow: hidden;
&>image{
width: 100%;
height: 100%;
}
}
.lf-module-title{
font-size: 36rpx;
font-weight: bold;
text-align: center;
color: #222222;
margin-bottom: 30rpx;
margin-top: 60rpx;
}
</style>

279
pages/point/shoppingMall/shoppingMall.vue

@ -0,0 +1,279 @@
<template>
<view>
<lf-nav title="积分商城" titleColor="#fff" bgColor="transparent" :showIcon="true" :spreadOut="false"></lf-nav>
<view class="head">
<view class="bg-view"></view>
</view>
<view class="menu">
<view class="left">
<view>
<text class="lf-iconfont icon--"></text>
<text class="point-num">783</text>
<text class="lf-iconfont icon--"></text>
</view>
<view class="lf-font-24">当前积分</view>
</view>
<view class="lf-flex">
<view class="item">
<text class="lf-iconfont icon-- lf-font-50"></text>
<text>兑换记录</text>
</view>
<view class="item">
<text class="lf-iconfont icon-- lf-font-50"></text>
<text>购物车</text>
<view class="angle-mark">99+</view>
</view>
</view>
</view>
<view class="lf-m-t-30" v-if="tab_list.length">
<u-tabs :list="tab_list"
active-color="#15716E"
inactive-color='#777777'
:is-scroll="true"
:current="tab_current"
@change="tabChange">
</u-tabs>
</view>
<view class="page-item">
<view class="filter">
<view :class="{'filter-item': true, 'filter-active': index == filter_current}"
v-for="(item, index) in filter_list" :key="index"
@click="filter_current = index">{{ item }}
</view>
</view>
<view class="goods">
<lf-waterfall :list="goods_list"></lf-waterfall>
</view>
</view>
<u-back-top :scrollTop="pageScrollTop"></u-back-top>
</view>
</template>
<script>
import lfWaterfall from '@/components/lf-waterfall-shopdetails/lf-waterfall.vue';
export default {
components: {
lfWaterfall
},
data(){
let _public = {
page: 1,
isPage: true,
loadingClass: true,
loadingText: '正在加载中'
}
return {
tab_current: 0,
tab_list: [{
name: '全部',
list: [],
..._public
},{
name: '时尚尖货',
list: [],
..._public
},{
name: '美容美妆',
list: [],
..._public
},{
name: '家具用品',
list: [],
..._public
},{
name: '儿童玩具',
list: [],
..._public
}],
filter_list: ['1~100','100~1万','1万~2万','2万~5万','>5万'],
filter_current: null,
goods_list: [
{
id: 10,
original_price: "4111.00",
picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
price: "2412.00",
product_id: 1008,
sale: 0,
title: "三亚悦榕庄(Banyan Tree Sanya Resort and Spa)"
},
{
id: 10,
original_price: "4111.00",
picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
price: "2412.00",
product_id: 1008,
sale: 0,
title: "三亚悦榕庄(Banyan Tree Sanya Resort and Spa)"
},
{
id: 10,
original_price: "4111.00",
picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
price: "2412.00",
product_id: 1008,
sale: 0,
title: "三亚悦榕庄(Banyan Tree Sanya Resort and Spa)"
},
{
id: 10,
original_price: "4111.00",
picture: "https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png",
pictures: ["https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png"],
price: "2412.00",
product_id: 1008,
sale: 0,
title: "三亚悦榕庄(Banyan Tree Sanya Resort and Spa)"
}
]
}
},
onLoad(){
},
methods: {
tabChange(event){
this.tab_current = event;
}
}
}
</script>
<style>
page{
overflow-x: hidden;
}
</style>
<style lang="scss" scoped="scoped">
.head{
width: 750rpx;
height: 283rpx;
background: linear-gradient(90deg, #22A2A0 0%, #187B7A 100%);
position: relative;
overflow: hidden;
.bg-view{
position: absolute;
right: -100rpx;
top: -200rpx;
width: 400rpx;
height: 400rpx;
border-radius: 50%;
background-color: rgba(255,255,255,0.04);
}
}
.menu{
width: 686rpx;
height: 170rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
border-radius: 20rpx;
box-sizing: border-box;
padding: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
color: #15716E;
margin: -80rpx auto 0;
position: relative;
z-index: 2;
.left{
width: 340rpx;
.point-num{
font-size: 48rpx;
font-weight: bold;
margin: 0 10rpx;
}
}
.item{
width: 100rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 24rpx;
position: relative;
&:nth-child(2n){
margin-left: 40rpx;
}
.angle-mark{
width: 30rpx;
height: 30rpx;
background-color: #FF9D9D;
color: #FFFFFF;
border-radius: 50%;
position: absolute;
right: 10rpx;
top: 10rpx;
font-size: 18rpx;
text-align: center;
line-height: 30rpx;
}
}
}
.page-item{
width: 750rpx;
height: max-content;
.filter{
width: 100%;
height: 83rpx;
border: 1rpx solid #e5e5e5;
box-sizing: border-box;
padding: 0 32rpx;
display: flex;
align-items: center;
.filter-item{
width: 123rpx;
height: 43rpx;
font-size: 24rpx;
color: #777777;
display: flex;
justify-content: center;
align-items: center;
border-radius: 26rpx;
&:nth-child(n+2){
margin-left: 28rpx;
}
&.filter-active{
background-color: #15716E;
color: #FFFFFF;
}
}
}
.goods{
padding: 30rpx 32rpx;
}
}
// tabs
/deep/.u-scroll-box {
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
width: max-content;
}
/deep/.u-scroll-box .u-tab-bar {
background-color: #15716E!important;
width: 80rpx!important;
position: absolute;
left: 0;
bottom: -12rpx;
}
/deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
background-color: #15716E!important;
width: 56rpx!important;
position: absolute;
height: 5rpx!important;
left: 8rpx;
bottom: -4rpx;
}
/deep/ .u-tab-item {
font-size: 28rpx!important;
}
</style>

199
pages/user/member/code.vue

@ -0,0 +1,199 @@
<template>
<view class="page">
<lf-nav title="会员码" bgColor="transparent" :spreadOut="false" titleColor="#fff" :showIcon="true"></lf-nav>
<view class="bg-viewleft"></view>
<view class="bg-viewright"></view>
<view class="content">
<view class="top">
<view class="lf-flex">
<view class="avatar">
<image src="https://picsum.photos/200"></image>
</view>
<view class="phone">182****5380</view>
</view>
<view class="card">
<text class="lf-iconfont icon--1"></text>
</view>
</view>
<view class="balance">余额 ¥1829.83</view>
<view class="barcode">
<lf-barcode :options="config.bar"></lf-barcode>
</view>
<view class="qrcode">
<lf-qrcode :options="config.qrc"></lf-qrcode>
</view>
<view class="tips">{{ num }}s后自动刷新</view>
</view>
</view>
</template>
<script>
import lfBarcode from '@/components/lf-code/lf-barcode.vue';
import lfQrcode from '@/components/lf-code/lf-qrcode.vue';
export default {
components: {
lfBarcode,
lfQrcode
},
data(){
return {
config: {
bar: {
code: 'E01181016286106',
color: '#000', //
bgColor: '#FFFFFF', //
width: 586, //
height: 210 //
},
qrc: {
code: "https://weixin.qq.com/g/AwYAAHO3aO4zlasEij6bLsk4hlZd5XNFkkBmqyS55mLPFxmn5c9PaI1omqLhd24fABCD23333",
size: 352, //
level: 4, // 04
bgColor: '#FFFFFF', //
// border: {
// color: ['#8A2387', '#F27121'], //
// lineWidth: 3, //
// },
// img: '/static/logo.png', //
// iconSize: 40, //
color: '#000000', //
}
},
timer: null,
num: 90
}
},
onLoad(){
this.refreshCode();
},
onUnload(){
if(this.timer){
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
// rpx px
rpxTransformPx(num){
let systemInfo = uni.getSystemInfoSync();
let pxWidth = num / 750 * systemInfo.windowWidth;
return pxWidth;
},
// code
refreshCode(){
if(this.timer){
clearInterval(this.timer);
this.timer = null;
}
this.timer = setInterval(() => {
this.num--;
if(this.num <= 0){
clearInterval(this.timer);
this.timer = null;
this.num = 90;
this.refreshCode(); //
}
}, 1000);
}
}
}
</script>
<style>
page{
overflow: hidden;
}
</style>
<style lang="scss" scoped="scoped">
.page{
width: 100vw;
height: 100vh;
background: linear-gradient(270deg, #187B7A 0%, #2FAAA7 100%, #22A2A0 100%);
position: relative;
overflow: hidden;
.bg-viewleft{
position: absolute;
left: -100rpx;
top: 59rpx;
width: 585rpx;
height: 585rpx;
border-radius: 50%;
background-color: rgba(255,255,255,0.04);
}
.bg-viewright{
position: absolute;
right: -38rpx;
top: 102rpx;
width: 127rpx;
height: 127rpx;
border-radius: 50%;
background-color: rgba(255,255,255,0.04);
}
.content{
position: absolute;
top: 260rpx;
left: calc(50% - 343rpx);
width: 686rpx;
height: 986rpx;
background: #FFFFFF;
border-radius: 20rpx;
.top{
display: flex;
justify-content: space-between;
padding: 0 40rpx;
width: 100%;
box-sizing: border-box;
align-items: center;
margin-top: -20rpx;
.avatar{
width: 160rpx;
height: 160rpx;
border-radius: 50%;
background-color: #FFFFFF;
box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(21, 113, 110, 0.2);
border: 5rpx solid #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
&>image{
width: 148rpx;
height: 148rpx;
border-radius: 50%;
}
}
.phone{
font-size: 36rpx;
font-weight: bold;
color: #15716E;
}
.card{
padding: 10rpx 20rpx;
&>text{
font-size: 40rpx;
color: #15716E;
}
}
}
.balance{
font-size: 32rpx;
color: #555555;
text-align: center;
font-weight: bold;
margin-top: 60rpx;
line-height: 1;
}
.barcode, .qrcode{
display: flex;
justify-content: center;
margin-top: 30rpx;
}
.tips{
font-size: 24rpx;
color: #777777;
text-align: center;
margin-top: 30rpx;
}
}
}
</style>

9
pages/user/my/center.vue

@ -82,11 +82,17 @@
</view>
</view>
</view>
<lf-tabbar></lf-tabbar>
</view>
</template>
<script>
import lfTabbar from '@/components/lf-tabbar/lf-tabbar.vue'
export default {
components: {
lfTabbar
},
}
</script>
<style lang="scss" scoped>
@ -135,6 +141,7 @@
background: #FFFFFF;
box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
border-radius: 20rpx;
margin-bottom: 30rpx;
}
.card-tag {
width: 144rpx;

1
pages/user/my/my.vue

@ -72,6 +72,7 @@
</template>
<script>
</script>
<style>

2
pages/user/my/myEventRegistrationList.vue

@ -1,6 +1,6 @@
<template>
<view>
<lf-nav title="我的报名" :showIcon="true" @changeHeight="e => nav_height = e"></lf-nav>
<lf-nav title="我的报名" :showIcon="true" bgColor="#fff" @changeHeight="e => nav_height = e"></lf-nav>
<view v-if="tab_list.length">
<u-tabs :list="tab_list" active-color="#15716E" inactive-color='#777777' :is-scroll="true" :current="tab_current" @change="tabChange"></u-tabs>
</view>

5
pages/user/personal/personal.vue

@ -489,7 +489,6 @@
<!-- 生日有礼 -->
<birthday :gift-data="giftData" @close="changeBirthday"></birthday>
</view>
<lf-tabbar></lf-tabbar>
</view>
</template>
<script>
@ -503,7 +502,6 @@
} from '@/common/js/utils.js';
import birthday from '@/components/birthday/birthday.vue';
import lfNav from '@/components/lf-nav/lf-nav.vue';
import lfTabbar from '@/components/lf-tabbar/lf-tabbar.vue';
var app = getApp();
export default {
@ -536,8 +534,7 @@
},
components:{
birthday,
lfNav,
lfTabbar
lfNav
},
onLoad(e) {

16
store/index.js

@ -3,31 +3,31 @@ import Vuex from 'vuex'
Vue.use(Vuex)
let state = {
currentTabBar: 'home',
currentTabBar: 0,
tabbars: [
{
name: 'home',
text: '首页',
icon: 'dingzhi',
icon: 'icon-Group-',
path: '/pages/index/index/index'
},
{
name: 'brand',
text: '品牌',
icon: 'weirenzheng',
icon: 'icon-tihuo',
path: '/pages/index/category/category'
},
{
name: 'find',
text: '发现',
icon: 'nv',
path: '/pages/store/cart/cart'
icon: 'icon-fabu',
path: '/pages/discover/discover'
},
{
name: 'my',
text: '我的',
icon: 'contact-person',
path: '/pages/user/personal/personal'
text: '会员中心',
icon: 'icon-icon',
path: '/pages/user/my/center'
}
],
isShowTabBar: true

Loading…
Cancel
Save