ylyx-cli 1.0.16 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +313 -276
- package/bin/ylyx.js +176 -168
- package/lib/config.js +325 -283
- package/lib/deploy.js +509 -529
- package/lib/environments.js +111 -0
- package/lib/generator.js +192 -192
- package/lib/index.js +113 -113
- package/lib/interactive.js +87 -87
- package/lib/remote.js +179 -179
- package/lib/template.js +174 -174
- package/lib/utils.js +148 -148
- package/package.json +61 -59
- package/templates/react-app/files/.gitignore +22 -0
- package/templates/react-app/files/README.md +23 -23
- package/templates/react-app/files/package.json +28 -28
- package/templates/react-app/files/public/index.html +11 -11
- package/templates/react-app/files/src/App.css +15 -15
- package/templates/react-app/files/src/App.js +15 -15
- package/templates/react-app/files/src/index.css +10 -10
- package/templates/react-app/files/src/index.js +11 -11
- package/templates/react-app/template.json +11 -11
- package/templates/react-component/files/Component.module.css +5 -5
- package/templates/react-component/files/Component.tsx +31 -31
- package/templates/react-component/files/index.ts +2 -2
- package/templates/react-component/template.json +48 -48
- package/templates/vue-app/files/.editorconfig +14 -14
- package/templates/vue-app/files/.env.development +21 -21
- package/templates/vue-app/files/.env.production +18 -18
- package/templates/vue-app/files/.eslintignore +5 -5
- package/templates/vue-app/files/.eslintrc.js +267 -267
- package/templates/vue-app/files/.gitignore +24 -0
- package/templates/vue-app/files/.prettierignore +11 -11
- package/templates/vue-app/files/.travis.yml +5 -5
- package/templates/vue-app/files/.vscode/extensions.json +7 -7
- package/templates/vue-app/files/.vscode/settings.json +39 -39
- package/templates/vue-app/files/LICENSE +191 -191
- package/templates/vue-app/files/README.md +87 -87
- package/templates/vue-app/files/babel.config.js +11 -11
- package/templates/vue-app/files/jest.config.js +24 -24
- package/templates/vue-app/files/package.json +136 -136
- package/templates/vue-app/files/plopfile.js +7 -7
- package/templates/vue-app/files/postcss.config.js +5 -5
- package/templates/vue-app/files/public/default.js +25 -25
- package/templates/vue-app/files/public/index.html +26 -26
- package/templates/vue-app/files/src/App.vue +54 -54
- package/templates/vue-app/files/src/api/bigDataV/index.js +198 -198
- package/templates/vue-app/files/src/api/data.js +42 -42
- package/templates/vue-app/files/src/api/dataArchive/index.js +186 -186
- package/templates/vue-app/files/src/api/generator/genConfig.js +16 -16
- package/templates/vue-app/files/src/api/generator/generator.js +32 -32
- package/templates/vue-app/files/src/api/indexManagement/index.js +39 -39
- package/templates/vue-app/files/src/api/institutionMonitor/index.js +396 -396
- package/templates/vue-app/files/src/api/institutionSet/index.js +120 -120
- package/templates/vue-app/files/src/api/login.js +44 -44
- package/templates/vue-app/files/src/api/selfStatistics/index.js +50 -50
- package/templates/vue-app/files/src/api/system/code.js +15 -15
- package/templates/vue-app/files/src/api/system/dict.js +34 -34
- package/templates/vue-app/files/src/api/system/dictDetail.js +52 -52
- package/templates/vue-app/files/src/api/system/equipment.js +35 -35
- package/templates/vue-app/files/src/api/system/examManage.js +49 -49
- package/templates/vue-app/files/src/api/system/examProject.js +48 -48
- package/templates/vue-app/files/src/api/system/hosModel.js +35 -35
- package/templates/vue-app/files/src/api/system/hospital.js +88 -88
- package/templates/vue-app/files/src/api/system/job.js +40 -40
- package/templates/vue-app/files/src/api/system/menu.js +67 -67
- package/templates/vue-app/files/src/api/system/model.js +42 -42
- package/templates/vue-app/files/src/api/system/risConfig.js +9 -9
- package/templates/vue-app/files/src/api/system/role.js +64 -64
- package/templates/vue-app/files/src/api/system/sysSet.js +19 -19
- package/templates/vue-app/files/src/api/system/timing.js +41 -41
- package/templates/vue-app/files/src/api/system/user.js +121 -121
- package/templates/vue-app/files/src/api/tools/alipay.js +25 -25
- package/templates/vue-app/files/src/api/tools/email.js +24 -24
- package/templates/vue-app/files/src/api/tools/localStorage.js +27 -27
- package/templates/vue-app/files/src/api/tools/qiniu.js +40 -40
- package/templates/vue-app/files/src/assets/css/font-awesome.css +2342 -2342
- package/templates/vue-app/files/src/assets/css/font-awesome.min.css +2336 -2336
- package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.svg +2671 -2671
- package/templates/vue-app/files/src/assets/icons/index.js +9 -9
- package/templates/vue-app/files/src/assets/icons/svg/hospital.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/hospital1.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/loginOne.svg +35 -35
- package/templates/vue-app/files/src/assets/icons/svg/loginOneWhite.svg +19 -19
- package/templates/vue-app/files/src/assets/icons/svg/loginOr.svg +93 -93
- package/templates/vue-app/files/src/assets/icons/svg/loginUp.svg +96 -96
- package/templates/vue-app/files/src/assets/icons/svg/monitor.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/offline.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/online.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svg/system.svg +1 -1
- package/templates/vue-app/files/src/assets/icons/svgo.yml +21 -21
- package/templates/vue-app/files/src/assets/styles/btn.scss +103 -103
- package/templates/vue-app/files/src/assets/styles/eladmin.scss +124 -124
- package/templates/vue-app/files/src/assets/styles/element-ui.scss +217 -217
- package/templates/vue-app/files/src/assets/styles/element-variables.scss +31 -31
- package/templates/vue-app/files/src/assets/styles/global.scss +73 -73
- package/templates/vue-app/files/src/assets/styles/index.scss +220 -220
- package/templates/vue-app/files/src/assets/styles/mixin.scss +60 -60
- package/templates/vue-app/files/src/assets/styles/publicStyle.scss +224 -224
- package/templates/vue-app/files/src/assets/styles/sidebar.scss +239 -239
- package/templates/vue-app/files/src/assets/styles/transition.scss +48 -48
- package/templates/vue-app/files/src/assets/styles/variables.scss +44 -44
- package/templates/vue-app/files/src/common/flexible.js +145 -145
- package/templates/vue-app/files/src/components/Breadcrumb/index.vue +87 -87
- package/templates/vue-app/files/src/components/Crud/CRUD.operation.vue +248 -248
- package/templates/vue-app/files/src/components/Crud/Pagination.vue +20 -20
- package/templates/vue-app/files/src/components/Crud/RR.operation.vue +39 -39
- package/templates/vue-app/files/src/components/Crud/UD.operation.vue +106 -106
- package/templates/vue-app/files/src/components/Crud/crud.js +907 -907
- package/templates/vue-app/files/src/components/Crud/user/UR.operation.vue +154 -154
- package/templates/vue-app/files/src/components/DateRangePicker/index.vue +42 -42
- package/templates/vue-app/files/src/components/DateRangePickerProhibitNext/index.vue +42 -42
- package/templates/vue-app/files/src/components/DateRangePickerProhibitTodayNext/index.vue +48 -48
- package/templates/vue-app/files/src/components/Dict/Dict.js +31 -31
- package/templates/vue-app/files/src/components/Dict/index.js +29 -29
- package/templates/vue-app/files/src/components/Doc/index.vue +16 -16
- package/templates/vue-app/files/src/components/Echarts/BarChart.vue +115 -115
- package/templates/vue-app/files/src/components/Echarts/Category.vue +768 -768
- package/templates/vue-app/files/src/components/Echarts/Funnel.vue +120 -120
- package/templates/vue-app/files/src/components/Echarts/Gauge.vue +74 -74
- package/templates/vue-app/files/src/components/Echarts/Graph.vue +101 -101
- package/templates/vue-app/files/src/components/Echarts/HeatMap.vue +301 -301
- package/templates/vue-app/files/src/components/Echarts/Line3D.vue +110 -110
- package/templates/vue-app/files/src/components/Echarts/PieChart.vue +84 -84
- package/templates/vue-app/files/src/components/Echarts/Point.vue +161 -161
- package/templates/vue-app/files/src/components/Echarts/RadarChart.vue +123 -123
- package/templates/vue-app/files/src/components/Echarts/Rich.vue +160 -160
- package/templates/vue-app/files/src/components/Echarts/Sankey.vue +114 -114
- package/templates/vue-app/files/src/components/Echarts/Scatter.vue +192 -192
- package/templates/vue-app/files/src/components/Echarts/Sunburst.vue +127 -127
- package/templates/vue-app/files/src/components/Echarts/ThemeRiver.vue +233 -233
- package/templates/vue-app/files/src/components/Echarts/WordCloud.vue +201 -201
- package/templates/vue-app/files/src/components/GithubCorner/index.vue +55 -55
- package/templates/vue-app/files/src/components/Hamburger/index.vue +44 -44
- package/templates/vue-app/files/src/components/HeaderSearch/index.vue +196 -196
- package/templates/vue-app/files/src/components/IconSelect/index.vue +74 -74
- package/templates/vue-app/files/src/components/IconSelect/requireIcons.js +10 -10
- package/templates/vue-app/files/src/components/Iframe/index.vue +30 -30
- package/templates/vue-app/files/src/components/JavaEdit/index.vue +78 -78
- package/templates/vue-app/files/src/components/Pagination/index.vue +100 -100
- package/templates/vue-app/files/src/components/PanThumb/index.vue +149 -149
- package/templates/vue-app/files/src/components/ParentView/index.vue +3 -3
- package/templates/vue-app/files/src/components/Permission/index.js +13 -13
- package/templates/vue-app/files/src/components/Permission/permission.js +21 -21
- package/templates/vue-app/files/src/components/RightPanel/index.vue +149 -149
- package/templates/vue-app/files/src/components/Screenfull/index.vue +60 -60
- package/templates/vue-app/files/src/components/SizeSelect/index.vue +60 -60
- package/templates/vue-app/files/src/components/SvgIcon/index.vue +66 -66
- package/templates/vue-app/files/src/components/ThemePicker/index.vue +177 -177
- package/templates/vue-app/files/src/components/UploadExcel/index.vue +149 -149
- package/templates/vue-app/files/src/components/WaterMark/setWaterMark.js +68 -68
- package/templates/vue-app/files/src/components/WaterMark/waterMark.vue +69 -69
- package/templates/vue-app/files/src/components/Xgplayer/index.vue +49 -49
- package/templates/vue-app/files/src/components/YamlEdit/index.vue +81 -81
- package/templates/vue-app/files/src/layout/components/AppMain.vue +67 -67
- package/templates/vue-app/files/src/layout/components/Navbar.vue +209 -209
- package/templates/vue-app/files/src/layout/components/Settings/index.vue +125 -125
- package/templates/vue-app/files/src/layout/components/Sidebar/FixiOSBug.js +26 -26
- package/templates/vue-app/files/src/layout/components/Sidebar/Item.vue +29 -29
- package/templates/vue-app/files/src/layout/components/Sidebar/Link.vue +35 -35
- package/templates/vue-app/files/src/layout/components/Sidebar/Logo.vue +93 -93
- package/templates/vue-app/files/src/layout/components/Sidebar/SidebarItem.vue +104 -104
- package/templates/vue-app/files/src/layout/components/Sidebar/index.vue +79 -79
- package/templates/vue-app/files/src/layout/components/TagsView/ScrollPane.vue +90 -90
- package/templates/vue-app/files/src/layout/components/TagsView/index.vue +299 -299
- package/templates/vue-app/files/src/layout/components/index.js +5 -5
- package/templates/vue-app/files/src/layout/index.vue +119 -119
- package/templates/vue-app/files/src/layout/mixin/ResizeHandler.js +45 -45
- package/templates/vue-app/files/src/main.js +89 -89
- package/templates/vue-app/files/src/mixins/crud.js +348 -348
- package/templates/vue-app/files/src/router/index.js +156 -156
- package/templates/vue-app/files/src/router/routers.js +203 -203
- package/templates/vue-app/files/src/settings.js +57 -57
- package/templates/vue-app/files/src/store/getters.js +29 -29
- package/templates/vue-app/files/src/store/index.js +25 -25
- package/templates/vue-app/files/src/store/modules/api.js +33 -33
- package/templates/vue-app/files/src/store/modules/app.js +55 -55
- package/templates/vue-app/files/src/store/modules/permission.js +79 -79
- package/templates/vue-app/files/src/store/modules/register.js +17 -17
- package/templates/vue-app/files/src/store/modules/settings.js +46 -46
- package/templates/vue-app/files/src/store/modules/tagsView.js +168 -168
- package/templates/vue-app/files/src/store/modules/user.js +119 -119
- package/templates/vue-app/files/src/utils/auth.js +18 -18
- package/templates/vue-app/files/src/utils/base64ToFile.js +27 -27
- package/templates/vue-app/files/src/utils/clipboard.js +36 -36
- package/templates/vue-app/files/src/utils/datetime.js +289 -289
- package/templates/vue-app/files/src/utils/getBlobFile.js +10 -10
- package/templates/vue-app/files/src/utils/getTime.js +29 -29
- package/templates/vue-app/files/src/utils/index.js +520 -520
- package/templates/vue-app/files/src/utils/permission.js +29 -29
- package/templates/vue-app/files/src/utils/pinyin.js +450 -450
- package/templates/vue-app/files/src/utils/request.js +139 -139
- package/templates/vue-app/files/src/utils/rsaEncrypt.js +37 -37
- package/templates/vue-app/files/src/utils/shortcuts.js +210 -210
- package/templates/vue-app/files/src/utils/upload.js +12 -12
- package/templates/vue-app/files/src/utils/validate.js +262 -262
- package/templates/vue-app/files/src/views/components/Echarts.vue +124 -124
- package/templates/vue-app/files/src/views/components/Editor.vue +75 -75
- package/templates/vue-app/files/src/views/components/MarkDown.vue +44 -44
- package/templates/vue-app/files/src/views/components/UVideo.vue +37 -37
- package/templates/vue-app/files/src/views/components/YamlEdit.vue +206 -206
- package/templates/vue-app/files/src/views/components/camera/camera.vue +115 -115
- package/templates/vue-app/files/src/views/components/camera/cameraTest.vue +158 -158
- package/templates/vue-app/files/src/views/components/excel/upload-excel.vue +41 -41
- package/templates/vue-app/files/src/views/components/icons/element-icons.js +74 -74
- package/templates/vue-app/files/src/views/components/icons/index.vue +106 -106
- package/templates/vue-app/files/src/views/components/icons/svg-icons.js +10 -10
- package/templates/vue-app/files/src/views/components/scroll/index.vue +107 -107
- package/templates/vue-app/files/src/views/components/scrollFull/index.vue +99 -99
- package/templates/vue-app/files/src/views/dashboard/LineChart.vue +138 -138
- package/templates/vue-app/files/src/views/dashboard/PanelGroup.vue +173 -173
- package/templates/vue-app/files/src/views/dashboard/mixins/resize.js +57 -57
- package/templates/vue-app/files/src/views/dataArchive/delTable.vue +354 -354
- package/templates/vue-app/files/src/views/dataArchive/exportDetail.vue +121 -121
- package/templates/vue-app/files/src/views/dataArchive/exportList.vue +160 -160
- package/templates/vue-app/files/src/views/dataArchive/index.vue +2104 -2104
- package/templates/vue-app/files/src/views/features/401.vue +83 -83
- package/templates/vue-app/files/src/views/features/404.vue +226 -226
- package/templates/vue-app/files/src/views/features/redirect.vue +12 -12
- package/templates/vue-app/files/src/views/generator/config.vue +348 -348
- package/templates/vue-app/files/src/views/generator/index.vue +143 -143
- package/templates/vue-app/files/src/views/generator/preview.vue +39 -39
- package/templates/vue-app/files/src/views/home.vue +80 -80
- package/templates/vue-app/files/src/views/indexManagement/index.vue +422 -422
- package/templates/vue-app/files/src/views/indexManagement/other.vue +286 -286
- package/templates/vue-app/files/src/views/institutionMonitor/components/LineChart.vue +191 -191
- package/templates/vue-app/files/src/views/institutionMonitor/index.scss +339 -339
- package/templates/vue-app/files/src/views/institutionMonitor/index.vue +1385 -1385
- package/templates/vue-app/files/src/views/institutionMonitor/mixins/resize.js +57 -57
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/checkProjectCode.vue +267 -267
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/imageAbnormalMonitor.vue +361 -361
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/index.vue +686 -686
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/leakageAnomaly.vue +270 -270
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/moveMonitore.vue +114 -114
- package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/qualityMonitore.vue +338 -338
- package/templates/vue-app/files/src/views/institutionSet/cloudSet.vue +534 -534
- package/templates/vue-app/files/src/views/institutionSet/index.vue +2550 -2550
- package/templates/vue-app/files/src/views/login.vue +243 -243
- package/templates/vue-app/files/src/views/qualityLogin.vue +280 -280
- package/templates/vue-app/files/src/views/selfStatistics/components/LineChart.vue +296 -296
- package/templates/vue-app/files/src/views/selfStatistics/hospitalDetail/index.vue +533 -533
- package/templates/vue-app/files/src/views/selfStatistics/index.scss +447 -447
- package/templates/vue-app/files/src/views/selfStatistics/index.vue +903 -903
- package/templates/vue-app/files/src/views/selfStatistics/mixins/resize.js +57 -57
- package/templates/vue-app/files/src/views/selfStatistics/monitorDetail/index.vue +285 -285
- package/templates/vue-app/files/src/views/selfStatistics/offlineDetail/index.vue +104 -104
- package/templates/vue-app/files/src/views/selfStatistics/selfActiveDetail/index.vue +104 -104
- package/templates/vue-app/files/src/views/selfStatistics/selfMonitorDetail/index.vue +420 -420
- package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/setWaterMark.js +68 -68
- package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/waterMark.vue +69 -69
- package/templates/vue-app/files/src/views/system/dept/index.vue +144 -144
- package/templates/vue-app/files/src/views/system/dict/dictDetail.vue +146 -146
- package/templates/vue-app/files/src/views/system/dict/index.vue +159 -159
- package/templates/vue-app/files/src/views/system/examModality/index.vue +174 -174
- package/templates/vue-app/files/src/views/system/examPart/index.vue +184 -184
- package/templates/vue-app/files/src/views/system/examProject/index.vue +321 -321
- package/templates/vue-app/files/src/views/system/examine/index.vue +66 -66
- package/templates/vue-app/files/src/views/system/job/index.vue +119 -119
- package/templates/vue-app/files/src/views/system/job/module/form.vue +72 -72
- package/templates/vue-app/files/src/views/system/job/module/header.vue +48 -48
- package/templates/vue-app/files/src/views/system/menu/index.vue +327 -327
- package/templates/vue-app/files/src/views/system/model/index.vue +285 -285
- package/templates/vue-app/files/src/views/system/role/index.vue +434 -434
- package/templates/vue-app/files/src/views/system/sysSet/index.vue +84 -84
- package/templates/vue-app/files/src/views/system/timing/index.vue +289 -289
- package/templates/vue-app/files/src/views/system/timing/log.vue +143 -143
- package/templates/vue-app/files/src/views/system/user/admin.vue +414 -414
- package/templates/vue-app/files/src/views/system/user/center/updateEmail.vue +146 -146
- package/templates/vue-app/files/src/views/system/user/center/updatePass.vue +168 -168
- package/templates/vue-app/files/src/views/system/user/center.vue +140 -140
- package/templates/vue-app/files/src/views/system/user/index.vue +972 -972
- package/templates/vue-app/files/src/views/systemSet/role/index.vue +314 -314
- package/templates/vue-app/files/src/views/systemSet/user/admin.vue +414 -414
- package/templates/vue-app/files/src/views/systemSet/user/center/updateEmail.vue +146 -146
- package/templates/vue-app/files/src/views/systemSet/user/center/updatePass.vue +115 -115
- package/templates/vue-app/files/src/views/systemSet/user/center.vue +351 -351
- package/templates/vue-app/files/src/views/systemSet/user/index.vue +928 -928
- package/templates/vue-app/files/src/views/tools/aliPay/config.vue +102 -102
- package/templates/vue-app/files/src/views/tools/aliPay/index.vue +48 -48
- package/templates/vue-app/files/src/views/tools/aliPay/toPay.vue +91 -91
- package/templates/vue-app/files/src/views/tools/email/config.vue +91 -91
- package/templates/vue-app/files/src/views/tools/email/index.vue +42 -42
- package/templates/vue-app/files/src/views/tools/email/send.vue +159 -159
- package/templates/vue-app/files/src/views/tools/storage/index.vue +35 -35
- package/templates/vue-app/files/src/views/tools/storage/local/index.vue +207 -207
- package/templates/vue-app/files/src/views/tools/storage/qiniu/form.vue +108 -108
- package/templates/vue-app/files/src/views/tools/storage/qiniu/index.vue +241 -241
- package/templates/vue-app/files/src/views/tools/swagger/index.vue +14 -14
- package/templates/vue-app/files/vue.config.js +173 -173
- package/templates/vue-app/template.json +29 -29
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form
|
|
3
|
-
ref="form"
|
|
4
|
-
:model="form"
|
|
5
|
-
:rules="rules"
|
|
6
|
-
style="margin-top: 6px"
|
|
7
|
-
size="small"
|
|
8
|
-
label-width="100px">
|
|
9
|
-
<el-form-item label="appID" prop="appId">
|
|
10
|
-
<el-input v-model="form.appId" style="width: 40%" />
|
|
11
|
-
<span style="color: #c0c0c0; margin-left: 10px"
|
|
12
|
-
>应用APPID,收款账号既是APPID对应支付宝账号</span
|
|
13
|
-
>
|
|
14
|
-
</el-form-item>
|
|
15
|
-
<el-form-item label="商家账号" prop="sysServiceProviderId">
|
|
16
|
-
<el-input v-model="form.sysServiceProviderId" style="width: 40%" />
|
|
17
|
-
<span style="color: #c0c0c0; margin-left: 10px">商家账号</span>
|
|
18
|
-
</el-form-item>
|
|
19
|
-
<el-form-item label="商户私钥" prop="privateKey">
|
|
20
|
-
<el-input v-model="form.privateKey" type="password" style="width: 40%" />
|
|
21
|
-
<span style="color: #c0c0c0; margin-left: 10px">商户私钥,你的PKCS8格式RSA2私钥</span>
|
|
22
|
-
</el-form-item>
|
|
23
|
-
<el-form-item label="支付宝公钥" prop="publicKey">
|
|
24
|
-
<el-input v-model="form.publicKey" type="password" style="width: 40%" />
|
|
25
|
-
<span style="color: #c0c0c0; margin-left: 10px">支付宝公钥</span>
|
|
26
|
-
</el-form-item>
|
|
27
|
-
<el-form-item label="回调地址" prop="returnUrl">
|
|
28
|
-
<el-input v-model="form.returnUrl" style="width: 40%" />
|
|
29
|
-
<span style="color: #c0c0c0; margin-left: 10px">订单完成后返回的地址</span>
|
|
30
|
-
</el-form-item>
|
|
31
|
-
<el-form-item label="异步通知" prop="notifyUrl">
|
|
32
|
-
<el-input v-model="form.notifyUrl" style="width: 40%" />
|
|
33
|
-
<span style="color: #c0c0c0; margin-left: 10px">支付结果异步通知地址</span>
|
|
34
|
-
</el-form-item>
|
|
35
|
-
<el-form-item label="">
|
|
36
|
-
<el-button :loading="loading" size="medium" type="primary" @click="doSubmit"
|
|
37
|
-
>保存配置</el-button
|
|
38
|
-
>
|
|
39
|
-
</el-form-item>
|
|
40
|
-
</el-form>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script>
|
|
44
|
-
import { get, update } from '@/api/tools/alipay';
|
|
45
|
-
export default {
|
|
46
|
-
name: 'Config',
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
loading: false,
|
|
50
|
-
form: {
|
|
51
|
-
appId: '',
|
|
52
|
-
sysServiceProviderId: '',
|
|
53
|
-
privateKey: '',
|
|
54
|
-
publicKey: '',
|
|
55
|
-
returnUrl: '',
|
|
56
|
-
notifyUrl: '',
|
|
57
|
-
},
|
|
58
|
-
rules: {
|
|
59
|
-
appId: [{ required: true, message: '请输入appID', trigger: 'blur' }],
|
|
60
|
-
sysServiceProviderId: [{ required: true, message: '请输入商家账号', trigger: 'blur' }],
|
|
61
|
-
privateKey: [{ required: true, message: '商户私钥不能为空', trigger: 'blur' }],
|
|
62
|
-
publicKey: [{ required: true, message: '支付宝公钥不能为空', trigger: 'blur' }],
|
|
63
|
-
returnUrl: [{ required: true, message: '回调地址不能为空', trigger: 'blur' }],
|
|
64
|
-
notifyUrl: [{ required: true, message: '回调地址不能为空', trigger: 'blur' }],
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
created() {
|
|
69
|
-
this.init();
|
|
70
|
-
},
|
|
71
|
-
methods: {
|
|
72
|
-
init() {
|
|
73
|
-
get().then(res => {
|
|
74
|
-
this.form = res;
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
doSubmit() {
|
|
78
|
-
this.$refs['form'].validate(valid => {
|
|
79
|
-
if (valid) {
|
|
80
|
-
this.loading = true;
|
|
81
|
-
update(this.form)
|
|
82
|
-
.then(res => {
|
|
83
|
-
this.$notify({
|
|
84
|
-
title: '修改成功',
|
|
85
|
-
type: 'success',
|
|
86
|
-
duration: 2500,
|
|
87
|
-
});
|
|
88
|
-
this.loading = false;
|
|
89
|
-
})
|
|
90
|
-
.catch(err => {
|
|
91
|
-
this.loading = false;
|
|
92
|
-
});
|
|
93
|
-
} else {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
</script>
|
|
101
|
-
|
|
102
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-form
|
|
3
|
+
ref="form"
|
|
4
|
+
:model="form"
|
|
5
|
+
:rules="rules"
|
|
6
|
+
style="margin-top: 6px"
|
|
7
|
+
size="small"
|
|
8
|
+
label-width="100px">
|
|
9
|
+
<el-form-item label="appID" prop="appId">
|
|
10
|
+
<el-input v-model="form.appId" style="width: 40%" />
|
|
11
|
+
<span style="color: #c0c0c0; margin-left: 10px"
|
|
12
|
+
>应用APPID,收款账号既是APPID对应支付宝账号</span
|
|
13
|
+
>
|
|
14
|
+
</el-form-item>
|
|
15
|
+
<el-form-item label="商家账号" prop="sysServiceProviderId">
|
|
16
|
+
<el-input v-model="form.sysServiceProviderId" style="width: 40%" />
|
|
17
|
+
<span style="color: #c0c0c0; margin-left: 10px">商家账号</span>
|
|
18
|
+
</el-form-item>
|
|
19
|
+
<el-form-item label="商户私钥" prop="privateKey">
|
|
20
|
+
<el-input v-model="form.privateKey" type="password" style="width: 40%" />
|
|
21
|
+
<span style="color: #c0c0c0; margin-left: 10px">商户私钥,你的PKCS8格式RSA2私钥</span>
|
|
22
|
+
</el-form-item>
|
|
23
|
+
<el-form-item label="支付宝公钥" prop="publicKey">
|
|
24
|
+
<el-input v-model="form.publicKey" type="password" style="width: 40%" />
|
|
25
|
+
<span style="color: #c0c0c0; margin-left: 10px">支付宝公钥</span>
|
|
26
|
+
</el-form-item>
|
|
27
|
+
<el-form-item label="回调地址" prop="returnUrl">
|
|
28
|
+
<el-input v-model="form.returnUrl" style="width: 40%" />
|
|
29
|
+
<span style="color: #c0c0c0; margin-left: 10px">订单完成后返回的地址</span>
|
|
30
|
+
</el-form-item>
|
|
31
|
+
<el-form-item label="异步通知" prop="notifyUrl">
|
|
32
|
+
<el-input v-model="form.notifyUrl" style="width: 40%" />
|
|
33
|
+
<span style="color: #c0c0c0; margin-left: 10px">支付结果异步通知地址</span>
|
|
34
|
+
</el-form-item>
|
|
35
|
+
<el-form-item label="">
|
|
36
|
+
<el-button :loading="loading" size="medium" type="primary" @click="doSubmit"
|
|
37
|
+
>保存配置</el-button
|
|
38
|
+
>
|
|
39
|
+
</el-form-item>
|
|
40
|
+
</el-form>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import { get, update } from '@/api/tools/alipay';
|
|
45
|
+
export default {
|
|
46
|
+
name: 'Config',
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
loading: false,
|
|
50
|
+
form: {
|
|
51
|
+
appId: '',
|
|
52
|
+
sysServiceProviderId: '',
|
|
53
|
+
privateKey: '',
|
|
54
|
+
publicKey: '',
|
|
55
|
+
returnUrl: '',
|
|
56
|
+
notifyUrl: '',
|
|
57
|
+
},
|
|
58
|
+
rules: {
|
|
59
|
+
appId: [{ required: true, message: '请输入appID', trigger: 'blur' }],
|
|
60
|
+
sysServiceProviderId: [{ required: true, message: '请输入商家账号', trigger: 'blur' }],
|
|
61
|
+
privateKey: [{ required: true, message: '商户私钥不能为空', trigger: 'blur' }],
|
|
62
|
+
publicKey: [{ required: true, message: '支付宝公钥不能为空', trigger: 'blur' }],
|
|
63
|
+
returnUrl: [{ required: true, message: '回调地址不能为空', trigger: 'blur' }],
|
|
64
|
+
notifyUrl: [{ required: true, message: '回调地址不能为空', trigger: 'blur' }],
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
created() {
|
|
69
|
+
this.init();
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
init() {
|
|
73
|
+
get().then(res => {
|
|
74
|
+
this.form = res;
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
doSubmit() {
|
|
78
|
+
this.$refs['form'].validate(valid => {
|
|
79
|
+
if (valid) {
|
|
80
|
+
this.loading = true;
|
|
81
|
+
update(this.form)
|
|
82
|
+
.then(res => {
|
|
83
|
+
this.$notify({
|
|
84
|
+
title: '修改成功',
|
|
85
|
+
type: 'success',
|
|
86
|
+
duration: 2500,
|
|
87
|
+
});
|
|
88
|
+
this.loading = false;
|
|
89
|
+
})
|
|
90
|
+
.catch(err => {
|
|
91
|
+
this.loading = false;
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style scoped></style>
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-tabs v-model="activeName" style="padding-left: 5px">
|
|
3
|
-
<el-tab-pane label="参数配置" name="first">
|
|
4
|
-
<Config />
|
|
5
|
-
</el-tab-pane>
|
|
6
|
-
<el-tab-pane label="支付测试" name="second">
|
|
7
|
-
<ToPay />
|
|
8
|
-
</el-tab-pane>
|
|
9
|
-
<el-tab-pane label="使用说明" name="third">
|
|
10
|
-
<div>
|
|
11
|
-
<blockquote class="my-blockquote">注意</blockquote>
|
|
12
|
-
<pre class="my-code">
|
|
13
|
-
测试所用参数都是沙箱环境,仅供测试使用,申请地址:<a style="color: #00a0e9" href="https://openhome.alipay.com/platform/appDaily.htm?tab=info" target="_blank">支付宝开发平台</a>
|
|
14
|
-
如需付款测试,请使用
|
|
15
|
-
账号:uuxesw9745@sandbox.com
|
|
16
|
-
密码与支付密码:111111</pre>
|
|
17
|
-
<blockquote class="my-blockquote">支付设置</blockquote>
|
|
18
|
-
<pre class="my-code">
|
|
19
|
-
// 支付提供两个接口,
|
|
20
|
-
// PC端与手机端,并且在前端使用代码识别
|
|
21
|
-
if (/(Android)/i.test(navigator.userAgent)){ // 判断是否为Android手机
|
|
22
|
-
url = "/aliPay/toPayAsWeb"
|
|
23
|
-
}else if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){ // 判断是否为苹果手机
|
|
24
|
-
url = "/aliPay/toPayAsWeb"
|
|
25
|
-
} else {
|
|
26
|
-
url = "/aliPay/toPayAsPC"
|
|
27
|
-
}</pre
|
|
28
|
-
>
|
|
29
|
-
</div>
|
|
30
|
-
</el-tab-pane>
|
|
31
|
-
</el-tabs>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import Config from './config';
|
|
36
|
-
import ToPay from './toPay';
|
|
37
|
-
export default {
|
|
38
|
-
name: 'AliPay',
|
|
39
|
-
components: { Config, ToPay },
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
activeName: 'second',
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-tabs v-model="activeName" style="padding-left: 5px">
|
|
3
|
+
<el-tab-pane label="参数配置" name="first">
|
|
4
|
+
<Config />
|
|
5
|
+
</el-tab-pane>
|
|
6
|
+
<el-tab-pane label="支付测试" name="second">
|
|
7
|
+
<ToPay />
|
|
8
|
+
</el-tab-pane>
|
|
9
|
+
<el-tab-pane label="使用说明" name="third">
|
|
10
|
+
<div>
|
|
11
|
+
<blockquote class="my-blockquote">注意</blockquote>
|
|
12
|
+
<pre class="my-code">
|
|
13
|
+
测试所用参数都是沙箱环境,仅供测试使用,申请地址:<a style="color: #00a0e9" href="https://openhome.alipay.com/platform/appDaily.htm?tab=info" target="_blank">支付宝开发平台</a>
|
|
14
|
+
如需付款测试,请使用
|
|
15
|
+
账号:uuxesw9745@sandbox.com
|
|
16
|
+
密码与支付密码:111111</pre>
|
|
17
|
+
<blockquote class="my-blockquote">支付设置</blockquote>
|
|
18
|
+
<pre class="my-code">
|
|
19
|
+
// 支付提供两个接口,
|
|
20
|
+
// PC端与手机端,并且在前端使用代码识别
|
|
21
|
+
if (/(Android)/i.test(navigator.userAgent)){ // 判断是否为Android手机
|
|
22
|
+
url = "/aliPay/toPayAsWeb"
|
|
23
|
+
}else if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){ // 判断是否为苹果手机
|
|
24
|
+
url = "/aliPay/toPayAsWeb"
|
|
25
|
+
} else {
|
|
26
|
+
url = "/aliPay/toPayAsPC"
|
|
27
|
+
}</pre
|
|
28
|
+
>
|
|
29
|
+
</div>
|
|
30
|
+
</el-tab-pane>
|
|
31
|
+
</el-tabs>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import Config from './config';
|
|
36
|
+
import ToPay from './toPay';
|
|
37
|
+
export default {
|
|
38
|
+
name: 'AliPay',
|
|
39
|
+
components: { Config, ToPay },
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
activeName: 'second',
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style scoped></style>
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-form
|
|
4
|
-
ref="form"
|
|
5
|
-
:model="form"
|
|
6
|
-
:rules="rules"
|
|
7
|
-
style="margin-top: 6px"
|
|
8
|
-
size="small"
|
|
9
|
-
label-width="90px">
|
|
10
|
-
<el-form-item label="商品名称" prop="subject">
|
|
11
|
-
<el-input v-model="form.subject" style="width: 35%" />
|
|
12
|
-
</el-form-item>
|
|
13
|
-
<el-form-item label="商品价格" prop="totalAmount">
|
|
14
|
-
<el-input v-model="form.totalAmount" style="width: 35%" />
|
|
15
|
-
<span style="color: #c0c0c0; margin-left: 10px">测试允许区间(0,5000]</span>
|
|
16
|
-
</el-form-item>
|
|
17
|
-
<el-form-item label="商品描述" prop="body">
|
|
18
|
-
<el-input v-model="form.body" style="width: 35%" rows="8" type="textarea" />
|
|
19
|
-
</el-form-item>
|
|
20
|
-
<el-form-item label="">
|
|
21
|
-
<el-button :loading="loading" size="medium" type="primary" @click="doSubmit"
|
|
22
|
-
>去支付</el-button
|
|
23
|
-
>
|
|
24
|
-
</el-form-item>
|
|
25
|
-
</el-form>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
import { toAliPay } from '@/api/tools/alipay';
|
|
31
|
-
export default {
|
|
32
|
-
data() {
|
|
33
|
-
return {
|
|
34
|
-
url: '',
|
|
35
|
-
// 新窗口的引用
|
|
36
|
-
newWin: null,
|
|
37
|
-
loading: false,
|
|
38
|
-
form: { subject: '', totalAmount: '', body: '' },
|
|
39
|
-
rules: {
|
|
40
|
-
subject: [{ required: true, message: '商品名称不能为空', trigger: 'blur' }],
|
|
41
|
-
totalAmount: [{ required: true, message: '商品价格不能为空', trigger: 'blur' }],
|
|
42
|
-
body: [{ required: true, message: '商品描述不能为空', trigger: 'blur' }],
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
watch: {
|
|
47
|
-
url(newVal, oldVal) {
|
|
48
|
-
if (newVal && this.newWin) {
|
|
49
|
-
this.newWin.sessionStorage.clear();
|
|
50
|
-
this.newWin.location.href = newVal;
|
|
51
|
-
// 重定向后把url和newWin重置
|
|
52
|
-
this.url = '';
|
|
53
|
-
this.newWin = null;
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
methods: {
|
|
58
|
-
doSubmit() {
|
|
59
|
-
this.$refs['form'].validate(valid => {
|
|
60
|
-
if (valid) {
|
|
61
|
-
this.loading = true;
|
|
62
|
-
// 先打开一个空的新窗口,再请求
|
|
63
|
-
this.newWin = window.open();
|
|
64
|
-
let url = '';
|
|
65
|
-
if (/(Android)/i.test(navigator.userAgent)) {
|
|
66
|
-
// 判断是否为Android手机
|
|
67
|
-
url = 'aliPay/toPayAsWeb';
|
|
68
|
-
} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
69
|
-
// 判断是否为苹果手机
|
|
70
|
-
url = 'aliPay/toPayAsWeb';
|
|
71
|
-
} else {
|
|
72
|
-
url = 'aliPay/toPayAsPC';
|
|
73
|
-
}
|
|
74
|
-
toAliPay(url, this.form)
|
|
75
|
-
.then(res => {
|
|
76
|
-
this.loading = false;
|
|
77
|
-
this.url = res;
|
|
78
|
-
})
|
|
79
|
-
.catch(err => {
|
|
80
|
-
this.loading = false;
|
|
81
|
-
});
|
|
82
|
-
} else {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form
|
|
4
|
+
ref="form"
|
|
5
|
+
:model="form"
|
|
6
|
+
:rules="rules"
|
|
7
|
+
style="margin-top: 6px"
|
|
8
|
+
size="small"
|
|
9
|
+
label-width="90px">
|
|
10
|
+
<el-form-item label="商品名称" prop="subject">
|
|
11
|
+
<el-input v-model="form.subject" style="width: 35%" />
|
|
12
|
+
</el-form-item>
|
|
13
|
+
<el-form-item label="商品价格" prop="totalAmount">
|
|
14
|
+
<el-input v-model="form.totalAmount" style="width: 35%" />
|
|
15
|
+
<span style="color: #c0c0c0; margin-left: 10px">测试允许区间(0,5000]</span>
|
|
16
|
+
</el-form-item>
|
|
17
|
+
<el-form-item label="商品描述" prop="body">
|
|
18
|
+
<el-input v-model="form.body" style="width: 35%" rows="8" type="textarea" />
|
|
19
|
+
</el-form-item>
|
|
20
|
+
<el-form-item label="">
|
|
21
|
+
<el-button :loading="loading" size="medium" type="primary" @click="doSubmit"
|
|
22
|
+
>去支付</el-button
|
|
23
|
+
>
|
|
24
|
+
</el-form-item>
|
|
25
|
+
</el-form>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import { toAliPay } from '@/api/tools/alipay';
|
|
31
|
+
export default {
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
url: '',
|
|
35
|
+
// 新窗口的引用
|
|
36
|
+
newWin: null,
|
|
37
|
+
loading: false,
|
|
38
|
+
form: { subject: '', totalAmount: '', body: '' },
|
|
39
|
+
rules: {
|
|
40
|
+
subject: [{ required: true, message: '商品名称不能为空', trigger: 'blur' }],
|
|
41
|
+
totalAmount: [{ required: true, message: '商品价格不能为空', trigger: 'blur' }],
|
|
42
|
+
body: [{ required: true, message: '商品描述不能为空', trigger: 'blur' }],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
watch: {
|
|
47
|
+
url(newVal, oldVal) {
|
|
48
|
+
if (newVal && this.newWin) {
|
|
49
|
+
this.newWin.sessionStorage.clear();
|
|
50
|
+
this.newWin.location.href = newVal;
|
|
51
|
+
// 重定向后把url和newWin重置
|
|
52
|
+
this.url = '';
|
|
53
|
+
this.newWin = null;
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
doSubmit() {
|
|
59
|
+
this.$refs['form'].validate(valid => {
|
|
60
|
+
if (valid) {
|
|
61
|
+
this.loading = true;
|
|
62
|
+
// 先打开一个空的新窗口,再请求
|
|
63
|
+
this.newWin = window.open();
|
|
64
|
+
let url = '';
|
|
65
|
+
if (/(Android)/i.test(navigator.userAgent)) {
|
|
66
|
+
// 判断是否为Android手机
|
|
67
|
+
url = 'aliPay/toPayAsWeb';
|
|
68
|
+
} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
69
|
+
// 判断是否为苹果手机
|
|
70
|
+
url = 'aliPay/toPayAsWeb';
|
|
71
|
+
} else {
|
|
72
|
+
url = 'aliPay/toPayAsPC';
|
|
73
|
+
}
|
|
74
|
+
toAliPay(url, this.form)
|
|
75
|
+
.then(res => {
|
|
76
|
+
this.loading = false;
|
|
77
|
+
this.url = res;
|
|
78
|
+
})
|
|
79
|
+
.catch(err => {
|
|
80
|
+
this.loading = false;
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<style scoped></style>
|