上传代码
This commit is contained in:
154
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.acss
vendored
Normal file
154
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.acss
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.container.data-v-2f1ef635 {
|
||||
background-image: linear-gradient(to bottom, #5e7dec, #d0f0ff);
|
||||
padding: 20px;
|
||||
height: 100vh;
|
||||
}
|
||||
.header.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.user-icon.data-v-2f1ef635 {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.user-info.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.name.data-v-2f1ef635 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.rule.data-v-2f1ef635 {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
.rating.data-v-2f1ef635 {
|
||||
color: #ff9800;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.settings.data-v-2f1ef635 {
|
||||
margin-left: auto;
|
||||
}
|
||||
.settings-icon.data-v-2f1ef635 {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.summary.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 20px;
|
||||
background-color: #1970fd;
|
||||
padding: 10px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.summary-item.data-v-2f1ef635 {
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.summary-label.data-v-2f1ef635 {
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.summary-detail.data-v-2f1ef635 {
|
||||
font-size: 12px;
|
||||
color: #92b1e9;
|
||||
padding: 5px;
|
||||
}
|
||||
.summary-value.data-v-2f1ef635 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
}
|
||||
.menu.data-v-2f1ef635 {
|
||||
background-color: #ffffff;
|
||||
border-radius: 8px;
|
||||
margin-top: 20px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.menu .menu-item.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
/* 关键属性 */
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
}
|
||||
.menu .menu-item.data-v-2f1ef635:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.menu .menu-item text.data-v-2f1ef635 {
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
flex-shrink: 0;
|
||||
/* 防止文字被压缩 */
|
||||
}
|
||||
.menu .menu-item .arrow-icon.data-v-2f1ef635 {
|
||||
color: #999;
|
||||
margin-left: 20px;
|
||||
/* 增加图标与文字的间距 */
|
||||
}
|
||||
.popup-content.data-v-2f1ef635 {
|
||||
background-color: #ffffff;
|
||||
padding: 30px 40px;
|
||||
border-radius: 16px;
|
||||
min-width: 240px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
|
||||
text-align: center;
|
||||
animation: fadeIn-2f1ef635 0.3s ease;
|
||||
border: 2px solid #5e7dec;
|
||||
/* 主色调蓝边框 */
|
||||
}
|
||||
.popup-text.data-v-2f1ef635 {
|
||||
font-size: 24px;
|
||||
color: #2a3f88;
|
||||
/* 深蓝文字 */
|
||||
font-weight: bold;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
/* 弹出动画 */
|
||||
@keyframes fadeIn-2f1ef635 {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.9);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
1
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.axml
vendored
Normal file
1
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.axml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<view class="container data-v-2f1ef635"><view class="header data-v-2f1ef635"><image src="{{a}}" class="user-icon data-v-2f1ef635" onTap="{{b}}"></image><view class="user-info data-v-2f1ef635"><text class="name data-v-2f1ef635">{{c}}</text><text class="rating data-v-2f1ef635">跑腿星级 ★★★★</text></view><view class="settings data-v-2f1ef635"><text class="rule data-v-2f1ef635">跑腿评分规则</text><uni-icons class="settings-icon data-v-2f1ef635" u-i="2f1ef635-0" onVI="__l" u-p="{{d||''}}"></uni-icons></view></view><view class="summary data-v-2f1ef635"><view class="summary-item data-v-2f1ef635"><text class="summary-value data-v-2f1ef635">{{e}}</text><text class="summary-label data-v-2f1ef635">总收入</text><text class="summary-detail data-v-2f1ef635">总金额></text></view><view class="summary-item data-v-2f1ef635" onTap="{{g}}"><text class="summary-value data-v-2f1ef635">{{f}}</text><text class="summary-label data-v-2f1ef635">今日完成</text><text class="summary-detail data-v-2f1ef635">完成订单数></text></view><view class="summary-item data-v-2f1ef635" onTap="{{i}}"><text class="summary-value data-v-2f1ef635">{{h}}</text><text class="summary-label data-v-2f1ef635">已结算</text><text class="summary-detail data-v-2f1ef635">用户已确认></text></view><view class="summary-item data-v-2f1ef635"><text class="summary-value data-v-2f1ef635">{{j}}</text><text class="summary-label data-v-2f1ef635">待结算</text><text class="summary-detail data-v-2f1ef635">等待用户确认></text></view></view><view class="menu data-v-2f1ef635"><view class="menu-item data-v-2f1ef635" onTap="{{l}}"><text class="data-v-2f1ef635">我的订单</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-1" onVI="__l" u-p="{{k||''}}"></uni-icons></view><view class="data-v-2f1ef635"><view class="menu-item data-v-2f1ef635" onTap="{{n}}"><text class="data-v-2f1ef635">我的钱包</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-2" onVI="__l" u-p="{{m||''}}"></uni-icons></view><uni-popup class="data-v-2f1ef635" u-s="{{['d']}}" ref="__r" u-r="{{o}}" u-i="2f1ef635-3" onVI="__l" u-p="{{p||''}}"><view class="popup-content data-v-2f1ef635"><text class="popup-text data-v-2f1ef635" style="">敬请期待</text></view></uni-popup></view><view class="menu-item data-v-2f1ef635" onTap="{{r}}"><text class="data-v-2f1ef635">身份认证</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-4" onVI="__l" u-p="{{q||''}}"></uni-icons></view><view class="menu-item data-v-2f1ef635" onTap="{{t}}"><text class="data-v-2f1ef635">申诉中心</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-5" onVI="__l" u-p="{{s||''}}"></uni-icons></view><view class="menu-item data-v-2f1ef635" onTap="{{w}}"><text class="data-v-2f1ef635">服务评价</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-6" onVI="__l" u-p="{{v||''}}"></uni-icons></view><view class="menu-item data-v-2f1ef635" onTap="{{y}}"><text class="data-v-2f1ef635">注销账户</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-7" onVI="__l" u-p="{{x||''}}"></uni-icons></view><view class="menu-item data-v-2f1ef635" onTap="{{B}}"><text class="data-v-2f1ef635">{{z}}</text><uni-icons class="arrow-icon data-v-2f1ef635" u-i="2f1ef635-8" onVI="__l" u-p="{{A||''}}"></uni-icons></view></view></view>
|
270
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.js
vendored
Normal file
270
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.js
vendored
Normal file
@ -0,0 +1,270 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const API_api = require("../../API/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
(_easycom_uni_icons2 + _easycom_uni_popup2)();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_icons + _easycom_uni_popup)();
|
||||
}
|
||||
const __default__ = {
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
label: "我的订单"
|
||||
},
|
||||
{
|
||||
label: "收入查询"
|
||||
},
|
||||
{
|
||||
label: "我的钱包"
|
||||
},
|
||||
{
|
||||
label: "身份认证"
|
||||
},
|
||||
{
|
||||
label: "申诉中心"
|
||||
},
|
||||
{
|
||||
label: "服务评价"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
||||
__name: "my",
|
||||
setup(__props) {
|
||||
common_vendor.index.getStorageSync("userInfo");
|
||||
const login = () => {
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/user/logout",
|
||||
method: "POST",
|
||||
success(res) {
|
||||
console.log(res);
|
||||
common_vendor.index.removeStorageSync("userInfo");
|
||||
common_vendor.index.removeStorageSync("currentUser");
|
||||
common_vendor.index.reLaunch({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const signOut = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "是否注销账号",
|
||||
content: "注销账号后将无法再次登录",
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log("点击了确定按钮");
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/errand/delete",
|
||||
method: "POST",
|
||||
success(res2) {
|
||||
console.log(res2);
|
||||
common_vendor.index.reLaunch({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log("点击了取消按钮");
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const changeUserMessage = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/changeUserMessage/changeUserMessage"
|
||||
});
|
||||
};
|
||||
const navigateToOrder = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/order/order"
|
||||
});
|
||||
};
|
||||
const popupRef = common_vendor.ref("敬请期待");
|
||||
const purse = () => {
|
||||
popupRef.value.open();
|
||||
setTimeout(() => {
|
||||
popupRef.value.close();
|
||||
}, 1e3);
|
||||
};
|
||||
const navigateToAuthentication = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/authentication/authentication"
|
||||
});
|
||||
};
|
||||
const navigateToAppeal = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/appeal/appeal"
|
||||
});
|
||||
};
|
||||
const navigateToServiceEvaluation = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/serviceEvaluation/serviceEvaluation"
|
||||
});
|
||||
};
|
||||
const user = common_vendor.ref({ username: "未登录" });
|
||||
const loginState = common_vendor.ref({ loginName: "去登录" });
|
||||
const getCurrentUser = () => {
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/errand/get/current",
|
||||
method: "POST",
|
||||
header: {
|
||||
"cookie": common_vendor.index.getStorageSync("cookie")
|
||||
},
|
||||
success(res) {
|
||||
console.log(res);
|
||||
if (res.data.code === 0) {
|
||||
common_vendor.index.setStorageSync("currentUser", res.data.data);
|
||||
user.value = res.data.data;
|
||||
loginState.value = { loginName: "退出登录" };
|
||||
} else {
|
||||
user.value = { username: "未登录" };
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.error("请求失败:", err);
|
||||
user.value = { username: "未登录" };
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
getCurrentUser(), getOrderNumber(), getOrderMoney();
|
||||
getwaitMoney();
|
||||
getallMoney();
|
||||
});
|
||||
const OrderNumber = common_vendor.ref(0);
|
||||
const getOrderNumber = () => {
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/errandIncome/count/number",
|
||||
method: "POST",
|
||||
success(res) {
|
||||
console.log(res.data.data);
|
||||
OrderNumber.value = res.data.data;
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const OrderMoney = common_vendor.ref(0);
|
||||
const getOrderMoney = () => {
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/errandIncome/count/money",
|
||||
method: "POST",
|
||||
success(res) {
|
||||
console.log(res);
|
||||
OrderMoney.value = res.data.data;
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const waitMoney = common_vendor.ref(0);
|
||||
const getwaitMoney = () => {
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/errandIncome/count/money/no",
|
||||
method: "POST",
|
||||
success(res) {
|
||||
console.log(res);
|
||||
waitMoney.value = res.data.data;
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const allMoney = common_vendor.ref(0);
|
||||
const getallMoney = () => {
|
||||
common_vendor.index.request({
|
||||
url: API_api.apiImageUrl + "/api/errandIncome/count/money/no",
|
||||
method: "POST",
|
||||
success(res) {
|
||||
console.log(res);
|
||||
allMoney.value = res.data.data;
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: user.value.errandAvatarUrl || "../../static/logo.png",
|
||||
b: common_vendor.o(changeUserMessage),
|
||||
c: common_vendor.t(user.value.errandName || "未登录"),
|
||||
d: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
e: common_vendor.t(allMoney.value),
|
||||
f: common_vendor.t(OrderNumber.value),
|
||||
g: common_vendor.o(navigateToOrder),
|
||||
h: common_vendor.t(OrderMoney.value),
|
||||
i: common_vendor.o(purse),
|
||||
j: common_vendor.t(waitMoney.value),
|
||||
k: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
l: common_vendor.o(navigateToOrder),
|
||||
m: common_vendor.p({
|
||||
type: "right",
|
||||
size: "25"
|
||||
}),
|
||||
n: common_vendor.o(purse),
|
||||
o: () => ({
|
||||
r: popupRef,
|
||||
k: "popupRef"
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
type: "center",
|
||||
["background-color"]: "#fff"
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
r: common_vendor.o(navigateToAuthentication),
|
||||
s: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
t: common_vendor.o(navigateToAppeal),
|
||||
v: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
w: common_vendor.o(navigateToServiceEvaluation),
|
||||
x: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
y: common_vendor.o(signOut),
|
||||
z: common_vendor.t(loginState.value.loginName),
|
||||
A: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16"
|
||||
}),
|
||||
B: common_vendor.o(login)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f1ef635"]]);
|
||||
my.createPage(MiniProgramPage);
|
8
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.json
vendored
Normal file
8
distribution/unpackage/dist/dev/mp-alipay/pages/my/my.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"defaultTitle": "我的",
|
||||
"titleBarColor": "#5e7dec",
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user