From ea6e2fab4461efa6d83be1683a96331873b1f714 Mon Sep 17 00:00:00 2001 From: youngS Date: Fri, 9 Apr 2021 17:16:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_client/src/components/FirAppInfosBase.vue | 2 + fir_client/src/components/FirHeader.vue | 22 ++++-- fir_client/src/components/FirUserOrders.vue | 71 +++++++++++++++---- fir_client/src/router/index.js | 10 +-- 4 files changed, 81 insertions(+), 24 deletions(-) diff --git a/fir_client/src/components/FirAppInfosBase.vue b/fir_client/src/components/FirAppInfosBase.vue index b1e0f52..e58d5c4 100644 --- a/fir_client/src/components/FirAppInfosBase.vue +++ b/fir_client/src/components/FirAppInfosBase.vue @@ -248,6 +248,8 @@ '$store.state.currentapp': function () { this.appinfos = this.$store.state.currentapp; }, + }, destroyed() { + this.$store.dispatch('doucurrentapp', {}); } } diff --git a/fir_client/src/components/FirHeader.vue b/fir_client/src/components/FirHeader.vue index 3e78197..4482cf9 100644 --- a/fir_client/src/components/FirHeader.vue +++ b/fir_client/src/components/FirHeader.vue @@ -21,15 +21,19 @@ - - - - + + 首页 + 我的应用 + + {{ + this.route_info.label }} + {{ $store.state.currentapp.name}} + @@ -78,7 +82,8 @@ current_user: {}, appName: '', token: '', - dialogVisible: false + dialogVisible: false, + route_info: {'name': '', 'label': ''}, } }, methods: { maketoken() { @@ -139,7 +144,11 @@ this.appName = this.$route.params.id }, watch: { $route: function () { - this.appName = this.$route.params.id + this.appName = this.$route.params.id; + if (this.$route.meta) { + this.route_info.label = this.$route.meta.label; + this.route_info.name = this.$route.name; + } } } } @@ -179,4 +188,5 @@ color: #67c23a; } + diff --git a/fir_client/src/components/FirUserOrders.vue b/fir_client/src/components/FirUserOrders.vue index 35c8644..c050969 100644 --- a/fir_client/src/components/FirUserOrders.vue +++ b/fir_client/src/components/FirUserOrders.vue @@ -2,6 +2,34 @@ + + + + + 用微信扫描二维码 + + + 支付完成之后,打开订单详情,将订单编号复制出来,进行绑定 +
+ + + 查询 + 关联 +
+
+
+ +
+ -
+ :value="current_order_info.actual_download_times"/> + :value="current_order_info.actual_download_gift_times"/> @@ -90,6 +117,7 @@ @@ -209,10 +237,13 @@ payment_type_choices: [], show_order_info: false, current_order_info: {}, + wx_pay: false, + sure_order_info: {wx_order_id: ''}, + loading: false } }, methods: { - goto_pay(order) { + sure_order() { my_order(res => { // 应该跳转到第三方平台进行支付,然后第三方回调 if (res.code === 1000) { @@ -225,9 +256,27 @@ this.$message.error("失败了 " + res.msg) } }, { - methods: 'PUT', data: {order_number: order.order_number}, + methods: 'PUT', data: {sure_order_info: this.sure_order_info}, }) }, + goto_pay(order) { + this.wx_pay = true; + this.sure_order_info.order_number = order.order_number; + // my_order(res => { + // // 应该跳转到第三方平台进行支付,然后第三方回调 + // if (res.code === 1000) { + // this.$message.success("支付成功"); + // this.get_data_from_tabname({ + // "size": this.pagination.pagesize, + // "page": this.pagination.currentPage + // }); + // } else { + // this.$message.error("失败了 " + res.msg) + // } + // }, { + // methods: 'PUT', data: {order_number: order.order_number}, + // }) + }, click_order_info(order) { this.show_order_info = true; this.current_order_info = order; @@ -237,7 +286,7 @@ this.pagination.pagesize = val; this.get_data_from_tabname({ "size": this.pagination.pagesize, - "page": this.pagination.currentPage + "page": 1 }) }, handleCurrentChange(val) { @@ -298,12 +347,7 @@ return ''; }, MyOrderFun(params) { - const loading = this.$loading({ - lock: true, - text: '执行中,请耐心等待...', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); + this.loading = true; my_order(data => { if (data.code === 1000) { this.order_info_list = data.data; @@ -317,8 +361,7 @@ } else { this.$message.error("操作失败") } - - loading.close(); + this.loading = false; }, {methods: 'GET', data: params}) }, getUserInfoFun() { diff --git a/fir_client/src/router/index.js b/fir_client/src/router/index.js index 22c70a0..5a1f5c6 100644 --- a/fir_client/src/router/index.js +++ b/fir_client/src/router/index.js @@ -104,18 +104,20 @@ const router = new VueRouter({ { path: 'info', name: 'FirUserProfileInfo', - // component: FirUserProfileInfo, + meta: {label: '个人资料'}, component: () => import("@/components/FirUserProfileInfo"), }, { path: 'setpasswd', name: 'FirUserProfileChangePwd', + meta: {label: '修改密码'}, // component: FirUserProfileChangePwd component: () => import("@/components/FirUserProfileChangePwd"), }, { path: 'certification', name: 'FirUserProfileCertification', + meta: {label: '实名认证'}, component: () => import("@/components/FirUserProfileCertification"), }, @@ -140,7 +142,7 @@ const router = new VueRouter({ { path: ':act', name: 'FirSuperSignBase', - // component: FirSuperSignBase, + meta: {label: '超级签名'}, component: () => import("@/components/FirSuperSignBase"), } @@ -150,12 +152,11 @@ const router = new VueRouter({ path: '/storage', // component: FirAppBase, component: () => import("@/components/FirAppBase"), - children: [ { path: ':act', name: 'FirUserStorage', - // component: FirUserProfileStorage + meta: {label: '存储管理'}, component: () => import("@/components/FirUserStorage"), } @@ -168,6 +169,7 @@ const router = new VueRouter({ { path: '', name: 'FirUserOrders', + meta: {label: '订单详情'}, component: () => import("@/components/FirUserOrders"), }