国电接口改造
Showing
114 changed files
with
279 additions
and
108 deletions
| ... | @@ -12,14 +12,9 @@ | ... | @@ -12,14 +12,9 @@ |
| 12 | <title></title> | 12 | <title></title> |
| 13 | <!--preload-links--> | 13 | <!--preload-links--> |
| 14 | <!--app-context--> | 14 | <!--app-context--> |
| 15 | <style> | ||
| 16 | * { | ||
| 17 | box-sizing: border-box; | ||
| 18 | } | ||
| 19 | </style> | ||
| 20 | </head> | 15 | </head> |
| 21 | <body> | 16 | <body> |
| 22 | <div id="app"><!--app-html--></div> | 17 | <div id="app"><!--app-html--></div> |
| 23 | <script type="module" src="/main.js"></script> | 18 | <script type="module" src="/src/main.js"></script> |
| 24 | </body> | 19 | </body> |
| 25 | </html> | 20 | </html> | ... | ... |
manifest.json
deleted
100644 → 0
| 1 | { | ||
| 2 | "name" : "miniP", | ||
| 3 | "appid" : "__UNI__580BCB0", | ||
| 4 | "description" : "", | ||
| 5 | "versionName" : "1.0.1", | ||
| 6 | "versionCode" : "100", | ||
| 7 | "transformPx" : false, | ||
| 8 | /* 5+App特有相关 */ | ||
| 9 | "app-plus" : { | ||
| 10 | "usingComponents" : true, | ||
| 11 | "nvueStyleCompiler" : "uni-app", | ||
| 12 | "compilerVersion" : 3, | ||
| 13 | "splashscreen" : { | ||
| 14 | "alwaysShowBeforeRender" : true, | ||
| 15 | "waiting" : true, | ||
| 16 | "autoclose" : true, | ||
| 17 | "delay" : 0 | ||
| 18 | }, | ||
| 19 | /* 模块配置 */ | ||
| 20 | "modules" : {}, | ||
| 21 | /* 应用发布信息 */ | ||
| 22 | "distribute" : { | ||
| 23 | /* android打包配置 */ | ||
| 24 | "android" : { | ||
| 25 | "permissions" : [], | ||
| 26 | "autoSdkPermissions" : true | ||
| 27 | }, | ||
| 28 | /* ios打包配置 */ | ||
| 29 | "ios" : { | ||
| 30 | "permissions" : [], | ||
| 31 | "autoSdkPermissions" : true | ||
| 32 | }, | ||
| 33 | /* SDK配置 */ | ||
| 34 | "sdkConfigs" : {} | ||
| 35 | } | ||
| 36 | }, | ||
| 37 | /* 快应用特有相关 */ | ||
| 38 | "quickapp" : {}, | ||
| 39 | /* 小程序特有相关 */ | ||
| 40 | "mp-weixin" : { | ||
| 41 | "appid" : "wx5d51e8ed31bbdbb7", //J系统 | ||
| 42 | |||
| 43 | // "appid" : "wx70f16625f10de4fe",//新跆联 | ||
| 44 | // "appid" : "wx5e2471ed6210c3a6", | ||
| 45 | "setting" : { | ||
| 46 | "urlCheck" : false, | ||
| 47 | "minified" : false, | ||
| 48 | "es6" : true | ||
| 49 | }, | ||
| 50 | "usingComponents" : true, | ||
| 51 | "permission" : {}, | ||
| 52 | "optimization" : { | ||
| 53 | "subPackages" : true | ||
| 54 | } | ||
| 55 | }, | ||
| 56 | "mp-alipay" : { | ||
| 57 | "usingComponents" : true | ||
| 58 | }, | ||
| 59 | "mp-baidu" : { | ||
| 60 | "usingComponents" : true | ||
| 61 | }, | ||
| 62 | "mp-toutiao" : { | ||
| 63 | "usingComponents" : true | ||
| 64 | }, | ||
| 65 | "uniStatistics" : { | ||
| 66 | "enable" : false | ||
| 67 | }, | ||
| 68 | "vueVersion" : "3", | ||
| 69 | "h5" : { | ||
| 70 | "router" : { | ||
| 71 | "mode" : "history" | ||
| 72 | } | ||
| 73 | } | ||
| 74 | } |
| 1 | { | 1 | { |
| 2 | "name": "uni-preset-vue", | ||
| 3 | "version": "0.0.0", | ||
| 4 | "scripts": { | ||
| 5 | "dev:custom": "uni -p", | ||
| 6 | "dev:h5": "uni", | ||
| 7 | "dev:h5:ssr": "uni --ssr", | ||
| 8 | "dev:mp-alipay": "uni -p mp-alipay", | ||
| 9 | "dev:mp-baidu": "uni -p mp-baidu", | ||
| 10 | "dev:mp-jd": "uni -p mp-jd", | ||
| 11 | "dev:mp-kuaishou": "uni -p mp-kuaishou", | ||
| 12 | "dev:mp-lark": "uni -p mp-lark", | ||
| 13 | "dev:mp-qq": "uni -p mp-qq", | ||
| 14 | "dev:mp-toutiao": "uni -p mp-toutiao", | ||
| 15 | "dev:mp-weixin": "uni -p mp-weixin", | ||
| 16 | "dev:mp-xhs": "uni -p mp-xhs", | ||
| 17 | "dev:quickapp-webview": "uni -p quickapp-webview", | ||
| 18 | "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", | ||
| 19 | "dev:quickapp-webview-union": "uni -p quickapp-webview-union", | ||
| 20 | "build:custom": "uni build -p", | ||
| 21 | "build:h5": "uni build", | ||
| 22 | "build:h5:ssr": "uni build --ssr", | ||
| 23 | "build:mp-alipay": "uni build -p mp-alipay", | ||
| 24 | "build:mp-baidu": "uni build -p mp-baidu", | ||
| 25 | "build:mp-jd": "uni build -p mp-jd", | ||
| 26 | "build:mp-kuaishou": "uni build -p mp-kuaishou", | ||
| 27 | "build:mp-lark": "uni build -p mp-lark", | ||
| 28 | "build:mp-qq": "uni build -p mp-qq", | ||
| 29 | "build:mp-toutiao": "uni build -p mp-toutiao", | ||
| 30 | "build:mp-weixin": "uni build -p mp-weixin", | ||
| 31 | "build:mp-xhs": "uni build -p mp-xhs", | ||
| 32 | "build:quickapp-webview": "uni build -p quickapp-webview", | ||
| 33 | "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei", | ||
| 34 | "build:quickapp-webview-union": "uni build -p quickapp-webview-union" | ||
| 35 | }, | ||
| 2 | "dependencies": { | 36 | "dependencies": { |
| 37 | "@dcloudio/uni-app": "3.0.0-4020920240930001", | ||
| 38 | "@dcloudio/uni-app-harmony": "3.0.0-4020920240930001", | ||
| 39 | "@dcloudio/uni-app-plus": "3.0.0-4020920240930001", | ||
| 40 | "@dcloudio/uni-components": "3.0.0-4020920240930001", | ||
| 41 | "@dcloudio/uni-h5": "3.0.0-4020920240930001", | ||
| 42 | "@dcloudio/uni-mp-alipay": "3.0.0-4020920240930001", | ||
| 43 | "@dcloudio/uni-mp-baidu": "3.0.0-4020920240930001", | ||
| 44 | "@dcloudio/uni-mp-jd": "3.0.0-4020920240930001", | ||
| 45 | "@dcloudio/uni-mp-kuaishou": "3.0.0-4020920240930001", | ||
| 46 | "@dcloudio/uni-mp-lark": "3.0.0-4020920240930001", | ||
| 47 | "@dcloudio/uni-mp-qq": "3.0.0-4020920240930001", | ||
| 48 | "@dcloudio/uni-mp-toutiao": "3.0.0-4020920240930001", | ||
| 49 | "@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001", | ||
| 50 | "@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001", | ||
| 51 | "@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001", | ||
| 52 | "@vitejs/plugin-legacy": "^5.4.3", | ||
| 3 | "dayjs": "^1.11.6", | 53 | "dayjs": "^1.11.6", |
| 4 | "lodash": "^4.17.21" | 54 | "lodash": "^4.17.21", |
| 55 | "sass": "^1.81.0", | ||
| 56 | "vue": "^3.4.21", | ||
| 57 | "vue-i18n": "^9.1.9" | ||
| 5 | }, | 58 | }, |
| 6 | "devDependencies": { | 59 | "devDependencies": { |
| 7 | "@rollup/plugin-commonjs": "^22.0.0" | 60 | "@dcloudio/types": "^3.4.8", |
| 61 | "@dcloudio/uni-automator": "3.0.0-4020920240930001", | ||
| 62 | "@dcloudio/uni-cli-shared": "3.0.0-4020920240930001", | ||
| 63 | "@dcloudio/uni-stacktracey": "3.0.0-4020920240930001", | ||
| 64 | "@dcloudio/vite-plugin-uni": "3.0.0-4020920240930001", | ||
| 65 | "@vue/runtime-core": "^3.4.21", | ||
| 66 | "vite": "5.2.8" | ||
| 8 | } | 67 | } |
| 9 | } | 68 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -55,8 +55,11 @@ | ... | @@ -55,8 +55,11 @@ |
| 55 | 55 | ||
| 56 | <style lang="scss"> | 56 | <style lang="scss"> |
| 57 | /*每个页面公共css */ | 57 | /*每个页面公共css */ |
| 58 | @import '/common/uni.css'; | 58 | @import './common/uni.css'; |
| 59 | @import '/common/mystyle.scss'; | 59 | @import './common/mystyle.scss'; |
| 60 | @import '@/static/font/iconfont.css'; | 60 | @import '@/static/font/iconfont.css'; |
| 61 | .uni-modal__textarea{height: 50px;} | 61 | |
| 62 | .uni-modal__textarea { | ||
| 63 | height: 50px; | ||
| 64 | } | ||
| 62 | </style> | 65 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
File moved
| ... | @@ -8,6 +8,7 @@ function getTrainList(params) { | ... | @@ -8,6 +8,7 @@ function getTrainList(params) { |
| 8 | params: params | 8 | params: params |
| 9 | }) | 9 | }) |
| 10 | } | 10 | } |
| 11 | |||
| 11 | function getComanyList(params) { | 12 | function getComanyList(params) { |
| 12 | return request({ | 13 | return request({ |
| 13 | url: `/system/billing/list`, | 14 | url: `/system/billing/list`, |
| ... | @@ -15,6 +16,7 @@ function getComanyList(params) { | ... | @@ -15,6 +16,7 @@ function getComanyList(params) { |
| 15 | params: params | 16 | params: params |
| 16 | }) | 17 | }) |
| 17 | } | 18 | } |
| 19 | |||
| 18 | function getTrainDetail(id) { | 20 | function getTrainDetail(id) { |
| 19 | return request({ | 21 | return request({ |
| 20 | url: `/train/info/getTrainByUser/${id}`, | 22 | url: `/train/info/getTrainByUser/${id}`, |
| ... | @@ -22,6 +24,7 @@ function getTrainDetail(id) { | ... | @@ -22,6 +24,7 @@ function getTrainDetail(id) { |
| 22 | params: id | 24 | params: id |
| 23 | }) | 25 | }) |
| 24 | } | 26 | } |
| 27 | |||
| 25 | function submitOrder(params) { | 28 | function submitOrder(params) { |
| 26 | return request({ | 29 | return request({ |
| 27 | url: `/train/order/submitOrder`, | 30 | url: `/train/order/submitOrder`, |
| ... | @@ -29,30 +32,35 @@ function submitOrder(params) { | ... | @@ -29,30 +32,35 @@ function submitOrder(params) { |
| 29 | params: params | 32 | params: params |
| 30 | }) | 33 | }) |
| 31 | } | 34 | } |
| 35 | |||
| 32 | function getOrderInfoByOrderId(orderId) { | 36 | function getOrderInfoByOrderId(orderId) { |
| 33 | return request({ | 37 | return request({ |
| 34 | url: `/train/orderInfo/getOrderInfoByOrderId?orderId=${orderId}`, | 38 | url: `/train/orderInfo/getOrderInfoByOrderId?orderId=${orderId}`, |
| 35 | method: 'get' | 39 | method: 'get' |
| 36 | }) | 40 | }) |
| 37 | } | 41 | } |
| 42 | |||
| 38 | function newbilllist() { | 43 | function newbilllist() { |
| 39 | return request({ | 44 | return request({ |
| 40 | url: `/train/order/getOrderbyUser `, | 45 | url: `/train/order/getOrderbyUser `, |
| 41 | method: 'get' | 46 | method: 'get' |
| 42 | }) | 47 | }) |
| 43 | } | 48 | } |
| 49 | |||
| 44 | function getInvoiceByActiveId(trainId) { | 50 | function getInvoiceByActiveId(trainId) { |
| 45 | return request({ | 51 | return request({ |
| 46 | url: `/train/invoice/list?trainId=${trainId}`, | 52 | url: `/train/invoice/list?trainId=${trainId}`, |
| 47 | method: 'get' | 53 | method: 'get' |
| 48 | }) | 54 | }) |
| 49 | } | 55 | } |
| 56 | |||
| 50 | function getCanInvoiceBills(trainId) { | 57 | function getCanInvoiceBills(trainId) { |
| 51 | return request({ | 58 | return request({ |
| 52 | url: `/train/orderInfo/getOrderInfoByKp?isInvoice=0&trainId=${trainId}`, | 59 | url: `/train/orderInfo/getOrderInfoByKp?isInvoice=0&trainId=${trainId}`, |
| 53 | method: 'get' | 60 | method: 'get' |
| 54 | }) | 61 | }) |
| 55 | } | 62 | } |
| 63 | |||
| 56 | function addAddress(form) { | 64 | function addAddress(form) { |
| 57 | return request({ | 65 | return request({ |
| 58 | url: `/train/invoiceInfo`, | 66 | url: `/train/invoiceInfo`, |
| ... | @@ -60,24 +68,28 @@ function addAddress(form) { | ... | @@ -60,24 +68,28 @@ function addAddress(form) { |
| 60 | params: form | 68 | params: form |
| 61 | }) | 69 | }) |
| 62 | } | 70 | } |
| 71 | |||
| 63 | function delAddress(ids) { | 72 | function delAddress(ids) { |
| 64 | return request({ | 73 | return request({ |
| 65 | url: `/train/invoiceInfo/${ids}`, | 74 | url: `/train/invoiceInfo/${ids}`, |
| 66 | method: 'delete' | 75 | method: 'delete' |
| 67 | }) | 76 | }) |
| 68 | } | 77 | } |
| 78 | |||
| 69 | function regionsList() { | 79 | function regionsList() { |
| 70 | return request({ | 80 | return request({ |
| 71 | url: `/systemj/region/regionsList`, | 81 | url: `/systemj/region/regionsList`, |
| 72 | method: 'get' | 82 | method: 'get' |
| 73 | }) | 83 | }) |
| 74 | } | 84 | } |
| 85 | |||
| 75 | function addressList() { | 86 | function addressList() { |
| 76 | return request({ | 87 | return request({ |
| 77 | url: `/train/invoiceInfo/list`, | 88 | url: `/train/invoiceInfo/list`, |
| 78 | method: 'get' | 89 | method: 'get' |
| 79 | }) | 90 | }) |
| 80 | } | 91 | } |
| 92 | |||
| 81 | function submitInvoice(form) { | 93 | function submitInvoice(form) { |
| 82 | return request({ | 94 | return request({ |
| 83 | url: `/train/invoice`, | 95 | url: `/train/invoice`, |
| ... | @@ -85,19 +97,22 @@ function submitInvoice(form) { | ... | @@ -85,19 +97,22 @@ function submitInvoice(form) { |
| 85 | params: form | 97 | params: form |
| 86 | }) | 98 | }) |
| 87 | } | 99 | } |
| 100 | |||
| 88 | function editInvoice(form) { | 101 | function editInvoice(form) { |
| 89 | return request({ | 102 | return request({ |
| 90 | url: `/train/invoice`, | 103 | url: `/train/invoice/edit`, |
| 91 | method: 'put', | 104 | method: 'post', |
| 92 | params: form | 105 | params: form |
| 93 | }) | 106 | }) |
| 94 | } | 107 | } |
| 108 | |||
| 95 | function getInvoiceDetailBills(invoiceId) { | 109 | function getInvoiceDetailBills(invoiceId) { |
| 96 | return request({ | 110 | return request({ |
| 97 | url: `/train/orderInfo/getOrderInfoByKp?invoiceId=${invoiceId}`, | 111 | url: `/train/orderInfo/getOrderInfoByKp?invoiceId=${invoiceId}`, |
| 98 | method: 'get' | 112 | method: 'get' |
| 99 | }) | 113 | }) |
| 100 | } | 114 | } |
| 115 | |||
| 101 | function getInvoiceDetail(invoiceId) { | 116 | function getInvoiceDetail(invoiceId) { |
| 102 | return request({ | 117 | return request({ |
| 103 | url: `/train/invoice/${invoiceId}`, | 118 | url: `/train/invoice/${invoiceId}`, |
| ... | @@ -116,7 +131,7 @@ function getInvoiceByUserId() { | ... | @@ -116,7 +131,7 @@ function getInvoiceByUserId() { |
| 116 | 131 | ||
| 117 | 132 | ||
| 118 | 133 | ||
| 119 | function getbilllist(userId,venueId) { | 134 | function getbilllist(userId, venueId) { |
| 120 | return request({ | 135 | return request({ |
| 121 | url: `/logex/order/list?createById=${userId}&venueId=${venueId}`, | 136 | url: `/logex/order/list?createById=${userId}&venueId=${venueId}`, |
| 122 | method: 'get', | 137 | method: 'get', |
| ... | @@ -133,6 +148,7 @@ function getbilldetailbyId(orderId) { | ... | @@ -133,6 +148,7 @@ function getbilldetailbyId(orderId) { |
| 133 | params: orderId | 148 | params: orderId |
| 134 | }) | 149 | }) |
| 135 | } | 150 | } |
| 151 | |||
| 136 | function getFoodBilldetailbyId(orderId) { | 152 | function getFoodBilldetailbyId(orderId) { |
| 137 | return request({ | 153 | return request({ |
| 138 | url: `/logex/orderFood/getFoodOrderInfoByOrder?orderId=${orderId}`, | 154 | url: `/logex/orderFood/getFoodOrderInfoByOrder?orderId=${orderId}`, |
| ... | @@ -192,6 +208,7 @@ function getActivityRestaurantList(params) { | ... | @@ -192,6 +208,7 @@ function getActivityRestaurantList(params) { |
| 192 | params: params | 208 | params: params |
| 193 | }) | 209 | }) |
| 194 | } | 210 | } |
| 211 | |||
| 195 | function getActivityCarList(params) { | 212 | function getActivityCarList(params) { |
| 196 | return request({ | 213 | return request({ |
| 197 | url: `/logex/activityVehicle/wxList`, | 214 | url: `/logex/activityVehicle/wxList`, |
| ... | @@ -199,12 +216,14 @@ function getActivityCarList(params) { | ... | @@ -199,12 +216,14 @@ function getActivityCarList(params) { |
| 199 | params: params | 216 | params: params |
| 200 | }) | 217 | }) |
| 201 | } | 218 | } |
| 219 | |||
| 202 | function getMenuById(id) { | 220 | function getMenuById(id) { |
| 203 | return request({ | 221 | return request({ |
| 204 | url: `/logex/activityFood/list?larId=${id}`, | 222 | url: `/logex/activityFood/list?larId=${id}`, |
| 205 | method: 'get' | 223 | method: 'get' |
| 206 | }) | 224 | }) |
| 207 | } | 225 | } |
| 226 | |||
| 208 | function submitOrderFood(form) { | 227 | function submitOrderFood(form) { |
| 209 | return request({ | 228 | return request({ |
| 210 | url: `/logex/norder/submitOrderFood`, | 229 | url: `/logex/norder/submitOrderFood`, |
| ... | @@ -212,6 +231,7 @@ function submitOrderFood(form) { | ... | @@ -212,6 +231,7 @@ function submitOrderFood(form) { |
| 212 | params: form | 231 | params: form |
| 213 | }) | 232 | }) |
| 214 | } | 233 | } |
| 234 | |||
| 215 | function submitOrderCar(form) { | 235 | function submitOrderCar(form) { |
| 216 | return request({ | 236 | return request({ |
| 217 | url: `/logex/norder/submitOrderCar`, | 237 | url: `/logex/norder/submitOrderCar`, |
| ... | @@ -219,6 +239,7 @@ function submitOrderCar(form) { | ... | @@ -219,6 +239,7 @@ function submitOrderCar(form) { |
| 219 | params: form | 239 | params: form |
| 220 | }) | 240 | }) |
| 221 | } | 241 | } |
| 242 | |||
| 222 | function newsSubmitOrderHotel(form) { | 243 | function newsSubmitOrderHotel(form) { |
| 223 | return request({ | 244 | return request({ |
| 224 | url: `/logex/norder/submitOrderRoom`, | 245 | url: `/logex/norder/submitOrderRoom`, |
| ... | @@ -226,12 +247,36 @@ function newsSubmitOrderHotel(form) { | ... | @@ -226,12 +247,36 @@ function newsSubmitOrderHotel(form) { |
| 226 | params: form | 247 | params: form |
| 227 | }) | 248 | }) |
| 228 | } | 249 | } |
| 229 | export {getTrainList,getOrderInfoByOrderId | 250 | export { |
| 230 | ,getTrainDetail,submitOrder,getbilllist,getbilldetailbyId, | 251 | getTrainList, |
| 231 | payForOrder,cancelOrder,getCanInvoiceBills,submitInvoice,getInvoiceByActiveId,getInvoiceDetailBills, | 252 | getOrderInfoByOrderId, |
| 232 | getInvoiceDetail,getInvoiceByUserId,editInvoice,addAddress,regionsList,addressList,delAddress, | 253 | getTrainDetail, |
| 233 | checkResidueRoom,getActivityRestaurantList,getMenuById, | 254 | submitOrder, |
| 234 | submitOrderFood,getActivityCarList,submitOrderCar,newsSubmitOrderHotel,newbilllist, | 255 | getbilllist, |
| 235 | getFoodBilldetailbyId,getCarBilldetailbyId, | 256 | getbilldetailbyId, |
| 236 | cancelOrder2,getComanyList | 257 | payForOrder, |
| 258 | cancelOrder, | ||
| 259 | getCanInvoiceBills, | ||
| 260 | submitInvoice, | ||
| 261 | getInvoiceByActiveId, | ||
| 262 | getInvoiceDetailBills, | ||
| 263 | getInvoiceDetail, | ||
| 264 | getInvoiceByUserId, | ||
| 265 | editInvoice, | ||
| 266 | addAddress, | ||
| 267 | regionsList, | ||
| 268 | addressList, | ||
| 269 | delAddress, | ||
| 270 | checkResidueRoom, | ||
| 271 | getActivityRestaurantList, | ||
| 272 | getMenuById, | ||
| 273 | submitOrderFood, | ||
| 274 | getActivityCarList, | ||
| 275 | submitOrderCar, | ||
| 276 | newsSubmitOrderHotel, | ||
| 277 | newbilllist, | ||
| 278 | getFoodBilldetailbyId, | ||
| 279 | getCarBilldetailbyId, | ||
| 280 | cancelOrder2, | ||
| 281 | getComanyList | ||
| 237 | } | 282 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
File moved
| ... | @@ -25,18 +25,28 @@ function getToken() { | ... | @@ -25,18 +25,28 @@ function getToken() { |
| 25 | 25 | ||
| 26 | // 获取请求头 | 26 | // 获取请求头 |
| 27 | function getHeaders() { | 27 | function getHeaders() { |
| 28 | let token = getToken() | 28 | const token = getToken() |
| 29 | let header = { | 29 | const header = { |
| 30 | "Authorization": token, | 30 | "Authorization": token, |
| 31 | "Content-Type": "application/json", //根据自己的数据类型 | 31 | "Content-Type": "application/json", |
| 32 | // "Content-Type":"application/x-www-form-urlencoded", | 32 | } |
| 33 | return header | ||
| 34 | } | ||
| 35 | |||
| 36 | function getHeaders2() { | ||
| 37 | const token = getToken() | ||
| 38 | const header = { | ||
| 39 | "isToken": false, | ||
| 40 | "Authorization": token, | ||
| 41 | 'content-type': 'application/x-www-form-urlencoded' | ||
| 33 | } | 42 | } |
| 34 | return header | 43 | return header |
| 35 | } | 44 | } |
| 36 | 45 | ||
| 37 | let request = function(req) { | 46 | let request = function(req) { |
| 38 | req.method = req.method.toUpperCase() | 47 | req.method = req.method.toUpperCase() |
| 39 | if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) { | 48 | // if (!['GET', 'POST', 'PUT', 'DELETE'].includes(req.method)) { |
| 49 | if (!['GET', 'POST'].includes(req.method)) { | ||
| 40 | uni.showToast({ | 50 | uni.showToast({ |
| 41 | title: `暂不支持的请求方式: ${req.method}`, | 51 | title: `暂不支持的请求方式: ${req.method}`, |
| 42 | icon: 'none' | 52 | icon: 'none' |
| ... | @@ -50,16 +60,33 @@ let request = function(req) { | ... | @@ -50,16 +60,33 @@ let request = function(req) { |
| 50 | // }) | 60 | // }) |
| 51 | // } | 61 | // } |
| 52 | 62 | ||
| 63 | const baseUrl = config.localPort + '/jsintszxd/request' | ||
| 64 | let url, data | ||
| 65 | if (req.method === 'POST') { | ||
| 66 | url = baseUrl | ||
| 67 | data = { | ||
| 68 | appSecretId: config.appSecretId, | ||
| 69 | restApi: req.url, | ||
| 70 | params: 'jsonBody=' + JSON.stringify(req.params) | ||
| 71 | } | ||
| 72 | } else { | ||
| 73 | url = `${baseUrl}?appSecretId=${config.appSecretId}&restApi=${encodeURIComponent(req.url)}` | ||
| 74 | } | ||
| 75 | |||
| 53 | return new Promise((resolve, reject) => { | 76 | return new Promise((resolve, reject) => { |
| 54 | uni.request({ | 77 | uni.request({ |
| 55 | url: config.baseUrl_api + req.url, | 78 | // url: config.baseUrl_api + req.url, |
| 79 | url: url, | ||
| 56 | method: req.method, | 80 | method: req.method, |
| 57 | data: req.params, | 81 | // data: req.params, |
| 58 | header: getHeaders(), | 82 | // header: getHeaders(), |
| 83 | data: data, | ||
| 84 | header: getHeaders2() | ||
| 59 | }).then(res => { | 85 | }).then(res => { |
| 60 | switch (res.statusCode) { | 86 | switch (res.statusCode) { |
| 61 | case 200: | 87 | case 200: |
| 62 | const data = res.data || {}; | 88 | // const data = res.data || {}; |
| 89 | const data = res.data.data || {}; | ||
| 63 | if (data.code == 200) { | 90 | if (data.code == 200) { |
| 64 | resolve(data) | 91 | resolve(data) |
| 65 | } else { | 92 | } else { | ... | ... |
File moved
File moved
| ... | @@ -5,7 +5,12 @@ | ... | @@ -5,7 +5,12 @@ |
| 5 | // staging | 5 | // staging |
| 6 | const baseUrl_api = "http://192.168.1.118:6688"; | 6 | const baseUrl_api = "http://192.168.1.118:6688"; |
| 7 | // const baseUrl_api = "http://123.60.96.243:6688"; | 7 | // const baseUrl_api = "http://123.60.96.243:6688"; |
| 8 | // const baseUrl_api = "http://121.4.115.48:27001/jsintszxd/request"; | ||
| 9 | const appSecretId = 'af14ef3f-ebec-446c-8d1f-c4afa60dd095'; | ||
| 10 | const localPort = localStorage.getItem('localPort') | ||
| 8 | 11 | ||
| 9 | export default { | 12 | export default { |
| 10 | baseUrl_api | 13 | localPort, |
| 14 | baseUrl_api, | ||
| 15 | appSecretId | ||
| 11 | } | 16 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/index.html
0 → 100644
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="UTF-8" /> | ||
| 5 | <script> | ||
| 6 | var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || | ||
| 7 | CSS.supports('top: constant(a)')) | ||
| 8 | document.write( | ||
| 9 | '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + | ||
| 10 | (coverSupport ? ', viewport-fit=cover' : '') + '" />') | ||
| 11 | </script> | ||
| 12 | <title></title> | ||
| 13 | <!--preload-links--> | ||
| 14 | <!--app-context--> | ||
| 15 | <style> | ||
| 16 | * { | ||
| 17 | box-sizing: border-box; | ||
| 18 | } | ||
| 19 | </style> | ||
| 20 | </head> | ||
| 21 | <body> | ||
| 22 | <div id="app"><!--app-html--></div> | ||
| 23 | <script type="module" src="/main.js"></script> | ||
| 24 | </body> | ||
| 25 | </html> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
File moved
src/manifest.json
0 → 100644
| 1 | { | ||
| 2 | "name": "miniP", | ||
| 3 | "appid": "__UNI__580BCB0", | ||
| 4 | "description": "", | ||
| 5 | "versionName": "1.0.1", | ||
| 6 | "versionCode": "100", | ||
| 7 | "transformPx": false, | ||
| 8 | /* 5+App特有相关 */ | ||
| 9 | "app-plus": { | ||
| 10 | "usingComponents": true, | ||
| 11 | "nvueStyleCompiler": "uni-app", | ||
| 12 | "compilerVersion": 3, | ||
| 13 | "splashscreen": { | ||
| 14 | "alwaysShowBeforeRender": true, | ||
| 15 | "waiting": true, | ||
| 16 | "autoclose": true, | ||
| 17 | "delay": 0 | ||
| 18 | }, | ||
| 19 | /* 模块配置 */ | ||
| 20 | "modules": {}, | ||
| 21 | /* 应用发布信息 */ | ||
| 22 | "distribute": { | ||
| 23 | /* android打包配置 */ | ||
| 24 | "android": { | ||
| 25 | "permissions": [], | ||
| 26 | "autoSdkPermissions": true | ||
| 27 | }, | ||
| 28 | /* ios打包配置 */ | ||
| 29 | "ios": { | ||
| 30 | "permissions": [], | ||
| 31 | "autoSdkPermissions": true | ||
| 32 | }, | ||
| 33 | /* SDK配置 */ | ||
| 34 | "sdkConfigs": {} | ||
| 35 | } | ||
| 36 | }, | ||
| 37 | /* 快应用特有相关 */ | ||
| 38 | "quickapp": {}, | ||
| 39 | /* 小程序特有相关 */ | ||
| 40 | "mp-weixin": { | ||
| 41 | "appid": "wx5d51e8ed31bbdbb7", //J系统 | ||
| 42 | |||
| 43 | // "appid" : "wx70f16625f10de4fe",//新跆联 | ||
| 44 | // "appid" : "wx5e2471ed6210c3a6", | ||
| 45 | "setting": { | ||
| 46 | "urlCheck": false, | ||
| 47 | "minified": false, | ||
| 48 | "es6": true | ||
| 49 | }, | ||
| 50 | "usingComponents": true, | ||
| 51 | "permission": {}, | ||
| 52 | "optimization": { | ||
| 53 | "subPackages": true | ||
| 54 | } | ||
| 55 | }, | ||
| 56 | "mp-alipay": { | ||
| 57 | "usingComponents": true | ||
| 58 | }, | ||
| 59 | "mp-baidu": { | ||
| 60 | "usingComponents": true | ||
| 61 | }, | ||
| 62 | "mp-toutiao": { | ||
| 63 | "usingComponents": true | ||
| 64 | }, | ||
| 65 | "uniStatistics": { | ||
| 66 | "enable": false | ||
| 67 | }, | ||
| 68 | "vueVersion": "3", | ||
| 69 | "h5": { | ||
| 70 | "router": { | ||
| 71 | "mode": "hash", | ||
| 72 | "base": "./" | ||
| 73 | }, | ||
| 74 | "template": "" | ||
| 75 | } | ||
| 76 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
File moved
src/shims-uni.d.ts
0 → 100644
220 Bytes
No preview for this file type
File moved
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
740 Bytes
No preview for this file type
891 Bytes
This diff is collapsed.
Click to expand it.
vite.config.js
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment