cmSrsMixins.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // 统计Ross 用户
  2. import Vue from 'vue'
  3. const cmSrsMixins = {
  4. data() {
  5. return {
  6. handleProsId: 0,
  7. handleShopId: 0,
  8. handleProsKey: '',
  9. handleShopKey: '',
  10. productIds: [7247, 7248], //Ross 商品ID集合
  11. shopIds: [1378], // Ross 供应商Id
  12. keyWords: ['Binary Premium', '智能体疗管理系统', '448k', '肌肉重塑疗法', '西班牙ROSS', 'ROSS', '智能体疗', '西班牙Ross', 'Ross',
  13. '西班牙ross', 'ross',
  14. ], // Ross 搜索商品关键词 集合
  15. shopKeyWords: ['深圳艾斯佰丽生物科技有限公司', '艾斯佰丽'],
  16. showRossHtml: false,
  17. isDisabled: true
  18. }
  19. },
  20. methods: {
  21. checkedIsRossSet() {
  22. if (this.productIds.includes(this.handleProsId * 1) ||
  23. this.shopIds.includes(this.handleShopId * 1) ||
  24. this.keyWords.includes(this.handleProsKey) ||
  25. this.shopKeyWords.includes(this.handleShopKey)
  26. ) {
  27. uni.setStorageSync('behaviorType', 2)
  28. if (!this.hasLogin) {
  29. this.userInformationIsClick()
  30. }
  31. }
  32. },
  33. userInformationIsClick() {
  34. // 查看用户是否有过弹框游客当天是否有过弹框
  35. this.UserService.userInformationIsClick()
  36. .then(response => {
  37. if (response.data) {
  38. setTimeout(() => {
  39. this.showRossHtml = true
  40. }, 5000)
  41. }
  42. })
  43. .catch(error => {
  44. console.log('查询失败~')
  45. })
  46. }
  47. }
  48. }
  49. export default cmSrsMixins