Commit 1c67381447f40412bc06c1d739d39d25f5947515
1 parent
3e6f797c
返回
Showing
1 changed file
with
11 additions
and
8 deletions
src/pages/pointsExchangeRecords/pointsExchangeRecords.vue
| ... | ... | @@ -141,17 +141,20 @@ export default { |
| 141 | 141 | Toast("获取抽奖记录失败"); |
| 142 | 142 | } |
| 143 | 143 | }, |
| 144 | - // 返回 | |
| 144 | + /** | |
| 145 | + * 后退 | |
| 146 | + */ | |
| 145 | 147 | goback () { |
| 146 | - if (this.isAndroid.value) { | |
| 148 | + | |
| 149 | + // 判断是否有处理函数 | |
| 150 | + if (typeof this.$parent.back === 'function') { | |
| 151 | + | |
| 152 | + // 后退 | |
| 147 | 153 | this.$parent.back(); |
| 148 | 154 | } else { |
| 149 | - this.$router.push({ | |
| 150 | - path: '/pointsMall', | |
| 151 | - query: { | |
| 152 | - uid: this.getStore("uid") || 0, | |
| 153 | - } | |
| 154 | - }) | |
| 155 | + | |
| 156 | + // 后退 | |
| 157 | + window.history.go(-1); | |
| 155 | 158 | } |
| 156 | 159 | } |
| 157 | 160 | }, | ... | ... |