我要买

This commit is contained in:
itgaojian163 2025-06-10 16:41:25 +08:00
parent 180b28dee1
commit fdad3ef3fa
11 changed files with 972 additions and 131 deletions

View File

@ -19,7 +19,8 @@ const apiPath = {
saveOrder: '/api/order/save/{goodsId}', //新增订单
confirmOrder: '/api/order/confirm-pay/{orderId}', //确定付款
cancelOrder: '/api/order/save-cancel/{orderId}', //取消订单
mineBuyOrder: '/api/order/listpage-buy', //我的订单 ?
mineBuyOrder: '/api/order/listpage-buy', //我购买的订单
mineSellOrder: '/api/order/listpage-sell', //我销售的
}
class Shop {
// 通用路径参数替换方法
@ -125,6 +126,10 @@ class Shop {
static doGetMineOrders(data) {
return this.requestHandler(apiPath.mineBuyOrder, "GET", data)
}
//我已售卖的
static doGetMineSellOrder(data) {
return this.requestHandler(apiPath.mineSellOrder, "GET", data)
}
}
export default Shop;

View File

@ -1,66 +1,122 @@
// pages/shop/betrayGoods/betrayGoods.js
// 已销售
import Shop from '../../../net/api/shop'
import {
sImgPrefix
}
from '../../../net/mainUrl'
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
pageData: {
page: 1,
rows: 10,
keywords: '',
startTime: '',
endTime: '',
orderStatus: ''
},
msgShow: false,
msgHint: '',
msgType: 'error',
loadingState: 'loading',
listRefreshTrig: false,
isLoadMore: false,
hasMore: true,
goodsList: []
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.setNavigationBarTitle({
title: '已销售',
})
wx.setNavigationBarColor({
frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000
backgroundColor: '#FFFFFF', // 传递的颜色值,仅支持十六进制颜色
animation: { // 可选项
duration: 500,
timingFunc: 'easeIn'
}
})
this.doRefreshList()
},
inputKeywords(e) {
this.setData({
'pageData.keywords': e.detail.value
})
},
doSearch() {
this.doRefreshList()
},
doRefreshList() {
console.log('正在刷新...')
const _self = this
_self.setData({
listRefreshTrig: true,
loadingState: 'loading',
hasMore: true,
isLoadMore: false,
'pageData.page': 1,
})
_self.doGetMineOrders(true)
},
doLoadMore() {
//判断是否正在加载中 与是否存在更多数据
const _self = this
if (_self.data.isLoadMore || !_self.data.hasMore) {
return
}
_self.setData({
isLoadMore: true,
'pageData.page': ++_self.data.pageData.page,
})
_self.doGetMineOrders(false)
},
//获取列表
doGetMineOrders(isRefresh) {
const _self = this
_self.setData({
goodsList: isRefresh ? [] : _self.data.goodsList,
loadingState: isRefresh ? 'loading' : ''
})
Shop.doGetMineSellOrder(_self.data.pageData)
.then(res => {
console.log(res)
var status = 'success'
status = res.rows && res.rows.length > 0 ? 'success' : 'empty'
const list = _self.addPrefixToPreviewImgs(res.rows)
_self.setData({
loadingState: isRefresh ? status : '',
goodsList: _self.data.goodsList.concat(list),
listRefreshTrig: false,
isLoadMore: false
})
_self.setData({
hasMore: _self.data.goodsList.length < res.total
})
}, err => {
_self.setData({
loadingState: 'error',
listRefreshTrig: false,
isLoadMore: false,
hasMore: true
})
})
},
//为数据中图片添加前缀
addPrefixToPreviewImgs(data) {
const prefix = sImgPrefix
return data.map(item => {
if (item.goodsDTO.goodsPhoto && item.goodsDTO.goodsPhoto != '') {
item.goodsDTO.preImg = prefix + item.goodsDTO.goodsPhoto
}
return item;
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,3 +1,7 @@
{
"usingComponents": {}
"usingComponents": {
"mp-loading": "weui-miniprogram/loading/loading",
"container-loading": "/components/container-loading/container-loading",
"mp-toptips": "weui-miniprogram/toptips/toptips"
}
}

View File

@ -1,2 +1,51 @@
<!--pages/shop/betrayGoods/betrayGoods.wxml-->
<text>pages/shop/betrayGoods/betrayGoods.wxml</text>
<view class="page-container">
<view class="search-container-fixed" style="background-color: white;">
<view class="search-box">
<icon class="mr-10" type="search" size="20"></icon>
<input type="text" bindconfirm="doSearch" class="search-input" bindinput="inputKeywords" value="{{pageData.keywords}}" placeholder="请输入软著名称" />
<view bind:tap="doSearch">搜索</view>
</view>
</view>
<view class="container-box">
<container-loading loadingState="{{loadingState}}" style="height: 83vh;" bindrefresh="doRefreshList">
<scroll-view scroll-y="{{true}}" style="height: 83vh;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
<view style="display: flex;flex-direction: column;">
<view class="list-container">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="list-item">
<view class="item-img-box">
<image src="{{item.goodsDTO.preImg}}" mode="scaleToFill" class="item-img"></image>
</view>
<view class="item-container">
<view class="item-goods-name-box">
<view class="item-goods-status {{tools.goodsOrderColor(item.orderStatus)}}">{{tools.goodsOrderStatus(item.orderStatus)}}</view>
<view class="item-goods-name">{{item.goodsDTO.goodsName}}</view>
</view>
<view class="item-price-box">
<view class="item-price-title">订单价格</view>
<rich-text class="item-price-price" nodes="{{tools.moneyTxt(12,item.payMoney)}}"></rich-text>
</view>
<view class="item-time-box">
<view class="item-time-item">
<view class="item-time-title">下单时间</view>
<view class="item-time-time">{{item.createTime}}</view>
</view>
<view class="item-time-item">
<view class="item-time-title">付款时间</view>
<view class="item-time-time">{{item.payTime==''? '未付款':item.payTime}}</view>
</view>
</view>
</view>
</view>
</block>
</view>
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
<view wx:if="{{!hasMore}}" class="no-more">
<view class="no-more-dot">AI喵著</view>
</view>
</view>
</scroll-view>
</container-loading>
</view>
</view>
<wxs src="../../../utils/comm.wxs" module="tools"></wxs>

View File

@ -1 +1,165 @@
/* pages/shop/betrayGoods/betrayGoods.wxss */
/* pages/shop/purchaseGoods/purchaseGoods.wxss */
.search-container-fixed {
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
box-sizing: border-box;
width: 100%;
z-index: 99;
padding: 30rpx 0rpx;
}
.search-box {
background-color: var(--bg-gray-color);
display: flex;
flex-direction: row;
align-items: center;
margin: 0rpx 30rpx 0rpx 30rpx;
padding: 15rpx 20rpx;
border-radius: 60rpx;
font-size: 28rpx;
}
.search-input {
flex: 1;
}
.list-container {
display: flex;
flex-direction: column;
}
.container-box {
background-color: var(--white-color);
margin: 120rpx -30rpx 0rpx -30rpx;
padding: 30rpx;
min-height: 83vh;
}
.list-item {
display: flex;
flex-direction: row;
}
.list-item:nth-of-type(n+1) {
margin: 15rpx 0rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid var(--bg-gray-input-color);
}
.list-item:last-child {
border-bottom: none;
}
.item-img-box {
background-color: var(--divider-color);
flex: 0.4;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10rpx;
border-radius: 8rpx;
}
.item-img {
width: 68%;
height: 180rpx;
}
.item-container {
display: flex;
flex-direction: column;
flex: 1;
padding: 0rpx 15rpx;
}
.item-goods-name-box {
display: flex;
flex-direction: row;
align-items: center;
}
.item-goods-status {
font-size: 22rpx;
text-align: center;
line-height: 32rpx;
height: 32rpx;
white-space: nowrap;
padding: 3rpx 10rpx;
border-radius: 5rpx;
margin-right: 15rpx;
}
.item-goods-name {
font-size: 28rpx;
color: var(--text-color);
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.item-price-box {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20rpx;
}
.item-price-title {
font-size: 28rpx;
color: var(--text-gray-hint-color);
}
.item-price-price {
margin-left: 20rpx;
color: var(--red-color);
font-weight: bold;
}
.item-time-box {
display: flex;
flex-direction: column;
margin-top: 15rpx;
}
.item-time-item {
display: flex;
flex-direction: row;
}
.item-time-title {
font-size: 24rpx;
color: var(--text-gray-hint-color)
}
.item-time-time {
font-size: 24rpx;
color: var(--text-gray-desc-color);
margin-left: 20rpx;
}
.col-gray {
background-color: var(--bg-gray-status-light-color);
color: var(--text-color);
}
.col-green {
background-color: var(--bg-green-status-light-color);
color: var(--text-color);
}
.col-primary {
background-color: var(--primary-color-light);
color: var(--text-color);
}
.col-red {
background-color: var(--bg-red-deep-color);
color: var(--white-color);
}

View File

@ -1,66 +1,210 @@
// pages/shop/buyGoods/buyGoods.js
//我要买
import Shop from '../../../net/api/shop'
import {
sImgPrefix,
} from '../../../net/mainUrl'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
pageData: {
page: 1,
rows: 12,
keywords: '',
priceRangeStart: '',
priceRangeEnd: '',
priceOrder: '',
goodsGetTime: '',
goodsDevelop: '',
goodsType: '', //软著类型
goodsFlag: '',
},
keywords: '',
priceStart: '',
priceEnd: '',
isLoadMore: false,
hasMore: true,
listLoading: 'loading',
listRefreshTrig: false,
goodsList: [],
imgPrefix: sImgPrefix,
localAssets: app.globalData.localAssets,
imgAssets: app.globalData.imgAssetsUrl,
typeList: [],
selType: '',
ownerList: [{
dataName: '从高到低',
dataId: 'DESC'
}, {
dataName: '从低到高',
dataId: 'ASC'
}],
selOwner: '',
isSticky: false,
msgType: 'info',
msgHint: '',
msgShow: false
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.setNavigationBarTitle({
title: '我要买',
})
wx.setNavigationBarColor({
frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000
backgroundColor: '#FFFFFF', // 传递的颜色值,仅支持十六进制颜色
animation: { // 可选项
duration: 500,
timingFunc: 'easeIn'
}
})
this.doGetDic()
this.doRefreshList()
},
inputKeywords(e) {
this.setData({
keywords: e.detail.value
})
},
doSearch() {
this.doRefreshList()
},
bindChooseType(e) {
wx.pageScrollTo({
scrollTop: 0
})
setTimeout(() => {
const item = e.currentTarget.dataset.item;
let newSelType = this.data.selType;
// 先转数组,处理空字符串情况
const typeArr = newSelType ? newSelType.split(',') : [];
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (typeArr.includes(item.dataId)) {
// 删除
const index = typeArr.indexOf(item.dataId);
typeArr.splice(index, 1);
} else {
// 添加
typeArr.push(item.dataId);
}
},
// 转回字符串,自动处理空数组(转成空字符串)
newSelType = typeArr.join(',');
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
this.setData({
selType: newSelType
});
console.log('选择分类:', this.data.selType);
this.doRefreshList();
}, 500);
},
bindChooseOwner(e) {
const item = e.currentTarget.dataset.item
this.setData({
selOwner: this.data.selOwner == item.dataId ? '' : item.dataId
})
this.doRefreshList()
},
doGetDic() {
wx.showLoading({
title: '加载中...',
})
const that = this
Shop.doGetGoodsDic('0b00884a-f7a2-425f-93e5-599fbaad4bde')
.then(res => {
wx.hideLoading()
that.setData({
typeList: res
})
})
.catch(err => {
wx.hideLoading()
})
},
//刷新
doRefreshList() {
const _self = this
this.setData({
goodsList: [],
isLoadMore: false,
hasMore: true,
listRefreshTrig: true,
'pageData.page': 1,
'pageData.keywords': _self.data.keywords,
'pageData.priceOrder': _self.data.selOwner,
'pageData.priceRangeStart': _self.data.priceStart,
'pageData.priceRangeEnd': _self.data.priceEnd,
'pageData.goodsType': _self.data.selType,
})
_self.getIndexList(true)
},
//加载更多
doLoadMore() {
const _self = this
if (_self.data.isLoadMore || !_self.data.hasMore) {
return
}
//判断是否有更多
_self.setData({
isLoadMore: true,
'pageData.page': ++_self.data.pageData.page
})
_self.getIndexList(false)
},
//获取列表
getIndexList(isRefresh) {
const _self = this
_self.setData({
listLoading: isRefresh ? 'loading' : ''
})
Shop.doGetIndexList(_self.data.pageData)
.then(res => {
console.log(res)
var status = 'success'
status = res.rows && res.rows.length > 0 ? 'success' : 'empty'
const list = _self.addPrefixToPreviewImgs(res.rows)
_self.setData({
listLoading: isRefresh ? status : '',
goodsList: _self.data.goodsList.concat(list),
listRefreshTrig: false,
isLoadMore: false,
})
_self.setData({
hasMore: _self.data.goodsList.length < res.total
})
})
.catch(err => {
console.log(err)
_self.setData({
listLoading: 'error',
listRefreshTrig: false,
isLoadMore: false,
hasMore: true
})
})
},
//为数据中图片添加前缀
addPrefixToPreviewImgs(data) {
const prefix = this.data.imgPrefix;
return data.map(item => {
if (item.goodsPhoto && item.goodsPhoto != '') {
item.preImg = prefix + item.goodsPhoto
}
return item;
});
},
//详情
doDetail(e) {
const id = e.currentTarget.dataset.value
wx.navigateTo({
url: '/pages/shop/goodsDetail/goodsDetail?id=' + id,
animation: 'fade'
})
}
})

View File

@ -1,3 +1,8 @@
{
"usingComponents": {}
"usingComponents": {
"custom-tabbar": "/components/tabbar/custom-tabbar",
"container-loading": "/components/container-loading/container-loading",
"mp-loading": "weui-miniprogram/loading/loading",
"mp-toptips": "weui-miniprogram/toptips/toptips"
}
}

View File

@ -1,2 +1,95 @@
<!--pages/shop/buyGoods/buyGoods.wxml-->
<text>pages/shop/buyGoods/buyGoods.wxml</text>
<view class="page-container">
<view class="page-title-box">
<view class="search-container-fixed">
<view class="search-box">
<icon class="mr-10" type="search" size="20"></icon>
<input type="text" bindconfirm="doSearch" class="search-input" bindinput="inputKeywords" value="{{keywords}}" placeholder="请输入软著名称" />
<view bind:tap="doSearch">搜索</view>
</view>
</view>
<view class="header">
<view class="condition-box">
<view class="condition-item">
<view class="condition-item-title">软著分类</view>
<scroll-view scroll-x style="width: 80vw;padding-left: 20rpx;">
<view class="list-tabs">
<block wx:for="{{typeList}}" wx:key="index">
<view class="{{tools.includes(selType,item.dataId)? 'tab-select':'tab-normal' }} item-margin" bind:tap="bindChooseType" data-item="{{item}}">
<text>{{item.dataName}}</text>
</view>
</block>
</view>
</scroll-view>
</view>
<view class="condition-item mt-20">
<view class="condition-item-title">价格排序</view>
<scroll-view scroll-x style="flex:1;">
<view class="list-tabs ml-20">
<block wx:for="{{ownerList}}" wx:key="index">
<view class="{{selOwner==item.dataId? 'tab-select':'tab-normal' }} item-margin" bind:tap="bindChooseOwner" data-item="{{item}}">
<text>{{item.dataName}}</text>
</view>
</block>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
<view class="container-box">
<container-loading loadingState="{{listLoading}}" style="height: 80vh;" bindrefresh="doRefreshList">
<scroll-view scroll-y="{{true}}" style="height: 80vh;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='80'>
<view style="display: flex;flex-direction: column;">
<view class="content-box">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="content-item" bind:tap="doDetail" data-value="{{item.goodsId}}">
<view class="content-item-img-box">
<image src="{{item.preImg}}" class="content-item-img" mode="aspectFill"></image>
</view>
<view class="content-item-txt">{{item.goodsName}}</view>
<view class="content-item-bottom">
<rich-text class="content-item-price" nodes="{{tools.moneyTxt(8,item.goodsOpenPrice)}}"></rich-text>
<view class="content-item-time">截止:{{item.goodsLastTime}}</view>
</view>
<view class="special-tag" wx:if="{{tools.includes(item.goodsFlag,'特价')}}">特价</view>
</view>
</block>
</view>
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
<view wx:if="{{!hasMore}}" class="no-more">
<view class="no-more-dot">AI喵著</view>
</view>
</view>
</scroll-view>
</container-loading>
</view>
<!-- <view class="container-box">
<view class="content-container" style="min-height: 600rpx;">
<view class="loading-box">
<container-loading loadingState="{{listLoading}}" style="height: 40vh;" bindrefresh="doRefreshList"></container-loading>
</view>
<view class="content-box">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="content-item" bind:tap="doDetail" data-value="{{item.goodsId}}">
<view class="content-item-img-box">
<image src="{{item.preImg}}" class="content-item-img" mode="aspectFill"></image>
</view>
<view class="content-item-txt">{{item.goodsName}}</view>
<view class="content-item-bottom">
<rich-text class="content-item-price" nodes="{{tools.moneyTxt(8,item.goodsOpenPrice)}}"></rich-text>
<view class="content-item-time">{{item.goodsLastTime}}</view>
</view>
<view class="special-tag" wx:if="{{tools.includes(item.goodsFlag,'特价')}}">特价</view>
</view>
</block>
</view>
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
<view wx:if="{{!hasMore && listLoading != 'empty'}}" class="no-more">
<view class="no-more-dot">AI喵著</view>
</view>
</view>
</view> -->
</view>
<mp-toptips delay="2000" msg="{{msgHint}}" type="{{msgType}}" show="{{msgShow}}"></mp-toptips>
<wxs src="../../../utils/comm.wxs" module="tools"></wxs>

View File

@ -1 +1,307 @@
/* pages/shop/buyGoods/buyGoods.wxss */
.page-title-box {
background-color: var(--white-color);
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
z-index: 3;
width: 100%;
padding: 10rpx 30rpx;
box-sizing: border-box;
box-shadow: 0 2rpx 4rpx var(--bg-gray-input-color);
}
.search-container-fixed {
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.search-box {
background-color: var(--bg-gray-color);
display: flex;
flex-direction: row;
align-items: center;
padding: 15rpx 20rpx;
border-radius: 60rpx;
font-size: 28rpx;
}
.search-input {
flex: 1;
}
.divider-20 {
background-color: var(--bg-gray-input-color);
min-height: 20rpx;
margin: 0rpx -30rpx;
}
.title-box {
position: relative;
margin-top: 60rpx;
padding: 30rpx;
}
.title-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 300rpx;
background-size: cover;
}
.title-container {
position: relative;
}
.title-hint-box {
display: flex;
flex-direction: row;
margin-top: 20rpx;
}
.title-hint-item {
display: flex;
flex-direction: row;
align-items: center;
}
.title-hint-item:nth-of-type(n+2) {
margin-left: 30rpx;
}
.title-hint-txt {
margin-left: 8rpx;
font-size: 24rpx;
color: var(--text-gray-desc-color);
}
.hook {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: linear-gradient(0deg, #FFB540 0%, #FF4800 100%);
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.hook::after {
content: "";
display: block;
width: 8rpx;
height: 15rpx;
border: solid white;
border-width: 0 2rpx 2rpx 0;
transform: rotate(45deg);
position: absolute;
top: 6rpx;
}
.title-func-box {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 30rpx;
}
.title-func-item {
display: flex;
flex-direction: column;
align-items: center;
}
/* .title-func-item:nth-of-type(n+2) {
margin-left: 40rpx;
} */
.func-img {
width: 120rpx;
height: 120rpx;
}
.func-txt {
font-size: 28rpx;
color: var(--text-color);
margin-top: 15rpx;
}
.container-box {
background-color: var(--white-color);
margin: 180rpx -30rpx 0rpx -30rpx;
padding: 30rpx;
min-height: 80vh;
}
.header {
transition: all 0.3s;
}
.header.sticky {
position: fixed;
background-color: var(--white-color);
box-sizing: border-box;
padding: 20rpx 30rpx 0rpx 30rpx;
top: 70rpx;
left: 0;
right: 0;
z-index: 100;
box-shadow: 0 2rpx 4rpx var(--bg-gray-input-color);
}
.condition-box {
display: flex;
flex-direction: column;
padding: 30rpx 0rpx 20rpx 0rpx;
}
.condition-item {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.condition-item-title {
white-space: nowrap;
font-size: 24rpx;
}
.list-tabs {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
.tab-select {
white-space: nowrap;
line-height: 17px;
border-radius: 5rpx;
background-color: var(--btn-primary-color);
color: var(--text-primary-deep-color);
font-size: 24rpx;
text-align: center;
padding: 5rpx 15rpx;
}
.tab-normal {
background-color: var(--bg-gray-input-color);
color: var(--text-gray-hint-color);
white-space: nowrap;
line-height: 17px;
border-radius: 5rpx;
font-size: 24rpx;
text-align: center;
padding: 5rpx 15rpx;
}
.item-margin {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.item-margin:nth-of-type(n+2) {
margin-left: 20rpx;
}
.content-container {
display: flex;
flex-direction: column;
margin-bottom: 180rpx;
position: relative;
}
.loading-box {
position: absolute;
top: 50%;
left: 50%;
z-index: 99;
transform: translate(-50%, -50%);
}
.content-box {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.content-item {
width: 48%;
margin-top: 20rpx;
position: relative;
}
.content-item:nth-of-type(even) {
margin-left: 20rpx;
}
.special-tag {
display: inline-block;
padding: 0rpx 20rpx;
background-color: var(--red-color);
color: #fff;
font-size: 22rpx;
border-bottom-right-radius: 30rpx;
border-top-right-radius: 30rpx;
position: absolute;
top: 0rpx;
left: 0rpx;
}
.special-tag::before {
content: '';
position: absolute;
left: 0rpx;
bottom: -15rpx;
border-width: 18rpx 18rpx 0 0rpx;
border-style: solid;
border-color: var(--red-color) transparent transparent transparent;
}
.content-item-img-box {
border-radius: 10rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 20rpx;
background-color: var(--bg-gray-input-color);
}
.content-item-img {
width: 200rpx;
height: 260rpx;
}
.content-item-txt {
font-size: 28rpx;
margin-top: 15rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
.content-item-bottom {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.content-item-time {
font-size: 24rpx;
color: var(--text-gray-hint-color);
}
.content-item-price {
color: red;
font-size: 28rpx;
}

View File

@ -32,7 +32,7 @@ Page({
*/
onLoad(options) {
wx.setNavigationBarTitle({
title: '已购买',
title: '已购买',
})
wx.setNavigationBarColor({
frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000

View File

@ -5,7 +5,22 @@ Page({
* 页面的初始数据
*/
data: {
pageData: {
page: 1,
rows: 10,
keywords: '',
startTime: '',
endTime: '',
orderStatus: ''
},
msgShow: false,
msgHint: '',
msgType: 'error',
loadingState: 'loading',
listRefreshTrig: false,
isLoadMore: false,
hasMore: true,
goodsList: []
},
/**