From 4d4dbe4cd94af50968c9506168ab52d6c5d887ab Mon Sep 17 00:00:00 2001 From: dengtongyu Date: Wed, 19 Apr 2023 18:36:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 +- public/IMG_5350.PNG | Bin 203042 -> 0 bytes public/favicon.jpg | Bin 0 -> 2829 bytes src/assets/svg/pay_success.svg | 1 + src/components/abnormal/iconAndText.vue | 4 +- src/components/abnormal/index.vue | 6 +-- src/pages/Success.vue | 52 ++++++++++++++++++++++++ src/routes/routes.ts | 1 + src/styles/global.less | 36 +++++++++++++++- src/wx/index.ts | 6 ++- 10 files changed, 101 insertions(+), 9 deletions(-) delete mode 100644 public/IMG_5350.PNG create mode 100644 public/favicon.jpg create mode 100644 src/assets/svg/pay_success.svg create mode 100644 src/pages/Success.vue diff --git a/index.html b/index.html index 243bc76..c104f2e 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,10 @@ - + <%- title %> - \ No newline at end of file diff --git a/src/routes/routes.ts b/src/routes/routes.ts index f2989cc..16b667e 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -1,6 +1,7 @@ const routes = [ { path: "/", name: "root", redirect: "/home" }, { path: "/home", name: "home", meta: { power: true }, component: () => import("../pages/Home.vue") }, + { path: "/success", name: "success", component: () => import("../pages/Success.vue") }, { path: "/nonetwork:text?", name: "nonetwork", props: true, component: () => import("../pages/error/NoNetwork.vue") }, { path: "/noaccess/:text?", name: "noaccess", props: true, component: () => import("../pages/error/NoAccess.vue") }, { path: "/empty/:text?", name: "empty", props: true, component: () => import("../pages/error/NoData.vue") }, diff --git a/src/styles/global.less b/src/styles/global.less index c7ae967..46d5094 100644 --- a/src/styles/global.less +++ b/src/styles/global.less @@ -45,4 +45,38 @@ -webkit-tap-highlight-color:rgba(255,0,0,0); -moz-tap-highlight-color:rgba(255,0,0,0); tap-highlight-color:rgba(255,0,0,0); - } \ No newline at end of file + } + + .toupai-tips-page { + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + &-image { + width: 160px; + height: 160px; + & > img { + width: 100%; + height: 100%; + object-fit: cover; + } + } + &-text { + margin-top: 30px; + padding: 0 16px; + line-height: 26px; + color: #888; + font-size: 16px; + } + &-btn { + margin-top: 30px; + width: 100%; + display: flex; + justify-content: center; + &-class { + min-width: 100px; + margin: 0 8px !important; + } + } +} \ No newline at end of file diff --git a/src/wx/index.ts b/src/wx/index.ts index 24c250c..81dbce1 100644 --- a/src/wx/index.ts +++ b/src/wx/index.ts @@ -13,7 +13,11 @@ const onBridgeReady = function (data: any) { }, function (res: any) { if (res.err_msg === "get_brand_wcpay_request:ok") {// 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。 - window.location.reload(); + // window.location.reload(); + showDialog({ + title: "充值提示", + message: "充值成功" + }); } else if (res.err_msg === "get_brand_wcpay_request:fail") { showDialog({ title: "充值提示",