Commit 4ef30ab1 by xuningning

订单详情增加order_sn

parent 39135f99
......@@ -97,13 +97,48 @@
created_at: null,
order_amount: null,
},
id: '',
id: '', // 订单ID
order_sn: '', // 订单号
btnFlag: false,
navBarHeight: getApp().globalData.navBarHeight,
}
},
onLoad(option) {
this.id = option.id;
// 检查是否是扫码或微信消息模板进入,参数可能在option.q中
if (option.q) {
try {
// 解码URL
const url = decodeURIComponent(option.q)
console.log('扫码/消息模板URL:', url)
// 提取查询参数
if (url.includes('?')) {
const paramStr = url.split('?')[1]
const params = {}
paramStr.split('&').forEach(item => {
const [key, value] = item.split('=')
if (key && value) {
params[key] = decodeURIComponent(value)
}
})
// 获取id或order_sn参数
if (params.id) {
this.id = params.id
console.log('从扫码/消息模板获取的订单ID:', this.id)
} else if (params.order_sn) {
this.order_sn = params.order_sn
console.log('从扫码/消息模板获取的订单号:', this.order_sn)
}
}
} catch (error) {
console.error('解析扫码/消息模板参数失败:', error)
}
} else {
// 普通页面跳转传参
this.id = option.id || '';
this.order_sn = option.order_sn || '';
}
},
onShow() {
this.btnFlag = false
......@@ -140,11 +175,21 @@
},
//获取订单详情
getOrder() {
this.$request('/order-info', 'GET', {
order_id: this.id
}).then(res => {
// 构建请求参数,优先使用 order_id,没有则使用 order_sn
let params = {};
if (this.id) {
params.order_id = this.id;
} else if (this.order_sn) {
params.order_sn = this.order_sn;
}
this.$request('/order-info', 'GET', params).then(res => {
console.log(res.data)
this.orderInfo = res.data;
// 如果通过 order_sn 获取,保存 id 供后续使用
if (!this.id && res.data.id) {
this.id = res.data.id;
}
}).catch(err => {
uni.showToast({
icon: 'error',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/login/login","pages/product/product","pages/shoppingCart/shoppingCart","pages/personalCenter/personalCenter","pageSub-pc/pages/myBalance/myBalance","pageSub-pc/pages/myFriend/myFriend","pageSub-pc/pages/addbank/addbank","pageSub-pc/pages/mybankList/mybankList","pageSub-pc/pages/myCollection/myCollection","pageSub-pc/pages/platformService/platformService","pageSub-pc/pages/withdrawal/withdrawal","pageSub-pc/pages/myOrderlist/myOrderlist","pageSub-pc/pages/orderDetail/orderDetail","pageSub-pc/pages/editMyinfo/editMyinfo","pageSub-pc/pages/writeEvaluation/writeEvaluation","pageSub-pc/pages/orderCode/orderCode","pageSub-index/pages/activityList/activityList","pageSub-index/pages/redemptionCode/redemptionCode","pageSub-index/pages/companyProfile/companyProfile","pageSub-index/pages/healthStation/healthStation","pageSub-index/pages/inviteFriends/inviteFriends","pageSub-index/pages/healthStationDetail/healthStationDetail","pageSub-product/pages/productDetails/productDetails","pageSub-product/pages/confirmOrder/confirmOrder","pageSub-product/pages/commentList/commentList","pageSub-product/pages/addressList/addressList"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"","navigationBarBackgroundColor":"#FFFFFF","backgroundColor":"#FFFFFF"},"tabBar":{"custom":true,"list":[{"pagePath":"pages/index/index"},{"pagePath":"pages/product/product"},{"pagePath":"pages/shoppingCart/shoppingCart"},{"pagePath":"pages/personalCenter/personalCenter"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"点点约","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/login/login","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/product/product","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"商品"}},{"path":"/pages/shoppingCart/shoppingCart","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"购物车","navigationBarBackgroundColor":"#f3d4d7"}},{"path":"/pages/personalCenter/personalCenter","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom"}},{"path":"/pageSub-pc/pages/myBalance/myBalance","meta":{},"window":{"navigationBarTitleText":"我的余额"}},{"path":"/pageSub-pc/pages/myFriend/myFriend","meta":{},"window":{"navigationBarTitleText":"我的好友"}},{"path":"/pageSub-pc/pages/addbank/addbank","meta":{},"window":{"navigationBarTitleText":"添加银行卡"}},{"path":"/pageSub-pc/pages/mybankList/mybankList","meta":{},"window":{"navigationBarTitleText":"银行卡"}},{"path":"/pageSub-pc/pages/myCollection/myCollection","meta":{},"window":{"navigationBarTitleText":"我的收藏"}},{"path":"/pageSub-pc/pages/platformService/platformService","meta":{},"window":{"navigationBarTitleText":"平台客服"}},{"path":"/pageSub-pc/pages/withdrawal/withdrawal","meta":{},"window":{"navigationBarTitleText":"提现"}},{"path":"/pageSub-pc/pages/myOrderlist/myOrderlist","meta":{},"window":{"navigationBarTitleText":"我的订单"}},{"path":"/pageSub-pc/pages/orderDetail/orderDetail","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pageSub-pc/pages/editMyinfo/editMyinfo","meta":{},"window":{"navigationBarTitleText":"个人信息"}},{"path":"/pageSub-pc/pages/writeEvaluation/writeEvaluation","meta":{},"window":{"navigationBarTitleText":"评价"}},{"path":"/pageSub-pc/pages/orderCode/orderCode","meta":{},"window":{"navigationBarTitleText":"核销码"}},{"path":"/pageSub-index/pages/activityList/activityList","meta":{},"window":{"navigationBarTitleText":"热门活动"}},{"path":"/pageSub-index/pages/redemptionCode/redemptionCode","meta":{},"window":{"navigationBarTitleText":"直购码兑换"}},{"path":"/pageSub-index/pages/companyProfile/companyProfile","meta":{},"window":{"navigationBarTitleText":"公司介绍"}},{"path":"/pageSub-index/pages/healthStation/healthStation","meta":{},"window":{"navigationBarTitleText":"养生小站"}},{"path":"/pageSub-index/pages/inviteFriends/inviteFriends","meta":{},"window":{"navigationBarTitleText":"邀请好友"}},{"path":"/pageSub-index/pages/healthStationDetail/healthStationDetail","meta":{},"window":{"navigationBarTitleText":"养生小站"}},{"path":"/pageSub-product/pages/productDetails/productDetails","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pageSub-product/pages/confirmOrder/confirmOrder","meta":{},"window":{"navigationBarTitleText":"确认订单","navigationBarBackgroundColor":"#f3d4d7"}},{"path":"/pageSub-product/pages/commentList/commentList","meta":{},"window":{"navigationBarTitleText":"用户评价"}},{"path":"/pageSub-product/pages/addressList/addressList","meta":{},"window":{"navigationBarTitleText":"快递送达地址"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "app-config": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/ var jsonpArray = this["webpackJsonp"] = this["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__D8F7130","name":"点点约","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Payment":{},"OAuth":{},"Share":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"splashscreen":{"useOriginalMsgbox":true},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"payment":{"weixin":{"__platform__":["ios","android"],"appid":"wx1e817ce0a1b89375","UniversalLinks":""}},"oauth":{"weixin":{"appid":"wx1e817ce0a1b89375","UniversalLinks":""}},"share":{"weixin":{"appid":"wx1e817ce0a1b89375","UniversalLinks":""}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.76","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"custom":true,"list":[{"pagePath":"pages/index/index"},{"pagePath":"pages/product/product"},{"pagePath":"pages/shoppingCart/shoppingCart"},{"pagePath":"pages/personalCenter/personalCenter"}],"borderStyle":"rgba(0,0,0,0.4)","selectedColor":"#0062cc","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment