公共组件

This commit is contained in:
唐明明
2021-07-26 17:08:03 +08:00
parent f77f474602
commit ea0376822d
50 changed files with 2055 additions and 1412 deletions

View File

@@ -13,5 +13,7 @@
</script>
<style>
/*每个页面公共css */
page{
background: #F8F8F8;
}
</style>

View File

@@ -1,15 +1,89 @@
<template>
<view></view>
<view class="goods--list">
<view class="goods--item" v-for="(item, index) in list" :key="index">
<view class="cover">
<image class="cover--src" :src="item.cover" mode="aspectFill" />
</view>
<view class="content">
<view class="title">{{item.title}}</view>
<view class="content-flex">
<view class="price">{{item.price}}<text>易币</text></view>
<view class="sales">已易{{item.sales}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'goodsList',
data() {
return {};
name : 'goodsList',
props : {
list: {
type : Array,
default : () => {
return new Array
}
}
}
};
</script>
<style lang="scss"></style>
<style lang="scss" scoped>
.goods--list{
padding: calc(#{$padding} - 10rpx);
display: flex;
flex-wrap: wrap;
.goods--item{
background: white;
box-sizing: border-box;
width: calc(50% - 20rpx);
margin: 10rpx;
border-radius: $radius/4;
overflow: hidden;
.cover{
position: relative;
width: 100%;
padding-top: 100%;
.cover--src{
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
}
}
.content{
padding: $padding/2;
.title{
font-size: $title-size-lg;
line-height: 40rpx;
height: 80rpx;
}
.content-flex{
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-top: $padding/2;
.price{
color: $text-price;
font-weight: bold;
font-size: $title-size + 8;
text{
font-size: $title-size-sm;
font-weight: normal;
padding-left: $padding/4;
line-height: 50rpx;
}
}
.sales{
font-size: $title-size-sm;
color: $text-gray;
line-height: 50rpx;
}
}
}
}
}
</style>

View File

@@ -1,26 +1,17 @@
{
"pages": [{
"path": "pages/index/index",
"name": "Index",
"meta": {
"auth": false
},
"style": {
}
"name": "Index"
}, {
"path": "pages/user/index",
"name": "User",
"meta": {
"auth": false
}
"name": "User"
}, {
"path": "pages/login/login",
"name": "Login"
}, {
"path" : "pages/login/sms",
"path": "pages/login/sms",
"name": "Sms"
}, {
}, {
"path": "pages/company/auth",
"style": {
"navigationBarTitleText": "企业认证",
@@ -74,7 +65,7 @@
{
"path": "pages/property/integral",
"style": {
"navigationBarTitleText": "现金账户",
"navigationBarTitleText": "贡献值",
"enablePullDownRefresh": false
}
},
@@ -85,7 +76,34 @@
"enablePullDownRefresh": false
}
}
],
],
"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"
}]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "易货",

View File

@@ -1,30 +1,70 @@
<template>
<view class="content">
<button type="default" @click="login">登录</button>
<goods-list :list="goods"/>
</view>
</template>
<script>
import { auth } from '@/apis/interfaces/auth'
import keyPhone from '@/public/keyPhone'
export default {
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)
// console.log(this.$store.state)
},
methods: {
login(){
keyPhone.keyAuth().then(res => {
console.log(res)
}).catch(err =>{
console.log(err)
})
}
// login(){
// keyPhone.keyAuth().then(res => {
// console.log(res)
// }).catch(err =>{
// console.log(err)
// })
// }
}
}
</script>

52
scss/globa.scss Normal file
View File

@@ -0,0 +1,52 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
*/
// 主体颜色
// 文字颜色
$text-color: #333;
$text-gray: #555;
$text-price: #c82626;
// 边框颜色
$border-color: #ddd;
$border-color-lg: #eff4f2;
// 文字尺寸变量
$title-size: 32rpx;
$title-size-lg: 30rpx;
$title-size-m: 28rpx;
$title-size-sm: 26rpx;
// 模块圆角
$radius: 20rpx;
// 模块边距
$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: env(safe-area-inset-top);
padding-top: constant(safe-area-inset-top);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 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: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -10,7 +10,10 @@
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
*/
/* 引入自定义的scss */
@import 'scss/globa.scss';
/* 颜色变量 */

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"},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":false,"autoclose":true},"appname":"易品新境","compilerVersion":"3.1.22","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{}},{"path":"/pages/user/index","meta":{},"window":{}},{"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":{},"window":{"navigationBarTitleText":"现金账户","enablePullDownRefresh":false}},{"path":"/pages/property/token","meta":{},"window":{"navigationBarTitleText":"数权账户","enablePullDownRefresh":false}}];
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/index/index","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":{}},{"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}}];
__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 it is too large Load Diff

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":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"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":{"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"},"launch_path":"__uniappview.html"}}
{"@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":["<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":{"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":0},"launch_path":"__uniappview.html"}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 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: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB