import { FreeButton, Reports, User } from "@/config/api.js"; export default { data() { return { isShowFree: false, //免费标签的隐现 isHorzMobile: false, //手机号是否是弘则的 globalBgAudioManager: uni.getBackgroundAudioManager(), //背景音频 navBarStyle: { height: 60 + "px", paddingTop: 40 + "px", paddingBottom: "4px", }, searchPlaceholderList: {}, wholeShowListData: {}, // PageRouter: { report: "", activity: "", }, //页面进来的路径 }; }, async onShow() { await this.$store.dispatch("checkHandle", "noGO"); this.isShowFreeButton(); }, methods: { //免费标签的隐现 async isShowFreeButton() { const res = await Reports.reportIsShow(); if (res.Ret === 200) { this.wholeShowListData = res.Data; this.isShowFree = res.Data.IsShowFreeButton; this.searchPlaceholderList = res.Data.SearchTxtList; } }, //判断手机号是否是弘则的 async userIsShowShare() { const res = await FreeButton.userIsShowShare(); if (res.Ret === 200) { this.isHorzMobile = res.Data.IsShow; } }, // 埋点 async getRecordTracking(PageRouter, payload = {}) { const res = await User.getUserTracking({ PageRouter, ...payload, }); }, strFontSize(str) { let font = str .replace(/font-size:\s\w+;?/g, "") .replace(/font-size\s:\w+;?/g, "") .replace(/font-size:\w+;?/g, ""); return `
${font}
`; }, pleaseGoLogin() { uni.showModal({ title: "即将前往登录页面,请确认是否继续", confirmColor: "#376cbb", cancelColor: "#606266", success: function (res) { if (res.confirm) { //已授权未绑定 uni.navigateTo({ url: "/pageMy/login/login", }); } }, }); }, }, computed: { isUserBindingPhoneNumber: { get() { let isShow = !(!this.$store.state.isAuth && this.$store.state.isBind); return isShow; }, set() {}, }, mixinIsSceneNumber: { get() { return this.$store.state.isSceneNumber; }, set() {}, }, }, };