新增订单管理,api

This commit is contained in:
唐明明
2022-01-04 11:28:04 +08:00
parent 6319631d7e
commit 219bc6027a
384 changed files with 53537 additions and 569 deletions

View File

@@ -1,17 +1,11 @@
<template>
<template>
<view class="content">
<view class="status">
<view class="status-main">
<view class="helloe">
欢迎使用ZH健康
</view>
<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 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>
@@ -23,13 +17,18 @@
</navigator>
</view>
<!-- 排行榜 -->
<view class="img-card">
<image src="@/static/dev/img-01.png" mode="widthFix"></image>
</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>
<u-scroll-list class="choiceness-box" indicatorColor="#dafff2" indicatorActiveColor="#34CE98">
<view v-for="(item, index) in choiceness" class="choiceness-item" :key="index">
<view class="choiceness-item-nav" :style="'backgroundColor:#' + item.color">
<image class="choiceness-item-cover" :src="item.thumb"></image>
<view class="choiceness-item-title">{{item.title}}</view>
<view class="choiceness-item-describe">{{item.describe}}</view>
</view>
</view>
</u-scroll-list>
<!-- 话题广场 -->
<view class="new-box">
<view class="title">话题广场</view>
@@ -67,141 +66,190 @@
</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>
<view class="img-card"><image src="@/static/dev/img-00.png" mode="widthFix"></image></view>
</view>
</template>
<script>
export default {
data() {
return {
choiceness: [{
title : "低碳食谱",
describe: "减肥人士的最爱",
color : "c8e6da",
thumb : 'https://cdn.uviewui.com/uview/goods/1.jpg'
},{
title : "低GI食谱",
describe: "家庭衡量膳食平衡",
color : "f0edff",
thumb : 'https://cdn.uviewui.com/uview/goods/1.jpg'
},{
title : "高蛋白食谱",
describe: "健身搭配食用更佳",
color : "fbeed3",
thumb : 'https://cdn.uviewui.com/uview/goods/1.jpg'
}]
};
},
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;
.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;
justify-content: space-between;
align-items: center;
.helloe{
line-height: 100rpx;
font-size: $title-size + 10;
font-weight: bold;
}
.btns{
.btns-item {
position: relative;
text-align: right;
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%;
}
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{
}
// 搜索
.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-nav{
background: $window-color;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
color: $text-gray;
.search-icon {
vertical-align: middle;
margin-right: $margin/2;
}
}
}
// 精选推荐
.choiceness-box{
.choiceness-item{
padding: 0 $padding/3;
&:last-child{
padding-right: $padding;
}
&:first-child{
padding-left: $padding;
}
&-nav{
position: relative;
padding: $padding;
border-radius: $radius;
padding-right: $padding + 108rpx;
}
&-cover{
position: absolute;
right: $margin;
top: $margin;
width: 88rpx;
height: 88rpx;
vertical-align: top;
}
&-title{
line-height: 44rpx;
width: 160rpx;
font-weight: bold;
font-size: $title-size-lg;
padding: 0 $padding;
.search-icon{
vertical-align: middle;
@extend .nowrap;
}
&-describe{
color: $text-gray;
line-height: 44rpx;
font-size: 20rpx;
@extend .nowrap;
}
}
}
// 话题广场
.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;
}
}
}
// 话题广场
.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;
}
// 卡片
.img-card{
margin: $margin;
image{
width: 100%;
vertical-align: top;
border-radius: $radius;
}
}
}
</style>

View File

@@ -1,6 +1,26 @@
<template>
<view>
<view class="content">
<!-- tabs -->
<u-sticky>
<u-tabs
class="tabs"
:list="tabs"
lineColor="#34CE98"
@click="onTabs"
sticky
></u-tabs>
</u-sticky>
<!-- 订单列表 -->
<oct-order
v-for="(item, arrayIndex) in array"
:key="arrayIndex"
:order-info="item"
@onBtn="onType"
></oct-order>
<!-- 加载更多 -->
<view class="pages-load">
<u-loadmore :status="status" />
</view>
</view>
</template>
@@ -8,12 +28,177 @@
export default {
data() {
return {
status: "loading",
tabs: [
{name: "全部"},
{name: "待付款"},
{name: "待发货"},
{name: "待签收"},
{name: "已完成"}
],
array: [
{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/ef838761c8528888213766d3dcc50907.jpg",
name : "秋冬潮湿多雨,便携迷你除湿器",
price : "59.90",
sum : 1,
stateText : "已完成",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg",
name : "稻纯贵州茅台镇新一代酱香型白酒 53度",
price : "158.00",
sum : 2,
stateText : "待支付",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},
{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/ef838761c8528888213766d3dcc50907.jpg",
name : "秋冬潮湿多雨,便携迷你除湿器",
price : "59.90",
sum : 1,
stateText : "已完成",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg",
name : "稻纯贵州茅台镇新一代酱香型白酒 53度",
price : "158.00",
sum : 2,
stateText : "待支付",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},
{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/ef838761c8528888213766d3dcc50907.jpg",
name : "秋冬潮湿多雨,便携迷你除湿器",
price : "59.90",
sum : 1,
stateText : "已完成",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg",
name : "稻纯贵州茅台镇新一代酱香型白酒 53度",
price : "158.00",
sum : 2,
stateText : "待支付",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},
{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/ef838761c8528888213766d3dcc50907.jpg",
name : "秋冬潮湿多雨,便携迷你除湿器",
price : "59.90",
sum : 1,
stateText : "已完成",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg",
name : "稻纯贵州茅台镇新一代酱香型白酒 53度",
price : "158.00",
sum : 2,
stateText : "待支付",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},
{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/ef838761c8528888213766d3dcc50907.jpg",
name : "秋冬潮湿多雨,便携迷你除湿器",
price : "59.90",
sum : 1,
stateText : "已完成",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg",
name : "稻纯贵州茅台镇新一代酱香型白酒 53度",
price : "158.00",
sum : 2,
stateText : "待支付",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},
{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/ef838761c8528888213766d3dcc50907.jpg",
name : "秋冬潮湿多雨,便携迷你除湿器",
price : "59.90",
sum : 1,
stateText : "已完成",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
},{
no : "2261957223036048580",
cover : "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg",
name : "稻纯贵州茅台镇新一代酱香型白酒 53度",
price : "158.00",
sum : 2,
stateText : "待支付",
store : {
name: "网易严选",
logo: "https://yanxuan-item.nosdn.127.net/4ad8a83fa25e2aab8c05ade4c05e135f.jpg"
}
}
],
};
},
methods:{
onTabs(e){
console.log(e.index)
},
onType(e){
console.log(e)
}
}
}
</script>
<style lang="scss">
.content{
background: $window-color;
min-height: 100vh;
}
.tabs{
background: white;
}
// 加载分页
.pages-load{
padding-bottom: $padding;
}
</style>

View File

@@ -1,8 +1,10 @@
<template>
<view class="user-demo">
<view @click="$Router.push({name: 'Address'})">地址管理</view>
<view @click="$Router.push({name: 'Order'})">订单管理</view>
<view @click="$Router.push({name: 'Auth'})">登录</view>
<view class="">
<view class="user-demo">
<view @click="$Router.push({name: 'Address'})">地址管理</view>
<view @click="$Router.push({name: 'Order'})">订单管理</view>
<view @click="$Router.push({name: 'Auth'})">登录</view>
</view>
</view>
</template>