| | |
| | | import { getUserWallet } from "@/api/members"; |
| | | import configs from '@/config/config' |
| | | import storage from '@/utils/storage.js' |
| | | import { getSessionId, userAction } from "@/api/userAction.js"; |
| | | export default { |
| | | components: { |
| | | tool |
| | |
| | | couponNum: "", |
| | | footNum: "", |
| | | walletNum: "", |
| | | pageSessionNo:"", |
| | | actionParam:{ |
| | | sessionId:'', |
| | | actionType:"PAGE", |
| | | joinType:"SELF", |
| | | pageCode:"TBA_BAR_MY", |
| | | pageParams:"{}", |
| | | pageStatus:"JOIN", |
| | | pageType:"DETAIL" |
| | | } |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | |
| | | } |
| | | } |
| | | this.initCOS() |
| | | }, |
| | | onUnload() { |
| | | let param = Object.assign({}, this.actionParam); |
| | | if (this.sendOnShow)return |
| | | param.pageStatus = "LEAVE" |
| | | userAction(param) |
| | | }, |
| | | onHide() { |
| | | this.startHidenTime = Date.now() |
| | | let param =Object.assign({}, this.actionParam); |
| | | this.sendOnShow = true; |
| | | param.pageStatus = "LEAVE" |
| | | userAction(param) |
| | | }, |
| | | onLoad(options) { |
| | | this.actionParam.pageParams = JSON.stringify(options) |
| | | this.initCOS() |
| | | }, |
| | | onShow() { |
| | | |
| | | getSessionId().then(res=>{ |
| | | this.pageSessionNo = res.data.data |
| | | this.actionParam.sessionId = res.data.data |
| | | if(this.pageSessionNo){ |
| | | let param = Object.assign({}, this.actionParam); |
| | | param.sessionId = this.pageSessionNo |
| | | userAction(param) |
| | | } |
| | | }) |
| | | |
| | | this.userInfo = this.$options.filters.isLogin() || {}; |
| | | if (this.$options.filters.isLogin("auth")) { |
| | | this.getUserOrderNum(); |
| | |
| | | this.couponNum = 0; |
| | | this.footNum = 0; |
| | | } |
| | | |
| | | |
| | | let shareStoreId = uni.getStorageSync('shareStoreId'); |
| | | let shareTime = uni.getStorageSync('shareTime'); |
| | | console.log('从缓存读取参数:', { shareStoreId, shareTime }); |
| | |
| | | // 处理可能存在的hash(如果有的话) |
| | | const cleanUrl = url.split('#')[0]; |
| | | const queryStr = cleanUrl.split('?')[1] || ''; |
| | | |
| | | |
| | | queryStr.split('&').forEach(pair => { |
| | | const [key, value] = pair.split('='); |
| | | if (key) { |
| | |
| | | params[key] = value ? decodeURIComponent(value) : ''; |
| | | } |
| | | }); |
| | | |
| | | |
| | | return params; |
| | | }, |
| | | async bindMemberAndStore(shareStoreId, shareTime){ |