新增企业广场

This commit is contained in:
唐明明
2021-08-04 17:59:36 +08:00
parent 37aa773873
commit 3c3d946eb5
58 changed files with 8343 additions and 2037 deletions

View File

@@ -8,7 +8,10 @@
},
onHide () {
console.log('App Hide')
}
},
globalData: {
mainColor: "#c82626"
}
}
</script>

View File

@@ -0,0 +1,30 @@
<template>
<view>
<view class="industry--list">
<view class="industry--box">
<image class="industry--cover" src="../../static/dev/good_cover_00.jpg" mode="aspectFill"></image>
<view class="industry--content">
<view class="industry--title">MLB</view>
<view class="industry--credibility">信誉值</view>
<view class="industry--business">主营</view>
<view class="industry--trading">成交</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"industry-list",
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

View File

@@ -16,6 +16,11 @@
"autoclose" : true,
"delay" : 0
},
"safearea": {
"bottom": {
"offset" : "none"
}
},
/* */
"modules" : {
"OAuth" : {}

View File

@@ -1,13 +1,19 @@
{
"pages": [{
"path": "pages/guide/index",
"name": "Guide",
"style": {
"navigationStyle":"custom"
}
}, {
"path": "pages/index/index",
"name": "Index"
}, {
"path" : "pages/user/index",
"name" : "User",
"style" : {
"navigationBarTitleText": "我的",
"transparentTitle": "auto"
"path": "pages/user/index",
"name": "User",
"style": {
"navigationBarTitleText": "我的",
"transparentTitle": "auto"
}
}, {
"path": "pages/login/login",
@@ -78,6 +84,14 @@
"navigationBarTitleText": "数权账户",
"enablePullDownRefresh": false
}
},
{
"path": "pages/equity/index",
"name": "Equity",
"style":{
"navigationBarTitleText":"企业广场",
"navigationStyle":"custom"
}
}
],
"tabBar": {
@@ -112,5 +126,8 @@
"navigationBarTitleText": "易货",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"easycom": {
"nv": "@/uni_modules/pyh-nv/components/pyh-nv/pyh-nv.vue"
}
}

251
pages/equity/index.vue Normal file
View File

@@ -0,0 +1,251 @@
<template>
<view>
<!-- 状态栏 -->
<nv :config="nvConfig" @nvTabTap="onNvTab"></nv>
<!-- 搜索 -->
<view class="search">
搜索
</view>
<!-- 推荐商家 -->
<scroll-view scroll-x class="recommended">
<block v-for="(item, index) in 4" :key="index">
<view class="item-box">
<image
class="item-cover"
src="@/static/dev/mall-logo-01.png"
mode="aspectFill"
></image>
<view class="item-title">MLB</view>
<view class="item-btn">进店</view>
</view>
<view class="item-box">
<image
class="item-cover"
src="@/static/dev/mall-logo-00.png"
mode="aspectFill"
/>
<view class="item-title">名创优品</view>
<view class="item-btn">进店</view>
</view>
</block>
</scroll-view>
<!-- 热易商家 -->
<swiper class="hot-swiper">
<swiper-item v-for="(item, index) in 3" :key="index">
<view class="hot-box">
<image
class="cover"
src="@/static/dev/mall-logo-00.png"
mode="aspectFill"
/>
<view class="content">
<view class="title nowrap">MLB美职联</view>
<view class="credibility">
<uni-rate
:readonly="true"
color="#ddd"
active-color="#c82626"
:value="2.5"
:size="14"
/>
</view>
<view class="trading nowrap">累计交易100次</view>
</view>
<view class="btn">进店</view>
</view>
</swiper-item>
</swiper>
<!-- 行业分类 -->
<scroll-view class="industry-tabs" scroll-x>
<view class="industry-item show">全部</view>
<view class="industry-item">轻工食品</view>
<view class="industry-item">服饰纺织</view>
<view class="industry-item">家居用品</view>
<view class="industry-item">住宿餐饮</view>
<view class="industry-item">建筑建材</view>
</scroll-view>
</view>
</template>
<script>
export default{
data() {
return {
nvConfig: {
tabArr: [
{title:'企业广场', active:true},
{title:'易货商城'}
],
color: "#555"
}
};
},
methods:{
onNvTab(e){
let tabIndex = e.index
for(let i in this.nvConfig.tabArr){
if(i == tabIndex) this.nvConfig.tabArr[i].active = true
else this.nvConfig.tabArr[i].active = false
}
}
}
}
</script>
<style lang="scss" scoped>
// 行业分类
.industry-tabs{
white-space:nowrap;
padding: $padding 0;
.industry-item{
margin-left: $margin;
display: inline-block;
line-height: 50rpx;
font-size: $title-size-lg;
color: $text-gray;
&:last-child{
margin-right: $margin;
}
&.show{
color: $text-price;
font-size: $title-size;
font-weight: bold;
}
}
}
// 热易商家
.hot-swiper{
margin: $margin;
height: 198rpx;
.hot-box{
position: absolute;
height: 100%;
width: 100%;
border-radius: ($radius/2);
background: white;
box-shadow: 0 0 6rpx 6rpx rgba($color: #000, $alpha: .02);
padding: $padding;
box-sizing: border-box;
.cover{
position: absolute;
left: $padding;
top: $padding;
width: calc(198rpx - #{$padding * 2});
height: calc(198rpx - #{$padding * 2});
}
.content{
padding-left: calc(198rpx - #{$padding});
padding-right: calc(100rpx + #{$padding});
.title{
font-weight: bold;
font-size: $title-size-lg;
line-height: 40rpx;
height: 40rpx;
color: $text-color;
padding-bottom: 10rpx;
}
.credibility{
height: calc(108rpx - #{$padding * 2});
font-size: $title-size-m;
color: $text-gray;
}
.trading{
line-height: 40rpx;
font-size: $title-size-sm;
color: $text-gray;
}
}
.btn{
position: absolute;
top: 50%;
right: $padding;
font-size: $title-size-m;
background-color: $text-price;
color: white;
line-height: 50rpx;
width: 100rpx;
text-align: center;
margin-top: -25rpx;
}
}
}
// 推荐商家
.recommended{
white-space:nowrap;
padding: $padding 0;
.item-box{
display: inline-block;
background: white;
box-shadow: 0 0 6rpx 6rpx rgba($color: #000, $alpha: .02);
width: 240rpx;
margin-left: $margin;
border-radius: ($radius/2);
padding: ($padding + $padding/2) $padding;
box-sizing: border-box;
text-align: center;
&:last-child{
margin-right: $margin;
}
.item-cover{
background: #eee;
width: 88rpx;
height: 88rpx;
vertical-align: top;
border-radius: $radius / 2;
}
.item-title{
font-weight: bold;
font-size: $title-size-lg;
padding: ($padding/2) 0;
color: $text-color;
}
.item-btn{
font-size: $title-size-m;
background-color: $text-price;
color: white;
line-height: 50rpx;
display: inline-block;
width: 100rpx;
}
}
}
</style>
<!-- goods: [
{
cover: "https://yanxuan-item.nosdn.127.net/d3b072b5006f56935d15d239cbc5c953.jpg",
title: "片片大果仁,夏威夷坚果脆片 可可味 55克",
price: "16",
sales: "25"
},
{
cover: "https://yanxuan-item.nosdn.127.net/8cfaed758404e23bc74c7214505ce5ec.jpg",
title: "每日坚果亚麻籽谷物燕麦片 600克",
price: "58",
sales: "1002"
},
{
cover: "https://yanxuan-item.nosdn.127.net/65af0745153e2dfa3d7c4fafb7472db6.jpg",
title: "全新升级银罐,玲珑柑普茶 130克10颗",
price: "98",
sales: "2235"
},
{
cover: "https://yanxuan-item.nosdn.127.net/f3af9b6eaf15e6e3be1f14e14da90930.jpg",
title: "别致养生设计 猪鬃气垫按摩梳",
price: "79",
sales: "992"
},
{
cover: "https://yanxuan-item.nosdn.127.net/cb99e8a2f4597f3a5d05347a9eeb64c5.png",
title: "2020年新款日式减压按摩腰靠",
price: "219",
sales: "231"
},
{
cover: "https://yanxuan-item.nosdn.127.net/fff6aead2baff207e869f0aa6f276b63.png",
title: "T300无线吸尘器",
price: "159",
sales: "988"
}
] -->

135
pages/guide/index.vue Normal file
View File

@@ -0,0 +1,135 @@
<template>
<view>
<view class="guide-swiper">
<button class="guide-btn" size="default">开启我的易货之旅</button>
<swiper @change="swiperChange">
<swiper-item v-for="(item, index) in swiperArray" :key="index">
<view class="swiper-content">
<view class="title">{{item.title}}</view>
<view class="sub-title">{{item.subTitle}}</view>
<view class="cover">
<image :src="item.coverUrl" mode="aspectFit"></image>
</view>
</view>
</swiper-item>
</swiper>
<!-- 分页 -->
<view class="swiper-pages" v-if="swiperArray.length > 1">
<text
class="item"
v-for="(item, index) in swiperArray"
:key="index"
:class="{'show': index === swiperCurrent}"
/>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
swiperCurrent: 0,
swiperArray : [{
title : "打造B2B2C",
subTitle: "数字通证商品易货贸易平台",
coverUrl: "../../static/dev/guide_cover_00.png"
},{
title : "打造为自由创业者",
subTitle: "提供数字商品供应链云仓平台",
coverUrl: "../../static/dev/guide_cover_01.png"
}]
};
},
methods:{
swiperChange(e){
this.swiperCurrent = e.detail.current
}
}
}
</script>
<style lang="scss" scoped>
.guide-swiper{
background: white;
width: 100vw;
height: 100vh;
swiper{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.swiper-content{
text-align: center;
height: 100%;
padding-bottom: 27%;
box-sizing: border-box;
@extend .vertical;
.title{
font-weight: bold;
font-size: 50rpx;
color: $text-color;
padding: $padding 0;
}
.sub-title{
font-size: $title-size-m;
color: $text-gray;
}
.cover{
margin-top: $margin * 3;
display: inline-block;
position: relative;
width: 68%;
padding-top: 68%;
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
}
// 分页信息
.swiper-pages{
position: fixed;
left: 0;
right: 0;
bottom: 27vh;
text-align: center;
.item{
display: inline-block;
background: $text-gray-m;
height: 10rpx;
width: 10rpx;
margin: 0 8rpx;
&.show{
background: $text-price;
width: 20rpx;
transition: all .4s;
}
}
}
// 按钮
.guide-btn[size="default"]{
position: fixed;
bottom: 12vh;
left: 10vw;
width: 80vw;
background: $text-price;
border-radius: 0;
color: white;
height: 90rpx;
line-height: 90rpx;
padding: 0;
font-size: 32rpx;
z-index: 9;
&::after{
border: none;
}
}
}
</style>

View File

@@ -1,70 +1,19 @@
<template>
<view class="content">
<goods-list :list="goods"/>
</view>
</template>
<script>
import keyPhone from '@/public/keyPhone'
import goodsList from '@/components/goods-list/goods-list'
export default {
components:{
goodsList
},
data() {
return {
goods: [
{
cover: "https://yanxuan-item.nosdn.127.net/d3b072b5006f56935d15d239cbc5c953.jpg",
title: "片片大果仁,夏威夷坚果脆片 可可味 55克",
price: "16",
sales: "25"
},
{
cover: "https://yanxuan-item.nosdn.127.net/8cfaed758404e23bc74c7214505ce5ec.jpg",
title: "每日坚果亚麻籽谷物燕麦片 600克",
price: "58",
sales: "1002"
},
{
cover: "https://yanxuan-item.nosdn.127.net/65af0745153e2dfa3d7c4fafb7472db6.jpg",
title: "全新升级银罐,玲珑柑普茶 130克10颗",
price: "98",
sales: "2235"
},
{
cover: "https://yanxuan-item.nosdn.127.net/f3af9b6eaf15e6e3be1f14e14da90930.jpg",
title: "别致养生设计 猪鬃气垫按摩梳",
price: "79",
sales: "992"
},
{
cover: "https://yanxuan-item.nosdn.127.net/cb99e8a2f4597f3a5d05347a9eeb64c5.png",
title: "2020年新款日式减压按摩腰靠",
price: "219",
sales: "231"
},
{
cover: "https://yanxuan-item.nosdn.127.net/fff6aead2baff207e869f0aa6f276b63.png",
title: "T300无线吸尘器",
price: "159",
sales: "988"
}
]
}
},
onLoad() {
// console.log(this.$store.state)
}
},
methods: {
// login(){
// keyPhone.keyAuth().then(res => {
// console.log(res)
// }).catch(err =>{
// console.log(err)
// })
// }
}
}
</script>

View File

@@ -36,6 +36,120 @@
<view class="vip-btn">立即开通</view>
</view>
</view>
<!-- 易货订单 -->
<view class="user-group">
<view class="title">
<view class="title-text">易货订单</view>
<view class="title-more">
全部订单
<uni-icons class="title-icon" color="#999" type="arrowright" size="14" />
</view>
</view>
<view class="group-flex order-flex">
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_00.png" mode="aspectFill"></image>
<view class="item-title">待付款</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_01.png" mode="aspectFill"></image>
<view class="item-title">待发货</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_02.png" mode="aspectFill"></image>
<view class="item-title">待提货</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_03.png" mode="aspectFill"></image>
<view class="item-title">待评价</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_04.png" mode="aspectFill"></image>
<view class="item-title">退货售后</view>
</view>
</view>
</view>
<!-- 易货中心管理 -->
<view class="user-group">
<view class="title">
<view class="title-text">易货中心管理</view>
<view class="title-more">
交易中心
<uni-icons class="title-icon" color="#999" type="arrowright" size="14" />
</view>
</view>
<view class="group-flex group-flex-3">
<view class="item">
<image class="item-cover" src="@/static/icons/user_icon_00.png" mode="aspectFill"></image>
<view class="item-title">上架中</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/user_icon_01.png" mode="aspectFill"></image>
<view class="item-title">寄存中</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/user_icon_02.png" mode="aspectFill"></image>
<view class="item-title">低价求购</view>
</view>
</view>
</view>
<!-- 我的资产 -->
<view class="user-group">
<view class="title">
<view class="title-text">我的资产</view>
</view>
<view class="group-flex group-flex-4">
<view class="item">
<view class="item-num">0</view>
<view class="item-title">原石</view>
</view>
<view class="item">
<view class="item-num">0</view>
<view class="item-title">贡献值</view>
</view>
<view class="item">
<view class="item-num">0</view>
<view class="item-title">易币</view>
</view>
<view class="item">
<view class="item-num">0</view>
<view class="item-title">零钱</view>
</view>
</view>
</view>
<!-- 管理工具 -->
<view class="user-group">
<view class="title">
<view class="title-text">管理工具</view>
</view>
<view class="group-flex group-flex-4">
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_00.png" mode="aspectFill"></image>
<view class="item-title">店铺管理</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_01.png" mode="aspectFill"></image>
<view class="item-title">员工管理</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_02.png" mode="aspectFill"></image>
<view class="item-title">营销管理</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_02.png" mode="aspectFill"></image>
<view class="item-title">产品管理</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_02.png" mode="aspectFill"></image>
<view class="item-title">核销管理</view>
</view>
<view class="item">
<image class="item-cover" src="@/static/icons/order_icon_02.png" mode="aspectFill"></image>
<view class="item-title">卡券管理</view>
</view>
</view>
</view>
<!-- 版权信息 -->
<view class="copyright">易品新境 beta 1.0.0</view>
</view>
</template>
@@ -52,7 +166,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
// 用户
.user{
background: #f3f4f8;
@@ -159,4 +273,80 @@
}
}
}
// 用户功能组
.user-group{
margin: $margin;
background: white;
border-radius: $radius;
.title{
padding: $padding $padding ($padding - 10);
display: flex;
justify-content: space-between;
border-bottom: solid 1rpx $border-color;
align-items: center;
.title-text{
line-height: 40rpx;
font-size: $title-size;
}
.title-more{
height: 40rpx;
line-height: 40rpx;
font-size: $title-size-sm;
color: $text-gray-m;
}
.title-icon{
vertical-align: middle;
}
}
.group-flex{
display: flex;
padding: $padding - 10;
flex-wrap: wrap;
.item{
margin: $padding / 3;
text-align: center;
}
}
}
// 易货订单
.order-flex{
.item{
width: calc(20% - #{$padding - 10});
.item-num{
font-weight: bold;
font-size: $title-size + 4;
}
.item-cover{
width: 62rpx;
height: 62rpx;
vertical-align: top;
}
.item-title{
font-size: $title-size-sm - 2;
color: $text-gray-m;
line-height: 40rpx;
}
}
}
// 工具内容
.group-flex-4{
@extend .order-flex;
.item{
width: calc(25% - #{$padding - 10});
}
}
.group-flex-3{
@extend .order-flex;
.item{
width: calc(33.33% - #{$padding - 10});
}
}
// 易品新境
.copyright{
padding: $padding 0 ($padding * 2);
text-align: center;
font-size: $title-size-sm;
color: $text-gray-m;
}
</style>

View File

@@ -0,0 +1,234 @@
<template>
<view>
<!-- 用户信息 -->
<view class="user">
唐明明
</view>
<!-- 收藏 -->
<view class="tool-block">
<view class="tool-content">
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">商品收藏</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">店铺收藏</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">浏览记录</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">优惠券</view>
</view>
</view>
</view>
<!-- 易货订单 -->
<view class="tool-block">
<view class="title">
<view class="title-mian">
易货订单
</view>
<view class="title-more">
全部订单<uni-icons type="arrowright" size="30" />
</view>
</view>
<view class="order-content">
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">待付款</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">待发货</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">待提货</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">待评价</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">退换货</view>
</view>
</view>
</view>
<!-- 易货中心 -->
<view class="tool-block">
<view class="title">
<view class="title-mian">
易货中心管理
</view>
<view class="title-more">
交易中心<uni-icons type="arrowright" size="30" />
</view>
</view>
<view class="tool-content">
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">上架中</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">寄存中</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">低价求购</view>
</view>
</view>
</view>
<!-- 我的资产 -->
<view class="tool-block">
<view class="title">
<view class="title-mian">
我的资产
</view>
</view>
<view class="tool-content">
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">原石</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">贡献值</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">易币</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">零钱</view>
</view>
</view>
</view>
<!-- 管理工具 -->
<view class="tool-block">
<view class="title">
<view class="title-mian">
管理工具
</view>
</view>
<view class="tool-content">
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">店铺管理</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">员工管理</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">营销管理</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">产品管理</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">核销管理</view>
</view>
<view class="item">
<image class="item-cover" src="" mode="aspectFill"></image>
<view class="item-title">卡券管理</view>
</view>
</view>
</view>
<!-- 版权信息 -->
<view class="copyright">易品新境 beta 1.0.0</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
// 用户卡片
.user{
background: white;
margin: $margin;
border-radius: $radius;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
text-align: center;
padding: $padding * 2;
}
// 工具块
.tool-block{
background: white;
margin: $margin;
border-radius: $radius;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
.title{
display: flex;
justify-content: space-between;
border-bottom: solid 1rpx $border-color-lg;
padding: ($padding - 10) $padding ($padding/2);
.title-mian{
font-size: $title-size + 4;
font-weight: bold;
line-height: 60rpx;
color: $text-color;
}
.title-more{
font-size: $title-size-lg;
color: $text-gray;
line-height: 60rpx;
}
}
}
// 营销工具
.tool-content{
padding: $padding - 10;
display: flex;
flex-wrap: wrap;
.item{
width: calc(25% - #{($margin / 3) * 2});
margin: ($margin/2) ($margin / 3);
text-align: center;
.item-cover{
background: #999999;
width: 68rpx;
height: 68rpx;
vertical-align: top;
}
.item-title{
font-size: $title-size-sm;
padding-top: $padding/3;
color: $text-gray;
}
}
}
// 订单
.order-content{
@extend .tool-content;
.item{
width: calc(20% - #{($margin / 3) * 2});
}
}
// 易品新境
.copyright{
padding: $padding 0 ($padding * 2);
text-align: center;
font-size: $title-size-sm;
color: $text-gray-m;
}
</style>

View File

@@ -50,3 +50,20 @@ $padding: 30rpx;
.ios-top{
padding-top: var(--status-bar-height);
}
// 公共样式
.vertical {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
}
.nowrap {
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
// 修改nvtab
$mainColor: #c82626;

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
static/dev/mall-logo-00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
static/dev/mall-logo-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,84 @@
## 1.2.42021-07-21
1、btn的icon添加text可以带文字<br>
2、修复样式btn右边间距、输入框字体大小改为inherit等
## 1.2.32021-07-20
1、开启了model滚动监听<br>
2、按钮组添加了badge设置角标
## 1.2.22021-05-25
1、新增设置样式事件setStyle()可通过ref来调用
2、修改config内style传参格式改为string类型兼容小程序
3、新增组件内注释
4、其它小优化
## 1.2.12021-03-16
处理了手机从竖屏变横屏后显示错乱问题
## 1.2.02021-03-05
处理了右按钮样式小程序兼容错误
## 1.1.92021-03-01
处理nvue兼容性引入scss失败、css错误
## 1.1.82021-02-25
1、兼容nvue
2、添加背景图
## 1.1.72021-02-24
1、兼容uni_modules官方新推出的插件管理兼容nv写法需要在pages.json添加代码"easycom": {"nv": "@/uni_modules/pyh-nv/components/pyh-nv/pyh-nv.vue"}
2、nvRoute函数更名为nv
## 1.1.62021-02-01
1、修复model定位问题
## 1.1.52021-02-01
1、全类型支持设置右方按钮组
2、添加h5 document.title等于config的标题
3、添加属性model可在页面内独立使用常用于不满足右方按钮小程序不显示的兼容方案使用2个nv
4、优化代码结构
## 1.1.42020-11-18
1、修复微信公众号中input的disabled点击跳转失效问题
2、修复右上角纯图片按钮变形问题
## 1.1.32020-09-27
修复config空值有时会报错的bug
## 1.1.22020-09-14
添加通用导航栏渐变色背景功能渐变色背景会导致transparent背景色渐变失效
## 1.1.12020-09-01
修复icon原生组件在小程序内高度铺满导致的错误问题
## 1.1.02020-08-27
1、使用icon代替图片图标,完全独立组件
2、添加回到顶部的功能
## 1.0.92020-08-18
''' 1、单logo模式支持全样式设置可实现全背景图等
2、优化了路由跳转判断及多端跳转
3、组件内利用了scss的特性优化了主色的修改
4、示例项目内添加了全局变量globalData以及全路由封装函数nvRoute组件也做了兼容处理可快速设置配置如需路由做特殊处理比如history模式等可使用封装的nvRoute统一处理 '''
## 1.0.82020-08-17
1、修改搜索框动态赋值方式更加方便直接修改search.value需要初始化value旧的赋值方式已废弃。重要 2、注释样式上版本组件内样式没有注释uni.scss的部分
## 1.0.72020-08-13
1、修改标题字体的size和weight,等同于uniapp的h5样式 2、补充组件主色覆盖样式的注释可去除注释快速修改也可使用uni.scss快速修改主色
## 1.0.62020-07-29
1、补充文档对于搜索框赋值的说明添加动态赋值功能
## 1.0.52020-07-20
补充单组件文件缺少的文件iconfont.wxss(后续版本已移除该文件)
## 1.0.42020-07-08
1、修复fixed定位辅助容器高度问题
2、补充示例项目属性项
## 1.0.32020-07-08
1、添加config.position属性并且默认为'fixed' 2、添加config.fixedAssist属性———固定定位辅助导航栏高度与导航栏一致可设置背景色 3、原home返回键背景取消如需要需使用componentBgColor 4、状态栏字体颜色与导航栏字体颜色一致状态栏字体只支持#000000或#ffffff 5、config.color 改为导航栏和状态栏字体色,也用于渐变完成时字体色(状态栏字体只支持#000000或#ffffff 6、transparent.initColor代替之前的状态栏字体颜色设置该值为导航栏与状态栏初始色状态栏字体只支持#000000或#ffffff 7、修改默认字体色为'#000000'
## 1.0.22020-07-07
修改示例配置,更友好上手
## 1.0.12020-07-07
上传初版,更新说明文档
## 1.0.02020-07-07
上传初版

Binary file not shown.

View File

@@ -0,0 +1,509 @@
<template name="nv">
<view class="pyh-nv-box" :style="style">
<view class='nvHeight' :style="[{'height':navigatorHeight+'px'},{'background':(config.fixedAssist&&config.fixedAssist.bgColor)||''}]" v-if="isFixed&&!(config.fixedAssist&&config.fixedAssist.hide)"></view>
<image :src="config.bgImage" :style="[{'position':config.model?'fixed':'absolute'},{'top':(config.model?(navigatorTop+'px'):0)},{'width':windowWidth+'px','height':navigatorHeight+'px'}]" v-if="config.bgImage" class="bgImage"></image>
<view :class="['nvBox',{'noModel':!config.model}]" :style="[{'width':windowWidth+'px'},{'color':getTxtColor},{'background':getBgColor},{'opacity':config.transparent&&config.transparent.type=='content'?transparent.opacity:1},{'position':isFixed?'fixed':'relative'},{'top':(isFixed&&config.model?(navigatorTop+'px'):0)}]">
<view class='nvHeight' :style="[{'height':navigatorHeight+'px'}]"></view>
<view class='nvFixed' :style="[{'width':windowWidth+'px'}]">
<!-- 单logo -->
<view :class="['nvContent','nvLogoBox',{'androidwx':androidwx}]" v-if="config.type=='logo'">
<image :src="config.logo.src?config.logo.src:'/static/logo.png'" class="nvLogo" :style="config.logo.style" :mode="config.logo.style|getImgMode" @tap.stop="nvLogoTap"></image>
<view v-if="config.btn&&config.btn.length>0" class="nvBtnGroup">
<block v-for="(b,n) in config.btn" :key="n">
<view class="nvBtn" v-if="b.icon" @tap.stop="nvBtnTap" :data-index="n" :data-type="b.type" :style="b.style||''">
<image :src="b.icon" mode="widthFix" class="nvBtnImg"></image>
<text class="nvBtnIconTxt" v-if="b.text">{{b.text}}</text>
<view class="nvBadge" v-if="b.badge&&b.badge.text" :style="b.badge.style||''">{{b.badge.text}}</view>
</view>
<view class="nvBtn" v-else-if="b.text" @tap.stop="nvBtnTap" :data-index="n" :data-type="b.type" :style="b.style||{color:getTxtColor}">
<text>{{b.text}}</text>
<view class="nvBadge" v-if="b.badge&&b.badge.text" :style="b.badge.style||''">{{b.badge.text}}</view>
</view>
</block>
</view>
</view>
<!-- 含搜索 -->
<view :class="['nvContent','nvSearchBox',{'nvHadBack':!config.hideback}]" v-else-if="config.type=='search'">
<image :src="config.logo.src?config.logo.src:'/static/logo.png'" class="nvLogo nvSearchLogo" :style="config.logo.style" :mode="config.logo.style|getImgMode" @tap.stop="nvLogoTap" v-if="config.logo&&!config.address"></image>
<view class="nvAddress" :style="[{'background':(config.address.bgColor||config.componentBgColor||'')},{'color':(config.address.color||'')}]" v-if="config.address" @tap.stop="nvAddressTap">
<text class="iconfont nvAddressIcon" :style="{'color':(config.address.color||'')}">&#xe613;</text>
<view class="nvAddressTextBox">
<text class="nvAddressText">{{config.address[config.address.fields||'province']||'广东省'}}</text>
</view>
</view>
<view class="nvSForm" >
<view class="nvSBox" :style="[{'background':(config.search.bgColor||config.componentBgColor||'')},{'border':config.search.border||''}]" @tap.stop="searchTap" data-isInput="true">
<icon type="search" size="18" class="searchIcon"></icon>
<input class="nvInput" type="text" :value="inputValue" :focus="config.search.focus" :placeholder="config.search.placeholder" :disabled="!config.search.input" @input="inputChange" @confirm="formSubmit" :confirm-type="config.search.confirmType||'search'" placeholder-class="searchPlac" :placeholder-style="config.search.placeholderStyle||''"/>
<icon type="clear" size="15" class="nvSClose" @tap.stop="inputClear" v-if="inputValue"></icon>
</view>
<text class='nvSBtn' @tap.stop="formSubmit" v-if="config.search.btn&&config.search.input" :style="config.search.btn.style||''">{{config.search.btn.text||'搜索'}}</text>
</view>
<view v-if="config.btn&&config.btn.length>0" class="nvBtnGroup nvBtnGroup-static">
<block v-for="(b,n) in config.btn" :key="n">
<view class="nvBtn" v-if="b.icon" @tap.stop="nvBtnTap" :data-index="n" :data-type="b.type" :style="b.style||''">
<image :src="b.icon" mode="widthFix" class="nvBtnImg"></image>
<text class="nvBtnIconTxt" v-if="b.text">{{b.text}}</text>
<view class="nvBadge" v-if="b.badge&&b.badge.text" :style="b.badge.style||''">{{b.badge.text}}</view>
</view>
<view class="nvBtn" v-else-if="b.text" @tap.stop="nvBtnTap" :data-index="n" :data-type="b.type" :style="b.style||{color:getTxtColor}">
<text>{{b.text}}</text>
<view class="nvBadge" v-if="b.badge&&b.badge.text" :style="b.badge.style||''">{{b.badge.text}}</view>
</view>
</block>
</view>
</view>
<!-- 默认导航栏 -->
<view class="nvContent nvDefault" v-else>
<view v-if="config.tabArr&&config.tabArr.length>0" :class="['nvTitle','nvTabBox',{'androidwx':androidwx}]">
<view :class="['nvTab',{'nvTabHide':t.hide}]" @tap.stop="nvTabTap" :data-index="i" v-for="(t,i) in config.tabArr" :key="i">
<text :class="[t.active?'nTTxt-ac':'nTTxt']" :style="{'color':(t.active?mainColor:getTxtColor)}">{{t.title}}</text>
<view :class="[t.active?'nTLine-ac':'nTLine']"></view>
</view>
</view>
<view v-else :class="['nvTitle',{'androidwx':androidwx},{'hideback':config.hideback}]">
<text :style="{'color': getTxtColor}">{{config.title||title}}</text>
</view>
<view v-if="config.btn&&config.btn.length>0" class="nvBtnGroup">
<block v-for="(b,n) in config.btn" :key="n">
<view class="nvBtn" v-if="b.icon" @tap.stop="nvBtnTap" :data-index="n" :data-type="b.type" :style="b.style||''">
<image :src="b.icon" mode="widthFix" class="nvBtnImg"></image>
<text class="nvBtnIconTxt" v-if="b.text">{{b.text}}</text>
<view class="nvBadge" v-if="b.badge&&b.badge.text" :style="b.badge.style||''">{{b.badge.text}}</view>
</view>
<view class="nvBtn" v-else-if="b.text" @tap.stop="nvBtnTap" :data-index="n" :data-type="b.type" :style="b.style||{color:getTxtColor}">
<text>{{b.text}}</text>
<view class="nvBadge" v-if="b.badge&&b.badge.text" :style="b.badge.style||''">{{b.badge.text}}</view>
</view>
</block>
</view>
</view>
<!-- 返回键 -->
<text :class="['iconfont','nvback',{'nvhome':isSharePage&&!config.closeCheckback}]" @tap.stop="backTap" :style="{'background':(isSharePage&&!config.closeCheckback?(config.componentBgColor||''):''),'color':getTxtColor,'border-radius':'26rpx','font-size': isSharePage&&!config.closeCheckback?'36rpx':'54rpx'}" v-if="!config.hideback">{{isSharePage&&!config.closeCheckback?'&#xe605;':'&#xe743;'}}</text>
</view>
</view>
<text class="iconfont nvToTop" :style="(config.toTop&&config.toTop.style)||''" v-if="config.toTop&&showToTop" @tap.stop="toTopTap">&#xe64d;</text>
</view>
</template>
<script>
var platform;
//#ifdef H5
platform="h5"
//#endif
//#ifdef APP-PLUS
platform="app"
//#endif
//#ifdef MP
platform="mp"
//#endif
export default {
name:"nv",
props:{
config:{
type:Object,
default(){
return {}
}
},
},
data() {
return {
platform:platform||'h5',
title:getApp().globalData.NAME||"pyh-nv",
mainColor:getApp().globalData.mainColor||"#2b9939",
currentPages:getCurrentPages().length||1,
home:getApp().globalData.HOME||"/pages/index/index",
inputValue:'',
showToTop:false,
transparent:{
initColor:"#ffffff",
finishColor:"#000000",
color:"#ffffff",
opacity:0
},
windowWidth:uni.getSystemInfoSync().windowWidth,
style:""
};
},
watch:{
"config.search.value":function(value){
//监听输入框值得改变
var e = {detail:{value:value}};
this.inputValue = e.detail.value;
if(this.config.type=="search"&&this.config.search.input)this.$emit("nvInput",e);
}
},
filters:{
getImgMode(style){
//获取图片mode类型
if(style&&style.indexOf("height")>-1){
return 'aspectFill';
}else{
return 'widthFix';
}
}
},
computed:{
statusHeight(){
//状态栏高度
var statusBarHeight = this.config.model?0:uni.getSystemInfoSync().statusBarHeight;
return statusBarHeight+'px';
},
navigatorHeight(){
//导航栏高度
var statusBarHeight = this.config.model?0:uni.getSystemInfoSync().statusBarHeight;
var windowWidth = this.lockWindowWidth&&this.windowWidth>750?375:this.windowWidth;
return parseInt(88*windowWidth/750)+statusBarHeight;
},
navigatorTop(){
//model类型下的顶部高度
var windowWidth = this.lockWindowWidth&&this.windowWidth>750?375:this.windowWidth;
if(this.config.model){
return parseInt(88*windowWidth/750)+uni.getSystemInfoSync().statusBarHeight;
}else{
return 0;
}
},
//安全区域高度
safeArea(){return this.config.safeArea||uni.getSystemInfoSync().safeArea.height;},
//固定定位判断
isFixed(){return this.config.transparent||this.config.position=='fixed'||this.config.position=='absolute'||!this.config.position;},
//判断分享页
isSharePage(){return this.currentPages==1;},
//安卓微信
androidwx(){
if(this.config.checkAndroidwx&&this.platform=="mp"&&uni.getSystemInfoSync().platform.indexOf("ios")==-1){
return true;
}else{
return false;
}
},
//获取字体色
getTxtColor(){
return ((this.config.transparent&&this.config.transparent.initColor)?this.transparent.color:'')||this.config.color||'';
},
//获取/转换背景色
getBgColor(){
var that = this;
if(this.config.bgImage){
return "transparent";
}else if(this.config.bgColor&&this.config.bgColor.indexOf("gradient")>-1){
return this.config.bgColor;
}else{
return (this.config.bgColor||this.config.transparent)?'rgba('+getRgbString()+','+(this.config.transparent&&this.config.transparent.type!='content'?this.transparent.opacity:1)+')':'#fff';
}
function getRgbString(){
var bgColor = that.config.bgColor||"#ffffff",returnString=""
if(bgColor.indexOf(",")>-1){
returnString = bgColor.split('(')[1].replace(')','').split(',').slice(0,3).join(",")
}else{
if(bgColor.length==4)bgColor = bgColor+bgColor.charAt(bgColor.length-1)+bgColor.charAt(bgColor.length-1)+bgColor.charAt(bgColor.length-1)
var string = bgColor.replace("#",'');
returnString = parseInt(string.substring(0,2), 16)+','+parseInt(string.substring(2,4), 16)+','+parseInt(string.substring(4,6), 16)
}
return returnString
}
}
},
created() {
// #ifdef APP-NVUE
var domModule = weex.requireModule("dom");
domModule.addRule('fontFace', {
'fontFamily': 'iconfont',
'src': "url('http://at.alicdn.com/t/font_1687851_vdpjdiddv6.ttf')"
})
// #endif
if(this.config.search&&this.config.search.value)this.inputValue=this.config.search.value;
if(this.config.transparent&&this.config.transparent.initColor){
var initColor = this.config.transparent.initColor,finishColor = this.config.color||"#000000";
if(initColor.indexOf("#")>-1&&initColor.length==4){
initColor = initColor+initColor.charAt(initColor.length-1)+initColor.charAt(initColor.length-1)+initColor.charAt(initColor.length-1);
}
if(finishColor.indexOf("#")>-1&&finishColor.length==4){
finishColor = finishColor+finishColor.charAt(finishColor.length-1)+finishColor.charAt(finishColor.length-1)+finishColor.charAt(finishColor.length-1);
}
if(!((initColor=="#000000"||initColor=="#ffffff")&&(finishColor=="#000000"||finishColor=="#ffffff"))){
console.log("状态栏颜色只支持,#000000或#ffffff");
}
this.transparent.initColor = initColor;
this.transparent.color = initColor;
this.transparent.finishColor = finishColor;
}
this.deviceOrientation=uni.getSystemInfoSync().windowWidth>750?"landscape":"portrait";
if(this.deviceOrientation=="portrait")this.lockWindowWidth=true;
uni.onWindowResize((res)=>{
if(this.deviceOrientation!=res.deviceOrientation){
this.deviceOrientation = res.deviceOrientation;
this.windowWidth = res.size.windowWidth;
}
})
},
mounted() {
if(this.config.color){
var obj = {frontColor:this.config.color,backgroundColor:this.config.bgColor||"#ffffff"};
uni.setNavigationBarColor(obj);
}
if(this.config.transparent&&this.config.transparent.initColor){
var obj = {frontColor:this.transparent.initColor,backgroundColor:this.config.bgColor||"#ffffff"};
uni.setNavigationBarColor(obj);
}
if(platform=="h5")document.title=this.config.title||this.title;
},
onUnload() {uni.offWindowResize();},
methods:{
setStyle(object){
//设置导航栏样式
var style = "";
for(var i in object){style += (i+":"+object[i]+";")}
this.style=style;
},
nvLogoTap(e){
//logo点击
var url = this.config.logo.url;
this.$emit("nvLogoTap");
url&&uni.reLaunch({url:url});
},
nvAddressTap(e){
//地址图标点击
this.$emit("nvAddressTap");
},
searchTap(e){
//搜索按钮点击
if(this.config.search.url||this.config.search.linkType){
this.linkTo({currentTarget:{dataset:{url:this.config.search.url,type:this.config.search.linkType||''}}});
}else{
this.$emit("searchTap");
}
},
inputChange(e){
//输入框输入
this.inputValue = e.detail.value;
if(this.config.type=="search"&&this.config.search.input)this.$emit("nvInput",e)
},
inputClear(e){
//输入框清除
this.inputValue="";
if(this.config.type=="search"&&this.config.search.input)this.$emit("nvInput",e);
},
formSubmit(e){
//输入框提交
var e = {detail:{value:this.inputValue}};
this.$emit("nvFormSubmit",e)
},
nvBtnTap(e){
//右按键点击
var e = {type:e.currentTarget.dataset.type,index:parseInt(e.currentTarget.dataset.index)};
this.$emit("nvBtnTap",e);
},
nvTabTap(e){
//中间tab按键点击
var e = {index:parseInt(e.currentTarget.dataset.index)};
this.$emit("nvTabTap",e);
},
toTopTap(e){
//回到顶部
this.showToTop=false
uni.pageScrollTo({scrollTop:0,duration:this.config.toTop.duration||(this.config.toTop.duration===0?0:300)});
this.$emit("nvToTop");
},
pageScroll(e={scrollTop:0}){
//页面滚动
if(!this.config.transparent)return;
var anchor = this.navigatorHeight;
if(this.config.transparent.anchor)anchor=this.config.transparent.anchor;
var op = parseFloat(parseFloat(e.scrollTop/anchor).toFixed(1));
if(e.scrollTop<=anchor){
this.transparent.opacity = op;
if(this.config.transparent.initColor){
if(op>=.5){
this.transparent.color=this.transparent.finishColor;
uni.setNavigationBarColor({frontColor:this.transparent.finishColor,backgroundColor:this.config.bgColor||"#ffffff"});
}else{
this.transparent.color=this.transparent.initColor;
uni.setNavigationBarColor({frontColor:this.transparent.initColor,backgroundColor:this.config.bgColor||"#ffffff"});
}
}
}else{
this.transparent.opacity = 1;
}
if(this.config.toTop){
if(this.showToTop&&e.scrollTop<this.safeArea){
this.showToTop=false;
}
if(!this.showToTop&&e.scrollTop>=this.safeArea){
this.showToTop=true;
}
}
},
backTap(){
//返回键点击
if(this.config.backpress){
this.$emit("backTap");
}else{
this.linkTo({currentTarget:{dataset:{type:'navigateBack'}}});
}
},
linkTo(e) {
//跳转
var url=e.currentTarget.dataset.url,
type=e.currentTarget.dataset.type,
isInput=e.currentTarget.dataset.isInput;
if(isInput&&this.config.type=="search"&&this.config.search&&this.config.search.input){
return;
}
if(this.$nv){
this.$nv(url,type);
}else{
if(!url&&!type)return;
if(url=="/"||url==".")return;
if(typeof(url)=="object"){
uni.navigateTo(url);
return
}
if(typeof(url)=="number"){
if(this.currentPages==1){
uni.reLaunch({url:this.home})
}else{
uni.navigateBack({delta:Math.abs(url||1)})
}
return;
}
if(type){
if (type.indexOf("ab")>-1) {
uni.switchTab({ url: url });
} else if (type=='-1'||type.indexOf("redirect")>-1||type.indexOf("rep")>-1) {
uni.redirectTo({ url: url });
} else if (type.indexOf("aunch")>-1) {
uni.reLaunch({ url: url });
} else if (type.indexOf("ack")>-1) {
if(this.currentPages==1){
uni.reLaunch({url:this.home});
}else{
uni.navigateBack();
}
}else{
uni.navigateTo({url:url});
}
}else{
if(url.indexOf("/")==0||url.indexOf(".")==0){
uni.navigateTo({url:url});
}else{
if(url.indexOf("?")>0){url+="&platform="+platform;}else{url+="?platform="+platform;};
if(platform=="h5"){
top.location.href=url;
}else if(platform=="app"){
plus.runtime.openUrl(url);
}else{
uni.navigateTo({url:"/pages/other/webview/webview?src="+url.replace("?","&")});
}
}
}
}
}
}
}
</script>
<style lang="scss" scoped>
@font-face {
font-family: iconfont;
src: url('./iconfont.ttf')
}
.iconfont {
font-family: iconfont;
font-size: 30rpx;
font-style: normal;
}
//主色可以设置uni.scss的$mainColor
//或
//uni.scss未定义或定义为null,修改下方$mainColor的默认值
$mainColor: #2b9939 !default;
.pyh-nv-box{position: relative;}
.bgImage{position: absolute;left: 0;top: 0;}
.nvBox{background-color: #fff;z-index: 991;color: #000000;}
.noModel{z-index: 992;}
.nvHeight{height: 88rpx;}
.nvFixed{position: absolute;bottom: 0;height: 88rpx;left: 0;z-index: 992;padding: 0 20rpx;}
.nvContent{flex: 1;height: 88rpx;align-items: center;}
.nvInput{font-size: inherit;flex: 1;}
.searchIcon{
width: 18px;
margin-right: 20rpx;
/* #ifdef MP */
height: 18px;
/* #endif */
}
.nvTitle{position: absolute;top: 0;left: 0;right: 0;text-align: center;height: 88rpx;line-height: 88rpx;align-items: center;justify-content: center;padding: 0 80rpx;font-size: 32rpx;font-weight: bold;overflow: hidden;text-overflow: ellipsis;}
.androidwx{text-align: left;padding-left: 80rpx;justify-content: flex-start!important;}
.nvback{font-size: 54rpx;position: absolute;left: 6rpx;padding-left: 8rpx;bottom: 18rpx;flex-direction: row;align-items: center;z-index: 992;width: 52rpx;height: 52rpx;}
.nvhome{border-radius: 26rpx;font-size: 36rpx;padding: 0;left: 20rpx;text-align: center;justify-content: center;}
.nvHadBack{padding-left: 60rpx;}
//logo
.nvLogoBox{align-items: center;justify-content: center;position: absolute;left: 0;padding-right: 0rpx!important;left: 0;right: 0;}
.nvLogo{width: 60rpx;}
//含搜索框
.nvSearchLogo{margin-right: 20rpx;}
.nvAddress{background-color: #f8f8f8;border-radius: 44rpx;justify-content: center;align-items: center;padding: 0 16rpx 0 10rpx;font-size: 28rpx;line-height: 30rpx;margin-right: 20rpx;color: #000000;height: 60rpx;width: 144rpx;}
.nvAddressIcon{width: 30rpx;margin-right: 4rpx;font-size: 34rpx;}
.nvAddressTextBox{width: 84rpx;overflow: hidden;}
.nvAddressText{flex: 1;font-size: 28rpx;line-height: 30rpx;overflow: hidden;text-overflow: ellipsis;}
.searchPlac{color: #bbb;}
.nvSForm{flex: 1;justify-content: space-between;align-items: center;}
.nvSBox{flex: 1;border-radius: 44rpx;background-color: #f8f8f8;height: 60rpx;line-height: 60rpx;padding: 0 20rpx;align-items: center;}
.nvSBtn{color: #fff;border-radius: 44rpx;height: 60rpx;line-height: 60rpx;width: 120rpx;padding: 0;text-align: center;font-size: 28rpx;margin-left: 20rpx;background-color: $mainColor;}
.nvSClose{
/* #ifdef MP */
height: 15px;
/* #endif */
}
//右边按钮组
.nvBtnGroup{position: absolute;right: 0;top: 0;height: 88rpx;align-items: center;justify-content: center;z-index: 993;font-size: 28rpx;color: #000000;}
.nvBtn{display: flex;align-items: center;justify-content: center;flex-direction: column;text-align: center;}
.nvBtn:first-child{margin-left: 0;}
.nvBtn,.nvBtnImg{padding: 0;margin-left: 20rpx;background: transparent;border: 0;color: #000000;z-index: 3;font-size: 28rpx;position: relative;}
.nvBtnImg{width: 48rpx;margin-left: 0;}
.nvBtnGroup-static{position: relative;padding-left: 20rpx;}
.nvBtn .nvBadge{width: 26rpx;height: 26rpx;position: absolute;top: -8rpx;right: -8rpx;display: flex;align-items: center;justify-content: center;border-radius: 50%;overflow: hidden;background-color: red;color: #fff;font-size: 16rpx;z-index: 4;}
//tab栏
.nvTabBox{position: absolute!important;}
.nvTab{flex-direction: column!important;align-items: center;justify-content: flex-end;margin: 0 10rpx;position: relative;}
.nTTxt,.nTTxt-ac{padding: 0 10rpx;line-height: 88rpx;}
.nTLine,.nTLine-ac{height: 4rpx;border-radius: 2rpx;background: transparent;position: absolute;bottom: 0;left: 0;right: 0;}
.nTTxt-ac{color: $mainColor;}
.nTLine-ac{background: $mainColor;}
.nvTabHide{width:0;height:0;margin:0;overflow:hidden;}
//回到顶部
.nvToTop{position: fixed;bottom: 200rpx;right: 40rpx;z-index: 992;background: #fff;border-radius: 50%;width: 80rpx;height: 80rpx;text-align: center;line-height: 80rpx;font-size: 46rpx;box-shadow: 2rpx 2rpx 2rpx 2rpx #ddd;}
//小程序胶囊留位
/* #ifdef MP-WEIXIN */
.noModel .nvContent{padding-right: 200rpx;}
.noModel .nvSBtn,.noModel .nvBtnGroup{display: none;}
/* #endif */
/* #ifdef APP-NVUE */
.nvContent,.nvback,.nvLogoBox,.nvSearchBox,.nvAddress,.nvSForm,.nvSBox,.nvBtnGroup,.nvTabBox,.nvTab{flex-direction: row;}
.nvTitle,.nvAddress,.nvAddressText{lines: 1;}
.pyh-nv-box,.nvBox,.nvHeight,.nvFixed,.nvTitle,.nvLogoBox,.nvSearchBox,.nTLine,.nTLine-ac{flex: 1;}
.nvTab{flex-direction: column!important;align-items: center;justify-content: flex-end;line-height: 80rpx;margin: 0 10rpx;}
/* #endif */
/* #ifndef APP-NVUE */
.nvContent,.nvback,.nvLogoBox,.nvSearchBox,.nvAddress,.nvSForm,.nvSBox,.nvBtnGroup,.nvTabBox,.nvTab{display: flex;flex-direction: row;}
.nvTitle,.nvAddressText{white-space: nowrap;}
.nvBox,.nvBox *,.nvContent,.nvTitle,.nvFixed{box-sizing: border-box;}
.nvLogo,.nvAddressIcon,.nvBtnImg{height: auto;}
.pyh-nv-box,.nvBox,.nvHeight,.nvFixed,.nvTitle,.nvLogoBox,.nvSearchBox,.nTLine,.nTLine-ac{width: 100%;}
/* #endif */
</style>

View File

@@ -0,0 +1,79 @@
{
"id": "pyh-nv",
"name": "pyh-nv 全自定义、全兼容、全功能、多类型、可渐变导航栏",
"version": "1.2.4",
"description": "所有属性都可自定义兼容各端包括nvue所有类型导航栏都可渐变还可设置状态栏字体色1.1.6版本后续非uni_modules版本不再更新",
"keywords": [
"导航栏",
"自定义",
"渐变",
"状态栏",
"多端兼容"
],
"displayName": "pyh-nv 全自定义、全兼容、全功能、多类型、可渐变导航栏",
"repository": "https://github.com/Ulovely/pyh-nv",
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "y",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
},
"engines": {
"HBuilderX": "^3.1.0"
}
}

View File

@@ -0,0 +1,127 @@
### pyh-nv 全自定义、全兼容、全功能、多类型、可渐变导航栏
pyh-nv 导航栏组件,组件名:``nv``,代码块: nv。
**使用方式:**
uni_modules:
[uni_modules使用方法](https://uniapp.dcloud.io/uni_modules?id=%e4%bd%bf%e7%94%a8-uni_modules-%e6%8f%92%e4%bb%b6)
uni_modules在template内的名称为pyh-nv,兼容nv写法需要在pages.json添加代码
"easycom": {"nv": "@/uni_modules/pyh-nv/components/pyh-nv/pyh-nv.vue"}
非uni_modules:
复制uni_modules->pyh-nv->components->pyh-nv文件到根目录的components下
在 ``main.js`` 中引用组件
```javascript
import nv from "@/components/pyh-nv/pyh-nv.vue";
Vue.component("nv",nv)
```
在 ``template`` 中使用组件
```html
<nv></nv>
<nv :config="{'hideback':true}"></nv>
<nv :config="config"></nv>
```
在 ``script`` 中 config 说明
所有配置都为选填,无需要可以不配置,不复杂!!!</br>
所有配置都为选填,无需要可以不配置,不复杂!!!</br>
所有配置都为选填,无需要可以不配置,不复杂!!!</br>
**config 属性说明:**
|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|title |String |'pyh-nv' |标题,在组件内写死或动态修改 |
|position |String |'fixed' |定位方式,fixed和absoult都是固定定位其它值为静态导航栏随页面滚动 |
|hideback |Boolean|false |是否隐藏导航栏返回功能 |
|model |Boolean|false |是否页面内独立使用模型如果是固定定位top为导航栏高度 |
|bgImage |String |'' |导航栏背景图,如果使用则bgColor无效|
|bgColor |String |'#ffffff' |导航栏背景色,如果使用渐变色transparent渐变属性失效|
|color |String |'#000000' |导航栏和状态栏字体色,也用于渐变完成时字体色(状态栏字体只支持#000000或#ffffff|
|componentBgColor |String |'#f8f8f8' |导航栏组件背景色(可被覆盖),如果有设置,回到首页的返回键有背景色|
|type |String |'default' |导航栏类型(默认为通用),还有logo和search |
|safeArea |Number |安全高度 |暂时只用于控制滚动显示,比如回到顶部 |
|toTop |Object | |是否使用回到顶部,有该属性就是使用,详细见下方toTop说明} |
|logo |Object | |导航栏logo的配置,仅type为logo或search时有效,详细见下方logo说明 |
|search |Object | |导航栏含搜索框的配置,仅type为search时有效,详细见下方search说明 |
|transparent |Object | |导航栏渐变配置,详细见下方transparent说明 |
|fixedAssist |Object | |固定/绝对定位时辅助容器,{hide:false,bgColor:''} |
|address |Object | |搜索导航栏左地址配置,{province:'广东省'} |
|btn |Array |[] |导航栏右方按钮组,{text:'点击1',style:''},{icon:'',text:'',badge:{text:'1',style:''}}|
|tabArr |Array |[] |导航栏中间tab切换,{title:'',active:true,hide:false} |
**config 内 toTop 配置说明:**
|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|duration |Number |300 |回到顶部的滚动动画时间ms |
|style |String |'' |样式配置 |
**config 内 logo 配置说明:**
|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|src |String |'/static/logo.png' |logo路径 |
|url |String |'' |如果传值,点击logo会reLaunch到该url |
|style |String |'' |样式配置 |
**config 内 search 配置说明:**
|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|value |String |'' |input的初始值如需动态赋值必须初始化 |
|bgColor |String |'#f8f8f8' |组件背景色,覆盖 componentBgColor |
|input |Boolean|false |输入框提示语样式 |
|url |String |'' |input为false时生效,点击navigateTo到url |
|focus |Boolean|false |是否动聚焦 |
|placeholder |String |'搜索' |输入框提示语 |
|placeholderStyle |String |'' |输入框提示语样式 |
|btn |Object | |input为true时生效,搜索框提交按钮,{text:'搜索',style:''} |
|confirmType |String |'search' |同官方input的confirm-type,设置回车键文字 |
**config 内 transparent 配置说明:**
|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|type |String |'background' |渐变类型,content为全透明渐变 |
|anchor |Number |当前导航栏高度 |最终渐变位置 |
|initColor |String |'#ffffff' |导航栏与状态栏初始色,(状态栏字体只支持#000000或#ffffff |
**组件pyh-nv 事件说明(详情请参考示例项目)**
|属名 |说明 |
|--- |---- |
|nvLogoTap |点击logo,仅logo存在时生效 |
|nvAddressTap |点击地址,仅地址存在时生效 |
|nvInput |输入框input事件,仅search.input为true时生效 |
|nvFormSubmit |输入框确认事件,仅search.input为true时生效 |
|nvBtnTap |右方按钮组点击事件,仅右方按钮存在时生效 |
|nvTabTap |中间tab组点击事件,仅中间tab按钮存在时生效 |
**ref 事件说明(详情请参考示例项目)**
|事件名 |参数类型 |参数默认值 |说明 |
|--- |---- |---- |---
|setStyle |Object |{} |直接设置导航栏样式 |
|pageScroll |Object |{scrollTop:0} |传递页面滚动信息 |
**感谢:**
> 有更多优化建议和需求,请联系作者 panyh 。谢谢!

View File

@@ -0,0 +1,6 @@
## 1.2.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.52021-05-12
- 新增 组件示例地址
## 1.1.42021-02-05
- 调整为uni_modules目录规范

View File

@@ -0,0 +1,132 @@
export default {
"pulldown": "\ue588",
"refreshempty": "\ue461",
"back": "\ue471",
"forward": "\ue470",
"more": "\ue507",
"more-filled": "\ue537",
"scan": "\ue612",
"qq": "\ue264",
"weibo": "\ue260",
"weixin": "\ue261",
"pengyouquan": "\ue262",
"loop": "\ue565",
"refresh": "\ue407",
"refresh-filled": "\ue437",
"arrowthindown": "\ue585",
"arrowthinleft": "\ue586",
"arrowthinright": "\ue587",
"arrowthinup": "\ue584",
"undo-filled": "\ue7d6",
"undo": "\ue406",
"redo": "\ue405",
"redo-filled": "\ue7d9",
"bars": "\ue563",
"chatboxes": "\ue203",
"camera": "\ue301",
"chatboxes-filled": "\ue233",
"camera-filled": "\ue7ef",
"cart-filled": "\ue7f4",
"cart": "\ue7f5",
"checkbox-filled": "\ue442",
"checkbox": "\ue7fa",
"arrowleft": "\ue582",
"arrowdown": "\ue581",
"arrowright": "\ue583",
"smallcircle-filled": "\ue801",
"arrowup": "\ue580",
"circle": "\ue411",
"eye-filled": "\ue568",
"eye-slash-filled": "\ue822",
"eye-slash": "\ue823",
"eye": "\ue824",
"flag-filled": "\ue825",
"flag": "\ue508",
"gear-filled": "\ue532",
"reload": "\ue462",
"gear": "\ue502",
"hand-thumbsdown-filled": "\ue83b",
"hand-thumbsdown": "\ue83c",
"hand-thumbsup-filled": "\ue83d",
"heart-filled": "\ue83e",
"hand-thumbsup": "\ue83f",
"heart": "\ue840",
"home": "\ue500",
"info": "\ue504",
"home-filled": "\ue530",
"info-filled": "\ue534",
"circle-filled": "\ue441",
"chat-filled": "\ue847",
"chat": "\ue263",
"mail-open-filled": "\ue84d",
"email-filled": "\ue231",
"mail-open": "\ue84e",
"email": "\ue201",
"checkmarkempty": "\ue472",
"list": "\ue562",
"locked-filled": "\ue856",
"locked": "\ue506",
"map-filled": "\ue85c",
"map-pin": "\ue85e",
"map-pin-ellipse": "\ue864",
"map": "\ue364",
"minus-filled": "\ue440",
"mic-filled": "\ue332",
"minus": "\ue410",
"micoff": "\ue360",
"mic": "\ue302",
"clear": "\ue434",
"smallcircle": "\ue868",
"close": "\ue404",
"closeempty": "\ue460",
"paperclip": "\ue567",
"paperplane": "\ue503",
"paperplane-filled": "\ue86e",
"person-filled": "\ue131",
"contact-filled": "\ue130",
"person": "\ue101",
"contact": "\ue100",
"images-filled": "\ue87a",
"phone": "\ue200",
"images": "\ue87b",
"image": "\ue363",
"image-filled": "\ue877",
"location-filled": "\ue333",
"location": "\ue303",
"plus-filled": "\ue439",
"plus": "\ue409",
"plusempty": "\ue468",
"help-filled": "\ue535",
"help": "\ue505",
"navigate-filled": "\ue884",
"navigate": "\ue501",
"mic-slash-filled": "\ue892",
"search": "\ue466",
"settings": "\ue560",
"sound": "\ue590",
"sound-filled": "\ue8a1",
"spinner-cycle": "\ue465",
"download-filled": "\ue8a4",
"personadd-filled": "\ue132",
"videocam-filled": "\ue8af",
"personadd": "\ue102",
"upload": "\ue402",
"upload-filled": "\ue8b1",
"starhalf": "\ue463",
"star-filled": "\ue438",
"star": "\ue408",
"trash": "\ue401",
"phone-filled": "\ue230",
"compose": "\ue400",
"videocam": "\ue300",
"trash-filled": "\ue8dc",
"download": "\ue403",
"chatbubble-filled": "\ue232",
"chatbubble": "\ue202",
"cloud-download": "\ue8e4",
"cloud-upload-filled": "\ue8e5",
"cloud-upload": "\ue8e6",
"cloud-download-filled": "\ue8e9",
"headphones":"\ue8bf",
"shop":"\ue609"
}

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,82 @@
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "1.2.0",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
"uniui",
"icon",
"图标"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1,46 @@
## Icons 图标
> **组件名uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### 安装方式
本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`
如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
### 基本用法
在 ``template`` 中使用组件
```html
<uni-icons type="contact" size="30"></uni-icons>
```
## API
### Icons Props
|属性名 |类型 |默认值 |说明 |
|:-: |:-: |:-: |:-: |
|size |Number |24 |图标大小 |
|type |String |- |图标图案,参考示例 |
|color |String |- |图标颜色 |
### Icons Events
|事件名 |说明 |返回值|
|:-: |:-: |:-: |
|@click|点击 Icon 触发事件|- |
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons](https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons)

View File

@@ -0,0 +1,18 @@
## 1.2.12021-07-30
- 优化 vue3下事件警告的问题
## 1.2.02021-07-13
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.22021-05-12
- 新增 组件示例地址
## 1.1.12021-04-21
- 修复 布局变化后 uni-rate 星星计算不准确的 bug
- 优化 添加依赖 uni-icons, 导入 uni-rate 自动下载依赖
## 1.1.02021-04-16
- 修复 uni-rate 属性 margin 值为 string 组件失效的 bug
## 1.0.92021-02-05
- 优化 组件引用关系通过uni_modules引用组件
## 1.0.82021-02-05
- 调整为uni_modules目录规范
- 支持 pc 端

View File

@@ -0,0 +1,393 @@
<template>
<view>
<view
ref="uni-rate"
class="uni-rate"
>
<view
class="uni-rate__icon"
:class="{'uni-cursor-not-allowed': disabled}"
:style="{ 'margin-right': marginNumber + 'px' }"
v-for="(star, index) in stars"
:key="index"
@touchstart.stop="touchstart"
@touchmove.stop="touchmove"
@mousedown.stop="mousedown"
@mousemove.stop="mousemove"
@mouseleave="mouseleave"
>
<uni-icons
:color="color"
:size="size"
:type="isFill ? 'star-filled' : 'star'"
/>
<!-- #ifdef APP-NVUE -->
<view
:style="{ width: star.activeWitch.replace('%','')*size/100+'px'}"
class="uni-rate__icon-on"
>
<uni-icons
style="text-align: left;"
:color="disabled?'#ccc':activeColor"
:size="size"
type="star-filled"
/>
</view>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<view
:style="{ width: star.activeWitch}"
class="uni-rate__icon-on"
>
<uni-icons
:color="disabled?disabledColor:activeColor"
:size="size"
type="star-filled"
/>
</view>
<!-- #endif -->
</view>
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom');
// #endif
/**
* Rate 评分
* @description 评分组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=33
* @property {Boolean} isFill = [true|false] 星星的类型,是否为实心类型, 默认为实心
* @property {String} color 未选中状态的星星颜色,默认为 "#ececec"
* @property {String} activeColor 选中状态的星星颜色,默认为 "#ffca3e"
* @property {String} disabledColor 禁用状态的星星颜色,默认为 "#c0c0c0"
* @property {Number} size 星星的大小
* @property {Number} value/v-model 当前评分
* @property {Number} max 最大评分评分数量,目前一分一颗星
* @property {Number} margin 星星的间距,单位 px
* @property {Boolean} disabled = [true|false] 是否为禁用状态,默认为 false
* @property {Boolean} readonly = [true|false] 是否为只读状态,默认为 false
* @property {Boolean} allowHalf = [true|false] 是否实现半星,默认为 false
* @property {Boolean} touchable = [true|false] 是否支持滑动手势,默认为 true
* @event {Function} change uniRate 的 value 改变时触发事件e={value:Number}
*/
export default {
name: "UniRate",
props: {
isFill: {
// 星星的类型,是否镂空
type: [Boolean, String],
default: true
},
color: {
// 星星未选中的颜色
type: String,
default: "#ececec"
},
activeColor: {
// 星星选中状态颜色
type: String,
default: "#ffca3e"
},
disabledColor: {
// 星星禁用状态颜色
type: String,
default: "#c0c0c0"
},
size: {
// 星星的大小
type: [Number, String],
default: 24
},
value: {
// 当前评分
type: [Number, String],
default: 1
},
modelValue: {
// 当前评分
type: [Number, String],
default: 1
},
max: {
// 最大评分
type: [Number, String],
default: 5
},
margin: {
// 星星的间距
type: [Number, String],
default: 0
},
disabled: {
// 是否可点击
type: [Boolean, String],
default: false
},
readonly: {
// 是否只读
type: [Boolean, String],
default: false
},
allowHalf: {
// 是否显示半星
type: [Boolean, String],
default: false
},
touchable: {
// 是否支持滑动手势
type: [Boolean, String],
default: true
}
},
data() {
return {
valueSync: "",
userMouseFristMove: true,
userRated: false,
userLastRate: 1
};
},
watch: {
value(newVal) {
this.valueSync = Number(newVal);
},
modelValue(newVal) {
this.valueSync = Number(newVal);
},
},
computed: {
stars() {
const value = this.valueSync ? this.valueSync : 0;
const starList = [];
const floorValue = Math.floor(value);
const ceilValue = Math.ceil(value);
for (let i = 0; i < this.max; i++) {
if (floorValue > i) {
starList.push({
activeWitch: "100%"
});
} else if (ceilValue - 1 === i) {
starList.push({
activeWitch: (value - floorValue) * 100 + "%"
});
} else {
starList.push({
activeWitch: "0"
});
}
}
return starList;
},
marginNumber() {
return Number(this.margin)
}
},
created() {
this.valueSync = Number(this.value||this.modelValue);
this._rateBoxLeft = 0
this._oldValue = null
},
mounted() {
setTimeout(() => {
this._getSize()
}, 100)
// #ifdef H5
this.PC = this.IsPC()
// #endif
},
methods: {
touchstart(e) {
// #ifdef H5
if( this.IsPC() ) return
// #endif
if (this.readonly || this.disabled) return
const {
clientX,
screenX
} = e.changedTouches[0]
// TODO 做一下兼容,只有 Nvue 下才有 screenX其他平台式 clientX
this._getRateCount(clientX || screenX)
},
touchmove(e) {
// #ifdef H5
if( this.IsPC() ) return
// #endif
if (this.readonly || this.disabled || !this.touchable) return
const {
clientX,
screenX
} = e.changedTouches[0]
this._getRateCount(clientX || screenX)
},
/**
* 兼容 PC @tian
*/
mousedown(e) {
// #ifdef H5
if( !this.IsPC() ) return
if (this.readonly || this.disabled) return
const {
clientX,
} = e
this.userLastRate = this.valueSync
this._getRateCount(clientX)
this.userRated = true
// #endif
},
mousemove(e) {
// #ifdef H5
if( !this.IsPC() ) return
if( this.userRated ) return
if( this.userMouseFristMove ) {
console.log('---mousemove----', this.valueSync);
this.userLastRate = this.valueSync
this.userMouseFristMove = false
}
if (this.readonly || this.disabled || !this.touchable) return
const {
clientX,
} = e
this._getRateCount(clientX)
// #endif
},
mouseleave(e) {
// #ifdef H5
if( !this.IsPC() ) return
if (this.readonly || this.disabled || !this.touchable) return
if( this.userRated ) {
this.userRated = false
return
}
this.valueSync = this.userLastRate
// #endif
},
// #ifdef H5
IsPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (let v = 0; v < Agents.length - 1; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
},
// #endif
/**
* 获取星星个数
*/
_getRateCount(clientX) {
this._getSize()
const size = Number(this.size)
if(size === NaN){
return new Error('size 属性只能设置为数字')
}
const rateMoveRange = clientX - this._rateBoxLeft
let index = parseInt(rateMoveRange / (size + this.marginNumber))
index = index < 0 ? 0 : index;
index = index > this.max ? this.max : index;
const range = parseInt(rateMoveRange - (size + this.marginNumber) * index);
let value = 0;
if (this._oldValue === index && !this.PC) return;
this._oldValue = index;
if (this.allowHalf) {
if (range > (size / 2)) {
value = index + 1
} else {
value = index + 0.5
}
} else {
value = index + 1
}
value = Math.max(0.5, Math.min(value, this.max))
this.valueSync = value
this._onChange()
},
/**
* 触发动态修改
*/
_onChange() {
this.$emit("input", this.valueSync);
this.$emit("update:modelValue", this.valueSync);
this.$emit("change", {
value: this.valueSync
});
},
/**
* 获取星星距离屏幕左侧距离
*/
_getSize() {
// #ifndef APP-NVUE
uni.createSelectorQuery()
.in(this)
.select('.uni-rate')
.boundingClientRect()
.exec(ret => {
if (ret) {
this._rateBoxLeft = ret[0].left
}
})
// #endif
// #ifdef APP-NVUE
dom.getComponentRect(this.$refs['uni-rate'], (ret) => {
const size = ret.size
if (size) {
this._rateBoxLeft = size.left
}
})
// #endif
}
}
};
</script>
<style
lang="scss"
scoped
>
.uni-rate {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
line-height: 1;
font-size: 0;
flex-direction: row;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-rate__icon {
position: relative;
line-height: 1;
font-size: 0;
}
.uni-rate__icon-on {
overflow: hidden;
position: absolute;
top: 0;
left: 0;
line-height: 1;
text-align: left;
}
.uni-cursor-not-allowed {
/* #ifdef H5 */
cursor: not-allowed !important;
/* #endif */
}
</style>

View File

@@ -0,0 +1,83 @@
{
"id": "uni-rate",
"displayName": "uni-rate 评分",
"version": "1.2.1",
"description": "Rate 评分组件,可自定义评分星星图标的大小、间隔、评分数。",
"keywords": [
"uni-ui",
"uniui",
"评分"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1,107 @@
## Rate 评分
> **组件名uni-rate**
> 代码块: `uRate`
> 关联组件:`uni-icons`
评分组件,多用于购买商品后,对商品进行评价等场景
> **注意事项**
> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的使用说明,可以帮你避免一些错误。
> - 暂时不支持零星选择
> - 当前版本暂不支持修改图标,后续版本会继续优化
> - 绑定值推荐使用 `v-model` 的方式
> - 如需设置一个星星表示多分显示5个星星最高分10分。这种情况请在 change 事件监听中自行处理,获取到的值乘以你的基数就可以,默认组件是一星一分
### 安装方式
本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`
如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
## 基本用法
```html
<!-- 基本用法 -->
<!-- 需要在 script 中绑定 value 变量 -->
<uni-rate v-model="value" @change="onChange"/>
<!-- 不支持滑动手势选择评分 -->
<uni-rate :touchable="false" :value="5"/>
<!-- 设置尺寸大小 -->
<uni-rate :size="18" :value="5"/>
<!-- 设置评分数 -->
<uni-rate :max="10" :value="5" />
<!-- 设置星星间隔 -->
<uni-rate :value="4" :margin="20" />
<!-- 设置颜色 -->
<uni-rate :value="3" color="#bbb" active-color="red" />
<!-- 选择半星 -->
<uni-rate allow-half :value="3.5" />
<!-- 只读状态 -->
<uni-rate :readonly="true" :value="2" />
<!-- 禁用状态 -->
<uni-rate :disabled="true" disabledColor="#ccc" :value="3" />
<!-- 未选中的星星为镂空状态 -->
<uni-rate :value="3" :is-fill="false" />
```
```javascript
export default {
components: {},
data() {
return {
value: 2
}
},
methods: {
onChange(e) {
console.log('rate发生改变:' + JSON.stringify(e))
}
}
}
```
## API
### Rate Props
属性名 | 类型 | 默认值 | 说明
:-: | :-: | :-: | :-:
value/v-model | Number | 1 | 当前评分
color | String | #ececec | 未选中状态的星星颜色
activeColor | String | #ffca3e | 选中状态的星星颜色
disabledColor | String | #c0c0c0 | 禁用状态的星星颜色
size | Number | 24 | 星星的大小
max | Number | 5 | 最大评分评分数量,目前一分一颗星
margin | Number | 0 | 星星的间距,单位 px
isFill | Boolean | true | 星星的类型,是否为实心类型
disabled | Boolean | false | 是否为禁用状态 (之前版本为已读状态,现更正为禁用状态)
readonly | Boolean | false | 是否为只读状态
allowHalf | Boolean | false | 是否展示半星
touchable | Boolean | true | 是否支持滑动手势
### Rate Events
事件称名 | 说明 | 返回参数
:-: | :-: | :-:
@change | 改变 value 的值返回 | e = { value:number }
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/rate/rate](https://hellouniapp.dcloud.net.cn/pages/extUI/rate/rate)

View File

@@ -1,8 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/user/index","pages/login/login","pages/login/sms","pages/company/auth","pages/vip/index","pages/vip/pay","pages/order/index","pages/order/details","pages/order/submit","pages/property/cash","pages/property/eb","pages/property/integral","pages/property/token"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"易货","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#bababa","selectedColor":"#c82626","backgroundColor":"#FFFFFF","borderStyle":"white","list":[{"pagePath":"pages/index/index","text":"易货","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/property/token","text":"数权","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/property/integral","text":"贡献值","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/user/index","text":"我的","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":false,"autoclose":true},"appname":"易品新境","compilerVersion":"3.1.22","entryPagePath":"pages/user/index","entryPageQuery":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","transparentTitle":"auto"}},{"path":"/pages/login/login","meta":{},"window":{}},{"path":"/pages/login/sms","meta":{},"window":{}},{"path":"/pages/company/auth","meta":{},"window":{"navigationBarTitleText":"企业认证","enablePullDownRefresh":false}},{"path":"/pages/vip/index","meta":{},"window":{"navigationBarTitleText":"会员","enablePullDownRefresh":false}},{"path":"/pages/vip/pay","meta":{},"window":{"navigationBarTitleText":"会员支付","enablePullDownRefresh":false}},{"path":"/pages/order/index","meta":{},"window":{"navigationBarTitleText":"订单列表","enablePullDownRefresh":false}},{"path":"/pages/order/details","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/order/submit","meta":{},"window":{"navigationBarTitleText":"提交订单","enablePullDownRefresh":false}},{"path":"/pages/property/cash","meta":{},"window":{"navigationBarTitleText":"现金账户","enablePullDownRefresh":false}},{"path":"/pages/property/eb","meta":{},"window":{"navigationBarTitleText":"EB账户","enablePullDownRefresh":false}},{"path":"/pages/property/integral","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"贡献值","enablePullDownRefresh":false}},{"path":"/pages/property/token","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"数权账户","enablePullDownRefresh":false}}];
var __uniConfig = {"pages":["pages/guide/index","pages/index/index","pages/user/index","pages/login/login","pages/login/sms","pages/company/auth","pages/vip/index","pages/vip/pay","pages/order/index","pages/order/details","pages/order/submit","pages/property/cash","pages/property/eb","pages/property/integral","pages/property/token","pages/equity/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"易货","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#bababa","selectedColor":"#c82626","backgroundColor":"#FFFFFF","borderStyle":"white","list":[{"pagePath":"pages/index/index","text":"易货","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/property/token","text":"数权","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/property/integral","text":"贡献值","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/user/index","text":"我的","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":false,"autoclose":true},"appname":"易品新境","compilerVersion":"3.1.22","entryPagePath":"pages/equity/index","entryPageQuery":"","realEntryPagePath":"pages/guide/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/guide/index","meta":{"isQuit":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","transparentTitle":"auto"}},{"path":"/pages/login/login","meta":{},"window":{}},{"path":"/pages/login/sms","meta":{},"window":{}},{"path":"/pages/company/auth","meta":{},"window":{"navigationBarTitleText":"企业认证","enablePullDownRefresh":false}},{"path":"/pages/vip/index","meta":{},"window":{"navigationBarTitleText":"会员","enablePullDownRefresh":false}},{"path":"/pages/vip/pay","meta":{},"window":{"navigationBarTitleText":"会员支付","enablePullDownRefresh":false}},{"path":"/pages/order/index","meta":{},"window":{"navigationBarTitleText":"订单列表","enablePullDownRefresh":false}},{"path":"/pages/order/details","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/order/submit","meta":{},"window":{"navigationBarTitleText":"提交订单","enablePullDownRefresh":false}},{"path":"/pages/property/cash","meta":{},"window":{"navigationBarTitleText":"现金账户","enablePullDownRefresh":false}},{"path":"/pages/property/eb","meta":{},"window":{"navigationBarTitleText":"EB账户","enablePullDownRefresh":false}},{"path":"/pages/property/integral","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"贡献值","enablePullDownRefresh":false}},{"path":"/pages/property/token","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"数权账户","enablePullDownRefresh":false}},{"path":"/pages/equity/index","meta":{},"window":{"navigationBarTitleText":"企业广场","navigationStyle":"custom"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["\u003cuses-permission android:name\u003d\"android.permission.CHANGE_NETWORK_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.VIBRATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.READ_LOGS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.ACCESS_WIFI_STATE\"/\u003e","\u003cuses-feature android:name\u003d\"android.hardware.camera.autofocus\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.ACCESS_NETWORK_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CAMERA\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.GET_ACCOUNTS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.READ_PHONE_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CHANGE_WIFI_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.WAKE_LOCK\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.FLASHLIGHT\"/\u003e","\u003cuses-feature android:name\u003d\"android.hardware.camera\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.WRITE_SETTINGS\"/\u003e"]},"apple":{},"plugins":{"oauth":{"univerify":{}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.1.22","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#c82626","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/index/index","text":"易货","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/property/token","text":"数权","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/property/integral","text":"贡献值","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/user/index","text":"我的","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px","child":["lauchwebview"],"selected":3},"launch_path":"__uniappview.html","arguments":"{\"pathName\":\"pages/user/index\",\"query\":\"\"}"}}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"google":{"permissions":["\u003cuses-permission android:name\u003d\"android.permission.CHANGE_NETWORK_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.VIBRATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.READ_LOGS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.ACCESS_WIFI_STATE\"/\u003e","\u003cuses-feature android:name\u003d\"android.hardware.camera.autofocus\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.ACCESS_NETWORK_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CAMERA\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.GET_ACCOUNTS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.READ_PHONE_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CHANGE_WIFI_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.WAKE_LOCK\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.FLASHLIGHT\"/\u003e","\u003cuses-feature android:name\u003d\"android.hardware.camera\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.WRITE_SETTINGS\"/\u003e"]},"apple":{},"plugins":{"oauth":{"univerify":{}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.1.22","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#c82626","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/index/index","text":"易货","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/property/token","text":"数权","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/property/integral","text":"贡献值","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/user/index","text":"我的","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px"},"launch_path":"__uniappview.html","arguments":"{\"pathName\":\"pages/equity/index\",\"query\":\"\"}"}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB