forked from zhongyuanhaiju/uniapp
优化:订单发布后跳转到我的售出订单列表
优化:订单列表已售出状态样式更改,增加圆角背景,取消上方选项卡 优化:未到秒杀时间页面banner要显示,不显示产品
This commit is contained in:
parent
6f14e821c7
commit
3dbb3102ea
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "单商户V4",
|
"name" : "单商户V4",
|
||||||
"appid" : "__UNI__460ACE5",
|
"appid" : "__UNI__E00B9A8",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "5.1.2",
|
"versionName" : "5.1.2",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<page-meta :page-style="themeColor"></page-meta>
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<!--搜索-->
|
<!--搜索-->
|
||||||
<view v-if="false" class="cate-search">
|
<view class="cate-search">
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" placeholder="请输入商品名称/订单编号" @confirm="search()"/>
|
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" placeholder="请输入商品名称/订单编号" @confirm="search()"/>
|
||||||
<text class="iconfont icon-sousuo3" @click="search()"></text>
|
<text class="iconfont icon-sousuo3" @click="search()"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!--选项卡-->
|
<!--选项卡-->
|
||||||
<view class="tabs">
|
<view v-if="false" class="tabs">
|
||||||
<view
|
<view
|
||||||
v-for="(item,index) in tabs" :key="index"
|
v-for="(item,index) in tabs" :key="index"
|
||||||
:class="['tabs-item',{'tabs-item-active': (item.status === tabs_active)}]"
|
:class="['tabs-item',{'tabs-item-active': (item.status === tabs_active)}]"
|
||||||
|
|
@ -69,6 +69,12 @@ export default {
|
||||||
{title: '已上架', status: 'release'},
|
{title: '已上架', status: 'release'},
|
||||||
{title: '已售卖', status: 'sold'}
|
{title: '已售卖', status: 'sold'}
|
||||||
],
|
],
|
||||||
|
page_titles: {
|
||||||
|
all: '全部订单',
|
||||||
|
stock: '库存中订单',
|
||||||
|
release: '销售中订单',
|
||||||
|
sold: '已售卖订单',
|
||||||
|
},
|
||||||
list: [],
|
list: [],
|
||||||
status_text: {
|
status_text: {
|
||||||
1 : '库存',
|
1 : '库存',
|
||||||
|
|
@ -84,7 +90,13 @@ export default {
|
||||||
components: {},
|
components: {},
|
||||||
mixins: [],
|
mixins: [],
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
// 获取需要显示的订单类型
|
||||||
this.tabs_active = option.status || 'all';
|
this.tabs_active = option.status || 'all';
|
||||||
|
// 获取页面标题
|
||||||
|
let pageTitle = this.page_titles[this.tabs_active];
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: pageTitle
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
onReady(){
|
onReady(){
|
||||||
|
|
@ -101,7 +113,9 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 订单搜索
|
// 订单搜索
|
||||||
search(){},
|
search(){
|
||||||
|
this.$refs.mescroll.refresh();
|
||||||
|
},
|
||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
getList(mescroll) {
|
getList(mescroll) {
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
|
|
@ -110,6 +124,7 @@ export default {
|
||||||
page: mescroll.num || 1,
|
page: mescroll.num || 1,
|
||||||
page_size: mescroll.size || 10,
|
page_size: mescroll.size || 10,
|
||||||
status: this.tabs_active,
|
status: this.tabs_active,
|
||||||
|
search_text: this.searchText, // 搜索内容
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if(parseInt(res.code) === 0){
|
if(parseInt(res.code) === 0){
|
||||||
|
|
@ -235,9 +250,15 @@ export default {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
.right{
|
.right{
|
||||||
line-height: 50rpx;
|
line-height: 40rpx;
|
||||||
font-size: 26rpx;
|
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{
|
.block-content{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
<view class="transfer-price-top">
|
<view class="transfer-price-top">
|
||||||
<view class="top-left">详情</view>
|
<view class="top-left">详情</view>
|
||||||
<view class="top-right">
|
<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>
|
</view>
|
||||||
<view class="transfer-price">
|
<view class="transfer-price">
|
||||||
|
|
@ -80,9 +80,6 @@
|
||||||
<uni-popup ref="undercarriageConfirm" type="dialog" class="order-remarks-content">
|
<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-dialog mode="base" content="确认下架售卖中的商品吗!" @close="$refs.undercarriageConfirm.close()" @confirm="undercarriage"></uni-popup-dialog>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--登录弹框-->
|
<!--登录弹框-->
|
||||||
<ns-login ref="login"></ns-login>
|
<ns-login ref="login"></ns-login>
|
||||||
<!--加载动画-->
|
<!--加载动画-->
|
||||||
|
|
@ -224,10 +221,25 @@ export default {
|
||||||
if(_this.$refs.saleGoods) _this.$refs.saleGoods.close();
|
if(_this.$refs.saleGoods) _this.$refs.saleGoods.close();
|
||||||
// 返回结果处理
|
// 返回结果处理
|
||||||
if(parseInt(res.code) === -800){
|
if(parseInt(res.code) === -800){
|
||||||
|
// 需要拆单 确认后再次请求发布
|
||||||
this.split_message = res.message;
|
this.split_message = res.message;
|
||||||
_this.$refs.splitConfirm.open();
|
_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{
|
else{
|
||||||
|
// 失败
|
||||||
_this.$util.showToast({
|
_this.$util.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
mask: true,
|
mask: true,
|
||||||
|
|
@ -464,6 +476,5 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<page-meta :page-style="themeColor"></page-meta>
|
<page-meta :page-style="themeColor"></page-meta>
|
||||||
<view class="seckill">
|
<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>
|
<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">
|
<view class="seckill-count-down" v-if="h > 0 || i > 0 || s > 0">
|
||||||
距结束
|
距结束
|
||||||
|
|
@ -327,4 +327,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/deep/ .empty{
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -9,28 +9,36 @@
|
||||||
<view class="message-content">
|
<view class="message-content">
|
||||||
<!--顶部标题-->
|
<!--顶部标题-->
|
||||||
<view class="titles">
|
<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>
|
</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>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--登录弹框-->
|
<!--登录弹框-->
|
||||||
<ns-login ref="login"></ns-login>
|
<ns-login ref="login"></ns-login>
|
||||||
<!--加载动画-->
|
<!--加载动画-->
|
||||||
|
|
@ -44,12 +52,12 @@ export default {
|
||||||
return {
|
return {
|
||||||
// 顶部标题
|
// 顶部标题
|
||||||
titles:[
|
titles:[
|
||||||
{ title: '交易信息', icon: 'public/static/img/futures/business.png' },
|
{ title: '交易信息', icon: 'public/static/img/message/business.png' },
|
||||||
{ title: '系统消息', icon: 'public/static/img/futures/system.png' },
|
{ title: '系统消息', icon: 'public/static/img/message/system.png' },
|
||||||
{ title: '通知消息', icon: 'public/static/img/futures/notice.png' },
|
{ title: '通知消息', icon: 'public/static/img/message/notice.png' },
|
||||||
{ title: '留言反馈', icon: 'public/static/img/futures/words.png' },
|
{ title: '留言反馈', icon: 'public/static/img/message/words.png' },
|
||||||
],
|
],
|
||||||
|
list: [],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -63,13 +71,38 @@ export default {
|
||||||
onReady(){
|
onReady(){
|
||||||
// 判断是否登录
|
// 判断是否登录
|
||||||
if (!uni.getStorageSync('token')) this.$refs.login.open('/pages_promotion/message/index');
|
if (!uni.getStorageSync('token')) this.$refs.login.open('/pages_promotion/message/index');
|
||||||
|
|
||||||
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
},
|
||||||
methods: {
|
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;
|
min-height: 100vh;
|
||||||
|
|
||||||
.top{
|
.top{
|
||||||
|
width: 100vw;
|
||||||
.top-image{}
|
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{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue