优化:订单发布后跳转到我的售出订单列表

优化:订单列表已售出状态样式更改,增加圆角背景,取消上方选项卡
优化:未到秒杀时间页面banner要显示,不显示产品
This commit is contained in:
wuhui_zzw 2023-03-04 09:39:17 +08:00
parent 6f14e821c7
commit 3dbb3102ea
5 changed files with 160 additions and 41 deletions

View File

@ -1,6 +1,6 @@
{
"name" : "单商户V4",
"appid" : "__UNI__460ACE5",
"appid" : "__UNI__E00B9A8",
"description" : "",
"versionName" : "5.1.2",
"versionCode" : "100",

View File

@ -2,14 +2,14 @@
<page-meta :page-style="themeColor"></page-meta>
<view class="order">
<!--搜索-->
<view v-if="false" class="cate-search">
<view class="cate-search">
<view class="search-box">
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" placeholder="请输入商品名称/订单编号" @confirm="search()"/>
<text class="iconfont icon-sousuo3" @click="search()"></text>
</view>
</view>
<!--选项卡-->
<view class="tabs">
<view v-if="false" class="tabs">
<view
v-for="(item,index) in tabs" :key="index"
:class="['tabs-item',{'tabs-item-active': (item.status === tabs_active)}]"
@ -69,6 +69,12 @@ export default {
{title: '已上架', status: 'release'},
{title: '已售卖', status: 'sold'}
],
page_titles: {
all: '全部订单',
stock: '库存中订单',
release: '销售中订单',
sold: '已售卖订单',
},
list: [],
status_text: {
1 : '库存',
@ -84,7 +90,13 @@ export default {
components: {},
mixins: [],
onLoad(option) {
//
this.tabs_active = option.status || 'all';
//
let pageTitle = this.page_titles[this.tabs_active];
uni.setNavigationBarTitle({
title: pageTitle
});
},
onShow() {},
onReady(){
@ -101,7 +113,9 @@ export default {
},
methods: {
//
search(){},
search(){
this.$refs.mescroll.refresh();
},
//
getList(mescroll) {
this.$api.sendRequest({
@ -110,6 +124,7 @@ export default {
page: mescroll.num || 1,
page_size: mescroll.size || 10,
status: this.tabs_active,
search_text: this.searchText, //
},
success: res => {
if(parseInt(res.code) === 0){
@ -235,9 +250,15 @@ export default {
color: #000000;
}
.right{
line-height: 50rpx;
line-height: 40rpx;
font-size: 26rpx;
color: #de6758;
//color: #de6758;
//border: 2rpx solid #de6758;
height: 40rpx;
padding: 0 10rpx;
border-radius: 10rpx;
background: #de6758;
color: #ffffff;
}
}
.block-content{

View File

@ -57,7 +57,7 @@
<view class="transfer-price-top">
<view class="top-left">详情</view>
<view class="top-right">
<i class="icondiy icon-system-guanbi"></i>
<i class="icondiy icon-system-guanbi" @click="$refs.saleGoods.close()"></i>
</view>
</view>
<view class="transfer-price">
@ -80,9 +80,6 @@
<uni-popup ref="undercarriageConfirm" type="dialog" class="order-remarks-content">
<uni-popup-dialog mode="base" content="确认下架售卖中的商品吗!" @close="$refs.undercarriageConfirm.close()" @confirm="undercarriage"></uni-popup-dialog>
</uni-popup>
<!--登录弹框-->
<ns-login ref="login"></ns-login>
<!--加载动画-->
@ -224,10 +221,25 @@ export default {
if(_this.$refs.saleGoods) _this.$refs.saleGoods.close();
//
if(parseInt(res.code) === -800){
//
this.split_message = res.message;
_this.$refs.splitConfirm.open();
}
else if(parseInt(res.code) === 0){
//
_this.$util.showToast({
title: res.message,
mask: true,
duration: 2000,
success: function () {
setTimeout(() => {
_this.$util.redirectTo('/pages_promotion/futures/order', { status: 'release' });
}, 1000);
}
});
}
else{
//
_this.$util.showToast({
title: res.message,
mask: true,
@ -464,6 +476,5 @@ export default {
}
}
}
}
</style>

View File

@ -2,7 +2,7 @@
<page-meta :page-style="themeColor"></page-meta>
<view class="seckill">
<!--顶部内容-->
<view class="seckill-top" v-if="list.length > 0">
<view class="seckill-top">
<image class="top-background-image" :src="$util.img('public/static/img/futures/seckill-bg.png')" mode="widthFix"></image>
<view class="seckill-count-down" v-if="h > 0 || i > 0 || s > 0">
距结束
@ -327,4 +327,7 @@ export default {
}
}
}
/deep/ .empty{
background: #fff;
}
</style>

View File

@ -9,28 +9,36 @@
<view class="message-content">
<!--顶部标题-->
<view class="titles">
<view class="titles-block" v-for="(item,index) in titles" :key="index">
<view class="titles-block-icon">
<image class="top-image" :src="$util.img(item.icon)" mode="widthFix"></image>
</view>
<view class="titles-block-title">{{ item.title }}</view>
</view>
</view>
<!--消息列表-->
<mescroll-uni ref="mescroll" @getData="getList" top="350">
<block slot="list">
<view class="message-list">
<view class="message-block" v-for="(item,index) in list" :key="index">
<view class="message-block-top">
<view class="message-block-top-image">
<image class="top-image" :src="$util.img('public/static/img/message/business.png')" mode="widthFix"></image>
</view>
<view class="message-block-top-title">交易信息</view>
</view>
<view class="message-block-message">
消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容
</view>
<view class="message-block-bottom">
<view class="message-block-bottom-left">查看详情</view>
<view class="message-block-bottom-right">2023-02-27 10:45</view>
</view>
</view>
</view>
</block>
</mescroll-uni>
</view>
<!--登录弹框-->
<ns-login ref="login"></ns-login>
<!--加载动画-->
@ -44,12 +52,12 @@ export default {
return {
//
titles:[
{ title: '交易信息', icon: 'public/static/img/futures/business.png' },
{ title: '系统消息', icon: 'public/static/img/futures/system.png' },
{ title: '通知消息', icon: 'public/static/img/futures/notice.png' },
{ title: '留言反馈', icon: 'public/static/img/futures/words.png' },
{ title: '交易信息', icon: 'public/static/img/message/business.png' },
{ title: '系统消息', icon: 'public/static/img/message/system.png' },
{ title: '通知消息', icon: 'public/static/img/message/notice.png' },
{ title: '留言反馈', icon: 'public/static/img/message/words.png' },
],
list: [],
@ -63,13 +71,38 @@ export default {
onReady(){
//
if (!uni.getStorageSync('token')) this.$refs.login.open('/pages_promotion/message/index');
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
methods: {
// todo:
getList(mescroll) {
this.$api.sendRequest({
url: '/futures/api/futures/myList',
data: {
page: mescroll.num || 1,
page_size: mescroll.size || 10,
status: this.tabs_active,
},
success: res => {
if(parseInt(res.code) === 0){
mescroll.endSuccess(Object.keys(res.data.list).length);
//
if (parseInt(mescroll.num) === 1){
this.list = []; //
}
this.list = this.list.concat(res.data.list); //
}else {
this.msg = res.message;
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
@ -92,13 +125,64 @@ export default {
min-height: 100vh;
.top{
.top-image{}
width: 100vw;
height: 240rpx;
.top-image{
width: 100% !important;
height: 100% !important;
}
}
.message-content{
padding: 30rpx;
width: calc(100% - (30rpx * 2));
position: absolute;
top: 90rpx;
.titles{
width: calc(100% - (20rpx * 2));
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: space-evenly;
align-content: center;
padding: 20rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
.titles-block{
width: calc(100% / 4);
display: inline-flex;
flex-direction: column;
flex-wrap: wrap;
align-content: center;
justify-content: center;
align-items: center;
.titles-block-icon{
width: 60%;
.top-image{
width: 100% !important;
}
}
.titles-block-title{}
}
}
.message-list{
padding:0 20rpx;
background-color: red;
.message-block{
}
}
}
}