上传代码

This commit is contained in:
2025-08-18 14:20:34 +08:00
commit 527fd07910
2408 changed files with 427370 additions and 0 deletions

View File

@ -0,0 +1,91 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const API_api = require("../../API/api.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "testseven",
setup(__props) {
const currentIndex = common_vendor.ref(0);
const tabs = common_vendor.ref([
{ name: "全部" },
{ name: "收入" },
{ name: "退款" }
]);
const switchTab = (index) => {
currentIndex.value = index;
};
const orderList = common_vendor.ref([]);
const getOrder = () => {
common_vendor.index.request({
url: API_api.apiImageUrl + "/api/orders/my/page",
method: "POST",
data: {
current: 1,
endTime: "",
id: "",
pageSize: 100,
pickupMethod: 0,
sortField: "",
sortOrder: "",
startTime: "",
state: 0
},
success(res) {
console.log(res);
orderList.value = res.data.data.records;
console.log(orderList.value);
},
fail() {
console.log("出错啦");
}
});
};
common_vendor.onMounted(() => {
getOrder();
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(tabs.value, (tab, index, i0) => {
return {
a: common_vendor.t(tab.name),
b: index,
c: currentIndex.value === index ? 1 : "",
d: common_vendor.o(($event) => switchTab(index), index)
};
}),
b: currentIndex.value === 0
}, currentIndex.value === 0 ? {
c: common_vendor.f(orderList.value, (order, index, i0) => {
return {
a: common_vendor.t(order.totalPrice),
b: common_vendor.t(order.createTime),
c: common_vendor.t(order.id),
d: index
};
})
} : {}, {
d: currentIndex.value === 1
}, currentIndex.value === 1 ? {
e: common_vendor.f(orderList.value, (order, index, i0) => {
return {
a: common_vendor.t(order.totalPrice),
b: common_vendor.t(order.createTime),
c: common_vendor.t(order.id),
d: index
};
})
} : {}, {
f: currentIndex.value === 2
}, currentIndex.value === 2 ? {
g: common_vendor.f(orderList.value, (order, index, i0) => {
return {
a: common_vendor.t(order.totalPrice),
b: common_vendor.t(order.createTime.substr(0, 29).replace("T", " ")),
c: common_vendor.t(order.id),
d: index
};
})
} : {});
};
}
});
wx.createPage(_sfc_main);

View File

@ -0,0 +1,5 @@
{
"navigationBarTitleText": "测试7",
"enablePullDownRefresh": false,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<scroll-view scroll-y class="preview"><view class="tab-menu"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="content"><block wx:if="{{b}}"><view class="container"><view wx:for="{{c}}" wx:for-item="order" wx:key="d" class="orderItem"><view class="orderImg"><image src="https://tse4-mm.cn.bing.net/th/id/OIP-C.cDfrXgI1DKvU7OklwmBfewHaHa?rs=1&pid=ImgDetMain" class="img"></image></view><view class="orderMessage"><text class="money">+{{order.a}}元</text><view/><text class="time">下单时间:{{order.b}}</text><view/><text class="time">订单编号:{{order.c}}</text></view></view></view></block><block wx:if="{{d}}"><view class="container"><view wx:for="{{e}}" wx:for-item="order" wx:key="d" class="orderItem"><view class="orderImg"><image src="https://tse4-mm.cn.bing.net/th/id/OIP-C.cDfrXgI1DKvU7OklwmBfewHaHa?rs=1&pid=ImgDetMain" class="img"></image></view><view class="orderMessage"><text class="money">+{{order.a}}元</text><view/><text class="time">下单时间:{{order.b}}</text><view/><text class="time">订单编号:{{order.c}}</text></view></view></view></block><block wx:if="{{f}}"><view class="container"><view wx:for="{{g}}" wx:for-item="order" wx:key="d" class="orderItem"><view class="orderImg"><image src="https://tse4-mm.cn.bing.net/th/id/OIP-C.cDfrXgI1DKvU7OklwmBfewHaHa?rs=1&pid=ImgDetMain" class="img"></image></view><view class="orderMessage"><text class="money">+{{order.a}}元</text><view/><text class="time">下单时间:{{order.b}}</text><view/><text class="time">订单编号:{{order.c}}</text></view></view></view></block></view></scroll-view>

View File

@ -0,0 +1,116 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.tabs {
display: flex;
justify-content: space-around;
line-height: 60rpx;
margin: 0 10rpx;
background-color: #fff;
box-shadow: 0 4rpx 6rpx rgba(240, 240, 240, 0.6);
position: relative;
z-index: 9;
}
.tabs .item {
flex: 1;
text-align: center;
padding: 20rpx;
font-size: 28rpx;
color: #262626;
}
.tabs .cursor {
position: absolute;
left: 0;
bottom: 0;
width: 18%;
height: 6rpx;
padding: 0 50rpx;
background-color: #4095e5;
/* 过渡效果 */
transition: all 0.4s;
}
.preview image {
width: 100%;
}
page {
height: 100%;
overflow: hidden;
background-color: #f5f5f5;
}
.tab-menu {
display: flex;
justify-content: space-around;
padding: 10px 0;
background-color: #f5f5f5;
}
.tab-item {
padding: 10px;
cursor: pointer;
}
.tab-item.active {
color: #4095e5;
font-weight: bold;
}
.scroll-view {
width: 100%;
height: 100%;
flex: 1;
}
.orderItem {
width: 100%;
height: 80px;
margin-bottom: 10px;
background-color: #fff;
}
.orderImg {
display: inline-block;
width: 20%;
height: 100%;
margin: auto 0;
}
.img {
width: 100%;
height: 100%;
border-radius: 15px;
}
.orderMessage {
width: 75%;
height: 80%;
float: right;
display: inline-block;
margin-top: 10px;
}
.money {
font-size: 30rpx;
font-weight: 700;
}
.time {
font-size: 25rpx;
}
.container {
width: 90%;
height: 100vh;
margin: 0 auto;
}