商城与首页基础页面

This commit is contained in:
唐明明
2021-12-31 17:01:34 +08:00
parent 04b1c5101e
commit 61fddf2d3a
85 changed files with 9544 additions and 0 deletions

17
App.vue Normal file
View File

@@ -0,0 +1,17 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
@import "@/static/iconfont.css";
</style>

21
main.js Normal file
View File

@@ -0,0 +1,21 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

72
manifest.json Normal file
View File

@@ -0,0 +1,72 @@
{
"name" : "健康监测",
"appid" : "__UNI__C29473D",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
}

108
pages.json Normal file
View File

@@ -0,0 +1,108 @@
{
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "发现",
"navigationStyle": "custom"
}
}, {
"path": "pages/record/index",
"style": {
"navigationBarTitleText": "记录",
"navigationStyle": "custom"
}
}, {
"path": "pages/store/index",
"style": {
"navigationBarTitleText": "健康生活",
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleSize": "16",
"buttons": [
{
"float": "left",
"text": "\ue601",
"fontSrc": "/static/iconfont.ttf",
"color": "#666",
"fontSize": "20px"
},
{
"float": "right",
"text": "\ue603",
"fontSrc": "/static/iconfont.ttf",
"color": "#666",
"fontSize": "20px"
}
]
}
}
}
}, {
"path": "pages/user/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
}, {
"path": "pages/auth/auth",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
}, {
"path": "pages/store/goods",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "详情",
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"type": "transparent"
}
}
}
}, {
"path": "pages/store/buy",
"style": {
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
}
}],
"tabBar": {
"borderStyle": "white",
"selectedColor":"#34CE98",
"list": [{
"iconPath":"static/tabBar/tabBar_00.png",
"selectedIconPath":"static/tabBar/tabBar_show_00.png",
"pagePath": "pages/index/index",
"text": "发现"
},
{
"iconPath":"static/tabBar/tabBar_01.png",
"selectedIconPath":"static/tabBar/tabBar_show_01.png",
"pagePath": "pages/record/index",
"text": "记录"
},
{
"iconPath":"static/tabBar/tabBar_02.png",
"selectedIconPath":"static/tabBar/tabBar_show_02.png",
"pagePath": "pages/store/index",
"text": "商城"
},
{
"iconPath":"static/tabBar/tabBar_03.png",
"selectedIconPath":"static/tabBar/tabBar_show_03.png",
"pagePath": "pages/user/index",
"text": "我的"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "ZH健康",
"navigationBarBackgroundColor":"#F3F6FB",
"backgroundColorTop": "#F3F6FB",
"backgroundColorBottom": "#F3F6FB"
}
}

19
pages/auth/auth.vue Normal file
View File

@@ -0,0 +1,19 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

207
pages/index/index.vue Normal file
View File

@@ -0,0 +1,207 @@
<template>
<view class="content">
<view class="status">
<view class="status-main">
<view class="helloe">
欢迎使用ZH健康
</view>
<view class="btns">
<view class="btns-item">
<image src="@/static/icon/sign-icon.png" mode="widthFix"></image>
</view>
<view class="btns-item show">
<uni-icons custom-prefix="iconfont" type="icon-pinglun" size="25"></uni-icons>
</view>
</view>
</view>
</view>
<!-- 搜索 -->
<view class="search">
<navigator class="search-nav" url="">
<uni-icons class="search-icon" custom-prefix="iconfont" type="icon-sousuo" color="#34CE98" size="20"></uni-icons>
低脂鸡胸肉
</navigator>
</view>
<!-- 排行榜 -->
<view class="img-card">
<image src="@/static/dev/img-01.png" mode="widthFix"></image>
</view>
<!-- 精选推荐 -->
<view class="new-box">
<view class="title">精选推荐</view>
</view>
<!-- 话题广场 -->
<view class="new-box">
<view class="title">话题广场</view>
<view class="new-item">
<image class="new-cover" src="http://up.boohee.cn/house/u/mboohee/img/others/7.2.jpg" mode="aspectFill"></image>
<view class="new-title">坚持做瑜伽可以减肥吗</view>
<view class="new-tool">
<text>阅读100</text>
<text>赞100</text>
</view>
</view>
<view class="new-item">
<image class="new-cover" src="http://up.boohee.cn/house/u/mboohee/img/others/yundong1.jpg" mode="aspectFill"></image>
<view class="new-title">有没有减肥秘诀/减肥偏方/减肥窍门</view>
<view class="new-tool">
<text>阅读100</text>
<text>赞100</text>
</view>
</view>
<view class="new-item">
<image class="new-cover" src="http://up.boohee.cn/house/u/mboohee/img/others/yundong2.jpg" mode="aspectFill"></image>
<view class="new-title">只需2招迅速变出小蛮腰</view>
<view class="new-tool">
<text>阅读100</text>
<text>赞100</text>
</view>
</view>
<view class="new-item">
<image class="new-cover" src="http://up.boohee.cn/house/u/mboohee/img/others/jian.jpg" mode="aspectFill"></image>
<view class="new-title">有效方便的减肥方法有哪些</view>
<view class="new-tool">
<text>阅读100</text>
<text>赞100</text>
</view>
</view>
</view>
<!-- ZH健康 -->
<view class="img-card">
<image src="@/static/dev/img-00.png" mode="widthFix"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.content{
padding-top: calc(var(--status-bar-height) + 100rpx);
overflow: hidden;
}
.status{
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 99;
height: 100rpx;
background-color: white;
@extend .ios-top;
.status-main{
padding: 0 $padding;
display: flex;
justify-content: space-between;
align-items: center;
.helloe{
line-height: 100rpx;
font-size: $title-size + 10;
font-weight: bold;
}
.btns{
margin-left: $margin;
display: flex;
.btns-item{
position: relative;
text-align: right;
margin-left: $margin;
image{
width: 46rpx;
vertical-align: top;
}
&.show::before{
content: "";
height: 10rpx;
width: 10rpx;
position: absolute;
right: 0;
top: 0;
background: $text-price;
border-radius: 50%;
}
}
}
}
}
// 搜索
.search{
padding: 0 $padding;
.search-nav{
background: $window-color;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
color: $text-gray;
font-size: $title-size-lg;
padding: 0 $padding;
.search-icon{
vertical-align: middle;
margin-right: $margin/2;
}
}
}
// 话题广场
.new-box{
margin: $margin;
.title{
font-weight: bold;
font-size: $title-size + 4;
}
.new-item{
position: relative;
margin-top: $margin - 10;
background: #f5fdfa;
border-radius: $radius;
padding: $padding ($padding*2 + 200rpx) $padding $padding;
.new-cover{
position: absolute;
right: $padding;
top: $padding;
width: 200rpx;
height: 150rpx;
border-radius: $radius;
}
.new-title{
font-size: $title-size;
line-height: 45rpx;
min-height: 100rpx;
margin-bottom: 10px;
}
.new-tool{
color: $text-gray;
font-size: $title-size-sm;
line-height: 40rpx;
text{
margin-right: $margin/2;
}
}
}
}
// 卡片
.img-card{
margin: $margin;
image{
width: 100%;
vertical-align: top;
border-radius: $radius;
}
}
</style>

39
pages/record/index.vue Normal file
View File

@@ -0,0 +1,39 @@
<template>
<view>
<view class="">
健康档案基本信息姓名年龄性别
</view>
<view class="">
体重
</view>
<view class="">
喝水
</view>
<view class="">
心率
</view>
<view class="">
血压
</view>
<view class="">
血糖
</view>
<view class="">
血脂
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

167
pages/store/buy.vue Normal file
View File

@@ -0,0 +1,167 @@
<template>
<view class="content">
<!-- address -->
<view class="block address">
<uni-icons class="address-icon location" type="location-filled" size="24" color="#34CE98"></uni-icons>
<uni-icons class="address-icon arrows" type="right" size="20" color="#999"></uni-icons>
<view class="user"><text>唐明阳</text>18245180131</view>
<view class="city">黑龙江省哈尔滨市南岗区汉水路265号</view>
</view>
<!-- 订单产品 -->
<view class="block goods-box">
<view class="goods-item">
</view>
</view>
<!-- 订单信息 -->
<view class="block info-box">
<view class="info-item">
<view class="label">配送方式</view>
<view class="nowrap">快递</view>
</view>
<view class="info-item">
<view class="label">优惠金额</view>
<view class="nowrap">无优惠</view>
</view>
</view>
<!-- footer -->
<view class="order-footer">
<view class="total">总计<text>1399.00</text></view>
<button class="btn">确认订单</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
goodsInfo : {},
expressPickerValue : 0,
addressId : '',
paramsId : '',
goodsNumber : ''
};
}
}
</script>
<style lang="scss" scoped>
.content{
background: $window-color;
min-height: 100vh;
overflow: hidden;
padding-bottom: $padding + 80;
box-sizing: border-box;
}
.block{
background: white;
margin: $margin;
border-radius: $radius;
}
// 地址管理
.address{
position: relative;
padding: $padding 80rpx $padding 90rpx;
font-size: $title-size-lg;
.user{
font-size: $title-size;
line-height: 40rpx;
color: $text-gray;
text{
color: black;
max-width: 200rpx;
display: inline-block;
margin-right: $margin/2;
}
}
.city{
padding-top: $padding/2;
font-size: $title-size-sm;
color: $text-gray;
line-height: 36rpx;
}
.address-icon{
position: absolute;
top: 50%;
&.location{
margin-top: -26rpx;
left: $margin - 10;
}
&.arrows{
margin-top: -20rpx;
right: $margin - 10;
}
}
}
// 订单信息
.info-box{
.info-item{
position: relative;
padding: $padding $padding $padding 200rpx;
font-size: $title-size-m;
min-height: 40rpx;
text-align: right;
.label{
position: absolute;
left: $margin;
top: $margin;
color: $text-gray;
}
&::after{
position: absolute;
left: $margin;
right: $margin;
content: " ";
height: 1rpx;
bottom: 0;
background: $border-color;
}
&:last-child::after{
display: none;
}
}
}
// footer
.order-footer{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
background: white;
border-radius: $radius $radius 0 0;
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
z-index: 99;
display: flex;
.total{
line-height: 80rpx;
font-size: $title-size-lg;
font-weight: bold;
width: calc(100% - 300rpx - #{$margin});
color: $text-gray;
font-weight: normal;
@extend .nowrap;
text{
color: $text-price;
font-size: $title-size-lg;
font-weight: bold;
}
}
.btn{
margin-left: $margin;
width: 300rpx;
height: 80rpx;
padding: 0;
line-height: 80rpx;
font-size: $title-size-lg;
border-radius: 40rpx;
background: $main-color;
color: white;
font-weight: bold;
&::after{
display: none;
}
}
}
</style>

218
pages/store/goods.vue Normal file
View File

@@ -0,0 +1,218 @@
<template>
<view>
<!-- 产品封面 -->
<view class="goods-swiper">
<swiper :indicator-dots="false" @change="current = $event.detail.current + 1">
<swiper-item>
<view class="swiper-cover">
<image src="https://yanxuan-item.nosdn.127.net/ec5550bf450f6c65a9610a4c891e217b.jpg" mode="aspectFill" />
</view>
</swiper-item>
<swiper-item>
<view class="swiper-cover">
<image src="https://yanxuan-item.nosdn.127.net/dc27864b72701e31286ca2bf6f7bb245.jpg" mode="aspectFill" />
</view>
</swiper-item>
<swiper-item>
<view class="swiper-cover">
<image src="https://yanxuan-item.nosdn.127.net/d89f1f13c36c178843f3bd46783f5ad5.jpg" mode="aspectFill" />
</view>
</swiper-item>
</swiper>
<view class="swiper-pages">
{{current}}/3
</view>
</view>
<!-- 详情 -->
<view class="main">
<view class="title">学生奶 3.8g乳蛋白娟姗纯牛奶 250ml*10</view>
<view class="sub-title">1%英国珍稀牛种优级口感与营养</view>
<view class="box-flex">
<view class="price">
<text>¥</text>59.9
</view>
<view class="sales">销量2w+</view>
</view>
<!-- <view class="">
优惠券
</view> -->
<view class="hr">
<text>详情</text>
</view>
<view class="imgs">
<image src="https://yanxuan-item.nosdn.127.net/eb6eb62a213c1e76e0326f5d77a5e42b.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/8e132a1d2abfc4ff32fad1cd276c3919.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/7485537552e686ca160509b00366d669.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/6fb77ef6204c5e8f695bf54332c74d23.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/27b53bdb3f3131fffd6e50c42dc0468b.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/7d579166b8dd4e32d23bb9b27a02d2e2.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/ce118328a061c332bfe4b7748518b2d3.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/ae47948c2759ac93baba75ee06d657be.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/f46ccd3139cb9c80e583ab52cb8fb296.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/0ee8478ae77fd561b30d1a5b2124fcd8.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/a856fa0c20fd795aac7e9e6a196db901.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/24926a19f720d8a942c44e228e3c6ec9.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/c1db9a998a66646ce659db57b8c2ec6e.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/a85e0b32e5790a287a95146f6fb266ed.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/38c337287af16dce85634d870cb3db41.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/6e4bdbf6c2945f1c8a3f62344f2056fe.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/24460591cf09176f77082a86a8b03dae.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/85d57e7b3c8e1cdcff5a19ce8f01ceaf.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/2ebe43401d79a59c630ce086852f8d60.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/026cfd7317a40ec2950183461c0e1ee1.jpg" mode="widthFix"></image>
<image src="https://yanxuan-item.nosdn.127.net/397bad0e51e14b64664c8e365aea3266.jpg" mode="widthFix"></image>
</view>
</view>
<!-- 立即购买 -->
<view class="footer">
<button type="default" hover-class="none" @click="buy">立即购买</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
current: 1
};
},
methods:{
buy(){
uni.navigateTo({
url: "./buy"
})
}
}
}
</script>
<style lang="scss">
.goods-swiper{
position: relative;
width: 100%;
padding-top: 110%;
background: $window-color;
&> swiper{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.swiper-cover{
width: 100%;
height: 100%;
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
.swiper-pages{
position: absolute;
bottom:20rpx;
left: 0;
right: 0;
z-index: 9;
line-height: 90rpx;
text-align: center;
color: white;
font-size: $title-size-m;
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
}
}
// 详情
.main{
position: relative;
z-index: 9;
margin-top: -20rpx;
background: white;
border-radius: $radius $radius 0 0;
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
padding-bottom: ($padding*2) + 90;
.hr{
position: relative;
min-height: 1rpx;
margin: 0 $margin;
text-align: center;
text{
position: relative;
z-index: 1;
color: $text-gray;
font-size: $title-size-m;
background: white;
padding: 0 $padding;
}
&::after{
content: " ";
background: $border-color;
width: 100%;
height: 1rpx;
position: absolute;
left: 0;
top: 50%;
}
}
.title{
padding: $padding;
font-weight: bold;
font-size: $title-size + 14;
}
.sub-title{
padding: 0 $padding;
font-size: $title-size-m;
color: $text-gray;
}
.box-flex{
padding: $padding;
display: flex;
justify-content: space-between;
align-items: center;
.price{
font-weight: bold;
color: $text-price;
font-size: $title-size + 10;
text{
font-size: 80%;
margin-right: 10rpx;
}
}
.sales{
font-size: $title-size-m;
color: $text-gray;
}
}
.imgs{
image{
vertical-align: top;
width: 100%;
}
}
}
// 购买
.footer{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
z-index: 98;
background: white;
// linear-gradient(to top, white 86%, rgba(255,255,255,.0))
button{
background: $main-color;
color: white;
border-radius: $radius-lg;
height: 90rpx;
line-height: 90rpx;
font-weight: bold;
font-size: $title-size;
&::after{
display: none;
}
}
}
</style>

247
pages/store/index.vue Normal file
View File

@@ -0,0 +1,247 @@
<template>
<view class="content">
<!-- swiper -->
<view class="swiper">
<view class="swiper-box">
<swiper autoplay @change="swiperCount = $event.detail.current">
<swiper-item>
<image src="https://yanxuan.nosdn.127.net/static-union/163971170765382b.jpg" mode="aspectFill"></image>
</swiper-item>
<swiper-item>
<image src="https://yanxuan.nosdn.127.net/948240ec17accbb8bb2184bde9b62e8f.jpg" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="swiper-pages">
<text class="pages-item" :class="{'show':swiperCount === 0}"></text>
<text class="pages-item" :class="{'show':swiperCount === 1}"></text>
</view>
</view>
</view>
<!-- 健康产品分类 -->
<!-- <view class="">
<view class="">icon10斤挑战</view>
<view class="">icon控卡主食</view>
<view class="">icon轻卡小食</view>
<view class="">icon肠胃呵护</view>
<view class="">icon燃力嗨吃</view>
</view> -->
<!-- 每日上新 -->
<view class="new-box">
<view class="title">上新精选</view>
<view class="news">
<view class="news-item" v-for="(item, index) in newGood" :key="index">
<view class="news-cover">
<image :src="item.cover" mode="aspectFill"></image>
</view>
<view class="news-title nowrap">{{item.name}}</view>
<view class="news-price nowrap">{{item.price.price_min}}</view>
</view>
</view>
</view>
<!-- 卡片区 -->
<!-- <view class="">
<view class="">卡片宝贝爱吃</view>
<view class="">卡片轻卡小食</view>
</view> -->
<!-- goods -->
<oct-goods
:lists="goodsArr"
color="#e6576b"
@onGoods="onGoods"
/>
</view>
</template>
<script>
export default {
data() {
return {
swiperCount: 0,
newGood : [
{
cover : "https://yanxuan-item.nosdn.127.net/0aabfb9974965f4983fcc71344022dc7.png",
name : "蜂蜜山楂条",
description : "酸甜软糯,松脆不粘牙",
price : {
price_min: 13
}
},{
cover : "https://yanxuan-item.nosdn.127.net/1b9003483b0c429403477cad336aa9d7.png",
name : "卤汁牛肉",
description : "松软蛋糕,浓醇奶香",
price : {
price_min: 39
}
},{
cover : "https://yanxuan-item.nosdn.127.net/ca123e1f1fac9af57df06a14d91e6417.png",
name : "东北开口松子",
description : "醇正松香,壳薄肉厚",
price : {
price_min: 42.8
}
},{
cover : "https://yanxuan-item.nosdn.127.net/b2aac81d1116fb3e4d2a747896064bdd.png",
name : "蓝莓果干",
description : "苹果汁浸泡,无蔗糖添加",
price : {
price_min: 19
}
}
],
goodsArr: [
{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/6d48e6ea51a06b1356ccda21497fdb14.png",
name : "茅台王子酒 金王子 53度 500毫升",
description : "酱香突出,优雅细腻",
price : {
price_min: 275
}
},{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/87357968bc1d8d8334557148d15296da.png",
name : "飞天53%vol 500ml贵州茅台酒带杯",
description : "茅台飘香,正品溯源",
price : {
price_min: 1499
}
},{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/57a95961e03552e8583d670431d68b92.png",
name : "赖茅酒 传承蓝 53度 500毫升*6瓶",
description : "传统酱香典范",
price : {
price_min: 2928
}
},{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/e83ebcf07e511c3ef24e2f2845ad0a28.jpg",
name : "开盖即食,冰糖银耳莲子羹 280克*9杯",
description : "开盖即食,清甜软糯",
price : {
price_min: 50
}
},{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/5a7e0c73b731f5c18941697dc7e1b522.jpg",
name : "奶油鸡蛋卷 150克5袋",
description : "香浓蛋味 入口即化",
price : {
price_min: 13.9
}
},{
goods_id : "",
cover : "https://balenciaga.dam.kering.com/m/611d17da66cdafac/Large-6801252104T1169_D.jpg",
name : "Hacker graffiti medium tote bag in canvas jacquard",
description : "Coming soon",
price : {
price_min: 13.9
}
}
]
};
},
methods:{
onGoods(val){
console.log(val)
uni.navigateTo({
url: "./goods"
})
}
}
}
</script>
<style lang="scss">
.content{
background: $window-color;
}
.new-box{
padding: 0 $padding;
.title{
font-size: $title-size-lg;
color: $text-color;
font-weight: bold;
}
.news{
margin: $margin/2 -10rpx 0;
display: flex;
.news-item{
margin: 0 10rpx;
width: calc(25% - 20rpx);
.news-cover{
position: relative;
width: 100%;
padding-top: 100%;
background-color: white;
border-radius: $radius-lg;
overflow: hidden;
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.news-title{
margin-top: $margin/2;
font-size: $title-size-sm;
text-align: center;
color: $text-color;
line-height: 40rpx;
}
.news-price{
text-align: center;
font-size: $title-size-sm;
font-weight: bold;
color: $text-price;
line-height: 40rpx;
}
}
}
}
//
//
//
// swiper
.swiper{
background: linear-gradient(#FFF, #F3F6FB);
padding: $padding;
.swiper-box{
position: relative;
padding-top: 40%;
swiper,
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
image{
border-radius: $radius;
}
}
.swiper-pages{
position: absolute;
z-index: 9;
left: 0;
right: 0;
bottom: $margin - 10;
height: 7rpx;
text-align: center;
.pages-item{
vertical-align: top;
display: inline-block;
height: 7rpx;
width: 25rpx;
margin: 0 5rpx;
background: rgba($color: #fff, $alpha: .5);
&.show{
background: white;
}
}
}
}
</style>

19
pages/user/index.vue Normal file
View File

@@ -0,0 +1,19 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

77
scss/globa.scss Normal file
View File

@@ -0,0 +1,77 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
*/
// 文字颜色
$text-color: #333;
$text-gray: #666;
$text-gray-m: #999;
$text-price: #e6576b;
$main-color: #34CE98;
// 边框颜色
$border-color: #ddd;
// 全局窗口色
$window-color: #F3F6FB;
// 文字尺寸
$title-size: 32rpx;
$title-size-lg: 30rpx;
$title-size-m: 28rpx;
$title-size-sm: 26rpx;
// 模块圆角
$radius: 20rpx;
$radius-lg: 12rpx;
$radius-m: 10rpx;
// 模块边距
$margin: 30rpx;
$padding: 30rpx;
// ios安全距离
.ios-bottom{
padding-bottom: env(safe-area-inset-bottom);
padding-bottom: constant(safe-area-inset-bottom);
}
.ios-left{
padding-left: env(safe-area-inset-left);
padding-left: constant(safe-area-inset-left);
}
.ios-right{
padding-right: env(safe-area-inset-right);
padding-right: constant(safe-area-inset-right);
}
.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;
}
.ellipsis{
max-width: 100%;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}

BIN
static/dev/img-00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

BIN
static/dev/img-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
static/icon/sign-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

25
static/iconfont.css Normal file
View File

@@ -0,0 +1,25 @@
@font-face {
font-family: "iconfont";
src: url('@/static/iconfont.ttf') format('truetype')
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-sousuo:before {
content: "\e603";
}
.icon-pinglun:before {
content: "\e601";
}
.icon-shezhi:before {
content: "\e602";
}

BIN
static/iconfont.ttf Normal file

Binary file not shown.

BIN
static/tabBar/tabBar_00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/tabBar/tabBar_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/tabBar/tabBar_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/tabBar/tabBar_03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

78
uni.scss Normal file
View File

@@ -0,0 +1,78 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
@import 'scss/globa.scss';
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;

View File

@@ -0,0 +1,2 @@
## 1.0.02021-12-29
基础的商城列表,仅需传入数据即可快速完成简单的商品列表

View File

@@ -0,0 +1,101 @@
<template>
<view>
<view class="goods--box">
<view class="goods--item" v-for="(item, index) in lists" :key="index" @click="$emit('onGoods', item)">
<view class="item--cover" :style="{backgroundImage: 'url(' + item.cover + ')'}" />
<view class="item--content">
<view class="title">{{item.name}}</view>
<view class="price" :style="{color: color}"><text>{{priceType}}</text>{{item.price.price_min || '0'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
props:{
lists: {
type : Array,
required: true,
default : () => {
return []
}
},
priceType: {
type : String,
required: false,
default : "¥"
},
color: {
type: String,
required: false,
default: "#d4282d"
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
$padding: 30rpx;
$margin: 10rpx;
$radius: 20rpx;
.ellipsis-1 {
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ellipsis-2{
max-width: 100%;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.goods--box{
display: flex;
flex-wrap: wrap;
padding: $padding - 10;
.goods--item{
background: white;
width: calc(50% - #{$margin*2});
background: white;
border-radius: $radius;
overflow: hidden;
margin: $margin;
.item--cover{
width: 100%;
padding-top: 100%;
background-position: center;
background-size: cover;
}
.item--content{
padding: $padding - 10;
& > .title{
font-size: 28rpx;
line-height: 40rpx;
height: 80rpx;
color: #333;
@extend .ellipsis-2;
}
& > .price{
padding-top: $padding/2;
line-height: 40rpx;
font-weight: bold;
font-size: 28rpx;
@extend .ellipsis-1;
text{
margin-right: $margin/2;
font-size: 80%;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,83 @@
{
"id": "oct-goods",
"displayName": "卡片式商城列表",
"version": "1.0.0",
"description": "简洁的卡片式商城列表",
"keywords": [
"商城",
"卡片式",
"列表",
"商品列表"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1,64 @@
# 十月的商城列表
## 使用说明
> 1. 点击使用HBuilderX导入
> 2. 在页面中插入
## 组件功能
> 1. 实现简单的商品列表
> 2. 配置货币标识
> 3. 使用结构化数据格式
> 4. 点击返回商品触发onGoods返回值为点击项用于实现商品转跳逻辑
## 示例代码
`
/* template * /
<oct-goods
:lists="goodsArr"
price-type="$"
@onGoods="onGoods"
/>
`
`
/* data */
goodsArr: [
{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/6d48e6ea51a06b1356ccda21497fdb14.png",
name : "茅台王子酒 金王子 53度 500毫升",
price : {
price_min: 275
}
},{
goods_id : "",
cover : "https://yanxuan-item.nosdn.127.net/87357968bc1d8d8334557148d15296da.png",
name : "飞天53%vol 500ml贵州茅台酒带杯",
price : {
price_min: 1499
}
}
]
`
## 列表数据说明
| 参数 | 参数类型 | 说明 |
|:----- | :----: | :----|
|goods_id | String | 商品id|
|cover | String | 封面图|
|name | String | 商品名称|
|price | Object | 价格信息obj中至少包含最低价「price_min」|
## 参数说明
| 参数 | 参数类型 | 必要参数 | 默认值 | 说明 |
|:----- | :----: | :----: | :----: | :---- |
|lists | Array | true | [] | 列表数据,具体列表参数参考列表参数说明 |
|price-type | String | false | ¥ | 商品价值货币符,传入即可 |
|color | String | false | #d4282d | 价格文字颜色 |
## 点击事件
| 参数 | 返回数据类型 | 说明 |
|:----- | :----: | :----|
|onGoods | Object | 点击商品块返回对应商品Obj数据用于处理转跳逻辑|

View File

@@ -0,0 +1,16 @@
## 1.3.22021-12-01
- 优化 示例可复制图标名称
## 1.3.12021-11-23
- 优化 兼容旧组件 type 值
## 1.3.02021-11-19
- 新增 更多图标
- 优化 自定义图标使用方式
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
## 1.1.72021-11-08
## 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目录规范

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
<template>
<!-- #ifdef APP-NVUE -->
<text :style="{ color: color, 'font-size': size + 'px' }" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text :style="{ color: color, 'font-size': size + 'px' }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
<!-- #endif -->
</template>
<script>
import icons from './icons.js';
// #ifdef APP-NVUE
var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', {
'fontFamily': "uniicons",
'src': "url('"+iconUrl+"')"
});
// #endif
/**
* Icons 图标
* @description 用于展示 icons 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: 'UniIcons',
emits:['click'],
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
customPrefix:{
type: String,
default: ''
}
},
data() {
return {
icons: icons.glyphs
}
},
computed:{
unicode(){
let code = this.icons.find(v=>v.font_class === this.type)
if(code){
return unescape(`%u${code.unicode}`)
}
return ''
}
},
methods: {
_onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss">
/* #ifndef APP-NVUE */
@import './uniicons.css';
@font-face {
font-family: uniicons;
src: url('./uniicons.ttf') format('truetype');
}
/* #endif */
.uni-icons {
font-family: uniicons;
text-decoration: none;
text-align: center;
}
</style>

View File

@@ -0,0 +1,663 @@
.uniui-color:before {
content: "\e6cf";
}
.uniui-wallet:before {
content: "\e6b1";
}
.uniui-settings-filled:before {
content: "\e6ce";
}
.uniui-auth-filled:before {
content: "\e6cc";
}
.uniui-shop-filled:before {
content: "\e6cd";
}
.uniui-staff-filled:before {
content: "\e6cb";
}
.uniui-vip-filled:before {
content: "\e6c6";
}
.uniui-plus-filled:before {
content: "\e6c7";
}
.uniui-folder-add-filled:before {
content: "\e6c8";
}
.uniui-color-filled:before {
content: "\e6c9";
}
.uniui-tune-filled:before {
content: "\e6ca";
}
.uniui-calendar-filled:before {
content: "\e6c0";
}
.uniui-notification-filled:before {
content: "\e6c1";
}
.uniui-wallet-filled:before {
content: "\e6c2";
}
.uniui-medal-filled:before {
content: "\e6c3";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-fire-filled:before {
content: "\e6c5";
}
.uniui-refreshempty:before {
content: "\e6bf";
}
.uniui-location-filled:before {
content: "\e6af";
}
.uniui-person-filled:before {
content: "\e69d";
}
.uniui-personadd-filled:before {
content: "\e698";
}
.uniui-back:before {
content: "\e6b9";
}
.uniui-forward:before {
content: "\e6ba";
}
.uniui-arrow-right:before {
content: "\e6bb";
}
.uniui-arrowthinright:before {
content: "\e6bb";
}
.uniui-arrow-left:before {
content: "\e6bc";
}
.uniui-arrowthinleft:before {
content: "\e6bc";
}
.uniui-arrow-up:before {
content: "\e6bd";
}
.uniui-arrowthinup:before {
content: "\e6bd";
}
.uniui-arrow-down:before {
content: "\e6be";
}
.uniui-arrowthindown:before {
content: "\e6be";
}
.uniui-bottom:before {
content: "\e6b8";
}
.uniui-arrowdown:before {
content: "\e6b8";
}
.uniui-right:before {
content: "\e6b5";
}
.uniui-arrowright:before {
content: "\e6b5";
}
.uniui-top:before {
content: "\e6b6";
}
.uniui-arrowup:before {
content: "\e6b6";
}
.uniui-left:before {
content: "\e6b7";
}
.uniui-arrowleft:before {
content: "\e6b7";
}
.uniui-eye:before {
content: "\e651";
}
.uniui-eye-filled:before {
content: "\e66a";
}
.uniui-eye-slash:before {
content: "\e6b3";
}
.uniui-eye-slash-filled:before {
content: "\e6b4";
}
.uniui-info-filled:before {
content: "\e649";
}
.uniui-reload:before {
content: "\e6b2";
}
.uniui-micoff-filled:before {
content: "\e6b0";
}
.uniui-map-pin-ellipse:before {
content: "\e6ac";
}
.uniui-map-pin:before {
content: "\e6ad";
}
.uniui-location:before {
content: "\e6ae";
}
.uniui-starhalf:before {
content: "\e683";
}
.uniui-star:before {
content: "\e688";
}
.uniui-star-filled:before {
content: "\e68f";
}
.uniui-calendar:before {
content: "\e6a0";
}
.uniui-fire:before {
content: "\e6a1";
}
.uniui-medal:before {
content: "\e6a2";
}
.uniui-font:before {
content: "\e6a3";
}
.uniui-gift:before {
content: "\e6a4";
}
.uniui-link:before {
content: "\e6a5";
}
.uniui-notification:before {
content: "\e6a6";
}
.uniui-staff:before {
content: "\e6a7";
}
.uniui-vip:before {
content: "\e6a8";
}
.uniui-folder-add:before {
content: "\e6a9";
}
.uniui-tune:before {
content: "\e6aa";
}
.uniui-auth:before {
content: "\e6ab";
}
.uniui-person:before {
content: "\e699";
}
.uniui-email-filled:before {
content: "\e69a";
}
.uniui-phone-filled:before {
content: "\e69b";
}
.uniui-phone:before {
content: "\e69c";
}
.uniui-email:before {
content: "\e69e";
}
.uniui-personadd:before {
content: "\e69f";
}
.uniui-chatboxes-filled:before {
content: "\e692";
}
.uniui-contact:before {
content: "\e693";
}
.uniui-chatbubble-filled:before {
content: "\e694";
}
.uniui-contact-filled:before {
content: "\e695";
}
.uniui-chatboxes:before {
content: "\e696";
}
.uniui-chatbubble:before {
content: "\e697";
}
.uniui-upload-filled:before {
content: "\e68e";
}
.uniui-upload:before {
content: "\e690";
}
.uniui-weixin:before {
content: "\e691";
}
.uniui-compose:before {
content: "\e67f";
}
.uniui-qq:before {
content: "\e680";
}
.uniui-download-filled:before {
content: "\e681";
}
.uniui-pyq:before {
content: "\e682";
}
.uniui-sound:before {
content: "\e684";
}
.uniui-trash-filled:before {
content: "\e685";
}
.uniui-sound-filled:before {
content: "\e686";
}
.uniui-trash:before {
content: "\e687";
}
.uniui-videocam-filled:before {
content: "\e689";
}
.uniui-spinner-cycle:before {
content: "\e68a";
}
.uniui-weibo:before {
content: "\e68b";
}
.uniui-videocam:before {
content: "\e68c";
}
.uniui-download:before {
content: "\e68d";
}
.uniui-help:before {
content: "\e679";
}
.uniui-navigate-filled:before {
content: "\e67a";
}
.uniui-plusempty:before {
content: "\e67b";
}
.uniui-smallcircle:before {
content: "\e67c";
}
.uniui-minus-filled:before {
content: "\e67d";
}
.uniui-micoff:before {
content: "\e67e";
}
.uniui-closeempty:before {
content: "\e66c";
}
.uniui-clear:before {
content: "\e66d";
}
.uniui-navigate:before {
content: "\e66e";
}
.uniui-minus:before {
content: "\e66f";
}
.uniui-image:before {
content: "\e670";
}
.uniui-mic:before {
content: "\e671";
}
.uniui-paperplane:before {
content: "\e672";
}
.uniui-close:before {
content: "\e673";
}
.uniui-help-filled:before {
content: "\e674";
}
.uniui-paperplane-filled:before {
content: "\e675";
}
.uniui-plus:before {
content: "\e676";
}
.uniui-mic-filled:before {
content: "\e677";
}
.uniui-image-filled:before {
content: "\e678";
}
.uniui-locked-filled:before {
content: "\e668";
}
.uniui-info:before {
content: "\e669";
}
.uniui-locked:before {
content: "\e66b";
}
.uniui-camera-filled:before {
content: "\e658";
}
.uniui-chat-filled:before {
content: "\e659";
}
.uniui-camera:before {
content: "\e65a";
}
.uniui-circle:before {
content: "\e65b";
}
.uniui-checkmarkempty:before {
content: "\e65c";
}
.uniui-chat:before {
content: "\e65d";
}
.uniui-circle-filled:before {
content: "\e65e";
}
.uniui-flag:before {
content: "\e65f";
}
.uniui-flag-filled:before {
content: "\e660";
}
.uniui-gear-filled:before {
content: "\e661";
}
.uniui-home:before {
content: "\e662";
}
.uniui-home-filled:before {
content: "\e663";
}
.uniui-gear:before {
content: "\e664";
}
.uniui-smallcircle-filled:before {
content: "\e665";
}
.uniui-map-filled:before {
content: "\e666";
}
.uniui-map:before {
content: "\e667";
}
.uniui-refresh-filled:before {
content: "\e656";
}
.uniui-refresh:before {
content: "\e657";
}
.uniui-cloud-upload:before {
content: "\e645";
}
.uniui-cloud-download-filled:before {
content: "\e646";
}
.uniui-cloud-download:before {
content: "\e647";
}
.uniui-cloud-upload-filled:before {
content: "\e648";
}
.uniui-redo:before {
content: "\e64a";
}
.uniui-images-filled:before {
content: "\e64b";
}
.uniui-undo-filled:before {
content: "\e64c";
}
.uniui-more:before {
content: "\e64d";
}
.uniui-more-filled:before {
content: "\e64e";
}
.uniui-undo:before {
content: "\e64f";
}
.uniui-images:before {
content: "\e650";
}
.uniui-paperclip:before {
content: "\e652";
}
.uniui-settings:before {
content: "\e653";
}
.uniui-search:before {
content: "\e654";
}
.uniui-redo-filled:before {
content: "\e655";
}
.uniui-list:before {
content: "\e644";
}
.uniui-mail-open-filled:before {
content: "\e63a";
}
.uniui-hand-down-filled:before {
content: "\e63c";
}
.uniui-hand-down:before {
content: "\e63d";
}
.uniui-hand-up-filled:before {
content: "\e63e";
}
.uniui-hand-up:before {
content: "\e63f";
}
.uniui-heart-filled:before {
content: "\e641";
}
.uniui-mail-open:before {
content: "\e643";
}
.uniui-heart:before {
content: "\e639";
}
.uniui-loop:before {
content: "\e633";
}
.uniui-pulldown:before {
content: "\e632";
}
.uniui-scan:before {
content: "\e62a";
}
.uniui-bars:before {
content: "\e627";
}
.uniui-cart-filled:before {
content: "\e629";
}
.uniui-checkbox:before {
content: "\e62b";
}
.uniui-checkbox-filled:before {
content: "\e62c";
}
.uniui-shop:before {
content: "\e62f";
}
.uniui-headphones:before {
content: "\e630";
}
.uniui-cart:before {
content: "\e631";
}

View File

@@ -0,0 +1,86 @@
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "1.3.2",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
"uniui",
"icon",
"图标"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
},
"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-scss"],
"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"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
## Icons 图标
> **组件名uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

@@ -0,0 +1,6 @@
## 1.0.22021-11-22
- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
## 1.0.12021-11-22
- 修复 vue3中scss语法兼容问题
## 1.0.02021-11-18
- init

View File

@@ -0,0 +1 @@
@import './styles/index.scss';

View File

@@ -0,0 +1,95 @@
{
"name" : "",
"appid" : "",
"description": "应用描述",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": {
"OAuth": {},
"Payment": {},
"Push": {},
"Share": {},
"Speech": {},
"VideoPlayer": {}
},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
]
},
/* ios */
"ios": {
"UIBackgroundModes": ["audio"]
},
/* SDK */
"sdkConfigs": {
"speech": {
"ifly": {}
}
},
"orientation": ["portrait-primary"]
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"h5": {
"template": "template.h5.html",
"router": {
"mode": "history",
"base": "/h5/"
}
}
}

View File

@@ -0,0 +1,82 @@
{
"id": "uni-scss",
"displayName": "uni-scss 辅助样式",
"version": "1.0.2",
"description": "uni-sass是uni-ui提供的一套全局样式 通过一些简单的类名和sass变量实现简单的页面布局操作比如颜色、边距、圆角等。",
"keywords": [
"uni-scss",
"uni-ui",
"辅助样式"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"uni-app前端模板",
"前端页面模板"
],
"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": "u"
},
"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"
},
"快应用": {
"华为": "n",
"联盟": "n"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@@ -0,0 +1,4 @@
`uni-sass``uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

@@ -0,0 +1,7 @@
@import './setting/_variables.scss';
@import './setting/_border.scss';
@import './setting/_color.scss';
@import './setting/_space.scss';
@import './setting/_radius.scss';
@import './setting/_text.scss';
@import './setting/_styles.scss';

View File

@@ -0,0 +1,3 @@
.uni-border {
border: 1px $uni-border-1 solid;
}

View File

@@ -0,0 +1,66 @@
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
// @mixin get-styles($k,$c) {
// @if $k == size or $k == weight{
// font-#{$k}:#{$c}
// }@else{
// #{$k}:#{$c}
// }
// }
$uni-ui-color:(
// 主色
primary: $uni-primary,
primary-disable: $uni-primary-disable,
primary-light: $uni-primary-light,
// 辅助色
success: $uni-success,
success-disable: $uni-success-disable,
success-light: $uni-success-light,
warning: $uni-warning,
warning-disable: $uni-warning-disable,
warning-light: $uni-warning-light,
error: $uni-error,
error-disable: $uni-error-disable,
error-light: $uni-error-light,
info: $uni-info,
info-disable: $uni-info-disable,
info-light: $uni-info-light,
// 中性色
main-color: $uni-main-color,
base-color: $uni-base-color,
secondary-color: $uni-secondary-color,
extra-color: $uni-extra-color,
// 背景色
bg-color: $uni-bg-color,
// 边框颜色
border-1: $uni-border-1,
border-2: $uni-border-2,
border-3: $uni-border-3,
border-4: $uni-border-4,
// 黑色
black:$uni-black,
// 白色
white:$uni-white,
// 透明
transparent:$uni-transparent
) !default;
@each $key, $child in $uni-ui-color {
.uni-#{"" + $key} {
color: $child;
}
.uni-#{"" + $key}-bg {
background-color: $child;
}
}
.uni-shadow-sm {
box-shadow: $uni-shadow-sm;
}
.uni-shadow-base {
box-shadow: $uni-shadow-base;
}
.uni-shadow-lg {
box-shadow: $uni-shadow-lg;
}
.uni-mask {
background-color:$uni-mask;
}

View File

@@ -0,0 +1,55 @@
@mixin radius($r,$d:null ,$important: false){
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
// Key exists within the $uni-radius variable
@if (map-has-key($uni-radius, $r) and $d){
@if $d == t {
border-top-left-radius:$radius-value;
border-top-right-radius:$radius-value;
}@else if $d == r {
border-top-right-radius:$radius-value;
border-bottom-right-radius:$radius-value;
}@else if $d == b {
border-bottom-left-radius:$radius-value;
border-bottom-right-radius:$radius-value;
}@else if $d == l {
border-top-left-radius:$radius-value;
border-bottom-left-radius:$radius-value;
}@else if $d == tl {
border-top-left-radius:$radius-value;
}@else if $d == tr {
border-top-right-radius:$radius-value;
}@else if $d == br {
border-bottom-right-radius:$radius-value;
}@else if $d == bl {
border-bottom-left-radius:$radius-value;
}
}@else{
border-radius:$radius-value;
}
}
@each $key, $child in $uni-radius {
@if($key){
.uni-radius-#{"" + $key} {
@include radius($key)
}
}@else{
.uni-radius {
@include radius($key)
}
}
}
@each $direction in t, r, b, l,tl, tr, br, bl {
@each $key, $child in $uni-radius {
@if($key){
.uni-radius-#{"" + $direction}-#{"" + $key} {
@include radius($key,$direction,false)
}
}@else{
.uni-radius-#{$direction} {
@include radius($key,$direction,false)
}
}
}
}

View File

@@ -0,0 +1,56 @@
@mixin fn($space,$direction,$size,$n) {
@if $n {
#{$space}-#{$direction}: #{$size*$uni-space-root}px
} @else {
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
}
}
@mixin get-styles($direction,$i,$space,$n){
@if $direction == t {
@include fn($space, top,$i,$n);
}
@if $direction == r {
@include fn($space, right,$i,$n);
}
@if $direction == b {
@include fn($space, bottom,$i,$n);
}
@if $direction == l {
@include fn($space, left,$i,$n);
}
@if $direction == x {
@include fn($space, left,$i,$n);
@include fn($space, right,$i,$n);
}
@if $direction == y {
@include fn($space, top,$i,$n);
@include fn($space, bottom,$i,$n);
}
@if $direction == a {
@if $n {
#{$space}:#{$i*$uni-space-root}px;
} @else {
#{$space}:#{-$i*$uni-space-root}px;
}
}
}
@each $orientation in m,p {
$space: margin;
@if $orientation == m {
$space: margin;
} @else {
$space: padding;
}
@for $i from 0 through 16 {
@each $direction in t, r, b, l, x, y, a {
.uni-#{$orientation}#{$direction}-#{$i} {
@include get-styles($direction,$i,$space,true);
}
.uni-#{$orientation}#{$direction}-n#{$i} {
@include get-styles($direction,$i,$space,false);
}
}
}
}

View File

@@ -0,0 +1,167 @@
/* #ifndef APP-NVUE */
$-color-white:#fff;
$-color-black:#000;
@mixin base-style($color) {
color: #fff;
background-color: $color;
border-color: mix($-color-black, $color, 8%);
&:not([hover-class]):active {
background: mix($-color-black, $color, 10%);
border-color: mix($-color-black, $color, 20%);
color: $-color-white;
outline: none;
}
}
@mixin is-color($color) {
@include base-style($color);
&[loading] {
@include base-style($color);
&::before {
margin-right:5px;
}
}
&[disabled] {
&,
&[loading],
&:not([hover-class]):active {
color: $-color-white;
border-color: mix(darken($color,10%), $-color-white);
background-color: mix($color, $-color-white);
}
}
}
@mixin base-plain-style($color) {
color:$color;
background-color: mix($-color-white, $color, 90%);
border-color: mix($-color-white, $color, 70%);
&:not([hover-class]):active {
background: mix($-color-white, $color, 80%);
color: $color;
outline: none;
border-color: mix($-color-white, $color, 50%);
}
}
@mixin is-plain($color){
&[plain] {
@include base-plain-style($color);
&[loading] {
@include base-plain-style($color);
&::before {
margin-right:5px;
}
}
&[disabled] {
&,
&:active {
color: mix($-color-white, $color, 40%);
background-color: mix($-color-white, $color, 90%);
border-color: mix($-color-white, $color, 80%);
}
}
}
}
.uni-btn {
margin: 5px;
color: #393939;
border:1px solid #ccc;
font-size: 16px;
font-weight: 200;
background-color: #F9F9F9;
// TODO 暂时处理边框隐藏一边的问题
overflow: visible;
&::after{
border: none;
}
&:not([type]),&[type=default] {
color: #999;
&[loading] {
background: none;
&::before {
margin-right:5px;
}
}
&[disabled]{
color: mix($-color-white, #999, 60%);
&,
&[loading],
&:active {
color: mix($-color-white, #999, 60%);
background-color: mix($-color-white,$-color-black , 98%);
border-color: mix($-color-white, #999, 85%);
}
}
&[plain] {
color: #999;
background: none;
border-color: $uni-border-1;
&:not([hover-class]):active {
background: none;
color: mix($-color-white, $-color-black, 80%);
border-color: mix($-color-white, $-color-black, 90%);
outline: none;
}
&[disabled]{
&,
&[loading],
&:active {
background: none;
color: mix($-color-white, #999, 60%);
border-color: mix($-color-white, #999, 85%);
}
}
}
}
&:not([hover-class]):active {
color: mix($-color-white, $-color-black, 50%);
}
&[size=mini] {
font-size: 16px;
font-weight: 200;
border-radius: 8px;
}
&.uni-btn-small {
font-size: 14px;
}
&.uni-btn-mini {
font-size: 12px;
}
&.uni-btn-radius {
border-radius: 999px;
}
&[type=primary] {
@include is-color($uni-primary);
@include is-plain($uni-primary)
}
&[type=success] {
@include is-color($uni-success);
@include is-plain($uni-success)
}
&[type=error] {
@include is-color($uni-error);
@include is-plain($uni-error)
}
&[type=warning] {
@include is-color($uni-warning);
@include is-plain($uni-warning)
}
&[type=info] {
@include is-color($uni-info);
@include is-plain($uni-info)
}
}
/* #endif */

View File

@@ -0,0 +1,24 @@
@mixin get-styles($k,$c) {
@if $k == size or $k == weight{
font-#{$k}:#{$c}
}@else{
#{$k}:#{$c}
}
}
@each $key, $child in $uni-headings {
/* #ifndef APP-NVUE */
.uni-#{$key} {
@each $k, $c in $child {
@include get-styles($k,$c)
}
}
/* #endif */
/* #ifdef APP-NVUE */
.container .uni-#{$key} {
@each $k, $c in $child {
@include get-styles($k,$c)
}
}
/* #endif */
}

View File

@@ -0,0 +1,146 @@
// @use "sass:math";
@import '../tools/functions.scss';
// 间距基础倍数
$uni-space-root: 2 !default;
// 边框半径默认值
$uni-radius-root:5px !default;
$uni-radius: () !default;
// 边框半径断点
$uni-radius: map-deep-merge(
(
0: 0,
// TODO 当前版本暂时不支持 sm 属性
// 'sm': math.div($uni-radius-root, 2),
null: $uni-radius-root,
'lg': $uni-radius-root * 2,
'xl': $uni-radius-root * 6,
'pill': 9999px,
'circle': 50%
),
$uni-radius
);
// 字体家族
$body-font-family: 'Roboto', sans-serif !default;
// 文本
$heading-font-family: $body-font-family !default;
$uni-headings: () !default;
$letterSpacing: -0.01562em;
$uni-headings: map-deep-merge(
(
'h1': (
size: 32px,
weight: 300,
line-height: 50px,
// letter-spacing:-0.01562em
),
'h2': (
size: 28px,
weight: 300,
line-height: 40px,
// letter-spacing: -0.00833em
),
'h3': (
size: 24px,
weight: 400,
line-height: 32px,
// letter-spacing: normal
),
'h4': (
size: 20px,
weight: 400,
line-height: 30px,
// letter-spacing: 0.00735em
),
'h5': (
size: 16px,
weight: 400,
line-height: 24px,
// letter-spacing: normal
),
'h6': (
size: 14px,
weight: 500,
line-height: 18px,
// letter-spacing: 0.0125em
),
'subtitle': (
size: 12px,
weight: 400,
line-height: 20px,
// letter-spacing: 0.00937em
),
'body': (
font-size: 14px,
font-weight: 400,
line-height: 22px,
// letter-spacing: 0.03125em
),
'caption': (
'size': 12px,
'weight': 400,
'line-height': 20px,
// 'letter-spacing': 0.03333em,
// 'text-transform': false
)
),
$uni-headings
);
// 主色
$uni-primary: #2979ff !default;
$uni-primary-disable:lighten($uni-primary,20%) !default;
$uni-primary-light: lighten($uni-primary,25%) !default;
// 辅助色
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
$uni-success: #18bc37 !default;
$uni-success-disable:lighten($uni-success,20%) !default;
$uni-success-light: lighten($uni-success,25%) !default;
$uni-warning: #f3a73f !default;
$uni-warning-disable:lighten($uni-warning,20%) !default;
$uni-warning-light: lighten($uni-warning,25%) !default;
$uni-error: #e43d33 !default;
$uni-error-disable:lighten($uni-error,20%) !default;
$uni-error-light: lighten($uni-error,25%) !default;
$uni-info: #8f939c !default;
$uni-info-disable:lighten($uni-info,20%) !default;
$uni-info-light: lighten($uni-info,25%) !default;
// 中性色
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
$uni-main-color: #3a3a3a !default; // 主要文字
$uni-base-color: #6a6a6a !default; // 常规文字
$uni-secondary-color: #909399 !default; // 次要文字
$uni-extra-color: #c7c7c7 !default; // 辅助说明
// 边框颜色
$uni-border-1: #F0F0F0 !default;
$uni-border-2: #EDEDED !default;
$uni-border-3: #DCDCDC !default;
$uni-border-4: #B9B9B9 !default;
// 常规色
$uni-black: #000000 !default;
$uni-white: #ffffff !default;
$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
// 背景色
$uni-bg-color: #f7f7f7 !default;
/* 水平间距 */
$uni-spacing-sm: 8px !default;
$uni-spacing-base: 15px !default;
$uni-spacing-lg: 30px !default;
// 阴影
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
// 蒙版
$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;

View File

@@ -0,0 +1,19 @@
// 合并 map
@function map-deep-merge($parent-map, $child-map){
$result: $parent-map;
@each $key, $child in $child-map {
$parent-has-key: map-has-key($result, $key);
$parent-value: map-get($result, $key);
$parent-type: type-of($parent-value);
$child-type: type-of($child);
$parent-is-map: $parent-type == map;
$child-is-map: $child-type == map;
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
$result: map-merge($result, ( $key: $child ));
}@else {
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
}
}
@return $result;
};

View File

@@ -0,0 +1,31 @@
// 间距基础倍数
$uni-space-root: 2;
// 边框半径默认值
$uni-radius-root:5px;
// 主色
$uni-primary: #2979ff;
// 辅助色
$uni-success: #4cd964;
// 警告色
$uni-warning: #f0ad4e;
// 错误色
$uni-error: #dd524d;
// 描述色
$uni-info: #909399;
// 中性色
$uni-main-color: #303133;
$uni-base-color: #606266;
$uni-secondary-color: #909399;
$uni-extra-color: #C0C4CC;
// 背景色
$uni-bg-color: #f5f5f5;
// 边框颜色
$uni-border-1: #DCDFE6;
$uni-border-2: #E4E7ED;
$uni-border-3: #EBEEF5;
$uni-border-4: #F2F6FC;
// 常规色
$uni-black: #000000;
$uni-white: #ffffff;
$uni-transparent: rgba($color: #000000, $alpha: 0);

View File

@@ -0,0 +1,62 @@
@import './styles/setting/_variables.scss';
// 间距基础倍数
$uni-space-root: 2;
// 边框半径默认值
$uni-radius-root:5px;
// 主色
$uni-primary: #2979ff;
$uni-primary-disable:mix(#fff,$uni-primary,50%);
$uni-primary-light: mix(#fff,$uni-primary,80%);
// 辅助色
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
$uni-success: #18bc37;
$uni-success-disable:mix(#fff,$uni-success,50%);
$uni-success-light: mix(#fff,$uni-success,80%);
$uni-warning: #f3a73f;
$uni-warning-disable:mix(#fff,$uni-warning,50%);
$uni-warning-light: mix(#fff,$uni-warning,80%);
$uni-error: #e43d33;
$uni-error-disable:mix(#fff,$uni-error,50%);
$uni-error-light: mix(#fff,$uni-error,80%);
$uni-info: #8f939c;
$uni-info-disable:mix(#fff,$uni-info,50%);
$uni-info-light: mix(#fff,$uni-info,80%);
// 中性色
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
$uni-main-color: #3a3a3a; // 主要文字
$uni-base-color: #6a6a6a; // 常规文字
$uni-secondary-color: #909399; // 次要文字
$uni-extra-color: #c7c7c7; // 辅助说明
// 边框颜色
$uni-border-1: #F0F0F0;
$uni-border-2: #EDEDED;
$uni-border-3: #DCDCDC;
$uni-border-4: #B9B9B9;
// 常规色
$uni-black: #000000;
$uni-white: #ffffff;
$uni-transparent: rgba($color: #000000, $alpha: 0);
// 背景色
$uni-bg-color: #f7f7f7;
/* 水平间距 */
$uni-spacing-sm: 8px;
$uni-spacing-base: 15px;
$uni-spacing-lg: 30px;
// 阴影
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
// 蒙版
$uni-mask: rgba($color: #000000, $alpha: 0.4);

View File

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

View File

@@ -0,0 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/record/index","pages/store/index","pages/user/index","pages/auth/auth","pages/store/goods","pages/store/buy"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"ZH健康","navigationBarBackgroundColor":"#F3F6FB","backgroundColorTop":"#F3F6FB","backgroundColorBottom":"#F3F6FB"},"tabBar":{"borderStyle":"white","selectedColor":"#34CE98","list":[{"iconPath":"static/tabBar/tabBar_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png","pagePath":"pages/index/index","text":"发现"},{"iconPath":"static/tabBar/tabBar_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png","pagePath":"pages/record/index","text":"记录"},{"iconPath":"static/tabBar/tabBar_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png","pagePath":"pages/store/index","text":"商城"},{"iconPath":"static/tabBar/tabBar_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png","pagePath":"pages/user/index","text":"我的"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"健康监测","compilerVersion":"3.3.5","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"发现","navigationStyle":"custom"}},{"path":"/pages/record/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"记录","navigationStyle":"custom"}},{"path":"/pages/store/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"健康生活","titleNView":{"backgroundColor":"#FFFFFF","titleSize":"16","buttons":[{"float":"left","text":"","fontSrc":"/static/iconfont.ttf","color":"#666","fontSize":"20px"},{"float":"right","text":"","fontSrc":"/static/iconfont.ttf","color":"#666","fontSize":"20px"}]}}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","navigationStyle":"custom"}},{"path":"/pages/auth/auth","meta":{},"window":{"navigationBarTitleText":"登录","navigationStyle":"custom"}},{"path":"/pages/store/goods","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"详情","titleNView":{"backgroundColor":"#FFFFFF","type":"transparent"}}},{"path":"/pages/store/buy","meta":{},"window":{"navigationBarTitleText":"确认订单","enablePullDownRefresh":false}}];
__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}}}});

View File

@@ -0,0 +1,154 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "app-config": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/ var jsonpArray = this["webpackJsonp"] = this["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ([]);

1743
unpackage/dist/dev/app-plus/app-service.js vendored Normal file

File diff suppressed because one or more lines are too long

3202
unpackage/dist/dev/app-plus/app-view.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__C29473D","name":"健康监测","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F3F6FB"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.3.5","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"borderStyle":"rgba(255,255,255,0.4)","selectedColor":"#34CE98","list":[{"iconPath":"static/tabBar/tabBar_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png","pagePath":"pages/index/index","text":"发现"},{"iconPath":"static/tabBar/tabBar_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png","pagePath":"pages/record/index","text":"记录"},{"iconPath":"static/tabBar/tabBar_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png","pagePath":"pages/store/index","text":"商城"},{"iconPath":"static/tabBar/tabBar_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png","pagePath":"pages/user/index","text":"我的"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,25 @@
@font-face {
font-family: "iconfont";
src: url('@/static/iconfont.ttf') format('truetype')
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-sousuo:before {
content: "\e603";
}
.icon-pinglun:before {
content: "\e601";
}
.icon-shezhi:before {
content: "\e602";
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

1
unpackage/dist/dev/app-plus/view.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long