style:根据支付分免押规范进行页面样式变更(整体)

This commit is contained in:
2025-06-30 09:09:08 +08:00
parent 8ac1666e6b
commit 7be1e97b7c
77 changed files with 2141 additions and 1420 deletions
@@ -1 +1 @@
{"version":3,"file":"assets.js","sources":["static/logo.png","static/scan-icon.png","static/jl.png","static/complaint.png","static/hlep.png","static/images/location-map.svg","static/images/Electricity.svg","static/images/wxpayflag.png"],"sourcesContent":["export default \"__VITE_ASSET__fcf1191c__\"","export default \"__VITE_ASSET__b9d91c1a__\"","export default \"__VITE_ASSET__44ff4dfa__\"","export default \"__VITE_ASSET__d1c6bbb6__\"","export default \"__VITE_ASSET__f0ed8f64__\"","export default \"__VITE_ASSET__52e4836e__\"","export default \"__VITE_ASSET__f8b20b4b__\"","export default \"__VITE_ASSET__9081434a__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;;;;;;;;;"}
{"version":3,"file":"assets.js","sources":["static/logo.png","static/scan-icon.png","static/user-active.png","static/jl.png","static/complaint.png","static/hlep.png","static/images/wxpayflag.png","static/images/location-map.svg","static/images/Electricity.svg"],"sourcesContent":["export default \"__VITE_ASSET__fcf1191c__\"","export default \"__VITE_ASSET__b9d91c1a__\"","export default \"__VITE_ASSET__e217d500__\"","export default \"__VITE_ASSET__44ff4dfa__\"","export default \"__VITE_ASSET__d1c6bbb6__\"","export default \"__VITE_ASSET__f0ed8f64__\"","export default \"__VITE_ASSET__9081434a__\"","export default \"__VITE_ASSET__52e4836e__\"","export default \"__VITE_ASSET__f8b20b4b__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;;;;;;;;;;"}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"url.js","sources":["config/url.js"],"sourcesContent":["export const URL = \"https://my.gxfs123.com/api\"\r\n// export const URL = \"http://192.168.10.30:8080\"\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" "],"names":[],"mappings":";AAAY,MAAC,MAAM;AAGP,MAAC,QAAQ;;;"}
{"version":3,"file":"url.js","sources":["config/url.js"],"sourcesContent":["export const URL = \"https://my.gxfs123.com/api\"\r\n// export const URL = \"http://192.168.10.33:8080\"\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" "],"names":[],"mappings":";AAAY,MAAC,MAAM;AAGP,MAAC,QAAQ;;;"}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"file":"orderStatus.js","sources":["constants/orderStatus.js"],"sourcesContent":["/**\r\n * 订单状态映射\r\n */\r\nexport const OrderStatusMap = {\r\n waiting_for_payment: {\r\n text: '待支付',\r\n class: 'status-waiting'\r\n },\r\n payment_in_progress: {\r\n text: '支付中',\r\n class: 'status-progress'\r\n },\r\n payment_successful: {\r\n text: '支付成功',\r\n class: 'status-success'\r\n },\r\n in_used: {\r\n text: '使用中',\r\n class: 'status-using'\r\n },\r\n payment_failed: {\r\n text: '支付失败',\r\n class: 'status-failed'\r\n },\r\n order_cancelled: {\r\n text: '已取消',\r\n class: 'status-cancelled'\r\n },\r\n used_done: {\r\n text: '已完成',\r\n class: 'status-finished'\r\n }\r\n}\r\n\r\n/**\r\n * 订单状态分类\r\n */\r\nexport const OrderStatusTabs = [\r\n {\r\n text: '全部',\r\n status: []\r\n },\r\n {\r\n text: '待支付',\r\n status: ['waiting_for_payment', 'payment_in_progress']\r\n },\r\n {\r\n text: '使用中',\r\n status: ['payment_successful', 'in_used']\r\n },\r\n {\r\n text: '已完成',\r\n status: ['used_done', 'payment_failed', 'order_cancelled']\r\n }\r\n]"],"names":[],"mappings":";AAGY,MAAC,iBAAiB;AAAA,EAC5B,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,oBAAoB;AAAA,IAClB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,SAAS;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,WAAW;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AACH;AAKY,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAE;AAAA,EACX;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,uBAAuB,qBAAqB;AAAA,EACtD;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,sBAAsB,SAAS;AAAA,EACzC;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,aAAa,kBAAkB,iBAAiB;AAAA,EAC1D;AACH;;;"}
{"version":3,"file":"orderStatus.js","sources":["constants/orderStatus.js"],"sourcesContent":["/**\r\n * 订单状态映射\r\n */\r\nexport const OrderStatusMap = {\r\n waiting_for_payment: {\r\n text: '待支付',\r\n class: 'status-waiting'\r\n },\r\n payment_in_progress: {\r\n text: '支付中',\r\n class: 'status-progress'\r\n },\r\n payment_successful: {\r\n text: '支付成功',\r\n class: 'status-success'\r\n },\r\n in_used: {\r\n text: '使用中',\r\n class: 'status-using'\r\n },\r\n payment_failed: {\r\n text: '支付失败',\r\n class: 'status-failed'\r\n },\r\n order_cancelled: {\r\n text: '已取消',\r\n class: 'status-cancelled'\r\n },\r\n used_done: {\r\n text: '已完成',\r\n class: 'status-finished'\r\n },\r\n fail: {\r\n text: '已取消',\r\n class: 'status-cancelled'\r\n }\r\n}\r\n\r\n/**\r\n * 订单状态分类\r\n */\r\nexport const OrderStatusTabs = [\r\n {\r\n text: '全部',\r\n status: []\r\n },\r\n {\r\n text: '待支付',\r\n status: ['waiting_for_payment', 'payment_in_progress']\r\n },\r\n {\r\n text: '使用中',\r\n status: ['payment_successful', 'in_used']\r\n },\r\n {\r\n text: '已完成',\r\n status: ['used_done', 'payment_failed', 'order_cancelled']\r\n }\r\n]"],"names":[],"mappings":";AAGY,MAAC,iBAAiB;AAAA,EAC5B,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,oBAAoB;AAAA,IAClB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,SAAS;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,WAAW;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AACH;AAKY,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAE;AAAA,EACX;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,uBAAuB,qBAAqB;AAAA,EACtD;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,sBAAsB,SAAS;AAAA,EACzC;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,aAAa,kBAAkB,iBAAiB;AAAA,EAC1D;AACH;;;"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+12 -10
View File
@@ -1,18 +1,20 @@
"use strict";
const _imports_0$2 = "/static/logo.png";
const _imports_0$3 = "/static/logo.png";
const _imports_1$2 = "/static/scan-icon.png";
const _imports_0$1 = "/static/jl.png";
const _imports_1$1 = "/static/complaint.png";
const _imports_2$1 = "/static/hlep.png";
const _imports_0$2 = "/static/user-active.png";
const _imports_1$1 = "/static/jl.png";
const _imports_2 = "/static/complaint.png";
const _imports_3 = "/static/hlep.png";
const _imports_0$1 = "/static/images/wxpayflag.png";
const _imports_0 = "/static/images/location-map.svg";
const _imports_1 = "/static/images/Electricity.svg";
const _imports_2 = "/static/images/wxpayflag.png";
exports._imports_0 = _imports_0$2;
exports._imports_0$1 = _imports_0$1;
exports._imports_0$2 = _imports_0;
exports._imports_0 = _imports_0$3;
exports._imports_0$1 = _imports_0$2;
exports._imports_0$2 = _imports_0$1;
exports._imports_0$3 = _imports_0;
exports._imports_1 = _imports_1$2;
exports._imports_1$1 = _imports_1$1;
exports._imports_1$2 = _imports_1;
exports._imports_2 = _imports_2$1;
exports._imports_2$1 = _imports_2;
exports._imports_2 = _imports_2;
exports._imports_3 = _imports_3;
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map
+82 -22
View File
@@ -1303,6 +1303,9 @@ function isReadonly(value) {
function isShallow(value) {
return !!(value && value["__v_isShallow"]);
}
function isProxy(value) {
return isReactive(value) || isReadonly(value);
}
function toRaw(observed) {
const raw = observed && observed["__v_raw"];
return raw ? toRaw(raw) : observed;
@@ -2094,6 +2097,47 @@ function setCurrentRenderingInstance(instance) {
instance && instance.type.__scopeId || null;
return prev;
}
const COMPONENTS = "components";
function resolveComponent(name, maybeSelfReference) {
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
}
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
const instance = currentRenderingInstance || currentInstance;
if (instance) {
const Component2 = instance.type;
if (type === COMPONENTS) {
const selfName = getComponentName(
Component2,
false
);
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
return Component2;
}
}
const res = (
// local registration
// check instance[type] first which is resolved for options API
resolve(instance[type] || Component2[type], name) || // global registration
resolve(instance.appContext[type], name)
);
if (!res && maybeSelfReference) {
return Component2;
}
if (warnMissing && !res) {
const extra = type === COMPONENTS ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
}
return res;
} else {
warn$1(
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
);
}
}
function resolve(registry, name) {
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
}
const INITIAL_WATCHER_VALUE = {};
function watch(source, cb, options) {
if (!isFunction(cb)) {
@@ -3704,6 +3748,12 @@ const Static = Symbol.for("v-stc");
function isVNode(value) {
return value ? value.__v_isVNode === true : false;
}
const InternalObjectKey = `__vInternal`;
function guardReactiveProps(props) {
if (!props)
return null;
return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
}
const emptyAppContext = createAppContext();
let uid = 0;
function createComponentInstance(vnode, parent, suspense) {
@@ -4942,6 +4992,11 @@ function initApp(app) {
}
}
const propsCaches = /* @__PURE__ */ Object.create(null);
function renderProps(props) {
const { uid: uid2, __counter } = getCurrentInstance();
const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props)) - 1;
return uid2 + "," + propsId + "," + __counter;
}
function pruneComponentPropsCache(uid2) {
delete propsCaches[uid2];
}
@@ -5113,6 +5168,7 @@ const f = (source, renderItem) => vFor(source, renderItem);
const e = (target, ...sources) => extend(target, ...sources);
const n = (value) => normalizeClass(value);
const t = (val) => toDisplayString(val);
const p = (props) => renderProps(props);
function createApp$1(rootComponent, rootProps = null) {
rootComponent && (rootComponent.mpType = "app");
return createVueApp(rootComponent, rootProps).use(plugin);
@@ -5434,8 +5490,8 @@ function promisify$1(name, fn) {
if (hasCallback(args)) {
return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
}
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
invokeApi(name, fn, extend(args, { success: resolve, fail: reject }), rest);
return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
})));
};
}
@@ -5756,7 +5812,7 @@ function invokeGetPushCidCallbacks(cid2, errMsg) {
getPushCidCallbacks.length = 0;
}
const API_GET_PUSH_CLIENT_ID = "getPushClientId";
const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, reject }) => {
const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
Promise.resolve().then(() => {
if (typeof enabled === "undefined") {
enabled = false;
@@ -5765,7 +5821,7 @@ const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, re
}
getPushCidCallbacks.push((cid2, errMsg) => {
if (cid2) {
resolve({ cid: cid2 });
resolve2({ cid: cid2 });
} else {
reject(errMsg);
}
@@ -5834,9 +5890,9 @@ function promisify(name, api) {
if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
return wrapperReturnValue(name, invokeApi(name, api, options, rest));
}
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
invokeApi(name, api, extend({}, options, {
success: resolve,
success: resolve2,
fail: reject
}), rest);
})));
@@ -6034,7 +6090,7 @@ function populateParameters(fromRes, toRes) {
let _SDKVersion = SDKVersion;
const hostLanguage = (language || "").replace(/_/g, "-");
const parameters = {
appId: "__UNI__4630191",
appId: "__UNI__A871B6B",
appName: "fs",
appVersion: "1.0.0",
appVersionCode: "100",
@@ -6183,7 +6239,7 @@ const getAppBaseInfo = {
hostName: _hostName,
hostSDKVersion: SDKVersion,
hostTheme: theme,
appId: "__UNI__4630191",
appId: "__UNI__A871B6B",
appName: "fs",
appVersion: "1.0.0",
appVersionCode: "100",
@@ -6443,13 +6499,13 @@ function initRuntimeSocket(hosts, port, id) {
}
const SOCKET_TIMEOUT = 500;
function tryConnectSocket(host2, port, id) {
return new Promise((resolve, reject) => {
return new Promise((resolve2, reject) => {
const socket = index.connectSocket({
url: `ws://${host2}:${port}/${id}`,
multiple: true,
// 支付宝小程序 是否开启多实例
fail() {
resolve(null);
resolve2(null);
}
});
const timer = setTimeout(() => {
@@ -6457,19 +6513,19 @@ function tryConnectSocket(host2, port, id) {
code: 1006,
reason: "connect timeout"
});
resolve(null);
resolve2(null);
}, SOCKET_TIMEOUT);
socket.onOpen((e2) => {
clearTimeout(timer);
resolve(socket);
resolve2(socket);
});
socket.onClose((e2) => {
clearTimeout(timer);
resolve(null);
resolve2(null);
});
socket.onError((e2) => {
clearTimeout(timer);
resolve(null);
resolve2(null);
});
});
}
@@ -6934,7 +6990,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() {
const hosts = "192.168.10.21,127.0.0.1";
const port = "8090";
const id = "mp-weixin_ZQiCij";
const id = "mp-weixin_hkcpyE";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
@@ -8098,7 +8154,7 @@ class Request {
options.params = options.params || {};
options.header = Object.assign({}, this.config.header, options.header);
options.method = options.method || this.config.method;
return new Promise((resolve, reject) => {
return new Promise((resolve2, reject) => {
options.complete = (response) => {
index.hideLoading();
clearTimeout(this.config.timer);
@@ -8107,24 +8163,24 @@ class Request {
if (this.interceptor.response && typeof this.interceptor.response === "function") {
let resInterceptors = this.interceptor.response(response);
if (resInterceptors !== false) {
resolve(resInterceptors);
resolve2(resInterceptors);
} else {
reject(response);
}
} else {
resolve(response);
resolve2(response);
}
} else {
if (response.statusCode == 200) {
if (this.interceptor.response && typeof this.interceptor.response === "function") {
let resInterceptors = this.interceptor.response(response.data);
if (resInterceptors !== false) {
resolve(resInterceptors);
resolve2(resInterceptors);
} else {
reject(response.data);
}
} else {
resolve(response.data);
resolve2(response.data);
}
} else {
reject(response);
@@ -8303,8 +8359,8 @@ class Router {
mergeConfig.params = params;
mergeConfig = index.$u.deepMerge(this.config, mergeConfig);
if (typeof index.$u.routeIntercept === "function") {
const isNext = await new Promise((resolve, reject) => {
index.$u.routeIntercept(mergeConfig, resolve);
const isNext = await new Promise((resolve2, reject) => {
index.$u.routeIntercept(mergeConfig, resolve2);
});
isNext && this.openPage(mergeConfig);
} else {
@@ -8824,7 +8880,11 @@ exports.index = index;
exports.n = n;
exports.o = o;
exports.onLoad = onLoad;
exports.onMounted = onMounted;
exports.p = p;
exports.reactive = reactive;
exports.ref = ref;
exports.resolveComponent = resolveComponent;
exports.t = t;
exports.wx$1 = wx$1;
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
+9
View File
@@ -78,6 +78,14 @@ const getOrderByOrderNoScore = (orderNo) => {
hideLoading: true
});
};
const getOrderByOrderNoScorePayStatus = (orderNo) => {
common_vendor.index.__f__("log", "at config/user.js:166", "通过订单号获取支付分订单状态", orderNo);
return config_http.request({
url: `/app/wx-payment/score/status/${orderNo}`,
method: "get",
hideLoading: true
});
};
const updateUserBalance = (orderId) => {
return config_http.request({
url: `/app/user/updateBalance/${orderId}`,
@@ -90,6 +98,7 @@ exports.confirmPaymentAndRent = confirmPaymentAndRent;
exports.getDeviceInfo = getDeviceInfo;
exports.getMyIndexInfo = getMyIndexInfo;
exports.getOrderByOrderNoScore = getOrderByOrderNoScore;
exports.getOrderByOrderNoScorePayStatus = getOrderByOrderNoScorePayStatus;
exports.getOrderList = getOrderList;
exports.login = login;
exports.queryById = queryById;
-52
View File
@@ -1,52 +0,0 @@
"use strict";
const OrderStatusMap = {
waiting_for_payment: {
text: "待支付",
class: "status-waiting"
},
payment_in_progress: {
text: "支付中",
class: "status-progress"
},
payment_successful: {
text: "支付成功",
class: "status-success"
},
in_used: {
text: "使用中",
class: "status-using"
},
payment_failed: {
text: "支付失败",
class: "status-failed"
},
order_cancelled: {
text: "已取消",
class: "status-cancelled"
},
used_done: {
text: "已完成",
class: "status-finished"
}
};
const OrderStatusTabs = [
{
text: "全部",
status: []
},
{
text: "待支付",
status: ["waiting_for_payment", "payment_in_progress"]
},
{
text: "使用中",
status: ["payment_successful", "in_used"]
},
{
text: "已完成",
status: ["used_done", "payment_failed", "order_cancelled"]
}
];
exports.OrderStatusMap = OrderStatusMap;
exports.OrderStatusTabs = OrderStatusTabs;
//# sourceMappingURL=../../.sourcemap/mp-weixin/constants/orderStatus.js.map
+33 -5
View File
@@ -2,6 +2,7 @@
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const config_user = require("../../config/user.js");
const util_index = require("../../util/index.js");
const _sfc_main = {
__name: "detail",
setup(__props) {
@@ -19,7 +20,7 @@ const _sfc_main = {
common_vendor.onLoad((options) => {
deviceId.value = options.deviceNo;
checkOrderStatus();
common_vendor.index.__f__("log", "at pages/device/detail.vue:161", options.deviceNo);
common_vendor.index.__f__("log", "at pages/device/detail.vue:168", options.deviceNo);
fetchDeviceInfo();
});
const fetchDeviceInfo = async () => {
@@ -110,9 +111,36 @@ const _sfc_main = {
}
const order = rentResult.data;
const res = await config_user.getOrderByOrderNoScore(order.orderNo);
common_vendor.index.__f__("log", "at pages/device/detail.vue:282", res);
common_vendor.index.__f__("log", "at pages/device/detail.vue:291", res);
common_vendor.index.hideLoading();
common_vendor.index.__f__("log", "at pages/device/detail.vue:291", order);
if (res && res.code === 200) {
try {
const payResult = await util_index.initiateWeChatScorePayment(res);
if (payResult.errCode == "0") {
const res2 = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
common_vendor.index.showToast({
title: "设备租借成功",
icon: "success"
});
setTimeout(() => {
common_vendor.index.redirectTo({
url: "/pages/order/index"
});
}, 1500);
}
} catch (payError) {
common_vendor.index.showToast({
title: "支付分调用失败,请重试",
icon: "none"
});
}
} else {
common_vendor.index.showToast({
title: (res == null ? void 0 : res.msg) || "获取支付参数失败",
icon: "none"
});
}
common_vendor.index.__f__("log", "at pages/device/detail.vue:330", order);
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
@@ -126,7 +154,7 @@ const _sfc_main = {
a: common_vendor.t(deviceStatus.text),
b: common_vendor.n(deviceStatus.class),
c: common_vendor.t(deviceId.value),
d: common_assets._imports_0$2,
d: common_assets._imports_0$3,
e: common_vendor.t(deviceLocation.value),
f: common_assets._imports_1$2,
g: batteryLevel.value < 20 ? 1 : "",
@@ -136,7 +164,7 @@ const _sfc_main = {
j: phoneNumber.value,
k: common_vendor.o(($event) => phoneNumber.value = $event.detail.value)
} : {}, {
l: common_assets._imports_2$1,
l: common_assets._imports_0$2,
m: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押金租借"),
n: hasActiveOrder.value ? 1 : "",
o: common_vendor.o(handleRent)
+90 -46
View File
@@ -1,76 +1,120 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const util_index = require("../../util/index.js");
const common_assets = require("../../common/assets.js");
const util_index = require("../../util/index.js");
if (!Array) {
const _component_uni_icons = common_vendor.resolveComponent("uni-icons");
_component_uni_icons();
}
const _sfc_main = {
data() {
return {
userInfo: {},
deposit: "0.00",
tempAvatar: "",
tempNickname: "",
show: false
};
},
onShow() {
this.getInfo();
},
methods: {
async getInfo() {
__name: "index",
setup(__props) {
const userInfo = common_vendor.ref({});
const deposit = common_vendor.ref("0.00");
const openId = common_vendor.ref("");
const authPopup = common_vendor.ref(null);
const isPopupVisible = common_vendor.ref(false);
common_vendor.onMounted(() => {
getInfo();
});
const getInfo = async () => {
try {
const token = common_vendor.index.getStorageSync("token");
if (!token) {
await util_index.wxLogin();
this.getInfo();
return;
}
const res = await util_index.getUserInfo();
common_vendor.index.__f__("log", "at pages/my/index.vue:105", res);
if (res.code === 200) {
const userInfo = {
common_vendor.index.__f__("log", "at pages/my/index.vue:146", "User info response:", res);
if (res.code == 200) {
if (res.data.openId) {
openId.value = res.data.openId;
common_vendor.index.setStorageSync("openId", res.data.openId);
}
userInfo.value = {
nickName: res.data.nickname,
phone: res.data.phone,
avatar: res.data.iconUrl,
isAdmin: res.data.isAdmin
};
this.userInfo = userInfo;
common_vendor.index.setStorageSync("userInfo", userInfo);
this.deposit = res.data.balanceAmount || "0.00";
common_vendor.index.setStorageSync("userInfo", userInfo.value);
deposit.value = res.data.balanceAmount || "0.00";
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/my/index.vue:120", "获取用户信息失败", error);
common_vendor.index.__f__("error", "at pages/my/index.vue:167", "获取用户信息失败:", error);
common_vendor.index.showToast({
title: "获取用户信息失败",
icon: "none"
});
}
},
navigateTo(url) {
};
const navigateTo = (url) => {
common_vendor.index.navigateTo({
url
});
}
};
const handleWithdraw = () => {
navigateTo("/pages/deposit/index");
};
const handleUserProfileClick = () => {
if (!userInfo.value) {
openAuthPopup();
}
};
const openAuthPopup = () => {
if (authPopup.value) {
authPopup.value.open();
isPopupVisible.value = true;
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: userInfo.value.avatar
}, userInfo.value.avatar ? {
b: userInfo.value.avatar
} : {
c: common_assets._imports_0$1
}, {
d: userInfo.value.isAdmin
}, userInfo.value.isAdmin ? {} : {}, {
e: userInfo.value
}, userInfo.value ? {
f: common_vendor.t(userInfo.value.nickName),
g: common_vendor.t(userInfo.value.phone || "未绑定手机号")
} : {}, {
h: common_vendor.p({
type: "right",
size: "16",
color: "#999"
}),
i: common_vendor.o(handleUserProfileClick),
j: common_vendor.t(deposit.value),
k: common_vendor.o(handleWithdraw),
l: common_assets._imports_1$1,
m: common_vendor.p({
type: "right",
size: "16",
color: "#999"
}),
n: common_vendor.o(($event) => navigateTo("/pages/order/index")),
o: common_assets._imports_2,
p: common_vendor.p({
type: "right",
size: "16",
color: "#999"
}),
q: common_vendor.o(($event) => navigateTo("/pages/feedback/index")),
r: common_assets._imports_3,
s: common_vendor.p({
type: "right",
size: "16",
color: "#999"
}),
t: common_vendor.o(($event) => navigateTo("/pages/help/index"))
});
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.userInfo.avatar || "/static/user.png",
b: $data.userInfo
}, $data.userInfo ? {
c: common_vendor.t($data.userInfo.nickName),
d: common_vendor.t($data.userInfo.phone || "")
} : {}, {
e: common_vendor.o((...args) => _ctx.showPopup && _ctx.showPopup(...args)),
f: common_vendor.t($data.deposit),
g: common_vendor.o(($event) => $options.navigateTo("/pages/deposit/index")),
h: common_assets._imports_0$1,
i: common_vendor.o(($event) => $options.navigateTo("/pages/order/index")),
j: common_assets._imports_1$1,
k: common_vendor.o(($event) => $options.navigateTo("/pages/feedback/index")),
l: common_assets._imports_2,
m: common_vendor.o(($event) => $options.navigateTo("/pages/help/index"))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f97bc692"]]);
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f97bc692"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/index.js.map
+1 -1
View File
@@ -1 +1 @@
<view class="my-container data-v-f97bc692"><view class="user-info data-v-f97bc692"><view class="floating-dots data-v-f97bc692"></view><view class="user-info-content data-v-f97bc692" bindtap="{{e}}"><view class="avatar-wrap data-v-f97bc692"><image class="avatar data-v-f97bc692" src="{{a}}" mode="aspectFill"/></view><view wx:if="{{b}}" class="info-content data-v-f97bc692"><view class="text-group data-v-f97bc692"><text class="nickname data-v-f97bc692">{{c}}</text><text class="phone data-v-f97bc692">{{d}}</text></view></view><view wx:else class="info-content not-login data-v-f97bc692"><text class="login-text data-v-f97bc692">点击登录</text><text class="login-desc data-v-f97bc692">登录后享受更多服务</text></view></view><view class="wave-decoration data-v-f97bc692"></view></view><view class="balance-card data-v-f97bc692"><view class="balance-content data-v-f97bc692"><text class="label data-v-f97bc692">押金余额</text><text class="amount data-v-f97bc692">¥{{f}}</text></view><view class="withdraw-btn data-v-f97bc692" bindtap="{{g}}"> 提现 <view class="arrow data-v-f97bc692"></view></view></view><view class="function-list data-v-f97bc692"><view class="function-item data-v-f97bc692" bindtap="{{i}}"><view class="item-left data-v-f97bc692"><view class="icon-wrap order data-v-f97bc692"><image src="{{h}}" mode="aspectFit" class="icon-image data-v-f97bc692"/></view><text class="title data-v-f97bc692">租借记录</text></view><view class="arrow data-v-f97bc692"></view></view><view class="function-item data-v-f97bc692" bindtap="{{k}}"><view class="item-left data-v-f97bc692"><view class="icon-wrap feedback data-v-f97bc692"><image src="{{j}}" mode="aspectFit" class="icon-image data-v-f97bc692"/></view><text class="title data-v-f97bc692">投诉建议</text></view><view class="arrow data-v-f97bc692"></view></view><view class="function-item data-v-f97bc692" bindtap="{{m}}"><view class="item-left data-v-f97bc692"><view class="icon-wrap help data-v-f97bc692"><image src="{{l}}" mode="aspectFit" class="icon-image data-v-f97bc692"/></view><text class="title data-v-f97bc692">帮助中心</text></view><view class="arrow data-v-f97bc692"></view></view></view></view>
<view class="profile-container data-v-f97bc692"><view class="header-section data-v-f97bc692"><view class="user-profile data-v-f97bc692" bindtap="{{i}}"><view class="avatar-container data-v-f97bc692"><image wx:if="{{a}}" class="avatar data-v-f97bc692" src="{{b}}" mode="aspectFill"></image><image wx:else class="avatar data-v-f97bc692" src="{{c}}" mode="aspectFill"></image><view wx:if="{{d}}" class="avatar-badge data-v-f97bc692"></view></view><view wx:if="{{e}}" class="user-details data-v-f97bc692"><view class="username data-v-f97bc692">{{f}}</view><view class="user-id data-v-f97bc692">{{g}}</view></view><view wx:else class="user-details data-v-f97bc692"><view class="username data-v-f97bc692">点击登录</view><view class="user-id data-v-f97bc692">授权登录后享受更多服务</view></view><view class="edit-profile data-v-f97bc692"><uni-icons wx:if="{{h}}" class="data-v-f97bc692" u-i="f97bc692-0" bind:__l="__l" u-p="{{h}}"></uni-icons></view></view></view><view class="balance-card data-v-f97bc692"><view class="balance-info data-v-f97bc692"><view class="balance-label data-v-f97bc692">押金余额</view><view class="balance-amount data-v-f97bc692">¥{{j}}</view></view><view class="action-button data-v-f97bc692" bindtap="{{k}}"><text class="data-v-f97bc692">提现</text></view></view><view class="function-list data-v-f97bc692"><view class="function-item data-v-f97bc692" bindtap="{{n}}"><view class="item-left data-v-f97bc692"><view class="item-icon data-v-f97bc692"><image class="data-v-f97bc692" src="{{l}}" mode="aspectFit"></image></view><text class="item-title data-v-f97bc692">订单中心</text></view><view class="item-right data-v-f97bc692"><uni-icons wx:if="{{m}}" class="data-v-f97bc692" u-i="f97bc692-1" bind:__l="__l" u-p="{{m}}"></uni-icons></view></view><view class="function-item data-v-f97bc692" bindtap="{{q}}"><view class="item-left data-v-f97bc692"><view class="item-icon data-v-f97bc692"><image class="data-v-f97bc692" src="{{o}}" mode="aspectFit"></image></view><text class="item-title data-v-f97bc692">投诉建议</text></view><view class="item-right data-v-f97bc692"><uni-icons wx:if="{{p}}" class="data-v-f97bc692" u-i="f97bc692-2" bind:__l="__l" u-p="{{p}}"></uni-icons></view></view><view class="function-item data-v-f97bc692" bindtap="{{t}}"><view class="item-left data-v-f97bc692"><view class="item-icon data-v-f97bc692"><image class="data-v-f97bc692" src="{{r}}" mode="aspectFit"></image></view><text class="item-title data-v-f97bc692">帮助中心</text></view><view class="item-right data-v-f97bc692"><uni-icons wx:if="{{s}}" class="data-v-f97bc692" u-i="f97bc692-3" bind:__l="__l" u-p="{{s}}"></uni-icons></view></view></view></view>
+146 -255
View File
@@ -23,306 +23,197 @@
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.my-container.data-v-f97bc692 {
min-height: 87.5vh;
background: #f8f8f8;
.profile-container.data-v-f97bc692 {
min-height: 100vh;
background-color: #f5f7fa;
padding-bottom: env(safe-area-inset-bottom);
}
.my-container .user-info.data-v-f97bc692 {
height: 360rpx;
background: linear-gradient(135deg, #1976D2, #42A5F5);
position: relative;
overflow: hidden;
}
.my-container .user-info.data-v-f97bc692::before, .my-container .user-info.data-v-f97bc692::after {
content: "";
position: absolute;
background-repeat: no-repeat;
opacity: 0.1;
}
.my-container .user-info.data-v-f97bc692::before {
width: 200rpx;
height: 200rpx;
left: -40rpx;
top: -40rpx;
background-image: radial-gradient(circle, #fff 2rpx, transparent 3rpx);
background-size: 30rpx 30rpx;
transform: rotate(30deg);
}
.my-container .user-info.data-v-f97bc692::after {
width: 300rpx;
height: 300rpx;
right: -60rpx;
bottom: -60rpx;
background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 30%, transparent 30.5%), radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 20%, transparent 20.5%);
background-size: 60rpx 60rpx;
background-position: 0 0, 30rpx 30rpx;
transform: rotate(-15deg);
}
.my-container .user-info .floating-dots.data-v-f97bc692 {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
}
.my-container .user-info .floating-dots.data-v-f97bc692::before, .my-container .user-info .floating-dots.data-v-f97bc692::after {
content: "";
position: absolute;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
animation: float-f97bc692 3s infinite ease-in-out;
}
.my-container .user-info .floating-dots.data-v-f97bc692::before {
top: 20%;
right: 10%;
animation-delay: -2s;
}
.my-container .user-info .floating-dots.data-v-f97bc692::after {
top: 50%;
right: 20%;
width: 8rpx;
height: 8rpx;
animation-delay: -1s;
}
.my-container .user-info .user-info-content.data-v-f97bc692 {
position: relative;
z-index: 2;
padding: 60rpx 40rpx;
display: flex;
align-items: center;
}
.my-container .user-info .user-info-content .avatar-wrap.data-v-f97bc692 {
width: 140rpx;
height: 140rpx;
border-radius: 70rpx;
border: 6rpx solid rgba(255, 255, 255, 0.3);
overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1), 0 0 0 6rpx rgba(255, 255, 255, 0.1);
margin-right: 40rpx;
position: relative;
}
.my-container .user-info .user-info-content .avatar-wrap.data-v-f97bc692::after {
content: "";
position: absolute;
top: -10%;
left: -10%;
right: -10%;
bottom: -10%;
background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
animation: shine-f97bc692 2s infinite;
}
.my-container .user-info .user-info-content .avatar-wrap .avatar.data-v-f97bc692 {
width: 100%;
height: 100%;
background: #fff;
}
.my-container .user-info .user-info-content .info-content.not-login .login-text.data-v-f97bc692 {
font-size: 40rpx;
color: #fff;
font-weight: 500;
margin-bottom: 12rpx;
display: block;
}
.my-container .user-info .user-info-content .info-content.not-login .login-desc.data-v-f97bc692 {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.9);
display: block;
}
.my-container .user-info .user-info-content .info-content .text-group.data-v-f97bc692 {
display: flex;
flex-direction: column;
align-items: center;
gap: 16rpx;
}
.my-container .user-info .user-info-content .info-content .text-group .nickname.data-v-f97bc692 {
font-size: 42rpx;
color: #ffffff;
font-weight: 600;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
letter-spacing: 2rpx;
}
.my-container .user-info .user-info-content .info-content .text-group .phone.data-v-f97bc692 {
font-size: 30rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 400;
letter-spacing: 1rpx;
position: relative;
padding: 4rpx 24rpx;
background: rgba(255, 255, 255, 0.15);
border-radius: 24rpx;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
.my-container .user-info .wave-decoration.data-v-f97bc692 {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 120rpx;
background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDQwIDMyMCI+PHBhdGggZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjEpIiBkPSJNMCwyNjAuMjI3YzE3My42NjEsMCwzMjEuMTM3LDAsNDQyLjQyOCwwYzE4MS41MTcsMCwyODUuNjQ1LDAsMzk3LjU3MiwwQzk1Mi4zODksMjYwLjIyNywxMTQwLjI3MSwyNjAuMjI3LDE0NDAsMjYwLjIyN1YwSDBWMjYwLjIyN3oiLz48L3N2Zz4=") bottom/100% no-repeat;
opacity: 0.8;
}
@keyframes float-f97bc692 {
0%, 100% {
transform: translateY(0) scale(1);
}
50% {
transform: translateY(-20rpx) scale(1.1);
}
}
@keyframes shine-f97bc692 {
0% {
transform: translateX(-100%) rotate(45deg);
}
80%, 100% {
transform: translateX(100%) rotate(45deg);
}
}
.my-container .balance-card.data-v-f97bc692 {
margin: -60rpx 30rpx 30rpx;
background: #fff;
border-radius: 24rpx;
/* Header Section */
.header-section.data-v-f97bc692 {
padding: 40rpx;
background: linear-gradient(135deg, #4facfe, #00f2fe);
position: relative;
border-radius: 0 0 30rpx 30rpx;
margin-bottom: 20rpx;
box-shadow: 0 10rpx 30rpx rgba(79, 172, 254, 0.2);
}
.user-profile.data-v-f97bc692 {
display: flex;
align-items: center;
padding: 20rpx 0;
}
.avatar-container.data-v-f97bc692 {
position: relative;
margin-right: 30rpx;
}
.avatar.data-v-f97bc692 {
width: 120rpx;
height: 120rpx;
border-radius: 60rpx;
border: 4rpx solid rgba(255, 255, 255, 0.6);
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
}
.avatar-badge.data-v-f97bc692 {
position: absolute;
bottom: 0;
right: 0;
width: 36rpx;
height: 36rpx;
border-radius: 18rpx;
background-color: #ff9500;
border: 4rpx solid white;
}
.user-details.data-v-f97bc692 {
flex: 1;
}
.username.data-v-f97bc692 {
font-size: 36rpx;
font-weight: 600;
color: white;
margin-bottom: 8rpx;
}
.user-id.data-v-f97bc692 {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.8);
}
.edit-profile.data-v-f97bc692 {
background-color: rgba(255, 255, 255, 0.2);
padding: 10rpx;
border-radius: 50%;
}
/* Balance Card */
.balance-card.data-v-f97bc692 {
margin: 30rpx;
background: white;
border-radius: 20rpx;
padding: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 3;
box-shadow: 0 8rpx 32rpx rgba(25, 118, 210, 0.1);
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
}
.my-container .balance-card .balance-content .label.data-v-f97bc692 {
.balance-label.data-v-f97bc692 {
font-size: 28rpx;
color: #666;
margin-bottom: 12rpx;
display: block;
margin-bottom: 10rpx;
}
.my-container .balance-card .balance-content .amount.data-v-f97bc692 {
font-size: 52rpx;
color: #1976D2;
font-weight: bold;
.balance-amount.data-v-f97bc692 {
font-size: 48rpx;
font-weight: 600;
color: #4facfe;
}
.my-container .balance-card .withdraw-btn.data-v-f97bc692 {
padding: 20rpx 36rpx;
background: linear-gradient(135deg, #1976D2, #42A5F5);
color: #fff;
border-radius: 36rpx;
font-size: 30rpx;
.action-button.data-v-f97bc692 {
background: linear-gradient(135deg, #4facfe, #00f2fe);
border-radius: 40rpx;
height: 80rpx;
display: flex;
align-items: center;
box-shadow: 0 4rpx 12rpx rgba(25, 118, 210, 0.2);
justify-content: center;
padding: 0 40rpx;
color: white;
font-weight: 500;
font-size: 30rpx;
box-shadow: 0 8rpx 16rpx rgba(79, 172, 254, 0.2);
}
.my-container .balance-card .withdraw-btn.data-v-f97bc692:active {
.action-button.data-v-f97bc692:active {
opacity: 0.9;
transform: scale(0.98);
}
.my-container .balance-card .withdraw-btn .arrow.data-v-f97bc692 {
width: 12rpx;
height: 12rpx;
border-top: 3rpx solid #fff;
border-right: 3rpx solid #fff;
transform: rotate(45deg);
margin-left: 12rpx;
.action-button text.data-v-f97bc692 {
margin-right: 10rpx;
}
.my-container .function-list.data-v-f97bc692 {
margin: 0 30rpx;
background: #fff;
border-radius: 24rpx;
padding: 10rpx 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
/* Function List */
.function-list.data-v-f97bc692 {
margin: 30rpx;
background: white;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.04);
}
.my-container .function-list .function-item.data-v-f97bc692 {
.function-item.data-v-f97bc692 {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx 20rpx;
border-bottom: 1rpx solid #f5f5f5;
transition: all 0.3s;
align-items: center;
padding: 32rpx 30rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.my-container .function-list .function-item.data-v-f97bc692:active {
background: #f9f9f9;
}
.my-container .function-list .function-item.data-v-f97bc692:last-child {
.function-item.data-v-f97bc692:last-child {
border-bottom: none;
}
.my-container .function-list .function-item .item-left.data-v-f97bc692 {
.function-item.data-v-f97bc692:active {
background-color: #f9f9f9;
}
.item-left.data-v-f97bc692 {
display: flex;
align-items: center;
}
.my-container .function-list .function-item .item-left .icon-wrap.data-v-f97bc692 {
width: 80rpx;
height: 80rpx;
.item-icon.data-v-f97bc692 {
width: 48rpx;
height: 48rpx;
margin-right: 24rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 20rpx;
background: #F5F9FF;
}
.my-container .function-list .function-item .item-left .icon-wrap .icon-image.data-v-f97bc692 {
width: 44rpx;
height: 44rpx;
.item-icon image.data-v-f97bc692 {
width: 40rpx;
height: 40rpx;
}
.my-container .function-list .function-item .item-left .title.data-v-f97bc692 {
font-size: 32rpx;
.item-title.data-v-f97bc692 {
font-size: 30rpx;
color: #333;
font-weight: 500;
}
.my-container .function-list .function-item .arrow.data-v-f97bc692 {
width: 16rpx;
height: 16rpx;
border-top: 3rpx solid #999;
border-right: 3rpx solid #999;
transform: rotate(45deg);
.item-right.data-v-f97bc692 {
display: flex;
align-items: center;
}
.my-container .popup-content.data-v-f97bc692 {
background-color: #fff;
border-radius: 24rpx 24rpx 0 0;
padding: 40rpx 30rpx;
/* Auth Popup */
.auth-popup.data-v-f97bc692 {
background-color: white;
width: 100%;
padding: 40rpx;
border-radius: 15rpx;
}
.my-container .popup-content .popup-title.data-v-f97bc692 {
font-size: 32rpx;
font-weight: 500;
.auth-title.data-v-f97bc692 {
font-size: 34rpx;
font-weight: 600;
color: #333;
text-align: center;
margin-bottom: 20rpx;
}
.auth-desc.data-v-f97bc692 {
font-size: 28rpx;
color: #666;
text-align: center;
margin-bottom: 40rpx;
}
.my-container .popup-content .popup-body.data-v-f97bc692 {
.auth-buttons.data-v-f97bc692 {
display: flex;
flex-direction: column;
gap: 30rpx;
justify-content: space-between;
}
.my-container .popup-content .avatar-btn.data-v-f97bc692 {
height: 88rpx;
line-height: 88rpx;
background: #f5f5f5;
border-radius: 44rpx;
.cancel-btn.data-v-f97bc692,
.confirm-btn.data-v-f97bc692 {
width: 240rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 40rpx;
font-size: 28rpx;
color: #333;
}
.my-container .popup-content .avatar-btn.data-v-f97bc692::after {
.cancel-btn.data-v-f97bc692::after,
.confirm-btn.data-v-f97bc692::after {
border: none;
}
.my-container .popup-content .avatar-btn.data-v-f97bc692:active {
opacity: 0.8;
.cancel-btn.data-v-f97bc692 {
background-color: #f0f0f0;
color: #666;
}
.my-container .popup-content .nickname-input.data-v-f97bc692 {
height: 88rpx;
background: #f5f5f5;
border-radius: 44rpx;
padding: 0 30rpx;
font-size: 28rpx;
}
.my-container .popup-content .submit-btn.data-v-f97bc692 {
height: 88rpx;
line-height: 88rpx;
background: #1976D2;
color: #fff;
border-radius: 44rpx;
font-size: 30rpx;
margin-top: 20rpx;
}
.my-container .popup-content .submit-btn.data-v-f97bc692:active {
opacity: 0.9;
.confirm-btn.data-v-f97bc692 {
background: linear-gradient(135deg, #4facfe, #00f2fe);
color: white;
}
+161 -87
View File
@@ -1,64 +1,111 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const config_user = require("../../config/user.js");
const constants_orderStatus = require("../../constants/orderStatus.js");
const _sfc_main = {
data() {
return {
currentTab: 0,
OrderStatusMap: constants_orderStatus.OrderStatusMap,
OrderStatusTabs: constants_orderStatus.OrderStatusTabs,
orderList: []
};
},
async onLoad(options) {
if (options && options.orderId) {
try {
const res = await config_user.queryById(options.orderId);
if (res.code === 200 && res.data) {
const orderData = res.data;
common_vendor.index.__f__("log", "at pages/order/index.vue:76", "特定订单数据:", JSON.stringify(orderData));
common_vendor.index.__f__("log", "at pages/order/index.vue:77", "特定订单的开始时间:", orderData.startTime);
common_vendor.index.__f__("log", "at pages/order/index.vue:78", "特定订单的创建时间:", orderData.createTime);
const orderStartTime = orderData.startTime || orderData.createTime || "";
common_vendor.index.__f__("log", "at pages/order/index.vue:82", "特定订单最终显示的开始时间:", orderStartTime);
const formattedOrder = {
orderNo: orderData.orderId,
status: orderData.orderStatus,
deviceId: orderData.deviceNo,
startTime: orderStartTime,
endTime: orderData.endTime || "",
amount: orderData.payAmount || orderData.actualDeviceAmount || "0.00"
};
this.orderList = [formattedOrder, ...this.orderList];
const tabIndex = this.OrderStatusTabs.findIndex(
(tab) => tab.status.includes(orderData.orderStatus)
);
if (tabIndex !== -1) {
this.switchTab(tabIndex);
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/order/index.vue:106", "获取订单详情失败:", error);
__name: "index",
setup(__props) {
const currentTab = common_vendor.ref(0);
const orderList = common_vendor.ref([]);
const orderStatusMap = common_vendor.reactive({
"0": {
text: "待支付",
class: "status-waiting"
},
"1": {
text: "使用中",
class: "status-using"
},
"2": {
text: "已完成",
class: "status-finished"
},
"3": {
text: "已取消",
class: "status-cancelled"
},
"waiting_for_payment": {
text: "待支付",
class: "status-waiting"
},
"in_used": {
text: "使用中",
class: "status-using"
},
"used_done": {
text: "已完成",
class: "status-finished"
},
"canceled": {
text: "已取消",
class: "status-cancelled"
}
}
await this.getOrderList();
},
methods: {
async getOrderList(statusList = []) {
});
const orderStatusTabs = common_vendor.reactive([
{
text: "全部",
status: []
},
{
text: "使用中",
status: ["1", "in_used"]
},
{
text: "已完成",
status: ["2", "used_done"]
},
{
text: "已取消",
status: ["3", "canceled"]
}
]);
common_vendor.onLoad(async (options) => {
if (options && options.orderId) {
try {
const res = await config_user.queryById(options.orderId);
if (res.code === 200 && res.data) {
const orderData = res.data;
const orderStartTime = orderData.startTime || orderData.createTime || "";
const formattedOrder = {
orderNo: orderData.orderId,
status: orderData.orderStatus,
deviceId: orderData.deviceNo,
payWay: orderData.payWay,
startTime: orderStartTime,
endTime: orderData.endTime || "",
amount: orderData.payAmount || orderData.actualDeviceAmount || "0.00"
};
orderList.value = [formattedOrder, ...orderList.value];
const tabIndex = orderStatusTabs.findIndex(
(tab) => tab.status.includes(orderData.orderStatus)
);
if (tabIndex !== -1) {
switchTab(tabIndex);
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/order/index.vue:199", "获取订单详情失败:", error);
}
}
await loadOrderList();
});
const switchTab = async (index) => {
currentTab.value = index;
const statusList = orderStatusTabs[index].status;
await loadOrderList(statusList);
};
const loadOrderList = async (statusList = []) => {
try {
const res = await config_user.getOrderList(statusList);
if (res.code === 200 && res.data && res.data.records) {
common_vendor.index.__f__("log", "at pages/order/index.vue:118", "API返回的订单列表数据:", JSON.stringify(res.data.records));
this.orderList = res.data.records.map((item) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:122", `订单 ${item.orderId} 的开始时间:`, item.startTime);
common_vendor.index.__f__("log", "at pages/order/index.vue:123", `订单 ${item.orderId} 的创建时间:`, item.createTime);
orderList.value = res.data.records.map((item) => {
const orderStartTime = item.startTime || item.createTime || "";
common_vendor.index.__f__("log", "at pages/order/index.vue:127", `订单 ${item.orderId} 最终显示的开始时间:`, orderStartTime);
return {
orderNo: item.orderId,
orderNo: item.orderNo,
orderId: item.orderId,
status: item.orderStatus,
deviceId: item.deviceNo,
payWay: item.payWay,
startTime: orderStartTime,
endTime: item.endTime || "",
amount: item.payAmount || item.actualDeviceAmount || "0.00"
@@ -66,50 +113,77 @@ const _sfc_main = {
});
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/order/index.vue:140", "获取订单列表失败:", error);
common_vendor.index.__f__("error", "at pages/order/index.vue:238", "获取订单列表失败:", error);
common_vendor.index.showToast({
title: "获取订单列表失败",
icon: "none"
});
}
},
async switchTab(index) {
this.currentTab = index;
const statusList = this.OrderStatusTabs[index].status;
await this.getOrderList(statusList);
}
};
const getOrderStatus = async (order) => {
try {
const res = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
if (res.code === 200) {
common_vendor.index.showToast({
title: "状态同步成功",
icon: "success"
});
await loadOrderList(orderStatusTabs[currentTab.value].status);
}
} catch (error) {
common_vendor.index.showToast({
title: "同步状态失败",
icon: "none"
});
}
};
const navigateToReturn = (deviceId, orderId) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:267", orderId);
common_vendor.index.navigateTo({
url: `/pages/return/index?deviceId=${deviceId}&orderId=${orderId}`
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(orderStatusTabs, (tab, index, i0) => {
return {
a: common_vendor.t(tab.text),
b: index,
c: currentTab.value === index ? 1 : "",
d: common_vendor.o(($event) => switchTab(index), index)
};
}),
b: orderList.value.length === 0
}, orderList.value.length === 0 ? {} : {}, {
c: common_vendor.f(orderList.value, (order, index, i0) => {
var _a, _b;
return common_vendor.e({
a: common_vendor.t(order.orderNo),
b: common_vendor.t((_a = orderStatusMap[order.status]) == null ? void 0 : _a.text),
c: common_vendor.n((_b = orderStatusMap[order.status]) == null ? void 0 : _b.class),
d: common_vendor.t(order.deviceId),
e: order.payWay == "wx_score_pay"
}, order.payWay == "wx_score_pay" ? {
f: common_assets._imports_0$2
} : {}, {
g: common_vendor.t(order.startTime),
h: common_vendor.t(order.endTime || "-"),
i: common_vendor.t(order.amount),
j: order.status == "in_used"
}, order.status == "in_used" ? {
k: common_vendor.o(($event) => navigateToReturn(order.deviceId, order.orderId), index)
} : {}, {
l: order.status === "waiting_for_payment"
}, order.status === "waiting_for_payment" ? {
m: common_vendor.o(($event) => getOrderStatus(order), index)
} : {}, {
n: index
});
})
});
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.f($data.OrderStatusTabs, (tab, index, i0) => {
return {
a: common_vendor.t(tab.text),
b: index,
c: $data.currentTab === index ? 1 : "",
d: common_vendor.o(($event) => $options.switchTab(index), index)
};
}),
b: common_vendor.f($data.orderList, (order, index, i0) => {
var _a, _b;
return common_vendor.e({
a: common_vendor.t(order.orderNo),
b: common_vendor.t((_a = $data.OrderStatusMap[order.status]) == null ? void 0 : _a.text),
c: common_vendor.n((_b = $data.OrderStatusMap[order.status]) == null ? void 0 : _b.class),
d: order.status === 1
}, order.status === 1 ? {
e: `/pages/return/index?deviceId=${order.deviceId}&orderId=${order.orderNo}`
} : {}, {
f: common_vendor.t(order.deviceId),
g: common_vendor.t(order.startTime),
h: common_vendor.t(order.endTime || "-"),
i: common_vendor.t(order.amount),
j: index
});
}),
c: $data.orderList.length === 0
}, $data.orderList.length === 0 ? {} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-17a44f9d"]]);
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-17a44f9d"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/index.js.map
+1 -1
View File
@@ -1 +1 @@
<view class="order-container data-v-17a44f9d"><view class="tab-bar data-v-17a44f9d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-17a44f9d', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-17a44f9d"><view wx:for="{{b}}" wx:for-item="order" wx:key="j" class="order-item data-v-17a44f9d"><view class="order-header data-v-17a44f9d"><text class="order-no data-v-17a44f9d">订单号:{{order.a}}</text><text class="{{['order-status', 'data-v-17a44f9d', order.c]}}">{{order.b}}</text><navigator wx:if="{{order.d}}" url="{{order.e}}" class="return-btn data-v-17a44f9d">归还设备</navigator></view><view class="order-content data-v-17a44f9d"><view class="device-info data-v-17a44f9d"><text class="device-name data-v-17a44f9d">共享风扇</text><text class="device-id data-v-17a44f9d">设备号:{{order.f}}</text></view><view class="time-info data-v-17a44f9d"><view class="time-item data-v-17a44f9d"><text class="label data-v-17a44f9d">开始时间:</text><text class="value data-v-17a44f9d">{{order.g}}</text></view><view class="time-item data-v-17a44f9d"><text class="label data-v-17a44f9d">结束时间:</text><text class="value data-v-17a44f9d">{{order.h}}</text></view></view><view class="price-info data-v-17a44f9d"><text class="amount data-v-17a44f9d">¥{{order.i}}</text></view></view></view></view><view wx:if="{{c}}" class="empty-tip data-v-17a44f9d"><view class="empty-icon data-v-17a44f9d"></view><text class="data-v-17a44f9d">暂无订单记录</text></view></view>
<view class="order-container data-v-17a44f9d"><view class="status-tabs data-v-17a44f9d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-17a44f9d', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-17a44f9d"><view wx:if="{{b}}" class="empty-state data-v-17a44f9d"><view class="empty-icon data-v-17a44f9d"></view><text class="empty-text data-v-17a44f9d">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="n" class="order-item data-v-17a44f9d"><view class="order-header data-v-17a44f9d"><view class="order-id data-v-17a44f9d"><text class="data-v-17a44f9d">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-17a44f9d', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-17a44f9d"><view class="device-info data-v-17a44f9d"><view class="device-left data-v-17a44f9d"><view class="device-name data-v-17a44f9d">共享风扇</view><view class="device-id data-v-17a44f9d">设备号:{{order.d}}</view></view><view class="device-right data-v-17a44f9d"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-17a44f9d"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-17a44f9d"></image><view class="badge-text data-v-17a44f9d"><text class="data-v-17a44f9d">微信支付分</text><text class="divider data-v-17a44f9d">|</text><text class="highlight data-v-17a44f9d">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-17a44f9d"><text class="badge-text data-v-17a44f9d">押金租借</text></view></view></view><view class="order-times data-v-17a44f9d"><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">开始时间:</text><text class="time-value data-v-17a44f9d">{{order.g}}</text></view><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">结束时间:</text><text class="time-value data-v-17a44f9d">{{order.h}}</text></view></view></view><view class="order-footer data-v-17a44f9d"><view class="price data-v-17a44f9d">¥{{order.i}}</view><view class="actions data-v-17a44f9d"><view wx:if="{{order.j}}" class="action-item primary data-v-17a44f9d" bindtap="{{order.k}}"> 归还设备 </view><view wx:if="{{order.l}}" class="action-item secondary data-v-17a44f9d" bindtap="{{order.m}}"> 同步订单状态 </view></view></view></view></view></view>
+129 -56
View File
@@ -25,31 +25,34 @@
/* 文章场景相关 */
.order-container.data-v-17a44f9d {
min-height: 100vh;
background: #f8f8f8;
background: #f7f8fa;
padding-bottom: 30rpx;
}
.order-container .tab-bar.data-v-17a44f9d {
.order-container .status-tabs.data-v-17a44f9d {
display: flex;
background: #fff;
padding: 20rpx 0;
padding: 0 20rpx;
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 100;
z-index: 10;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}
.order-container .tab-bar .tab-item.data-v-17a44f9d {
.order-container .status-tabs .tab-item.data-v-17a44f9d {
flex: 1;
text-align: center;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #666;
position: relative;
padding: 20rpx 0;
}
.order-container .tab-bar .tab-item.active.data-v-17a44f9d {
.order-container .status-tabs .tab-item.active.data-v-17a44f9d {
color: #1976D2;
font-weight: 500;
}
.order-container .tab-bar .tab-item.active.data-v-17a44f9d::after {
.order-container .status-tabs .tab-item.active.data-v-17a44f9d::after {
content: "";
position: absolute;
bottom: 0;
@@ -65,89 +68,159 @@
}
.order-container .order-list .order-item.data-v-17a44f9d {
background: #fff;
border-radius: 20rpx;
border-radius: 16rpx;
margin-bottom: 20rpx;
padding: 30rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
overflow: hidden;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
}
.order-container .order-list .order-item .order-header.data-v-17a44f9d {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #f5f5f5;
padding: 24rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.order-container .order-list .order-item .order-header .order-no.data-v-17a44f9d {
.order-container .order-list .order-item .order-header .order-id.data-v-17a44f9d {
font-size: 26rpx;
color: #666;
}
.order-container .order-list .order-item .order-header .order-status.data-v-17a44f9d {
font-size: 26rpx;
font-weight: 500;
}
.order-container .order-list .order-item .order-header .order-status.status-waiting.data-v-17a44f9d {
color: #FF9800;
}
.order-container .order-list .order-item .order-header .order-status.status-progress.data-v-17a44f9d {
color: #2196F3;
}
.order-container .order-list .order-item .order-header .order-status.status-success.data-v-17a44f9d {
color: #4CAF50;
}
.order-container .order-list .order-item .order-header .order-status.status-using.data-v-17a44f9d {
color: #1976D2;
}
.order-container .order-list .order-item .order-header .order-status.status-failed.data-v-17a44f9d {
color: #F44336;
}
.order-container .order-list .order-item .order-header .order-status.status-cancelled.data-v-17a44f9d {
color: #9E9E9E;
color: #2196F3;
}
.order-container .order-list .order-item .order-header .order-status.status-finished.data-v-17a44f9d {
color: #4CAF50;
}
.order-container .order-list .order-item .order-content.data-v-17a44f9d {
padding-top: 20rpx;
.order-container .order-list .order-item .order-header .order-status.status-cancelled.data-v-17a44f9d {
color: #9E9E9E;
}
.order-container .order-list .order-item .order-content .device-info.data-v-17a44f9d {
.order-container .order-list .order-item .order-body.data-v-17a44f9d {
padding: 24rpx;
}
.order-container .order-list .order-item .order-body .device-info.data-v-17a44f9d {
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.order-container .order-list .order-item .order-content .device-info .device-name.data-v-17a44f9d {
font-size: 32rpx;
color: #333;
font-weight: 500;
.order-container .order-list .order-item .order-body .device-info .device-left.data-v-17a44f9d {
flex: 1;
margin-right: 20rpx;
}
.order-container .order-list .order-item .order-content .device-info .device-id.data-v-17a44f9d {
.order-container .order-list .order-item .order-body .device-info .device-left .device-name.data-v-17a44f9d {
font-size: 32rpx;
font-weight: 500;
color: #333;
margin-bottom: 6rpx;
}
.order-container .order-list .order-item .order-body .device-info .device-left .device-id.data-v-17a44f9d {
font-size: 26rpx;
color: #999;
margin-bottom: 0;
}
.order-container .order-list .order-item .order-content .time-info .time-item.data-v-17a44f9d {
font-size: 26rpx;
color: #666;
margin-bottom: 10rpx;
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.data-v-17a44f9d {
display: inline-flex;
align-items: center;
padding: 6rpx 12rpx;
border-radius: 8rpx;
white-space: nowrap;
}
.order-container .order-list .order-item .order-content .time-info .time-item .label.data-v-17a44f9d {
color: #999;
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score.data-v-17a44f9d {
background: rgba(7, 193, 96, 0.08);
}
.order-container .order-list .order-item .order-content .price-info.data-v-17a44f9d {
text-align: right;
margin-top: 20rpx;
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-17a44f9d {
width: 32rpx;
height: 26rpx;
margin-right: 8rpx;
}
.order-container .order-list .order-item .order-content .price-info .amount.data-v-17a44f9d {
font-size: 36rpx;
color: #FF9800;
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-text.data-v-17a44f9d {
font-size: 22rpx;
color: #07c160;
display: flex;
align-items: center;
}
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-text .divider.data-v-17a44f9d {
margin: 0 6rpx;
}
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-17a44f9d {
font-weight: 500;
}
.order-container .empty-tip.data-v-17a44f9d {
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.deposit.data-v-17a44f9d {
background: #f5f5f5;
}
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.deposit .badge-text.data-v-17a44f9d {
font-size: 22rpx;
color: #666;
font-weight: 500;
}
.order-container .order-list .order-item .order-body .order-times .time-row.data-v-17a44f9d {
display: flex;
font-size: 26rpx;
margin-bottom: 8rpx;
}
.order-container .order-list .order-item .order-body .order-times .time-row .time-label.data-v-17a44f9d {
color: #999;
width: 140rpx;
}
.order-container .order-list .order-item .order-body .order-times .time-row .time-value.data-v-17a44f9d {
color: #333;
flex: 1;
}
.order-container .order-list .order-item .order-footer.data-v-17a44f9d {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 24rpx;
background: #fafafa;
border-top: 1rpx solid #f0f0f0;
}
.order-container .order-list .order-item .order-footer .price.data-v-17a44f9d {
font-size: 34rpx;
font-weight: 500;
color: #ff6b6b;
}
.order-container .order-list .order-item .order-footer .actions.data-v-17a44f9d {
display: flex;
}
.order-container .order-list .order-item .order-footer .actions .action-item.data-v-17a44f9d {
font-size: 26rpx;
padding: 10rpx 30rpx;
border-radius: 30rpx;
margin-left: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.order-container .order-list .order-item .order-footer .actions .action-item.primary.data-v-17a44f9d {
background: #1976D2;
color: #fff;
}
.order-container .order-list .order-item .order-footer .actions .action-item.secondary.data-v-17a44f9d {
background: #f5f5f5;
color: #666;
border: 1rpx solid #e0e0e0;
}
.order-container .order-list .order-item .order-footer .actions .action-item.data-v-17a44f9d:active {
opacity: 0.8;
}
.order-container .order-list .empty-state.data-v-17a44f9d {
padding: 100rpx 0;
text-align: center;
color: #999;
font-size: 28rpx;
}
.order-container .empty-tip .empty-icon.data-v-17a44f9d {
width: 200rpx;
height: 200rpx;
margin: 0 auto 20rpx;
background: #f0f0f0;
.order-container .order-list .empty-state .empty-icon.data-v-17a44f9d {
width: 180rpx;
height: 180rpx;
margin: 0 auto 30rpx;
background: #f5f5f5;
border-radius: 50%;
}
.order-container .order-list .empty-state .empty-text.data-v-17a44f9d {
font-size: 28rpx;
color: #999;
}
+57 -41
View File
@@ -2,6 +2,7 @@
const common_vendor = require("../../common/vendor.js");
const config_user = require("../../config/user.js");
const config_url = require("../../config/url.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = {
data() {
return {
@@ -13,8 +14,10 @@ const _sfc_main = {
// 用于调试
usedTime: "0分钟",
currentFee: "0.00",
orderStatus: "in_used"
orderStatus: "in_used",
// 默认状态为使用中
payWay: ""
// 新增支付方式字段
},
timer: null,
statusCheckTimer: null,
@@ -28,11 +31,11 @@ const _sfc_main = {
};
},
onLoad(options) {
common_vendor.index.__f__("log", "at pages/return/index.vue:97", "Return page loaded with options:", JSON.stringify(options));
common_vendor.index.__f__("log", "at pages/return/index.vue:117", "Return page loaded with options:", JSON.stringify(options));
this.isPageActive = true;
this.orderInfo.orderId = options.orderId || "";
this.deviceId = options.deviceNo || options.deviceId || "";
common_vendor.index.__f__("log", "at pages/return/index.vue:106", `初始化参数: orderId=${this.orderInfo.orderId}, deviceId=${this.deviceId}`);
common_vendor.index.__f__("log", "at pages/return/index.vue:126", `初始化参数: orderId=${this.orderInfo.orderId}, deviceId=${this.deviceId}`);
if (!this.orderInfo.orderId && this.deviceId) {
this.getOrderByDevice();
} else if (this.orderInfo.orderId) {
@@ -44,12 +47,12 @@ const _sfc_main = {
if (this.$orderMonitor) {
this.$orderMonitor.removeOrder({ orderId: this.orderInfo.orderId });
this.$orderMonitor.addOrder({ orderId: this.orderInfo.orderId }, "return");
common_vendor.index.__f__("log", "at pages/return/index.vue:129", "订单已添加到监控队列:", this.orderInfo.orderId);
common_vendor.index.__f__("log", "at pages/return/index.vue:149", "订单已添加到监控队列:", this.orderInfo.orderId);
} else {
common_vendor.index.__f__("warn", "at pages/return/index.vue:131", "$orderMonitor 未定义,无法添加订单到监控队列");
common_vendor.index.__f__("warn", "at pages/return/index.vue:151", "$orderMonitor 未定义,无法添加订单到监控队列");
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/return/index.vue:134", "添加订单到监控队列失败:", error);
common_vendor.index.__f__("error", "at pages/return/index.vue:154", "添加订单到监控队列失败:", error);
}
} else {
common_vendor.index.showToast({
@@ -64,14 +67,14 @@ const _sfc_main = {
},
// 添加onHide生命周期,处理页面隐藏时的清理工作
onHide() {
common_vendor.index.__f__("log", "at pages/return/index.vue:154", "归还页面隐藏,清理计时器资源和监控服务");
common_vendor.index.__f__("log", "at pages/return/index.vue:174", "归还页面隐藏,清理计时器资源和监控服务");
this.isPageActive = false;
this.clearTimer();
this.clearStatusCheckTimer();
this.removeFromOrderMonitor();
},
onUnload() {
common_vendor.index.__f__("log", "at pages/return/index.vue:166", "归还页面卸载,清理所有资源");
common_vendor.index.__f__("log", "at pages/return/index.vue:186", "归还页面卸载,清理所有资源");
this.isPageActive = false;
this.clearTimer();
this.clearStatusCheckTimer();
@@ -84,15 +87,15 @@ const _sfc_main = {
if (this.orderInfo.orderId && this.$orderMonitor) {
try {
this.$orderMonitor.removeOrder({ orderId: this.orderInfo.orderId });
common_vendor.index.__f__("log", "at pages/return/index.vue:186", "订单已从监控队列移除:", this.orderInfo.orderId);
common_vendor.index.__f__("log", "at pages/return/index.vue:206", "订单已从监控队列移除:", this.orderInfo.orderId);
} catch (error) {
common_vendor.index.__f__("error", "at pages/return/index.vue:188", "从监控队列移除订单失败:", error);
common_vendor.index.__f__("error", "at pages/return/index.vue:208", "从监控队列移除订单失败:", error);
}
}
},
// 处理订单完成事件(可由任何地方触发)
handleOrderCompleted(orderData) {
common_vendor.index.__f__("log", "at pages/return/index.vue:194", "收到订单完成事件:", orderData);
common_vendor.index.__f__("log", "at pages/return/index.vue:214", "收到订单完成事件:", orderData);
if (orderData.orderId === this.orderInfo.orderId || orderData.orderNo === this.orderInfo.orderNo) {
this.showReturnSuccessModal(orderData);
}
@@ -135,35 +138,38 @@ const _sfc_main = {
// 获取订单详情
async getOrderDetails() {
if (!this.isPageActive) {
common_vendor.index.__f__("log", "at pages/return/index.vue:250", "页面已不活跃,跳过订单详情请求");
common_vendor.index.__f__("log", "at pages/return/index.vue:270", "页面已不活跃,跳过订单详情请求");
return;
}
try {
if (!this.orderInfo.orderId) {
throw new Error("订单ID不能为空");
}
common_vendor.index.__f__("log", "at pages/return/index.vue:261", "请求订单详情, orderId:", this.orderInfo.orderId);
common_vendor.index.__f__("log", "at pages/return/index.vue:281", "请求订单详情, orderId:", this.orderInfo.orderId);
const result = await config_user.queryById(this.orderInfo.orderId);
common_vendor.index.__f__("log", "at pages/return/index.vue:263", "订单详情结果:", JSON.stringify(result));
common_vendor.index.__f__("log", "at pages/return/index.vue:283", "订单详情结果:", JSON.stringify(result));
if (result.code === 200 && result.data) {
const orderData = result.data;
common_vendor.index.__f__("log", "at pages/return/index.vue:267", "订单原始数据:", orderData);
common_vendor.index.__f__("log", "at pages/return/index.vue:268", "开始时间字段:", orderData.startTime, typeof orderData.startTime);
common_vendor.index.__f__("log", "at pages/return/index.vue:287", "订单原始数据:", orderData);
common_vendor.index.__f__("log", "at pages/return/index.vue:288", "开始时间字段:", orderData.startTime, typeof orderData.startTime);
if (orderData.orderStatus) {
this.orderInfo.orderStatus = orderData.orderStatus;
}
if (orderData.payWay) {
this.orderInfo.payWay = orderData.payWay;
}
if (orderData.orderStatus && (orderData.orderStatus === "used_done" || orderData.orderStatus === "used_down")) {
common_vendor.index.$emit("orderCompleted", orderData);
this.showReturnSuccessModal(orderData);
return;
}
this.updateOrderInfo(orderData);
common_vendor.index.__f__("log", "at pages/return/index.vue:290", "更新后的开始时间:", this.orderInfo.startTime);
common_vendor.index.__f__("log", "at pages/return/index.vue:315", "更新后的开始时间:", this.orderInfo.startTime);
} else {
throw new Error(result.msg || "获取订单详情失败");
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/return/index.vue:295", "获取订单详情错误:", error);
common_vendor.index.__f__("error", "at pages/return/index.vue:320", "获取订单详情错误:", error);
common_vendor.index.showToast({
title: error.message || "获取订单信息失败",
icon: "none"
@@ -186,25 +192,28 @@ const _sfc_main = {
},
// 使用后端返回的使用时长和费用数据
updateOrderInfo(orderData) {
common_vendor.index.__f__("log", "at pages/return/index.vue:323", "更新订单信息:", JSON.stringify(orderData));
common_vendor.index.__f__("log", "at pages/return/index.vue:348", "更新订单信息:", JSON.stringify(orderData));
this.orderInfo.usedTime = orderData.usedTime || "0分钟";
this.orderInfo.currentFee = orderData.currentFee || orderData.actualDeviceAmount || orderData.payAmount || "0.00";
if (orderData.orderStatus) {
this.orderInfo.orderStatus = orderData.orderStatus;
}
if (orderData.payWay) {
this.orderInfo.payWay = orderData.payWay;
}
this.orderInfo._rawStartTime = orderData.startTime;
if (orderData.startTime) {
try {
common_vendor.index.__f__("log", "at pages/return/index.vue:342", "API返回的开始时间:", orderData.startTime);
common_vendor.index.__f__("log", "at pages/return/index.vue:372", "API返回的开始时间:", orderData.startTime);
this.orderInfo.startTime = orderData.startTime;
} catch (e) {
common_vendor.index.__f__("error", "at pages/return/index.vue:346", "更新开始时间错误:", e);
common_vendor.index.__f__("error", "at pages/return/index.vue:376", "更新开始时间错误:", e);
this.orderInfo.startTime = "未知";
}
} else {
common_vendor.index.__f__("warn", "at pages/return/index.vue:350", "API返回的订单数据中没有startTime字段");
common_vendor.index.__f__("warn", "at pages/return/index.vue:380", "API返回的订单数据中没有startTime字段");
if (orderData.createTime) {
common_vendor.index.__f__("log", "at pages/return/index.vue:353", "使用createTime作为备选:", orderData.createTime);
common_vendor.index.__f__("log", "at pages/return/index.vue:383", "使用createTime作为备选:", orderData.createTime);
this.orderInfo.startTime = orderData.createTime;
} else {
this.orderInfo.startTime = "未知";
@@ -219,21 +228,21 @@ const _sfc_main = {
this.clearTimer();
this.timer = setInterval(() => {
if (this.isPageActive) {
common_vendor.index.__f__("log", "at pages/return/index.vue:375", "执行定时更新订单信息");
common_vendor.index.__f__("log", "at pages/return/index.vue:405", "执行定时更新订单信息");
this.getOrderDetails();
} else {
common_vendor.index.__f__("log", "at pages/return/index.vue:378", "页面已不活跃,停止计时器");
common_vendor.index.__f__("log", "at pages/return/index.vue:408", "页面已不活跃,停止计时器");
this.clearTimer();
}
}, 6e4);
common_vendor.index.__f__("log", "at pages/return/index.vue:383", "已启动使用时长更新计时器");
common_vendor.index.__f__("log", "at pages/return/index.vue:413", "已启动使用时长更新计时器");
},
// 清除定时器
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
common_vendor.index.__f__("log", "at pages/return/index.vue:391", "已清除使用时长更新计时器");
common_vendor.index.__f__("log", "at pages/return/index.vue:421", "已清除使用时长更新计时器");
}
},
// 清除状态检查定时器
@@ -241,7 +250,7 @@ const _sfc_main = {
if (this.statusCheckTimer) {
clearInterval(this.statusCheckTimer);
this.statusCheckTimer = null;
common_vendor.index.__f__("log", "at pages/return/index.vue:400", "已清除归还状态检查计时器");
common_vendor.index.__f__("log", "at pages/return/index.vue:430", "已清除归还状态检查计时器");
}
},
// 开始状态检查定时器
@@ -251,7 +260,7 @@ const _sfc_main = {
this.statusCheckTimer = setInterval(() => {
if (this.isPageActive) {
this.currentStatusChecks++;
common_vendor.index.__f__("log", "at pages/return/index.vue:414", `执行归还状态检查 (${this.currentStatusChecks}/${this.maxStatusChecks})`);
common_vendor.index.__f__("log", "at pages/return/index.vue:444", `执行归还状态检查 (${this.currentStatusChecks}/${this.maxStatusChecks})`);
this.checkReturnStatus();
if (this.currentStatusChecks >= this.maxStatusChecks) {
this.clearStatusCheckTimer();
@@ -262,11 +271,11 @@ const _sfc_main = {
});
}
} else {
common_vendor.index.__f__("log", "at pages/return/index.vue:429", "页面已不活跃,停止状态检查计时器");
common_vendor.index.__f__("log", "at pages/return/index.vue:459", "页面已不活跃,停止状态检查计时器");
this.clearStatusCheckTimer();
}
}, this.statusCheckInterval);
common_vendor.index.__f__("log", "at pages/return/index.vue:434", "已启动归还状态检查计时器");
common_vendor.index.__f__("log", "at pages/return/index.vue:464", "已启动归还状态检查计时器");
},
// 通过设备号查询使用中的订单
async getOrderByDevice() {
@@ -282,16 +291,19 @@ const _sfc_main = {
"Clientid": common_vendor.index.getStorageSync("client_id")
}
});
common_vendor.index.__f__("log", "at pages/return/index.vue:456", "通过设备号查询订单结果:", JSON.stringify(inUseRes));
common_vendor.index.__f__("log", "at pages/return/index.vue:486", "通过设备号查询订单结果:", JSON.stringify(inUseRes));
if (inUseRes.statusCode === 200 && inUseRes.data.code === 200 && inUseRes.data.data) {
const inUseOrder = inUseRes.data.data;
common_vendor.index.__f__("log", "at pages/return/index.vue:460", "使用中的订单:", inUseOrder);
common_vendor.index.__f__("log", "at pages/return/index.vue:490", "使用中的订单:", inUseOrder);
this.orderInfo.orderId = inUseOrder.orderId;
if (inUseOrder.orderStatus) {
this.orderInfo.orderStatus = inUseOrder.orderStatus;
}
if (inUseOrder.payWay) {
this.orderInfo.payWay = inUseOrder.payWay;
}
if (inUseOrder.startTime) {
common_vendor.index.__f__("log", "at pages/return/index.vue:472", "inUse API返回的开始时间:", inUseOrder.startTime);
common_vendor.index.__f__("log", "at pages/return/index.vue:507", "inUse API返回的开始时间:", inUseOrder.startTime);
this.orderInfo.startTime = inUseOrder.startTime;
}
this.getOrderDetails();
@@ -301,7 +313,7 @@ const _sfc_main = {
throw new Error("未找到使用中的订单");
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/return/index.vue:486", "通过设备号查询订单失败:", error);
common_vendor.index.__f__("error", "at pages/return/index.vue:521", "通过设备号查询订单失败:", error);
common_vendor.index.showToast({
title: error.message || "获取订单信息失败",
icon: "none"
@@ -320,7 +332,7 @@ const _sfc_main = {
await this.getOrderDetails();
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/return/index.vue:509", "检查归还状态失败:", error);
common_vendor.index.__f__("error", "at pages/return/index.vue:544", "检查归还状态失败:", error);
}
},
// 返回首页
@@ -336,12 +348,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
a: common_vendor.t($options.getOrderStatusText()),
b: common_vendor.t($data.orderInfo.orderId),
c: common_vendor.t($data.deviceId),
d: common_vendor.t($data.orderInfo.startTime),
e: common_vendor.t($data.orderInfo.usedTime),
f: common_vendor.t($data.orderInfo.currentFee)
d: $data.orderInfo.payWay == "wx_score_pay"
}, $data.orderInfo.payWay == "wx_score_pay" ? {
e: common_assets._imports_0$2
} : {}, {
f: common_vendor.t($data.orderInfo.startTime),
g: common_vendor.t($data.orderInfo.usedTime),
h: common_vendor.t($data.orderInfo.currentFee)
}, {}, {
j: common_vendor.o((...args) => $options.checkReturnStatus && $options.checkReturnStatus(...args)),
k: common_vendor.o((...args) => $options.goToHome && $options.goToHome(...args))
l: common_vendor.o((...args) => $options.checkReturnStatus && $options.checkReturnStatus(...args)),
m: common_vendor.o((...args) => $options.goToHome && $options.goToHome(...args))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6d22bdf8"]]);
+1 -1
View File
@@ -1 +1 @@
<view class="return-container data-v-6d22bdf8"><view class="order-card data-v-6d22bdf8"><view class="order-header data-v-6d22bdf8"><text class="title data-v-6d22bdf8">{{a}}</text><text class="order-no data-v-6d22bdf8">订单号:{{b}}</text></view><view class="device-info data-v-6d22bdf8"><text class="device-name data-v-6d22bdf8">共享风扇</text><text class="device-id data-v-6d22bdf8">设备号:{{c}}</text></view><view class="time-info data-v-6d22bdf8"><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">开始时间</text><text class="value data-v-6d22bdf8">{{d}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">已使用时长</text><text class="value highlight data-v-6d22bdf8">{{e}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">当前费用</text><text class="value data-v-6d22bdf8">¥{{f}}</text></view></view><view wx:if="{{false}}" class="debug-info data-v-6d22bdf8"><view class="debug-title data-v-6d22bdf8">调试信息</view><view class="debug-item data-v-6d22bdf8">原始开始时间: {{g}}</view><view class="debug-item data-v-6d22bdf8">处理后开始时间: {{h}}</view><view class="debug-item data-v-6d22bdf8">订单状态: {{i}}</view></view></view><view class="notice-card data-v-6d22bdf8"><view class="notice-title data-v-6d22bdf8">归还说明</view><view class="notice-list data-v-6d22bdf8"><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">请确保设备完好无损</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">将充电宝插入原位置或空闲插口</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">系统将自动检测归还并处理退款</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">归还成功后将自动跳转到成功页面</text></view></view></view><view class="bottom-bar data-v-6d22bdf8"><button class="secondary-btn data-v-6d22bdf8" bindtap="{{j}}">刷新状态</button><button class="primary-btn data-v-6d22bdf8" bindtap="{{k}}">返回首页</button></view></view>
<view class="return-container data-v-6d22bdf8"><view class="order-card data-v-6d22bdf8"><view class="order-header data-v-6d22bdf8"><text class="title data-v-6d22bdf8">{{a}}</text><text class="order-no data-v-6d22bdf8">订单号:{{b}}</text></view><view class="device-info data-v-6d22bdf8"><view class="device-left data-v-6d22bdf8"><view class="device-name data-v-6d22bdf8">共享风扇</view><view class="device-id data-v-6d22bdf8">设备号:{{c}}</view></view><view class="device-right data-v-6d22bdf8"><view wx:if="{{d}}" class="payment-badge wx-score data-v-6d22bdf8"><image src="{{e}}" mode="aspectFit" class="badge-icon data-v-6d22bdf8"></image><view class="badge-text data-v-6d22bdf8"><text class="data-v-6d22bdf8">微信支付分</text><text class="divider data-v-6d22bdf8">|</text><text class="highlight data-v-6d22bdf8">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-6d22bdf8"><text class="badge-text data-v-6d22bdf8">押金租借</text></view></view></view><view class="time-info data-v-6d22bdf8"><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">开始时间</text><text class="value data-v-6d22bdf8">{{f}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">已使用时长</text><text class="value highlight data-v-6d22bdf8">{{g}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">当前费用</text><text class="value data-v-6d22bdf8">¥{{h}}</text></view></view><view wx:if="{{false}}" class="debug-info data-v-6d22bdf8"><view class="debug-title data-v-6d22bdf8">调试信息</view><view class="debug-item data-v-6d22bdf8">原始开始时间: {{i}}</view><view class="debug-item data-v-6d22bdf8">处理后开始时间: {{j}}</view><view class="debug-item data-v-6d22bdf8">订单状态: {{k}}</view></view></view><view class="notice-card data-v-6d22bdf8"><view class="notice-title data-v-6d22bdf8">归还说明</view><view class="notice-list data-v-6d22bdf8"><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">请确保设备完好无损</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">将充电宝插入原位置或空闲插口</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">系统将自动检测归还并处理退款</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">归还成功后将自动跳转到成功页面</text></view></view></view><view class="bottom-bar data-v-6d22bdf8"><view class="action-item secondary data-v-6d22bdf8" bindtap="{{l}}">刷新状态</view><view class="action-item primary data-v-6d22bdf8" bindtap="{{m}}">返回首页</view></view></view>
+72 -24
View File
@@ -25,14 +25,14 @@
/* 文章场景相关 */
.return-container.data-v-6d22bdf8 {
min-height: 100vh;
background: #f8f8f8;
background: #f7f8fa;
padding: 30rpx;
padding-bottom: 180rpx;
box-sizing: border-box;
}
.return-container .order-card.data-v-6d22bdf8 {
background: #fff;
border-radius: 24rpx;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
@@ -41,10 +41,12 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
margin-bottom: 20rpx;
padding-bottom: 16rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.return-container .order-card .order-header .title.data-v-6d22bdf8 {
font-size: 32rpx;
font-size: 30rpx;
font-weight: bold;
color: #333;
}
@@ -53,17 +55,60 @@
color: #999;
}
.return-container .order-card .device-info.data-v-6d22bdf8 {
margin-bottom: 30rpx;
margin-bottom: 24rpx;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.return-container .order-card .device-info .device-name.data-v-6d22bdf8 {
font-size: 28rpx;
.return-container .order-card .device-info .device-left.data-v-6d22bdf8 {
flex: 1;
margin-right: 20rpx;
}
.return-container .order-card .device-info .device-left .device-name.data-v-6d22bdf8 {
font-size: 32rpx;
font-weight: 500;
color: #333;
display: block;
margin-bottom: 10rpx;
margin-bottom: 8rpx;
}
.return-container .order-card .device-info .device-id.data-v-6d22bdf8 {
font-size: 24rpx;
.return-container .order-card .device-info .device-left .device-id.data-v-6d22bdf8 {
font-size: 26rpx;
color: #999;
margin-bottom: 0;
}
.return-container .order-card .device-info .device-right .payment-badge.data-v-6d22bdf8 {
display: inline-flex;
align-items: center;
padding: 6rpx 12rpx;
border-radius: 8rpx;
white-space: nowrap;
}
.return-container .order-card .device-info .device-right .payment-badge.wx-score.data-v-6d22bdf8 {
background: rgba(7, 193, 96, 0.08);
}
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-6d22bdf8 {
width: 32rpx;
height: 26rpx;
margin-right: 8rpx;
}
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text.data-v-6d22bdf8 {
font-size: 22rpx;
color: #07c160;
display: flex;
align-items: center;
}
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .divider.data-v-6d22bdf8 {
margin: 0 6rpx;
}
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-6d22bdf8 {
font-weight: 500;
}
.return-container .order-card .device-info .device-right .payment-badge.deposit.data-v-6d22bdf8 {
background: #f5f5f5;
}
.return-container .order-card .device-info .device-right .payment-badge.deposit .badge-text.data-v-6d22bdf8 {
font-size: 22rpx;
color: #666;
font-weight: 500;
}
.return-container .order-card .time-info.data-v-6d22bdf8 {
background: #f9f9f9;
@@ -88,18 +133,18 @@
color: #333;
}
.return-container .order-card .time-info .time-item .value.highlight.data-v-6d22bdf8 {
color: #ff6b00;
color: #ff6b6b;
font-weight: bold;
}
.return-container .notice-card.data-v-6d22bdf8 {
background: #fff;
border-radius: 24rpx;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
}
.return-container .notice-card .notice-title.data-v-6d22bdf8 {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
@@ -131,7 +176,8 @@
left: 0;
right: 0;
bottom: 0;
padding: 30rpx;
padding: 20rpx 30rpx;
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
background: #fff;
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.04);
z-index: 10;
@@ -139,25 +185,27 @@
justify-content: space-between;
gap: 20rpx;
}
.return-container .bottom-bar .primary-btn.data-v-6d22bdf8, .return-container .bottom-bar .secondary-btn.data-v-6d22bdf8 {
.return-container .bottom-bar .action-item.data-v-6d22bdf8 {
height: 88rpx;
line-height: 88rpx;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
border-radius: 44rpx;
text-align: center;
flex: 1;
}
.return-container .bottom-bar .primary-btn.data-v-6d22bdf8 {
.return-container .bottom-bar .action-item.primary.data-v-6d22bdf8 {
background: #07c160;
color: #fff;
}
.return-container .bottom-bar .primary-btn.data-v-6d22bdf8:active {
.return-container .bottom-bar .action-item.primary.data-v-6d22bdf8:active {
opacity: 0.8;
}
.return-container .bottom-bar .secondary-btn.data-v-6d22bdf8 {
background: #f0f0f0;
.return-container .bottom-bar .action-item.secondary.data-v-6d22bdf8 {
background: #f5f5f5;
color: #333;
border: 1rpx solid #e0e0e0;
}
.return-container .bottom-bar .secondary-btn.data-v-6d22bdf8:active {
.return-container .bottom-bar .action-item.secondary.data-v-6d22bdf8:active {
opacity: 0.8;
}
+32
View File
@@ -48,6 +48,37 @@ const getUserInfo = () => {
res(result);
});
};
const initiateWeChatScorePayment = (paymentData) => {
return new Promise((resolve, reject) => {
if (!paymentData || !paymentData.data || !paymentData.data.package) {
reject(new Error("支付参数不完整"));
return;
}
common_vendor.wx$1.openBusinessView({
businessType: "wxpayScoreUse",
extraData: {
mch_id: paymentData.data.mch_id,
package: paymentData.data.package
},
success: (businessRes) => {
common_vendor.index.__f__("log", "at util/index.js:92", "微信支付分小程序调用成功", businessRes);
if (businessRes.errMsg === "openBusinessView:ok") {
resolve(businessRes);
} else {
reject(new Error("支付流程未完成"));
}
},
fail: (error) => {
common_vendor.index.__f__("error", "at util/index.js:101", "微信支付分小程序调用失败", error);
common_vendor.index.showToast({
title: error.errMsg || "支付分接口调用失败",
icon: "none"
});
reject(error);
}
});
});
};
const getQueryString = function(url, name) {
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
var r = url.substr(1).match(reg);
@@ -58,5 +89,6 @@ const getQueryString = function(url, name) {
};
exports.getQueryString = getQueryString;
exports.getUserInfo = getUserInfo;
exports.initiateWeChatScorePayment = initiateWeChatScorePayment;
exports.wxLogin = wxLogin;
//# sourceMappingURL=../../.sourcemap/mp-weixin/util/index.js.map