1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import { FreeButton, Reports, User } from "@/config/api.js";
- import { Throttle } from "@/config/util.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();
- },
- onLoad(optios) {
- // PC端功能关闭
- // const page = this.$mp && this.$mp.page;
- // uni.getSystemInfo({
- // success: function (res) {
- // if (page && page.route == "pages/pcWebViev/pcWebViev") return;
- // if (res.windowWidth > 700) {
- // uni.reLaunch({
- // url: "/pages/pcWebViev/pcWebViev?path=" + page.route + "&query=" + JSON.stringify(optios),
- // });
- // }
- // },
- // });
- // 判断手机号是不是弘则研究
- // this.userIsShowShare();
- },
- 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 `<div style="font-size:16px;line-height: 1.6">${font}</div>`;
- },
- },
- computed: {
- isUserBindingPhoneNumber: {
- get() {
- let isShow = !(!this.$store.state.isAuth && this.$store.state.isBind);
- return isShow;
- },
- set() {},
- },
- },
- };
|