添加geek模板库
This commit is contained in:
parent
3185e4a287
commit
14d2c3e579
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
|||||||
unpackage
|
unpackage
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
|
manifest.json
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
<template>
|
||||||
|
<view class="card" :class="type" @click="$emit('click')">
|
||||||
|
<image class="img" :src="img"/>
|
||||||
|
<view class="right">
|
||||||
|
<view class="title">{{ title }}</view>
|
||||||
|
<view class="subTitle">{{ subTitle }}</view>
|
||||||
|
<view class="price">¥ {{ price }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
img: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
subTitle: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
price: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'line'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.card {
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
height: 240rpx;
|
||||||
|
width: 700rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
height: 200rpx;
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
position: absolute;
|
||||||
|
top: 20rpx;
|
||||||
|
left: 240rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 400rpx;
|
||||||
|
font-size: 35rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subTitle {
|
||||||
|
width: 400rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: rgb(87, 87, 87);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: red;
|
||||||
|
bottom: 10rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rect {
|
||||||
|
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
height: 500rpx;
|
||||||
|
width: 350rpx;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
height: 350rpx;
|
||||||
|
width: 350rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
padding: 20rpx;
|
||||||
|
position: absolute;
|
||||||
|
height: 160rpx;
|
||||||
|
width: 350rpx;
|
||||||
|
top: 350rpx;
|
||||||
|
left: 20rpx;
|
||||||
|
.title {
|
||||||
|
width: 330rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subTitle {
|
||||||
|
width: 330rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: rgb(87, 87, 87);
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: red;
|
||||||
|
bottom: 10rpx;
|
||||||
|
width: 330rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="menu" :style="menuStyle" @click="$emit('click')">
|
<view class="menu" :class="type" :style="menuStyle" @click="$emit('click')">
|
||||||
<image :src="icon" :style="imageStyle"></image>
|
<image :src="icon" :style="imageStyle"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="title" :style="titleStype">{{ label }}</view>
|
<view class="title" :style="titleStype">{{ label }}</view>
|
||||||
@ -24,6 +24,10 @@ const props = defineProps({
|
|||||||
labelColor: {
|
labelColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '#515151'
|
default: '#515151'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'circle'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const menuStyle = computed(() => {
|
const menuStyle = computed(() => {
|
||||||
@ -35,8 +39,8 @@ const menuStyle = computed(() => {
|
|||||||
|
|
||||||
const imageStyle = computed(() => {
|
const imageStyle = computed(() => {
|
||||||
return {
|
return {
|
||||||
width: `${props.size}rpx`,
|
width: `${props.size + (props.type === 'rect' ? 20 : 0)}rpx`,
|
||||||
height: `${props.size}rpx`
|
height: `${props.size + (props.type === 'rect' ? 20 : 0)}rpx`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -50,9 +54,25 @@ const titleStype = computed(()=>{
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.menu {
|
.menu {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
padding: 20rpx;
|
||||||
border-radius: 10000px;
|
border-radius: 10000px;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
padding: 20rpx;
|
|
||||||
|
&:active {
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rect {
|
||||||
|
padding: 0rpx;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
147
src/components/geek-xd/components/geek-order/geek-order.vue
Normal file
147
src/components/geek-xd/components/geek-order/geek-order.vue
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
<template>
|
||||||
|
<view class="geek-card" @click="$emit('click')">
|
||||||
|
<view class="geek-header">
|
||||||
|
<view class="geek-shop">{{ shop }} > </view>
|
||||||
|
<view class="geek-status">{{ status }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="geek-content">
|
||||||
|
<image class="geek-img" :src="img"></image>
|
||||||
|
<view class="geek-label">{{ label }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="geek-footer">
|
||||||
|
<view class="geek-more" @click="$emit('more')">更多</view>
|
||||||
|
<view class="geek-buttonGroup">
|
||||||
|
<view class="geek-btn" @click="$emit('sell')">卖了换钱</view>
|
||||||
|
<view class="geek-btn" @click="$emit('return')">退换/售后</view>
|
||||||
|
<view class="geek-buy" @click="$emit('again')">再次购买</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
shop: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
img: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
price: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'line'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.geek-card {
|
||||||
|
border: 1rpx solid rgb(183, 183, 183);
|
||||||
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
height: 320rpx;
|
||||||
|
width: 700rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
|
||||||
|
.geek-header {
|
||||||
|
.geek-shop {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geek-status {
|
||||||
|
width: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 30rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.geek-content {
|
||||||
|
.geek-label {
|
||||||
|
position: absolute;
|
||||||
|
top: 100rpx;
|
||||||
|
width: 500rpx;
|
||||||
|
left: 180rpx;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geek-img {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 10px;
|
||||||
|
height: 160rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
top: 70rpx;
|
||||||
|
left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.geek-footer {
|
||||||
|
width: 660rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
|
||||||
|
.geek-more {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geek-buttonGroup {
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
right: 10rpx;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.geek-btn {
|
||||||
|
border: 1rpx solid black;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
border-radius: 100px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 10rpx;
|
||||||
|
padding: 6rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.geek-buy {
|
||||||
|
color: red;
|
||||||
|
border: 1rpx solid red;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
border-radius: 100px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 10rpx;
|
||||||
|
padding: 6rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -7,10 +7,6 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
icon: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
label: {
|
label: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "订单数量"
|
default: "订单数量"
|
||||||
@ -4,7 +4,9 @@
|
|||||||
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
|
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
|
||||||
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
|
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
|
||||||
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",
|
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",
|
||||||
"qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue"
|
"qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue",
|
||||||
|
"geek-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue",
|
||||||
|
"gx-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
@ -103,12 +105,6 @@
|
|||||||
{
|
{
|
||||||
"root": "pages_template/pages",
|
"root": "pages_template/pages",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
|
||||||
"path": "index/index",
|
|
||||||
"style": {
|
|
||||||
"pageOrientation": "auto"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "wxCenter/index",
|
"path": "wxCenter/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -230,6 +226,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root": "pages_geek/pages",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "index/index"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
|
|||||||
@ -13,41 +13,35 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
export default {
|
import { ref, onMounted } from 'vue';
|
||||||
data() {
|
|
||||||
return {
|
const chartData = ref({});
|
||||||
chartData: {},
|
|
||||||
};
|
onMounted(() => { getServerData() });
|
||||||
},
|
|
||||||
onReady() {
|
function getServerData() {
|
||||||
this.getServerData();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getServerData() {
|
|
||||||
// 模拟从服务器获取数据时的延时
|
// 模拟从服务器获取数据时的延时
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let res = {
|
let res = {
|
||||||
categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
categories: ['2016', '2017', '2018', '2019', '2020', '2021'],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "目标值",
|
name: '目标值',
|
||||||
data: [35, 36, 31, 33, 13, 34]
|
data: [35, 36, 31, 33, 13, 34],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "完成量",
|
name: '完成量',
|
||||||
data: [18, 27, 21, 24, 6, 28]
|
data: [18, 27, 21, 24, 6, 28],
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
this.chartData = JSON.parse(JSON.stringify(res));
|
|
||||||
}, 500);
|
|
||||||
},
|
},
|
||||||
}
|
],
|
||||||
};
|
};
|
||||||
|
chartData.value = JSON.parse(JSON.stringify(res));
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -1,4 +1,16 @@
|
|||||||
export default [
|
export default [
|
||||||
|
{
|
||||||
|
groupName: '组件',
|
||||||
|
groupName_en: 'Page',
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
path: '/pages_geek/pages/index/index',
|
||||||
|
icon: 'wxCenter',
|
||||||
|
title: '组件展示',
|
||||||
|
title_en: 'index',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
groupName: '部件',
|
groupName: '部件',
|
||||||
groupName_en: 'Parts',
|
groupName_en: 'Parts',
|
||||||
@ -20,7 +32,13 @@ export default [
|
|||||||
icon: 'submitBar',
|
icon: 'submitBar',
|
||||||
title: 'SubmitBar 提交订单栏',
|
title: 'SubmitBar 提交订单栏',
|
||||||
title_en: 'SubmitBar',
|
title_en: 'SubmitBar',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: '/pages_template/pages/keyboardPay/index',
|
||||||
|
icon: 'keyboardPay',
|
||||||
|
title: 'KeyboardPay 自定义键盘支付模板',
|
||||||
|
title_en: 'KeyboardPay',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -57,24 +75,12 @@ export default [
|
|||||||
groupName: '页面',
|
groupName: '页面',
|
||||||
groupName_en: 'Page',
|
groupName_en: 'Page',
|
||||||
list: [
|
list: [
|
||||||
{
|
|
||||||
path: '/pages_template/pages/index/index',
|
|
||||||
icon: 'wxCenter',
|
|
||||||
title: '组件展示',
|
|
||||||
title_en: 'index',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/pages_template/pages/wxCenter/index',
|
path: '/pages_template/pages/wxCenter/index',
|
||||||
icon: 'wxCenter',
|
icon: 'wxCenter',
|
||||||
title: 'WxCenter 仿微信个人中心',
|
title: 'WxCenter 仿微信个人中心',
|
||||||
title_en: 'WxCenter',
|
title_en: 'WxCenter',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/pages_template/pages/keyboardPay/index',
|
|
||||||
icon: 'keyboardPay',
|
|
||||||
title: 'KeyboardPay 自定义键盘支付模板',
|
|
||||||
title_en: 'KeyboardPay',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/pages_template/pages/mallMenu/index1',
|
path: '/pages_template/pages/mallMenu/index1',
|
||||||
icon: 'mall_menu_1',
|
icon: 'mall_menu_1',
|
||||||
@ -115,5 +121,5 @@ export default [
|
|||||||
title_en: 'Address',
|
title_en: 'Address',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
91
src/pages_geek/pages/index/index.vue
Normal file
91
src/pages_geek/pages/index/index.vue
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<uni-section class="mb-10" title="数值板" sub-title="statistic" type="line"></uni-section>
|
||||||
|
<u-row gutter="0">
|
||||||
|
<u-col span="6">
|
||||||
|
<geek-statistic label="订单数量(个)" labelColor="#1f1f1f" :number="0" numberColor="red" />
|
||||||
|
</u-col>
|
||||||
|
<u-col span="6">
|
||||||
|
<geek-statistic label="交易金额(元)" labelColor="#1f1f1f" :number="0" numberColor="red" />
|
||||||
|
</u-col>
|
||||||
|
</u-row>
|
||||||
|
|
||||||
|
<uni-section class="mb-10" title="菜单" sub-title="menu" type="line"></uni-section>
|
||||||
|
<u-row>
|
||||||
|
<u-col :span="2.1" :offset="0.3" v-for="menu, index in menus" :key="index">
|
||||||
|
<geek-menu :icon="menu.icon" :label="menu.label" :size="60" @click="modal.msg(menu.label)" type="circle" />
|
||||||
|
</u-col>
|
||||||
|
</u-row>
|
||||||
|
<u-row>
|
||||||
|
<u-col :span="2.1" :offset="0.3" v-for="menu, index in menus" :key="index">
|
||||||
|
<geek-menu :icon="menu.icon" :label="menu.label" :size="60" @click="modal.msg(menu.label)" type="rect" />
|
||||||
|
</u-col>
|
||||||
|
</u-row>
|
||||||
|
|
||||||
|
<uni-section class="mb-10" title="商品列表" sub-title="commodity" type="line"></uni-section>
|
||||||
|
<geek-commodity v-for="item, index in commodityList" :key="index" :price="item.price" :title="item.title"
|
||||||
|
:sub-title="item.subTitle" :img="item.img" type="line" @click="modal.msg(item.title)" />
|
||||||
|
<geek-commodity v-for="item, index in commodityList" :key="index" :price="item.price" :title="item.title"
|
||||||
|
:sub-title="item.subTitle" :img="item.img" type="rect" @click="modal.msg(item.title)" />
|
||||||
|
|
||||||
|
|
||||||
|
<uni-section class="mb-10" title="订单列表" sub-title="order" type="line"></uni-section>
|
||||||
|
<geek-order v-for="item, index in orderList" :img="item.img" :label="item.title" :shop="item.shop" :status="item.status"
|
||||||
|
:price="item.price" @more="modal.msg('更多')" @again="modal.msg('再次购买')" @return="modal.msg('退换')"
|
||||||
|
@sell="modal.msg('卖了换钱')"></geek-order>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
|
import modal from '@/plugins/modal.js'
|
||||||
|
|
||||||
|
const menus = reactive([
|
||||||
|
{ icon: "/static/images/icon/rocket.png", label: '抢单' },
|
||||||
|
{ icon: "/static/images/icon/phone.png", label: '回访' },
|
||||||
|
{ icon: "/static/images/icon/message.png", label: '消息' },
|
||||||
|
{ icon: "/static/images/icon/dialogue.png", label: '公告' },
|
||||||
|
{ icon: "/static/images/icon/knowledge.png", label: '知识库' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
const commodityList = reactive([
|
||||||
|
{
|
||||||
|
img: '/static/images/banner/banner01.jpg',
|
||||||
|
title: '商品1',
|
||||||
|
subTitle: '商品1简介',
|
||||||
|
price: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: '/static/images/banner/banner02.jpg',
|
||||||
|
title: '商品2',
|
||||||
|
subTitle: '商品2简介',
|
||||||
|
price: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: '/static/images/banner/banner03.jpg',
|
||||||
|
title: '商品3',
|
||||||
|
subTitle: '商品3简介',
|
||||||
|
price: 200,
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
const orderList = [
|
||||||
|
{
|
||||||
|
shop: 'geek自营旗舰店',
|
||||||
|
status: '完成',
|
||||||
|
img: '/static/images/banner/banner01.jpg',
|
||||||
|
title: '商品1',
|
||||||
|
subTitle: '商品1简介',
|
||||||
|
price: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
shop: 'geek自营旗舰店',
|
||||||
|
status: '已取消',
|
||||||
|
img: '/static/images/banner/banner03.jpg',
|
||||||
|
title: '商商商商商商商商商商商商商商商商商商商商商商商商商商商商商商商商商商品3',
|
||||||
|
subTitle: '商品3简介',
|
||||||
|
price: 200,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@ -45,7 +45,7 @@ export default {
|
|||||||
// 跳转到全部回复
|
// 跳转到全部回复
|
||||||
toAllReply() {
|
toAllReply() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/template/comment/reply'
|
url: '/pages_template/pages/comment/reply'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 点赞
|
// 点赞
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
<template>
|
|
||||||
<uni-section class="mb-10" title="数值板" sub-title="statistic" type="line"></uni-section>
|
|
||||||
<u-row gutter="0">
|
|
||||||
<u-col span="6">
|
|
||||||
<statistic label="订单数量(个)" labelColor="#1f1f1f" number="0" numberColor="red" />
|
|
||||||
</u-col>
|
|
||||||
<u-col span="6">
|
|
||||||
<statistic label="交易金额(元)" labelColor="#1f1f1f" number="0" numberColor="red" />
|
|
||||||
</u-col>
|
|
||||||
</u-row>
|
|
||||||
|
|
||||||
<uni-section class="mb-10" title="圆形菜单" sub-title="circle-menu" type="line"></uni-section>
|
|
||||||
<u-row>
|
|
||||||
<u-col :span="2.1" :offset="0.3" v-for="menu, index in menus" :key="index">
|
|
||||||
<circleMenu :icon="menu.icon" :label="menu.label" :size="60" @click="modal.msg(menu.label)"></circleMenu>
|
|
||||||
</u-col>
|
|
||||||
</u-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
|
||||||
import circleMenu from '../../components/circle-menu'
|
|
||||||
import statistic from '../../components/statistic.vue';
|
|
||||||
import modal from '@/plugins/modal.js'
|
|
||||||
|
|
||||||
|
|
||||||
// 菜单板块
|
|
||||||
const menus = reactive(
|
|
||||||
[
|
|
||||||
{ icon: "/static/images/icon/rocket.png", label: '抢单' },
|
|
||||||
{ icon: "/static/images/icon/phone.png", label: '回访' },
|
|
||||||
{ icon: "/static/images/icon/message.png", label: '消息' },
|
|
||||||
{ icon: "/static/images/icon/dialogue.png", label: '公告' },
|
|
||||||
{ icon: "/static/images/icon/knowledge.png", label: '知识库' }
|
|
||||||
]);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@ -36,22 +36,22 @@
|
|||||||
<!-- 登录 -->
|
<!-- 登录 -->
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="cover slide-top1" :style="'animation-play-state:' + play3">
|
<view class="cover slide-top1" :style="'animation-play-state:' + play[2]">
|
||||||
<view class="masking slide-top" :class="[collapsedClass, { animating: isAnimating }]" ref="fixedView"
|
<view class="masking slide-top" :class="[collapsedClass, { animating: isAnimating }]" ref="fixedView"
|
||||||
:style="'animation-play-state:' + play1">
|
:style="'animation-play-state:' + play[0]">
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<text class="text-first">欢迎使用</text>
|
<text class="text-first">欢迎使用</text>
|
||||||
<text class="text-second">校园访客</text>
|
<text class="text-second">校园访客</text>
|
||||||
<text class="text-third">预约系统</text>
|
<text class="text-third">预约系统</text>
|
||||||
<view :class="{ active: isActive === true, button: isActive !== true }" @click="play"
|
<view :class="{ active: isActive === true, button: isActive !== true }" @click="startplay"
|
||||||
:style="'animation-play-state:' + play2">
|
:style="'animation-play-state:' + play[1]">
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<text class="text-fifth">访客登录</text>
|
<text class="text-fifth">访客登录</text>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</view>
|
</view>
|
||||||
<view class="shadow1" :style="'animation-play-state:' + play2" />
|
<view class="shadow1" :style="'animation-play-state:' + play[1]" />
|
||||||
<view class="shadow2" :style="'animation-play-state:' + play2" />
|
<view class="shadow2" :style="'animation-play-state:' + play[1]" />
|
||||||
<view class="shadow3" :style="'animation-play-state:' + play2" />
|
<view class="shadow3" :style="'animation-play-state:' + play[1]" />
|
||||||
|
|
||||||
<image
|
<image
|
||||||
style="width: 100%;height: 1050rpx;opacity: 0.05;border-radius: 0 0 400rpx 400rpx;position: absolute;"
|
style="width: 100%;height: 1050rpx;opacity: 0.05;border-radius: 0 0 400rpx 400rpx;position: absolute;"
|
||||||
@ -80,15 +80,11 @@ export default {
|
|||||||
isFixedViewVisible: true,
|
isFixedViewVisible: true,
|
||||||
animationType: "up", // 可选值:right 或 up
|
animationType: "up", // 可选值:right 或 up
|
||||||
isAnimating: false, // 控制动画执行状态
|
isAnimating: false, // 控制动画执行状态
|
||||||
play1: "paused",
|
play: ["paused", "paused", "paused"],
|
||||||
play2: "paused",
|
|
||||||
play3: "paused",
|
|
||||||
|
|
||||||
page: "index",
|
page: "index",
|
||||||
|
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
captchaEnabled: true,
|
captchaEnabled: true,
|
||||||
globalConfig: getApp().globalData.config,
|
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "admin",
|
username: "admin",
|
||||||
password: "admin123",
|
password: "admin123",
|
||||||
@ -107,24 +103,23 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
login() {
|
login() {
|
||||||
this.play3 = "running"
|
this.play[2] = "running"
|
||||||
setTimeout(() => { this.page = 'login' }, 1000)
|
setTimeout(() => { this.page = 'login' }, 1000)
|
||||||
|
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.page = 'index'
|
this.page = 'index'
|
||||||
this.play1 = "paused"
|
this.play[0] = "paused"
|
||||||
this.play2 = "paused"
|
this.play[1] = "paused"
|
||||||
this.play3 = "paused"
|
this.play[2] = "paused"
|
||||||
console.log("index")
|
|
||||||
},
|
},
|
||||||
play() {
|
startplay() {
|
||||||
this.play2 = "running"
|
this.play[1] = "running"
|
||||||
this.isActive = true;
|
this.isActive = true;
|
||||||
setTimeout(() => { this.isActive = false; }, 300);
|
setTimeout(() => { this.isActive = false; }, 300);
|
||||||
if (this.isAnimating) { return; }
|
if (this.isAnimating) { return; }
|
||||||
this.isAnimating = false; // 开始动画执行
|
this.isAnimating = false; // 开始动画执行
|
||||||
this.play1 = "running"
|
this.play[0] = "running"
|
||||||
this.isFixedViewVisible = !this.isFixedViewVisible;
|
this.isFixedViewVisible = !this.isFixedViewVisible;
|
||||||
let fixedView = this.$refs.fixedView;
|
let fixedView = this.$refs.fixedView;
|
||||||
if (fixedView)
|
if (fixedView)
|
||||||
|
|||||||
@ -8,8 +8,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="u-menu-wrap">
|
<view class="u-menu-wrap">
|
||||||
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop">
|
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop">
|
||||||
<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item" :class="[current==index ? 'u-tab-item-active' : '']"
|
<view v-for="(item, index) in tabbar" :key="index" class="u-tab-item"
|
||||||
:data-current="index" @tap.stop="swichMenu(index)">
|
:class="[current == index ? 'u-tab-item-active' : '']" :data-current="index"
|
||||||
|
@tap.stop="swichMenu(index)">
|
||||||
<text class="u-line-1">{{ item.name }}</text>
|
<text class="u-line-1">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@ -21,7 +22,8 @@
|
|||||||
<text>{{ item.name }}</text>
|
<text>{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container">
|
<view class="item-container">
|
||||||
<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1">
|
<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1"
|
||||||
|
@click="clickMenu(item1)">
|
||||||
<image class="item-menu-image" :src="item1.icon" mode=""></image>
|
<image class="item-menu-image" :src="item1.icon" mode=""></image>
|
||||||
<view class="item-menu-name">{{ item1.name }}</view>
|
<view class="item-menu-name">{{ item1.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -45,14 +47,8 @@
|
|||||||
menuHeight: 0, // 左边菜单的高度
|
menuHeight: 0, // 左边菜单的高度
|
||||||
menuItemHeight: 0, // 左边菜单item的高度
|
menuItemHeight: 0, // 左边菜单item的高度
|
||||||
}
|
}
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getImg() {
|
|
||||||
return Math.floor(Math.random() * 35);
|
|
||||||
},
|
|
||||||
// 点击左边的栏目切换
|
// 点击左边的栏目切换
|
||||||
async swichMenu(index) {
|
async swichMenu(index) {
|
||||||
if (index == this.current) return;
|
if (index == this.current) return;
|
||||||
@ -80,6 +76,9 @@
|
|||||||
this[dataVal] = res.height;
|
this[dataVal] = res.height;
|
||||||
}).exec();
|
}).exec();
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
clickMenu(menu) {
|
||||||
|
console.log(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,19 +9,21 @@
|
|||||||
<view class="u-menu-wrap">
|
<view class="u-menu-wrap">
|
||||||
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
|
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
|
||||||
:scroll-into-view="itemId">
|
:scroll-into-view="itemId">
|
||||||
<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item" :class="[current == index ? 'u-tab-item-active' : '']"
|
<view v-for="(item, index) in tabbar" :key="index" class="u-tab-item"
|
||||||
@tap.stop="swichMenu(index)">
|
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
||||||
<text class="u-line-1">{{ item.name }}</text>
|
<text class="u-line-1">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
|
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
||||||
|
@scroll="rightScroll">
|
||||||
<view class="page-view">
|
<view class="page-view">
|
||||||
<view class="class-item" :id="'item' + index" v-for="(item, index) in tabbar" :key="index">
|
<view class="class-item" :id="'item' + index" v-for="(item, index) in tabbar" :key="index">
|
||||||
<view class="item-title">
|
<view class="item-title">
|
||||||
<text>{{ item.name }}</text>
|
<text>{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container">
|
<view class="item-container">
|
||||||
<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1">
|
<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1"
|
||||||
|
@click="clickMenu(item1)">
|
||||||
<image class="item-menu-image" :src="item1.icon" mode=""></image>
|
<image class="item-menu-image" :src="item1.icon" mode=""></image>
|
||||||
<view class="item-menu-name">{{ item1.name }}</view>
|
<view class="item-menu-name">{{ item1.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -44,15 +46,12 @@
|
|||||||
menuItemHeight: 0, // 左边菜单item的高度
|
menuItemHeight: 0, // 左边菜单item的高度
|
||||||
itemId: '', // 栏目右边scroll-view用于滚动的id
|
itemId: '', // 栏目右边scroll-view用于滚动的id
|
||||||
tabbar: classifyData,
|
tabbar: classifyData,
|
||||||
menuItemPos: [],
|
|
||||||
arr: [],
|
arr: [],
|
||||||
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
|
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
|
||||||
timer: null, // 定时器
|
timer: null, // 定时器
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.getMenuItemTop()
|
this.getMenuItemTop()
|
||||||
@ -161,6 +160,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
|
},
|
||||||
|
clickMenu(menu) {
|
||||||
|
console.log(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user