| | |
| | | </div> |
| | | <div |
| | | class="btn back-home" |
| | | @click="navigateTo('/pages/tabbar/home/index', 'switch')" |
| | | @click="navigateTo('/pages/tabbar/index/home', 'switch')" |
| | | > |
| | | 回到首页 |
| | | </div> |
| | |
| | | </template> |
| | | <script> |
| | | // import goodsRecommend from "@/pages/cart/m-goods-recommend/index.vue"; |
| | | import { getSessionId, userAction } from "@/api/userAction.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | payPrice: 0, |
| | | goodsList: [], |
| | | activeColor: this.$mainColor, |
| | | pageSessionNo:"", |
| | | actionParam:{ |
| | | sessionId:'', |
| | | actionType:"PAGE", |
| | | joinType:"SELF", |
| | | pageCode:"PAY_SUCCESS", |
| | | pageParams:"{}", |
| | | pageStatus:"JOIN", |
| | | pageType:"DETAIL" |
| | | } |
| | | }; |
| | | }, |
| | | // components: { |
| | |
| | | } |
| | | }, |
| | | }, |
| | | onUnload() { |
| | | let param = this.actionParam; |
| | | if (this.sendOnShow)return |
| | | param.pageStatus = "LEAVE" |
| | | userAction(param) |
| | | }, |
| | | onHide() { |
| | | this.startHidenTime = Date.now() |
| | | let param = this.actionParam; |
| | | this.sendOnShow = true; |
| | | param.pageStatus = "LEAVE" |
| | | userAction(param) |
| | | }, |
| | | onShow() { |
| | | getSessionId().then(res=>{ |
| | | this.pageSessionNo = res.data.data |
| | | if(this.pageSessionNo){ |
| | | let param = this.actionParam; |
| | | param.sessionId = this.pageSessionNo |
| | | userAction(param) |
| | | } |
| | | }) |
| | | }, |
| | | onLoad(options) { |
| | | this.actionParam.pageParams = JSON.stringify(options) |
| | | this.paymentMethod = options.paymentMethod || ""; |
| | | this.from = options.from || ""; |
| | | this.payPrice = options.payPrice || 0; |
| | |
| | | |
| | | navigateTo(url, type) { |
| | | if (type === "switch") { |
| | | uni.switchTab({ |
| | | uni.redirectTo({ |
| | | url, |
| | | fail(e) { |
| | | console.log('跳转失败',e) |
| | | } |
| | | }); |
| | | } else { |
| | | uni.redirectTo({ |