diff --git a/src/router/index.js b/src/router/index.js
index 0aea480..3fb6979 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -27,7 +27,7 @@ let router = new Router({
component: putMoney
},
{
- path: '/put-money-success',
+ path: '/put-money-success/:num',
name: '提现成功',
component: putMoneySuccess,
},
diff --git a/src/view/put-money-success.vue b/src/view/put-money-success.vue
index c81aa25..2588d3f 100644
--- a/src/view/put-money-success.vue
+++ b/src/view/put-money-success.vue
@@ -13,7 +13,7 @@
1-3个工作日
-
提现金额:¥ {{amount}}
+
提现金额:¥ {{num}}
@@ -26,11 +26,11 @@
export default{
data () {
return {
- amount: 0
+ num: 0
}
},
created(){
- this.getParams()
+ // this.getParams()
},
methods:{
//返回上一页
@@ -39,13 +39,13 @@
},
getParams () {
// 取到路由带过来的参数
- this.amount = this.$route.params.amount
- console.log(this.$route.params)
- console.log(this.amount)
+ this.num = this.$route.params.num
+ console.log(this.num)
}
},
- mounted() {
- console.log(this.$route)
+ mounted() {
+ this.getParams()
+ // console.log(this.$route)
},
watch: {
// 监测路由变化,只要变化了就调用获取路由参数方法将数据存储本组件即可
diff --git a/src/view/put-money.vue b/src/view/put-money.vue
index f0e6409..8fd8c38 100644
--- a/src/view/put-money.vue
+++ b/src/view/put-money.vue
@@ -78,12 +78,6 @@ export default {
submit() {
if (this.isActive) {
- this.$router.push({
- name: "提现成功",
- params: { amount: this.inputVal }
- });
-
- return;
//判断是否在微信环境下操作
var ua = navigator.userAgent.toLowerCase();
if (!ua.match(/MicroMessenger/i) == "micromessenger") {