上传代码

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,81 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const API_api = require("../../API/api.js");
if (!Math) {
common_vendor.unref(orderDateils)();
}
const orderDateils = () => "../orderDetaiols.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "my",
setup(__props) {
common_vendor.onShow(() => {
getLoginUser();
});
const user = common_vendor.ref({
userAvatar: "",
userName: "",
message: ""
});
const loginButtonText = common_vendor.ref(user.value.message === "ok" ? "退出登录" : "去登录");
const getLoginUser = () => {
common_vendor.index.request({
url: API_api.apiImageUrl + "/api/user/current",
method: "GET",
header: {
"cookie": common_vendor.index.getStorageSync("cookie")
},
data: {},
success: (res) => {
console.log(res.data.message);
user.value.message = res.data.message;
if (user.value.message === "ok") {
user.value.userName = res.data.data.username;
user.value.userAvatar = res.data.data.avatarUrl;
loginButtonText.value = "退出登录";
} else {
loginButtonText.value = "去登录";
}
},
fail() {
console.log("出错啦");
}
});
};
const logout = () => {
common_vendor.index.request({
url: API_api.apiImageUrl + "/api/user/logout",
method: "POST",
success(res) {
console.log(res);
common_vendor.index.removeStorageSync("identify");
common_vendor.index.removeStorageSync("cookie");
common_vendor.index.removeStorageSync("userInfo");
common_vendor.index.removeStorageSync("notPay");
common_vendor.index.removeStorageSync("cartItems");
common_vendor.index.reLaunch({
url: "/pages/login/login"
});
common_vendor.index.showToast({
title: "退出成功",
duration: 2e3
});
},
fail(err) {
console.log(err);
}
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: user.value.message === "ok"
}, user.value.message === "ok" ? {
b: user.value.userAvatar,
c: common_vendor.t(user.value.userName)
} : {}, {
d: common_vendor.t(loginButtonText.value),
e: common_vendor.o(logout)
});
};
}
});
wx.createPage(_sfc_main);

View File

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "我的",
"usingComponents": {
"order-dateils": "../orderDetaiols"
}
}

View File

@ -0,0 +1 @@
<scroll-view class="viewport" scroll-y enable-back-to-top><view class="profile"><view wx:if="{{a}}" class="overview"><navigator hover-class="none"><image class="avatar" mode="aspectFill" src="{{b}}"></image></navigator><view class="meta"><view class="nickname">{{c}}</view></view></view><view wx:else class="overview"><navigator hover-class="none"><image class="avatar gray" mode="aspectFill" src="http://39.101.78.35/images/user_avatar/0/LbLTxpMf-image.png"></image></navigator><view class="meta"><navigator hover-class="none" class="nickname"> 未登录 </navigator></view></view></view></scroll-view><order-dateils u-i="6c08dc4e-0" bind:__l="__l"></order-dateils><view class="viewport"><view class="list"><navigator url="../allOrder/allOrder" hover-class="none" class="item arrow"> 我的评论 </navigator></view><view class="list"><navigator url="../test/test" hover-class="none" class="item arrow"> 支付按钮 </navigator></view><view class="list"><navigator url="../collect/collect" hover-class="none" class="item arrow"> 收藏店铺列表 </navigator></view><view class="list"><navigator url="../evaluateList/evaluateList" hover-class="none" class="item arrow"> 评分列表 </navigator></view><view class="list"><navigator url="../testten/testten" hover-class="none" class="item arrow"> 选择地址 </navigator></view><view class="list"><navigator hover-class="none" url="../run/run" class="item arrow" open-type="openSetting">获取code码 </navigator></view><view class="list" bindtap="{{e}}"><navigator hover-class="none" class="item arrow">{{d}}</navigator></view></view>

View File

@ -0,0 +1,147 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
page {
height: 100%;
overflow: hidden;
background-color: #4095e5;
}
.viewport {
padding: 20rpx;
}
.list {
padding: 0 20rpx;
background-color: #fff;
margin-bottom: 20rpx;
border-radius: 10rpx;
}
.list .item {
line-height: 90rpx;
padding-left: 10rpx;
font-size: 30rpx;
color: #333;
border-top: 1rpx solid #ddd;
position: relative;
text-align: left;
border-radius: 0;
background-color: #fff;
}
.list .item::after {
width: auto;
height: auto;
left: auto;
border: none;
}
.list .item:first-child {
border: none;
}
.list .item::after {
right: 5rpx;
}
.action {
text-align: center;
line-height: 90rpx;
margin-top: 40rpx;
font-size: 32rpx;
color: #333;
}
.action .button {
background-color: #fff;
margin-bottom: 20rpx;
border-radius: 10rpx;
}
.logout {
height: 100rpx;
line-height: 100rpx;
font-size: 35rpx;
text-align: center;
}
.profile {
padding-top: 30rpx;
position: relative;
}
.profile .overview {
display: flex;
height: 130rpx;
padding: 0 36rpx;
color: #fff;
}
.profile .avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background-color: #eee;
}
.profile .gray {
filter: grayscale(100%);
}
.profile .meta {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
line-height: 30rpx;
padding: 16rpx 0;
margin-left: 20rpx;
}
.profile .nickname {
max-width: 350rpx;
margin-bottom: 16rpx;
font-size: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #000;
}
.profile .SchoolCard {
width: 155px;
height: 23px;
}
.profile .extra {
display: float;
}
.profile .tips {
float: left;
padding: 3px 5px 3px 5px;
font-size: 22rpx;
color: #000;
background-color: #fff;
border: 1px solid #000;
border-radius: 14px;
}
.profile .copy {
float: right;
line-height: 23px;
color: #000;
font-size: 13px;
text-decoration: underline;
}
.profile .update {
padding: 3rpx 10rpx 1rpx;
color: rgba(255, 255, 255, 0.8);
border: 1rpx solid rgba(255, 255, 255, 0.8);
margin-right: 10rpx;
border-radius: 30rpx;
}