feat: 添加静态资源文件及基础组件
- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示 - 添加字体文件及样式配置,支持自定义字体 - 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件 - 添加网络状态监听、加密工具等基础工具函数 - 配置 Vuex 状态管理,包括购物车数量、热门搜索词等 - 增加页面组件,如用户协议、分销信息、提现状态等 - 配置项目构建和忽略文件,优化开发体验
This commit is contained in:
74
pages/user/components/order/index.vue
Normal file
74
pages/user/components/order/index.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<script>
|
||||
import propertyList from '@/utils/propertyList.js';
|
||||
import template1 from './template1.vue';
|
||||
import template2 from './template2.vue';
|
||||
export default {
|
||||
components: {
|
||||
template1,
|
||||
template2
|
||||
},
|
||||
props: {
|
||||
userInfo: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
orderData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
orderMenu: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
orderAdminData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
orderData: {
|
||||
handler(nVal, oVal) {
|
||||
// this.iconFilter(nVal.style);
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
property: []
|
||||
};
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<template1 v-if="orderData.style == 1" :orderMenu="orderMenu" :notPayOrder="orderAdminData.not_pay_order" :commission="orderAdminData.commission"></template1>
|
||||
<template2 v-if="orderData.style == 2 || orderData.style == 3" :notPayOrder="orderAdminData.not_pay_order" :orderStyle="orderData.style" :orderMenu="orderMenu"></template2>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// /deep/ .section-content .uni-badge-left-margin {
|
||||
// position: absolute;
|
||||
// top: 0rpx;
|
||||
// right: 44rpx;
|
||||
// /deep/.uni-badge--error {
|
||||
// background-color: #fff !important;
|
||||
// }
|
||||
// /deep/.uni-badge {
|
||||
// color: var(--view-theme);
|
||||
// border: 1px solid var(--view-theme);
|
||||
// z-index: 29;
|
||||
// }
|
||||
// }
|
||||
|
||||
.text-primary-con {
|
||||
color: var(--view-theme);
|
||||
}
|
||||
|
||||
</style>
|
||||
158
pages/user/components/order/template1.vue
Normal file
158
pages/user/components/order/template1.vue
Normal file
@@ -0,0 +1,158 @@
|
||||
<script>
|
||||
import countDown from '@/components/countDown';
|
||||
export default {
|
||||
components: { countDown },
|
||||
inject: ['intoPage', 'goMenuPage', 'getMenuData'],
|
||||
props: {
|
||||
orderMenu: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
notPayOrder: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goUserSpread() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_spread_user/index'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="pr-24 pl-24 bg--w111-fff rd-16rpx mt-20 ml-20 mr-20">
|
||||
<view class="acea-row row-middle row-between section-header">
|
||||
<view>订单中心</view>
|
||||
<view class="arrow flex-x-center" @click="intoPage('/pages/goods/order_list/index')">
|
||||
查看全部
|
||||
<text class="iconfont icon-ic_rightarrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="acea-row section-content">
|
||||
<view v-for="(item,index) in orderMenu" :key="index" class="item"
|
||||
@click="intoPage(item.url)">
|
||||
<view class="icon"><text :class="item.icon" class="iconfont"></text></view>
|
||||
<view class="">{{ item.title }}</view>
|
||||
<uni-badge class="uni-badge-left-margin" v-if="item.num > 0" :text="item.num"></uni-badge>
|
||||
</view>
|
||||
<view class="w-full h-120 rd-16rpx bg--w111-f5f5f5 mt-32 p-10 flex-between-center" v-if="notPayOrder" @click="intoPage('/pages/goods/order_list/index?status=0')">
|
||||
<view class="flex-y-center">
|
||||
<image :src="notPayOrder.img" class="w-100 h-100 rd-12rpx"></image>
|
||||
<view class="ml-16">
|
||||
<view class="fs-24 lh-34rpx text--w111-333 fw-500">等待付款</view>
|
||||
<view class="fs-22 lh-30rpx text--w111-333 mt-12 flex-y-center">
|
||||
还剩
|
||||
<!-- <text class="text-primary-con SemiBold">23:57:16</text> -->
|
||||
<countDown
|
||||
:is-day="false"
|
||||
tip-text=" "
|
||||
day-text=" "
|
||||
hour-text=":"
|
||||
minute-text=":"
|
||||
second-text=" "
|
||||
:datatime="notPayOrder.stop_time"
|
||||
bgColor="#F5F5F5"
|
||||
colors="var(--view-theme)"
|
||||
dotColor="var(--view-theme)"
|
||||
@endTime="getMenuData"
|
||||
></countDown>
|
||||
订单自动关闭
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-136 h-56 rd-30rpx flex-center fs-24 fw-500 text-primary-con con_border mr-14">去支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section-content {
|
||||
padding: 48rpx 0 36rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
.uni-badge-left-margin {
|
||||
position: absolute;
|
||||
top: -20rpx;
|
||||
right: 26rpx;
|
||||
/deep/ .uni-badge--error {
|
||||
background-color: var(--view-theme) !important;
|
||||
}
|
||||
.uni-badge {
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
z-index: 29;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 48rpx;
|
||||
}
|
||||
.con_border {
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
}
|
||||
}
|
||||
.section-header {
|
||||
padding: 32rpx 6rpx 0;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
line-height: 42rpx;
|
||||
color: #333333;
|
||||
.arrow {
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
position: relative;
|
||||
height: 84rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 8rpx;
|
||||
bottom: 0;
|
||||
left: 8rpx;
|
||||
height: 1rpx;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.item {
|
||||
// flex: 1;
|
||||
padding: 0 8rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin-left: 8rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
104
pages/user/components/order/template2.vue
Normal file
104
pages/user/components/order/template2.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<script>
|
||||
import countDown from '@/components/countDown';
|
||||
export default {
|
||||
components: { countDown },
|
||||
inject: ['intoPage', 'goMenuPage'],
|
||||
props: {
|
||||
orderMenu: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
orderStyle: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
notPayOrder: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="pt-34 pr-24 pb-32 pl-24 bg--w111-fff rd-16rpx mt-20 order-wrapper ml-20 mr-20">
|
||||
<view class="flex-between-center">
|
||||
<text class="fs-30 fw-500 lh-42rpx text--w111-333">订单中心</text>
|
||||
<view class="flex-y-center text--w111-999" @click="intoPage('/pages/goods/order_list/index')">
|
||||
<text class="fs-26 lh-26rpx">查看全部</text>
|
||||
<text class="iconfont icon-ic_rightarrow fs-24"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-between-center mt-30" :class="{ theme: orderStyle == 2 }">
|
||||
<view class="w-128 flex-col flex-center item" v-for="item in orderMenu" :key="item.title" @click="intoPage(item.url)">
|
||||
<text :class="item.icon" class="iconfont fs-48"></text>
|
||||
<text class="fs-26 lh-36rpx text--w111-282828 pt-22">{{ item.title }}</text>
|
||||
<uni-badge class="uni-badge-left-margin" v-if="item.num > 0" :text="item.num"></uni-badge>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-full h-120 rd-16rpx bg--w111-f5f5f5 mt-32 p-10 flex-between-center" v-if="notPayOrder" @click="intoPage('/pages/goods/order_list/index?status=0')">
|
||||
<view class="flex-y-center">
|
||||
<image :src="notPayOrder.img" class="w-100 h-100 rd-12rpx"></image>
|
||||
<view class="ml-16">
|
||||
<view class="fs-24 lh-34rpx text--w111-333 fw-500">等待付款</view>
|
||||
<view class="fs-22 lh-30rpx text--w111-333 mt-12 flex-y-center">
|
||||
还剩
|
||||
<!-- <text class="text-primary-con SemiBold">23:57:16</text> -->
|
||||
<countDown
|
||||
:is-day="false"
|
||||
tip-text=" "
|
||||
day-text=" "
|
||||
hour-text=":"
|
||||
minute-text=":"
|
||||
second-text=" "
|
||||
:datatime="notPayOrder.stop_time"
|
||||
bgColor="#F5F5F5"
|
||||
colors="var(--view-theme)"
|
||||
dotColor="var(--view-theme)"
|
||||
@endTime="getMenuData"
|
||||
></countDown>
|
||||
订单自动关闭
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-136 h-56 rd-30rpx flex-center fs-24 fw-500 text-primary-con con_border mr-14">去支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.order-wrapper {
|
||||
.uni-badge-left-margin {
|
||||
position: absolute;
|
||||
top: -12rpx;
|
||||
right: 24rpx;
|
||||
.uni-badge--error {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
/deep/ .uni-badge--error {
|
||||
background-color: var(--view-theme) !important;
|
||||
}
|
||||
.uni-badge {
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
z-index: 29;
|
||||
}
|
||||
}
|
||||
.con_border {
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
}
|
||||
.image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.theme .iconfont {
|
||||
color: var(--view-theme);
|
||||
}
|
||||
.item {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user