index.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { FreeButton, Reports } from "@/config/api.js";
  2. export default {
  3. data() {
  4. return {
  5. isShowFree: false, //免费标签的隐现
  6. isHorzMobile: false, //手机号是否是弘则的
  7. globalBgAudioManager: uni.getBackgroundAudioManager(), //背景音频
  8. navBarStyle: {
  9. height: 60 + "px",
  10. paddingTop: 40 + "px",
  11. paddingBottom: "4px",
  12. },
  13. searchPlaceholderList: {},
  14. wholeShowListData: {}, //
  15. PageRouter: {
  16. report: "",
  17. activity:'',
  18. }, //页面进来的路径
  19. };
  20. },
  21. onShow() {
  22. this.isShowFreeButton();
  23. },
  24. onLoad(optios) {
  25. const page = this.$mp && this.$mp.page;
  26. uni.getSystemInfo({
  27. success: function (res) {
  28. if (page && page.route == "pages/pcWebViev/pcWebViev") return;
  29. if (res.windowWidth > 700) {
  30. uni.reLaunch({
  31. url: "/pages/pcWebViev/pcWebViev?path=" + page.route + "&query=" + JSON.stringify(optios),
  32. });
  33. }
  34. },
  35. });
  36. // 判断手机号是不是弘则研究
  37. // this.userIsShowShare();
  38. },
  39. methods: {
  40. //免费标签的隐现
  41. async isShowFreeButton() {
  42. const res = await Reports.reportIsShow();
  43. if (res.Ret === 200) {
  44. this.wholeShowListData = res.Data;
  45. this.isShowFree = res.Data.IsShowFreeButton;
  46. this.searchPlaceholderList = res.Data.SearchTxtList;
  47. }
  48. },
  49. //判断手机号是否是弘则的
  50. async userIsShowShare() {
  51. const res = await FreeButton.userIsShowShare();
  52. if (res.Ret === 200) {
  53. this.isHorzMobile = res.Data.IsShow;
  54. }
  55. },
  56. },
  57. };